:root {
  color-scheme: dark;
  --bg: #10110e;
  --raise: #1b1c17;
  --ink: #f6f1e7;
  --muted: #b7b1a3;
  --line: rgba(246, 241, 231, 0.14);
  --accent: #e8a15a;
  --room: #9ec3cf;
  --twins: #e8a15a;
  --ok: #12382c;
  --ok-ink: #e9fff4;
  --under: #7c1826;
  --under-ink: #fff5f5;
  --expired: #6d430c;
  --expired-ink: #fff3df;
  --ban: #140608;
  --ban-ink: #ffe4e6;
  --vip: #3a3014;
  --vip-ink: #ffe7b0;
  --danger: #ff6b78;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --cond: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "ui-monospace", "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(232, 161, 90, 0.16), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(158, 195, 207, 0.1), transparent 50%),
    var(--bg);
  color: var(--ink);
}
body[data-venue="After Hours"] {
  --accent: var(--room);
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(158, 195, 207, 0.18), transparent 55%),
    radial-gradient(700px 380px at 0% 0%, rgba(232, 161, 90, 0.06), transparent 46%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px 8px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--cond);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 1.25rem;
  text-decoration: none;
}
.wordmark small {
  display: block;
  letter-spacing: 0.32em;
  font-size: 0.62rem;
  color: var(--accent);
  font-weight: 700;
}
.top nav { display: flex; gap: 6px; }
.top nav a, .ghost, .solid {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
}
.top nav a[aria-current="page"], .solid {
  background: var(--ink);
  color: #16150f;
  border-color: var(--ink);
}
.spacer { flex: 1; }
.clockbox { text-align: right; }
.clockbox strong { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.clockbox span, .muted { color: var(--muted); }
.venue-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}
.venue-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.stage { padding: 8px 16px 24px; flex: 1; }
.slab, .card, .login {
  background: var(--raise);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.slab {
  min-height: calc(100dvh - 168px);
  padding: clamp(22px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  position: relative;
}
.slab[data-result="OK"] { background: var(--ok); color: var(--ok-ink); }
.slab[data-result="UNDER 21"] { background: var(--under); color: var(--under-ink); }
.slab[data-result="EXPIRED ID"] { background: var(--expired); color: var(--expired-ink); }
.slab[data-result="VIP"] { background: var(--vip); color: var(--vip-ink); }
.slab[data-result="BANNED"] {
  background:
    linear-gradient(#ff5d6c, #ff5d6c) top / 100% 12px no-repeat,
    var(--ban);
  color: var(--ban-ink);
}
.kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 700;
}
.repeat {
  align-self: flex-start;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 6px 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}
.name {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0;
}
.verdict {
  font-family: var(--cond);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.78;
  font-size: clamp(5.4rem, 18vw, 12rem);
  margin: 0;
}
.slab[data-result="UNDER 21"] .verdict,
.slab[data-result="EXPIRED ID"] .verdict {
  font-size: clamp(3.6rem, 12vw, 8.4rem);
}
.age {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
  font-weight: 650;
}
.turns { font-size: clamp(1.3rem, 2.4vw, 2rem); margin: 0; font-weight: 700; }
.meta { margin: 0; font-size: 1.15rem; }
.note {
  margin: 8px 0 0;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  max-width: 18ch;
}
.ready-mark {
  font-family: var(--cond);
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  margin: 0;
}
.listen {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(232, 161, 90, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 12px rgba(232, 161, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 161, 90, 0); }
}
.actions, .contact, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.contact label, .stack label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; }
input, select, textarea {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
.slab input { background: rgba(0, 0, 0, 0.18); }
.wide { min-width: min(100%, 240px); }
.manual { margin-top: 8px; }
.manual summary { cursor: pointer; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.error {
  background: #3a1218;
  color: #ffd5da;
  border-radius: 14px;
  padding: 12px 14px;
}
.notice { color: inherit; opacity: 0.9; }
.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 18px;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.wedge {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  left: 0;
  top: 0;
}
.camera {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
video {
  width: min(100%, 480px);
  border-radius: 16px;
  background: #000;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login { width: min(440px, 100%); padding: 32px 28px; }
.login h1 { font-family: var(--cond); letter-spacing: 0.14em; margin: 0 0 4px; }
.stack { display: grid; gap: 12px; margin-top: 18px; }

.layout { display: grid; gap: 16px; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { padding: 18px; }
.card h2 { margin: 0 0 12px; font-size: 1.3rem; }
.person {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.person strong { display: block; }
.nights { display: grid; gap: 10px; }
.night {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 0.7fr);
  gap: 8px;
  align-items: center;
  text-decoration: none;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--raise);
  border: 1px solid var(--line);
}
.night b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.night span { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stat { background: var(--raise); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat b { display: block; font-size: 1.8rem; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 4.2rem 1fr 2rem; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; }
.bar i { display: block; height: 8px; border-radius: 99px; background: var(--accent); width: calc(var(--w) * 1%); min-width: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-weight: 800;
}
.tag.ok { background: #164737; }
.tag.under, .tag.banned { background: #7c1826; }
.tag.expired { background: #6d430c; }
.tag.vip { background: #6a5420; }

.slab[data-screen="green"] { background: #0d3b28; color: #e9fff4; }
.slab[data-screen="red"] { background: #7a1420; color: #fff5f5; }
.slab[data-screen="yellow"] { background: #8a6508; color: #fffbe8; }
.slab[data-screen="yellow"] .verdict { font-size: clamp(3.2rem, 11vw, 8rem); }
.graceline { font-size: 1.1rem; font-weight: 600; margin: 8px 0; }
.door-phone { max-width: 480px; }
.door-phone label { color: inherit; }
.slab[data-screen="green"] .verdict,
.slab[data-screen="red"] .verdict { font-size: clamp(3.8rem, 14vw, 10rem); }

body[data-brand="keyed"] {
  background: #09090b;
  color: #f4f1ea;
}
.keyed-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; }
.keyed-card {
  width: min(460px, 100%);
  background: #121214;
  border: 1px solid rgba(244, 241, 234, 0.14);
  border-radius: 28px;
  padding: 36px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.keyed-mark {
  margin: 0;
  font-family: var(--cond);
  letter-spacing: 0.46em;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e4d3b4;
}
.keyed-card h1 { margin: 14px 0 8px; font-size: 2.1rem; letter-spacing: -0.04em; font-weight: 650; }
.keyed-lead, .keyed-meta { color: #b7b1a6; }
.keyed-venue { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: #e4d3b4; }
.keyed-note { color: #e4d3b4; }
.keyed-card .stack input { background: #0c0c0e; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.check input { min-height: 0; margin-top: 4px; }
.qr-frame { background: #f6f1e8; border-radius: 18px; padding: 16px; margin: 18px 0; }
.qr-frame svg { width: 100%; height: auto; display: block; }
.member-card { text-align: center; }

@media (max-width: 800px) {
  .columns, .night { grid-template-columns: 1fr; }
  .clockbox { text-align: left; }
  .top { padding: 14px; }
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark-logo { border-radius: 6px; display: block; }
.login-logo { display: block; border-radius: 10px; margin: 0 0 12px; }

.door-phone { display: grid; gap: 12px; }
.door-phone .check { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.door-phone .check input { width: 28px; height: 28px; flex: none; }
.door-phone input#door-phone { font-size: 1.3rem; }

/* Admin members: edit, merge, duplicates */
.table-scroll { overflow-x: auto; }
.members-table { min-width: 1180px; }
.members-table td, .members-table th { white-space: nowrap; }
.members-table td:nth-child(7) { white-space: normal; min-width: 160px; }
.dupbadge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; background: rgba(255, 193, 7, 0.15); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.5); }
.member-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.member-form .mf { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.member-form .mf input, .member-form .mf select { width: 100%; }
.member-form .wide-field { grid-column: 1 / -1; }
.merge-table th, .merge-table td { vertical-align: middle; }
.merge-table tr.differs th { color: #ffc107; }
.edit-log { font-size: 0.85rem; padding-left: 18px; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.merge-table input[type=radio], .members-table input[type=checkbox] { width: auto; display: inline-block; margin: 0 6px 0 0; vertical-align: middle; }
.merge-table label { display: flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
