/* =====================================================================
   9Space CRM — theme layer on top of Bootstrap 5.
   Typeface pairing: Sora (headings, numerals) + IBM Plex Sans (interface).
   Palette: violet drawn from the 9Space logo, with its red as the accent.
   Every pairing below was checked against WCAG AA.
   ===================================================================== */

:root {
  /* Core palette */
  --ink:        #191324;
  --ink-soft:   #3b3352;
  --muted:      #6c6482;
  --canvas:     #f5f3fa;
  --surface:    #ffffff;
  --line:       #e4dfef;
  --line-soft:  #efebf7;

  /* Brand — the logo's violet, deepened so white text clears 4.5:1 on it.
     --brand-lift is the logo purple itself, used for hover and the active
     sidebar rail. The logo's red is the accent and has exactly two jobs:
     money, and the single call to action. */
  --brand:      #6d28d9;
  --brand-dark: #4a1d96;
  --brand-lift: #8c52ff;
  --brand-soft: #f0e8ff;
  --accent:     #e22424;
  --accent-soft:#fdecec;

  /* States */
  --ok:   #15795b;  --ok-soft:   #e4f4ef;
  --warn: #a35a00;  --warn-soft: #faf0e1;
  --bad:  #b42a21;  --bad-soft:  #fbe9e7;
  --info: #5b35c7;  --info-soft: #ede7fd;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --sidebar-w: 252px;
  --topbar-h:  62px;

  --bs-primary: var(--brand);
  --bs-body-color: var(--ink);
  --bs-body-font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--bs-body-font-family);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: 'Sora', var(--bs-body-font-family);
  color: var(--ink);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }

p  { max-width: 68ch; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

.text-muted-2 { color: var(--muted) !important; }
.numeric { font-family: 'Sora', sans-serif; font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--brand-lift);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ buttons */

.btn {
  font-weight: 550;
  border-radius: var(--radius-sm);
  padding: .5rem 1.05rem;
  border: 1px solid transparent;
}
.btn-brand        { background: var(--brand); color: #fff; }
.btn-brand:hover  { background: var(--brand-dark); color: #fff; }
.btn-accent       { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #c01c1c; color: #fff; }
.btn-line         { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-line:hover   { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-ghost        { background: transparent; color: var(--muted); }
.btn-ghost:hover  { background: var(--line-soft); color: var(--ink); }
.btn-sm           { padding: .3rem .7rem; font-size: .86rem; }

/* Destructive only. Kept apart from --accent, which means money and the one
   call to action, so a delete never looks like a buy button. */
.btn-danger       { background: var(--bad); color: #fff; }
.btn-danger:hover { background: #99231c; color: #fff; }

/* -------------------------------------------------------------- forms */

.form-label { font-size: .84rem; font-weight: 550; color: var(--ink-soft); margin-bottom: .3rem; }
.form-control, .form-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .52rem .75rem;
  font-size: .95rem;
  color: var(--ink);
  background: var(--surface);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-lift);
  box-shadow: 0 0 0 3px rgba(140, 82, 255, .16);
}
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .82rem; margin-top: .25rem; display: block; }
.form-hint   { display: block; margin-top: .3rem; color: var(--muted); font-size: .82rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* ------------------------------------------------------------- panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h3, .panel-head h4 { margin: 0; font-size: 1rem; }
.panel-body { padding: 1.15rem; }
.panel-body.tight { padding: 0; }

/* Stat tiles read as a row of figures, not as another set of cards:
   no shadow, a coloured rule instead of a border on the meaningful edge. */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .95rem 1.1rem;
  height: 100%;
}
.stat.is-ok    { border-left-color: var(--ok); }
.stat.is-warn  { border-left-color: var(--warn); }
.stat.is-bad   { border-left-color: var(--bad); }
.stat.is-info  { border-left-color: var(--info); }
.stat.is-money { border-left-color: var(--accent); }
.stat-label { color: var(--muted); font-size: .82rem; margin-bottom: .15rem; }
.stat-value { font-family: 'Sora', sans-serif; font-size: 1.62rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-note  { color: var(--muted); font-size: .78rem; margin-top: .1rem; }

/* ------------------------------------------------------------- badges */

.badge-pill {
  display: inline-block;
  padding: .18rem .58rem;
  border-radius: 100px;
  font-size: .76rem;
  font-weight: 550;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-ok    { background: var(--ok-soft);   color: var(--ok); }
.badge-warn  { background: var(--warn-soft); color: var(--warn); }
.badge-bad   { background: var(--bad-soft);  color: var(--bad); }
.badge-info  { background: var(--info-soft); color: var(--info); }
.badge-muted { background: var(--line-soft); color: var(--muted); }

/* ------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th {
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  color: var(--muted);
  padding: .7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: .78rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #faf8fd; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

.empty {
  padding: 2.6rem 1.25rem;
  text-align: center;
  color: var(--muted);
}
.empty h4 { color: var(--ink); margin-bottom: .35rem; }
.empty p  { margin: 0 auto .9rem; max-width: 44ch; }

/* ------------------------------------------------------------ avatars */

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .8rem; font-weight: 600;
  flex: 0 0 auto;
}
.avatar-lg { width: 46px; height: 46px; font-size: 1rem; }

/* ====================================================== dashboard shell */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--brand-dark);
  color: #ddd3f5;
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
  z-index: 1040;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  height: var(--topbar-h);
  padding: 0 1.15rem;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.sidebar-brand:hover { color: #fff; text-decoration: none; }
.sidebar-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--brand-lift); color: #fff;
  display: grid; place-items: center; font-size: .9rem;
}
.sidebar-section {
  padding: 1.05rem 1.15rem .35rem;
  font-size: .72rem;
  letter-spacing: .04em;
  color: #9a8cc4;
}
.sidebar-nav { list-style: none; margin: 0; padding: .35rem .6rem 1.2rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .62rem;
  padding: .52rem .7rem;
  border-radius: var(--radius-sm);
  color: #ddd3f5;
  font-size: .92rem;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: var(--brand-lift); color: #fff; font-weight: 550; }
.sidebar-nav a.locked { color: #9183bc; cursor: default; }

/* Pages of the module you are currently inside, nested under its entry. */
.sidebar-nav a.submenu {
  padding-left: 2.35rem;
  font-size: .86rem;
  color: #bcaee0;
}
.sidebar-nav a.submenu i { font-size: .9rem; opacity: .85; }
.sidebar-nav a.submenu.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 550; }
.sidebar-nav a.locked:hover { background: transparent; color: #9183bc; }
.sidebar-nav i { width: 17px; text-align: center; font-size: .98rem; }
.sidebar-foot { margin-top: auto; padding: 1rem 1.15rem; border-top: 1px solid rgba(255,255,255,.09); font-size: .8rem; color: #a295cc; }

.main { flex: 1 1 auto; margin-left: var(--sidebar-w); min-width: 0; }

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.4rem;
  position: sticky; top: 0; z-index: 1020;
}
.topbar h1 { font-size: 1.12rem; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.topbar .spacer { flex: 1 1 auto; }
.sidebar-toggle { display: none; background: none; border: 0; font-size: 1.3rem; color: var(--ink); padding: .2rem .4rem; }

.content { padding: 1.5rem 1.4rem 3rem; }
.page-intro { margin-bottom: 1.25rem; }
.page-intro p { color: var(--muted); margin: .25rem 0 0; }

.backdrop { display: none; position: fixed; inset: 0; background: rgba(25,19,36,.55); z-index: 1030; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .backdrop { display: block; }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-block; }
  .content { padding: 1.1rem .9rem 3rem; }
}

/* ------------------------------------------------------------ notices */

.notice {
  display: flex; gap: .7rem; align-items: flex-start;
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  font-size: .93rem;
  border: 1px solid transparent;
}
.notice i { font-size: 1.05rem; line-height: 1.45; }
.notice-success { background: var(--ok-soft);   border-color: #bfe0d2; color: #0f5a45; }
.notice-danger  { background: var(--bad-soft);  border-color: #f3c9c5; color: #8e241c; }
.notice-warning { background: var(--warn-soft); border-color: #ecd6ac; color: #85510a; }
.notice-info    { background: var(--info-soft); border-color: #d7ccf7; color: #3f2795; }

/* A trial counting down is a heads-up, not a failure: amber, never red.
   Red in this theme is reserved for money and for the one call to action. */
.trial-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  background: var(--warn-soft);
  border: 1px solid #ecd6ac;
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .93rem;
  color: #85510a;
}
.trial-bar .spacer { flex: 1 1 auto; }

/* ================================================== marketing website */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1030;
}
.site-header .inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem 1.25rem;
}
.logo { display: flex; align-items: center; gap: .55rem; font-family: 'Sora', sans-serif; font-weight: 650; font-size: 1.14rem; color: var(--ink); }
.logo:hover { text-decoration: none; color: var(--ink); }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .92rem; }
.site-nav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.site-nav a { color: var(--ink-soft); font-size: .94rem; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }
/* The nav's sign-up button is still a button: the link colour above must not
   repaint its label, or white-on-violet becomes ink-on-violet. */
.site-nav a.btn-brand, .site-nav a.btn-brand:hover { color: #fff; }
.site-nav a.btn-line:hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--ink); margin-left: auto; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 2.2rem; max-width: 60ch; }
.section-head p { color: var(--muted); margin-top: .5rem; }

/* Hero: the module grid is the hero image. No stock illustration, no gradient wash. */
.hero { padding: 4.5rem 0 3.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { margin: 0 0 1rem; }
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.4rem; }
.hero-meta { color: var(--muted); font-size: .88rem; }

.hero-board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
}
.hero-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem .9rem;
  background: #fbfafe;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hero-tile:hover,
.hero-tile:focus-visible {
  border-color: var(--brand);
  border-style: solid;
  box-shadow: 0 2px 10px rgba(109, 40, 217, .1);
  transform: translateY(-1px);
  color: inherit;
}
.hero-tile:hover strong { color: var(--brand); }
.hero-tile i { font-size: 1.2rem; color: var(--brand); }
.hero-tile strong { display: block; font-size: .92rem; margin-top: .4rem; }
.hero-tile span { font-size: .78rem; color: var(--muted); }
.hero-tile.soon { background: var(--canvas); border-style: dashed; }
.hero-tile.soon i { color: var(--muted); }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 1.1rem; }
.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex; flex-direction: column;
}
.module-card.is-soon { background: #f9f7fc; border-style: dashed; }

/* The whole card is the link. One anchor on the heading carries the
   destination; .stretch lays an invisible layer over the card so a click
   anywhere lands on it, which keeps a single tab stop and a readable link
   name instead of a div with a JS handler. */
.module-card { position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; }
.module-card:has(.stretch:hover),
.module-card:has(.stretch:focus-visible) {
  border-color: var(--brand);
  border-style: solid;
  box-shadow: 0 3px 14px rgba(109, 40, 217, .11);
  transform: translateY(-2px);
}
.module-card h3 a.stretch { color: inherit; text-decoration: none; }
.module-card:has(.stretch:hover) h3 a.stretch { color: var(--brand); }
.module-card:has(.stretch:hover) .btn-line { border-color: var(--brand); color: var(--brand); }
a.stretch::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
a.stretch:focus-visible { outline: none; }
.module-card:has(.stretch:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Browsers without :has() still get a fully clickable card, just without
   the hover lift. */
@supports not (selector(:has(*))) {
  .module-card h3 a.stretch:hover { color: var(--brand); }
}
.module-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.2rem; color: #fff;
  margin-bottom: .85rem;
}
.module-card h3 { font-size: 1.08rem; margin: 0 0 .2rem; }
.module-card p  { color: var(--muted); font-size: .92rem; margin: .45rem 0 1rem; flex: 1 1 auto; }
.module-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; align-items: start; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}
.price-card.featured { border: 2px solid var(--brand); position: relative; }
.price-card.featured::before {
  content: 'Most chosen';
  position: absolute; top: -11px; left: 1.4rem;
  background: var(--brand); color: #fff;
  font-size: .72rem; padding: .12rem .6rem; border-radius: 100px;
}
.price-amount { font-family: 'Sora', sans-serif; font-size: 2.3rem; font-weight: 650; line-height: 1; }
.price-amount small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.price-features { list-style: none; padding: 0; margin: 1.25rem 0; }
.price-features li { padding: .32rem 0 .32rem 1.5rem; position: relative; font-size: .92rem; }
.price-features li::before { content: '\2713'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem 2rem; }
.feature h4 { margin: .6rem 0 .3rem; }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.feature i { font-size: 1.35rem; color: var(--brand); }

.cta-band { background: var(--brand-dark); color: #e6dcff; padding: 3.4rem 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c8b8f0; }

.site-footer { background: var(--ink); color: #a79ec0; padding: 2.8rem 0 1.6rem; font-size: .9rem; }
.site-footer h5 { color: #fff; font-size: .9rem; margin-bottom: .7rem; }
.site-footer a { color: #a79ec0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; }

@media (max-width: 860px) {
  .hero-grid, .footer-grid { grid-template-columns: 1fr; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle { display: inline-block; }
  .section { padding: 3rem 0; }
}

/* =========================================================== auth pages */

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside {
  background: var(--brand-dark);
  color: #ddd3f5;
  padding: 3rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside h2 { color: #fff; max-width: 18ch; }
.auth-aside ul { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.auth-aside li { padding: .4rem 0 .4rem 1.6rem; position: relative; }
.auth-aside li::before { content: '\2713'; position: absolute; left: 0; color: #6fc0a4; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: .3rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.6rem; }

@media (max-width: 880px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

/* ------------------------------------------------------------ utility */

.stack > * + * { margin-top: 1.1rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 1.4rem 0; }
.text-small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: .6rem 1rem; z-index: 2000;
}
.skip-link:focus { left: 0; }


/* =====================================================================
   Hotel module — room board
   ===================================================================== */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .75rem;
}
.room-tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .85rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-height: 7rem;
}
.room-tile .room-number { font-family: 'Sora', sans-serif; font-size: 1.3rem; line-height: 1.1; }
.room-tile .room-actions { margin-top: auto; padding-top: .6rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.room-tile.tone-ok   { border-left: 3px solid var(--ok); }
.room-tile.tone-bad  { border-left: 3px solid var(--bad); }
.room-tile.tone-info { border-left: 3px solid var(--brand); }
.room-tile.tone-warn { border-left: 3px solid var(--warn); }
.room-tile.tone-muted{ border-left: 3px solid var(--line); background: #faf9fc; }

/* A tile that is a checkbox label on the booking screen. */
.room-tile.selectable { cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
.room-tile.selectable:hover { border-color: var(--brand); }
.room-tile.selectable:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(109, 40, 217, .15);
  background: var(--brand-soft);
}

@media (max-width: 575px) {
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}


/* Hotel module: the two-row section bar. */
.hotel-subnav {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .7rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hotel-subnav .subnav-label {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  min-width: 68px;
}

/* Attendance: the per-employee month strip and the whole-team grid. */
.att-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.att-day {
  width: 36px; padding: 4px 0; border-radius: 6px; text-align: center;
  border: 1px solid var(--line); background: var(--surface);
}
.att-day .att-num  { display: block; font-size: .65rem; color: var(--muted); }
.att-day .att-mark { display: block; font-size: .85rem; font-weight: 600; }

.att-day.tone-ok    { background: var(--ok-soft);   border-color: #bfe0d2; color: var(--ok); }
.att-day.tone-bad   { background: var(--bad-soft);  border-color: #f3c9c5; color: var(--bad); }
.att-day.tone-warn  { background: var(--warn-soft); border-color: #ecd6ac; color: var(--warn); }
.att-day.tone-info  { background: var(--info-soft); border-color: #d7ccf7; color: var(--info); }
.att-day.tone-muted { background: var(--line-soft); color: var(--muted); }
.att-day.tone-blank { color: var(--soft, #bdbacb); }

table.att-grid th.att-head { padding: 6px 2px; text-align: center; font-size: .68rem; min-width: 22px; }
table.att-grid th.att-head.weekend { color: var(--brand); }
table.att-grid td.att-cell {
  padding: 5px 2px; text-align: center; font-size: .78rem; font-weight: 600; min-width: 22px;
}
table.att-grid td.att-cell a { text-decoration: none; color: inherit; display: block; }
table.att-grid td.att-cell.tone-ok    { background: var(--ok-soft);   color: var(--ok); }
table.att-grid td.att-cell.tone-bad   { background: var(--bad-soft);  color: var(--bad); }
table.att-grid td.att-cell.tone-warn  { background: var(--warn-soft); color: var(--warn); }
table.att-grid td.att-cell.tone-info  { background: var(--info-soft); color: var(--info); }
table.att-grid td.att-cell.tone-muted { background: var(--line-soft); color: var(--muted); }
table.att-grid td.att-cell.tone-blank { color: #bdbacb; }
table.att-grid td.att-cell.future     { background: repeating-linear-gradient(
    45deg, transparent, transparent 3px, var(--line-soft) 3px, var(--line-soft) 6px); color: transparent; }

/* A details/summary used as a small inline form toggle. */
details > summary::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }

/* One-time credentials shown after adding a staff member, and the reset
   link the platform owner hands over when email is not working. */
.cred-grid{display:flex;flex-wrap:wrap;gap:1.25rem}
.cred-grid>div{min-width:min(100%,16rem)}
.cred{display:block;margin-top:.25rem;padding:.55rem .75rem;border:1px solid var(--line);
  border-radius:var(--radius-sm);background:var(--canvas);font-size:1rem;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all;user-select:all}

/* Uploaded logo. The height comes from Settings as an inline style, so this
   only has to keep the image tidy and stop it stretching. */
.brand-logo{display:block;width:auto;max-width:min(240px,46vw);object-fit:contain}
/* On the purple sign-in panel and the sidebar, a logo drawn for a white page
   would disappear, so it sits on a small light chip. */
.brand-logo-dark{background:#fff;border-radius:8px;padding:5px 8px;box-sizing:content-box}
.sidebar-brand .brand-logo-dark{max-width:150px}

/* Logo controls on the Branding settings tab. */
.logo-preview{display:flex;align-items:center;gap:.5rem;min-height:72px;padding:.9rem 1rem;
  border:1px dashed var(--line);border-radius:var(--radius-sm);background:var(--canvas)}
.logo-range{width:min(320px,100%);accent-color:var(--brand)}

/* Social icons in the website footer. Only the networks filled in under
   Admin -> Settings -> Branding are drawn. */
.footer-social{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.9rem}
.footer-social a{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;
  border:1px solid rgba(255,255,255,.22);font-size:1rem;text-decoration:none;
  transition:background .15s,border-color .15s,transform .15s}
.footer-social a:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.5);transform:translateY(-1px)}
.footer-social a:focus-visible{outline:2px solid #fff;outline-offset:2px}
