/* BigShoow host admin. Warm paper, black sidebar, gold accents.
   Served under a strict CSP, so every visual rule lives here. */

:root {
  --paper: #F6F2E9;
  --paper-2: #FBF8F2;
  --card: #FFFFFF;
  --ink: #16130D;
  --muted: #5C5448;
  --line: #E2D9C6;
  --line-soft: #EDE6D6;
  --field-line: #D6CCB6;
  --chip: #EDE4D0;
  --black: #050505;
  --gold: #C5A021;
  --gold-text: #8C6D0F;       /* gold text on white cards (4.87:1) */
  --gold-text-paper: #7A5E0C; /* gold text on paper (5.47:1) */
  --green: #1C7A3E;
  --green-bg: #E3F1E7;
  --red: #B3261E;
  --red-bg: #FBE6E4;
  --amber-bg: #FFF4D6;
  --radius: 12px;
  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --body: Montserrat, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .hidden { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--gold-text-paper); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }
.card a:not(.btn) { color: var(--gold-text); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sidebar :focus-visible, .panel-dark :focus-visible { outline-color: #FFFFFF; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--gold); color: var(--black); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- Layout ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.main { padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.main-narrow { max-width: 980px; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--black); color: #FFFFFF;
  padding: 28px 18px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 20px; }
.brand-mark {
  width: 42px; height: 42px; flex-shrink: 0; border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 20px; color: var(--gold);
}
.brand-name { font-family: var(--display); font-size: 22px; letter-spacing: 1px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.brand-sub { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 2px; }
.menu-toggle { display: none; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px; padding: 10px 14px; border-radius: 8px;
  color: #D9D9D9; font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
}
.nav a:hover { background: #1A1A1A; text-decoration: none; color: #FFFFFF; }
.nav a[aria-current="page"] { background: var(--gold); color: var(--black); }
.nav-count { background: var(--gold); color: var(--black); font-size: 12px; font-weight: 900; padding: 2px 9px; border-radius: 20px; letter-spacing: 0; }
.nav a[aria-current="page"] .nav-count { background: var(--black); color: var(--gold); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }
.sidebar-foot label { font-size: 12px; color: #BDBDBD; font-weight: 700; letter-spacing: 1px; }
.sidebar-foot select { background: #111111; color: #FFFFFF; border-color: #3A3A3A; }
.live-link {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  border: 1px solid #3A3A3A; color: #FFFFFF; padding: 10px 14px; text-align: center;
  font-weight: 700; font-size: 13px; letter-spacing: 1px; border-radius: 8px; text-transform: uppercase;
}
.live-link:hover { border-color: var(--gold); text-decoration: none; }
.signout {
  min-height: 44px; background: transparent; color: #D9D9D9; border: 0; cursor: pointer;
  font: 700 13px var(--body); letter-spacing: 1px; text-transform: uppercase; border-radius: 8px;
}
.signout:hover { color: #FFFFFF; background: #1A1A1A; }
.who { font-size: 12px; color: #BDBDBD; overflow-wrap: anywhere; }

/* ---------- Headings ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; margin: 0; letter-spacing: 0.5px; }
h1 { font-size: 46px; }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
.lede { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.grid-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat { gap: 6px; }
.stat-label { font-size: 12px; font-weight: 900; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.stat-value { font-family: var(--display); font-size: 52px; line-height: 1; overflow-wrap: anywhere; }
.stat-note { font-size: 13px; color: var(--muted); font-weight: 700; }

.panel-dark {
  background: var(--black); color: #FFFFFF; border-radius: var(--radius);
  padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.panel-dark .eyebrow { color: var(--gold); }
.panel-dark h2 { font-size: 42px; margin-top: 4px; }
.panel-dark .meta { font-size: 14px; color: #C9C9C9; }
.panel-dark .gold { color: var(--gold); }
.panel-dark a:not(.btn) { color: var(--gold); }

.list-item { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; gap: 12px; align-items: flex-start; }
.list-item-body { flex-grow: 1; min-width: 0; overflow-wrap: anywhere; }
.list-item-title { font-size: 13px; font-weight: 900; }
.list-item-title .muted { font-weight: 500; }

.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

/* ---------- Progress ---------- */
progress {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px;
  border: 0; border-radius: 10px; background: #262626; overflow: hidden;
}
progress::-webkit-progress-bar { background: #262626; border-radius: 10px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 10px; }
.card progress, .checkin-head progress { background: var(--chip); }
.card progress::-webkit-progress-bar, .checkin-head progress::-webkit-progress-bar { background: var(--chip); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 8px; cursor: pointer;
  font: 900 13px var(--body); letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  background: var(--ink); color: #FFFFFF; border: 2px solid var(--ink);
}
.btn:hover { text-decoration: none; background: #2E2A22; border-color: #2E2A22; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--chip); border-color: var(--ink); }
.btn-gold { background: var(--gold); color: var(--black); border-color: var(--gold); }
.btn-gold:hover { background: #D6B236; border-color: #D6B236; }
.btn-ghost-gold { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-ghost-gold:hover { background: #1A1A1A; }
.btn-ghost-dark { background: transparent; color: #FFFFFF; border: 1px solid #3A3A3A; }
.btn-ghost-dark:hover { background: #1A1A1A; border-color: #3A3A3A; }
.btn-danger { background: var(--card); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-danger-fill { background: var(--red); color: #FFFFFF; border-color: var(--red); }
.btn-danger-fill:hover { background: #8F1E17; border-color: #8F1E17; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-link {
  background: none; border: 0; padding: 10px 4px; min-height: 44px; cursor: pointer;
  color: var(--gold-text); font: 900 13px var(--body); letter-spacing: 1px; text-transform: uppercase;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Forms ---------- */
form { margin: 0; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="url"],
input[type="date"], input[type="datetime-local"], input[type="password"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--field-line); border-radius: 8px; background: var(--paper-2);
  font: 500 15px var(--body); color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 320px; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex-shrink: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 14px; cursor: pointer; }
input[type="color"] { width: 64px; height: 44px; padding: 2px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--paper-2); cursor: pointer; }
input[type="file"] { font: 500 14px var(--body); min-height: 44px; max-width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; min-width: 0; }
legend { font-family: var(--display); font-size: 22px; padding: 0 6px; }
.form-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.image-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.preview {
  width: 220px; max-width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); background: var(--paper);
}
.preview-square { width: 120px; aspect-ratio: 1 / 1; object-fit: contain; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left; background: var(--paper); color: var(--muted);
  font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  padding: 10px 12px; white-space: nowrap;
}
thead th:first-child { border-radius: 8px 0 0 8px; }
thead th:last-child { border-radius: 0 8px 8px 0; }
tbody td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.cell-main { font-weight: 900; overflow-wrap: anywhere; }
.cell-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.detail { font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; max-width: 520px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase; white-space: nowrap;
  background: var(--chip); color: var(--ink);
}
.badge-member { background: var(--black); color: var(--gold); }
.badge-paid, .badge-published, .badge-active, .badge-answered, .badge-sent, .badge-ok, .badge-processed, .badge-live { background: var(--green-bg); color: var(--green); }
.badge-refunded, .badge-cancelled, .badge-failed, .badge-suspended, .badge-error, .badge-lapsed { background: var(--red-bg); color: var(--red); }
.badge-pending, .badge-draft, .badge-open, .badge-warn { background: var(--amber-bg); color: #6B520A; }
.badge-expired, .badge-archived, .badge-info, .badge-past { background: var(--chip); color: var(--muted); }
.badge-gold { background: var(--gold); color: var(--black); }

/* ---------- Banners ---------- */
.banner {
  border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 700;
}
.banner-warn { background: var(--amber-bg); border-color: #E8D193; color: #4A3906; }
.banner-ok { background: var(--green-bg); border-color: #B8DCC3; color: #145A2D; }
.banner-error { background: var(--red-bg); border-color: #EDBDB8; color: #8F1E17; }
.banner a { color: inherit; text-decoration: underline; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tab {
  min-height: 44px; padding: 10px 16px; background: none; border: 0; border-bottom: 3px solid transparent;
  font: 900 13px var(--body); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.tab:hover { color: var(--ink); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 180px; flex: 1 1 180px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  background: var(--ink); color: #FFFFFF; padding: 14px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.toast-error { background: var(--red); }
.toast-ok { background: var(--green); }

/* ---------- Dialog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  max-width: min(480px, calc(100vw - 32px)); background: var(--card); color: var(--ink);
}
dialog::backdrop { background: rgba(5, 5, 5, 0.55); }
dialog h2 { font-size: 28px; margin-bottom: 10px; }
dialog p { margin: 0 0 18px; }

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--black); }
.login-card { width: 100%; max-width: 440px; background: var(--card); border-radius: var(--radius); padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-size: 40px; }
.login-brand { font-family: var(--display); font-size: 22px; letter-spacing: 2px; color: var(--gold-text); }

/* ---------- Check-in ---------- */
.checkin-head { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0 12px; display: flex; flex-direction: column; gap: 12px; }
.checkin-count { font-family: var(--display); font-size: 40px; line-height: 1; }
.checkin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checkin-btn {
  width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
  color: var(--ink); text-align: left; cursor: pointer; font: 500 15px var(--body);
}
.checkin-btn:hover { border-color: var(--ink); }
.checkin-btn[aria-pressed="true"] { background: var(--green-bg); border-color: var(--green); }
.checkin-name { font-weight: 900; font-size: 17px; overflow-wrap: anywhere; }
.checkin-state { font-weight: 900; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.checkin-btn[aria-pressed="true"] .checkin-state { color: var(--green); }

/* ---------- Questions ---------- */
.question { gap: 10px; }
.question-msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.question-reply { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 12px 14px; background: var(--paper); border-radius: 8px; font-size: 14px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.gallery-item { padding: 12px; gap: 10px; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--paper); }

/* ---------- Theme picker ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.theme-card {
  display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 44px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--card);
  cursor: pointer; text-align: left; font: 700 14px var(--body); color: var(--ink);
}
.theme-card:hover { border-color: var(--ink); }
.theme-card[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.swatches { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr; height: 44px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.swatches span { display: block; }
.color-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Theme swatch colours. Generated from src/lib/themes-data.js. */
.swatch-noir .sw-bg { background: #050505; }
.swatch-noir .sw-surface { background: #111111; }
.swatch-noir .sw-accent { background: #C5A021; }
.swatch-noir .sw-accent2 { background: #00F2FF; }
.swatch-ivory .sw-bg { background: #F7F2E8; }
.swatch-ivory .sw-surface { background: #FFFDF8; }
.swatch-ivory .sw-accent { background: #7A1F2B; }
.swatch-ivory .sw-accent2 { background: #56633D; }
.swatch-blush .sw-bg { background: #FBF1EE; }
.swatch-blush .sw-surface { background: #FFFFFF; }
.swatch-blush .sw-accent { background: #B8325A; }
.swatch-blush .sw-accent2 { background: #6B3A7D; }
.swatch-emerald .sw-bg { background: #0B1A2B; }
.swatch-emerald .sw-surface { background: #10243A; }
.swatch-emerald .sw-accent { background: #2BB673; }
.swatch-emerald .sw-accent2 { background: #E9D8A6; }
.swatch-sunset .sw-bg { background: #FFF6E5; }
.swatch-sunset .sw-surface { background: #FFFFFF; }
.swatch-sunset .sw-accent { background: #FF5A1F; }
.swatch-sunset .sw-accent2 { background: #0E7C7B; }
.swatch-crimson .sw-bg { background: #0A0A0A; }
.swatch-crimson .sw-surface { background: #141414; }
.swatch-crimson .sw-accent { background: #D7263D; }
.swatch-crimson .sw-accent2 { background: #F2F2F2; }
.swatch-teal .sw-bg { background: #F1F8F6; }
.swatch-teal .sw-surface { background: #FFFFFF; }
.swatch-teal .sw-accent { background: #0F7C7A; }
.swatch-teal .sw-accent2 { background: #2E7D32; }
.swatch-lavender .sw-bg { background: #F6F2FB; }
.swatch-lavender .sw-surface { background: #FFFFFF; }
.swatch-lavender .sw-accent { background: #7B4FC4; }
.swatch-lavender .sw-accent2 { background: #A8376F; }
.swatch-rosegold .sw-bg { background: #FBF6F2; }
.swatch-rosegold .sw-surface { background: #FFFFFF; }
.swatch-rosegold .sw-accent { background: #A55C67; }
.swatch-rosegold .sw-accent2 { background: #86683A; }
.swatch-sageblush .sw-bg { background: #F4F6F0; }
.swatch-sageblush .sw-surface { background: #FFFFFF; }
.swatch-sageblush .sw-accent { background: #56765B; }
.swatch-sageblush .sw-accent2 { background: #AE4862; }
.swatch-plumgold .sw-bg { background: #1E0F24; }
.swatch-plumgold .sw-surface { background: #2A1633; }
.swatch-plumgold .sw-accent { background: #D4AF37; }
.swatch-plumgold .sw-accent2 { background: #E7A6C4; }

/* ---------- Loading ---------- */
.loading { color: var(--muted); font-size: 14px; padding: 24px 0; }
.page-error { max-width: 640px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; max-height: 100vh; padding: 10px 16px; gap: 0; }
  .brand { padding: 0; justify-content: space-between; }
  .brand-mark { width: 36px; height: 36px; font-size: 17px; }
  .brand-name { font-size: 20px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
    margin-left: auto; padding: 8px 14px; border: 1px solid #3A3A3A; border-radius: 8px;
    background: transparent; color: #FFFFFF; font: 900 13px var(--body); letter-spacing: 1px; cursor: pointer;
  }
  .sidebar .nav, .sidebar .sidebar-foot { display: none; }
  body.nav-open .sidebar .nav, body.nav-open .sidebar .sidebar-foot { display: flex; }
  body.nav-open .sidebar .nav { padding-top: 12px; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 38px; }
  .grid-2-even, .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 44px; }
  .card { padding: 18px 16px; }
  .panel-dark { padding: 20px 18px; }
  .panel-dark h2 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Door scanner. BIGSHOOW_TICKETS_V11 */
.scan-card { display: flex; flex-direction: column; gap: 14px; }
.scan-toggle { min-height: 48px; }
.scan-frame { position: relative; width: 100%; max-width: 480px; margin: 0 auto; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #000; }
.scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-target { position: absolute; inset: 18%; border: 4px solid rgba(255,255,255,0.9); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,0.35); }
.scan-verdict { border-radius: 14px; padding: 18px 20px; color: #fff; text-align: center; }
.scan-verdict[hidden] { display: none; }
.scan-ok { background: #15803d; }
.scan-warn { background: #b45309; }
.scan-bad { background: #b91c1c; }
.scan-verdict-title { font-size: 26px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.scan-verdict-name { font-size: 22px; font-weight: 700; margin-top: 4px; }
.scan-verdict-sub { font-size: 14px; opacity: 0.92; margin-top: 2px; }
.scan-verdict-msg { font-size: 14px; margin-top: 8px; }
.scan-manual { display: flex; gap: 8px; }
.scan-manual input { flex: 1; min-height: 44px; }

/* Name badges. A4 pages, N badges each, printed straight from the browser. BIGSHOOW_TICKETS_V11 */
.badge-controls { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; }
.badge-sheets { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.badge-page { width: 210mm; height: 297mm; padding: 10mm; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.18); display: grid; gap: 6mm; }
.badge-page.cols-1 { grid-template-columns: 1fr; }
.badge-page.cols-2 { grid-template-columns: 1fr 1fr; }
.badge-page.rows-2 { grid-template-rows: repeat(2, 1fr); }
.badge-page.rows-3 { grid-template-rows: repeat(3, 1fr); }
.badge-page.rows-4 { grid-template-rows: repeat(4, 1fr); }
.badge-page.rows-5 { grid-template-rows: repeat(5, 1fr); }
.name-badge { display: flex; flex-direction: column; justify-content: space-between; border: 1.5px dashed #999; border-radius: 4mm; padding: 5mm 6mm; color: #111; overflow: hidden; font-family: Montserrat, Arial, sans-serif; }
.nb-top { display: flex; justify-content: space-between; gap: 4mm; font-size: 9pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5pt; border-bottom: 3px solid #c5a021; padding-bottom: 2mm; }
.nb-event { color: #555; text-align: right; }
.nb-main { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.nb-hello { font-size: 10pt; color: #555; }
.nb-first { font-family: 'Bebas Neue', Impact, sans-serif; font-size: 44pt; line-height: 1; min-height: 44pt; }
.is-guest .nb-first { border-bottom: 1.5px solid #333; margin: 4mm 6mm 2mm; }
.nb-full { font-size: 12pt; font-weight: 600; }
.nb-foot { display: flex; justify-content: space-between; font-size: 9pt; color: #444; }
.nb-member { font-weight: 800; color: #8a6a12; }
.rows-5 .nb-first { font-size: 32pt; min-height: 32pt; }
.rows-4 .nb-first { font-size: 38pt; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sidebar, .skip-link, .no-print, .toast, .topbar { display: none !important; }
  .app, .main, #content { display: block; padding: 0; margin: 0; max-width: none; }
  .badge-sheets { gap: 0; display: block; }
  .badge-page { box-shadow: none; page-break-after: always; break-after: page; }
}
