/* ═══════════════════════════════════════════
   hall.css — Hall Reservation System
   Dark mode default · Matches attendance design system
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS  —  single source of truth for every colour
   Dark-mode values live on :root; light overrides on body.light-mode.
   All tokens follow the pattern  --clr-<role>[-<variant>]

   PALETTE REFERENCE
   ─────────────────────────────────────────────────────────────
   Backgrounds (dark → light)
     --clr-bg-base      #0f172a  ←→  #e8edf4   page canvas
     --clr-bg-surface   #1e293b  ←→  #ffffff   cards, modals, sheets
     --clr-bg-raised    #162032  ←→  #ffffff   header
     --clr-bg-sunken    #0f172a  ←→  #f8fafc   inputs, dropdowns
     --clr-bg-overlay   rgba(0,0,0,0.65)        modal scrim

   Borders
     --clr-border       #334155  ←→  #e2e8f0   default stroke
     --clr-border-mid   #475569  ←→  #cbd5e1   stronger divider
     --clr-border-sub   rgba(51,65,85,0.6) ←→ #f1f5f9  subtle row sep

   Text
     --clr-text         #e2e8f0  ←→  #0f172a   primary
     --clr-text-muted   #94a3b8  ←→  #475569   secondary
     --clr-text-dim     #64748b  ←→  #64748b   tertiary / labels
     --clr-text-xdim    #475569  ←→  #94a3b8   very quiet

   Status — Free / Available (green)
     --clr-free         #22c55e                 solid
     --clr-free-text    #86efac  ←→  #15803d   label text
     --clr-free-bg      rgba(34,197,94,0.12) ←→ rgba(34,197,94,0.08)
     --clr-free-border  rgba(34,197,94,0.3)

   Status — Reserved (blue)
     --clr-res          #3b82f6                 solid
     --clr-res-text     #93c5fd  ←→  #1d4ed8   label text
     --clr-res-bg       rgba(59,130,246,0.15) ←→ rgba(59,130,246,0.1)
     --clr-res-border   rgba(59,130,246,0.45) ←→ rgba(59,130,246,0.4)
     --clr-res-tint     rgba(59,130,246,0.04)  row tint

   Status — Occupied (red)
     --clr-occ          #ef4444                 solid
     --clr-occ-text     #fca5a5  ←→  #b91c1c   label text
     --clr-occ-bg       rgba(239,68,68,0.12) ←→ rgba(239,68,68,0.08)
     --clr-occ-border   rgba(239,68,68,0.3)  ←→ rgba(239,68,68,0.35)
     --clr-occ-tint     rgba(239,68,68,0.05)  row tint

   Status — Cancelled (slate)
     --clr-cancel-text  #94a3b8  ←→  #94a3b8
     --clr-cancel-bg    rgba(100,116,139,0.15) ←→ rgba(100,116,139,0.1)
     --clr-cancel-border rgba(100,116,139,0.25)

   Accent — Blue (primary action / active)
     --clr-blue         #3b82f6                 solid mid
     --clr-blue-bright  #60a5fa  ←→  #2563eb   text on dark
     --clr-blue-deep    #2563eb  ←→  #1d4ed8   buttons
     --clr-blue-darker  #1e40af                 pressed state
     --clr-blue-bg      rgba(59,130,246,0.12) ←→ rgba(37,99,235,0.08)
     --clr-blue-border  rgba(59,130,246,0.25) ←→ rgba(37,99,235,0.2)
     --clr-blue-subtle  rgba(37,99,235,0.06)    search row hover

   Accent — Sky (highlights, date chip today)
     --clr-sky          #38bdf8  ←→  #0284c7
     --clr-sky-bg       rgba(56,189,248,0.12) ←→ rgba(2,132,199,0.08)
     --clr-sky-border   rgba(56,189,248,0.35) ←→ rgba(2,132,199,0.3)

   Accent — Violet (upcoming / restore / edit)
     --clr-violet       #a78bfa  ←→  #7c3aed
     --clr-violet-deep  #7c3aed
     --clr-violet-bg    rgba(124,58,237,0.15) ←→ rgba(124,58,237,0.08)
     --clr-violet-border rgba(124,58,237,0.35) ←→ rgba(124,58,237,0.2)

   Accent — Indigo (joins, layout accents)
     --clr-indigo       #6366f1  ←→  #4f46e5
     --clr-indigo-text  #818cf8  ←→  #4f46e5
     --clr-indigo-bg    rgba(99,102,241,0.15) ←→ rgba(99,102,241,0.08)

   Accent — Amber (shift sun / warning)
     --clr-amber        #f59e0b  ←→  #d97706
     --clr-amber-bg     rgba(245,158,11,0.15) ←→ rgba(217,119,6,0.1)

   Accent — Danger (destructive actions)
     --clr-danger       #ef4444
     --clr-danger-text  #f87171  ←→  #dc2626
     --clr-danger-bg    rgba(239,68,68,0.1)  ←→ rgba(220,38,38,0.06)
     --clr-danger-border rgba(239,68,68,0.3) ←→ rgba(220,38,38,0.2)

   Accent — Pink (today icon button)
     --clr-pink         #f472b6  ←→  #ec4899

   Accent — Teal (arrived action)
     --clr-teal         #2dd4bf
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Backgrounds ── */
  --clr-bg-base:       #0f172a;
  --clr-bg-surface:    #1e293b;
  --clr-bg-raised:     #162032;
  --clr-bg-sunken:     #0f172a;
  --clr-bg-overlay:    rgba(0,0,0,0.65);

  /* ── Borders ── */
  --clr-border:        #334155;
  --clr-border-mid:    #475569;
  --clr-border-sub:    rgba(51,65,85,0.6);

  /* ── Text ── */
  --clr-text:          #e2e8f0;
  --clr-text-muted:    #94a3b8;
  --clr-text-dim:      #64748b;
  --clr-text-xdim:     #475569;

  /* ── Status: Free ── */
  --clr-free:          #22c55e;
  --clr-free-text:     #86efac;
  --clr-free-bg:       rgba(34,197,94,0.12);
  --clr-free-border:   rgba(34,197,94,0.3);

  /* ── Status: Reserved (blue) ── */
  --clr-res:           #3b82f6;
  --clr-res-text:      #93c5fd;
  --clr-res-bg:        rgba(59,130,246,0.15);
  --clr-res-border:    rgba(59,130,246,0.45);
  --clr-res-tint:      rgba(59,130,246,0.04);

  /* ── Status: Walk-in (amber) ── */
  --clr-walkin:        #d97706;
  --clr-walkin-text:   #fcd34d;
  --clr-walkin-bg:     rgba(180,83,9,0.18);
  --clr-walkin-border: rgba(217,119,6,0.5);
  --clr-walkin-tint:   rgba(217,119,6,0.04);

  /* ── Status: Occupied (red) ── */
  --clr-occ:           #ef4444;
  --clr-occ-text:      #fca5a5;
  --clr-occ-bg:        rgba(127,29,29,0.22);
  --clr-occ-border:    rgba(239,68,68,0.5);
  --clr-occ-tint:      rgba(239,68,68,0.05);

  /* ── Status: Cancelled (slate) ── */
  --clr-cancel-text:   #94a3b8;
  --clr-cancel-bg:     rgba(100,116,139,0.15);
  --clr-cancel-border: rgba(100,116,139,0.25);

  /* ── Accent: Blue ── */
  --clr-blue:          #3b82f6;
  --clr-blue-bright:   #60a5fa;
  --clr-blue-deep:     #2563eb;
  --clr-blue-darker:   #1e40af;
  --clr-blue-bg:       rgba(59,130,246,0.12);
  --clr-blue-border:   rgba(59,130,246,0.25);
  --clr-blue-subtle:   rgba(37,99,235,0.06);

  /* ── Accent: Sky ── */
  --clr-sky:           #38bdf8;
  --clr-sky-bg:        rgba(56,189,248,0.12);
  --clr-sky-border:    rgba(56,189,248,0.35);

  /* ── Accent: Violet ── */
  --clr-violet:        #a78bfa;
  --clr-violet-deep:   #7c3aed;
  --clr-violet-bg:     rgba(124,58,237,0.15);
  --clr-violet-border: rgba(124,58,237,0.35);

  /* ── Accent: Indigo ── */
  --clr-indigo:        #6366f1;
  --clr-indigo-text:   #818cf8;
  --clr-indigo-bg:     rgba(99,102,241,0.15);

  /* ── Accent: Amber ── */
  --clr-amber:         #f59e0b;
  --clr-amber-bg:      rgba(245,158,11,0.15);

  /* ── Accent: Danger ── */
  --clr-danger:        #ef4444;
  --clr-danger-text:   #f87171;
  --clr-danger-bg:     rgba(239,68,68,0.1);
  --clr-danger-border: rgba(239,68,68,0.3);

  /* ── Accent: Pink ── */
  --clr-pink:          #f472b6;

  /* ── Accent: Teal ── */
  --clr-teal:          #2dd4bf;
}

body.light-mode {
  /* ── Backgrounds ── */
  --clr-bg-base:       #e8edf4;
  --clr-bg-surface:    #ffffff;
  --clr-bg-raised:     #ffffff;
  --clr-bg-sunken:     #f8fafc;
  --clr-bg-overlay:    rgba(0,0,0,0.45);

  /* ── Borders ── */
  --clr-border:        #e2e8f0;
  --clr-border-mid:    #cbd5e1;
  --clr-border-sub:    #f1f5f9;

  /* ── Text ── */
  --clr-text:          #0f172a;
  --clr-text-muted:    #475569;
  --clr-text-dim:      #64748b;
  --clr-text-xdim:     #94a3b8;

  /* ── Status: Free ── */
  --clr-free-text:     #15803d;
  --clr-free-bg:       rgba(34,197,94,0.08);

  /* ── Status: Reserved ── */
  --clr-res-text:      #1d4ed8;
  --clr-res-bg:        rgba(59,130,246,0.1);
  --clr-res-border:    rgba(59,130,246,0.4);

  /* ── Status: Walk-in ── */
  --clr-walkin-text:   #92400e;
  --clr-walkin-bg:     rgba(217,119,6,0.1);
  --clr-walkin-border: rgba(217,119,6,0.45);

  /* ── Status: Occupied ── */
  --clr-occ-text:      #b91c1c;
  --clr-occ-bg:        rgba(239,68,68,0.08);
  --clr-occ-border:    rgba(239,68,68,0.35);
  --clr-occ-tint:      rgba(239,68,68,0.04);

  /* ── Status: Cancelled ── */
  --clr-cancel-bg:     rgba(100,116,139,0.1);

  /* ── Accent: Blue ── */
  --clr-blue-bright:   #2563eb;
  --clr-blue-deep:     #1d4ed8;
  --clr-blue-bg:       rgba(37,99,235,0.08);
  --clr-blue-border:   rgba(37,99,235,0.2);

  /* ── Accent: Sky ── */
  --clr-sky:           #0284c7;
  --clr-sky-bg:        rgba(2,132,199,0.08);
  --clr-sky-border:    rgba(2,132,199,0.3);

  /* ── Accent: Violet ── */
  --clr-violet:        #7c3aed;
  --clr-violet-bg:     rgba(124,58,237,0.08);
  --clr-violet-border: rgba(124,58,237,0.2);

  /* ── Accent: Indigo ── */
  --clr-indigo:        #4f46e5;
  --clr-indigo-text:   #4f46e5;
  --clr-indigo-bg:     rgba(99,102,241,0.08);

  /* ── Accent: Amber ── */
  --clr-amber:         #d97706;
  --clr-amber-bg:      rgba(217,119,6,0.1);

  /* ── Accent: Danger ── */
  --clr-danger-text:   #dc2626;
  --clr-danger-bg:     rgba(220,38,38,0.06);
  --clr-danger-border: rgba(220,38,38,0.2);

  /* ── Accent: Pink ── */
  --clr-pink:          #ec4899;
}

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

html { overflow-x: clip; }

body {
  font-size: 16px;
  touch-action: pan-x pan-y;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0;
  margin: 0;
  transition: background 0.3s, color 0.3s;
  overflow-x: clip;
}

/* ── Light mode ── */
body.light-mode {
  background: #e8edf4;
  color: #0f172a;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* ═══════════════════════
   HEADER
═══════════════════════ */
.container { max-width: 100%; margin: 0; min-height: 100vh; padding-bottom: calc(var(--dock-h, 100px) + env(safe-area-inset-bottom)); }

@media (min-width: 600px) {
  body { background: var(--clr-bg-sunken, #0f172a); }
  .container {
    max-width: 720px;
    margin: 0 auto;
    min-height: unset;
    box-shadow: 0 0 0 1px rgba(51,65,85,0.5);
    position: relative;
  }
  body.light-mode .container { box-shadow: 0 0 0 1px #e2e8f0; }
  .header {
    padding-left: max(12px, calc((100vw - 720px) / 2 + 8px));
    padding-right: max(12px, calc((100vw - 720px) / 2 + 8px));
  }
  .dock-wrap {
    padding-left: max(12px, calc((100vw - 720px) / 2 + 12px));
    padding-right: max(12px, calc((100vw - 720px) / 2 + 12px));
  }
  .ds-chip { min-width: 28px; padding: 2px 4px; }
  .ds-dow  { font-size: 10px; }
  .ds-num  { font-size: 13px; }
  .sections-wrap { padding: 14px 16px; gap: 12px; }
  .section-header { padding: 10px 14px 8px; }

}

.header {
  background: #162032;
  border-bottom: 2.5px solid #3b82f6;
  padding: 5px 8px;
  padding-top: calc(5px + env(safe-area-inset-top));
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

body.light-mode .header {
  background: #ffffff;
  border-bottom-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
}

.header-side { display: flex; gap: 6px; align-items: center; }
.header-side-left  { justify-content: flex-start; }
.header-side-right { justify-content: flex-end; }

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
  text-align: center;
  flex: 1;
  letter-spacing: -0.01em;
}

/* ── Title → Date morph ─────────────────────── */
/* .title-slot — overridden by inline strip rules below */
/* .title-hall rule moved to inline strip section below */
.title-hall.gone { opacity: 0; transform: translateY(-8px); pointer-events: none; }
/* .title-date-nav — overridden by inline strip rules below */
/* .title-date-nav.visible — overridden below */
.tdn-arrow { background: none; border: none; color: #64748b; cursor: pointer; padding: 3px; border-radius: 6px; display: flex; align-items: center; -webkit-tap-highlight-color: transparent; transition: color .15s, background .15s; }
.tdn-arrow:hover, .tdn-arrow:active { color: #e2e8f0; background: rgba(255,255,255,.08); }
.tdn-arrow .material-symbols-outlined { font-size: 20px; }
.tdn-label { background: none; border: none; font-family: inherit; font-size: 20px; font-weight: 800; color: #e2e8f0; cursor: pointer; padding: 3px 6px; border-radius: 6px; white-space: nowrap; letter-spacing: -.02em; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.tdn-label:hover { background: rgba(255,255,255,.06); }
.tdn-label.today { color: #38bdf8; }
.tdn-label.tomorrow { color: #a78bfa; }
body.light-mode .tdn-arrow { color: #94a3b8; }
body.light-mode .tdn-arrow:hover { color: #0f172a; background: rgba(0,0,0,.06); }
body.light-mode .tdn-label { color: #0f172a; }
body.light-mode .tdn-label.today { color: #0284c7; }
body.light-mode .tdn-label.tomorrow { color: #7c3aed; }
body.light-mode .header h1 { color: #0f172a; }

.header-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(248,251,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.header-btn:active { background: rgba(51,65,85,0.55); transform: scale(0.95); }
body.light-mode .header-btn {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}
body.light-mode .header-btn:active { background: #e2e8f0; }
.header-btn .material-symbols-outlined { font-size: 22px; }
.header-btn:first-child .material-symbols-outlined { margin-left: 3px; }

/* Org pill */
.org-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal.06em;
  text-transform: uppercase;
  background: #9ec5ff;
  color: rgba(15,23,42,0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  white-space: nowrap;
  min-width: 36px;
  text-align: center;
}

/* ═══════════════════════
   STICKY SEARCH
═══════════════════════ */
.dock-wrap {
  background: rgba(30, 41, 59, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(59,130,246,0.16);
  border-bottom: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10101; /* above .modal backdrop (10100) so dock is always interactive */
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.22);
  overflow: visible;
}
body.light-mode .dock-wrap {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top-color: #dbeafe;
  border-bottom: none;
  box-shadow: 0 -2px 14px rgba(0,0,0,0.06);
}

.search-icon { color: #475569; font-size: 20px; flex-shrink: 0; }

/* Ghost-text wrapper */
.search-input-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Contact picker pill — replaces the text input */
.dock-pill {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #475569;
  text-align: left;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-pill:active {
  background: rgba(59,130,246,0.08);
  border-color: #3b82f6;
}
.dock-pill.dock-has-guest {
  border-color: #2563eb88;
  color: #e2e8f0;
  font-weight: 500;
}
.dock-pill-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

/* External clear button — pill-shaped, matches vt-btn family, destructive red tint */
.dock-clear-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 11px 5px 9px;
  border-radius: 20px;
  border: 1.5px solid rgba(239,68,68,0.45);
  background: rgba(239,68,68,0.10);
  color: #f87171;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}
.dock-clear-btn::after { content: 'Clear'; }
.dock-clear-btn .material-symbols-outlined { font-size: 15px; }
.dock-clear-btn:active {
  background: rgba(239,68,68,0.22);
  border-color: rgba(239,68,68,0.7);
}
.dock-clear-btn[hidden] { display: none !important; }
body.light-mode .dock-clear-btn {
  border-color: rgba(220,38,38,0.35);
  background: rgba(220,38,38,0.07);
  color: #dc2626;
}
body.light-mode .dock-pill { border-color: #e2e8f0; color: #94a3b8; }
body.light-mode .dock-pill.dock-has-guest { border-color: #3b82f6; color: #0f172a; }

/* Ghost text layer — sits underneath, same geometry */
.dock-ghost {
  position: absolute;
  inset: 0;
  padding: 9px 14px;
  font-size: 14px;
  font-family: inherit;
  pointer-events: none;
  white-space: pre;
  overflow: hidden;
  border-radius: 20px;
  z-index: 0;
  display: flex;
  align-items: center;
  background: #0f172a;
  border: 1px solid transparent;
  box-sizing: border-box;
}
.dock-ghost-real   { color: transparent; }
.dock-ghost-suffix { color: #2d4a6b; font-style: italic; }

body.light-mode .dock-ghost         { background: #f8fafc; }
body.light-mode .dock-ghost-suffix  { color: #b0c4d8; }

/* Live search results dropdown */
.dock-results {
  position: absolute;
  bottom: 100%;
  top: auto;
  left: 0;
  right: 0;
  background: #1e293b;
  border-top: 1px solid #334155;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  z-index: 3500;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
}
body.light-mode .dock-results {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #334155;
  transition: background 0.1s;
}
body.light-mode .search-result-item { border-color: #f1f5f9; }
.search-result-item:hover, .search-result-item:active { background: #0f172a; }
body.light-mode .search-result-item:hover { background: #f8fafc; }

.search-result-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  background: #1e40af;
  color: #bfdbfe;
}

.search-result-name { font-size: 14px; font-weight: 500; }
.search-result-sub  { font-size: 12px; color: #64748b; margin-top: 1px; }

/* ── Contact row with inline reserve button ── */
.sr-contact-row { cursor: pointer; }
.sr-contact-info { flex: 1; min-width: 0; }
.sr-contact-info .search-result-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sr-reserve-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  background: #1e3a5f;
  color: #60a5fa;
  border: 1px solid #2563eb44;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sr-reserve-btn:hover, .sr-reserve-btn:active { background: #2563eb; color: #fff; border-color: #2563eb; }
body.light-mode .sr-reserve-btn { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
body.light-mode .sr-reserve-btn:hover { background: #2563eb; color: #fff; }

/* ── "Reserve for [name]" new-guest CTA row ── */
.sr-reserve-new {
  background: #0f2040;
  border-bottom-color: #1e3a5f !important;
  cursor: pointer;
}
.sr-reserve-new:hover, .sr-reserve-new:active { background: #1a3060 !important; }
body.light-mode .sr-reserve-new { background: #eff6ff; border-bottom-color: #bfdbfe !important; }
body.light-mode .sr-reserve-new:hover { background: #dbeafe !important; }

.sr-avatar-reserve { background: #1d4ed8 !important; color: #93c5fd !important; }
.sr-reserve-text { flex: 1; }
.sr-reserve-label { font-size: 14px; font-weight: 500; color: #93c5fd; }
body.light-mode .sr-reserve-label { color: #1d4ed8; }
.sr-reserve-label strong { color: #fff; }
body.light-mode .sr-reserve-label strong { color: #1e3a8a; }
.sr-reserve-arrow { color: #3b82f6; font-size: 20px; flex-shrink: 0; }
/* ── Search input ghost-text wrapper ── */

/* ── Meta pills in parsed CTA row ── */
/* ── Meta pills in parsed CTA row ── */
.meta-pill {
  display: flex; align-items: center; gap: 3px;
  background: #1e3a5f; color: #60a5fa;
  border-radius: 6px; padding: 2px 7px;
  font-size: 11px; font-weight: 600;
  border: 1px solid transparent;
}
.meta-pill .material-symbols-outlined { font-size: 12px; }
.meta-pill.pending { background: #1a2a3a; color: #334155; font-style: italic; }
.meta-pill.bare    { background: #1a2f48; color: #4a7fa5; border-color: #2a5070; border-style: dashed; }
body.light-mode .meta-pill { background: #eff6ff; color: #2563eb; }
body.light-mode .meta-pill.pending { background: #f1f5f9; color: #94a3b8; }

/* ── Live-parsed reservation CTA (blue row at top) ── */
.dock-result-row {
  background: #0c1f3f;
  border-bottom: 2px solid #2563eb44 !important;
  cursor: pointer;
  padding: 12px 16px;
}
.dock-result-row:hover, .dock-result-row:active { background: #1a3060 !important; }
body.light-mode .dock-result-row { background: #eff6ff; border-bottom-color: #bfdbfe !important; }
body.light-mode .dock-result-row:hover { background: #dbeafe !important; }

.dock-result-main {
  display: flex; align-items: center; gap: 10px; flex: 1;
}
.dock-result-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  background: #1d4ed8; color: #bfdbfe;
}
.dock-result-details { flex: 1; }
.dock-result-name { font-size: 14px; font-weight: 600; color: #e2e8f0; }
body.light-mode .dock-result-name { color: #0f172a; }
.dock-result-meta {
  font-size: 12px; color: #60a5fa; margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
body.light-mode .dock-result-meta { color: #2563eb; }
.dock-result-meta-sep { color: #334155; }
.dock-result-incomplete { color: #64748b !important; font-style: italic; }
.dock-result-go {
  display: flex; align-items: center; gap: 4px;
  background: #2563eb; color: #fff;
  border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  white-space: nowrap;
}
.dock-result-go:hover { background: #1d4ed8; }

/* ═══════════════════════
   VIEW TOGGLE
═══════════════════════ */
.view-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  gap: 8px;
  position: -webkit-sticky;
  position: sticky;
  top: var(--header-h, 60px);
  z-index: 99;
}
body.light-mode .view-toggle-wrap {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.view-toggle { display: flex; gap: 4px; align-items: center; width: 100%; }
.view-toggle #btnSetupView { margin-left: auto; }
.view-toggle #btnSetupView[hidden] { display: none !important; }
.view-toggle #kpiShiftBtn { margin-left: auto; flex-shrink: 0; }
.view-toggle #btnSetupView:not([hidden]) ~ #kpiShiftBtn { margin-left: 0; }

/* ── Shift cycle button ── */
.kpi-shift-btn {
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  transition: border-color .15s, background .15s, opacity .15s;
  opacity: 0;
  pointer-events: none;
}
.kpi-shift-btn.vt-btn,
.kpi-shift-btn.vt-btn:hover { border: none !important; background: transparent !important; }
.kpi-shift-btn.has-shifts { opacity: 1; pointer-events: auto; }
.kpi-shift-btn:active { transform: scale(.96); }

/* ── Shift clock pill ── */
.kpi-shift-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Mono', ui-monospace, monospace;
  background: rgba(100,116,139,0.15);
  color: #64748b;
  border: none;
  transition: background 0.15s, color 0.15s;
}

.vt-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.vt-btn .material-symbols-outlined { font-size: 16px; }
.vt-btn.vt-btn-icon { padding: 4px 8px; }
.vt-btn:hover { background: rgba(148,163,184,0.08); }
.vt-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
/* Day pill — filter active state (long-press selection) */
.vt-btn.vt-btn-filter-active,
.vt-btn.active.vt-btn-filter-active {
  background: rgba(245,158,11,0.15);
  border-color: transparent;
  color: #f59e0b;
}
body.light-mode .vt-btn.vt-btn-filter-active,
body.light-mode .vt-btn.active.vt-btn-filter-active {
  background: rgba(245,158,11,0.10);
  border-color: transparent;
  color: #d97706;
}

/* ── Long-press filter popup ── */
#filterPopup {
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
#filterPopup.fp-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
body.light-mode #filterPopup {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
}
.fp-row {
  display: flex;
  gap: 3px;
}
.fp-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  background: rgba(100,116,139,0.10);
  color: #94a3b8;
  cursor: pointer;
  transition: background .13s, color .13s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}
.fp-btn:active { transform: scale(.93); }
.fp-icon { font-size: 16px; }
.fp-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.fp-btn:hover {
  background: rgba(148,163,184,0.15);
  color: #e2e8f0;
}
.fp-btn.fp-active {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
}
.fp-btn[data-filter="reserved"].fp-active  { background: rgba(5,150,105,.13);  color: #059669; }
.fp-btn[data-filter="occupied"].fp-active  { background: rgba(217,119,6,.13);  color: #d97706; }
.fp-btn[data-filter="free"].fp-active      { background: rgba(56,189,248,.13); color: #38bdf8; }
.fp-btn[data-filter="nextfree"].fp-active  { background: rgba(124,58,237,.13); color: #7c3aed; }
body.light-mode .fp-btn { background: rgba(100,116,139,0.08); color: #64748b; }
body.light-mode .fp-btn:hover { background: rgba(0,0,0,.06); color: #0f172a; }

/* ── View-toggle search pill ──────────────────────────────────── */
.vt-search-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 32px;
  max-width: 180px;
  flex-shrink: 1;
  -webkit-tap-highlight-color: transparent;
}
.vt-search-pill.active {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.1);
  color: #93c5fd;
  max-width: 140px;
  flex-shrink: 1;
}
.vt-search-icon { font-size: 15px !important; flex-shrink: 0; }
.vt-search-label { white-space: nowrap; }
.vt-search-pill.active .vt-search-label { display: none; }
.vt-search-input {
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  width: 100px;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}
.vt-search-input::-webkit-search-cancel-button,
.vt-search-input::-webkit-search-decoration { display: none; }
.vt-search-input::placeholder { color: #475569; }
.vt-search-clear {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #64748b;
  flex-shrink: 0;
}
.vt-search-clear .material-symbols-outlined { font-size: 14px !important; }
body.light-mode .vt-search-pill { border-color: #e2e8f0; color: #94a3b8; }
body.light-mode .vt-search-pill.active { border-color: #3b82f6; background: rgba(59,130,246,0.08); color: #1d4ed8; }
body.light-mode .vt-search-input { color: #0f172a; }

/* Jump-to-date arrow in search results */
.upcoming-date-jump {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #475569;
  border-radius: 6px;
  margin-left: auto;
}
.upcoming-date-jump:active { background: rgba(148,163,184,0.12); }
.upcoming-date-jump .material-symbols-outlined { font-size: 16px !important; }

/* Dim non-matching map chips */
.map-table.search-dim   { opacity: 0.18; }
.map-table.search-match { opacity: 1; }

.date-display-bar {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}
body.light-mode .date-display-bar { color: #475569; }

/* ═══════════════════════
   DAY VIEW — SECTIONS
═══════════════════════ */
.sections-wrap { padding: 10px; display: flex; flex-direction: column; gap: 10px; }

.section-block {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  overflow: hidden;
}
body.light-mode .section-block {
  background: #fff;
  border-color: #e2e8f0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #334155;
  cursor: pointer;
  user-select: none;
}
body.light-mode .section-header { border-bottom-color: #e2e8f0; }

.section-header-name {
  font-size: 14px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: normal.05em;
}

.section-count {
  font-size: 12px;
  color: #475569;
  background: #0f172a;
  border-radius: 20px;
  padding: 2px 8px;
}
body.light-mode .section-count { background: #f1f5f9; }

.section-covers-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--clr-violet, #a78bfa);
  background: rgba(124,58,237,0.12);
  border: none;
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 4px;
}
body.light-mode .section-covers-pill {
  color: #7c3aed;
  background: rgba(124,58,237,0.09);
}

.dc-late-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 7px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.6;
  white-space: nowrap;
}
.dc-late-pill.late-blue   { background: rgba(59,130,246,0.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.dc-late-pill.late-orange { background: rgba(245,158,11,0.15);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }
.dc-late-pill.late-red    { background: rgba(239,68,68,0.15);   color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
body.light-mode .dc-late-pill.late-blue   { color: #1d4ed8; }
body.light-mode .dc-late-pill.late-orange { color: #b45309; }
body.light-mode .dc-late-pill.late-red    { color: #b91c1c; }

/* ── Day view cards ───────────────────────────────────────────── */
.day-cards { display: flex; flex-direction: column; }

.day-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 16px;
  border-bottom: 1px solid rgba(51,65,85,0.6);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
}
.day-card[hidden] { display: none !important; }
.day-card:last-child { border-bottom: none; }
.day-card:active { background: rgba(51,65,85,0.4); }
.day-card.dc-selected { background: rgba(59,130,246,0.08); outline: 1px solid rgba(59,130,246,0.3); }
body.light-mode .day-card { border-bottom-color: #f1f5f9; }
body.light-mode .day-card:active { background: #f8fafc; }
body.light-mode .day-card.dc-selected { background: rgba(59,130,246,0.06); outline-color: rgba(59,130,246,0.25); }

/* Left colour stripe */
.day-card::before { content: none; }

/* Progress bar injected by JS — replaces static ::before */
.dc-bar {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  pointer-events: none;
  transition: height 0.4s ease;
}
/* Full-height solid bar for free/cancelled — no progress needed */
.dc-bar.dc-bar-full {
  top: 8px;
  bottom: 8px;
  height: auto;
}
/* ── Semantic bar colours ─────────────────────────────────────── */
.dc-bar.dc-bar-free     { background: var(--clr-free); }
.dc-bar.dc-bar-reserved { background: var(--clr-res); }        /* blue  — not arrived yet   */
.dc-bar.dc-bar-walkin   { background: var(--clr-walkin); }     /* amber — walk-in           */
.dc-bar.dc-bar-occupied { background: #22c55e; }               /* green — seated, in svc    */
.dc-bar.dc-bar-overdue    { background: #ef4444; }               /* red   — past end time     */
.dc-bar.dc-bar-late-red   { background: #ef4444; }               /* red   — 60+ mins late     */
.dc-bar.dc-bar-late-orange{ background: #f97316; }               /* orange — 45–59 mins late  */
.dc-bar.dc-bar-late-amber { background: #f59e0b; }               /* amber — 30–44 mins late   */
/* Legacy aliases kept for map chip */
.dc-bar.dc-bar-green    { background: #22c55e; }
.dc-bar.dc-bar-red      { background: #ef4444; }

/* Cap colours — small top pip that signals next-booking urgency */
.dc-bar::after {
  content: '';
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 6px;
  border-radius: 2px 2px 0 0;
}
.dc-bar.dc-bar-cap-violet::after { display: block; background: #a855f7; }
.dc-bar.dc-bar-cap-red::after    { display: block; background: #ef4444; }

/* Pulse on overdue bar */
.dc-bar.dc-bar-overdue {
  animation: none;
}

@keyframes dcBarGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
  50%      { box-shadow: 0 0 6px 2px rgba(59,130,246,0.55); }
}
@keyframes mapArcGlow {
  0%,100% { filter: drop-shadow(0 0 0px rgba(59,130,246,0)); }
  50%      { filter: drop-shadow(0 0 4px rgba(59,130,246,0.7)); }
}
.dc-bar.dc-bar-glow          { animation: dcBarGlow 1.6s ease-in-out infinite; }
.map-table-arc.map-table-arc-glow { animation: mapArcGlow 1.6s ease-in-out infinite; }

/* Subtle row tint for busy tables */
.day-card.status-reserved { background: var(--clr-res-tint); }
.day-card.status-walkin   { background: var(--clr-walkin-tint); }
.day-card.status-occupied { background: var(--clr-occ-tint); }
body.light-mode .day-card.status-reserved { background: var(--clr-res-tint); }
body.light-mode .day-card.status-walkin   { background: var(--clr-walkin-tint); }
body.light-mode .day-card.status-occupied { background: var(--clr-occ-tint); }

/* ── Icon block: table number + seat count ── */
/* ── Child card (2nd+ booking on same table same day) ── */
.dc-child-card { margin-left: 10px; opacity: 0.9; }
.dc-icon-child {
  flex-shrink: 0; position: relative; overflow: visible;
  width: 40px; height: 34px; border-radius: 8px;
  border: 1.5px solid; opacity: 0.75;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.dc-icon-child.status-reserved { background: var(--clr-res-bg);    border-color: var(--clr-res-border); }
.dc-icon-child.status-occupied { background: var(--clr-occ-bg);    border-color: var(--clr-occ-border); }
.dc-icon-child.status-walkin   { background: var(--clr-walkin-bg); border-color: var(--clr-walkin-border); }
.dc-icon-child.status-free     { background: var(--clr-free-bg);   border-color: var(--clr-free-border); }

/* countdown text inside child icon */
.dc-icon-countdown {
  font-size: 11px; font-weight: 700; line-height: 1; text-align: center;
}
.dc-icon-countdown.dc-countdown-ok     { color: #60a5fa; }
.dc-icon-countdown.dc-countdown-soon   { color: #fb923c; }
.dc-icon-countdown.dc-countdown-urgent { color: #f87171; }
body.light-mode .dc-icon-countdown.dc-countdown-ok     { color: #2563eb; }
body.light-mode .dc-icon-countdown.dc-countdown-soon   { color: #ea580c; }
body.light-mode .dc-icon-countdown.dc-countdown-urgent { color: #dc2626; }

.dc-icon {
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  width: 46px; height: 38px;
  border-radius: 9px;
  border: 1.5px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.dc-icon.status-free     { background: var(--clr-free-bg);    border-color: var(--clr-free-border); }
.dc-icon.status-reserved { background: var(--clr-res-bg);     border-color: var(--clr-res-border); }
.dc-icon.status-walkin   { background: var(--clr-walkin-bg);  border-color: var(--clr-walkin-border); }
.dc-icon.status-occupied { background: var(--clr-occ-bg);     border-color: var(--clr-occ-border); }
body.light-mode .dc-icon.status-free     { background: var(--clr-free-bg);    border-color: var(--clr-free-border); }
body.light-mode .dc-icon.status-reserved { background: var(--clr-res-bg);     border-color: var(--clr-res-border); }
body.light-mode .dc-icon.status-walkin   { background: var(--clr-walkin-bg);  border-color: var(--clr-walkin-border); }
body.light-mode .dc-icon.status-occupied { background: var(--clr-occ-bg);     border-color: var(--clr-occ-border); }

.dc-icon-num {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #94a3b8;
}
.dc-icon.status-reserved .dc-icon-num { color: var(--clr-res-text); }
.dc-icon.status-walkin   .dc-icon-num { color: var(--clr-walkin-text); }
.dc-icon.status-occupied .dc-icon-num { color: var(--clr-occ-text); }
body.light-mode .dc-icon-num { color: #64748b; }
body.light-mode .dc-icon.status-reserved .dc-icon-num { color: var(--clr-res-text); }
body.light-mode .dc-icon.status-walkin   .dc-icon-num { color: var(--clr-walkin-text); }
body.light-mode .dc-icon.status-occupied .dc-icon-num { color: var(--clr-occ-text); }

.dc-icon-seats {
  font-size: 9px;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
}

/* ── Main info ── */
.dc-main { flex: 1; min-width: 0; }

.dc-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
body.light-mode .dc-name { color: #0f172a; }

.dc-name.dc-empty {
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}
body.light-mode .dc-name.dc-empty { color: #94a3b8; }

.dc-name.dc-walkin { color: #94a3b8; font-style: italic; }

.dc-time {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
}
body.light-mode .dc-time { color: #64748b; }

.dc-notes-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  background: #1e3a5f;
  color: #60a5fa;
  border: 1px solid transparent;
}
body.light-mode .dc-notes-pill { background: #eff6ff; color: #2563eb; }

.dc-party {
  font-size: 10px;
  color: #475569;
  margin-top: 2px;
  line-height: 1;
}

/* ── Right side ── */
.dc-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.dc-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: normal.06em;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}
.dc-badge-free     { background: rgba(34,197,94,0.12);  color: #86efac; }
.dc-badge-reserved { background: var(--clr-res-bg); color: var(--clr-res-text); }
.dc-badge-unknown  { background: rgba(100,116,139,0.12); color: #94a3b8; border: 1px solid rgba(100,116,139,0.2); }
.dc-badge-occupied { background: rgba(239,68,68,0.12);  color: #fca5a5; }
.dc-badge-overdue  { background: rgba(245,158,11,0.15); color: #fcd34d; }
.dc-badge-walkin   { background: var(--clr-walkin-bg);   color: var(--clr-walkin-text); border: 1px solid var(--clr-walkin-border); }
body.light-mode .dc-badge-free     { background: rgba(34,197,94,0.1);  color: #15803d; }
body.light-mode .dc-badge-reserved { background: var(--clr-res-bg); color: var(--clr-res-text); }
body.light-mode .dc-badge-unknown  { background: rgba(100,116,139,0.08); color: #64748b; border-color: rgba(100,116,139,0.15); }
body.light-mode .dc-badge-occupied { background: rgba(239,68,68,0.1);  color: #b91c1c; }
body.light-mode .dc-badge-overdue  { background: rgba(245,158,11,0.12); color: #b45309; }

.dc-free-at {
  font-size: 9px;
  color: #38bdf8;
  white-space: nowrap;
}
body.light-mode .dc-free-at { color: #0284c7; }

.dc-turnover-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  transform: none;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--clr-res-bg);
  border: 1px solid var(--clr-res-border);
  color: var(--clr-res-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}
body.light-mode .dc-turnover-badge { background: var(--clr-res-bg); color: var(--clr-res-text); border-color: var(--clr-res-border); }

.dc-join-badge {
  font-size: 9px;
  font-weight: 700;
  background: rgba(37,99,235,0.2);
  color: #93c5fd;
  border-radius: 4px;
  padding: 1px 5px;
}

/* Small dot indicator + notes preview row (inside dc-main for upcoming cards) */
.dc-notes-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #475569;
  display: inline-block;
  flex-shrink: 0;
}
.dc-notes-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}
.dc-notes-preview {
  font-size: 10px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
body.light-mode .dc-notes-preview { color: #94a3b8; }

/* ═══════════════════════
   FLOOR MAP VIEW
═══════════════════════ */
.map-toolbar[hidden] { display: none !important; }
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
body.light-mode .map-toolbar {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.map-tool-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid #3b82f6;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.map-tool-btn:active { background: rgba(59,130,246,0.25); }
.map-tool-btn .material-symbols-outlined { font-size: 18px; }

.map-tool-btn-secondary {
  border-color: #334155;
  background: transparent;
  color: #64748b;
}
.map-tool-btn-secondary:active { background: rgba(51,65,85,0.35); }

.map-size-select-wrap { display: flex; align-items: center; gap: 6px; }
.preset-pills { display: flex; gap: 3px; align-items: center; }
.preset-pill {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1.5px solid #334155; background: transparent;
  color: #64748b; font-size: 11px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; user-select: none; -webkit-tap-highlight-color: transparent;
}
.preset-pill:hover { border-color: #475569; color: #94a3b8; }
.preset-pill.active { background: rgba(56,189,248,.15); border-color: #38bdf8; color: #38bdf8; }
body.light-mode .preset-pill { border-color: #cbd5e1; color: #94a3b8; }
body.light-mode .preset-pill.active { background: rgba(2,132,199,.1); border-color: #0284c7; color: #0284c7; }
.map-size-select {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  color-scheme: dark;
}
body.light-mode .map-size-select {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
  color-scheme: light;
}

/* ── Map canvas — flat CSS grid ─────────────────────────────── */
.map-canvas {
  padding: 14px;
  padding-top: 5px;
  padding-bottom: calc(var(--dock-h, 100px) + max(env(safe-area-inset-bottom, 0px), 8px));
  position: relative;
}
.map-canvas.pick-table-mode { background: rgba(37,99,235,0.04); }
body.light-mode .map-canvas.pick-table-mode { background: rgba(37,99,235,0.03); }

.map-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px;
}

/* stool pair wrapper — two circles side by side in one cell */
/* stool pair — split square: two halves of one rounded card */
.map-stool-pair {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid transparent;
  position: relative;
}
/* divider line between halves */
.map-stool-pair::after {
  content: '';
  position: absolute;
  top: 12%; bottom: 12%;
  left: calc(50% - 0.5px); width: 1px;
  pointer-events: none;
  z-index: 1;
}
/* each half fills its column fully — no individual border/radius needed, wrapper clips */
.map-stool-pair .map-table.shape-stool {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
  border: none !important;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
}
/* pair outer border + bg by status */
/* outer border driven by worst-of-two status; each half gets its own background */
.map-stool-pair[data-status="free"]     { border-color: rgba(16,185,129,0.25); }
.map-stool-pair[data-status="occupied"]     { border-color: rgba(239,68,68,0.28); }
.map-stool-pair[data-status="reserved"]     { border-color: rgba(245,158,11,0.28); }
.map-stool-pair[data-status="walkin"]     { border-color: rgba(245,158,11,0.28); }
.map-stool-pair[data-status="cleaning"]     { border-color: rgba(139,92,246,0.20); }

.map-stool-pair[data-status="free"]::after     { background: rgba(16,185,129,0.25); }
.map-stool-pair[data-status="occupied"]::after     { background: rgba(239,68,68,0.28); }
.map-stool-pair[data-status="reserved"]::after     { background: rgba(245,158,11,0.28); }
.map-stool-pair[data-status="walkin"]::after     { background: rgba(245,158,11,0.28); }
.map-stool-pair[data-status="cleaning"]::after     { background: rgba(139,92,246,0.20); }

.map-stool-pair[data-status0="free"] .map-table:nth-child(1) { background: rgba(16,185,129,0.15) !important; }
.map-stool-pair[data-status0="occupied"] .map-table:nth-child(1) { background: rgba(239,68,68,0.18) !important; }
.map-stool-pair[data-status0="reserved"] .map-table:nth-child(1) { background: rgba(245,158,11,0.15) !important; }
.map-stool-pair[data-status0="walkin"] .map-table:nth-child(1) { background: rgba(245,158,11,0.15) !important; }
.map-stool-pair[data-status0="cleaning"] .map-table:nth-child(1) { background: rgba(139,92,246,0.12) !important; }
.map-stool-pair[data-status1="free"] .map-table:nth-child(2) { background: rgba(16,185,129,0.15) !important; }
.map-stool-pair[data-status1="occupied"] .map-table:nth-child(2) { background: rgba(239,68,68,0.18) !important; }
.map-stool-pair[data-status1="reserved"] .map-table:nth-child(2) { background: rgba(245,158,11,0.15) !important; }
.map-stool-pair[data-status1="walkin"] .map-table:nth-child(2) { background: rgba(245,158,11,0.15) !important; }
.map-stool-pair[data-status1="cleaning"] .map-table:nth-child(2) { background: rgba(139,92,246,0.12) !important; }
/* half hover — brighten only, no lift since it's flush inside the wrapper */
.map-stool-pair .map-table.shape-stool:hover { transform: none !important; filter: brightness(1.2); }

/* empty cell placeholder — visible drop target in setup */
.map-cell-empty {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1.5px dashed transparent;
  transition: border-color 0.15s, background 0.15s;
}
body.is-setup .map-cell-empty {
  border-color: rgba(255,255,255,0.06);
}
body.is-setup .map-cell-empty:hover {
  border-color: rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.04);
}
.map-section { display: contents; }
.map-section-label, .sec-reorder-pills, .sec-preset-badge { display: none !important; }
body.is-setup #dock,


/* ── TABLE CHIP ──────────────────────────────────────────────── */
.map-table {
  aspect-ratio: 1;
  border-radius: 14px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s;
  position: relative; border: 1.5px solid transparent;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overflow: hidden;
  min-width: 0;
  z-index: 1;
}
.map-section-bg {
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
  margin: -4px;
}
body.is-map:not(.is-setup) .map-table:hover { transform: translateY(-2px); }
body.is-setup .map-table { cursor: grab; }
body.is-setup .map-table:active { cursor: grabbing; }

/* status colours — aligned with day view clr variables */
.map-table.status-free     { background: var(--clr-free-bg);    border-color: var(--clr-free-border); }
.map-table.status-reserved { background: var(--clr-res-bg);     border-color: var(--clr-res-border); }
.map-table.status-unknown  { background: rgba(100,116,139,0.08); border-color: rgba(100,116,139,0.2); opacity: 0.6; }
.map-table.status-walkin   { background: var(--clr-walkin-bg);  border-color: var(--clr-walkin-border); }
.map-table.status-occupied { background: var(--clr-occ-bg);     border-color: var(--clr-occ-border); }
.map-table.status-cleaning { background: rgba(139,92,246,0.08);  border-color: rgba(139,92,246,0.20); }

body.is-map:not(.is-setup) .map-table.status-free:hover     { background: rgba(34,197,94,0.18);   border-color: rgba(34,197,94,0.5); }
body.is-map:not(.is-setup) .map-table.status-reserved:hover { border-color: rgba(59,130,246,0.7); }
body.is-map:not(.is-setup) .map-table.status-walkin:hover   { border-color: rgba(217,119,6,0.7); }
body.is-map:not(.is-setup) .map-table.status-occupied:hover { border-color: rgba(239,68,68,0.7); }

body.light-mode .map-table.status-free     { background: var(--clr-free-bg);    border-color: var(--clr-free-border); }
body.light-mode .map-table.status-reserved { background: var(--clr-res-bg);     border-color: var(--clr-res-border); }
body.light-mode .map-table.status-walkin   { background: var(--clr-walkin-bg);  border-color: var(--clr-walkin-border); }
body.light-mode .map-table.status-occupied { background: var(--clr-occ-bg);     border-color: var(--clr-occ-border); }

/* shape variants */
.map-table.shape-round { border-radius: 50% !important; }
.map-table.shape-stool {
  border-radius: 50% !important;
  width: 60% !important; aspect-ratio: 1;
  align-self: center; justify-self: center;
}

/* drag/filter states */
.map-table.map-dragging  { opacity: 0.25; }
.map-table.map-drag-over { outline: 2px solid #3b82f6; outline-offset: 2px; transform: scale(1.05) !important; }
.map-table.map-search-dim   { opacity: 0.18; }
.map-table.map-search-match { box-shadow: 0 0 0 2px #3b82f6, 0 4px 16px rgba(59,130,246,0.4); }

/* number */
.map-table-num { font-size: 18px; font-weight: 600; font-family: 'DM Mono', monospace; line-height: 1; color: #94a3b8; }
.map-table.status-free     .map-table-num { color: var(--clr-free-text); }
.map-table.status-reserved .map-table-num { color: var(--clr-res-text); }
.map-table.status-walkin   .map-table-num { color: var(--clr-walkin-text); }
.map-table.status-occupied .map-table-num { color: var(--clr-occ-text); }
.map-table.status-cleaning .map-table-num { color: #c4b5fd; }
body.light-mode .map-table.status-free     .map-table-num { color: var(--clr-free-text); }
body.light-mode .map-table.status-reserved .map-table-num { color: var(--clr-res-text); }
body.light-mode .map-table.status-walkin   .map-table-num { color: var(--clr-walkin-text); }
body.light-mode .map-table.status-occupied .map-table-num { color: var(--clr-occ-text); }
.map-table.shape-stool .map-table-num { font-size: 12px; }
.map-table-num-dim    { opacity: 0.55; color: #f0e0c8; }
.map-table-num-master { color: #fff8ee; }

/* seat count */
.map-table-size { font-size: 10px; font-weight: 500; color: var(--clr-text-muted); line-height: 1; margin-top: 3px; }
.map-table.status-free     .map-table-size { color: rgba(16,185,129,0.5); }
.map-table.status-reserved .map-table-size { color: rgba(245,158,11,0.45); }
.map-table.status-walkin   .map-table-size { color: rgba(245,158,11,0.45); }
.map-table.status-occupied .map-table-size { color: rgba(239,68,68,0.45); }
.map-table.shape-stool .map-table-size { display: none; }

/* guest initials badge */
.map-table-init {
  font-size: 10px; font-weight: 600; letter-spacing: .01em; line-height: 1;
  padding: 2px 5px; border-radius: 4px; background: rgba(0,0,0,0.18); color: #fff;
  width: calc(100% - 6px);
  white-space: nowrap; margin-top: 4px;
  position: relative; overflow: hidden;
  /* Fade-out right edge so clipped surname looks intentional, not cut off */
  -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
  mask-image: linear-gradient(to right, black 70%, transparent 100%);
}
.map-table-init-a {
  display: inline-block;
  white-space: nowrap;
  /* will-change removed — name pill is static, no animation */
}
.map-table.status-reserved .map-table-init { background: rgba(245,158,11,0.2);  color: #fcd34d; }
.map-table.status-walkin   .map-table-init { background: rgba(245,158,11,0.2);  color: #fcd34d; }
.map-table.status-occupied .map-table-init { background: rgba(239,68,68,0.2);   color: #fca5a5; }
body.light-mode .map-table.status-reserved .map-table-init { color: var(--clr-walkin-text); background: var(--clr-walkin-bg); }
body.light-mode .map-table.status-occupied .map-table-init { color: var(--clr-occ-text);    background: var(--clr-occ-bg); }
.map-table-init-dim { opacity: 0.5; }

/* clock arc overlay — SVG injected by JS */
.map-table-arc {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none !important; overflow: visible;
}
.map-table-arc * { pointer-events: none !important; }
.map-table.shape-stool .map-table-arc { display: none; }

/* Ensure full chip area is tappable */
.map-table::after {
  content: ''; position: absolute; inset: -4px;
}

/* number + turnover pill row */
.map-table-num-row {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; line-height: 1;
}
.map-table-num-row .map-table-num { font-size: 16px; }
.map-turnover-pill {
  font-size: 9px; font-weight: 700; border-radius: 4px;
  padding: 1px 4px; line-height: 1.4; flex-shrink: 0;
  pointer-events: none;
}
/* Face 2 upcoming time hint shown in size row */
.map-face2-time {
  font-size: 8px; font-weight: 600; opacity: 0.75;
  margin-left: 3px; letter-spacing: normal.01em;
}

/* mts party ratio */
.map-table.status-free     .map-table-size .mts-party { color: #10b981; }
.map-table.status-reserved .map-table-size .mts-party { color: #fcd34d; }
.map-table.status-walkin   .map-table-size .mts-party { color: #fcd34d; }
.map-table.status-occupied .map-table-size .mts-party { color: #fc8181; }
.map-table-size .mts-sep { font-size: 9px; font-weight: 400; opacity: 0.35; margin: 0 1px; }

/* join states */
.map-table.is-joined  { outline: 2px solid #2563eb; outline-offset: 1px; }
.map-table.is-bjoin   { outline: 2.5px solid rgba(56,189,248,0.85); outline-offset: 2px; box-shadow: 0 0 10px rgba(56,189,248,0.25); }
.map-table.is-join-secondary { outline: 2px solid rgba(56,189,248,0.55); outline-offset: 2px; opacity: 0.5; filter: brightness(0.8); }
.map-table.join-pick-master   { outline: 2.5px solid #38bdf8; outline-offset: 2px; opacity: 1; }
.map-table.join-pick-selected { outline: 2.5px solid #34d399; outline-offset: 2px; box-shadow: 0 0 14px rgba(52,211,153,0.45); opacity: 1; }
.map-table.join-pick-idle     { opacity: 0.55; filter: saturate(0.5); }
.map-table.join-pick-blocked  { opacity: 0.25; filter: saturate(0) brightness(0.6); cursor: not-allowed; }
.map-table.shift-dim:not(.is-join-secondary)       { opacity: 0.25; filter: saturate(0.2) brightness(0.7); transition: opacity .2s, filter .2s; }
.map-table.shift-dim-light:not(.is-join-secondary) { opacity: 0.60; filter: saturate(0.6) brightness(0.85); transition: opacity .2s, filter .2s; }
/* Pick-mode seating category dim — off-category sections are visually quiet but tappable */
.map-table.seat-cat-dim       { opacity: 0.28; filter: saturate(0.15) brightness(0.65); transition: opacity .2s, filter .2s; }
/* Join secondary sync — dim when master's face shows their shared booking */
.map-table.join-secondary-active { opacity: 1; outline: 2px solid rgba(245,158,11,0.55); outline-offset: 2px; transition: opacity .35s, outline .35s; }

/* turnover badge — map chip variant (scoped so it doesn't override the day-card version) */


/* join bridge */
.map-join-bridge {
  position: absolute; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(56,189,248,0.7), rgba(56,189,248,0.3));
  pointer-events: none; z-index: 2; box-shadow: 0 0 6px rgba(56,189,248,0.4);
}

/* shape toggle hidden */
.shape-toggle { display: none !important; }

/* size modal tiles */
.size-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.size-option {
  padding: 12px 0; border-radius: 10px; border: 1.5px solid #334155;
  background: transparent; color: #64748b; font-size: 16px; font-weight: 700;
  font-family: 'DM Mono', monospace; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
}
.size-option:hover  { border-color: #3b82f6; color: #60a5fa; background: rgba(59,130,246,0.08); }
.size-option.active { border-color: #3b82f6; background: rgba(59,130,246,0.15); color: #60a5fa; }
body.light-mode .size-option { border-color: #e2e8f0; color: #94a3b8; background: #f8fafc; }
body.light-mode .size-option:hover  { border-color: #3b82f6; color: #2563eb; background: rgba(37,99,235,0.06); }
body.light-mode .size-option.active { border-color: #2563eb; background: rgba(37,99,235,0.1); color: #2563eb; }


/* ═══════════════════════
   MODALS
═══════════════════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(0,0,0,0.65);
  align-items: flex-end;
  justify-content: center;
}
.modal.show { display: flex; }

.settings-popover {
  align-items: flex-start;
  justify-content: flex-start;
  background: transparent;
  pointer-events: none;
  padding-bottom: 0;
}
.settings-popover.show { pointer-events: auto; }
.settings-popover .modal-content { pointer-events: auto; }
.settings-popover .modal-body { padding-bottom: 14px; } /* no dock clearance needed — popover is top-left */

.modal-content {
  background: #1e293b;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #e2e8f0;
  animation: slideUp 0.22s ease;
}
.settings-popover .modal-content {
  border-radius: 14px;
  max-width: 260px;
  animation: ctxPop 0.12s ease;
  position: fixed;
}

body.light-mode .modal-content {
  background: #fff;
  color: #0f172a;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #334155;
}
body.light-mode .modal-header { border-bottom-color: #f1f5f9; }

.modal-title { font-size: 16px; font-weight: 700; color: #e2e8f0; }
body.light-mode .modal-title { color: #0f172a; }

.close-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: 8px; cursor: pointer;
  color: #64748b;
}
.close-btn:hover { background: rgba(148,163,184,0.12); }
.close-btn .material-symbols-outlined { font-size: 20px; }

.modal-body { padding: 14px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overflow-x: visible; flex: 1;
  /* Clearance so content scrolls above the dock bar */
  padding-bottom: calc(var(--dock-h, 72px) + 14px);
}

/* ═══════════════════════
   SETTINGS
═══════════════════════ */
.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px;
  border-bottom: 1px solid rgba(51,65,85,0.5);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.12s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: rgba(51,65,85,0.35); }
body.light-mode .settings-item { border-bottom-color: rgba(226,232,240,0.8); }
body.light-mode .settings-item:hover { background: rgba(226,232,240,0.4); }

.settings-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: #e2e8f0;
}
body.light-mode .settings-label { color: #0f172a; }
.settings-label .material-symbols-outlined { color: #64748b; font-size: 20px; }

.settings-toggle .toggle-switch {
  width: 40px; height: 22px;
  border-radius: 11px;
  background: #334155;
  position: relative;
  transition: background 0.2s;
}
.settings-toggle.active .toggle-switch { background: #2563eb; }
.settings-toggle .toggle-switch::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.settings-toggle.active .toggle-switch::after { transform: translateX(18px); }

/* ═══════════════════════
   FORM ELEMENTS
═══════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-group label { font-size: 12px; font-weight: 700; color: #64748b; }

.form-row { flex-direction: row; gap: 10px; }
.form-row > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 12px; font-weight: 700; color: #64748b; }

.ee-input {
  padding: 11px 12px;
  border: 1px solid #334155;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(15,23,42,0.4);
  color: #e2e8f0;
  box-sizing: border-box;
  width: 100%;
  outline: none;
  font-family: inherit;
}
.ee-input:focus { border-color: #3b82f6; background: rgba(15,23,42,0.6); }
.ee-input::placeholder { color: #475569; }

body.light-mode .ee-input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}
body.light-mode .ee-input:focus { border-color: #3b82f6; background: #fff; }
body.light-mode .ee-input::placeholder { color: #94a3b8; }

textarea.ee-input { resize: vertical; }

.form-actions {
  display: flex; gap: 10px; margin-top: 4px;
}

.btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.btn:hover { background: #1d4ed8; }
.btn:active { background: #1e40af; transform: scale(0.99); }
.btn.secondary {
  background: transparent;
  border: 1.5px solid #334155;
  color: #94a3b8;
}
.btn.secondary:hover { background: rgba(51,65,85,0.35); }
body.light-mode .btn.secondary {
  border-color: #e2e8f0;
  color: #64748b;
}

/* Contact search in modal */
/* Footer row under contact search: pill spans full width, table num sits to its right */
.reserve-contact-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
/* Pill stretches to fill the footer, matching the search input width exactly */
.reserve-contact-footer .selected-contact-pill {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  width: 100%;
}
.reserve-contact-footer .reserve-table-display {
  flex-shrink: 0;
}

/* Reserve modal table display (read-only pill) */
.reserve-table-display {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #94a3b8;
  text-align: center;
  cursor: default;
  user-select: none;
  width: 52px;
  padding: 8px 6px;
}
body.light-mode .reserve-table-display { color: #475569; }


.contact-search-wrap { position: relative; }
.contact-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0 0 10px 10px;
  z-index: 11000;
  max-height: 260px;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
body.light-mode .contact-dropdown {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.contact-option {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #334155;
  font-size: 13px;
  display: flex; align-items: center; gap: 9px;
  transition: background 0.1s;
}
body.light-mode .contact-option { border-bottom-color: #f1f5f9; }
.contact-option:hover { background: rgba(59,130,246,0.12); }
.contact-option:last-child { border-bottom: none; }
.contact-option-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #1e40af;
  color: #bfdbfe;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.contact-option-name { font-weight: 500; color: #e2e8f0; }
.contact-option-sub  { font-size: 11px; color: #64748b; margin-top: 1px; }
body.light-mode .contact-option-name { color: #0f172a; }

/* Selected contact pill */
.selected-contact-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.3);
  border-radius: 10px;
  padding: 8px 12px;
  margin-top: 6px;
}
.selected-contact-pill[hidden] { display: none; }
.selected-contact-pill-clear {
  background: transparent; border: none; cursor: pointer;
  color: #64748b; display: flex; align-items: center;
  padding: 0; flex-shrink: 0;
}
.selected-contact-pill-clear .material-symbols-outlined { font-size: 18px; }
.selected-contact-pill-clear:hover { color: #f87171; }

/* ═══════════════════════
   SIZE GRID
═══════════════════════ */

/* ── Shape toggle (size modal) ── */
.shape-toggle {
  display: flex; gap: 4px; align-items: center; margin-left: auto; margin-right: 8px;
}
.shape-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid #334155; background: transparent;
  color: #64748b; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.shape-icon {
  font-size: 20px !important;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20 !important;
}
.shape-btn:hover { border-color: #475569; color: #94a3b8; }
.shape-btn.active { border-color: #3b82f6; background: rgba(59,130,246,0.18); color: #60a5fa; }
body.light-mode .shape-btn { border-color: #cbd5e1; color: #94a3b8; }
body.light-mode .shape-btn:hover { border-color: #94a3b8; color: #475569; }
body.light-mode .shape-btn.active { border-color: #2563eb; background: rgba(37,99,235,0.12); color: #2563eb; }

/* Shape toggle hidden — no longer in size modal */
.shape-toggle { display: none !important; }

/* Size grid — 5 columns, compact */
.size-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.size-option {
  padding: 12px 0;
  border-radius: 10px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  font-weight: 700;
  font-family: 'DM Mono', 'Fira Mono', monospace;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.size-option:hover { border-color: #3b82f6; color: #60a5fa; background: rgba(59,130,246,0.08); }
.size-option.active { border-color: #3b82f6; background: rgba(59,130,246,0.15); color: #60a5fa; }
body.light-mode .size-option { border-color: #e2e8f0; color: #94a3b8; background: #f8fafc; }
body.light-mode .size-option:hover { border-color: #3b82f6; color: #2563eb; background: rgba(37,99,235,0.06); }
body.light-mode .size-option.active { border-color: #2563eb; background: rgba(37,99,235,0.1); color: #2563eb; }

/* ═══════════════════════════════════════════
   DAY PROGRESS BAR
═══════════════════════════════════════════ */
.day-progress-bar {
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  gap: 1px;
  margin-bottom: 2px;
}
.day-progress-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  min-width: 0;
  flex-shrink: 0;
}


.fullscreen-modal {
  align-items: flex-start !important;
  background: transparent !important;
  pointer-events: none;
}
.fullscreen-modal.show {
  pointer-events: auto;
}
.fullscreen-modal-content {
  border-radius: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  height: 100% !important;
  width: 100% !important;
  background: #0f172a !important;
  padding-top: max(env(safe-area-inset-top, 0px), 0px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  animation: slideInFromRight 0.22s ease !important;
}
body.light-mode .fullscreen-modal-content {
  background: #f8fafc !important;
}
@keyframes slideInFromRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Fullscreen modal body — no dock clearance needed */
.fullscreen-modal-content .modal-body {
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 24px) !important;
}

/* JS-generated fullscreen overlays (History, Customers) — unified slide-in */
.hall-fullscreen-overlay {
  animation: slideInFromRight 0.22s ease;
}


.unified-modal-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 16px 12px !important;
  border-bottom: 1px solid #1e293b !important;
  flex-shrink: 0;
}
body.light-mode .unified-modal-header {
  border-bottom-color: #e2e8f0 !important;
}
.unified-modal-header .modal-title {
  flex: 1;
  font-size: 17px !important;
  font-weight: 700;
  text-align: left;
}
/* Back button icon needs slight left nudge for optical centering of arrow_back_ios */
.unified-back-btn .material-symbols-outlined {
  font-size: 20px;
  margin-left: 3px;
}
body.light-mode .unified-modal-header .modal-title {
  color: #0f172a;
}

/* ── Unified back arrow button ── */
.unified-back-btn {
  width: 32px;
  height: 32px;
  background: rgba(248,251,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, transform .1s;
}
.unified-back-btn:active {
  background: rgba(51,65,85,0.55);
  transform: scale(0.95);
}
body.light-mode .unified-back-btn {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}
body.light-mode .unified-back-btn:active {
  background: #e2e8f0;
}


/* ── Date change banner ───────────────────────────────────── */
#_dateBanner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  pointer-events: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  opacity: 0;
  transform: scale(0.88);
  transition: none;
}
#_dateBanner._db-in {
  animation: _dbIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards,
             _dbOut 0.4s ease-in 1.4s forwards;
}
#_dateBanner._db-out {
  opacity: 0;
}
@keyframes _dbIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes _dbOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.06); }
}

.toast {
  position: fixed;
  bottom: calc(var(--dock-h, 72px) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15,23,42,0.95);
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-error {
  background: rgba(127,29,29,0.97);
  border-color: #f87171;
  color: #fee2e2;
}

/* ═══════════════════════
   RESERVATION INFO CARD (in day view)
═══════════════════════ */
.res-info-card {
  background: var(--clr-res-bg);
  border: 1px solid var(--clr-res-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 4px 14px 10px;
}
.res-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--clr-res-text);
  margin-bottom: 3px;
}
.res-info-row:last-child { margin-bottom: 0; }
.res-info-row .material-symbols-outlined { font-size: 14px; }
.res-info-label { color: #94a3b8; }

/* ═══════════════════════
   EMPTY STATE
═══════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 10px;
  color: #475569;
  font-size: 15px;
  text-align: center;
}

/* Dark/light input[type=date] */
input[type="date"], input[type="time"] {
  color-scheme: dark;
}
body.light-mode input[type="date"],
body.light-mode input[type="time"] {
  color-scheme: light;
}

/* ═══════════════════════
   HOURS & SHIFTS EDITOR
═══════════════════════ */
.shifts-opening-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.18);
  border-radius: 12px;
  margin-bottom: 16px;
}
.shifts-opening-label {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: .06em;
  flex: 1;
}
body.light-mode .shifts-opening-label { color: #0284c7; }
.shifts-opening-row .ee-input {
  width: 108px;
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 13px;
  text-align: center;
}
.shifts-opening-row .ee-input:disabled {
  opacity: 0.45;
  cursor: default;
}

.shifts-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 4px;
  margin-top: 8px;
}
.shifts-add-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.shifts-add-icon-btn:active { background: rgba(59,130,246,0.25); }
.shifts-add-icon-btn .material-symbols-outlined { font-size: 16px; }

.shift-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color .15s;
}
.shift-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 6px;
}
body.light-mode .shift-row { background: #f8fafc; border-color: #e2e8f0; }
.shift-row:focus-within { border-color: #3b82f6; }

.shift-duration-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 0;
  font-size: 11px;
  border-top: 1px solid rgba(51,65,85,0.3);
}
body.light-mode .shift-duration-row { background: rgba(0,0,0,0.04); }
.shift-dur-indicator {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px; flex-shrink: 0;
}
.shift-dur-ind-label {
  font-size: 9px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: #475569; line-height: 1;
}
.shift-dur-ind-val {
  font-size: 11px; font-weight: 600; color: #64748b; line-height: 1;
  min-width: 26px; text-align: center;
}
.shift-dur-ind-arrow { font-size: 9px; color: #334155; flex-shrink: 0; }
.shift-dur-ind-sep {
  flex: 1; height: 1px;
  background: rgba(51,65,85,0.5);
  margin: 0 4px;
}
.shift-dur-label {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--clr-text-dim, #475569);
  flex-shrink: 0;
}
.shift-dur-input {
  width: 52px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  text-align: center;
  border-radius: 6px !important;
}
.shift-dur-unit {
  font-size: 11px; color: #64748b;
}

/* colour dot — replaces emoji, background set by JS from shift.color */
.shift-row-type-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.shift-row-type-dot:active { transform: scale(.88); }

/* colour swatches strip */
.shift-color-strip {
  display: flex; gap: 6px; align-items: center;
  padding: 5px 10px 6px;
  border-top: 1px solid rgba(51,65,85,0.5);
}
.shift-type-toggle {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; flex-shrink: 0; padding: 0;
  transition: transform .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.shift-type-toggle:hover { background: rgba(255,255,255,0.12); }
.shift-type-toggle:active { transform: scale(0.88); }
.shift-type-toggle:disabled { opacity: 0.4; cursor: default; }
.shift-strip-div {
  width: 1px; height: 18px; background: #334155; flex-shrink: 0; margin: 0 1px;
}
.shift-cswatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; padding: 0;
  transition: transform .12s, border-color .12s;
  flex-shrink: 0;
}
.shift-cswatch:hover { transform: scale(1.18); }
.shift-cswatch.active { border-color: #fff; }
.shift-cswatch:disabled { opacity: 0.4; cursor: default; }

.shift-name-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  font-family: inherit;
  min-width: 60px;
}
body.light-mode .shift-name-input { color: #0f172a; }
.shift-name-input:disabled { opacity: .45; }
.shift-name-input::placeholder { color: #475569; }

.shift-time-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.shift-time-inputs .ee-input {
  width: 84px;
  padding: 7px 6px;
  font-size: 12px;
  text-align: center;
}
.shift-time-inputs .ee-input:disabled { opacity: .45; cursor: default; }
.shift-time-sep {
  font-size: 11px;
  color: #475569;
  flex-shrink: 0;
}

.shift-delete-btn {
  width: 28px; height: 28px;
  border: none; background: transparent;
  border-radius: 7px;
  color: #475569;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.shift-delete-btn:hover { color: #f87171; background: rgba(239,68,68,.1); }
.shift-delete-btn .material-symbols-outlined { font-size: 18px; }

.shifts-readonly-note {
  font-size: 12px;
  color: #475569;
  text-align: center;
  padding: 8px 0 4px;
  font-style: italic;
}

/* ═══════════════════════
   SCROLLBAR (dark)
═══════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }
body.light-mode ::-webkit-scrollbar-thumb { background: #cbd5e1; }


/* ═══════════════════════
   DOCK SHEET
═══════════════════════ */
.dock-sheet-content {
  max-width: 480px;
  /* Top corners rounded, bottom corners SQUARE — snaps to bottom dock top */
  border-radius: 20px 20px 0 0 !important;
  width: 100%;
  /* max-height set dynamically in JS to dock.getBoundingClientRect().top */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #1e293b;
  box-shadow: -4px -4px 24px rgba(0,0,0,0.4), 4px 0 24px rgba(0,0,0,0.4);
}
body.light-mode .dock-sheet-content { background: #fff; box-shadow: -2px -4px 16px rgba(0,0,0,0.1), 2px 0 16px rgba(0,0,0,0.1); }
.dock-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}
.ss-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid #334155;
  background: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.ss-action:active { background: #0f172a; }
body.light-mode .ss-action { background: #f8fafc; border-color: #e2e8f0; }
body.light-mode .ss-action:active { background: #f1f5f9; }

.ss-action-icon {
  font-size: 22px;
  flex-shrink: 0;
  color: #64748b;
}
.ss-action-label {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
}
body.light-mode .ss-action-label { color: #0f172a; }
.ss-action-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Dock sheet modal: no padding-bottom — sheet snaps to bottom dock via JS maxHeight */
#dockSheet {
  padding-bottom: var(--dock-h, 72px); /* fallback; _snapStatusSheet overrides with measured value */
  background: transparent;             /* no dark backdrop — SS fuses with dock, content behind stays visible */
  pointer-events: none;                /* backdrop area is click-through; only sheet content receives events */
}
#dockSheet .dock-sheet-content {
  pointer-events: auto;                /* re-enable on the content panel itself */
}

/* Dock sheet: no header — remove entirely */
#dockSheet .modal-header {
  display: none;
}

/* When dock sheet is open, dock fuses seamlessly */
.dock-wrap.dock-sheet-open {
  border-top: 1px solid rgba(59,130,246,0.24);
  background: rgba(30, 41, 59, 0.97);
  box-shadow: none;
}
body.light-mode .dock-wrap.dock-sheet-open {
  border-top: 1px solid rgba(59,130,246,0.18);
  background: rgba(255,255,255,0.98);
}
/* Hide the dock results row while sheet is open — identity footer shows context instead */
.dock-wrap.dock-sheet-open .dock-results {
  display: none !important;
}

/* Per-action accent colours */
.ss-free   .ss-action-icon { color: #22c55e; }
.ss-free   { border-color: rgba(34,197,94,0.3); }
.ss-reserve .ss-action-icon { color: #38bdf8; }
.ss-reserve { border-color: rgba(56,189,248,0.25); }
.ss-occupy .ss-action-icon { color: var(--clr-res); }
.ss-walkin .ss-action-icon { color: #a78bfa; }
.ss-walkin { border-color: rgba(167,139,250,0.25); }
.ss-arrived .ss-action-icon { color: #ef4444; }
.ss-arrived { border-color: rgba(239,68,68,0.3); }
.ss-done .ss-action-icon { color: #22c55e; }
.ss-done { border-color: rgba(34,197,94,0.3); }
.ss-occupy { border-color: var(--clr-res-border); }
.ss-cancel .ss-action-icon { color: #ef4444; }
.ss-cancel { border-color: rgba(239,68,68,0.25); }
.ss-restore .ss-action-icon { color: #a78bfa; }
.ss-restore { border-color: rgba(167,139,250,0.3); }
.ss-noshow .ss-action-icon { color: #f59e0b; }
.ss-noshow { border-color: rgba(245,158,11,0.3); }
.ss-setup .ss-action-icon { color: #94a3b8; }
.ss-setup { border-color: rgba(148,163,184,0.2); }
.ss-setup-danger .ss-action-icon { color: #ef4444; }
.ss-setup-danger { border-color: rgba(239,68,68,0.3); }

/* ── Status group headers in day view ── */
.section-header-name.grp-occupied  { color: #fca5a5; }
.section-header-name.grp-reserved  { color: var(--clr-res-text); }
.section-header-name.grp-free      { color: #86efac; }
.section-header-name.grp-cancelled  { color: #94a3b8; }
.section-header-name.grp-unassigned { color: #c084fc; }
body.light-mode .section-header-name.grp-occupied  { color: #b91c1c; }
body.light-mode .section-header-name.grp-reserved  { color: var(--clr-res-text); }
body.light-mode .section-header-name.grp-free      { color: #15803d; }
body.light-mode .section-header-name.grp-cancelled  { color: #64748b; }
body.light-mode .section-header-name.grp-unassigned { color: #7c3aed; }

/* ── Cancelled reservation row ── */
.dc-cancelled-row { opacity: 0.45; }
.dc-cancelled-row:active { opacity: 0.6; }
.dc-cancelled-row .dc-bar { background: #475569 !important; }
.dc-name-cancelled  { text-decoration: line-through; color: #94a3b8; }
.dc-time-cancelled  { text-decoration: line-through; color: #64748b; }
.dc-party-cancelled { text-decoration: line-through; color: #64748b; }
.dc-badge-cancelled {
  background: rgba(100,116,139,0.15);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: normal.02em;
  cursor: pointer;
}
body.light-mode .dc-cancelled-row { opacity: 0.4; }
body.light-mode .dc-name-cancelled  { color: #94a3b8; }
body.light-mode .dc-badge-cancelled { background: rgba(100,116,139,0.1); color: #64748b; }
.ss-edit   .ss-action-icon { color: #a78bfa; }
.ss-edit   { border-color: rgba(167,139,250,0.25); }

/* Map table highlight pulse (when navigated from day view icon tap) */
@keyframes map-highlight-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(56,189,248,0.9), 0 0 20px rgba(56,189,248,0.4); }
  50%  { box-shadow: 0 0 0 10px rgba(56,189,248,0),  0 0 20px rgba(56,189,248,0.2); }
  100% { box-shadow: 0 0 0 0   rgba(56,189,248,0.9), 0 0 20px rgba(56,189,248,0.4); }
}
.map-table-highlight {
  animation: map-highlight-pulse 0.9s ease-out infinite;
}

/* ── Inline Header Date Strip ───────────────────────────── */
/* title-slot now stretches to fill center of header */
.title-slot {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.title-hall { position: absolute; margin: 0; transition: opacity .3s ease, transform .3s ease; }
.title-hall.gone { opacity: 0; transform: translateY(-8px); pointer-events: none; }
/* title-date-nav: full-width row. Uses opacity not display so hidden attr doesn't conflict */
.title-date-nav {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.title-date-nav.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
/* override hidden attribute so strip stays in layout */
#titleDateNav[hidden] { display: flex; }

.date-strip-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.date-strip-wrap::before,
.date-strip-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 18px;
  z-index: 2;
  pointer-events: none;
}
.date-strip-wrap::before { left: 0;  background: linear-gradient(to right, #0f172a, transparent); }
.date-strip-wrap::after  { right: 0; background: linear-gradient(to left,  #0f172a, transparent); }
body.light-mode .date-strip-wrap::before { background: linear-gradient(to right, #f8fafc, transparent); }
body.light-mode .date-strip-wrap::after  { background: linear-gradient(to left,  #f8fafc, transparent); }

.date-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: center;
}
.date-strip::-webkit-scrollbar { display: none; }

.ds-chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 2px 6px;
  cursor: pointer;
  min-width: 34px;
  transition: background .12s, border-color .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  color: #64748b;
  font-family: inherit;
}
.ds-chip:active { transform: scale(.88); }
.ds-chip:hover  { background: rgba(255,255,255,.07); color: #cbd5e1; }

.ds-dow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
}
.ds-num {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}
.ds-chip.ds-today { color: #38bdf8; }
.ds-chip.ds-today .ds-num::after {
  content: '';
  display: block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #f59e0b;
  margin: 1px auto 0;
}
.ds-chip.ds-active {
  background: #1e40af;
  border-color: #3b82f6;
  color: #fff;
}
.ds-chip.ds-active .ds-dow { color: rgba(255,255,255,.7); }
.ds-chip.ds-active.ds-today { background: #0c4a6e; border-color: #38bdf8; }

/* light mode */
body.light-mode .ds-chip { color: #94a3b8; }
body.light-mode .ds-chip:hover { background: rgba(0,0,0,.06); color: #475569; }
body.light-mode .ds-chip.ds-today { color: #0284c7; }
body.light-mode .ds-chip.ds-active { background: #2563eb; border-color: #3b82f6; color: #fff; }
body.light-mode .ds-chip.ds-active.ds-today { background: #0369a1; border-color: #0284c7; }

/* ── Today shortcut pill ─────────────────────────────────── */
.tdn-today-btn {
  flex: 0 0 auto;
  background: rgba(56,189,248,.12);
  border: 1.5px solid rgba(56,189,248,.35);
  color: #38bdf8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 8px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  margin-left: 2px;
}
.tdn-today-btn:active { transform: scale(.9); }
.tdn-today-btn:hover  { background: rgba(56,189,248,.22); border-color: rgba(56,189,248,.6); }
body.light-mode .tdn-today-btn { background: rgba(2,132,199,.1); border-color: rgba(2,132,199,.3); color: #0284c7; }
body.light-mode .tdn-today-btn:hover { background: rgba(2,132,199,.18); border-color: rgba(2,132,199,.55); }

/* ── Today icon button (header right) ───────────────────── */
.today-icon-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(248,251,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #f472b6;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  flex-direction: column;
  gap: 0;
  line-height: 1;
  transition: background .15s, transform .1s;
}
.today-icon-btn[hidden] { display: none; }
.today-icon-btn:active { background: rgba(51,65,85,0.55); transform: scale(0.95); }
body.light-mode .today-icon-btn { border-color: #e2e8f0; background: #f8fafc; color: #ec4899; }
body.light-mode .today-icon-btn:active { background: #e2e8f0; }

/* ── Selected contact pill (with edit) ───────────────────── */
.selected-contact-pill-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.selected-contact-pill-name  { font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selected-contact-pill-phone { font-size: 11px; color: #64748b; white-space: nowrap; }
.selected-contact-pill-edit {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.selected-contact-pill-edit .material-symbols-outlined { font-size: 16px; }
.selected-contact-pill-edit:hover { color: #38bdf8; background: rgba(56,189,248,.1); }
body.light-mode .selected-contact-pill-name  { color: #0f172a; }
body.light-mode .selected-contact-pill-edit:hover { color: #0284c7; background: rgba(2,132,199,.1); }

/* ── Add new contact row in dropdown ─────────────────────── */
.contact-option-add {
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: 2px;
  padding-top: 8px;
  gap: 10px;
}
body.light-mode .contact-option-add { border-top-color: rgba(0,0,0,.07); }

/* ── Contact edit row: icon-only save/cancel ────────────────── */
.ctc-icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 6px;
  flex-shrink: 0;
  color: #64748b;
  transition: color .15s, background .15s;
}
.ctc-icon-btn .material-symbols-outlined { font-size: 14px; }
.ctc-save-btn:hover   { color: #34d399; background: rgba(52,211,153,.1); }
.ctc-cancel-btn:hover { color: #f87171; background: rgba(248,113,113,.1); }

/* ── Time picker input (read-only, looks clickable) ─────────── */
.time-picker-input {
  cursor: pointer;
  caret-color: transparent;
  user-select: none;
}
.time-picker-input:focus { outline: none; border-color: #3b82f6; }

/* ── Time drum ──────────────────────────────────────────────── */
/*   #reserveStartDrum lives on <body> so position:fixed is      */
/*   never broken by an ancestor with overflow:auto (iOS/Safari) */
#reserveStartDrum {
  position: fixed;
  z-index: 11100;
  pointer-events: auto;
  touch-action: pan-y;
  /* sizing / scroll */
  width: 320px;
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
  /* appearance */
  background: #0d1525;
  border: 1px solid rgba(99,179,237,.22);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(99,179,237,.06),
    0 16px 48px rgba(0,0,0,.7),
    0 4px 12px rgba(0,0,0,.4);
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(99,179,237,.18) transparent;
  /* smooth open */
  animation: drumPop .15s cubic-bezier(.34,1.3,.64,1) both;
}
body.light-mode #reserveStartDrum {
  background: #fff;
  border-color: rgba(37,99,235,.18);
  box-shadow:
    0 0 0 1px rgba(37,99,235,.06),
    0 16px 48px rgba(0,0,0,.18),
    0 4px 12px rgba(0,0,0,.08);
}
@keyframes drumPop {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* ── Legacy .time-drum class (used by JS className assignment) ─ */
.time-drum { /* no extra styles needed — #reserveStartDrum carries everything */ }

.time-drum-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: .01em;
  transition: background .1s, color .1s;
  border-left: 2px solid transparent;
}
.time-drum-slot:hover {
  background: rgba(99,179,237,.08);
  color: #cbd5e1;
}
.time-drum-slot.active {
  background: rgba(59,130,246,.14);
  border-left-color: #3b82f6;
  color: #93c5fd;
  font-weight: 700;
}
body.light-mode .time-drum-slot       { color: #64748b; }
body.light-mode .time-drum-slot:hover { background: rgba(37,99,235,.07); color: #1e40af; }
body.light-mode .time-drum-slot.active{ background: rgba(37,99,235,.1); border-left-color: #2563eb; color: #1d4ed8; font-weight: 700; }
.time-drum-slot.td-past { opacity: 0.3; text-decoration: line-through; cursor: default; }

.tds-time {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
}
.tds-label {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56,189,248,.1);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-row > div { position: relative; overflow: visible; }


/* ═══════════════════════════════════════════
   SORT PILLS — section header
═══════════════════════════════════════════ */
.section-header {
  flex-wrap: nowrap;
  gap: 8px;
}
.section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.section-sort-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.sort-pill {
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #334155;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .02em;
}
.sort-pill:hover { border-color: #475569; color: #94a3b8; background: rgba(255,255,255,.04); }
.sort-pill.active {
  background: rgba(56,189,248,.12);
  border-color: rgba(56,189,248,.4);
  color: #38bdf8;
}
body.light-mode .sort-pill { border-color: #e2e8f0; color: #94a3b8; }
body.light-mode .sort-pill:hover { border-color: #cbd5e1; color: #475569; }
body.light-mode .sort-pill.active { background: rgba(2,132,199,.08); border-color: rgba(2,132,199,.3); color: #0284c7; }

/* ═══════════════════════════════════════════
   RESERVATION MODAL — redesigned
═══════════════════════════════════════════ */
.reserve-modal-header {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, rgba(37,99,235,.08) 0%, transparent 60%);
  border-bottom: 1px solid #253348;
}
body.light-mode .reserve-modal-header {
  background: linear-gradient(135deg, rgba(37,99,235,.04) 0%, transparent 60%);
  border-bottom-color: #e2e8f0;
}
.reserve-modal-title-group { display: flex; flex-direction: column; gap: 2px; }
.reserve-modal-subtitle {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 500;
  min-height: 16px;
}
.reserve-modal-body { padding: 16px 18px calc(var(--dock-h, 72px) + 16px); }

/* Field labels with icon */
.reserve-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 0;
}
.reserve-label-icon {
  font-size: 14px !important;
  color: #475569;
}
.reserve-label-optional {
  font-size: 10px;
  font-weight: 500;
  color: #334155;
  text-transform: lowercase;
  letter-spacing: normal;
  margin-left: 4px;
  padding: 1px 6px;
  background: rgba(51,65,85,.4);
  border-radius: 4px;
}
body.light-mode .reserve-label-optional { background: #f1f5f9; color: #94a3b8; }

.reserve-contact-group { margin-bottom: 10px; }
.reserve-contact-input { padding-left: 14px; }

/* Party size stepper */
.party-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.party-step-btn {
  width: 38px; height: 42px;
  border: 1.5px solid #334155;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.party-step-btn:hover { border-color: #3b82f6; color: #60a5fa; background: rgba(59,130,246,.1); }
.party-step-btn:active { transform: scale(.9); }
.party-step-btn .material-symbols-outlined { font-size: 18px; }
.party-step-plus { border-color: rgba(59,130,246,.5); background: rgba(59,130,246,.08); color: #60a5fa; }
body.light-mode .party-step-btn { border-color: #e2e8f0; background: #f8fafc; color: #94a3b8; }
body.light-mode .party-step-btn:hover { border-color: #2563eb; color: #2563eb; background: rgba(37,99,235,.06); }
body.light-mode .party-step-plus { border-color: rgba(37,99,235,.4); background: rgba(37,99,235,.06); color: #2563eb; }

.party-size-input {
  -webkit-appearance: textfield;
  width: 56px !important;
  text-align: center;
  font-size: 18px !important;
  font-weight: 700 !important;
  padding: 9px 4px !important;
}
.party-quick-pills {
  display: flex;
  gap: 3px;
  margin-left: 4px;
  overflow-x: auto;
  flex-shrink: 1;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.party-quick-pills::-webkit-scrollbar { display: none; }
.party-quick-pill {
  min-width: 36px; height: 40px;
  flex-shrink: 0;
  border: 1.5px solid #2d4a7a;
  background: rgba(59,130,246,.08);
  color: #60a5fa;
  border-radius: 8px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.party-quick-pill:hover { border-color: #3b82f6; color: #93c5fd; background: rgba(59,130,246,.15); }
.party-quick-pill.active { border-color: #3b82f6; background: rgba(59,130,246,.25); color: #fff; font-weight: 800; }
body.light-mode .party-quick-pill { border-color: #bfdbfe; background: rgba(37,99,235,.06); color: #2563eb; }
body.light-mode .party-quick-pill:hover { border-color: #2563eb; background: rgba(37,99,235,.12); }
body.light-mode .party-quick-pill.active { border-color: #2563eb; background: rgba(37,99,235,.18); color: #1d4ed8; }

.reserve-datetime-row { gap: 8px; flex-wrap: nowrap; align-items: flex-start; }
.dt-col-date {
  width: 44%;
  flex: none;
  min-width: 0;
  overflow: hidden;
}
.dt-col-time {
  flex: 1;
  min-width: 0;
  position: relative;
}
/* Force iOS to respect our width — suppress native date chrome */
.reserve-date-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.reserve-notes-input { font-size: 13px !important; color: #94a3b8 !important; }
.reserve-notes-input:focus { color: #e2e8f0 !important; }
body.light-mode .reserve-notes-input { color: #94a3b8 !important; }
body.light-mode .reserve-notes-input:focus { color: #0f172a !important; }

.reserve-notes-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.reserve-notes-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid #334155;
  background: rgba(100,116,139,.10);
  color: #64748b;
  font-family: inherit;
  transition: background .13s, border-color .13s, color .13s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.reserve-notes-tag:active { transform: scale(.93); }
.reserve-notes-tag.on {
  background: rgba(59,130,246,.15);
  border-color: #3b82f6;
  color: #60a5fa;
}
.reserve-notes-tag-emoji { font-size: 13px; line-height: 1; }
body.light-mode .reserve-notes-tag { border-color: #e2e8f0; color: #94a3b8; background: #f8fafc; }
body.light-mode .reserve-notes-tag.on { background: rgba(37,99,235,.08); border-color: #2563eb; color: #2563eb; }
.reserve-notes-expand {
  color: #475569 !important;
  background: transparent !important;
  border-color: #334155 !important;
  padding: 5px 7px !important;
}
body.light-mode .reserve-notes-expand { border-color: #e2e8f0 !important; color: #94a3b8 !important; }


/* Save button with icon */
.reserve-save-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.reserve-waitlist-btn {
  background: rgba(168,85,247,0.15);
  color: #c084fc;
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.reserve-waitlist-btn:active { background: rgba(168,85,247,0.25); }
.reserve-save-btn .material-symbols-outlined { font-size: 18px; }

.reserve-form-actions { margin-top: 8px; }

/* ═══════════════════════════════════════════
   TABLE PICKER DROPDOWN
═══════════════════════════════════════════ */
/* Map-pick pill inside the table field */
.reserve-map-pill {
  position: absolute;
  right: 36px; /* sit left of the chevron */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1.5px solid #334155;
  background: #1e293b;
  color: #38bdf8;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s;
  z-index: 2;
}
.reserve-map-pill .material-symbols-outlined { font-size: 16px; }
.reserve-map-pill:active { background: #0f172a; }
body.light-mode .reserve-map-pill { background: #f1f5f9; border-color: #cbd5e1; color: #0284c7; }
body.light-mode .reserve-map-pill:active { background: #e2e8f0; }

.reserve-table-search-wrap {
  position: relative;
}
.reserve-table-search-input {
  cursor: pointer;
  padding-right: 36px !important;
}
.reserve-table-search-input:focus { cursor: text; }
.reserve-table-chevron {
  position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 20px !important;
  color: #475569;
  pointer-events: none;
  transition: transform .2s;
}
.reserve-table-search-input:focus ~ .reserve-table-chevron { transform: translateY(-50%) rotate(180deg); color: #3b82f6; }

.reserve-table-dropdown {
  display: none; /* replaced by bottom sheet */
}

/* ── Table Picker Sheet ───────────────────────────────── */
.tps-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #1e293b;
  background: #0f172a;
  position: sticky;
  top: 0;
  z-index: 1;
}
body.light-mode .tps-search-wrap { background: #f8fafc; border-bottom-color: #e2e8f0; }
.tps-search-icon { font-size: 18px !important; color: #64748b; flex-shrink: 0; }
.tps-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: #e2e8f0;
  font-family: inherit;
}
body.light-mode .tps-search-input { color: #0f172a; }
.tps-search-input::placeholder { color: #475569; }
.tps-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px;
  max-height: 60vh;
}
.tps-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  border-bottom: 1px solid rgba(51,65,85,.3);
}
.tps-row:last-child { border-bottom: none; }
.tps-row:active { background: rgba(59,130,246,.15); }
.tps-row.active { background: rgba(59,130,246,.12); }
body.light-mode .tps-row:active { background: rgba(37,99,235,.08); }
body.light-mode .tps-row.active { background: rgba(37,99,235,.07); }
.tps-num {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
  flex-shrink: 0;
}
.tps-num-free,
.tps-num-reserved,
.tps-num-occupied,
.tps-num-none     { color: #f0e0c8; background: rgba(240,224,200,.10); }
body.light-mode .tps-num-free,
body.light-mode .tps-num-reserved,
body.light-mode .tps-num-occupied,
body.light-mode .tps-num-none { color: #8c6a45; background: rgba(140,106,69,.10); }
.tps-info { flex: 1; min-width: 0; }
.tps-name { font-size: 14px; font-weight: 600; color: #e2e8f0; }
body.light-mode .tps-name { color: #0f172a; }
.tps-sub  { font-size: 12px; color: #64748b; margin-top: 1px; }
.tps-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.tps-badge-free     { color: #86efac; background: rgba(34,197,94,.1); }
.tps-badge-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
.tps-badge-occupied { color: #fca5a5; background: rgba(239,68,68,.1); }
body.light-mode .tps-badge-free     { color: #15803d; background: rgba(34,197,94,.08); }
body.light-mode .tps-badge-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
body.light-mode .tps-badge-occupied { color: #b91c1c; background: rgba(239,68,68,.08); }

body.light-mode .reserve-table-dropdown {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.reserve-table-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s;
  border-bottom: 1px solid rgba(51,65,85,.35);
}
.reserve-table-option:last-child { border-bottom: none; }
.reserve-table-option:hover { background: rgba(59,130,246,.1); }
.reserve-table-option.active { background: rgba(59,130,246,.15); }
.rto-empty { color: #475569; font-size: 13px; font-style: italic; justify-content: center; }
body.light-mode .reserve-table-option:hover { background: rgba(37,99,235,.06); }
body.light-mode .reserve-table-option.active { background: rgba(37,99,235,.1); }

.rto-num {
  font-size: 13px; font-weight: 800;
  min-width: 34px; text-align: center;
  padding: 3px 6px;
  border-radius: 7px;
  flex-shrink: 0;
  background: rgba(255,255,255,.05);
  color: #94a3b8;
}
.rto-num-free     { color: #86efac; background: rgba(34,197,94,.12); }
.rto-num-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
.rto-num-occupied { color: #fca5a5; background: rgba(239,68,68,.12); }
body.light-mode .rto-num-free     { color: #16a34a; background: rgba(34,197,94,.1); }
body.light-mode .rto-num-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
body.light-mode .rto-num-occupied { color: #dc2626; background: rgba(239,68,68,.1); }

.rto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rto-seats {
  font-size: 12px; font-weight: 600; color: #e2e8f0;
  line-height: 1.2;
}
body.light-mode .rto-seats { color: #0f172a; }
.rto-sec {
  font-size: 10px; font-weight: 600; color: #475569;
  text-transform: uppercase; letter-spacing: .04em;
  line-height: 1;
}

.rto-status {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  flex-shrink: 0; white-space: nowrap;
}
.rto-status-free     { color: #86efac; background: rgba(34,197,94,.1); }
.rto-status-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
.rto-status-unknown  { color: #94a3b8; background: rgba(100,116,139,0.1); }
.rto-status-occupied { color: #fca5a5; background: rgba(239,68,68,.1); }
body.light-mode .rto-status-free     { color: #15803d; background: rgba(34,197,94,.08); }
body.light-mode .rto-status-reserved { color: var(--clr-res-text); background: var(--clr-res-bg); }
body.light-mode .rto-status-occupied { color: #b91c1c; background: rgba(239,68,68,.08); }

/* Fix "optional" label — make it more visible */
.reserve-label-optional {
  font-size: 10px;
  font-weight: 600;
  color: #64748b !important;
  text-transform: lowercase;
  letter-spacing: normal;
  margin-left: 4px;
  padding: 1px 7px;
  background: rgba(100,116,139,.15) !important;
  border: 1px solid rgba(100,116,139,.25);
  border-radius: 4px;
}
body.light-mode .reserve-label-optional {
  color: #64748b !important;
  background: rgba(100,116,139,.1) !important;
  border-color: rgba(100,116,139,.2);
}

.upcoming-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: #475569;
  font-size: 14px;
  text-align: center;
}

.upcoming-date-header { cursor: default; }
.upcoming-date-header .section-header-name.upcoming-today { color: #38bdf8; }
body.light-mode .upcoming-date-header .section-header-name.upcoming-today { color: #0284c7; }

.upcoming-booking-card { cursor: pointer; }

/* ═══════════════════════════════════════════
   TIME DRUM — 2-column shift layout
═══════════════════════════════════════════ */
.time-drum-cols {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
  width: 100%;
}

.td-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  flex: 1;
  min-width: 80px;
}

/* Columns row — sits above the manual row */
.td-cols-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.td-cols-row > .td-col + .td-col {
  border-left: 1px solid #1e293b;
}
body.light-mode .td-cols-row > .td-col + .td-col { border-left-color: #e2e8f0; }
.td-cols-row > .td-col {
  flex: 1;
  min-width: 80px;
}
body.light-mode .time-drum-cols > .td-col + .td-col { border-left-color: #e2e8f0; }

.td-col-hdr {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 6px 4px;
  border-radius: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
}
.td-col-hdr-day     { color: #fbbf24; background: rgba(245,158,11,.12); }
.td-col-hdr-night   { color: #a5b4fc; background: rgba(129,140,248,.12); }
.td-col-hdr-neutral { color: #64748b; background: rgba(148,163,184,.08); }
body.light-mode .td-col-hdr-day   { color: #b45309; background: rgba(217,119,6,.08); }
body.light-mode .td-col-hdr-night { color: #4f46e5; background: rgba(99,102,241,.08); }

.td-col-icon {
  font-size: 12px !important;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

/* Slot buttons inside 2-col drum */
.time-drum-cols .time-drum-slot {
  width: 100%;
  padding: 8px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #94a3b8;
  transition: background .1s, color .1s;
  font-family: inherit;
  white-space: nowrap;
}
.time-drum-cols .time-drum-slot:hover  { background: rgba(56,189,248,.1); color: #e2e8f0; }
.time-drum-cols .time-drum-slot.active { background: rgba(59,130,246,.22); color: #60a5fa; font-weight: 700; }
body.light-mode .time-drum-cols .time-drum-slot       { color: #475569; }
body.light-mode .time-drum-cols .time-drum-slot:hover { background: rgba(37,99,235,.08); color: #0f172a; }
body.light-mode .time-drum-cols .time-drum-slot.active{ background: rgba(37,99,235,.12); color: #2563eb; }

/* Minutes column — always the 3rd col, shows :00 :15 :30 :45 for selected hour */
.td-col-minutes {
  border-left: 1px solid #334155;
}
.td-col-hdr-minutes {
  /* inherits same style as shift headers via .td-col-hdr — just override color */
  color: #94a3b8;
  background: rgba(148,163,184,0.06);
}
body.light-mode .td-col-hdr-minutes { color: #64748b; background: rgba(0,0,0,0.04); }

/* Manual "Other" row — full width below columns */
.td-manual-row {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #1e293b;
  width: 100%;
}
body.light-mode .td-manual-row { border-top-color: #e2e8f0; }
.td-manual-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}
.td-manual-input {
  flex: 1;
  padding: 5px 8px !important;
  font-size: 12px !important;
  min-width: 0;
}

/* ═══════════════════════════════════════════
   DELETE BUTTON — reservation modal
═══════════════════════════════════════════ */
.reserve-delete-btn {
  flex: 0 0 auto;
  width: 44px;
  padding: 0;
  background: rgba(239,68,68,.1);
  border: 1.5px solid rgba(239,68,68,.3) !important;
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background .15s, border-color .15s;
}
.reserve-delete-btn:hover  { background: rgba(239,68,68,.22); border-color: rgba(239,68,68,.55) !important; }
.reserve-delete-btn:active { transform: scale(.95); }
.reserve-delete-btn .material-symbols-outlined { font-size: 20px; }
body.light-mode .reserve-delete-btn            { background: rgba(220,38,38,.06);  border-color: rgba(220,38,38,.2) !important;  color: #dc2626; }
body.light-mode .reserve-delete-btn:hover      { background: rgba(220,38,38,.12);  border-color: rgba(220,38,38,.4) !important; }

/* ═══════════════════════════════════════════
   TABLE ASSIGN SHEET  (.tas-*)
═══════════════════════════════════════════ */
.tas-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 20px;
}

/* Each booking row */
.tas-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px solid #334155;
  background: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.tas-row:active { background: #0f172a; }

/* "New reservation" special row */
.tas-row-new {
  border-color: rgba(56,189,248,0.25);
  margin-top: 4px;
}
.tas-row-new .tas-name { color: #38bdf8; }

/* Avatar circle */
.tas-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: normal.02em;
}
.tas-avatar-new {
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  border: 1.5px solid rgba(56,189,248,0.3);
}

/* Info block */
.tas-info {
  flex: 1;
  min-width: 0;
}
.tas-name {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.tas-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}
.tas-meta span::before {
  content: '';
}
.tas-meta span + span::before {
  content: '· ';
  color: #475569;
}

/* Table chip — shows currently-assigned table */
.tas-chip {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.3);
  white-space: nowrap;
}
/* Chip for the table we're assigning to (already assigned here) */
.tas-chip-self {
  background: rgba(34,197,94,0.15);
  color: #86efac;
  border-color: rgba(34,197,94,0.35);
}

/* Assigned (read-only) rows in the assign sheet */
.tas-row-assigned {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.tas-chip-assigned {
  background: rgba(148,163,184,0.12);
  color: #64748b;
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  flex-shrink: 0;
}
body.light-mode .tas-chip-assigned { background: rgba(100,116,139,0.08); color: #94a3b8; }

/* "Assign" action accent in the choice sheet */
.ss-assign .ss-action-icon { color: #818cf8; }
.ss-assign { border-color: rgba(129,140,248,0.25); }

/* ── Light-mode overrides ── */
body.light-mode .tas-row { background: #f8fafc; border-color: #e2e8f0; }
body.light-mode .tas-row:active { background: #f1f5f9; }
body.light-mode .tas-row-new { border-color: rgba(2,132,199,0.3); }
body.light-mode .tas-row-new .tas-name { color: #0284c7; }
body.light-mode .tas-avatar-new { background: rgba(2,132,199,0.08); color: #0284c7; border-color: rgba(2,132,199,0.25); }
body.light-mode .tas-name { color: #0f172a; }
body.light-mode .tas-meta { color: #94a3b8; }
body.light-mode .tas-meta span + span::before { color: #cbd5e1; }
body.light-mode .tas-chip { background: rgba(99,102,241,0.08); color: #4f46e5; border-color: rgba(99,102,241,0.2); }
body.light-mode .tas-chip-self { background: rgba(22,163,74,0.08); color: #15803d; border-color: rgba(22,163,74,0.25); }
body.light-mode .ss-assign .ss-action-icon { color: #4f46e5; }
body.light-mode .ss-assign { border-color: rgba(99,102,241,0.2); }


/* ═══════════════════════════════════════════
   RESERVE MODAL — TABLE + SEATING ROW
═══════════════════════════════════════════ */
.reserve-table-row {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
/* Table col: takes ~60% */
.reserve-table-col {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
/* Seating col: takes ~40% */
.reserve-seating-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* Pill row */
.seating-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.seating-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 7px 8px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  line-height: 1;
}
.seating-pill-icon { font-size: 14px !important; }
.seating-pill:active { background: rgba(56,189,248,.1); }
.seating-pill.active {
  background: rgba(56,189,248,.15);
  border-color: #38bdf8;
  color: #38bdf8;
}
body.light-mode .seating-pill { border-color: #cbd5e1; color: #94a3b8; background: #f8fafc; }
body.light-mode .seating-pill:active { background: #e2e8f0; }
body.light-mode .seating-pill.active { background: rgba(2,132,199,.1); border-color: #0284c7; color: #0284c7; }

/* ═══════════════════════════════════════════
   SHIFTS MODAL — SECTION CONFIG ROWS
═══════════════════════════════════════════ */
.section-config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(51,65,85,.5);
}
.section-config-row:last-of-type { border-bottom: none; }
.section-config-letter {
  flex-shrink: 0;
  width: 22px;
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  text-align: center;
}
.section-config-name {
  flex: 1;
  padding: 7px 10px !important;
  font-size: 13px !important;
}
.section-config-cat {
  flex-shrink: 0;
  width: 96px;
  padding: 7px 8px !important;
  font-size: 12px !important;
}
body.light-mode .section-config-row { border-bottom-color: #f1f5f9; }
body.light-mode .section-config-letter { color: #0284c7; }

/* Map chip party/size ratio display */
/* Pax: bright, status-matched color — draws the eye */
.map-table.status-free     .map-table-size .mts-party { color: #10b981; }
.map-table.status-reserved .map-table-size .mts-party { color: #93c5fd; }
.map-table.status-walkin   .map-table-size .mts-party { color: #fcd34d; }
.map-table.status-occupied .map-table-size .mts-party { color: #fc8181; }
/* Separator + capacity: muted, smaller */
.map-table-size .mts-sep {
  font-size: 9px;
  font-weight: 400;
  opacity: 0.35;
  margin: 0 1px;
}
.map-table-size .mts-cap {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.45;
}
body.light-mode .map-table-size .mts-party { color: #0f172a; }
body.light-mode .map-table-size .mts-cap   { opacity: 0.4; }

/* Booking-level join bridge */
.map-join-bridge {
  position: absolute;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(56,189,248,0.7), rgba(56,189,248,0.3));
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 6px rgba(56,189,248,0.4);
}
.map-join-bridge-dim {
  opacity: 0.15;
  filter: saturate(0.2);
}

/* ══════════════════════════════════════
   BOOKING JOIN — chip states & overlay
══════════════════════════════════════ */

/* Master chip (booking owner) — accent ring */
.map-table.is-bjoin {
  outline: 2.5px solid rgba(56,189,248,0.85);
  outline-offset: 2px;
  box-shadow: 0 0 10px rgba(56,189,248,0.25);
}

/* Secondary joined chip — ring shows group membership, dim shows subordinate role */
.map-table.is-join-secondary {
  outline: 2px solid rgba(56,189,248,0.55);
  outline-offset: 2px;
  opacity: 0.5;
  filter: brightness(0.8);
}

/* Number on secondary — dimmed but legible */
.map-table-num-dim { opacity: 0.55; color: #f0e0c8; }

/* Name pill on secondary — dimmed but legible */
.map-table-init-dim { opacity: 0.5; }

/* Bright master num when part of a join */
.map-table-num-master {
  color: #fff8ee;
  text-shadow: 0 0 8px rgba(240,224,200,0.6);
}

/* Join-pick mode chip states */
.map-table.join-pick-master {
  outline: 2.5px solid #38bdf8;
  outline-offset: 2px;
  opacity: 1;
}
.map-table.join-pick-selected {
  outline: 2.5px solid #34d399;
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(52,211,153,0.45);
  opacity: 1;
}
.map-table.join-pick-idle {
  opacity: 0.55;
  filter: saturate(0.5);
}

/* ── Join overlay banner ── */
#joinOverlay {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--dock-h, 56px) + 10px);
  z-index: 10100;               /* above dock (10101) — pointer-events:none so taps fall through */
  pointer-events: none;         /* taps fall through to map chips */
  display: flex;
  align-items: center;
  justify-content: center;
}
#joinOverlay:not([hidden]) { display: flex; }
#joinOverlay[hidden]       { display: none; }

#joinOverlayBanner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56,189,248,0.35);
  border-radius: 20px;
  padding: 10px 6px 10px 14px;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.4);
  max-width: calc(100vw - 32px);
}
.join-banner-icon {
  font-size: 20px !important;
  color: #38bdf8;
  flex-shrink: 0;
}
#joinOverlayLabel {
  flex: 1;
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}
#joinOverlayLabel strong { color: #e2e8f0; font-weight: 700; }

.join-banner-confirm {
  display: flex; align-items: center; gap: 4px;
  padding: 7px 14px;
  border-radius: 12px;
  border: none;
  background: #38bdf8;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, opacity 0.12s;
}
.join-banner-confirm .material-symbols-outlined { font-size: 16px !important; }
.join-banner-confirm:active { background: #0ea5e9; }
.join-banner-confirm:disabled { opacity: 0.35; pointer-events: none; }

.join-banner-cancel {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  margin-left: 4px;
  margin-right: 2px;
}
.join-banner-cancel .material-symbols-outlined { font-size: 16px !important; }
.join-banner-cancel:active { color: #e2e8f0; }

/* ── Pick-table overlay banner ─────────────────────────────────── */
#pickTableOverlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
#pickTableOverlay:not([hidden]) { display: flex; }
#pickTableOverlay[hidden]       { display: none; }

#pickTableBanner {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e3a5f;
  border-bottom: 1.5px solid #2563eb;
  padding: 11px 16px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(37,99,235,0.25);
}
.pick-banner-icon { font-size: 20px !important; color: #60a5fa; flex-shrink: 0; }
#pickTableLabel { flex: 1; color: #bfdbfe; font-size: 13px; line-height: 1.35; }
#pickTableLabel strong { color: #fff; font-weight: 700; }
.pick-banner-cancel {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 7px;
  border: 1.5px solid #2563eb;
  background: transparent;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pick-banner-cancel .material-symbols-outlined { font-size: 15px !important; }
.pick-banner-cancel:active { background: #1e40af; }
body.light-mode #pickTableBanner {
  background: #eff6ff;
  border-bottom-color: #3b82f6;
  color: #1d4ed8;
  box-shadow: 0 4px 18px rgba(37,99,235,0.12);
}
body.light-mode #pickTableLabel { color: #1e40af; }
body.light-mode #pickTableLabel strong { color: #1e3a8a; }
body.light-mode .pick-banner-cancel { border-color: #3b82f6; color: #2563eb; }

body.light-mode #joinOverlayBanner {
  background: rgba(255,255,255,0.95);
  border-color: rgba(2,132,199,0.25);
  box-shadow: 0 -2px 24px rgba(0,0,0,0.10), 0 4px 16px rgba(0,0,0,0.08);
}
body.light-mode #joinOverlayLabel { color: #64748b; }
body.light-mode #joinOverlayLabel strong { color: #0f172a; }
body.light-mode #joinOverlayBanner::after { background: #e2e8f0; }
body.light-mode .join-banner-cancel { color: #94a3b8; }
body.light-mode .join-banner-cancel:active { color: #64748b; }

/* ss-bjoin action button accent */
.ss-bjoin   .ss-action-icon { color: #38bdf8; }
.ss-bunjoin .ss-action-icon { color: var(--clr-walkin); }

.map-join-bridge { animation: bridgeFade 0.25s ease; }
@keyframes bridgeFade { from { opacity: 0; } to { opacity: 1; } }

/* Free tables banner — shown when ≥10 tables are free */
.free-sec-header:hover { background: rgba(255,255,255,0.03); }
.free-sec-header .section-header-left { display: flex; align-items: center; gap: 6px; }

.free-tables-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px 16px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(51, 65, 85, 0.4);
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}
.free-tables-banner .material-symbols-outlined {
  font-size: 16px;
  color: #22c55e;
}

/* ═══════════════════════════════════════
   PHONE / WHATSAPP SHEET
═══════════════════════════════════════ */

/* Name row — flex so pill sits inline with no extra height */
.dc-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.dc-name-row .dc-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

/* Phone pill — circular, teal, sits inline with name */
.dc-phone-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: none;
  background: rgba(6,182,212,0.1);
  color: rgba(6,182,212,0.5);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
  font-family: inherit;
  padding: 0;
}
.dc-phone-pill .material-symbols-outlined { font-size: 12px; }
.dc-phone-pill:active { background: rgba(6,182,212,0.3); }
body.light-mode .dc-phone-pill { background: rgba(6,182,212,0.12); color: #0891b2; }
body.light-mode .dc-phone-pill:active { background: rgba(6,182,212,0.25); }
.dc-notes-phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(6,182,212,0.1);
  color: rgba(6,182,212,0.55);
  text-decoration: none;
  margin-left: 3px;
  vertical-align: middle;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.dc-notes-phone-link .material-symbols-outlined { font-size: 11px; }
.dc-notes-phone-link:active { background: rgba(6,182,212,0.3); }
body.light-mode .dc-notes-phone-link { background: rgba(6,182,212,0.12); color: #0891b2; }
.dc-group-notify-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: none;
  background: rgba(139,92,246,0.1);
  color: rgba(139,92,246,0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
  font-family: inherit;
  padding: 0;
}
.dc-group-notify-btn .material-symbols-outlined { font-size: 12px; }
.dc-group-notify-btn:active { background: rgba(139,92,246,0.3); }
body.light-mode .dc-group-notify-btn { background: rgba(139,92,246,0.12); color: #7c3aed; }
body.light-mode .dc-group-notify-btn:active { background: rgba(139,92,246,0.25); }

/* Number picker pills */
.wa-number-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.wa-number-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #e2e8f0;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}
.wa-number-pill:active,
.wa-number-pill.selected { border-color: #22c55e; background: rgba(34,197,94,0.08); }
.wa-number-pill .material-symbols-outlined { font-size: 18px; color: #22c55e; flex-shrink: 0; }
.wa-number-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: normal.05em; color: #64748b; margin-left: auto; }
body.light-mode .wa-number-pill { border-color: #e2e8f0; color: #0f172a; }
body.light-mode .wa-number-pill:active,
body.light-mode .wa-number-pill.selected { border-color: #16a34a; background: rgba(22,163,74,0.07); }

/* Message action buttons */
.wa-actions { display: flex; flex-direction: column; gap: 8px; }
.wa-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #334155;
  background: transparent;
  color: #e2e8f0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s, background 0.15s;
}
.wa-action-btn:active { background: rgba(255,255,255,0.05); }
.wa-action-btn .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.wa-action-btn.wa-confirm  { border-color: rgba(34,197,94,0.4);  color: #86efac; }
.wa-action-btn.wa-cancel   { border-color: rgba(239,68,68,0.4);  color: #fca5a5; }
.wa-action-btn.wa-reschedule { border-color: var(--clr-res-border); color: var(--clr-res-text); }
.wa-action-btn.wa-add-phone  { border-color: rgba(148,163,184,0.4); color: #94a3b8; }
.wa-action-btn.wa-call-wa    { border-color: rgba(100,116,139,0.4); color: #94a3b8; }
.wa-action-label { display: flex; flex-direction: column; gap: 2px; }
.wa-action-sub { font-size: 11px; opacity: 0.65; font-weight: 400; }
body.light-mode .wa-action-btn { color: #0f172a; border-color: #e2e8f0; }
body.light-mode .wa-action-btn.wa-confirm   { border-color: rgba(22,163,74,0.4);  color: #15803d; }
body.light-mode .wa-action-btn.wa-cancel    { border-color: rgba(220,38,38,0.4);  color: #b91c1c; }
body.light-mode .wa-action-btn.wa-reschedule { border-color: var(--clr-res-border); color: var(--clr-res-text); }

/* Add phone inline input */
.wa-add-phone-wrap { display: flex; gap: 8px; margin-bottom: 14px; }
.wa-add-phone-wrap .ee-input { flex: 1; }

/* Confirm send preview */
.wa-preview {
  background: rgba(30,41,59,0.7);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
body.light-mode .wa-preview { background: #f1f5f9; border-color: #e2e8f0; color: #334155; }
.wa-send-row { display: flex; gap: 8px; justify-content: flex-end; }


/* ═══════════════════════════════════════
   CONTACT PICKER SHEET
═══════════════════════════════════════ */

.cp-scrim {
  display: none;
}

body.cp-body-lock {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
  top: var(--cp-lock-top, 0px);
}

/* ── Contact picker: full-screen slide-up overlay ── */
.cp-sheet {
  position: fixed;
  inset: 0;
  transform: translateY(100%);
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  margin-inline: 0;
  padding-top: max(env(safe-area-inset-top, 0px), 0px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  background: var(--clr-bg-base);
  border-radius: 0;
  z-index: 10060;
  display: flex; flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.32,0.72,0,1);
  will-change: transform;
  overflow: hidden;
  border: none;
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
}
.cp-sheet.show {
  transform: translateY(0);
  pointer-events: auto;
}

/* customer/contact picker is full-screen; no drag handle at top */
.cp-handle-row {
  display: none;
}
.cp-handle {
  display: none;
}

.cp-search-row {
  padding: 6px 12px 8px;
  flex-shrink: 0;
}
.cp-search-input {
  width: 100%;
  box-sizing: border-box;
}
.cp-handle { display: block; }

/* Full-screen nav bar: Cancel — title — close btn */
.cp-header {
  display: flex;
  align-items: center;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
  background: var(--clr-bg-surface);
  gap: 8px;
}
.cp-header .modal-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--clr-text);
}

.cp-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex: 1;
  padding: 0 0 calc(var(--dock-h, 72px) + max(env(safe-area-inset-bottom, 0px), 8px));
}

.cp-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: normal.8px;
  text-transform: uppercase;
  color: var(--clr-text-dim);
  padding: 8px 8px 4px;
}

.cp-contact {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #334155;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}
.cp-contact:active,
.cp-contact.cp-pressing { background: #0f172a; }
body.light-mode .cp-contact { border-bottom-color: #f1f5f9; }
body.light-mode .cp-contact:active,
body.light-mode .cp-contact.cp-pressing { background: #f8fafc; }

.cp-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  letter-spacing: normal.5px;
}
.cp-contact-info { flex: 1; min-width: 0; }
.cp-contact-name {
  font-size: 15px; font-weight: 600;
  color: var(--clr-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-contact-sub {
  font-size: 13px; color: #64748b;
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-vip-badge {
  font-size: 10px; font-weight: 700; letter-spacing: normal.5px;
  color: var(--clr-sky);
  background: rgba(56,189,248,0.1);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
}

.cp-reserve-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  background: #1e3a5f;
  color: #60a5fa;
  border: 1px solid #2563eb44;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.cp-reserve-btn .material-symbols-outlined { font-size: 15px; }
.cp-reserve-btn:active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
body.light-mode .cp-reserve-btn { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
body.light-mode .cp-reserve-btn:active { background: #2563eb; color: #fff; }

.cp-add-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  margin-top: 4px;
}
.cp-add-row:active { background: rgba(56,189,248,0.08); }
.cp-add-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(30,64,175,0.25);
  color: var(--clr-sky);
  border: 1.5px dashed rgba(56,189,248,0.3);
}
.cp-add-avatar .material-symbols-outlined { font-size: 18px; }
.cp-add-name { font-size: 14px; font-weight: 600; color: var(--clr-sky); }
.cp-add-sub  { font-size: 12px; color: var(--clr-text-muted); margin-top: 1px; }

.cp-empty {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 16px;
  color: var(--clr-text-dim);
}
.cp-empty .material-symbols-outlined { display: none; }
.cp-empty-text { font-size: 13px; opacity: 0.6; }

.cp-highlight {
  background: rgba(56,189,248,0.18);
  color: var(--clr-sky);
  border-radius: 3px;
  padding: 0 1px;
}

/* action rows inside contact picker sheet (reserve-new, add-contact, import) */
.cp-action-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.cp-action-row:active { background: rgba(56,189,248,0.07); }
body.light-mode .cp-action-row:active { background: rgba(37,99,235,0.06); }

/* ── Dock meta-pills: tappable ── */
.dock-pill-meta {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: none;
  font-family: inherit;
  transition: opacity 0.12s;
  padding: 3px 10px;
  font-size: 14px;
  gap: 4px;
  border-radius: 7px;
}
.dock-pill-meta .material-symbols-outlined { font-size: 15px; }
.dock-pill-meta:active { opacity: 0.65; }

/* Locked dock: pills row sits below the input ── */
.dock-wrap.dock-active {
  flex-wrap: wrap;
  row-gap: 0;
}
.dock-wrap .search-icon { flex-shrink: 0; }

/* Hidden siblings inside dock-wrap must be fully removed from flex layout */
#dockSearch[hidden],
#dockFooter[hidden] { display: none !important; }
.dock-footer-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 2px;
  background: rgba(15, 23, 42, 0.12);
  border-top: 1px solid rgba(148,163,184,0.14);
}
body.light-mode .dock-footer-inner { background: rgba(248,250,252,0.72); border-top-color: #bfdbfe; }
.dock-pills {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* Party quick pills — allow wrapping in dock popover */
#_qrPop .party-quick-pills { flex-wrap: wrap; }

/* ── iOS keyboard: keep header + search pinned when keyboard is open ──────
   visualViewport shrinks when the SW keyboard opens; sticky becomes
   scrollable. Switch both bars to fixed and compensate with padding.    */
html.kb-open .header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100 !important;
}
html.kb-open .dock-wrap {
  /* position/bottom already fixed in base — don't override, let JS set bottom offset */
  z-index: 10101 !important;
  /* Remove safe-area bottom padding when keyboard is open — keyboard is flush above bar */
  padding-bottom: 8px !important;
}

/* ═══════════════════════
   CUSTOM CALENDAR PICKER
═══════════════════════ */
.cal-modal-content {
  border-radius: 16px;
  padding: 0 0 8px;
  max-width: 320px;
  width: 100%;
  margin: auto;
}
#dateModal {
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10300;
}
#dateModal .modal-content {
  border-radius: 16px;
  max-width: 320px;
  width: 100%;
  animation: calPop 0.18s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes calPop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.cal-header {
  display: flex;
  align-items: center;
  padding: 14px 12px 6px;
  gap: 4px;
}
.cal-nav-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  border-radius: 50%; cursor: pointer; color: #60a5fa;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.cal-nav-btn:active { background: rgba(96,165,250,0.15); }
.cal-nav-btn .material-symbols-outlined { font-size: 20px; }
.cal-month-label {
  font-size: 17px; font-weight: 700; color: #e2e8f0;
  background: none; border: none; cursor: default; padding: 0;
  flex: 1; text-align: center; letter-spacing: -0.01em;
}
body.light-mode .cal-month-label { color: #0f172a; }
body.light-mode .cal-nav-btn { color: #2563eb; }
.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px 4px;
}
.cal-dow-row span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  padding: 3px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px;
  gap: 2px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 400;
  color: #e2e8f0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.cal-day:active { background: rgba(148,163,184,0.15); }
.cal-day.cal-today {
  color: #f59e0b;
  font-weight: 700;
}
.cal-day.cal-today::after { display: none; }
.cal-day.cal-selected { background: #2563eb; color: #fff; font-weight: 600; }
.cal-day.cal-selected.cal-today { background: #2563eb; color: #fff; }
.cal-day.cal-selected.cal-today::after { display: none; }
.cal-day.cal-other-month { color: #334155; }
.cal-day.cal-past { color: #475569; cursor: default; opacity: 0.65; }
.cal-day.cal-past:active { background: transparent; }
.cal-day.cal-past-allowed { color: #94a3b8; cursor: pointer; }
.cal-day.cal-past-allowed:active { background: rgba(148,163,184,0.15); }
body.light-mode .cal-day { color: #0f172a; }
body.light-mode .cal-day.cal-today { color: #d97706; }
body.light-mode .cal-day.cal-today::after { display: none; }
body.light-mode .cal-day.cal-other-month { color: #cbd5e1; }
body.light-mode .cal-day.cal-past { color: #94a3b8; }
body.light-mode .cal-day.cal-past-allowed { color: #64748b; }
.cal-footer {
  display: flex;
  gap: 8px;
  padding: 8px 12px 4px;
}
.cal-today-btn {
  flex: 1; padding: 10px;
  border-radius: 10px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.35);
  color: #f59e0b; font-size: 15px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cal-today-btn:active { background: rgba(245,158,11,0.22); }
.cal-cancel-btn {
  flex: 1; padding: 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(148,163,184,0.15);
  color: #64748b; font-size: 15px; font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cal-cancel-btn:active { background: rgba(148,163,184,0.1); }
body.light-mode .cal-today-btn { color: #d97706; background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.3); }
body.light-mode .cal-today-btn:active { background: rgba(217,119,6,0.16); }
body.light-mode .cal-cancel-btn { color: #475569; }


/* Suppress iOS native date-picker chrome on reserveDate (handled by custom calendar) */
.reserve-date-input::-webkit-date-and-time-value { text-align: left; }
.reserve-date-input::-webkit-calendar-picker-indicator { display: none; opacity: 0; }

.reserve-notes-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.reserve-notes-header .reserve-field-label { margin-bottom: 0; }
#reserveAuditRow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.audit-pill {
  display: inline-flex !important; align-items: center; gap: 3px;
  background: rgba(56,189,248,.1) !important;
  border: 1px solid rgba(56,189,248,.25) !important;
  border-radius: 20px !important;
  padding: 2px 7px 2px 5px !important;
  white-space: nowrap;
  line-height: 1;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: normal;
}
.audit-pill-label { color: #38bdf8 !important; font-size: 9px !important; font-weight: 700 !important; text-transform: lowercase !important; letter-spacing: normal; }
.audit-pill-ini { font-size: 10px !important; font-weight: 700 !important; color: #7dd3fc !important; letter-spacing: normal; text-transform: none !important; }
.audit-pill-dt { font-size: 9px !important; font-weight: 500 !important; color: #64748b !important; letter-spacing: normal; }
body.light-mode .audit-pill { background: rgba(14,165,233,.06); border-color: rgba(14,165,233,.2); }
body.light-mode .audit-pill-label { color: #0ea5e9; }
body.light-mode .audit-pill-ini { color: #0284c7; }
body.light-mode .audit-pill-dt { color: #64748b; }

.party-size-input::-webkit-inner-spin-button,
.party-size-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ── iOS auto-zoom fix ────────────────────────────────────────────────────────
   iOS Safari zooms the viewport when a focused input has font-size < 16px.
   maximum-scale=1 in the viewport meta is ignored by iOS 10+ for accessibility.
   Bumping to 16px on focus (touch devices only) prevents the jump entirely.
   The display size at rest is unchanged — only the active/typing state is affected. */
@media (pointer: coarse) {
  input:focus,
  textarea:focus,
  select:focus {
    font-size: 16px !important;
  }
}
