:root {
  /* Bengaluru Stripe Community theme */
  --bg: #f6f9fc;
  --card: #ffffff;
  --ink: #061b31;          /* Stripe navy headings */
  --muted: #64748d;        /* Stripe slate body / second sentence */
  --line: #e5edf5;
  --brand: #533afd;        /* Stripe purple buttons + links */
  --brand-hover: #4434d4;
  --brand-ink: #ffffff;
  --brand-soft: #f2f0ff;
  --brand-line: #d6d9fc;   /* outline-button border */
  --soft: #f3f6fa;
  --font: "Söhne", "sohne-var", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --btn-radius: 4px;
  --field-radius: 6px;
  --grad: linear-gradient(90deg, #ff5a1f 0%, #ff5fa2 38%, #c64ee6 68%, #533afd 100%);
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --bad: #dc2626;
  --bad-bg: #fee2e2;
  --radius: 8px;
  --shadow: 0 0 0 1px rgba(6,27,49,.05), 0 2px 5px rgba(50,50,93,.07), 0 1px 1.5px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: var(--bg); color: var(--ink);
  font-size: 16px; line-height: 1.45; letter-spacing: -0.006em;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--brand-hover); }
h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 4px; }
h2 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.wrap.wide { max-width: 1100px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* buttons */
button, .btn {
  font: inherit; font-weight: 500; letter-spacing: -0.005em; cursor: pointer; border-radius: var(--btn-radius);
  padding: 11px 17px; background: var(--card); color: var(--brand); border: 1px solid var(--brand-line);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
button:hover, .btn:hover { border-color: #b9bffb; color: var(--brand-hover); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(83,58,253,.28); }
button:active, .btn:active { transform: scale(.985); }
.btn-primary, .btn-primary:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ok, .btn-ok:hover { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-bad, .btn-bad:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-ghost, .btn-ghost:hover { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-block { width: 100%; }
.btn-big { padding: 18px 20px; font-size: 18px; border-radius: 6px; }
/* Stripe-style chevron after a call to action: "Request an invite ›" */
.btn-arrow::after { content: ''; width: 7px; height: 7px; margin-left: 2px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); transition: transform .15s; }
.btn-arrow:hover::after { transform: translateX(3px) rotate(45deg); }
button:disabled { opacity: .5; cursor: default; }

input, select, textarea {
  font: inherit; width: 100%; padding: 12px 13px; border-radius: var(--field-radius);
  border: 1px solid #d5dbe1; background: #fff; color: var(--ink);
  box-shadow: 0 1px 1px rgba(0,0,0,.03); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a3acb9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(83,58,253,.2); }
label { display: block; font-weight: 500; color: var(--ink); margin: 12px 0 6px; font-size: 15px; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--grad); }
.topbar .title { font-weight: 500; font-size: 18px; letter-spacing: -0.015em; }
.topbar .sub { font-size: 13px; color: var(--muted); }

/* PIN pad */
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 22px; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; background: var(--line); }
.pin-dots span.on { background: var(--brand); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pinpad button { font-size: 24px; font-weight: 500; padding: 18px 0; color: var(--ink); border-color: var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.pinpad button:hover { color: var(--ink); border-color: var(--brand-line); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* station picker */
.station-grid { display: grid; gap: 12px; }
.station-btn { justify-content: flex-start; padding: 22px 20px; font-size: 20px; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.station-btn:hover { color: var(--ink); border-color: var(--brand-line); }
.station-btn .ico { font-size: 34px; width: 48px; text-align: center; }
.station-btn small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }

/* scanner */
.scanner { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1; max-height: 62vh; margin: 0 auto 14px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 14%; border: 4px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
.scanner .msg { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; color: #fff; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner.off .frame { display: none; }
.scanner .cam-off { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 24px; }

.results { margin-top: 10px; }
.result-item { width: 100%; justify-content: space-between; text-align: left; margin-bottom: 8px; color: var(--ink); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 400; }
.result-item b { display: block; }

/* full-screen result overlay */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: 24px 18px; overflow-y: auto; background: var(--card); }
.overlay.ok { background: var(--ok); color: #fff; }
.overlay.bad { background: var(--bad); color: #fff; }
.overlay.warn { background: var(--warn-bg); }
.overlay .big-icon { font-size: 84px; line-height: 1; text-align: center; margin: 4vh 0 10px; }
.overlay .headline { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; text-align: center; margin-bottom: 6px; }
.overlay .person { font-size: 24px; font-weight: 500; letter-spacing: -0.015em; text-align: center; }
.overlay .detail { text-align: center; opacity: .85; margin-top: 4px; }
.overlay .actions { margin-top: auto; display: grid; gap: 12px; padding-top: 24px; }
.overlay.ok .btn-ghost, .overlay.bad .btn-ghost { color: rgba(255,255,255,.9); }
.overlay .tag { display: block; width: fit-content; margin-left: auto; margin-right: auto; background: rgba(0,0,0,.12); padding: 6px 12px; border-radius: 999px; font-weight: 600; margin-top: 10px; }

.parking-q { font-size: 20px; font-weight: 700; text-align: center; margin: 26px 0 12px; }
.parking-grid { display: grid; gap: 12px; }
.parking-grid button { font-size: 21px; padding: 22px; border-radius: var(--radius); color: var(--ink); box-shadow: var(--shadow); border: 2px solid transparent; }
.parking-grid button.current { border-color: var(--brand); }
.parking-grid .ico { font-size: 30px; }

.banner { padding: 12px 14px; border-radius: var(--field-radius); font-weight: 600; text-align: center; }
.banner.warn { background: var(--warn); color: #fff; }

.countdown { height: 5px; background: rgba(255,255,255,.35); border-radius: 3px; overflow: hidden; margin-top: 14px; }
.countdown div { height: 100%; background: #fff; width: 100%; transition: width linear; }

/* admin */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.tabs button { background: transparent; border-color: transparent; color: var(--ink); padding: 9px 13px; white-space: nowrap; }
.tabs button:hover { color: var(--brand); border-color: transparent; }
.tabs button.active { background: var(--brand-soft); color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat .n { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; }
.stat .l { color: var(--muted); font-size: 14px; font-weight: 500; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar div { height: 100%; background: var(--grad); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 500; white-space: nowrap; }
td.code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: nowrap; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.yes { background: var(--ok-bg); color: #166534; }
.chk { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; cursor: pointer; }
.chk input { width: auto; margin: 0; accent-color: var(--brand); box-shadow: none; }
.pin { font-family: ui-monospace, Menlo, monospace; font-size: 17px; letter-spacing: 2px; font-weight: 700; }
.pill.wait { background: #fef3c7; color: #92400e; }
.pill.no { background: var(--soft); color: var(--muted); }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; display: flex; gap: 10px; }
.feed { padding: 0; margin: 0; }
.feed time { color: var(--muted); font-size: 14px; min-width: 64px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--bg); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--field-radius); z-index: 100; font-weight: 500; }
.pinpad button.btn-ok, .pinpad button.btn-ok:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* brand: event lockup + gradient swoosh (Bengaluru Stripe Community) */
.swoosh { position: fixed; inset: 0; background: url(/swoosh.svg) no-repeat right bottom / max(100%, 640px) auto; pointer-events: none; z-index: 0; }
.swoosh + .wrap { position: relative; z-index: 1; }
.lockup { font-size: 42px; line-height: 1.08; font-weight: 500; letter-spacing: -0.035em; margin: 0 0 14px; }
.lockup span { display: block; }
.lockup .city { color: var(--ink); }
.lockup .org { color: var(--muted); }
.lockup.sm { font-size: 22px; margin-bottom: 6px; }
.grad-rule { height: 4px; width: 72px; border-radius: 2px; background: var(--grad); margin: 0 auto 16px; }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); }
