/* GrabSpot visual identity: white, deep navy #0b1e28, coral #f7523c; Outfit (rounded geometric, like the wordmark). */
@font-face {
  font-family: "Outfit"; src: url("/static/fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --navy: #0b1e28; --coral: #f7523c; --coral-btn: #d93d28; --coral-text: #c23522; --coral-soft: #fff1ee;
  --bg: #f5f6f8; --surface: #ffffff; --border: #e3e6ea; --text: #0b1e28; --muted: #5b6872;
  --danger: #b3261e; --danger-bg: #fdecea; --ok: #1e6b4a; --ok-bg: #e8f5ee; --warn: #8a4b00; --warn-bg: #fff4e5;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.55;
}
body > main { flex: 0 0 auto; }
a { color: var(--coral-text); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2 { font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
h1 { margin: 0 0 .75rem; font-size: 2rem; } h2 { font-size: 1.3rem; margin: 1.5rem 0 .75rem; }
:focus-visible { outline: 3px solid rgba(247,82,60,.45); outline-offset: 2px; }

/* Header / footer */
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  max-width: 720px; width: 100%; margin: 0 auto; padding: 1.1rem 1.25rem 0; }
.site-header.end { justify-content: flex-end; max-width: none; }
.site-brand, .brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.site-brand img, .brand img { display: block; height: auto; }
.site-footer { margin-top: auto; text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }
.lang-switch { display: flex; gap: .45rem; font-size: .9rem; align-items: center; color: var(--muted); }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--navy); }
.lang-switch strong { color: var(--navy); }

/* Layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem;
  margin: 1.25rem auto 2rem; box-shadow: 0 10px 30px rgba(11,30,40,.06); overflow: hidden; }
.narrow { max-width: 680px; width: calc(100% - 2rem); }
.wide { max-width: 1200px; margin: 0 auto; padding: 1.5rem; width: 100%; }
.center { text-align: center; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 1rem 1rem 2rem; }
.hero-logo { width: min(200px, 50vw); height: auto; margin: 1rem 0 .5rem; }
.muted { color: var(--muted); }

/* Event */
.event-image { display: block; width: calc(100% + 4rem); max-width: none; margin: -2rem -2rem 1.5rem; height: auto;
  max-height: 60vh; object-fit: cover; background: var(--bg); }
.event-header h1 { font-size: 2.2rem; }
.facts { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; margin: 1rem 0; }
.facts dt { font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .12em; font-weight: 500; }
.facts dd { margin: .1rem 0 0; font-weight: 600; }
.description { white-space: pre-line; margin: 1.5rem 0; }
.cta { text-align: center; margin-top: 2rem; }

/* Buttons */
.button { display: inline-block; background: var(--coral-btn); color: #fff; border: 0; border-radius: 999px;
  padding: .65rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s; }
.button:hover { background: var(--coral-text); color: #fff; transform: translateY(-1px); }
.button.big { padding: .95rem 2rem; font-size: 1.15rem; width: 100%; max-width: 380px; }
.button.secondary { background: var(--surface); color: var(--navy); border: 1px solid var(--border); }
.button.secondary:hover { border-color: var(--navy); background: var(--surface); }
.button.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5c2bd; }
button.link { background: none; border: 0; color: var(--coral-text); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
button.link.danger { color: var(--danger); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form label.check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 500; }
input, select, textarea { font: inherit; color: var(--text); padding: .7rem .85rem; border: 1px solid #cfd5db;
  border-radius: 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(247,82,60,.18); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--coral-btn); }
input[type=file] { padding: .55rem; background: var(--bg); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.image-field { display: flex; flex-direction: column; gap: .5rem; }
.image-preview { max-width: 320px; width: 100%; border-radius: 10px; border: 1px solid var(--border); }

/* Messages */
.errors { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: .8rem 1rem .8rem 2rem; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 1rem; }
.success { background: var(--ok-bg); border-radius: 12px; padding: 1rem 1.25rem; margin: 1rem 0; }
.success h2 { margin-top: 0; color: var(--ok); }
.flash { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: .75rem 1rem; }
.ref { font-size: 1.25rem; letter-spacing: .1em; color: var(--coral-text); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .8rem 1.5rem; background: var(--surface); border-bottom: 3px solid var(--coral); position: sticky; top: 0; z-index: 10; }
.brand-sub { color: var(--muted); font-size: .85rem; padding-left: .7rem; border-left: 1px solid var(--border); }
.topbar button.link { color: var(--muted); text-decoration: none; }
.topbar button.link:hover { color: var(--navy); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.row h1, .row h2 { margin: 0; }
.actions { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.panels { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .panels { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.panel.qr { text-align: center; word-break: break-all; }
.detail-image { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-bottom: .5rem; }
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; background: #fafbfc; }
.table tbody tr:hover { background: #fafbfc; }
.mono { font-family: ui-monospace, "SF Mono", monospace; }
.badge { display: inline-block; font-size: .75rem; padding: .12rem .6rem; border-radius: 999px; background: var(--bg); color: var(--muted); font-weight: 600; }
.badge.open { background: var(--ok-bg); color: var(--ok); }
.badge.full { background: var(--warn-bg); color: var(--warn); }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .card { padding: 1.4rem; margin-top: 1rem; }
  .event-image { width: calc(100% + 2.8rem); margin: -1.4rem -1.4rem 1.25rem; }
  h1, .event-header h1 { font-size: 1.7rem; }
  .brand-sub { display: none; }
}

/* Tickets & check-in */
.ticket-body { text-align: center; border-top: 1px dashed var(--border); margin-top: 1.5rem; padding-top: 1rem; }
.ticket-qr { display: block; margin: .5rem auto; width: min(260px, 70vw); height: auto; image-rendering: pixelated; }
.admin-checkin { border-radius: 12px; padding: 1rem 1.25rem; margin: 1rem 0; border: 2px solid var(--border); }
.admin-checkin.arrived { background: var(--ok-bg); border-color: #9fd3b8; }
.admin-checkin.waiting { background: var(--warn-bg); border-color: #f3cf9c; }
.admin-checkin h2 { margin: 0 0 .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.big-status { font-size: 1.4rem; font-weight: 700; margin: .25rem 0; }
.checkin-stats .stat { font-size: 2.2rem; font-weight: 700; }
.progress { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.progress span { display: block; height: 100%; background: var(--coral); transition: width .3s; }
.small { font-size: .85rem; }
.panel + .panel { margin-top: 1rem; }
.scanner { text-align: center; }
.video-wrap { position: relative; max-width: 420px; margin: .5rem auto 1rem; border-radius: 14px; overflow: hidden; background: #000; }
.video-wrap video { display: block; width: 100%; }
.video-wrap .frame { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.scan-result { border-radius: 12px; padding: .9rem 1rem; margin: .5rem auto 1rem; max-width: 420px; font-size: 1.05rem; }
.scan-result strong { display: block; font-size: 1.3rem; }
.scan-result.ok { background: var(--ok-bg); color: var(--ok); }
.scan-result.already { background: var(--warn-bg); color: var(--warn); }
.scan-result.unknown, .scan-result.other_event { background: var(--danger-bg); color: var(--danger); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: .75rem 0; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .35rem .9rem; font: inherit; cursor: pointer; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.checkin-list { list-style: none; margin: 0; padding: 0; }
.checkin-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.checkin-list li.arrived strong { color: var(--ok); }
.button.small { padding: .4rem .9rem; font-size: .9rem; white-space: nowrap; }
