/* ===================================================================
   CCHPS · cchps.site
   assets/css/app.css — the whole visual identity, one file.

   Built on custom properties, so the light and dark themes are the
   same stylesheet with a different set of numbers at the top. Nothing
   below :root cares which theme is on.
   =================================================================== */

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
:where(h1,h2,h3,h4,h5,h6) { line-height: 1.25; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---------------------------------------------------------------- tokens */
:root {
  --ink:        #0f172a;
  --ink-2:      #334155;
  --ink-3:      #64748b;
  --ink-4:      #94a3b8;

  --bg:         #f6f7fb;
  --bg-2:       #eef1f7;
  --surface:    #ffffff;
  --surface-2:  #f8fafc;
  --surface-3:  #f1f5f9;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;

  --brand:      #4f46e5;
  --brand-2:    #6366f1;
  --brand-soft: #eef2ff;
  --brand-ink:  #3730a3;

  --violet:     #7c3aed;  --violet-soft: #f5f3ff;
  --sky:        #0284c7;  --sky-soft:    #f0f9ff;
  --teal:       #0d9488;  --teal-soft:   #f0fdfa;
  --green:      #059669;  --green-soft:  #ecfdf5;
  --amber:      #d97706;  --amber-soft:  #fffbeb;
  --rose:       #e11d48;  --rose-soft:   #fff1f2;
  --pink:       #db2777;  --pink-soft:   #fdf2f8;

  --ok:    var(--green); --ok-soft:   var(--green-soft);
  --warn:  var(--amber); --warn-soft: var(--amber-soft);
  --bad:   var(--rose);  --bad-soft:  var(--rose-soft);
  --info:  var(--sky);   --info-soft: var(--sky-soft);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;

  --sh-1: 0 1px 2px rgba(15,23,42,.05);
  --sh-2: 0 2px 8px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --sh-3: 0 10px 30px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.05);
  --sh-4: 0 24px 60px rgba(15,23,42,.16);
  --ring: 0 0 0 3px rgba(99,102,241,.28);
  --glow: 0 8px 30px -8px rgba(79,70,229,.42);

  /* the signature gradient — used once per surface, never twice */
  --grad:      linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #0891b2 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,70,229,.12), rgba(124,58,237,.10) 55%, rgba(8,145,178,.10));
  --mesh:
    radial-gradient(720px 380px at 8% -10%,  rgba(99,102,241,.13), transparent 62%),
    radial-gradient(640px 340px at 92% 2%,   rgba(14,165,233,.11), transparent 60%),
    radial-gradient(560px 320px at 55% 108%, rgba(124,58,237,.09), transparent 64%);

  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, 'Noto Sans Bengali', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sidebar: 260px;
  --topbar: 62px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --ink:        #f1f5f9;
  --ink-2:      #cbd5e1;
  --ink-3:      #94a3b8;
  --ink-4:      #64748b;

  --bg:         #0b1120;
  --bg-2:       #0f172a;
  --surface:    #131c31;
  --surface-2:  #1a2440;
  --surface-3:  #202c4d;
  --line:       #253052;
  --line-2:     #33406b;

  --brand:      #818cf8;
  --brand-2:    #a5b4fc;
  --brand-soft: #1e1b4b;
  --brand-ink:  #c7d2fe;

  --violet-soft: #2b1a4d;
  --sky-soft:    #0c2a45;
  --teal-soft:   #0a2f2c;
  --green-soft:  #0a2e22;
  --amber-soft:  #3a2a08;
  --rose-soft:   #3d1220;
  --pink-soft:   #3d1030;

  --violet: #a78bfa; --sky: #38bdf8; --teal: #2dd4bf;
  --green:  #34d399; --amber: #fbbf24; --rose: #fb7185; --pink: #f472b6;

  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 2px 10px rgba(0,0,0,.45);
  --sh-3: 0 12px 34px rgba(0,0,0,.5);
  --sh-4: 0 28px 70px rgba(0,0,0,.6);
  --ring: 0 0 0 3px rgba(129,140,248,.35);
  --glow: 0 8px 34px -8px rgba(129,140,248,.5);

  --grad:      linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.20), rgba(139,92,246,.16) 55%, rgba(6,182,212,.14));
  --mesh:
    radial-gradient(760px 400px at 6% -12%,  rgba(99,102,241,.20), transparent 62%),
    radial-gradient(680px 360px at 94% 0%,   rgba(14,165,233,.15), transparent 60%),
    radial-gradient(600px 340px at 52% 110%, rgba(139,92,246,.13), transparent 64%);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}

/* ---------------------------------------------------------------- helpers */
.wrap    { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 20px; }
.wrap-sm { width: 100%; max-width: 880px;  margin-inline: auto; padding-inline: 20px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row     { display: flex; align-items: center; gap: 10px; }
.row-b   { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrapme  { flex-wrap: wrap; }
.grow    { flex: 1 1 auto; min-width: 0; }
.center  { text-align: center; }
.muted   { color: var(--ink-3); }
.small   { font-size: .84rem; }
.tiny    { font-size: .76rem; }
.mono    { font-family: var(--mono); letter-spacing: .04em; }
.nowrap  { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden  { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---------------------------------------------------------------- type */
.h-xl { font-size: clamp(1.9rem, 4.4vw, 2.9rem); letter-spacing: -.025em; }
.h-lg { font-size: clamp(1.4rem, 2.6vw, 1.85rem); letter-spacing: -.02em; }
.h-md { font-size: 1.15rem; letter-spacing: -.01em; }
.h-sm { font-size: .95rem; }
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand);
}
.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }
.gradient-text {
  background: linear-gradient(115deg, var(--brand) 5%, var(--violet) 45%, var(--sky) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease),
              border-color .22s var(--ease);
}
.card-p  { padding: 20px; }
.card-p-lg { padding: 26px; }
.card-hover:hover { box-shadow: var(--sh-3); transform: translateY(-2px); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { font-size: 1rem; letter-spacing: -.01em; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
             border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* a card with a coloured top edge */
.card-accent { position: relative; overflow: hidden; }
.card-accent::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent, var(--brand));
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r);
  font-size: .92rem; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .14s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease),
              opacity .18s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--violet) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,.28);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(79,70,229,.38); transform: translateY(-1px); }
.btn-ghost  { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.btn-soft   { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { filter: brightness(.97); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ok     { background: var(--ok); color: #fff; }
.btn-plain  { color: var(--ink-3); padding: 8px 10px; }
.btn-plain:hover { color: var(--ink); background: var(--surface-3); }
.btn-sm  { padding: 7px 13px; font-size: .84rem; border-radius: var(--r-sm); }
.btn-lg  { padding: 14px 26px; font-size: 1rem; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn-icon {
  width: 38px; height: 38px; padding: 0; border-radius: var(--r-sm);
  color: var(--ink-3);
}
.btn-icon:hover { background: var(--surface-3); color: var(--ink); }

/* ---------------------------------------------------------------- forms */
.field { display: block; margin-bottom: 16px; }
.label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.label .req { color: var(--bad); margin-left: 2px; }
.hint { font-size: .78rem; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r);
  font-size: .93rem; transition: border-color .16s, box-shadow .16s, background .16s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.input[aria-invalid="true"], .field.is-bad .input, .field.is-bad .select {
  border-color: var(--bad); box-shadow: 0 0 0 3px rgba(225,29,72,.16);
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field-error { color: var(--bad); font-size: .8rem; margin-top: 5px; font-weight: 500; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid .field.span-2 { grid-column: 1 / -1; }

/* checkbox / radio */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none; }

/* segmented control */
.seg {
  display: inline-flex; padding: 4px; gap: 3px;
  background: var(--surface-3); border-radius: var(--r); border: 1px solid var(--line);
}
.seg button {
  padding: 7px 15px; border-radius: var(--r-sm); font-size: .85rem; font-weight: 600;
  color: var(--ink-3); transition: all .18s var(--ease);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button.is-on {
  background: var(--surface); color: var(--brand); box-shadow: var(--sh-1);
}

/* password strength */
.pw-meter { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .3s var(--ease), background .3s; }
.pw-0 i { width: 25%; background: var(--bad); }
.pw-1 i { width: 50%; background: var(--amber); }
.pw-2 i { width: 75%; background: var(--sky); }
.pw-3 i { width: 100%; background: var(--ok); }

/* OTP boxes */
.otp { display: flex; gap: 10px; justify-content: center; margin: 8px 0 4px; }
.otp input {
  width: 48px; height: 58px; text-align: center;
  font-size: 1.5rem; font-weight: 700; font-family: var(--mono);
  border: 2px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.otp input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); transform: translateY(-2px); }
.otp input.filled { border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 420px) { .otp input { width: 42px; height: 52px; font-size: 1.25rem; } }

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-full);
  font-size: .76rem; font-weight: 600; line-height: 1.5;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip-ok   { background: var(--ok-soft);   color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-bad  { background: var(--bad-soft);  color: var(--bad); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-brand{ background: var(--brand-soft);color: var(--brand-ink); }
.chip-live {
  background: var(--bad-soft); color: var(--bad);
}
.chip-live::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; animation: pulse 1.6s ease-in-out infinite;
}
.chip-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.8); }
}

/* ---------------------------------------------------------------- avatar */
.avatar {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: var(--r-full);
  color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em;
  background: var(--brand); box-shadow: inset 0 -2px 6px rgba(0,0,0,.12);
  user-select: none;
}
.avatar-sm { width: 28px; height: 28px; font-size: .68rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.05rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.4rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -9px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more {
  background: var(--surface-3); color: var(--ink-3);
  box-shadow: none; font-size: .7rem;
}

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

.sidebar {
  width: var(--sidebar); flex: none;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: transform .28s var(--ease);
  z-index: 60;
}
.sidebar-head { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem;
  box-shadow: 0 4px 12px rgba(79,70,229,.32);
}
.brand-name { font-weight: 800; font-size: .98rem; letter-spacing: -.02em; }
.brand-sub  { font-size: .7rem; color: var(--ink-3); letter-spacing: .04em; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-title {
  font-size: .67rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-4); padding: 0 10px 8px;
}
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: .89rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: background .16s, color .16s;
  position: relative;
}
.nav-link svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav-link:hover { background: var(--surface-3); color: var(--ink); }
.nav-link.is-on {
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 650;
}
.nav-link.is-on svg { opacity: 1; color: var(--brand); }
.nav-link.is-on::before {
  content: ''; position: absolute; left: -12px; top: 50%; translate: 0 -50%;
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--bad); color: #fff;
  font-size: .68rem; font-weight: 700; display: grid; place-items: center;
}
.nav-badge:empty, .nav-badge[data-count="0"] { display: none; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.user-card {
  display: flex; align-items: center; gap: 10px; padding: 9px;
  border-radius: var(--r); text-decoration: none; transition: background .16s;
}
.user-card:hover { background: var(--surface-3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar); flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.page { flex: 1; padding: 24px 20px 60px; }
.page-head { margin-bottom: 22px; }
.page-head .row-b { align-items: flex-end; }

/* live dot */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.live-dot.is-stale { background: var(--ink-4); box-shadow: none; animation: none; }

@media (max-width: 1020px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; transform: translateX(-100%);
    box-shadow: var(--sh-4);
  }
  .sidebar.is-open { transform: none; }
  .scrim {
    position: fixed; inset: 0; background: rgba(15,23,42,.5);
    backdrop-filter: blur(2px); z-index: 55; opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  .scrim.is-on { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1021px) { .menu-btn, .scrim { display: none; } }

/* ---------------------------------------------------------------- stat tiles */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px;
  position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.tile::after {
  content: ''; position: absolute; right: -22px; top: -22px;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent, var(--brand)); opacity: .09;
}
.tile-label {
  font-size: .74rem; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3);
}
.tile-value {
  font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em;
  line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums;
}
.tile-note { font-size: .78rem; color: var(--ink-3); margin-top: 3px; }
.tile-icon {
  position: absolute; right: 14px; bottom: 14px; opacity: .16;
  color: var(--accent, var(--brand));
}
.tile-icon svg { width: 30px; height: 30px; }

/* ---------------------------------------------------------------- rooms */
.room-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.room-top {
  padding: 18px 20px 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--room, #4f46e5) 0%,
              color-mix(in srgb, var(--room, #4f46e5) 62%, #000) 130%);
}
.room-top::after {
  content: ''; position: absolute; right: -40px; top: -50px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.room-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.room-where { font-size: .78rem; opacity: .85; margin-top: 2px; }
.room-state {
  position: absolute; right: 16px; top: 16px;
  padding: 4px 11px; border-radius: var(--r-full);
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
}
.room-body { padding: 16px 20px; flex: 1; }
.room-foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }

.amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.amenity {
  font-size: .72rem; padding: 3px 9px; border-radius: var(--r-sm);
  background: var(--surface-3); color: var(--ink-3);
}

/* ---------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 58px; }
.timeline::before {
  content: ''; position: absolute; left: 48px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 14px; }
.tl-time {
  position: absolute; left: -58px; top: 12px; width: 46px; text-align: right;
  font-size: .74rem; font-weight: 650; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.tl-item::before {
  content: ''; position: absolute; left: -12px; top: 17px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--dot, var(--line-2));
  z-index: 1;
}
.tl-item.is-live::before { background: var(--bad); border-color: var(--bad);
  box-shadow: 0 0 0 4px var(--bad-soft); }
.tl-card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--dot, var(--brand));
  border-radius: var(--r); padding: 12px 15px;
  transition: box-shadow .18s, transform .18s;
}
.tl-card:hover { box-shadow: var(--sh-2); transform: translateX(2px); }
.tl-empty { color: var(--ink-4); font-size: .85rem; font-style: italic; padding: 8px 0; }

/* day grid — hour columns */
.daygrid { overflow-x: auto; padding-bottom: 6px; }
.daygrid-inner { min-width: 720px; }
.dg-head { display: grid; border-bottom: 1px solid var(--line); }
.dg-hour {
  font-size: .7rem; color: var(--ink-3); text-align: center; padding: 6px 0;
  border-left: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.dg-row { display: grid; grid-template-columns: 150px 1fr; align-items: stretch;
          border-bottom: 1px solid var(--line); }
.dg-room { padding: 12px 14px; font-size: .85rem; font-weight: 600;
           border-right: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.dg-track { position: relative; min-height: 54px; }
.dg-track::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg,
    var(--line) 0 1px, transparent 1px var(--hourw, 80px));
  opacity: .55;
}
.dg-block {
  position: absolute; top: 8px; bottom: 8px;
  border-radius: var(--r-sm); padding: 5px 9px; overflow: hidden;
  background: var(--blk, var(--brand)); color: #fff;
  font-size: .74rem; font-weight: 600; line-height: 1.3;
  box-shadow: var(--sh-1); cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s;
}
.dg-block:hover { transform: translateY(-2px) scale(1.01); box-shadow: var(--sh-3); z-index: 2; }
.dg-block.is-live { animation: liveglow 2.6s ease-in-out infinite; }
@keyframes liveglow {
  0%,100% { box-shadow: 0 0 0 0 rgba(225,29,72,.5); }
  50%     { box-shadow: 0 0 0 6px rgba(225,29,72,0); }
}
.dg-now {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 3;
}
.dg-now::before {
  content: ''; position: absolute; top: -4px; left: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--bad);
}

/* ---------------------------------------------------------------- countdown */
.countdown {
  display: inline-flex; align-items: baseline; gap: 3px;
  font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -.01em;
}
.countdown b { font-size: 1.05em; }
.countdown span { font-size: .74em; font-weight: 600; opacity: .7; }
.cd-ring {
  --pct: 0;
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--accent, var(--brand)) calc(var(--pct) * 1%),
              var(--surface-3) 0);
  transition: background .8s linear;
}
.cd-ring::before {
  content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface);
}
.cd-ring b { position: relative; font-size: .72rem; font-weight: 700;
             font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.tbl { font-size: .88rem; }
.tbl th {
  text-align: left; font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .14s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- list rows */
.rowcard {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.rowcard:hover { box-shadow: var(--sh-2); border-color: var(--line-2); }
.rowcard + .rowcard { margin-top: 9px; }
.rowcard-lead { width: 4px; align-self: stretch; border-radius: 3px;
                background: var(--accent, var(--brand)); flex: none; }

/* ---------------------------------------------------------------- progress */
.bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent, var(--brand)),
              color-mix(in srgb, var(--accent, var(--brand)) 55%, var(--violet)));
  transition: width .5s var(--ease);
}
.bar-lg { height: 10px; }

/* ---------------------------------------------------------------- kanban */
.board { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.board-col {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px; min-height: 140px;
}
.board-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 6px 11px; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.board-count {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-full); padding: 1px 9px; font-size: .72rem; color: var(--ink-2);
}
.task-card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--brand));
  border-radius: var(--r); padding: 13px 14px; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.task-card + .task-card { margin-top: 9px; }
.task-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.task-title { font-size: .9rem; font-weight: 650; line-height: 1.4; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
       background: var(--line); border: 1px solid var(--line);
       border-radius: var(--r-lg); overflow: hidden; }
.cal-dow {
  background: var(--surface-2); padding: 9px 6px; text-align: center;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.cal-day {
  background: var(--surface); min-height: 92px; padding: 7px 8px;
  transition: background .14s; position: relative;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.is-out { background: var(--surface-2); opacity: .5; }
.cal-day.is-weekend { background: var(--surface-2); }
.cal-day.is-holiday { background: var(--amber-soft); }
.cal-day.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-num { font-size: .78rem; font-weight: 650; color: var(--ink-3); }
.cal-day.is-today .cal-num { color: var(--brand); }
.cal-ev {
  font-size: .68rem; padding: 2px 6px; border-radius: 5px; margin-top: 3px;
  background: var(--ev, var(--brand-soft)); color: var(--ev-ink, var(--brand-ink));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}

/* ---------------------------------------------------------------- modal */
.modal-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,.55); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 18px;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
  overflow-y: auto;
}
.modal-scrim.is-on { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-4); width: 100%; max-width: 620px;
  max-height: calc(100vh - 36px); display: flex; flex-direction: column;
  transform: translateY(14px) scale(.985); transition: transform .24s var(--ease);
}
.modal-scrim.is-on .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-lg { max-width: 860px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 20px 22px 14px;
}
.modal-title { font-size: 1.1rem; letter-spacing: -.015em; }
.modal-body { padding: 4px 22px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 15px 22px; border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ---------------------------------------------------------------- toast */
.toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 10px;
  max-width: min(400px, calc(100vw - 36px));
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent, var(--brand));
  box-shadow: var(--sh-3); font-size: .88rem;
  animation: toastin .3s var(--ease);
}
.toast.is-out { animation: toastout .25s var(--ease) forwards; }
.toast-ok   { --accent: var(--ok); }
.toast-bad  { --accent: var(--bad); }
.toast-warn { --accent: var(--warn); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastin  { from { opacity: 0; transform: translateX(28px); } }
@keyframes toastout { to   { opacity: 0; transform: translateX(28px); } }

/* ---------------------------------------------------------------- notices */
.notice {
  display: flex; gap: 12px; padding: 14px 16px;
  border-radius: var(--r); font-size: .89rem; line-height: 1.55;
  background: var(--info-soft); color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--info) 22%, transparent);
}
.notice svg { flex: none; width: 19px; height: 19px; color: var(--info); margin-top: 1px; }
.notice-ok   { background: var(--ok-soft);   border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.notice-ok svg { color: var(--ok); }
.notice-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.notice-warn svg { color: var(--warn); }
.notice-bad  { background: var(--bad-soft);  border-color: color-mix(in srgb, var(--bad) 24%, transparent); }
.notice-bad svg { color: var(--bad); }

/* empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--ink-3); }
.empty-icon {
  width: 54px; height: 54px; border-radius: var(--r-lg); margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-4);
}
.empty-icon svg { width: 24px; height: 24px; }
.empty h3 { font-size: 1rem; color: var(--ink-2); margin-bottom: 5px; }

/* skeleton */
.skel {
  background: linear-gradient(90deg, var(--surface-3) 25%,
              var(--surface-2) 50%, var(--surface-3) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm); height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- dropdown */
.pop { position: relative; }
.pop-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-3);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.pop.is-open .pop-menu { opacity: 1; transform: none; pointer-events: auto; }
.pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm);
  font-size: .87rem; color: var(--ink-2); text-align: left; text-decoration: none;
}
.pop-item:hover { background: var(--surface-3); color: var(--ink); }
.pop-item svg { width: 16px; height: 16px; opacity: .7; }
.pop-item.is-bad { color: var(--bad); }
.pop-sep { height: 1px; background: var(--line); margin: 5px 0; }

/* notification bell */
.bell-wrap { position: relative; }
.bell-count {
  position: absolute; top: 3px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-full);
  background: var(--bad); color: #fff; font-size: .64rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
.notif-list { max-height: 380px; overflow-y: auto; }
.notif {
  display: flex; gap: 11px; padding: 11px; border-radius: var(--r-sm);
  text-decoration: none; transition: background .14s;
}
.notif:hover { background: var(--surface-3); }
.notif.is-unread { background: var(--brand-soft); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
             flex: none; margin-top: 6px; }

/* ---------------------------------------------------------------- public */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(760px 420px at 12% -8%,  rgba(99,102,241,.20), transparent 62%),
    radial-gradient(680px 400px at 88% 4%,   rgba(14,165,233,.16), transparent 60%),
    radial-gradient(600px 380px at 50% 108%, rgba(124,58,237,.14), transparent 62%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 25%, transparent 78%);
}
.public-bar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.section { padding: clamp(38px, 6vw, 68px) 0; }
.section-head { max-width: 62ch; margin-bottom: 26px; }

.step {
  display: flex; gap: 14px; align-items: flex-start;
}
.step-n {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
  background: var(--brand-soft); color: var(--brand-ink);
}

/* ---------------------------------------------------------------- footer */
.foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 30px 0; font-size: .84rem; color: var(--ink-3);
}

/* ---------------------------------------------------------------- motion */
.rise { animation: rise .45s var(--ease) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .1s; }
.rise-3 { animation-delay: .15s; }
.rise-4 { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.fade { animation: fade .3s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }

.spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .page { padding: 18px 14px 50px; }
  .wrap, .wrap-sm { padding-inline: 14px; }
  .card-p, .card-body { padding: 16px; }
  .card-p-lg { padding: 18px; }
  .h-xl { font-size: 1.85rem; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .tile { padding: 13px 14px; }
  .tile-value { font-size: 1.5rem; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 16px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .timeline { padding-left: 48px; }
  .timeline::before { left: 40px; }
  .tl-time { left: -48px; width: 38px; font-size: .68rem; }
  .form-grid { grid-template-columns: 1fr; }
  .grid.g2, .grid.g3 { grid-template-columns: 1fr; }
  .page-head .row-b { flex-direction: column; align-items: stretch; }
  .seg { overflow-x: auto; max-width: 100%; }
  .cal-day { min-height: 66px; padding: 5px; }
  .cal-ev { font-size: .6rem; }
}

@media (max-width: 480px) {
  .avatar-lg { width: 46px; height: 46px; font-size: .9rem; }
  .h-lg { font-size: 1.3rem; }
  .btn { padding: 9px 14px; }
}

/* wide screens: let the dashboard breathe */
@media (min-width: 1500px) {
  .page .wrap { max-width: 1440px; }
}

/* ===================================================================
   THE REFRESH
   Everything below extends what is above rather than replacing it, so
   a component that has not been restyled still looks right. The rule
   throughout: one bold surface per screen, and quiet everywhere else.
   =================================================================== */

/* ---------------------------------------------------------------- shell */
.app { position: relative; }
.app::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: var(--mesh);
  pointer-events: none;
}

.sidebar {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.topbar {
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
}

/* nav: a pill rather than a slab, and the rail marker animates in */
.nav-link { border-radius: 10px; }
.nav-link.is-on {
  background: var(--grad-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent);
}
.nav-link.is-on::before {
  height: 0; animation: railgrow .32s var(--ease) forwards;
}
@keyframes railgrow { to { height: 20px; } }

.brand-mark { background: var(--grad); box-shadow: var(--glow); }

/* a locked section, for people not yet on a roster */
.locked-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 11px;
  background: var(--warn-soft);
  color: var(--ink-2); font-size: .8rem; line-height: 1.5;
}
.locked-note svg { color: var(--warn); flex: none; margin-top: 2px; }
.locked-note strong { color: var(--ink); }

/* ---------------------------------------------------------------- tiles */
.tile {
  border-radius: 18px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(150deg,
      color-mix(in srgb, var(--accent, var(--brand)) 42%, transparent),
      var(--line) 55%) border-box;
  border: 1px solid transparent;
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.tile::after {
  width: 110px; height: 110px; right: -30px; top: -34px;
  background: var(--accent, var(--brand)); opacity: .10;
  transition: opacity .24s var(--ease), transform .4s var(--ease);
}
.tile:hover::after { opacity: .17; transform: scale(1.12); }
.tile-value {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tile-value.plain { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }

/* a tile that is the hero of its row */
.tile-hero {
  grid-column: span 2;
  background: var(--grad);
  border: 0; color: #fff;
  box-shadow: var(--glow);
}
.tile-hero .tile-label { color: rgba(255,255,255,.78); }
.tile-hero .tile-value { color: #fff; background: none; -webkit-text-fill-color: #fff; }
.tile-hero .tile-note  { color: rgba(255,255,255,.82); }
.tile-hero::after { background: #fff; opacity: .12; }
.tile-hero .tile-icon { color: #fff; opacity: .3; }
@media (max-width: 640px) { .tile-hero { grid-column: span 1; } }

/* ---------------------------------------------------------------- cards */
.card { border-radius: 18px; }
.card-accent::before { background: var(--grad); height: 3px; }
.card-glass {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* a panel that carries the signature gradient — one per screen */
.panel-hero {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 26px 28px;
  background: var(--grad); color: #fff;
  box-shadow: var(--glow);
}
.panel-hero::after {
  content: ''; position: absolute; right: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.13);
}
.panel-hero::before {
  content: ''; position: absolute; left: -50px; bottom: -110px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.panel-hero > * { position: relative; }
.panel-hero .eyebrow { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------------- buttons */
.btn-primary { background: var(--grad); box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 12px 34px -8px rgba(79,70,229,.55); }
.btn { border-radius: 11px; }
.btn-sm { border-radius: 9px; }

/* ---------------------------------------------------------------- room cards */
.room-card { border-radius: 20px; }
.room-card:hover { box-shadow: var(--sh-3); }
.room-top { padding: 20px 22px 18px; }
.room-top::before {
  content: ''; position: absolute; left: -30px; bottom: -80px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.room-state { backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22); }

/* ---------------------------------------------------------------- command palette */
.cmdk-scrim {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(15,23,42,.5); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(48px, 12vh, 140px) 16px 16px;
  opacity: 0; pointer-events: none; transition: opacity .18s var(--ease);
}
.cmdk-scrim.is-on { opacity: 1; pointer-events: auto; }
.cmdk {
  width: 100%; max-width: 580px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--sh-4);
  overflow: hidden;
  transform: translateY(-10px) scale(.985);
  transition: transform .2s var(--ease);
}
.cmdk-scrim.is-on .cmdk { transform: none; }
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.cmdk-input-wrap svg { color: var(--ink-3); flex: none; }
.cmdk input {
  flex: 1; border: 0; background: none; outline: none;
  font-size: 1rem; color: var(--ink);
}
.cmdk input::placeholder { color: var(--ink-4); }
.cmdk-hint {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  color: var(--ink-4); border: 1px solid var(--line);
  padding: 3px 6px; border-radius: 5px; flex: none;
}
.cmdk-list { max-height: min(56vh, 420px); overflow-y: auto; padding: 8px; }
.cmdk-group {
  font-size: .66rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-4);
  padding: 10px 10px 5px;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 11px; border-radius: 11px;
  color: var(--ink-2); text-align: left; text-decoration: none;
  font-size: .91rem; cursor: pointer;
}
.cmdk-item svg { color: var(--ink-3); flex: none; }
.cmdk-item .cmdk-sub { font-size: .76rem; color: var(--ink-4); }
.cmdk-item.is-active {
  background: var(--grad-soft); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent);
}
.cmdk-item.is-active svg { color: var(--brand); }
.cmdk-empty { padding: 34px 16px; text-align: center; color: var(--ink-3); font-size: .88rem; }
.cmdk-foot {
  display: flex; gap: 14px; padding: 10px 16px;
  border-top: 1px solid var(--line); background: var(--surface-2);
  font-size: .72rem; color: var(--ink-4);
}
.cmdk-foot kbd {
  border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 5px; font-family: var(--mono); font-size: .68rem;
}

/* the trigger that lives in the top bar */
.cmdk-trigger {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-4); font-size: .84rem; min-width: 190px;
  transition: border-color .16s, color .16s, box-shadow .16s;
}
.cmdk-trigger:hover { border-color: var(--brand); color: var(--ink-2); box-shadow: var(--sh-1); }
.cmdk-trigger .cmdk-hint { margin-left: auto; }
@media (max-width: 900px) {
  .cmdk-trigger { display: none; }
  #cmdk-mobile  { display: grid !important; }
}

/* ---------------------------------------------------------------- motion */
/* Staggered entrance for a grid of cards, without a class per child. */
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; }
.stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(n+7) { animation-delay: .3s; }

/* a number that counts up on first paint */
.count-up { font-variant-numeric: tabular-nums; }

/* subtle sheen across a hero panel, once */
.panel-hero.sheen::after {
  animation: sheen 5.5s var(--ease) 1;
}
@keyframes sheen {
  0%   { transform: translateX(-8%) scale(1); }
  100% { transform: translateX(0) scale(1); }
}

/* ===================================================================
   THE 2026 ADDITIONS

   Everything below is written against the same custom properties as
   the rest of the file, so it inherits both themes without a single
   duplicated colour. Nothing here hard-codes a hex except the two
   platform badges, which have to be the platform's own colour to be
   recognisable at a glance — and those arrive as an inline --plat.
   =================================================================== */

/* ---------------------------------------------------- form sections
   A long modal without sections is a wall. Four headed groups make the
   booking form answerable in the order somebody actually thinks: what,
   when, how, who. */
.form-sec { padding: 16px 0; border-top: 1px solid var(--line); }
.form-sec:first-child { padding-top: 0; border-top: 0; }
.form-sec-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: 13px;
}
.form-sec-head svg { opacity: .85; }
.form-sec-head .chip { margin-left: auto; text-transform: none; letter-spacing: 0; }

/* ---------------------------------------------------- how it happens
   Three cards rather than a dropdown, because the choice changes what
   the rest of the form asks for and a <select> hides that. */
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mode-opt {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r);
  cursor: pointer; background: var(--surface);
  transition: border-color .16s var(--ease), background .16s var(--ease),
              transform .16s var(--ease);
}
.mode-opt:hover { border-color: var(--line-2); transform: translateY(-1px); }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt.is-on { border-color: var(--brand); background: var(--brand-soft); }
.mode-ic { color: var(--ink-3); flex: none; }
.mode-opt.is-on .mode-ic { color: var(--brand); }
.mode-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mode-txt strong { font-size: .87rem; font-weight: 650; }

/* ---------------------------------------------------- platform chips */
.plat-pick { display: flex; flex-wrap: wrap; gap: 7px; }
.plat {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-full);
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: .84rem; font-weight: 600; color: var(--ink-2);
  transition: all .15s var(--ease);
}
.plat:hover { border-color: var(--line-2); }
.plat-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--plat, var(--brand)); flex: none;
}
.plat.is-on {
  border-color: var(--plat, var(--brand)); color: var(--plat, var(--brand));
  background: color-mix(in srgb, var(--plat, var(--brand)) 10%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plat, var(--brand)) 15%, transparent);
}

/* ---------------------------------------------------- the people picker
   The whole internal list, on screen, with a box against every name —
   rather than a search box that only reveals somebody once you already
   know how they spell their surname. */
.people-pick {
  max-height: 290px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-2);
  display: flex; flex-direction: column; gap: 2px; padding: 5px;
}
.person {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: var(--r-sm);
  cursor: pointer; background: transparent;
  transition: background .13s var(--ease);
}
.person:hover { background: var(--surface); }
.person.is-on { background: var(--brand-soft); }
.person input[type="checkbox"] {
  accent-color: var(--brand); width: 17px; height: 17px; flex: none;
}
.select-xs {
  padding: 4px 8px; font-size: .74rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface);
  width: auto; flex: none;
}

/* ---------------------------------------------------- where a room is */
.room-where-card {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: var(--r);
  background: var(--surface-2);
  border-left: 3px solid var(--room, var(--brand));
}
.room-where-card svg { color: var(--room, var(--brand)); flex: none; }
.room-where-card .chip { margin-left: auto; flex: none; }

/* ---------------------------------------------------- the room board
   Every room, its state, and a countdown to the moment that state
   changes. Readable from across the room without reading a word. */
.board {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-1); overflow: hidden;
}
.board-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  background: var(--grad-soft);
}
.board-grid {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.board-card {
  background: var(--surface); padding: 16px 17px;
  display: flex; flex-direction: column; gap: 9px;
  position: relative; overflow: hidden;
  transition: background .2s var(--ease);
}
.board-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--room, var(--brand)); opacity: .9;
}
/* background-IMAGE, not the shorthand. The shorthand resets
   background-color to transparent, and the grid behind these cards
   paints --line to draw its 1px gaps — so a shorthand here shows the
   gap colour through the bottom half of every card, which in the dark
   theme reads as a hole rather than a tint. */
.board-card.is-busy { background-image:
  linear-gradient(180deg, color-mix(in srgb, var(--bad) 7%, transparent), transparent 42%); }
.board-card.is-soon { background-image:
  linear-gradient(180deg, color-mix(in srgb, var(--warn) 9%, transparent), transparent 42%); }
.board-card.is-free { background-image:
  linear-gradient(180deg, color-mix(in srgb, var(--ok) 7%, transparent), transparent 42%); }

.board-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.board-state {
  font-size: .68rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-full);
}
.is-busy .board-state { background: var(--bad-soft);  color: var(--bad); }
.is-soon .board-state { background: var(--warn-soft); color: var(--warn); }
.is-free .board-state { background: var(--ok-soft);   color: var(--ok); }

.board-name { font-size: 1.02rem; font-weight: 750; letter-spacing: -.015em; }
.board-where {
  display: flex; align-items: center; gap: 5px;
  font-size: .74rem; color: var(--ink-3); min-width: 0;
}
.board-where svg { flex: none; opacity: .7; }
.board-line { font-size: .84rem; min-width: 0; }
.board-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 6px;
}

/* ---------------------------------------------------- the wall clock
   Ticks off the server-corrected time, so it agrees with every
   countdown beside it. */
.hero-clock { text-align: center; min-width: 132px; }
.hero-time {
  font-size: 2.05rem; font-weight: 800; line-height: 1;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.hero-date { font-size: .72rem; opacity: .85; margin-top: 5px; }
.hero-tz   { font-size: .64rem; opacity: .6; margin-top: 2px; letter-spacing: .06em; }

/* ---------------------------------------------------- the activity feed */
.feed { display: flex; flex-direction: column; }
.feed-day {
  font-size: .68rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-4);
  padding: 14px 0 7px; position: sticky; top: 0;
  background: var(--surface); z-index: 1;
}
.feed-day:first-child { padding-top: 0; }
.feed-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--line);
  transition: background .13s var(--ease);
}
.feed-row:hover { background: var(--surface-2); }
.feed-ic {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
}
.feed-meta { text-align: right; flex: none; min-width: 0; }

/* ---------------------------------------------------- mail templates */
.tmpl-group + .tmpl-group { margin-top: 18px; }
.tmpl-group-head {
  font-size: .7rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 8px;
}
.tmpl {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface-2);
  margin-bottom: 8px;
}
.tmpl .btn { flex: none; }

/* ---------------------------------------------------- the approval page
   Standalone, no sidebar, no sign-in. One card, one decision. */
.approve-page { background: var(--bg); background-image: var(--mesh); }
.approve-wrap {
  max-width: 44rem; margin: 0 auto; padding: 28px 18px 40px;
  display: flex; flex-direction: column; gap: 18px; min-height: 100vh;
}
.approve-head { display: flex; justify-content: center; }
.approve-card {
  padding: 30px 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  border-radius: var(--r-xl);
}
.approve-icon {
  width: 68px; height: 68px; border-radius: 22px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--tone, var(--brand)) 12%, transparent);
  color: var(--tone, var(--brand));
}
.approve-person {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.approve-when {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: 100%; padding: 16px 0; text-align: left;
}
.approve-days { margin-left: auto; text-align: center; }
.approve-tbl { width: 100%; text-align: left; font-size: .88rem; }
.approve-tbl td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); }
.approve-tbl td:first-child { width: 36%; }
.approve-facts {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
.approve-facts > div { display: flex; flex-direction: column; gap: 2px; }
.approve-form { width: 100%; margin-top: 18px; }
.approve-actions {
  display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.approve-actions .btn { flex: 1 1 160px; justify-content: center; }
.approve-foot { text-align: center; margin-top: auto; }

@media (max-width: 720px) {
  .mode-pick { grid-template-columns: 1fr; }
  .hero-stats { width: 100%; justify-content: space-between; }
  .hero-time { font-size: 1.7rem; }
  .approve-card { padding: 22px 17px; }
  .feed-meta { display: none; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .toasts, .btn, .modal-scrim { display: none !important; }
  body { background: #fff; }
  .card, .tile { box-shadow: none; border-color: #ccc; }
}
