/* KavPMS — Design system */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Accent */
  --accent:       oklch(0.65 0.22 265);
  --accent-2:     oklch(0.62 0.20 290);
  --accent-soft:  oklch(0.65 0.22 265 / 0.12);
  --accent-glow:  oklch(0.65 0.22 265 / 0.45);

  /* Dark theme (default) */
  --bg-0:         oklch(0.10 0.015 265);
  --bg-1:         oklch(0.13 0.015 265);
  --bg-2:         oklch(0.16 0.015 265);
  --bg-3:         oklch(0.19 0.015 265);
  --surface-2:    oklch(0.18 0.012 265 / 0.85);
  --surface-3:    oklch(0.22 0.012 265 / 0.60);
  --glass:        oklch(0.15 0.015 265 / 0.75);
  --glass-strong: oklch(0.13 0.015 265 / 0.94);
  --border:       oklch(1 0 0 / 0.08);
  --hairline:     oklch(1 0 0 / 0.05);
  --fg-0:         oklch(0.97 0.005 265);
  --fg-1:         oklch(0.80 0.010 265);
  --fg-2:         oklch(0.60 0.010 265);
  --fg-3:         oklch(0.45 0.008 265);

  /* Status */
  --st-available:   oklch(0.72 0.18 148);
  --st-occupied:    oklch(0.65 0.22 265);
  --st-dirty:       oklch(0.72 0.18  55);
  --st-maintenance: oklch(0.68 0.18  25);
  --st-pending:     oklch(0.72 0.16  55);
  --st-completed:   oklch(0.72 0.18 148);
  --st-cancelled:   oklch(0.55 0.05 265);
  --st-noshow:      oklch(0.58 0.15  25);
  --st-vip:         oklch(0.75 0.18 320);
  --st-cleaning:    oklch(0.65 0.22 265);
  --st-inspected:   oklch(0.72 0.18 148);
  --st-active:      oklch(0.65 0.22 265);

  --shadow-sm: 0 1px 4px oklch(0 0 0 / 0.3), 0 0 0 1px oklch(1 0 0 / 0.04);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4), 0 0 0 1px oklch(1 0 0 / 0.06);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.5), 0 0 0 1px oklch(1 0 0 / 0.08);
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
}

[data-theme="light"] {
  --bg-0:         oklch(0.97 0.004 265);
  --bg-1:         oklch(0.94 0.005 265);
  --bg-2:         oklch(0.91 0.005 265);
  --bg-3:         oklch(0.88 0.005 265);
  --surface-2:    oklch(0.96 0.004 265 / 0.90);
  --surface-3:    oklch(0.88 0.005 265 / 0.60);
  --glass:        oklch(0.99 0.002 265 / 0.80);
  --glass-strong: oklch(0.98 0.002 265 / 0.96);
  --border:       oklch(0 0 0 / 0.08);
  --hairline:     oklch(0 0 0 / 0.06);
  --fg-0:         oklch(0.12 0.015 265);
  --fg-1:         oklch(0.30 0.012 265);
  --fg-2:         oklch(0.48 0.010 265);
  --fg-3:         oklch(0.62 0.008 265);
  --shadow-sm: 0 1px 4px oklch(0 0 0 / 0.08), 0 0 0 1px oklch(0 0 0 / 0.06);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.10), 0 0 0 1px oklch(0 0 0 / 0.07);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.14), 0 0 0 1px oklch(0 0 0 / 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--fg-1);
  line-height: 1.5;
  overflow: hidden;
  height: 100dvh;
}

#root { height: 100dvh; }

/* ── Glass primitives ── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(30px) saturate(1.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* ── Layout ── */
.app {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora span {
  position: absolute;
  top: -30%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-soft) 0%, transparent 65%);
  filter: blur(60px);
  animation: auroraFloat 18s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(15%, 8%) scale(1.1); }
  100% { transform: translate(-5%, 15%) scale(0.95); }
}
.aurora-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
}

.shell {
  position: relative;
  z-index: 2;
  display: grid;
  height: 100dvh;
  gap: 0;
}

.shell.floating {
  grid-template-columns: 232px 1fr;
  grid-template-rows: 52px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  padding: 10px;
  gap: 8px;
}

.shell.rail {
  grid-template-columns: 60px 1fr;
  grid-template-rows: 52px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  padding: 10px;
  gap: 8px;
}

.shell.expanded {
  grid-template-columns: 280px 1fr;
  grid-template-rows: 52px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  padding: 10px;
  gap: 8px;
}

/* ── Sidebar ── */
.sidebar {
  grid-area: sidebar;
  min-width: 0;
}

.sb {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 10px;
  overflow-y: auto;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  margin-bottom: 2px;
}

.sb-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.sb-brand-text { min-width: 0; }
.sb-name { font-size: 13px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.02em; }
.sb-tag  { font-size: 10px; color: var(--fg-3); font-family: var(--font-mono); margin-top: 1px; }

.sb-section-label {
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  text-transform: uppercase;
  padding: 10px 8px 4px;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-sans);
  width: 100%;
  text-align: left;
  transition: background 140ms, color 140ms;
  position: relative;
}

.sb-item:hover { background: var(--surface-3); color: var(--fg-0); }
.sb-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.sb-item.active svg { stroke: var(--accent); }

.sb-icon { flex-shrink: 0; }
.sb-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}

.sb-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 6px 4px;
}

/* Rail mode */
.shell.rail .sb-label,
.shell.rail .sb-brand-text,
.shell.rail .sb-section-label,
.shell.rail .sb-badge,
.shell.rail .avatar-meta { display: none; }
.shell.rail .sb { align-items: center; }
.shell.rail .sb-item { justify-content: center; padding: 10px; }
.shell.rail .sb-brand { justify-content: center; padding: 4px 0 14px; }
.shell.rail .sb-foot { justify-content: center; padding: 12px 0 4px; }

/* ── Topbar ── */
.topbar { grid-area: topbar; }

.tb {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 14px;
}

.tb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 32px;
  min-width: 220px;
  flex: 1;
  max-width: 380px;
}
.tb-search input {
  border: none;
  background: transparent;
  color: var(--fg-1);
  font-size: 12.5px;
  font-family: var(--font-sans);
  outline: none;
  flex: 1;
  min-width: 0;
}
.tb-search input::placeholder { color: var(--fg-3); }
.kbd {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.tb-spacer { flex: 1; }

.tb-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  color: var(--fg-2);
  font-size: 12px;
  font-family: var(--font-sans);
  transition: background 140ms;
}
.tb-pill:hover { background: var(--bg-2); }
.tb-pill .label { color: var(--fg-3); font-size: 11px; }
.tb-pill .val   { color: var(--fg-0); font-weight: 500; }

.tb-icon-btn {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--fg-2);
  position: relative;
  transition: background 140ms, color 140ms;
}
.tb-icon-btn:hover { background: var(--surface-3); color: var(--fg-0); }
.tb-icon-btn .dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--bg-0);
}

/* ── Main ── */
.main {
  grid-area: main;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 28px;
  scroll-behavior: smooth;
}

.main-scroll::-webkit-scrollbar { width: 5px; }
.main-scroll::-webkit-scrollbar-track { background: transparent; }
.main-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ── Page header ── */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.015em;
}

.accent-italic {
  color: var(--accent);
  font-style: italic;
}

.page-head p {
  font-size: 12.5px;
  color: var(--fg-2);
  margin-top: 6px;
  max-width: 560px;
}

.actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Grids ── */
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Metric cards ── */
.metric { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.metric .top { display: flex; justify-content: space-between; align-items: flex-start; }
.metric .label { font-size: 11px; color: var(--fg-3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.metric .v { font-size: 34px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.04em; line-height: 1; }
.metric .unit { font-size: 16px; color: var(--fg-2); }
.metric.feature { padding: 20px 22px; }
.metric.feature .v { font-size: 48px; }

.delta { font-size: 11.5px; color: var(--fg-2); display: flex; align-items: center; gap: 4px; }
.delta.up { color: var(--st-available); }
.delta.down { color: var(--st-maintenance); }

.icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  flex-shrink: 0;
}

/* ── Section head ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 8px;
}

/* ── Buttons ── */
button { font-family: var(--font-sans); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 140ms;
  white-space: nowrap;
}
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost {
  background: var(--surface-3);
  color: var(--fg-1);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-2); color: var(--fg-0); }

.btn-quiet {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
}
.btn-quiet:hover { background: var(--accent-soft); }

.btn-danger {
  background: oklch(0.55 0.20 25 / 0.15);
  color: oklch(0.65 0.20 25);
  border-color: oklch(0.55 0.20 25 / 0.2);
}
.btn-danger:hover { background: oklch(0.55 0.20 25 / 0.25); }

/* ── Table ── */
.table-wrap { overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead { border-bottom: 1px solid var(--hairline); }
.tbl th {
  text-align: left;
  padding: 10px 14px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-3);
  font-weight: 500;
  white-space: nowrap;
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  color: var(--fg-1);
  vertical-align: middle;
}
.tbl tbody tr { cursor: pointer; transition: background 120ms; }
.tbl tbody tr:hover td { background: var(--surface-3); }
.tbl tbody tr:last-child td { border-bottom: none; }

.num { font-family: var(--font-mono); }
.strong { color: var(--fg-0); font-weight: 500; }
.meta { font-size: 11.5px; color: var(--fg-3); }

.cell-guest { display: flex; align-items: center; gap: 9px; }
.cell-guest .meta { display: flex; flex-direction: column; gap: 1px; }
.cell-guest .name { font-size: 13px; font-weight: 500; color: var(--fg-0); }
.cell-guest .sub  { font-size: 11px; color: var(--fg-3); }

/* ── Avatar ── */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.avatar-meta { display: flex; flex-direction: column; gap: 1px; }
.avatar-meta .n { font-size: 13px; font-weight: 500; color: var(--fg-0); }
.avatar-meta .r { font-size: 11px; color: var(--fg-3); }

/* ── Pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; }

.s-available   { background: oklch(from var(--st-available) l c h / 0.12);   color: var(--st-available);   }
.s-available .dot   { background: var(--st-available); }
.s-occupied    { background: oklch(from var(--st-occupied) l c h / 0.12);    color: var(--st-occupied);    }
.s-occupied .dot    { background: var(--st-occupied); }
.s-dirty       { background: oklch(from var(--st-dirty) l c h / 0.12);       color: var(--st-dirty);       }
.s-dirty .dot       { background: var(--st-dirty); }
.s-maintenance { background: oklch(from var(--st-maintenance) l c h / 0.12); color: var(--st-maintenance); }
.s-maintenance .dot { background: var(--st-maintenance); }
.s-pending     { background: oklch(from var(--st-pending) l c h / 0.12);     color: var(--st-pending);     }
.s-pending .dot     { background: var(--st-pending); }
.s-completed   { background: oklch(from var(--st-completed) l c h / 0.12);   color: var(--st-completed);   }
.s-completed .dot   { background: var(--st-completed); }
.s-cancelled   { background: oklch(from var(--st-cancelled) l c h / 0.12);   color: var(--st-cancelled);   }
.s-cancelled .dot   { background: var(--st-cancelled); }
.s-noshow      { background: oklch(from var(--st-noshow) l c h / 0.12);      color: var(--st-noshow);      }
.s-noshow .dot      { background: var(--st-noshow); }
.s-vip         { background: oklch(from var(--st-vip) l c h / 0.14);         color: var(--st-vip);         }
.s-vip .dot         { background: var(--st-vip); }
.s-clean       { background: oklch(from var(--st-available) l c h / 0.12);   color: var(--st-available);   }
.s-clean .dot       { background: var(--st-available); }
.s-inspected   { background: oklch(from var(--st-available) l c h / 0.12);   color: var(--st-available);   }
.s-inspected .dot   { background: var(--st-available); }
.s-active      { background: oklch(from var(--st-occupied) l c h / 0.12);    color: var(--st-occupied);    }
.s-active .dot      { background: var(--st-occupied); }
.s-cleaning    { background: oklch(from var(--st-occupied) l c h / 0.12);    color: var(--st-occupied);    }
.s-cleaning .dot    { background: var(--st-occupied); }

/* ── Flex helpers ── */
.row    { display: flex; align-items: center; gap: 8px; }
.col    { display: flex; flex-direction: column; }
.between{ justify-content: space-between; }
.flex-1 { flex: 1; }
.gap-2  { gap: 6px; }
.gap-3  { gap: 10px; }

/* ── Typography ── */
.text-h  { color: var(--fg-0); }
.text-1  { color: var(--fg-1); }
.text-2  { color: var(--fg-2); }
.text-3  { color: var(--fg-3); }
.mono    { font-family: var(--font-mono); }
.fw-5    { font-weight: 500; }
.fw-6    { font-weight: 600; }
.fz-10   { font-size: 10px; }
.fz-11   { font-size: 11px; }
.fz-12   { font-size: 12px; }
.fz-13   { font-size: 13px; }
.fz-18   { font-size: 18px; }
.fz-22   { font-size: 22px; }
.fz-28   { font-size: 28px; }
.uppercase { text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Progress bar ── */
.bar {
  height: 5px;
  background: var(--surface-3);
  border-radius: 10px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Sparkline ── */
.spark { display: block; width: 100%; overflow: visible; }
.sp-line { stroke: url(#sparkGrad); stroke-width: 1.5; fill: none; }
.sp-area { fill: url(#sparkArea); }

/* ── Ring ── */
.ring { position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 8; }
.ring-fill  { fill: none; stroke: url(#ringGrad); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 800ms cubic-bezier(0.4,0,0.2,1); }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; }
.tab {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--fg-2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 140ms;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab:hover { color: var(--fg-0); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tab .count {
  background: var(--surface-3);
  color: var(--fg-2);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 8px;
}

/* ── Stepper ── */
.stepper { display: flex; align-items: center; gap: 0; }
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-3);
  font-size: 12.5px;
}
.step::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--hairline);
  margin: 0 4px;
}
.step:last-child::after { display: none; }
.step.active { color: var(--fg-0); }
.step.done   { color: var(--st-available); }
.step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--surface-3);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.step.active .num { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.step.done .num   { background: oklch(from var(--st-available) l c h / 0.15); border-color: var(--st-available); color: var(--st-available); }

/* ── Drawer ── */
.scrim {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.45);
  z-index: 50;
  animation: fadeIn 160ms ease;
}
.drawer {
  position: fixed;
  top: 10px; right: 10px; bottom: 10px;
  z-index: 51;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 200ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }
@keyframes fadeIn  { from { opacity: 0; } }

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}
.drawer-body::-webkit-scrollbar { width: 4px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Modal ── */
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 51;
  border-radius: var(--radius-lg);
  overflow: hidden;
  animation: modalIn 180ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes modalIn { from { transform: translate(-50%, calc(-50% + 12px)); opacity: 0; } }

/* ── Menu ── */
.menu {
  position: absolute;
  z-index: 60;
  min-width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  animation: menuIn 140ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes menuIn { from { transform: translateY(-6px); opacity: 0; } }
.menu-label {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--fg-1);
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 120ms;
}
.menu-item:hover { background: var(--surface-3); color: var(--fg-0); }
.menu-divider { height: 1px; background: var(--hairline); margin: 4px 0; }

/* ── Notification panel ── */
.notif-panel {
  position: fixed;
  top: 10px; right: 10px; bottom: 10px;
  width: min(380px, calc(100vw - 20px));
  z-index: 51;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 200ms cubic-bezier(0.2, 0, 0, 1);
}
.notif-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 120ms;
  position: relative;
}
.notif-item:hover { background: var(--surface-3); }
.notif-item.read { opacity: 0.55; }
.notif-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}
.notif-item.read .notif-dot { background: var(--fg-3); }

/* ── Toast ── */
.toast-stack {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: toastIn 200ms cubic-bezier(0.2, 0, 0, 1);
}
@keyframes toastIn { from { transform: translateX(-50%) translateY(10px); opacity: 0; } }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--fg-0);
  white-space: nowrap;
}
.toast .ic {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--st-available);
  color: #fff;
  display: grid;
  place-items: center;
}

/* ── Form elements ── */
input, select, textarea {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-0);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  width: 100%;
  transition: border-color 140ms, box-shadow 140ms;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select { cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
label {
  font-size: 11.5px;
  color: var(--fg-2);
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }

/* ── Rooms grid ── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.room-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 140ms;
  background: var(--glass);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.room-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.room-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.room-card.st-available::before   { background: var(--st-available); }
.room-card.st-occupied::before    { background: var(--st-occupied); }
.room-card.st-dirty::before       { background: var(--st-dirty); }
.room-card.st-maintenance::before { background: var(--st-maintenance); }

.room-num  { font-size: 20px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.03em; }
.room-type { font-size: 10.5px; color: var(--fg-3); font-family: var(--font-mono); margin-top: 3px; }
.room-info { font-size: 11px; color: var(--fg-2); margin-top: 8px; }
.room-floor{ font-size: 10px; font-family: var(--font-mono); color: var(--fg-3); margin-top: 6px; }

/* ── Checkin flow ── */
.checkin-wrap {
  max-width: 680px;
}

.step-card {
  padding: 22px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.confirm-card {
  background: var(--accent-soft);
  border: 1px solid oklch(from var(--accent) l c h / 0.25);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}

/* ── Housekeeping board ── */
.hk-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: start;
}

.hk-col { border-radius: var(--radius); overflow: hidden; }
.hk-col-head {
  padding: 12px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hk-task {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  transition: background 120ms;
}
.hk-task:last-child { border-bottom: none; }
.hk-task:hover { background: var(--surface-3); }

/* ── Calendar ── */
.cal-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-header {
  display: flex;
  padding: 10px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--hairline);
  gap: 0;
}

.cal-day-col {
  flex: 1;
  text-align: center;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--fg-3);
}
.cal-day-col.today { color: var(--accent); font-weight: 600; }

.cal-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid var(--hairline);
  min-height: 48px;
}
.cal-row:last-child { border-bottom: none; }
.cal-room-label {
  padding: 8px 10px;
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--fg-2);
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: center;
}

.cal-cells {
  position: relative;
  display: flex;
}

.cal-cell {
  flex: 1;
  border-right: 1px solid var(--hairline);
  min-height: 48px;
  position: relative;
}
.cal-cell:last-child { border-right: none; }
.cal-cell.today { background: var(--accent-soft); }

.cal-block {
  position: absolute;
  top: 6px; bottom: 6px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ── Reports ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

/* ── Guest profile ── */
.guest-profile-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--hairline);
}
.guest-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* ── Field ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.field:last-child { border-bottom: none; }
.field-label { font-size: 10.5px; font-family: var(--font-mono); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; }
.field-value { font-size: 13px; color: var(--fg-0); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 26px; bottom: 0;
  width: 1px;
  background: var(--hairline);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

/* ── Settings ── */
.settings-section {
  margin-bottom: 24px;
}
.settings-section-title {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}
.settings-row:last-child { border-bottom: none; }
.toggle {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background 200ms;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 200ms;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.2);
}
.toggle.on::after { transform: translateX(16px); }

/* ── Properties page ── */
.prop-card {
  padding: 20px 22px;
  cursor: pointer;
  transition: all 140ms;
}
.prop-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── Mobile ── */
.mobile-tabbar {
  display: none;
  grid-area: tabbar;
}

/* ── Tweaks panel ── */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  width: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
}
.tweaks-drag-handle {
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
}
.tweaks-drag-handle:active { cursor: grabbing; }
.tweaks-title { font-size: 11px; font-family: var(--font-mono); color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.1em; }
.tweaks-body  { padding: 12px 14px; }
.tweaks-section-title { font-size: 10px; color: var(--fg-3); font-family: var(--font-mono); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.1em; }
.tweaks-section { margin-bottom: 12px; }
.tweaks-section:last-child { margin-bottom: 0; }
.tweak-radio { display: flex; gap: 4px; }
.tweak-radio-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--fg-2);
  cursor: pointer;
  text-align: center;
  transition: all 120ms;
}
.tweak-radio-btn.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tweak-label { font-size: 11.5px; color: var(--fg-2); margin-bottom: 6px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .shell.floating,
  .shell.rail,
  .shell.expanded {
    grid-template-columns: 1fr;
    grid-template-rows: 52px 1fr 56px;
    grid-template-areas:
      "topbar"
      "main"
      "tabbar";
    padding: 6px;
    gap: 6px;
  }
  .sidebar { display: none; }
  .mobile-tabbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
  }
  .mobile-tabbar .sb-item {
    flex-direction: column;
    font-size: 10px;
    gap: 3px;
    padding: 6px 10px;
    flex: 1;
    justify-content: center;
  }
  .hide-mobile { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .hk-board { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 18px; }
  .page-head { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .hk-board { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .main-scroll { padding: 14px 14px 20px; }
}
