/* No web fonts are loaded, so no third party ever sees a visitor's address. */
:root {
  --bg: #f4f6fb; --card: #fff; --ink: #172033; --muted: #66738a; --line: #e3e8f0;
  --brand: #0f766e; --brand-2: #0e9f8e; --brand-dark: #0b5d57; --brand-ink: #fff;
  --accent: #4f46e5;
  --warn: #b45309; --bad: #b91c1c; --ok: #15803d; --soft: #ecf8f6;
  --shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 6px 20px rgba(23, 32, 51, .06);
  --shadow-lg: 0 12px 40px rgba(23, 32, 51, .18);
  --r: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(900px 380px at 100% -80px, #d9f3ee 0%, transparent 70%), radial-gradient(800px 360px at -10% -60px, #e3e4fb 0%, transparent 70%), var(--bg);
  background-attachment: fixed; -webkit-font-smoothing: antialiased;
}
main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 72px; }
main.narrow { max-width: 540px; }
h1 { font-size: 1.65rem; margin: 14px 0 4px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 1.1rem; margin: 0 0 10px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 0; font-weight: 700; }
p { margin: 0 0 10px; }
a { color: var(--brand); font-weight: 600; }
a:hover { color: var(--brand-dark); }
.muted { color: var(--muted); font-size: .9rem; }

/* Top bar with the brand, injected by app.js on every page */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.4) blur(10px); background: rgba(255,255,255,.78); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.02em; font-size: 1.08rem; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: .95rem;
  background: linear-gradient(135deg, var(--brand-2), var(--accent)); box-shadow: 0 4px 12px rgba(79, 70, 229, .3); }
.brand small { font-weight: 500; color: var(--muted); font-size: .78rem; margin-left: 2px; }
.topbar .tag { font-size: .78rem; color: var(--muted); font-weight: 500; padding-left: 10px; border-left: 1px solid var(--line); }
.topbar-in { justify-content: flex-start; }
.topbar .tag { flex: 1 1 auto; }
.toplink { margin-left: auto;font-size: .84rem; font-weight: 600; color: var(--brand-dark); text-decoration: none; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); background: #fff; }
.toplink:hover { background: var(--soft); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-top: 16px; box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 200px; min-width: 0; }

label { display: block; font-weight: 600; font-size: .86rem; margin: 15px 0 5px; color: #2b3650; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1.5px solid #cfd6e3; border-radius: 11px; font: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #aeb8cb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(14, 159, 142, .16); }
button:focus-visible { outline: 3px solid rgba(14, 159, 142, .4); outline-offset: 2px; }
textarea { min-height: 110px; resize: vertical; }
button, .btn {
  display: inline-block; padding: 10px 18px; border-radius: 11px; border: 1px solid transparent; color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, var(--brand-2), var(--brand)); box-shadow: 0 1px 2px rgba(11, 93, 87, .3), 0 6px 14px rgba(15, 118, 110, .22);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
button:hover, .btn:hover { filter: brightness(1.06); color: var(--brand-ink); transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(0); }
button.ghost, .btn.ghost { background: #fff; color: var(--brand); border-color: #bfe3de; box-shadow: none; }
button.ghost:hover, .btn.ghost:hover { background: var(--soft); color: var(--brand-dark); }
button.danger { background: #fff; color: var(--bad); border-color: #f3b4b4; box-shadow: none; }
button.danger:hover { background: #fef2f2; color: var(--bad); }
button.small, .btn.small { padding: 5px 11px; font-size: .84rem; border-radius: 9px; box-shadow: none; }
button:disabled { opacity: .55; cursor: default; transform: none; filter: none; }
button.block { width: 100%; margin-top: 18px; padding: 14px; font-size: 1.02rem; border-radius: 13px; }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 9px; }
.choice label { margin: 0; font-weight: 500; border: 1.5px solid #d3dae6; border-radius: 12px; padding: 11px 13px; cursor: pointer; display: flex; gap: 9px; align-items: center; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice label:hover { border-color: #9fd3cc; }
.choice input { width: auto; accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand-2); background: var(--soft); font-weight: 600; box-shadow: 0 0 0 3px rgba(14, 159, 142, .12); }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; }
[hidden] { display: none !important; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--brand-2), var(--accent)); }
.tile b { display: block; font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.tile span { color: var(--muted); font-size: .84rem; font-weight: 500; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cols > .card { margin-top: 0; }
.cols { margin-top: 16px; }

.scroll { overflow-x: auto; border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; background: #f7f9fc; }
tbody tr:hover td { background: #f9fbfd; }
td.num, th.num { text-align: right; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill.yes { background: #dcfce7; color: var(--ok); }
.pill.no { background: #fee2e2; color: var(--bad); }
.pill.maybe { background: #e0e7ff; color: #3730a3; }
.pill.pending { background: #fef3c7; color: var(--warn); }
.pill.plain { background: #eaeef4; color: var(--muted); }
.pill.ready { background: #fef3c7; color: var(--warn); }
.pill.onway { background: #dbeafe; color: #1d4ed8; }
.pill.reached { background: #dcfce7; color: var(--ok); }

.linkbox { background: var(--soft); border: 1.5px dashed #7cc9bf; border-radius: 11px; padding: 10px 13px; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .86rem; }
.cabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 12px; }
.cab { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; box-shadow: var(--shadow); }
.cab.over { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(185, 28, 28, .1); }
.cab .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.cab .fields input { padding: 7px 9px; font-size: .88rem; border-radius: 9px; }
.cab .fields input:first-child { grid-column: 1 / -1; }
.rider { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.rider .grow { flex: 1 1 auto; }
.rider select { width: auto; max-width: 130px; padding: 4px 6px; font-size: .82rem; border-radius: 8px; }
.notice { background: #fff7e0; border: 1px solid #f1d38a; border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: .92rem; }
.notice.ok { background: #e6f8ec; border-color: #a6dcb8; }

/* Full-screen "you are checked in" confirmation, shown on the guest's phone to the organiser at the entry. */
.welcome { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(600px 400px at 80% 0%, rgba(255,255,255,.18), transparent 60%), linear-gradient(160deg, #0f766e, #15803d); color: #fff; text-align: center; overflow-y: auto; }
.welcome[hidden] { display: none; }
.welcome-box { width: 100%; max-width: 420px; }
.welcome .tick { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; background: #fff; color: #15803d; font-size: 4.2rem; line-height: 112px; font-weight: 700;
  box-shadow: 0 0 0 10px rgba(255,255,255,.2), 0 10px 30px rgba(0,0,0,.2); animation: pop .45s ease-out; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.welcome h1 { color: #fff; font-size: 2rem; margin: 0 0 6px; }
.welcome .wname { font-size: 1.6rem; font-weight: 700; margin: 14px 0 2px; }
.welcome .wmeta { font-size: 1.05rem; opacity: .9; margin: 0; }
.welcome .wtime { font-size: 2.2rem; font-weight: 700; margin: 18px 0 2px; font-variant-numeric: tabular-nums; }
.welcome .wdate { opacity: .9; margin: 0 0 18px; }
.welcome .wnote { background: rgba(255,255,255,.18); border-radius: 12px; padding: 12px 14px; font-size: 1.1rem; font-weight: 600; margin: 0 0 18px; }
.welcome button { background: #fff; color: #166534; border: 0; box-shadow: none; }
.pausebar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow-lg); }
.pausebar[hidden] { display: none; }

/* Wrong QR code while scanning: dark red on a light red box, with a short shake */
.scanbad { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fee2e2; border: 2px solid #b91c1c; color: #7f1d1d; font-weight: 700; font-size: .95rem; text-align: center; }
.scanbad.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

/* "Remember your Employee ID" card on the guest's confirmation */
.idnote { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #eef2ff, #e0e7ff); border: 1px solid #c7d2fe; color: #312e81; }
.idnote-icon { font-size: 1.8rem; line-height: 1; }
.idnote b { font-size: 1rem; }
.idnote p { margin: 8px 0 0; font-size: .88rem; color: #3730a3; }
.idnote-chip { display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: #fff; border: 2px dashed #6366f1; font-size: 1.3rem; font-weight: 800; letter-spacing: .08em; color: #1e1b4b; font-variant-numeric: tabular-nums; }

dialog { border: 0; border-radius: 20px; padding: 22px; width: min(480px, 94vw); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(80px); background: #172033; color: #fff; padding: 11px 18px; border-radius: 12px; transition: transform .2s; max-width: 92vw; z-index: 60; box-shadow: var(--shadow-lg); }
#toast.show { transform: translateX(-50%); }
#toast.bad { background: var(--bad); }

.summary { list-style: none; padding: 0; margin: 12px 0 0; }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.summary li:last-child { border-bottom: 0; }
.summary li span:first-child { color: var(--muted); }
.summary li span:last-child { font-weight: 600; text-align: right; }

/* Consent line on the guest form, and the privacy page */
.consent { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: #f3f6fb; border: 1px solid var(--line); }
.consent .muted { margin-bottom: 8px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 500; font-size: .9rem; }
.consent-check input { width: auto; margin-top: 3px; }
.privacy-line { margin-top: 12px; }
.legal .card h2 { margin-bottom: 8px; }
.legal ul.plain { padding-left: 20px; margin: 0 0 10px; }
.legal ul.plain li { margin: 6px 0; }
/* Event code card */
.codecard { border-color: #c7d2fe; background: linear-gradient(135deg, #f5f7ff, #eef2ff); }
.codebig { margin: 12px 0; padding: 14px; text-align: center; border-radius: 14px; background: #fff; border: 2px dashed #6366f1; font-size: 2rem; font-weight: 800; letter-spacing: .18em; color: #1e1b4b; font-variant-numeric: tabular-nums; user-select: all; }
details.card summary { cursor: pointer; }

/* Landing hero on the create page */
.hero { padding: 26px 4px 6px; }
.hero .eyebrow { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--brand-dark); box-shadow: var(--shadow); }
.hero h1 { font-size: 2.1rem; margin: 14px 0 8px; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.02rem; max-width: 46ch; }
.hero .steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero .steps span { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: .84rem; font-weight: 600; box-shadow: var(--shadow); }

@media (max-width: 520px) {
  h1 { font-size: 1.45rem; }
  .hero h1 { font-size: 1.75rem; }
  .card { padding: 15px; border-radius: 14px; }
  .topbar .tag { display: none; }
}

@media print {
  body { background: #fff; font-size: 12pt; }
  main { max-width: none; padding: 0; }
  .noprint, .topbar { display: none !important; }
  .card, .sheetcab { border: 0; padding: 0; box-shadow: none; }
  .sheetcab { break-inside: avoid; }
}
.sheetcab { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 14px; }
.sheetcab table th, .sheetcab table td { border: 1px solid #999; }
.sheetcab .meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 4px 0 10px; }
