/* KPU Event Night — "KPU Command Center" dark theme (2026-09-06 redesign,
   per Neel: should feel like the Dashboard's Command Center while staying
   optimized for phones/tablets at the Cajundome — readability and speed
   over pixel-identical styling). Dark is now the default/only theme, not a
   prefers-color-scheme override. Tap targets stay large — this app is used
   standing up, by someone who's never seen it before. */
:root {
  --navy: #0b1f3a;
  --navy-2: #142c52;
  --navy-3: #1c3a68;
  --blue: #3b82f6;
  --blue-dim: #2f5fe0;
  --gold: #d4af37;
  --bg-deep: #070c16;
  --bg-panel: #101a30;
  --bg-panel-2: #17233f;
  --ink: #eef2fb;
  --ink-2: #b6c0da;
  --ink-3: #8792ad;
  --good: #2ecc71;
  --good-bg: rgba(46,204,113,.16);
  --amber: #f5a623;
  --amber-bg: rgba(245,166,35,.16);
  --serious: #ef4444;
  --serious-bg: rgba(239,68,68,.16);
  --border: #253355;
  --card-bg: var(--bg-panel);
  --page-bg: var(--bg-deep);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.28), 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 6px 18px rgba(0,0,0,.36);
  --shadow-lg: 0 18px 44px rgba(0,0,0,.5);
  --tapbar-h: 78px;
  --topbar-h: 116px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  overscroll-behavior-y: contain;
  color-scheme: dark;
}
button, input { font-family: inherit; }
#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--navy-3) 0%, var(--navy) 55%, #050a15 100%);
  color: #fff; padding: 32px 20px; gap: 22px;
}
.login-screen img { width: 108px; height: 108px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.login-screen h1 { font-size: 22px; font-weight: 700; text-align: center; }
.login-screen p { color: rgba(255,255,255,.7); font-size: 14px; text-align: center; max-width: 320px; }
.pin-display { display: flex; gap: 14px; margin: 6px 0 4px; }
.pin-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); transition: background .1s ease, transform .1s ease; }
.pin-dot.filled { background: #fff; transform: scale(1.08); }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.keypad button {
  width: 76px; height: 76px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); color: #fff; font-size: 26px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.keypad button:active { background: rgba(255,255,255,.22); }
.keypad button.ghost { background: none; border: none; }
.login-error { color: #ffb4a8; font-size: 14px; min-height: 20px; font-weight: 500; }

/* ---------- Shell ---------- */
/* Header + Operating Event bar are wrapped together as one sticky unit so
   the bar sits flush under the header rather than both independently
   sticking to the very top and overlapping. */
.topbar-sticky { position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow-md); }
.header {
  background: var(--navy); color: #fff;
  padding: 16px 18px 14px;
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px;
}
.header img { width: 32px; height: 32px; border-radius: 9px; }
.header .title { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.header .sub { font-size: 12px; color: rgba(255,255,255,.65); }
.header .spacer { flex: 1; }
.header .logout-btn {
  background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 12.5px; font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius-pill);
}

/* Operating Event (2026-09-06, per Neel): the ONE shared event selector for
   Attendance, Scanner, and Volunteers — always visible, never per-tab, so
   the three surfaces can't drift onto different nights. Deliberately
   compact so it doesn't eat vertical space on a phone. */
.operating-bar {
  width: 100%; display: flex; align-items: center; gap: 8px; background: var(--navy-2); color: #fff; border: none;
  padding: 10px 18px; font-size: 12.5px; font-weight: 600; text-align: left;
}
.operating-bar .ob-label { color: rgba(255,255,255,.55); text-transform: uppercase; font-size: 10px; letter-spacing: .4px; flex-shrink: 0; }
.operating-bar .ob-value { flex: 1; font-size: 13.5px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.operating-bar .ob-chev { color: rgba(255,255,255,.6); flex-shrink: 0; }
.operating-bar:active { background: var(--navy-3); }

.view {
  flex: 1; padding: 16px 14px calc(var(--tapbar-h) + env(safe-area-inset-bottom, 0px) + 32px);
  max-width: 640px; width: 100%; margin: 0 auto;
}

/* Sticky search + filter toolbar on Attendance — keeps both reachable
   without scrolling back up on a long roster (102+ names is a normal
   night). Sticks just below the topbar stack, not underneath it. */
.sticky-toolbar {
  position: sticky; top: var(--topbar-h); z-index: 4; background: var(--page-bg);
  padding: 10px 0 10px; margin: 0 -14px 4px; padding-left: 14px; padding-right: 14px;
}

.tapbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: var(--bg-panel); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 18px rgba(0,0,0,.4);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tapbar button {
  flex: 1; background: none; border: none; padding: 12px 4px 10px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
  min-height: 64px; position: relative;
}
.tapbar button .tab-icon { font-size: 22px; line-height: 1; }
.tapbar button.active { color: var(--gold); }
.tapbar button.active .tab-icon { transform: scale(1.05); }
.tapbar button.primary .tab-icon { font-size: 26px; }
.tapbar button.primary::after {
  content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: var(--radius-pill); background: var(--gold); opacity: .35;
}
.tapbar button.primary.active::after { opacity: 1; }

/* ---------- Generic building blocks ---------- */
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px;
}
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.section-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }

.select-field, .text-field {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 14px; font-size: 15.5px; background: var(--bg-panel-2); color: var(--ink);
}
.select-field:focus, .text-field:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.text-field::placeholder { color: var(--ink-3); }

.btn {
  border: none; border-radius: var(--radius-md); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .06s ease, filter .1s ease;
}
.btn:active { transform: scale(.97); filter: brightness(.94); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-good { background: var(--good); color: #05170c; }
.btn-outline { background: none; border: 1.5px solid var(--border); color: var(--ink-2); }
.btn-danger { background: var(--serious); color: #fff; }
.btn-danger-outline { background: none; border: 1.5px solid var(--serious); color: var(--serious); }
.btn-lg { min-height: 58px; padding: 14px 20px; font-size: 16.5px; width: 100%; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.stat-tile {
  flex: 1; min-width: 90px; background: var(--bg-panel-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 14px; text-align: center;
}
.stat-tile .num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--gold); }
.stat-tile .lbl { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; font-weight: 600; letter-spacing: .2px; text-transform: uppercase; }
/* Compact variant (2026-09-06, per Neel: "keep stats prominent but
   compact") — used on both Attendance and Volunteers so 5 tiles fit
   without wrapping awkwardly on a phone screen. */
.stat-row.compact .stat-tile { padding: 8px 4px; min-width: 0; }
.stat-row.compact .stat-tile .num { font-size: 20px; }
.stat-row.compact .stat-tile .lbl { font-size: 9px; margin-top: 3px; }
.stat-row.compact { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.progress-track { height: 10px; border-radius: var(--radius-pill); background: var(--border); overflow: hidden; margin-bottom: 16px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #58a6ff); border-radius: var(--radius-pill); transition: width .3s ease; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: var(--radius-pill); white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-gray { background: var(--border); color: var(--ink-2); }
.badge-serious { background: var(--serious-bg); color: var(--serious); }

/* ---------- Attendance ---------- */
/* Desktop/tablet layout (2026-09-06, per Neel: "desktop should properly use
   the available width, not one narrow centered phone column"). On mobile
   this is just a single stacked column — same DOM either way, CSS repositions. */
.att-layout { display: block; }
.att-side { margin-top: 4px; }
.att-side-hint { display: none; }

.filter-chip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.filter-chip-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--bg-panel-2); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap;
  min-height: 40px;
}
.filter-chip .fc-count { background: rgba(255,255,255,.12); padding: 1px 7px; border-radius: var(--radius-pill); font-size: 11px; }
.filter-chip.active { background: var(--gold); border-color: var(--gold); color: #20180a; }
.filter-chip.active .fc-count { background: rgba(0,0,0,.18); color: #20180a; }

.att-toolbar-row { display: flex; gap: 8px; align-items: stretch; }
.att-toolbar-row .text-field { flex: 1; }
.att-toolbar-row .btn { flex: 0 0 auto; white-space: nowrap; padding: 0 16px; min-height: 48px; }

.roster-group-label {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 6px 6px;
}
.roster-group-label:first-child { padding-top: 4px; }
.roster-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--border);
  min-height: 64px;
}
.roster-row:last-child { border-bottom: none; }
.roster-row.is-checked-in { background: var(--good-bg); border-radius: var(--radius-sm); }
.roster-row.is-checked-in .name { color: var(--ink-2); font-weight: 500; }
/* flex-basis 140px (not the old 0%) gives the name column a real minimum
   before the row wraps — on narrow phones the fixed-width action buttons
   (124+66+83px) were squeezing it to ~32px, causing severe text wrap/overlap
   with the buttons (audit hf-20260910). Wrapping puts name and actions on
   their own full-width lines instead. */
.roster-row .name { flex: 1 1 140px; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.roster-row .name .walkin-tag { display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin: 3px 6px 0 0; }
.roster-row .name .brought-friend-tag { color: var(--blue); font-weight: 600; }
.roster-row .row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.checkin-btn {
  min-width: 124px; min-height: 50px; border-radius: var(--radius-pill); border: 1.5px solid var(--blue);
  background: none; color: var(--blue); font-weight: 700; font-size: 14.5px;
}
.checkin-btn.checked { background: var(--good); border-color: var(--good); color: #05170c; }
.checkin-btn:active { transform: scale(.96); }
/* Immediate visual confirmation after Check-In (2026-09-06, per Neel) —
   flashes the whole row briefly before the delayed repaint moves it into
   the Checked In group. */
@keyframes flashGood { 0% { background: var(--good); } 100% { background: var(--good-bg); } }
.roster-row.flash-in { animation: flashGood .7s ease-out; }

.edit-btn-labeled {
  display: flex; align-items: center; gap: 6px; height: 50px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--bg-panel-2); color: var(--ink-2); font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.edit-btn-labeled .ebl-icon { font-size: 15px; }
.edit-btn-labeled:active { transform: scale(.96); }

.delete-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: none;
  background: var(--serious-bg); color: var(--serious); font-size: 17px;
}
.delete-btn:active { transform: scale(.94); }

/* ---------- Krewe / Volunteers ---------- */
.krewe-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.krewe-tabs button {
  flex: 1; padding: 12px; border-radius: var(--radius-md); border: 1.5px solid var(--border);
  background: var(--bg-panel-2); font-weight: 700; font-size: 14.5px; color: var(--ink-2);
}
.krewe-tabs button.active { background: var(--navy-3); border-color: var(--navy-3); color: #fff; }

.vol-subtabs { display: flex; gap: 8px; margin-bottom: 14px; }
.vol-subtabs button {
  flex: 1; padding: 11px; border-radius: var(--radius-md); border: 1.5px solid var(--border);
  background: var(--bg-panel-2); color: var(--ink-2); font-weight: 700; font-size: 13.5px; min-height: 44px;
}
.vol-subtabs button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.missing-panel-title { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.missing-card { border-left: 4px solid var(--amber); }
.missing-card .missing-head { font-size: 15px; font-weight: 700; color: var(--amber); margin-bottom: 2px; }
.missing-card-clear { border-left-color: var(--good); }
.missing-card-clear .missing-head { color: var(--good); margin-bottom: 0; }

/* Staffing board (2026-09-06 redesign, per Neel — replaces the old
   expand-everything accordion): a station's status should read at a glance
   as one ratio + one color, not three small numbers. Assigned=0 gets a
   neutral gray — nothing to staff there isn't a shortfall. */
.vol-view[data-active="stations"] .missing-panel { display: none; }
.vol-view[data-active="missing"] .station-board { display: none; }
.station-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.station-board-card {
  text-align: left; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: var(--bg-panel-2);
  padding: 14px; display: flex; flex-direction: column; gap: 6px; min-height: 108px;
}
.station-board-card .sbc-name { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.station-board-card .sbc-ratio { font-size: 26px; font-weight: 800; line-height: 1; color: var(--ink); }
.station-board-card .sbc-ratio-lbl { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 6px; text-transform: uppercase; }
.station-board-card .sbc-status { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-3); }
/* Urgency lives in the number/label (color + weight), not a full-bleed
   card fill (2026-09-06, per Neel: a room full of red cards early in the
   night reads as an alarm, not information — the ratio should still be
   readable at a glance without the whole board feeling like a warning). */
.station-board-card { border-left-width: 4px; }
.station-board-card.status-full { border-left-color: var(--good); }
.station-board-card.status-full .sbc-ratio, .station-board-card.status-full .sbc-status { color: var(--good); }
.station-board-card.status-partial { border-left-color: var(--amber); }
.station-board-card.status-partial .sbc-ratio, .station-board-card.status-partial .sbc-status { color: var(--amber); }
.station-board-card.status-gap { border-left-color: var(--serious); }
.station-board-card.status-gap .sbc-ratio, .station-board-card.status-gap .sbc-status { color: var(--serious); }
.station-board-card.status-none { opacity: .55; }
.station-board-card:active { transform: scale(.98); }

.scanner-current-event { font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-align: center; margin: -8px 0 14px; }

.volunteer-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 0; border-top: 1px solid var(--border);
}
.volunteer-row:first-child { border-top: none; }
.volunteer-row.is-checked-in { background: var(--good-bg); border-radius: var(--radius-sm); border-top-color: transparent; padding-left: 8px; padding-right: 8px; }
.volunteer-row.is-checked-in .vname { color: var(--ink-2); font-weight: 500; }
.volunteer-row .vname { flex: 1 1 100%; font-size: 15.5px; font-weight: 600; }
.volunteer-row .vname .vcontact { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.vol-actions { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.checkin-btn.small { min-width: 0; flex: 1; min-height: 46px; padding: 0 10px; font-size: 14px; }

/* ---------- Scanner ---------- */
/* Deliberately minimal (Neel, 2026-09-06): camera + one status card, no
   dashboard clutter, no recent-scans panel. */
.scanner-view { display: flex; flex-direction: column; align-items: center; }
.scan-video-wrap {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1; background: #000;
  border-radius: var(--radius-lg); overflow: hidden; margin: 4px 0 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.scan-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-result { width: 100%; max-width: 460px; margin: 0 0 10px; }
.scan-card { border-radius: var(--radius-md); padding: 18px 14px; text-align: center; }
.scan-card-ready { background: var(--bg-panel-2); color: var(--ink-3); border: 1.5px dashed var(--border); font-size: 14.5px; font-weight: 600; }
.scan-card-icon { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.scan-card-who { font-weight: 700; font-size: 18px; margin-bottom: 2px; }
.scan-card-what { font-size: 14px; white-space: pre-line; }
.scan-card-good { background: var(--good-bg); color: var(--good); }
.scan-card-warn { background: var(--amber-bg); color: var(--amber); }
.scan-card-bad { background: var(--serious-bg); color: var(--serious); }
.scan-hint { padding: 6px 20px; }

/* ---------- Misc ---------- */
.empty-state { color: var(--ink-3); font-size: 14px; text-align: center; padding: 30px 10px; }
.center-note { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--blue);
  animation: spin .7s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-host {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tapbar-h) + 14px); z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 16px; pointer-events: none;
}
.toast {
  background: var(--bg-panel-2); color: #fff; padding: 12px 18px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 92vw;
  display: flex; align-items: center; gap: 8px; animation: toast-in .18s ease-out; border: 1px solid var(--border);
}
.toast.success { background: var(--good); color: #05170c; border-color: var(--good); }
.toast.error { background: var(--serious); border-color: var(--serious); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.inline-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.inline-form-row { display: flex; gap: 8px; }
.inline-form-row .text-field { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.checkbox-row input { width: auto; }

.wi-name-wrap { position: relative; }
.wi-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px;
  background: var(--card-bg); border: 1.5px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); max-height: 220px; overflow-y: auto;
}
.wi-suggest:empty { display: none; }
.wi-suggest-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); }
.wi-suggest-item:last-child { border-bottom: none; }
.wi-suggest-item:hover { background: var(--bg-panel-2); }
.wi-suggest-name { font-weight: 600; font-size: 14.5px; }
.wi-suggest-meta { font-size: 12.5px; color: var(--ink-3); }


/* ---------- Confirm modal + bottom sheet ---------- */
/* Used for anything that shouldn't fire from one accidental tap: undoing a
   check-in mid-rush, or switching the Operating Event out from under the
   whole app (2026-09-06, per Neel). Also used for the station drill-down,
   where it isn't a confirmation but the same sheet mechanics fit. */
.modal-backdrop, .sheet-backdrop {
  position: fixed; inset: 0; background: rgba(3,6,12,.6); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 20px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.modal-body { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

.sheet-backdrop { align-items: flex-end; padding: 0; }
.sheet {
  background: var(--card-bg); border: 1px solid var(--border); width: 100%; max-width: 640px; margin: 0 auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 82vh; overflow-y: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .18s ease-out;
  box-shadow: var(--shadow-lg);
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 5px; border-radius: var(--radius-pill); background: var(--border); margin: 6px auto 14px; }
.sheet-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.sheet-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.sheet-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--bg-panel-2); color: var(--ink-2); font-size: 20px; flex-shrink: 0; }

.event-pick-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 10px; border: none; border-bottom: 1px solid var(--border);
  background: none; color: var(--ink); text-align: left; font-size: 15px;
}
.event-pick-row:last-child { border-bottom: none; }
.event-pick-row.current { background: var(--good-bg); border-radius: var(--radius-sm); }
.epr-date { font-weight: 700; color: var(--ink-2); font-size: 12.5px; min-width: 76px; flex-shrink: 0; }
.epr-name { flex: 1; font-weight: 600; }
.epr-current { font-size: 11px; font-weight: 700; color: var(--good); text-transform: uppercase; flex-shrink: 0; }

/* ---------- Desktop / tablet (2026-09-06, per Neel: "desktop should
   properly use the available width instead of one narrow phone-sized
   column in the middle of a huge screen") ---------- */
@media (min-width: 900px) {
  .view { max-width: 1280px; padding: 22px 28px calc(var(--tapbar-h) + 24px); }

  /* Idle state (no Add Walk-In / Edit form open): the roster is the only
     content, so it's centered as a single balanced column instead of
     reserving a mostly-empty second column (2026-09-07, per Neel). The
     side column only appears once staff actually opens a form. */
  .att-layout { display: flex; justify-content: center; gap: 22px; align-items: flex-start; }
  .att-main { width: 100%; max-width: 820px; }
  .att-side { display: none; width: 360px; flex-shrink: 0; position: sticky; top: calc(var(--topbar-h) + 16px); margin-top: 0; }
  .att-layout.form-open .att-main { max-width: 760px; }
  .att-layout.form-open .att-side { display: block; }

  /* Volunteers (revised 2026-09-06, per Neel): Stations stays the primary
     desktop view too — no permanent full-height All Missing rail eating the
     page while the board sits in a narrow column. Same Stations/All Missing
     toggle as mobile, just using the full available width per panel. */
  .station-board { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .vol-view[data-active="missing"] .missing-card:not(.missing-card-clear) {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px;
  }

  .sheet-backdrop.station-sheet { align-items: stretch; justify-content: flex-end; padding: 0; }
  .sheet-backdrop.station-sheet .sheet { max-width: 420px; height: 100%; max-height: 100vh; border-radius: 0; margin: 0; animation: slideLeft .18s ease-out; }
  @keyframes slideLeft { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media (min-width: 600px) {
  .station-board { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Opt-In Outreach preview/send sheet (2026-09-11) ---------- */
.oo-section { margin-bottom: 18px; }
.oo-section-title { font-size: 14.5px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.oo-msg-preview {
  font-size: 13px; color: var(--ink-2); background: var(--bg-panel-2); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 8px; line-height: 1.4; white-space: pre-wrap;
}
