.dashboard {
  min-height: 100vh;
  background: var(--bg);
  box-sizing: border-box;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px 18px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 0;
}

.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--brand-900);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--text-subtle);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-brand h1 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.sidebar-brand p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.sidebar-date-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  text-align: left;
}

.sidebar-date-card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}

.sidebar-date-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand-700);
}

.sidebar-date-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-date-label {
  color: var(--text-subtle);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.date-bar-text {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar-date-chevron {
  color: var(--text-subtle);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}

.main-nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.main-nav-tab svg {
  flex-shrink: 0;
}

.main-nav-tab:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.main-nav-tab.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
}

.icon-btn:hover,
.logout-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.icon-btn .kbd {
  display: inline-block;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  color: var(--text-subtle);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dashboard-body {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dashboard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 12px;
}

.dashboard-topbar-main {
  min-width: 0;
}

.dashboard-view-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--text-subtle);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-view-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.dashboard-view-description {
  margin: 6px 0 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.dashboard-topbar-side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dashboard-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 28px 28px;
}

.main-section {
  display: none;
  min-height: 0;
}

.main-section.active {
  display: block;
}

.floorplan-section.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 132px);
}

#floorplan-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard--floorplan .dashboard-topbar {
  align-items: center;
  gap: 14px;
  padding: 18px 18px 10px;
}

.dashboard--floorplan .sidebar-date-card {
  display: none;
}

.dashboard--floorplan .dashboard-topbar-side {
  padding-top: 0;
}

.dashboard--floorplan .dashboard-content {
  padding: 0 18px 18px;
  overflow: hidden;
}

.dashboard--floorplan .dashboard-view-description {
  margin-top: 4px;
  max-width: 760px;
}

.dashboard--floorplan .floorplan-section.active {
  min-height: 0;
  height: max(640px, calc(100vh - 140px));
}

.dashboard--floorplan #floorplan-container {
  height: 100%;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
}

.tables-section,
.guest-form-section,
.timeline-section,
.search-section,
.reports-section,
.logs-section,
.guests-section,
.waitlist-section {
  min-width: 0;
}

.loading {
  text-align: center;
  padding: 72px 20px;
  color: var(--text-muted);
  font-size: 16px;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  display: none;
}

/* Menu Toggle Button styling */
.menu-toggle {
  display: none; /* Hidden on desktop */
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    flex-shrink: 0;
    transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  }
  
  .menu-toggle:hover {
    background: var(--surface-3);
    border-color: var(--border-strong);
  }

  .dashboard-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh !important;
    width: 260px !important;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform var(--t-med) var(--ease);
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4) !important;
    background: #000000 !important;
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .dashboard-topbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding: 16px 20px !important;
  }

  .dashboard-topbar-main {
    flex: 1;
    min-width: 0;
  }

  /* Hide subtitle on mobile topbar to save vertical space */
  .dashboard-view-description {
    display: none !important;
  }
  
  .dashboard-view-eyebrow {
    margin-bottom: 2px !important;
  }

  .dashboard-topbar-side {
    padding-top: 0 !important;
  }

  .floorplan-section.active {
    min-height: 500px;
  }

  .dashboard--floorplan .floorplan-section.active {
    height: max(500px, calc(100vh - 130px)) !important;
  }
}

@media (max-width: 768px) {
  .dashboard-topbar {
    padding: 12px 16px !important;
    gap: 12px !important;
  }

  .dashboard-view-title {
    font-size: 1.4rem !important;
  }

  .dashboard-content {
    padding: 0 12px 16px !important;
  }
}

/* ━━━━━━━ SevenRooms sidebar — dark rail ━━━━━━━ */
.dashboard-sidebar {
  --sr-bg-rail: #1B1F2A;
  --sr-bg-rail-hover: #262B38;
  --sr-bg-rail-active: #0E1118;
  --sr-rail-text: #E8EAEE;
  --sr-rail-text-2: #9CA3B0;
  --sr-rail-border: rgba(255, 255, 255, 0.08);
  --sr-accent: #1F6FEB;

  background: var(--sr-bg-rail);
  color: var(--sr-rail-text);
  border-right: 1px solid var(--sr-rail-border);
  width: 240px;
  flex-shrink: 0;
  /* keep existing display/flex/padding from earlier rules */
}

.dashboard-sidebar .sidebar-brand {
  background: transparent;
  border-bottom: 1px solid var(--sr-rail-border);
  color: var(--sr-rail-text);
}

.dashboard-sidebar .sidebar-brand-mark {
  background: var(--sr-accent);
  color: #FFFFFF;
}

.dashboard-sidebar .sidebar-eyebrow {
  color: var(--sr-rail-text-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 10px;
}

.dashboard-sidebar .sidebar-brand h1 {
  color: var(--sr-rail-text);
}

.dashboard-sidebar .sidebar-brand p {
  color: var(--sr-rail-text-2);
}

.dashboard-sidebar .sidebar-date-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sr-rail-border);
  color: var(--sr-rail-text);
}
.dashboard-sidebar .sidebar-date-card:hover {
  background: var(--sr-bg-rail-hover);
  border-color: rgba(255, 255, 255, 0.14);
}

.dashboard-sidebar .sidebar-date-icon {
  color: var(--sr-accent);
}

.dashboard-sidebar .sidebar-date-label {
  color: var(--sr-rail-text-2);
}

.dashboard-sidebar .sidebar-date-chevron {
  color: var(--sr-rail-text-2);
}

.dashboard-sidebar .sidebar-nav button,
.dashboard-sidebar .sidebar-nav a {
  background: transparent;
  color: var(--sr-rail-text-2);
  border: none;
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 600;
  font-size: 13px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.dashboard-sidebar .sidebar-nav button:hover,
.dashboard-sidebar .sidebar-nav a:hover {
  background: var(--sr-bg-rail-hover);
  color: var(--sr-rail-text);
}

.dashboard-sidebar .sidebar-nav .sidebar-nav-active,
.dashboard-sidebar .sidebar-nav .active,
.dashboard-sidebar .sidebar-nav button.active,
.dashboard-sidebar .sidebar-nav a.active,
.dashboard-sidebar .sidebar-nav button[aria-current="page"],
.dashboard-sidebar .sidebar-nav a[aria-current="page"] {
  background: var(--sr-bg-rail-active);
  color: var(--sr-rail-text);
  box-shadow: inset 3px 0 0 var(--sr-accent);
}

.dashboard-sidebar .sidebar-footer {
  background: transparent;
  border-top: 1px solid var(--sr-rail-border);
  color: var(--sr-rail-text-2);
}

.dashboard-sidebar .sidebar-footer button,
.dashboard-sidebar .sidebar-footer a {
  background: transparent;
  color: var(--sr-rail-text-2);
  border: none;
  cursor: pointer;
}
.dashboard-sidebar .sidebar-footer button:hover,
.dashboard-sidebar .sidebar-footer a:hover {
  color: var(--sr-rail-text);
}


/* ════════════════════════════════════════════════════════════ */
/* SR Tablet direction — dark dashboard chrome (sidebar already  */
/* dark via prior override; this dims the topbar + banner +      */
/* overall app surface to match the black floor canvas).         */
/* ════════════════════════════════════════════════════════════ */

.dashboard {
  background: #0A0A0A;
  color: #FFFFFF;
}

.dashboard-shell {
  background: #0A0A0A;
}

.dashboard-content {
  background: #0A0A0A;
  color: #FFFFFF;
}

/* Top banner above the floor (LIVE SERVICE / Floor Plan / Manage tables...) */
.dashboard-topbar,
.dashboard-topbar-main,
.dashboard-topbar-side {
  background: #0A0A0A;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dashboard-topbar h1,
.dashboard-topbar h2,
.dashboard-topbar .banner-title,
.dashboard-topbar [class*="title"] {
  color: #FFFFFF;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
}

.dashboard-topbar p,
.dashboard-topbar .banner-subtitle,
.dashboard-topbar [class*="subtitle"],
.dashboard-topbar [class*="eyebrow"] {
  color: #B4BAC7;
}

/* "LIGHT WORKSPACE" toggle pill in the top-right of the banner */
.dashboard-topbar [class*="workspace"],
.dashboard-topbar button[class*="theme"] {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: #B4BAC7;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* Sidebar — ensure the rail matches the new app black, not surface gray */
.dashboard-sidebar {
  background: #000000;
  border-right: 1px solid rgba(255,255,255,0.08);
}

/* Override theme.css surface variable on dashboard surfaces only */
.dashboard,
.dashboard *,
.dashboard-shell,
.dashboard-content {
  --bg: #0A0A0A;
  --surface: #14161B;
  --border: rgba(255,255,255,0.08);
  --text: #FFFFFF;
  --text-muted: #B4BAC7;
}

/* Quick search trigger in the sidebar footer */
.dashboard-sidebar .icon-btn,
.dashboard-sidebar .sidebar-footer .icon-btn {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  color: #B4BAC7 !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font: 500 12px/1 var(--srt-font, system-ui) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.dashboard-sidebar .icon-btn:hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.16) !important;
  color: #FFFFFF !important;
}
.dashboard-sidebar .icon-btn svg {
  color: #6E7480;
  flex-shrink: 0;
}
.dashboard-sidebar .icon-btn:hover svg {
  color: #B4BAC7;
}
.dashboard-sidebar .icon-btn .kbd {
  margin-left: auto !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  background: rgba(255,255,255,0.04) !important;
  color: #6E7480 !important;
  font: 600 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════════════════════════ */
/* LIGHT THEME (default) — neutralises the SR-tablet dark chrome.  */
/* The dark chrome above re-binds --bg/--surface/--text to dark    */
/* on `.dashboard *`; here we re-bind them light under            */
/* [data-theme="light"], which re-lights every component that uses */
/* those tokens, then fix the literal-dark surfaces + rail tokens. */
/* Dark chrome is preserved untouched under [data-theme="dark"].   */
/* ════════════════════════════════════════════════════════════ */
[data-theme="light"] .dashboard,
[data-theme="light"] .dashboard *,
[data-theme="light"] .dashboard-shell,
[data-theme="light"] .dashboard-content {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --surface-3: #F1F5F9;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #475569;
}
[data-theme="light"] .dashboard,
[data-theme="light"] .dashboard-shell,
[data-theme="light"] .dashboard-content {
  background: #F8FAFC;
  color: #0F172A;
}
[data-theme="light"] .dashboard-topbar,
[data-theme="light"] .dashboard-topbar-main,
[data-theme="light"] .dashboard-topbar-side {
  background: #FFFFFF;
  color: #0F172A;
  border-bottom: 1px solid #E2E8F0;
}
[data-theme="light"] .dashboard-topbar h1,
[data-theme="light"] .dashboard-topbar h2,
[data-theme="light"] .dashboard-topbar .banner-title,
[data-theme="light"] .dashboard-topbar [class*="title"] { color: #0F172A; }
[data-theme="light"] .dashboard-topbar p,
[data-theme="light"] .dashboard-topbar .banner-subtitle,
[data-theme="light"] .dashboard-topbar [class*="subtitle"],
[data-theme="light"] .dashboard-topbar [class*="eyebrow"] { color: #64748B; }

/* Sidebar rail — light */
[data-theme="light"] .dashboard-sidebar {
  --sr-bg-rail: #FFFFFF;
  --sr-bg-rail-hover: #F1F5F9;
  --sr-bg-rail-active: #EEF2FF;
  --sr-rail-text: #0F172A;
  --sr-rail-text-2: #64748B;
  --sr-rail-border: #E2E8F0;
  --sr-accent: #1F6FEB;
  background: #FFFFFF;
  border-right: 1px solid #E2E8F0;
}
[data-theme="light"] .dashboard-sidebar .icon-btn,
[data-theme="light"] .dashboard-sidebar .sidebar-footer .icon-btn {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #475569 !important;
}
[data-theme="light"] .dashboard-sidebar .icon-btn:hover {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}
[data-theme="light"] .dashboard-sidebar .icon-btn svg { color: #94A3B8; }
[data-theme="light"] .dashboard-sidebar .icon-btn:hover svg { color: #475569; }
[data-theme="light"] .dashboard-sidebar .icon-btn .kbd {
  border: 1px solid #E2E8F0 !important;
  background: #F1F5F9 !important;
  color: #64748B !important;
}

/* ── Theme switcher (segmented control) in the sidebar footer ── */
.theme-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--sr-bg-rail-hover, rgba(255,255,255,0.06));
  border: 1px solid var(--sr-rail-border, rgba(255,255,255,0.10));
}
.theme-switch-opt {
  flex: 1;
  padding: 6px 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sr-rail-text-2, #9CA3B0);
  font: 700 11px/1 var(--srt-font, system-ui);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.theme-switch-opt:hover { color: var(--sr-rail-text, #E8EAEE); }
.theme-switch-opt.active {
  background: var(--sr-accent, #1F6FEB);
  color: #FFFFFF;
}
