/* ====================================================
   SEATIQ · Restaurant booking system
   ==================================================== */

:root {
  --bg: #F4F2EC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F2;
  --surface-sunk: #EDEAE0;
  --ink: #0B0B0C;
  --ink-2: #2E2E30;
  --muted: #76746F;
  --muted-2: #ABA89F;
  --line: #E6E2D8;
  --line-strong: #C9C5BA;

  --accent: #4FCE85;
  --accent-deep: #1B8E4B;
  --accent-soft: #E4F6EC;
  --accent-ink: #0a3a1f;

  --warn: #E6B547;
  --warn-soft: #FBF1D9;
  --danger: #E0533A;
  --danger-soft: #FBE3DC;
  --info: #5B7BE6;
  --info-soft: #E6EBFA;

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --ui: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --slot-h: 56px;       /* table-row height */
  --slot-w: 60px;       /* width of one time tick (default 30 min) */

  --shadow-sm: 0 1px 0 rgba(11,11,12,0.04), 0 1px 2px rgba(11,11,12,0.04);
  --shadow-md: 0 4px 12px rgba(11,11,12,0.06), 0 1px 2px rgba(11,11,12,0.04);
  --shadow-lg: 0 24px 48px rgba(11,11,12,0.12), 0 4px 12px rgba(11,11,12,0.06);
}

[data-theme="dark"] {
  --bg: #0B0B0C;
  --surface: #151517;
  --surface-2: #1B1B1E;
  --surface-sunk: #0F0F11;
  --ink: #F4F2EC;
  --ink-2: #D6D3CA;
  --muted: #86847E;
  --muted-2: #56554F;
  --line: #26262A;
  --line-strong: #3A3A3D;
  --accent-soft: #143C26;
  --accent-ink: #C8F4D9;
  --warn-soft: #3A2F12;
  --danger-soft: #3A1B14;
  --info-soft: #1A2240;
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-lg: 0 30px 60px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- shell ---------- */
.app {
  display: grid;
  grid-template-columns: 76px 1fr;
  height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 8px;
}
.sidebar.collapsed { display: none; }
.app.no-sidebar { grid-template-columns: 1fr; }

.sb-logo {
  width: 40px; height: 40px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.sb-item {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--muted);
  position: relative;
}
.sb-item:hover { background: var(--surface-2); color: var(--ink); }
.sb-item.active { background: var(--ink); color: var(--bg); }
.sb-item .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 100%;
  background: var(--danger);
}
.sb-spacer { flex: 1; }

/* ---------- main ---------- */
.main {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 28px 14px;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.topbar-left {
  display: flex; align-items: center; gap: 16px;
}
.topbar-center {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
}
.topbar-right {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px;
}

.brandmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}
.brandmark .dot { color: var(--accent); }

.tab {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  transition: transform 0.05s ease, background 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface); }
.btn-soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-soft:hover { background: var(--surface-2); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(0.95); }
.btn-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--ink);
}
.btn-icon:hover { background: var(--surface); }

/* ---------- KPI strip ---------- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 0;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.kpi {
  padding: 0 24px;
  border-left: 1px solid var(--line);
}
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  display: flex; align-items: baseline; gap: 6px;
}
.kpi-value .unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.kpi-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.kpi-sub .pos { color: var(--accent-deep); font-weight: 600; }
.kpi-sub .neg { color: var(--danger); font-weight: 600; }
.kpi.action { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* ---------- filters row ---------- */
.subbar {
  display: flex; align-items: center;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  gap: 12px;
}
.subbar-segs { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 3px; border-radius: 10px; }
.subbar-segs button {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.subbar-segs button.active { background: var(--ink); color: var(--bg); }

.date-picker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.date-picker:hover { background: var(--surface-2); }
.date-picker .dlabel { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: -0.01em; }
.date-picker .arrow { color: var(--muted); display: inline-flex; align-items: center; padding: 4px; border-radius: 6px; }
.date-picker .arrow:hover { background: var(--surface-sunk); color: var(--ink); }

.search {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 240px;
}
.search input {
  border: 0; outline: 0; background: transparent;
  font-size: 13px; width: 100%;
}
.search input::placeholder { color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .sw {
  width: 8px; height: 8px; border-radius: 100%;
}

/* ---------- timeline ---------- */
.timeline-wrap {
  flex: 1;
  overflow: auto;
  position: relative;
  background: var(--bg);
}
.timeline {
  position: relative;
  min-width: max-content;
}
.tl-header {
  display: grid;
  grid-template-columns: 200px 1fr;
  position: sticky; top: 0;
  z-index: 4;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tl-header-left {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--line);
  display: flex; align-items: center;
}
.tl-header-right {
  position: relative;
  height: 40px;
}
.tl-tick {
  position: absolute;
  top: 0; bottom: 0;
  display: flex; align-items: center;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
  border-left: 1px solid var(--line);
}
.tl-tick.major { color: var(--ink); font-weight: 600; }

.tl-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--line);
  position: relative;
  min-height: var(--slot-h);
}
.tl-row.section-head { background: var(--surface-sunk); }

.tl-row-left {
  padding: 10px 16px;
  border-right: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  position: sticky; left: 0;
  z-index: 2;
}
.tl-row-left .tname {
  font-weight: 600;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.tl-row-left .tcap {
  font-size: 11px;
  color: var(--muted);
  display: flex; align-items: center; gap: 3px;
}
.tl-row-right {
  position: relative;
  height: var(--slot-h);
}
.tl-grid-line {
  position: absolute; top: 0; bottom: 0;
  border-left: 1px solid var(--line);
}
.tl-grid-line.major { border-left-color: var(--line-strong); }

.section-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.section-row > .left {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-right: 1px solid var(--line);
  position: sticky; left: 0;
  background: var(--surface-sunk);
  z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
}
.section-row > .right {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
}

.now-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 0;
  border-left: 2px dashed var(--danger);
  z-index: 3;
  pointer-events: none;
}
.now-line::before {
  content: "NU";
  position: absolute;
  top: 6px; left: -16px;
  font-size: 10px;
  font-weight: 800;
  color: var(--danger);
  background: var(--bg);
  padding: 2px 4px;
  letter-spacing: 0.1em;
}

/* ---------- reservation block ---------- */
.res {
  position: absolute;
  top: 6px; bottom: 6px;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s ease, transform 0.05s ease;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid transparent;
}
.res:hover { box-shadow: var(--shadow-md); }
.res:active { cursor: grabbing; }
.res.selected { outline: 2px solid var(--ink); outline-offset: 2px; z-index: 5; }
.res.dragging { opacity: 0.6; z-index: 6; box-shadow: var(--shadow-lg); }

.res .top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.res .name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res .meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.res .pax {
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0,0,0,0.08);
  font-size: 11px;
}

.res.status-confirmed { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(27,142,75,0.25); }
.res.status-confirmed .pax { background: rgba(27,142,75,0.15); }
.res.status-seated { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-deep); }
.res.status-seated .pax { background: rgba(10,58,31,0.15); }
.res.status-arriving { background: var(--warn-soft); color: #6E4F0E; border-color: rgba(230,181,71,0.4); }
.res.status-arriving .pax { background: rgba(110,79,14,0.15); }
.res.status-late { background: var(--danger-soft); color: #6E2114; border-color: rgba(224,83,58,0.4); }
.res.status-late .pax { background: rgba(110,33,20,0.15); }
.res.status-walkin { background: var(--info-soft); color: #1B2D6E; border-color: rgba(91,123,230,0.35); }
.res.status-walkin .pax { background: rgba(27,45,110,0.15); }
.res.status-finished { background: var(--surface-2); color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.res.status-finished .pax { background: rgba(0,0,0,0.05); }
.res.status-blocked { background: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--surface-sunk) 6px 12px); color: var(--muted); border-color: var(--line-strong); cursor: not-allowed; }

[data-theme="dark"] .res .pax { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .res.status-confirmed { color: #C8F4D9; }
[data-theme="dark"] .res.status-arriving { color: #FFD98A; background: #2E2410; border-color: #5E4A1F; }
[data-theme="dark"] .res.status-late { color: #FFB29D; background: #2E1410; border-color: #5E2D26; }
[data-theme="dark"] .res.status-walkin { color: #B8C7FA; background: #11183A; border-color: #2E3A6E; }
[data-theme="dark"] .res.status-finished { color: var(--muted); background: var(--surface-2); }

.res .tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.08);
}

/* ---------- drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(11,11,12,0.18);
  z-index: 50;
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 440px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 51;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer-head {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.drawer-head .title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.drawer-head .subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.drawer-body { flex: 1; overflow: auto; padding: 18px 24px 24px; }
.drawer-section { margin-bottom: 22px; }
.drawer-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 10px;
}
.kv-row {
  display: grid; grid-template-columns: 110px 1fr;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); }
.kv-row .v { color: var(--ink); font-weight: 500; }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-chip.confirmed { background: var(--accent-soft); color: var(--accent-deep); }
.status-chip.seated { background: var(--accent); color: var(--accent-ink); }
.status-chip.arriving { background: var(--warn-soft); color: #6E4F0E; }
.status-chip.late { background: var(--danger-soft); color: #6E2114; }
.status-chip.walkin { background: var(--info-soft); color: #1B2D6E; }
.status-chip.finished { background: var(--surface-2); color: var(--muted); }

.status-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 6px;
}
.status-actions button {
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.status-actions button:hover { background: var(--surface-sunk); }
.status-actions button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.tag-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  margin-right: 6px;
  margin-bottom: 6px;
}
.tag-pill.allergy { background: var(--danger-soft); color: #6E2114; border-color: rgba(224,83,58,0.3); }

.timeline-mini {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
}
.timeline-mini .step {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--surface-2);
  position: relative;
}
.timeline-mini .step.done { background: var(--accent); }
.timeline-mini .step.now { background: var(--accent); outline: 2px solid var(--accent-deep); }
.timeline-mini .step-labels {
  display: flex; justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* ---------- floating action / walk-in ---------- */
.fab {
  position: fixed;
  right: 28px; bottom: 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: inline-flex; align-items: center; gap: 8px;
  z-index: 20;
}
.fab:hover { background: var(--ink-2); }
.fab.accent { background: var(--accent); color: var(--accent-ink); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11,11,12,0.45);
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  width: 480px;
  max-width: 100%;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-head {
  padding: 22px 24px 14px;
}
.modal-head h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.05;
}
.modal-head p { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.modal-body { padding: 8px 24px 20px; }
.modal-foot {
  padding: 14px 24px 22px;
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink);
}

.pax-picker {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
.pax-picker button {
  padding: 10px 0;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
}
.pax-picker button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pax-picker button:hover:not(.active) { background: var(--surface-sunk); }

.time-picker {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-height: 168px; overflow: auto;
}
.time-picker button {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.time-picker button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- table plan ---------- */
.floor {
  flex: 1; overflow: auto;
  padding: 28px;
  background: var(--bg);
  position: relative;
}
.floor-canvas {
  position: relative;
  width: 1080px;
  height: 720px;
  background:
    radial-gradient(circle, var(--line) 1px, transparent 1px) 0 0/24px 24px,
    var(--surface-2);
  border-radius: 18px;
  border: 1px solid var(--line);
}
.floor-table {
  position: absolute;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.floor-table:hover { background: var(--surface-2); border-color: var(--ink-2); }
.floor-table.round { border-radius: 100%; }
.floor-table .ft-meta {
  font-family: var(--ui);
  font-weight: 600;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.floor-table.occupied { background: var(--accent); border-color: var(--accent-deep); color: var(--accent-ink); }
.floor-table.confirmed { background: var(--accent-soft); border-color: var(--accent-deep); }
.floor-table.arriving { background: var(--warn-soft); border-color: #C9941F; }
.floor-table.blocked { background: var(--line); border-color: var(--muted); color: var(--muted); }
.floor-table.selected { outline: 3px solid var(--ink); outline-offset: 3px; z-index: 5; }
.floor-table.free { background: var(--surface); }
.floor-delete {
  position: absolute;
  top: -10px; right: -10px;
  width: 22px; height: 22px;
  background: var(--danger); color: #fff;
  border-radius: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 6;
}
.floor-delete:hover { transform: scale(1.1); }
.floor-resize {
  position: absolute;
  bottom: -6px; right: -6px;
  width: 16px; height: 16px;
  background: var(--ink); color: var(--bg);
  cursor: nwse-resize;
  border-radius: 4px;
  z-index: 6;
  box-shadow: var(--shadow-sm);
}
.floor-resize::after {
  content: ""; position: absolute; inset: 4px;
  border-right: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
}
.floor-table:hover .floor-meta { opacity: 1; }

/* Chairs */
.chair {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}
.floor-table.round .chair { border-radius: 100%; }
.chair.occupied { background: var(--accent); border-color: var(--accent-deep); }
.floor-table.occupied .chair { background: var(--accent); border-color: var(--accent-deep); }
.floor-table.arriving .chair { background: var(--warn-soft); }
.floor-table.confirmed .chair { background: var(--accent-soft); }

/* Walls */
.floor-wall {
  background: var(--ink);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.floor-wall.selected {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}
[data-theme="dark"] .floor-wall { background: var(--line-strong); }

/* CRUD page helpers */
.step-indicator {
  display: flex; gap: 6px;
  padding: 0 24px 8px;
}
.step-pill {
  flex: 1; padding: 8px 10px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.12em;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 8px;
  text-align: center;
}
.step-pill.done { background: var(--ink); color: var(--bg); }

.product-pick {
  text-align: left;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.product-pick:hover { border-color: var(--line-strong); }
.product-pick.active { border-color: var(--ink); background: var(--surface-2); }

/* Notifications popover */
.notif-pop {
  position: fixed;
  top: 70px; right: 28px;
  width: 380px;
  max-height: calc(100vh - 110px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.notif-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.notif-head h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0;
}
.notif-list { flex: 1; overflow: auto; }
.notif-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(79,206,133,0.05); }
.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 6px; height: 6px;
  border-radius: 100%;
  background: var(--accent-deep);
  margin-top: 4px;
}
.notif-item { position: relative; }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 100%;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-icon.green { background: var(--accent-soft); color: var(--accent-deep); }
.notif-icon.yellow { background: var(--warn-soft); color: #6E4F0E; }
.notif-icon.red { background: var(--danger-soft); color: #6E2114; }
.notif-icon.blue { background: var(--info-soft); color: #1B2D6E; }
.notif-title { font-weight: 600; font-size: 13px; line-height: 1.4; }
.notif-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-foot { padding: 12px 18px; background: var(--surface-2); border-top: 1px solid var(--line); }
.notif-foot button { width: 100%; }

/* Bell badge */
.bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}

.floor-room-label {
  position: absolute;
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  user-select: none;
  padding: 2px 4px;
  border-radius: 4px;
  z-index: 2;
}
.floor-room-label.draggable {
  color: var(--ink-2);
  border: 1px dashed transparent;
}
.floor-room-label.draggable:hover {
  background: var(--surface);
  border-color: var(--line-strong);
}
.floor-room-label.selected {
  background: var(--surface);
  border: 1px solid var(--ink);
  color: var(--ink);
}
.floor-divider {
  position: absolute;
  background: var(--line-strong);
}

.floor-legend {
  position: absolute;
  top: 28px; right: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
}
.floor-legend .row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.floor-legend .sw { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink); }

/* ---------- list view ---------- */
.list-view { flex: 1; overflow: auto; padding: 20px 28px; }
.list-table { width: 100%; border-collapse: collapse; }
.list-table th, .list-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.list-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
  background: var(--bg);
  position: sticky; top: 0;
}
.list-table tr:hover td { background: var(--surface); }
.list-table tr.selected td { background: var(--surface); }
.list-table .name-cell { font-weight: 600; }

/* ---------- month view ---------- */
.month-view { flex: 1; overflow: auto; padding: 24px 28px; background: var(--bg); }
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.month-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.month-headers > div {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 0;
}
.month-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  min-height: 100px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.month-cell:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.month-cell.off { opacity: 0.4; }
.month-cell.today { border-color: var(--ink); border-width: 2px; }
.month-cell .mday {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.month-cell .mcovers {
  margin-top: auto;
  display: flex; align-items: baseline; gap: 4px;
}
.month-cell .mcovers .num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.month-cell .mcovers .lbl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.month-cell .bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.month-cell .bar > div { height: 100%; background: var(--accent); }

/* ---------- waitlist drawer ---------- */
.waitlist {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 55;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.wl-head {
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.wl-head h3 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; margin: 0; }
.wl-list { flex: 1; overflow: auto; padding: 12px 18px; }
.wl-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface);
}
.wl-item .row1 { display: flex; justify-content: space-between; align-items: center; }
.wl-item .name { font-weight: 700; }
.wl-item .meta { font-size: 12px; color: var(--muted); }
.wl-item .actions { display: flex; gap: 6px; }
.wl-item .actions button {
  flex: 1; padding: 7px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600;
}
.wl-item .actions button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- SMS preview ---------- */
.sms-preview {
  background: #E5E5EA;
  border-radius: 16px;
  padding: 12px 18px 12px 14px;
  max-width: 280px;
  position: relative;
  font-size: 13px;
  line-height: 1.4;
  color: #1c1c1e;
}
[data-theme="dark"] .sms-preview { background: #2C2C2E; color: #F2F2F7; }

/* ---------- empty / utility ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px;
  color: var(--muted);
  text-align: center;
}
.empty h3 { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin: 12px 0 4px; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* selection */
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- page hero & layout ---------- */
.page-scroll { flex: 1; overflow: auto; background: var(--bg); }
.page-hero { padding: 36px 28px 22px; }
.page-hero-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.page-hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}
.page-hero-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 14px 0 0;
  max-width: 600px;
}

/* home cards */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 28px 28px;
}
.home-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.home-card.span-2 { grid-column: span 2; }
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.card-head h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0;
}

/* upcoming list */
.up-list { display: flex; flex-direction: column; }
.up-row {
  display: grid; grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.up-row:first-child { border-top: 0; padding-top: 0; }
.up-time {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.up-name strong { font-size: 14px; }
.up-meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.up-actions { display: flex; gap: 6px; align-items: center; }

/* occupancy wheel */
.occ-bigwheel { position: relative; display: flex; justify-content: center; align-items: center; }
.occ-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.occ-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.occ-lbl {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 4px;
}
.occ-bars { margin-top: 14px; }
.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0;
  font-size: 12px;
}
.mini-l { min-width: 60px; color: var(--muted); font-weight: 600; }
.mini-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.mini-bar > div { height: 100%; background: var(--ink); border-radius: 4px; }
.mini-v { font-weight: 700; font-size: 12px; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* activity */
.activity { display: flex; flex-direction: column; }
.act-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.act-row:first-child { border-top: 0; padding-top: 0; }
.act-icon {
  width: 28px; height: 28px; border-radius: 100%;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* VIP cards */
.vip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vip-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.vip-card.alert { background: var(--warn-soft); border-color: rgba(230,181,71,0.4); }

/* gift cards */
.gift-card-product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.gift-cover {
  background: var(--ink); color: var(--bg);
  padding: 18px 20px;
  min-height: 160px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.gift-monogram {
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
}

/* experience card */
.exp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

/* bar chart */
.bar-chart {
  display: flex; align-items: flex-end; gap: 12px;
  height: 200px;
  padding-top: 18px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar-fill {
  width: 100%; max-width: 38px;
  background: var(--ink);
  border-radius: 6px 6px 0 0;
  position: relative;
  min-height: 4px;
}
.bar-val {
  position: absolute;
  top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bar-lbl {
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}

/* dark-mode page hero */
[data-theme="dark"] .page-hero-title { color: var(--ink); }

/* ====================================================
   AUTH (login / loading / blocked)
   ==================================================== */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(79,206,133,0.10), transparent 50%),
    radial-gradient(circle at bottom right, rgba(11,11,12,0.06), transparent 50%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 0;
}
.auth-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 24px;
}
.auth-brand .dot { color: var(--accent); }
.auth-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.auth-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}
.auth-sub {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 12px 0 24px;
}
.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  font-family: var(--ui);
}
.auth-field input:focus { border-color: var(--ink); }
.auth-error {
  font-size: 13px;
  color: #6E2114;
  background: var(--danger-soft);
  border: 1px solid rgba(224,83,58,0.3);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0 14px;
}
.auth-info {
  font-size: 13px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(27,142,75,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 4px 0 14px;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 14px 16px !important;
  font-size: 14px;
  margin-top: 6px;
}
.auth-link {
  background: transparent;
  border: 0;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  margin-top: 14px;
  align-self: flex-start;
}
.auth-link:hover { color: var(--ink); }
.auth-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.auth-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { color: var(--ink); }
.auth-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 100%;
  animation: spin 0.8s linear infinite;
  margin: 12px 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-loading {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ====================================================
   ADMIN shell (separate from main app — uses its own top bar)
   ==================================================== */
.admin-shell {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
}
.admin-top {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.admin-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding: 4px 8px;
  background: var(--accent-soft);
  border-radius: 6px;
}
.admin-grid, .guests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0 28px 28px;
}
.admin-grid.with-detail {
  grid-template-columns: 1fr 420px;
}
.guests-grid {
  grid-template-columns: 1fr 380px;
}
@media (max-width: 1024px) {
  .guests-grid { grid-template-columns: 1fr; padding: 0 20px 24px; }
  .guests-grid aside { position: static !important; }
}
@media (max-width: 640px) {
  .guests-grid { padding: 0 14px 20px; }
}
@media (max-width: 1024px) {
  .admin-grid, .admin-grid.with-detail { grid-template-columns: 1fr; }
  .admin-grid { padding: 0 20px 24px; }
}
@media (max-width: 640px) {
  .admin-grid { padding: 0 14px 20px; gap: 14px; }
  /* Detail panel: full-width, not sticky on mobile */
  .admin-grid aside { position: static !important; max-height: none !important; }
}

/* ====================================================
   PUBLIC BOOKING (booking.ooniq.app)
   Standalone widget with its own visual language —
   navy/white minimal like Superb.
   ==================================================== */
:root {
  --pb-navy: #1A1A40;
  --pb-orange: #E76A2C;
  --pb-ink: #1F1F25;
  --pb-line: #E6E2D8;
  --pb-bg: #FFFFFF;
}

.pb-host {
  min-height: 100vh;
  background: var(--pb-bg);
  color: var(--pb-ink);
  font-family: var(--ui);
  display: flex; flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
}

.pb-header {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  padding: 18px 16px 12px;
}
.pb-back {
  background: transparent; border: 0; padding: 6px;
  display: inline-flex; align-items: center; justify-content: flex-start;
  color: var(--pb-ink);
}
.pb-title {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
}
.pb-lang {
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.pb-progress {
  height: 3px;
  background: #EEEAE0;
  margin: 0;
}
.pb-progress-fill {
  height: 100%;
  background: var(--pb-navy);
  transition: width 0.3s ease;
}

.pb-main {
  flex: 1;
  padding: 28px 24px 60px;
}

.pb-step-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 24px;
  color: var(--pb-ink);
}
.pb-step-title-center { text-align: center; }

.pb-pax-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--pb-line);
  border: 1px solid var(--pb-line);
  margin-bottom: 22px;
}
.pb-pax-cell {
  background: var(--pb-bg);
  border: 0;
  padding: 24px 0;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
}
.pb-pax-cell:hover { background: var(--pb-navy); color: #fff; }
.pb-pax-cell.active { background: var(--pb-navy); color: #fff; }

.pb-help {
  text-align: center;
  font-size: 14px;
  color: var(--pb-ink);
  line-height: 1.6;
  margin-top: 16px;
}
.pb-help a {
  color: var(--pb-ink);
  text-decoration: underline;
}

.pb-cal-divider {
  border-top: 1px solid var(--pb-line);
  margin: 0 -24px 18px;
}
.pb-cal-nav {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 18px;
}
.pb-cal-nav span {
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pb-cal-nav button {
  background: transparent; border: 0; padding: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--pb-ink);
  cursor: pointer;
}

.pb-cal-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 10px;
  color: #999;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}
.pb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}
.pb-cal-empty { height: 56px; }
.pb-cal-cell {
  height: 56px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--pb-ink);
  cursor: pointer;
  border-radius: 0;
}
.pb-cal-cell.past {
  color: #CFCDC4;
  cursor: not-allowed;
}
.pb-cal-cell:not(.past):hover {
  border-color: var(--pb-navy);
}
.pb-cal-cell.selected {
  background: var(--pb-navy);
  color: #fff;
  border-radius: 100%;
}

/* Time step — navy date header on top */
.pb-time-step .pb-step-title { display: none; }
.pb-time-header {
  background: var(--pb-navy);
  color: #fff;
  margin: -28px -24px 0;
  padding: 22px 24px 18px;
}
.pb-time-date {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}
.pb-time-weekday {
  font-size: 13px;
  opacity: 0.85;
}

.pb-tabs {
  display: flex; justify-content: center;
  border-bottom: 1px solid var(--pb-line);
  margin: 22px -8px 16px;
}
.pb-tab {
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.pb-tab.active {
  color: var(--pb-ink);
  border-bottom-color: var(--pb-ink);
}

.pb-area-label {
  color: var(--pb-orange);
  font-size: 14px;
  margin: 12px 0 12px;
}

.pb-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.pb-time-cell {
  background: var(--pb-bg);
  border: 1px solid var(--pb-line);
  border-radius: 24px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: var(--pb-ink);
}
.pb-time-cell:hover { border-color: var(--pb-navy); }
.pb-time-cell.active { background: var(--pb-navy); color: #fff; border-color: var(--pb-navy); }

.pb-empty-slot {
  text-align: center;
  padding: 40px 20px;
  color: #777;
  font-size: 14px;
  background: #FAF8F2;
  border: 1px dashed var(--pb-line);
  border-radius: 10px;
}

/* Form */
.pb-form {
  display: flex; flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}
.pb-field { display: flex; flex-direction: column; }
.pb-field label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.pb-input-wrap {
  border-bottom: 1px solid var(--pb-line);
  display: flex; align-items: center; gap: 8px;
}
.pb-input-wrap.has-prefix {}
.pb-prefix {
  font-size: 15px;
  color: var(--pb-ink);
}
.pb-input-wrap input, .pb-input-wrap textarea {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  padding: 8px 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--pb-ink);
  resize: vertical;
}

.pb-cta {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 18px;
  background: var(--pb-navy);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.pb-cta:hover:not(:disabled) { background: #2A2A55; }
.pb-cta:disabled {
  opacity: 0.4; cursor: not-allowed;
}

.pb-fine {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: #777;
  line-height: 1.6;
}

.pb-policy-box {
  background: #FAF8F2;
  border: 1px solid var(--pb-line);
  border-radius: 10px;
  padding: 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--pb-ink);
}
.pb-policy-box p:last-child { margin-bottom: 0; }

.pb-done {
  text-align: center;
  padding-top: 18px;
}
.pb-done-tick {
  width: 80px; height: 80px;
  border-radius: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.pb-done-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.pb-done-sub {
  color: #555;
  font-size: 15px;
  margin: 0 0 22px;
}
.pb-done-card {
  background: #FAF8F2;
  border: 1px solid var(--pb-line);
  border-radius: 10px;
  padding: 16px 18px;
  text-align: left;
  max-width: 360px;
  margin: 0 auto;
}
.pb-done-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-top: 1px solid var(--pb-line);
}
.pb-done-row:first-child { border-top: 0; }
.pb-done-row span { color: #777; }

.pb-empty {
  text-align: center;
  padding: 80px 24px;
}
.pb-empty h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.pb-loading {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
}

/* Consents (marketing + privacy) on the details step */
.pb-consents {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.pb-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.pb-consent input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.pb-consent-box {
  width: 22px; height: 22px;
  border: 1.5px solid var(--pb-line);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--pb-bg);
  transition: background 0.12s, border-color 0.12s;
  color: #fff;
  margin-top: 1px;
}
.pb-consent:hover .pb-consent-box {
  border-color: var(--pb-navy);
}
.pb-consent input:checked + .pb-consent-box {
  background: var(--pb-navy);
  border-color: var(--pb-navy);
}
.pb-consent-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--pb-ink);
}
.pb-consent-text a {
  color: var(--pb-ink);
  text-decoration: underline;
}
.pb-required {
  color: var(--pb-orange);
  font-weight: 700;
}

/* ====================================================
   RESPONSIVE — Tablet (≤1024px) and Mobile (≤640px)
   Layered as an appendix so it overrides earlier styles
   without forcing edits across the file.
   ==================================================== */

/* ----- Tablet (≤1024px) ----- */
@media (max-width: 1024px) {
  /* Topbar: smaller tabs, less padding */
  .topbar { padding: 14px 18px 10px; gap: 16px; }
  .topbar-center { gap: 2px; }
  .tab { padding: 8px 10px; font-size: 12px; letter-spacing: 0.06em; }

  /* KPI strip: 3 cols + actions wrap below */
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 18px; padding: 16px 20px;
  }
  .kpi { padding: 0 16px; }
  .kpi.action {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 0;
    border-left: 0;
  }

  /* Home/grid pages: 2 cols, no span-2 */
  .home-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px 24px; }
  .home-card.span-2 { grid-column: span 2; }
  .vip-row { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: 28px 20px 18px; }
  .page-hero-title { font-size: clamp(36px, 6vw, 56px); }

  /* Admin tenant detail collapses below table */
  .admin-shell .page-hero { padding-left: 20px; padding-right: 20px; }

  /* Guest detail panel narrower */
  .auth-card { max-width: 440px; }
}

/* ----- Mobile (≤640px) ----- */
@media (max-width: 640px) {
  /* Body root */
  body { font-size: 14px; }

  /* On phone the sidebar becomes a slide-over overlay (when visible)
     instead of stealing column width. Toggled via the existing sidebar
     icon in the topbar (t.sidebar tweak). */
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 76px;
    z-index: 50;
    box-shadow: var(--shadow-lg);
  }

  /* Topbar: compact, hide brand subtitle, tabs scroll horizontally */
  .topbar {
    padding: 12px 14px 8px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .topbar-left { gap: 10px; }
  .topbar-left > div:nth-child(3) { display: none; }       /* divider */
  .topbar-left > div:nth-child(4) { display: none; }       /* tenant + email block */
  .brandmark { font-size: 18px; }
  .topbar-center {
    grid-row: 2;
    grid-column: 1 / -1;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    scrollbar-width: none;
  }
  .topbar-center::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; }
  .topbar-right { gap: 4px; }
  .topbar-right .btn-ghost { padding: 8px 10px; font-size: 12px; }

  /* KPI strip: 2 cols on mobile, action row at bottom */
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 14px;
    row-gap: 14px;
  }
  .kpi {
    padding: 0 10px;
    border-left: 0;
  }
  .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi-value { font-size: 22px; }
  .kpi.action {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
  .kpi.action .btn { flex: 1; justify-content: center; min-width: 0; }

  /* Subbar wraps */
  .subbar {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
  }
  .subbar > div[style*="flex: 1"] { display: none; }   /* spacer */
  .search { min-width: 0; flex: 1; }
  .subbar-segs button { padding: 5px 8px; font-size: 11px; }
  .date-picker { flex: 1; min-width: 0; }
  .date-picker .dlabel { font-size: 12px; }

  /* Page hero: smaller everything */
  .page-hero { padding: 22px 16px 14px; }
  .page-hero-title { font-size: clamp(28px, 9vw, 40px); }
  .page-hero-sub { font-size: 14px; }

  /* Home grid single col */
  .home-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 20px;
    gap: 10px;
  }
  .home-card.span-2 { grid-column: span 1; }
  .home-card { padding: 16px; }
  .vip-row { grid-template-columns: 1fr; }

  /* Stats / Guests / Comms */
  .list-view { padding: 14px; overflow-x: auto; }
  .list-table th, .list-table td { padding: 10px 8px; font-size: 12px; }
  .list-table { min-width: 560px; }   /* force horizontal scroll instead of wrap */

  /* Month grid: keep 7 cols but shrink */
  .month-view { padding: 14px; }
  .month-cell { min-height: 64px; padding: 6px; }
  .month-cell .mday { font-size: 14px; }
  .month-cell .mcovers .num { font-size: 14px; }
  .month-cell .mcovers .lbl { display: none; }
  .month-cell .bar { display: none; }
  .month-headers > div { font-size: 9px; padding: 4px 0; }

  /* Drawer fills the screen */
  .drawer { width: 100vw; max-width: 100vw; }
  .drawer-head { padding: 18px 16px 12px; }
  .drawer-head .title { font-size: 22px; }
  .drawer-body { padding: 14px 16px 20px; }

  /* Waitlist same */
  .waitlist { width: 100vw; max-width: 100vw; }
  .wl-head { padding: 18px 16px 12px; }

  /* Notification popover */
  .notif-pop {
    top: auto; bottom: 0; right: 0; left: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: 14px 14px 0 0;
  }

  /* Modal: full-width, less padding */
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    max-height: 92vh;
    display: flex; flex-direction: column;
  }
  .modal-head { padding: 18px 18px 10px; }
  .modal-head h3 { font-size: 22px; }
  .modal-body { padding: 6px 18px 16px; flex: 1; overflow: auto; }
  .modal-foot { padding: 12px 16px 16px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; justify-content: center; }
  .pax-picker { grid-template-columns: repeat(4, 1fr); }

  /* Timeline gets a tighter left column on mobile */
  .tl-header, .tl-row, .section-row {
    grid-template-columns: 96px 1fr;
  }
  .tl-row-left { padding: 8px 10px; }
  .tl-row-left .tname { font-size: 12px; }

  /* Floor canvas: scroll horizontally as before, but smaller padding */
  .floor { padding: 14px; }

  /* Edit-mode side panel on floor view: full-width sheet at bottom */
  .floor-edit-side, aside[style*="top: 70"] {
    position: fixed !important;
    top: auto !important; right: 0 !important; bottom: 0 !important;
    left: 0 !important; width: 100% !important;
    max-height: 50vh; overflow: auto;
    border-radius: 14px 14px 0 0 !important;
    z-index: 30;
  }

  /* Admin: stack table + detail */
  .admin-top { padding: 14px 14px; gap: 10px; flex-wrap: wrap; }
  .admin-top .btn { flex-shrink: 0; }

  /* FAB further from edge to avoid overlapping bottom-anchored panels */
  .fab { right: 14px; bottom: 14px; padding: 12px 16px; font-size: 13px; }

  /* Auth screens */
  .auth-card { padding: 28px 22px 22px; border-radius: 14px; }
  .auth-title { font-size: 32px; }

  /* ===== Public booking widget ===== */
  .pb-main { padding: 22px 16px 50px; }
  .pb-step-title { font-size: 20px; margin-bottom: 18px; }
  .pb-pax-grid { grid-template-columns: repeat(2, 1fr); }
  .pb-pax-cell { padding: 22px 0; font-size: 22px; }
  .pb-cal-cell { height: 48px; font-size: 14px; }
  .pb-cal-empty { height: 48px; }
  .pb-cal-headers > div { font-size: 9px; }
  .pb-time-header { padding: 18px 16px 14px; margin: -22px -16px 0; }
  .pb-time-date { font-size: 18px; }
  .pb-time-grid { gap: 8px; }
  .pb-time-cell { padding: 12px 0; font-size: 14px; }
  .pb-done-title { font-size: 28px; }
  .pb-cta { padding: 16px; font-size: 13px; }
  .pb-consent-text { font-size: 13px; }
}

/* ----- Extra small (≤380px) ----- */
@media (max-width: 380px) {
  .topbar-right .btn-ghost { padding: 6px 8px; }
  .topbar-right .btn-ghost span { display: none; }
  .kpi-value { font-size: 20px; }
  .pb-cal-cell { height: 42px; font-size: 13px; }
  .pb-cal-empty { height: 42px; }
}

/* Touch tweaks: bigger hit targets for non-mouse devices */
@media (hover: none) {
  .btn, .chip, .tab, .sb-item, .pb-time-cell, .pb-pax-cell {
    -webkit-tap-highlight-color: rgba(11,11,12,0.06);
  }
  .floor-table, .res { touch-action: none; }
}

/* ====================================================
   OPENING HOURS EDITOR
   ==================================================== */
.hours-row {
  display: grid;
  grid-template-columns: 180px 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.hours-day {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  cursor: pointer;
}
.hours-day input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent-deep);
}
.hours-row input[type="time"] {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--ui);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
}
@media (max-width: 640px) {
  .hours-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .hours-day { justify-content: flex-start; }
}

/* ====================================================
   PRIVACY PAGE
   ==================================================== */
.privacy-host {
  min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto;
  height: 100%;
}
.privacy-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.privacy-header .brandmark {
  text-decoration: none;
  color: var(--ink);
}
.privacy-main {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 28px 80px;
  line-height: 1.6;
  font-size: 15px;
  color: var(--ink-2);
}
.privacy-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.privacy-main h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 18px;
  color: var(--ink);
}
.privacy-main h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
  color: var(--ink);
}
.privacy-lede {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 22px;
}
.privacy-main ul { padding-left: 20px; }
.privacy-main li { margin-bottom: 6px; }
.privacy-main a {
  color: var(--ink);
  font-weight: 500;
}
.privacy-footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.privacy-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.privacy-back:hover { color: var(--ink); }
@media (max-width: 640px) {
  .privacy-main { padding: 28px 18px 60px; }
  .privacy-main h2 { font-size: 19px; }
}

/* Inline-grid overrides — pages-1.jsx / pages-2.jsx use inline
   gridTemplateColumns. Target those substrings via attribute selectors
   so we don't have to refactor every site. */
@media (max-width: 1024px) {
  /* Stats BigStat 4-col, comms/menu 2-col, gift 3-col, etc. */
  .page-scroll [style*="repeat(4, 1fr)"],
  .page-scroll [style*="repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Stats "2fr 1fr" splits */
  .page-scroll [style*="2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  .page-scroll [style*="repeat(4, 1fr)"],
  .page-scroll [style*="repeat(3, 1fr)"],
  .page-scroll [style*="repeat(2, 1fr)"],
  .page-scroll [style*="1fr 1fr 1fr"],
  .page-scroll [style*="1fr 1fr"],
  .page-scroll [style*="2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Settings tab bar wraps to fit */
  .page-scroll [style*="borderBottom: 1px solid var(--line)"][style*="display: 'flex'"][style*="justifyContent: 'center'"] {
    flex-wrap: wrap;
  }
}
