/* ─────────────────────────────────────────────
   Foyer Web App — style.css  (REV 4.0 "Lounge")
   Matches the iOS app: frosted cards, soft green glow, pill controls.
   Same class names as before, so app.js markup is unchanged.
   · Geist heavy = display (titles, big numbers)
   · Geist = UI text and labels · Geist Mono = member numbers only
   · Green reserved for meaning: checked-in, live, active
   Fonts are already loaded by index.html.
   ───────────────────────────────────────────── */

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

button, a, input, select, textarea, label,
.nav-item, .list-row, .checkin-btn, .btn,
.price-preset, .day-btn, .pm-preset {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-item, .list-row, .checkin-btn, .btn,
.sidebar-nav, .card-header {
  -webkit-user-select: none;
  user-select: none;
}

:root {
  /* type */
  --sans:    'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'Geist Mono', ui-monospace, 'SF Mono', monospace;
  /* surfaces — same neutrals as the iOS DesignSystem */
  --bg:        #0A0A0A;
  --bg-2:      #0E0E0E;
  --bg-3:      #161616;
  --surface:   #141414;
  --surface2:  #1B1B1B;
  --surface3:  #242424;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --border3:   rgba(255,255,255,0.20);
  /* Lounge: frosted glass, glow, radii */
  --glass:       rgba(255,255,255,0.045);
  --glass-2:     rgba(255,255,255,0.07);
  --glass-line:  rgba(255,255,255,0.07);
  --glow:        rgba(0,232,122,0.16);
  --glow-soft:   rgba(0,232,122,0.07);
  --shadow-lg:   0 30px 70px rgba(0,0,0,0.55);
  --r-card: 22px;
  --r-row:  18px;
  --r-pill: 999px;
  --pill-on:     #FFFFFF;
  --pill-on-ink: #000000;
  /* accent */
  --accent:      #00E87A;
  --accent-dim:  rgba(0,232,122,0.08);
  --accent-mid:  rgba(0,232,122,0.16);
  --accent-line: rgba(0,232,122,0.35);
  --on-accent:   #04140B;
  --success:     #00E87A;
  --success-dim: rgba(0,232,122,0.10);
  --warning:       #FFB800;
  --warning-dim:   rgba(255,184,0,0.10);
  --warning-faint: rgba(255,184,0,0.05);
  --warning-line:  rgba(255,184,0,0.30);
  --danger:        #FF4D4D;
  --danger-dim:    rgba(255,77,77,0.10);
  --danger-faint:  rgba(255,77,77,0.05);
  --on-success:    #04140B;
  /* entry-type hues */
  --type-staff: #4D9FFF; --type-staff-bg: rgba(77,159,255,0.10);
  --type-dj:    #B47AFF; --type-dj-bg:    rgba(180,122,255,0.10);
  --type-booth: #F472B6; --type-booth-bg: rgba(244,114,182,0.10);
  --type-booth-line: rgba(244,114,182,0.35);
  --type-booth-ring: rgba(244,114,182,0.55);
  /* text */
  --text:      #FFFFFF;
  --text-soft: #D0D0D0;
  --muted:     #8E8E8E;
  --muted2:    #666666;
  /* layout */
  --sidebar-w:   264px;
  --content-max: 920px;
  --hover:     rgba(255,255,255,0.03);
  --highlight: rgba(0,232,122,0.07);
  --overlay:   #0A0A0A;
  color-scheme: dark;
}

/* Light theme: chrome accent goes near-black; green stays semantic. */
:root[data-theme="light"] {
  --bg:        #F4F5F4;
  --bg-2:      #FAFBFA;
  --bg-3:      #EFF1EF;
  --surface:   #F7F8F7;
  --surface2:  #EFF1EF;
  --surface3:  #E3E6E3;
  --border:    rgba(0,0,0,0.08);
  --border2:   rgba(0,0,0,0.16);
  --border3:   rgba(0,0,0,0.26);
  --accent:      #111311;
  --accent-dim:  rgba(0,0,0,0.05);
  --accent-mid:  rgba(0,0,0,0.10);
  --accent-line: rgba(0,0,0,0.30);
  --on-accent:   #FFFFFF;
  --success:     #0B7A45;
  --success-dim: rgba(11,122,69,0.10);
  --warning:       #A66E00;
  --warning-dim:   rgba(166,110,0,0.10);
  --warning-faint: rgba(166,110,0,0.06);
  --warning-line:  rgba(166,110,0,0.45);
  --danger:        #D62828;
  --danger-dim:    rgba(214,40,40,0.10);
  --danger-faint:  rgba(214,40,40,0.05);
  --on-success:    #FFFFFF;
  --type-staff: #1D4ED8; --type-staff-bg: rgba(29,78,216,0.08);
  --type-dj:    #7E22CE; --type-dj-bg:    rgba(126,34,206,0.08);
  --type-booth: #BE185D; --type-booth-bg: rgba(190,24,93,0.08);
  --type-booth-line: rgba(190,24,93,0.40);
  --type-booth-ring: rgba(190,24,93,0.55);
  --text:      #0B0D0B;
  --text-soft: #3A3F3A;
  --muted:     #4E554E;
  --muted2:    #6E756E;
  --hover:     rgba(0,0,0,0.03);
  --highlight: rgba(11,122,69,0.08);
  --overlay:   #FFFFFF;
  --glass:       rgba(255,255,255,0.75);
  --glass-2:     rgba(0,0,0,0.05);
  --glass-line:  rgba(0,0,0,0.08);
  --glow:        rgba(11,122,69,0.12);
  --glow-soft:   rgba(11,122,69,0.05);
  --shadow-lg:   0 30px 70px rgba(0,0,0,0.18);
  --pill-on:     #0B0D0B;
  --pill-on-ink: #FFFFFF;
  color-scheme: light;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(0,232,122,0.25); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

/* ── Micro-label: the mono uppercase treatment used everywhere ── */
.section-label, .form-label, .field label,
.stat-chip-label, .nav-section-label, .sidebar-role,
.auth-stat-label, .cal-day-header, .day-detail-header {
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   AUTH SCREEN — one centered column: logo, card, footer
   ══════════════════════════════════════════════ */
#auth-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; width: 100vw;
  position: fixed; inset: 0; overflow-y: auto;
  padding: 48px 20px;
  background:
    radial-gradient(55% 45% at 50% -10%, var(--glow-soft), transparent 70%),
    var(--bg);
}
.auth-shell { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-logo .word { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }

.auth-card {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px -32px rgba(0,0,0,0.55);
}
.auth-form-title { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 6px; }
.auth-form-sub { font-size: 14px; color: var(--muted); margin: 0 0 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; text-transform: none; letter-spacing: 0; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 12px; color: var(--text);
  padding: 13px 14px; font-size: 15px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow-soft); }
.field input::placeholder { color: var(--muted2); }

.btn-full {
  width: 100%; background: var(--accent); color: var(--on-accent);
  border: none; border-radius: 12px;
  padding: 14px; font-size: 15px; font-weight: 700;
  margin-top: 8px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-full:hover { opacity: 0.9; }
.btn-full:active { transform: scale(0.99); }
.btn-full:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-full:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.auth-error {
  font-size: 13px; color: var(--danger);
  margin-top: 14px; text-align: center;
  padding: 10px 14px; background: var(--danger-faint);
  border-radius: 12px; border: 1px solid var(--danger-dim);
}
.auth-help { font-size: 13px; color: var(--muted); text-align: center; margin: 20px 0 0; }
.auth-footer {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 40px; font-size: 12px; color: var(--muted2);
}
.auth-footer a { color: var(--muted2); }
.auth-footer a:hover { color: var(--text); opacity: 1; }
#version-label:empty { display: none; }

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px 22px; }
}

/* ══════════════════════════════════════════════
   APP SHELL + SIDEBAR
   ══════════════════════════════════════════════ */
#app-shell {
  display: none; height: 100vh; flex-direction: row;
  background:
    radial-gradient(70% 55% at 88% -12%, var(--glow), transparent 62%),
    radial-gradient(50% 40% at 30% 110%, var(--glow-soft), transparent 70%),
    var(--bg);
}
#app-shell.visible { display: flex; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-line);
  display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.foyer-mark + .word,
.sidebar-logo .word {
  font-family: var(--display);
  font-size: 13px; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text);
}
/* Venue switcher pill */
.sidebar-venue-wrap {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.sidebar-venue-wrap:hover { border-color: var(--border2); }
.sidebar-venue-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0,232,122,0.6);
  animation: foyer-pulse 2.4s infinite;
}
@keyframes foyer-pulse { 0%,100% { opacity:1; } 50% { opacity:0.35; } }
.sidebar-venue {
  font-size: 13px; font-weight: 600; color: var(--text); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-venue-caret { font-family: var(--mono); }
.sidebar-role {
  font-size: 10px; color: var(--warning);
  letter-spacing: 0.12em;
  margin-top: 8px; padding-left: 2px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.nav-section-label {
  font-size: 10.5px; color: var(--muted2);
  letter-spacing: 0.12em;
  padding: 16px 12px 5px;
}
.nav-section-label:first-child { padding-top: 8px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--muted);
  border-radius: 14px; margin-bottom: 2px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item.active {
  color: var(--text);
  background: var(--glass-2);
  font-weight: 700;
}
/* Icons sit in a small tile, like the iOS LoungeIcon; the active one glows */
.nav-icon {
  font-size: 13px; width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: inherit;
  background: var(--glass);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.nav-item.active .nav-icon {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 16px var(--glow);
}
.nav-icon svg { display: block; margin: 0 auto; }
.nav-badge {
  margin-left: auto;
  background: var(--warning); color: #000;
  font-size: 10.5px; font-weight: 800;
  padding: 2px 8px; border-radius: var(--r-pill);
  min-width: 20px; text-align: center;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--glass-line);
}
.sidebar-user {
  font-size: 11.5px; color: var(--muted2);
  margin-bottom: 8px; padding: 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.theme-toggle, .btn-logout {
  width: 100%; background: var(--glass);
  border: 1px solid var(--glass-line);
  color: var(--muted); border-radius: var(--r-pill);
  padding: 9px; font-size: 12.5px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle { margin-bottom: 7px; }
.theme-toggle:hover {
  border-color: var(--accent-line); color: var(--accent);
  background: var(--accent-dim);
}
.theme-toggle-icon { font-size: 13px; line-height: 1; }
.btn-logout:hover {
  border-color: var(--danger-dim); color: var(--danger);
  background: var(--danger-faint);
}

/* ══════════════════════════════════════════════
   MAIN + PAGES
   ══════════════════════════════════════════════ */
.main { flex: 1; overflow-y: auto; background: transparent; display: flex; flex-direction: column; }

.page { display: none; padding: 40px 44px 72px; min-height: 100%; }
.page.active { display: block; }
.page-inner { max-width: var(--content-max); margin: 0 auto; width: 100%; }

.page-header {
  margin-bottom: 26px;
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-header-left { flex: 1; min-width: 0; }
.page-title {
  font-family: var(--display);
  font-size: 34px; font-weight: 800;
  letter-spacing: -0.04em; line-height: 1;
}
.page-sub {
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-top: 8px; max-width: 60ch;
}

/* ── Cards ── */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card); overflow: hidden;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border2); }
.card + .card { margin-top: 10px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-line);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.card-body { padding: 18px; }

/* ── Stat chips ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 22px;
}
.stat-chip {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--glass-line);
  border-radius: 20px; padding: 18px 20px;
  transition: border-color 0.2s;
}
.stat-chip:hover { border-color: var(--border2); }
.stat-chip-val {
  font-family: var(--display);
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.045em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-chip-val.text-accent  { text-shadow: 0 0 22px var(--glow); }
.stat-chip-label {
  font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.1em; margin-top: 8px;
}

/* ── List rows ── */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--glass-line);
  min-height: 58px;
  transition: background 0.12s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--hover); }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 15px; font-weight: 700; flex-shrink: 0;
  transition: box-shadow 0.2s;
}
/* A green avatar means checked in — give it the iOS glow */
.avatar[style*="--success"] { box-shadow: 0 0 14px var(--glow); }
.row-name { font-size: 15.5px; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.row-meta {
  font-size: 12px; color: var(--muted);
  margin-top: 3px; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.row-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Badges ── */
.badge {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 2px 9px; border-radius: var(--r-pill);
  display: inline-block; white-space: nowrap;
}
.badge-green { background: var(--success-dim); color: var(--success); }
.badge-red   { background: var(--danger-dim); color: var(--danger); }
.badge-amber { background: var(--warning-dim); color: var(--warning); }
.badge-muted { background: var(--glass-2); color: var(--muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: var(--r-pill);
  padding: 11px 20px; font-size: 13px; font-weight: 700;
  transition: opacity 0.15s, transform 0.1s, background 0.15s, border-color 0.15s;
  font-family: inherit; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-accent {
  background: var(--accent); color: var(--on-accent);
  font-weight: 800;
  box-shadow: 0 0 22px var(--glow);
}
.btn-accent:hover { opacity: 0.88; }
.btn-ghost {
  background: var(--glass-2); color: var(--text);
  border: 1px solid var(--glass-line);
}
.btn-ghost:hover { background: var(--surface3); }
.btn-danger {
  background: var(--danger-faint); color: var(--danger);
  border: 1px solid var(--danger-dim);
}
.btn-danger:hover { background: var(--danger-dim); }
.btn-sm { padding: 8px 15px; font-size: 12.5px; }
.btn-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; font-size: 14px;
}

/* ── Check-in button (44px touch target) ── */
.checkin-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: none; display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.checkin-btn:active { transform: scale(0.9); }
.checkin-btn { font-weight: 800; }
.checkin-btn.checked {
  background: var(--success); color: var(--on-accent);
  box-shadow: 0 0 18px var(--glow);
}
.checkin-btn.unchecked {
  background: var(--glass-2); color: var(--muted);
  border: 1px solid var(--glass-line);
}
.checkin-btn:hover { opacity: 0.85; }

/* ── Search ── */
.search-wrap { position: relative; margin-bottom: 20px; }
.search-wrap input {
  width: 100%; background: var(--glass-2);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-pill); color: var(--text);
  padding: 14px 18px 14px 46px;
  font-size: 15px; font-weight: 500; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--glow-soft); }
.search-wrap input::placeholder { color: var(--muted2); }
.search-icon {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%); color: var(--muted);
  font-size: 16px; font-weight: 700; pointer-events: none;
}
.search-wrap:focus-within .search-icon { color: var(--accent); }

/* ── Section headers ── */
.section-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.12em;
  padding: 16px 6px 10px;
}
.section-label.accent  { color: var(--success); }
.section-label.warning { color: var(--warning); }

/* ── Notes banner ── */
.notes-banner {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 14px; margin: 0 18px 12px;
  background: var(--warning-dim);
  border: 1px solid var(--warning-line);
  border-radius: 14px;
  font-size: 13px; font-weight: 500; color: var(--warning); line-height: 1.5;
}

/* ── Progress ── */
.progress-wrap { margin-bottom: 14px; }
.progress-header {
  display: flex; justify-content: space-between;
  font-size: 12px; margin-bottom: 8px;
}
.progress-header span:last-child { color: var(--muted); font-size: 11px; }
.progress-header span:first-child { font-weight: 600; color: var(--text-soft); }
.progress-bar {
  height: 8px; background: var(--surface3);
  border-radius: var(--r-pill); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--r-pill);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  z-index: 200; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background:
    radial-gradient(80% 40% at 100% 0%, var(--glow-soft), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--glass-line);
  border-radius: 26px; padding: 30px;
  width: 100%; max-width: 500px; max-height: 90vh;
  overflow-y: auto; position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-title {
  font-family: var(--display);
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.035em; margin-bottom: 22px;
}
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--glass-line);
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--glass-2); border: none; color: var(--muted);
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.modal-close:hover { color: var(--text); background: var(--surface3); }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.1em; margin-bottom: 8px;
}
.form-input, .form-textarea {
  width: 100%; background: var(--glass);
  border: 1px solid var(--glass-line); border-radius: 14px;
  color: var(--text); padding: 12px 15px; font-size: 15px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted2); }
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

/* ── Password prompt ── */
.pass-prompt {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  z-index: 300; align-items: center; justify-content: center;
}
.pass-prompt.open { display: flex; }
.pass-card {
  background:
    radial-gradient(80% 50% at 100% 0%, var(--glow-soft), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--glass-line);
  border-radius: 24px; padding: 28px; width: 340px;
  box-shadow: var(--shadow-lg);
}
.pass-title {
  font-family: var(--display);
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.pass-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: color-mix(in srgb, var(--surface2) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-line);
  color: var(--text); padding: 11px 22px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; z-index: 999; pointer-events: none;
  opacity: 0; transition: opacity 0.25s;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
#toast.show { opacity: 1; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state-icon { font-size: 30px; margin-bottom: 14px; opacity: 0.45; color: var(--accent); }
.empty-state-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state-sub { font-size: 12.5px; color: var(--muted2); }

/* ── Bar chart ── */
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 110px; margin-top: 16px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-fill {
  width: 100%; max-width: 34px; border-radius: 8px;
  min-height: 4px; transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-lbl { font-size: 10px; font-weight: 600; color: var(--muted2); }

/* ── Analytics tabs (segmented pill) ── */
.analytics-tab {
  flex: 1;
  background: transparent;
  border: none; border-radius: var(--r-pill);
  color: var(--muted);
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.analytics-tab:hover { color: var(--text); }
.analytics-tab.active {
  background: var(--pill-on);
  color: var(--pill-on-ink);
  font-weight: 700;
}
/* The tab strip's container is styled inline; round it to match */
div:has(> .analytics-tab) {
  border-radius: var(--r-pill) !important;
  background: var(--glass-2) !important;
}

/* ── Filter tabs ── */
.filter-tab {
  background: var(--glass-2);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: var(--muted);
  padding: 8px 15px; margin: 0 6px 6px 0;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text); border-color: var(--border2); }
.filter-tab.active {
  background: var(--pill-on); color: var(--pill-on-ink);
  border-color: var(--pill-on);
}
.filter-count {
  font-size: 11px; font-weight: 700; opacity: 0.55; margin-left: 3px;
  background: none; padding: 0;
}

/* ── Calendar ── */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 5px; margin-top: 10px;
}
.cal-day-header {
  text-align: center;
  font-family: var(--mono);
  font-size: 9px; color: var(--muted2);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 0;
}
/* Heatmap cells — background tint is set inline (attendance vs month best) */
.cal-day {
  aspect-ratio: 1; min-height: 52px;
  border-radius: 14px; padding: 7px 8px;
  display: flex; flex-direction: column;
  align-items: stretch; justify-content: space-between;
  background: var(--surface);
  border: 1px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
  cursor: default;
}
.cal-day.has-data { cursor: pointer; border-color: var(--border); }
.cal-day.has-data:hover { border-color: var(--accent-line); }
.cal-day.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.cal-day.today { border-color: var(--accent-line); }
.cal-day.today .cal-date { color: var(--accent); font-weight: 700; }
.cal-day.empty { background: transparent; border-color: transparent; }
.cal-date {
  font-family: var(--display);
  font-size: 13px; font-weight: 700; color: var(--text); line-height: 1;
}
.cal-day:not(.has-data):not(.empty) .cal-date { color: var(--muted2); font-weight: 500; }
.cal-dot { display: none; }
.cal-val {
  font-size: 10.5px; font-weight: 700; color: var(--text);
  line-height: 1; align-self: flex-end;
  font-variant-numeric: tabular-nums;
}

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav-label {
  font-family: var(--display);
  font-size: 17px; font-weight: 800; letter-spacing: -0.03em;
}

/* ── Day detail / selector ── */
.day-detail {
  margin-top: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card); overflow: hidden;
}
.day-detail-header {
  padding: 13px 20px;
  background: var(--glass);
  border-bottom: 1px solid var(--glass-line);
  font-size: 10.5px; color: var(--muted); letter-spacing: 0.12em;
}
.day-detail-header .g { color: var(--success); }
.day-detail-body { padding: 16px 18px; }

.day-selector { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.day-selector-btn {
  background: var(--glass-2);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  padding: 8px 16px; border-radius: 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.day-selector-btn:hover { color: var(--text); border-color: var(--border2); }
.day-selector-btn.active {
  background: var(--accent); color: var(--on-accent);
  border-color: var(--accent); font-weight: 700;
  box-shadow: 0 0 16px var(--glow);
}
.day-selector-btn:disabled { opacity: 0.3; cursor: default; }

/* ══════════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════════ */
.mobile-topbar {
  display: none; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-line);
  position: sticky; top: 0; z-index: 50;
}
.mobile-logo { display: flex; align-items: center; gap: 8px; }
.mobile-logo .word {
  font-family: var(--display);
  font-size: 12px; font-weight: 800; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text);
}
.hamburger {
  background: none; border: none; color: var(--text);
  font-size: 20px; padding: 8px; margin: -8px;
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 99;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* Promoters header action row — wraps instead of forcing page width */
.promo-actions {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; justify-content: flex-end;
  min-width: 0;
}

@media (max-width: 900px) {
  .promo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .promo-actions .btn { justify-content: center; width: 100%; }
  /* the primary action spans the full row */
  .promo-actions .btn-accent { grid-column: 1 / -1; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    z-index: 100; transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-topbar { display: flex; }
  /* Title and subtitle get the full width; header buttons wrap underneath */
  .page-header { align-items: flex-start; }
  .page-header-left { flex-basis: 100%; }
  .main { overflow-y: auto; }
  .page { padding: 24px 18px 56px; }
  .page-title { font-size: 24px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-chip { padding: 14px 16px; }
  .stat-chip-val { font-size: 22px; }
  .list-row { padding: 11px 14px; }
  .notes-banner { margin: 0 14px 12px; }
}

@media (max-width: 480px) {
  .page { padding: 20px 14px 56px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .form-row { flex-direction: column; gap: 0; }
}

/* ══════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════ */
.flex         { display: flex; }
.items-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.ml-auto      { margin-left: auto; }
.mt-12        { margin-top: 12px; }
.mt-20        { margin-top: 20px; }
.text-accent  { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--muted); }
.font-bold    { font-weight: 700; }
.strikethrough { text-decoration: line-through; opacity: 0.55; }
/* Checked-in names: soft grey like iOS, not crossed out. The class stays
   because anim.js uses it to tell a guest is in. */
.row-name.strikethrough { text-decoration: none; opacity: 1; color: var(--muted); }
.hidden       { display: none !important; }

/* ── Foyer pixel-arch mark (unchanged) ── */
.foyer-mark {
  display: grid;
  grid-template-columns: repeat(5, var(--mu, 4px));
  grid-template-rows:    repeat(6, var(--mu, 4px));
  gap: 0; flex-shrink: 0;
}
.foyer-mark i { display: block; width: var(--mu, 4px); height: var(--mu, 4px); }
.foyer-mark .o { background: transparent; }
.foyer-mark .f { background: var(--text); }
/* Base row keeps the brand green even in light mode (it's the logo) */
.foyer-mark .g { background: #00E87A; }
:root[data-theme="light"] .foyer-mark .g { background: #0B7A45; }


/* ── Feedback animations (anim.js) ── */
@keyframes row-checkin-pulse {
  0%   { background-color: color-mix(in oklab, var(--success) 26%, transparent); }
  100% { background-color: transparent; }
}
.row-pulse { animation: row-checkin-pulse 0.6s ease-out; }

@keyframes stat-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.stat-chip-val.stat-pop { animation: stat-pop 0.25s ease-out; }

@keyframes struck-slide {
  0%   { opacity: 1;    transform: translateX(0); }
  45%  { opacity: 0.35; transform: translateX(5px); }
  100% { opacity: 0.55; transform: translateX(0); }
}
.row-name.just-struck { animation: struck-slide 0.4s ease; }

@media (prefers-reduced-motion: reduce) {
  .row-pulse, .stat-chip-val.stat-pop, .row-name.just-struck { animation: none; }
}
/* ── Cash Tally ─────────────────────────────── */
.tally-tier-row {
  align-items: center;
  padding: 16px 18px;
  gap: 14px;
}
.tally-tier-info { flex: 1; min-width: 0; }
.tally-tier-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.tally-tier-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.tally-price-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.tally-price-symbol {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.tally-price-input {
  width: 84px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tally-price-input::-webkit-outer-spin-button,
.tally-price-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tally-price-input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.tally-price-suffix {
  font-size: 11px;
  color: var(--muted2);
  white-space: nowrap;
}
.tally-clicker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.tally-count {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: center;
  line-height: 1;
}
.tally-counter-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: var(--glass-2);
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.tally-counter-btn:active { transform: scale(0.92); }
.tally-counter-btn:disabled { opacity: 0.35; cursor: default; }
.tally-counter-btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 18px var(--glow);
}
.tally-ded-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 0.5px solid var(--border);
}
.tally-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  border-bottom: 0.5px solid var(--border);
}
.tally-summary-row:last-child { border-bottom: none; }
.tally-summary-row.tally-remaining {
  padding: 16px 18px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  background: var(--hover);
}
.tally-summary-row.tally-remaining span:last-child { font-size: 24px; }
@media (max-width: 640px) {
  .tally-tier-row { flex-wrap: wrap; }
  .tally-clicker { margin-left: auto; }
  .tally-ded-form { flex-wrap: wrap; }
  .tally-ded-form .btn { margin-left: auto; }
}

/* ─────────────────────────────────────────────
   Safe-area insets for iOS Home Screen (standalone) mode.
   When launched full-screen (no Safari bars) with a black-translucent
   status bar + viewport-fit=cover, content would otherwise slide under
   the notch/status bar (top) and the home indicator (bottom). These pad
   the app shell and auth screen into the safe zone. env() is ignored by
   browsers that don't support it, so this is a no-op on desktop.
   ───────────────────────────────────────────── */
#app-shell {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}
#auth-screen {
  padding-top: calc(48px + env(safe-area-inset-top));
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

/* Lift the toast above the home indicator so it isn't clipped. */
#toast {
  bottom: calc(28px + env(safe-area-inset-bottom));
}

/* ══════════════════════════════════════════════
   LOUNGE ADDITIONS (REV 4.0)
   Pieces that mirror the iOS components.
   ══════════════════════════════════════════════ */

/* Checked-in rows get a faint green wash, like the iOS rows */
.list-row:has(.checkin-btn.checked) { background: color-mix(in srgb, var(--success) 6%, transparent); }
.list-row:has(.checkin-btn.checked):hover { background: color-mix(in srgb, var(--success) 9%, transparent); }

/* Active member = quiet green dot; suspended keeps its red pill */
.status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); margin-left: 7px; vertical-align: middle;
  box-shadow: 0 0 6px var(--glow);
}
.member-no { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; }

/* Smaller avatar for guest rows */
.avatar.avatar-sm { width: 34px; height: 34px; font-size: 12px; }

/* Done/total ring on guest list entries */
.mini-ring { position: relative; flex-shrink: 0; display: grid; place-items: center; }
.mini-ring svg { position: absolute; inset: 0; }
.mini-ring svg circle:last-child { transition: stroke-dasharray 0.4s ease; }
.mini-ring span {
  position: relative; font-size: 11px; font-weight: 800;
  font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: -0.02em;
}
.mini-ring.full { background: var(--success); border-radius: 50%; box-shadow: 0 0 16px var(--glow); }
.mini-ring.full svg { display: none; }
.mini-ring.full span { color: var(--on-success); font-size: 15px; }

/* Keyboard focus stays visible on every control */
.btn:focus-visible, .checkin-btn:focus-visible, .nav-item:focus-visible,
.filter-tab:focus-visible, .analytics-tab:focus-visible, .day-selector-btn:focus-visible,
.price-badge-btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── Floating dock (phones) — the iOS LoungeDock ── */
.mobile-dock { display: none; }
@media (max-width: 900px) {
  .mobile-dock {
    display: flex; justify-content: space-around; align-items: center;
    position: fixed; z-index: 90;
    left: 50%; transform: translateX(-50%);
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: min(320px, calc(100% - 48px)); height: 62px; padding: 0 6px;
    border-radius: var(--r-pill);
    background: color-mix(in srgb, var(--surface2) 82%, transparent);
    -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
    border: 1px solid var(--glass-line);
    box-shadow: 0 10px 34px rgba(0,0,0,0.45);
  }
  .dock-item {
    width: 48px; height: 48px; border-radius: 50%;
    border: none; background: transparent; color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  }
  .dock-item:active { transform: scale(0.92); }
  .dock-item.active {
    background: var(--accent); color: var(--on-accent);
    box-shadow: 0 0 22px var(--glow);
  }
  .dock-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  /* Room for the dock under the last row, and lift the toast above it */
  .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

/* ══════════════════════════════════════════════
   LOUNGE FORMS (guest entry modal) — mirrors the iOS form
   ══════════════════════════════════════════════ */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.modal.entry-modal { max-width: 580px; padding-bottom: 0; }

.form-card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  padding: 16px 18px 18px;
  margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.form-card .form-group { margin-bottom: 0; }
.form-card .form-row { gap: 10px; }
.form-card-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 8px;
}
.form-card-count {
  letter-spacing: 0; text-transform: none; font-weight: 800;
  color: var(--success); font-size: 12px;
}
.form-hint { font-size: 12px; color: var(--muted2); margin-top: 6px; line-height: 1.45; }
.form-label-soft { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted2); margin-left: 4px; }

/* Chips: entry type + default price */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--glass-2); color: var(--muted);
  padding: 8px 15px; font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.chip:hover { color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip.active { color: #000; font-weight: 700; }
/* Type chips take their type's colour, like the iOS form */
.entry-type-btn.active                     { background: var(--accent); box-shadow: 0 0 16px var(--glow); color: var(--on-accent); }
.entry-type-btn.active[data-etype="staff"]    { background: var(--type-staff); box-shadow: 0 0 16px var(--type-staff-bg); color: #fff; }
.entry-type-btn.active[data-etype="dj"]       { background: var(--type-dj);    box-shadow: 0 0 16px var(--type-dj-bg); color: #fff; }
.entry-type-btn.active[data-etype="promotor"] { background: var(--warning);    box-shadow: 0 0 16px var(--warning-dim); color: #000; }
.entry-type-btn.active[data-etype="booth"]    { background: var(--type-booth); box-shadow: 0 0 16px var(--type-booth-bg); color: #fff; }
/* Price chips: GL amber, Free neutral, paid green */
.price-preset.active                   { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 16px var(--glow); }
.price-preset.active[data-price="-1"]  { background: var(--warning-dim); color: var(--warning); box-shadow: inset 0 0 0 1px var(--warning-line); }
.price-preset.active[data-price="0"]   { background: var(--pill-on); color: var(--pill-on-ink); box-shadow: none; }

/* One night / Every week */
.seg { display: flex; padding: 3px; border-radius: var(--r-pill); background: var(--glass-2); }
.seg-btn {
  flex: 1; height: 36px; border: none; border-radius: var(--r-pill);
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 13px; font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.seg-btn.active { background: var(--pill-on); color: var(--pill-on-ink); font-weight: 700; }

/* Weeknight circles */
.day-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; justify-items: center; }
.day-btn {
  aspect-ratio: 1; width: 100%; max-width: 46px;
  border: none; border-radius: 50%;
  background: var(--glass-2); color: var(--muted);
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.day-btn:active { transform: scale(0.94); }
.day-btn.active { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px var(--glow); }

.form-inline {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--glass-line);
}
.form-inline-label { font-size: 14px; font-weight: 600; color: var(--text); }
.form-input.form-input-compact { width: auto; min-width: 150px; padding: 9px 12px; }

.promo-dropdown-list {
  position: absolute; top: 4px; left: 0; right: 0; z-index: 50;
  background: var(--surface2); border: 1px solid var(--glass-line);
  border-radius: 14px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}
.linked-note {
  margin-top: 8px; padding: 8px 12px; border-radius: 12px;
  background: var(--success-dim); color: var(--success);
  font-size: 12px; font-weight: 600;
}
.form-textarea.entry-notes { color: var(--warning); min-height: 72px; }
.form-textarea.entry-notes::placeholder { color: var(--muted2); }

/* Save bar pinned to the bottom of the sheet */
.modal-footer.entry-footer {
  position: sticky; bottom: 0; z-index: 2;
  margin: 18px -30px 0; padding: 16px 30px 22px;
  background: linear-gradient(to bottom, transparent, var(--bg-2) 28%);
  border-top: none; align-items: center;
}
.save-reason { margin-right: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
@media (max-width: 480px) {
  .modal-footer.entry-footer { flex-wrap: wrap; }
  .save-reason { flex-basis: 100%; }
  .modal-footer.entry-footer .btn { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════════
   ANALYTICS OVERVIEW — tonight + vs last week (as on iOS)
   ══════════════════════════════════════════════ */
.ov-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.ov-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ov-big {
  font-family: var(--display); font-size: 56px; font-weight: 800;
  letter-spacing: -0.05em; line-height: 0.9; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 26px var(--glow);
}
.ov-big-label { font-size: 15px; font-weight: 600; color: var(--muted); }
.ov-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ov-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 16px; background: var(--glass);
}
.ov-tile-bar { width: 4px; height: 28px; border-radius: 4px; flex-shrink: 0; }
.ov-tile-val { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ov-tile-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.ov-foot { font-size: 12.5px; color: var(--muted); margin-top: -4px; }

.ov-compare { gap: 0; padding-top: 12px; padding-bottom: 6px; }
.ov-row {
  display: grid; grid-template-columns: 1fr 72px 72px 64px; align-items: center; gap: 4px;
  padding: 12px 0; border-bottom: 1px solid var(--glass-line);
}
.ov-row:last-child { border-bottom: none; }
.ov-row.ov-head {
  padding: 0 0 6px; border-bottom: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted2);
}
.ov-row-title { font-size: 14.5px; font-weight: 600; }
.ov-row-detail { font-size: 11.5px; font-weight: 500; color: var(--muted2); margin-top: 2px; }
.ov-num { text-align: right; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ov-head .ov-num { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; }
.ov-then { color: var(--muted); font-weight: 600; }
.ov-delta {
  justify-self: end; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  padding: 3px 8px; border-radius: var(--r-pill);
}
.ov-delta.up   { color: var(--success); background: var(--success-dim); }
.ov-delta.down { color: var(--danger);  background: var(--danger-dim); }
.ov-delta.same { color: var(--muted);   background: var(--glass-2); }
.ov-note { font-size: 11.5px; color: var(--muted2); padding: 0 6px 14px; }
.ov-empty { gap: 4px; }
@media (max-width: 480px) {
  .ov-big { font-size: 46px; }
  .ov-row { grid-template-columns: 1fr 52px 52px 54px; }
  .ov-num { font-size: 16px; }
}

/* ══════════════════════════════════════════════
   CHARTS — heat strip, ranked bars, line (as on iOS)
   ══════════════════════════════════════════════ */
.heat-strip { display: flex; flex-direction: column; gap: 8px; }
.hs-tiles { display: flex; gap: 4px; }
.hs-tiles.dense { gap: 2px; }
.hs-tile {
  flex: 1; height: 44px; border-radius: 8px;
  background: var(--glass-2);
  transition: box-shadow 0.2s;
}
.hs-tiles.dense .hs-tile { border-radius: 5px; }
.hs-tile.peak { box-shadow: 0 0 0 1.5px var(--text), 0 0 14px var(--glow); }
.hs-axis {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 11.5px; font-weight: 600; color: var(--muted2);
  white-space: nowrap;
}
.hs-peak { color: var(--success); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

.ranked-bars { display: flex; flex-direction: column; gap: 12px; }
.rb-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.rb-label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.rb-row.top .rb-label { color: var(--text); }
.rb-track { height: 10px; border-radius: var(--r-pill); background: var(--surface3); overflow: hidden; }
.rb-fill {
  display: block; height: 100%; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--success) 38%, transparent);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.rb-row.top .rb-fill { background: var(--success); box-shadow: 0 0 10px var(--glow); }
.rb-val { min-width: 38px; text-align: right; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rb-row.top .rb-val { color: var(--success); }

.line-chart { display: block; width: 100%; height: auto; overflow: visible; margin-bottom: 4px; }
.line-chart .lc-grid { stroke: var(--border); stroke-dasharray: 3 6; stroke-width: 1; }
.line-chart .lc-line { fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .lc-dot { fill: var(--success); opacity: 0.85; }
.line-chart .lc-dot.latest { opacity: 1; }
.line-chart .lc-halo { fill: var(--success); opacity: 0.22; }
.line-chart .lc-pill { fill: var(--text); }
.line-chart .lc-pill-text {
  fill: var(--bg); font-family: var(--sans); font-size: 13px; font-weight: 800;
  text-anchor: middle; font-variant-numeric: tabular-nums;
}
.line-chart .lc-axis { fill: var(--muted2); font-family: var(--sans); font-size: 13px; font-weight: 600; text-anchor: middle; }
.line-chart .lc-axis.latest { fill: var(--text); }
@media (prefers-reduced-motion: reduce) { .rb-fill { transition: none; } }

/* Waiting / Checked in split inside a guest list entry */
.guest-group-label {
  padding: 12px 20px 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.guest-group-label.in { color: var(--success); border-top: 1px solid var(--glass-line); }
.guest-group-label span { opacity: 0.6; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* Generic on/off filter chips (white when on, like the iOS segment) */
.chip.filter-chip.active { background: var(--pill-on); color: var(--pill-on-ink); }

/* ── Promoter rows: calm by default, extras in the ⋯ menu ── */
.promo-row { flex-wrap: wrap; row-gap: 10px; }
.promo-row.is-inactive { opacity: 0.55; }
.promo-main { flex: 1; min-width: 170px; }
.promo-main .row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.promo-avatar {
  border: none; cursor: pointer; padding: 0;
  background: var(--glass-2); color: var(--text);
}

.promo-avatar.is-here { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 14px var(--glow); font-size: 18px; }
.promo-avatar:disabled { cursor: default; }
.promo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.promo-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.promo-tag.owed    { color: var(--danger);  background: color-mix(in srgb, var(--danger) 14%, transparent); }
.promo-tag.cards   { color: var(--accent);  background: var(--accent-dim); }
.promo-tag.tonight { color: var(--warning); background: var(--warning-dim); }
.promo-tag.online  { color: var(--muted);   background: var(--glass-2); }
.promo-paid { color: var(--success); border-color: var(--success-dim); }
.promo-stepper {
  display: flex; align-items: center; gap: 4px;
  background: var(--glass-2); border-radius: var(--r-pill); padding: 3px;
}
.promo-step {
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--text); font-size: 18px; font-weight: 700; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, transform 0.1s;
}
.promo-step:hover:not(:disabled) { background: var(--hover); }
.promo-step:active:not(:disabled) { transform: scale(0.92); }
.promo-step:disabled { opacity: 0.3; cursor: default; }
.promo-step.plus { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 10px var(--glow); }
.promo-step.plus:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }
.promo-count {
  min-width: 30px; text-align: center;
  font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--muted2);
}
.promo-count.on { color: var(--accent); }
.promo-more-dots { font-size: 18px; letter-spacing: 1px; }

.promo-more { position: relative; }
.promo-menu {
  display: none; position: fixed; z-index: 1000; min-width: 220px; padding: 6px;
  background: var(--surface2); border: 1px solid var(--glass-line); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.promo-menu.open { display: block; }
.promo-more-panel { position: absolute; top: calc(100% + 6px); right: 0; }
.promo-menu-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted2); padding: 8px 12px 6px; }
.promo-menu-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent; cursor: pointer;
  color: var(--text); font: 600 14px/1.2 inherit; font-family: inherit; padding: 10px 12px; border-radius: 10px;
}
.promo-menu-item:hover, .promo-menu-item:focus-visible { background: var(--hover); outline: none; }
.promo-menu-item.accent { color: var(--success); }
.promo-menu-sep { height: 1px; background: var(--glass-line); margin: 4px 6px; }
@media (max-width: 560px) {
  .promo-row .row-actions { width: 100%; justify-content: flex-end; }
}
.promo-avatar { cursor: default; }
.promo-avatar.is-here { font-size: 16px; }
.promo-checkin { background: transparent; color: var(--accent); border: 1px solid var(--accent-line); }
.promo-checkin:hover { background: var(--accent-dim); }
.promo-checkin.is-here { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.promo-plusone { background: transparent; color: var(--muted); border: 1px solid var(--glass-line); }
.promo-plusone:hover { background: var(--hover); color: var(--text); }
.promo-plusone.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-dim); }
