/* =====================================================================
   TIDER · registrering og admin (telefon først)
   Samme mørke neon-udtryk som tavlen og hrcrvintercup.dk.
   ===================================================================== */
:root {
  color-scheme: dark;
  --bg: #040918;
  --line: rgba(110, 150, 255, .16);
  --line-2: rgba(120, 165, 255, .32);
  --blue: #2a6dff;
  --blue-hi: #5aa2ff;
  --violet: #7a5cff;
  --pink: #ff2fa8;
  --pink-hi: #ff6fc6;
  --gold: #ffcc33;
  --green: #5ee3a1;
  --red: #ff6b86;
  --ink: #f3f7ff;
  --ink-2: #b6c4e4;
  --ink-3: #7c8db6;
  --blue-panel: linear-gradient(180deg, #2a6dff, #0d3bd1);
  --panel: linear-gradient(170deg, rgba(16, 36, 90, .8), rgba(7, 17, 44, .7));
  --font: 'Saira', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background: radial-gradient(60% 40% at 0% 0%, rgba(42, 109, 255, .2), transparent 70%), radial-gradient(50% 40% at 100% 10%, rgba(255, 47, 168, .1), transparent 70%), var(--bg);
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
a { color: var(--blue-hi); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #19e0ff; outline-offset: 2px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.f-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
.f-top img { height: 36px; width: auto; }
.f-back { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; text-decoration: none; color: var(--ink-2); }
.f-back:hover { color: #fff; }
.f-wrap { max-width: 760px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px)); }
.f-wrap.wide { max-width: 1180px; }
.kicker { font-stretch: 75%; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: 11px; color: var(--blue-hi); }
h1 { margin-top: 6px; font-weight: 900; font-style: italic; text-transform: uppercase; font-stretch: 108%; font-size: clamp(26px, 6vw, 40px); line-height: 1.02; text-wrap: balance; }
.lead { margin-top: 10px; color: var(--ink-2); max-width: 60ch; }

.step { position: relative; margin-top: 22px; padding: 18px 18px 18px 20px; background: var(--panel); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
.step::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.step h2 { display: flex; align-items: center; gap: 10px; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 19px; }
.step h2 > span { display: inline-grid; place-items: center; width: 28px; height: 28px; font-size: 15px; background: var(--blue-panel); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.step h2 small { font-style: normal; font-weight: 600; text-transform: none; font-size: 13px; color: var(--ink-3); }
.hint { margin-top: 6px; font-size: 14px; color: var(--ink-3); }

.field { display: block; margin-top: 12px; }
.field > span { display: block; margin-bottom: 5px; font-stretch: 80%; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 11px; color: var(--ink-3); }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="password"], input:not([type]), select {
  width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 0; background: rgba(4, 12, 34, .8); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 16px;
}
input:focus, select:focus { box-shadow: inset 0 0 0 2px var(--blue-hi); outline: none; }
input::placeholder { color: #5d6e96; }

/* Valglister (transpondere, kørere, klasser) */
.opts { display: grid; gap: 6px; margin-top: 12px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; text-align: left; cursor: pointer; border: 0; background: rgba(14, 31, 77, .7); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.opt:hover { box-shadow: inset 0 0 0 1px var(--blue-hi); }
.opt[aria-pressed="true"] { background: var(--blue-panel); box-shadow: none; }
.opt .t { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.opt .t b { display: block; font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt .t small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.opt[aria-pressed="true"] .t small { color: #cfe0ff; }
.opt .r { flex: none; font-weight: 800; font-style: italic; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.opt .ph { position: relative; flex: none; width: 40px; height: 40px; overflow: hidden; background: radial-gradient(70% 60% at 50% 40%, #12286a, #070f2c); clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%); }
.opt .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.opt .ph svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.2) translateY(9%); }
.opt .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink-hi); flex: none; }
.klasser { grid-template-columns: 1fr 1fr; }
.klasser .opt { min-height: 72px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.klasser .opt b { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 18px; }
.klasser .opt small { font-size: 12px; color: var(--ink-3); }
.klasser .opt[aria-pressed="true"] small { color: #cfe0ff; }
.more { margin-top: 10px; background: none; border: 0; padding: 6px 0; cursor: pointer; font-weight: 700; color: var(--blue-hi); text-decoration: underline; text-underline-offset: 3px; }

.photo { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.photo .prev { position: relative; flex: none; width: 76px; height: 95px; overflow: hidden; background: radial-gradient(70% 60% at 50% 40%, #12286a, #070f2c); clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%); }
.photo .prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo label { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; cursor: pointer; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; background: rgba(42, 109, 255, .16); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.photo input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 46px; padding: 0 20px; border: 0; cursor: pointer; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .05em; font-size: 14px; text-decoration: none; color: #fff; background: rgba(42, 109, 255, .16); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%); white-space: nowrap; }
.btn:hover { background: rgba(42, 109, 255, .32); }
.btn.hi { background: linear-gradient(90deg, var(--pink), var(--violet)); box-shadow: none; }
.btn.blue { background: var(--blue-panel); box-shadow: none; }
.btn.small { height: 36px; padding: 0 12px; font-size: 12px; }
.btn.danger { color: #ffd0d9; box-shadow: inset 0 0 0 1px rgba(255, 107, 134, .5); background: rgba(255, 107, 134, .1); }
.btn:disabled { opacity: .5; cursor: default; }
.submit { margin-top: 24px; width: 100%; height: 56px; font-size: 18px; }
.err { margin-top: 14px; padding: 12px 14px; color: #ffd0d9; background: rgba(255, 107, 134, .12); box-shadow: inset 0 0 0 1px rgba(255, 107, 134, .45); }
.ok { margin-top: 22px; padding: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px rgba(94, 227, 161, .45); }
.ok h2 { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 24px; color: var(--green); }
.ok p { margin-top: 8px; color: var(--ink-2); }
.ok .btn { margin-top: 16px; }
.picked { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.empty-note { margin-top: 10px; color: var(--ink-3); font-size: 14px; }

/* ---------- Admin ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.tabs button { height: 42px; padding: 0 16px; border: 0; cursor: pointer; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 14px; color: var(--ink-2); background: rgba(42, 109, 255, .1); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.tabs button[aria-pressed="true"] { background: var(--blue-panel); color: #fff; box-shadow: none; }
.tabs button .n { margin-left: .4em; padding: 0 .45em; font-style: normal; font-size: 12px; background: var(--pink); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.toolbar input[type="search"] { flex: 1 1 220px; }
.toolbar label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.list { display: grid; gap: 8px; margin-top: 14px; }
.item { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 12px 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.item.linked { box-shadow: inset 3px 0 0 0 var(--blue-hi), inset 0 0 0 1px var(--line); }
.item.unlinked { box-shadow: inset 3px 0 0 0 var(--pink-hi), inset 0 0 0 1px var(--line); }
.item .who b { display: block; font-weight: 800; }
.item .who small { display: block; color: var(--ink-3); font-size: 13px; }
.item .ctl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto auto; gap: 6px; align-items: center; }
.item .ctl select, .item .ctl input { height: 40px; font-size: 14px; padding: 0 10px; }
.item .sugg { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-3); }
.item .msg { grid-column: 1 / -1; font-size: 13px; color: var(--green); }
.item .msg.bad { color: var(--red); }
.flagrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px; background: var(--panel); box-shadow: inset 3px 0 0 0 var(--gold), inset 0 0 0 1px var(--line); }
.flagrow .who { flex: 1 1 220px; }
.flagrow .ev { font-size: 14px; color: var(--ink-2); }
.flagrow .ev b { color: var(--gold); font-style: italic; }
.drow { display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.drow .ph { position: relative; width: 48px; height: 60px; overflow: hidden; background: radial-gradient(70% 60% at 50% 40%, #12286a, #070f2c); }
.drow .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drow .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.drow input { height: 40px; font-size: 14px; }
.lrow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: 8px; align-items: center; padding: 10px 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.lrow input { height: 40px; font-size: 14px; }
.sec-h { margin-top: 26px; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 18px; }
.note { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.login { max-width: 360px; margin-top: 24px; display: grid; gap: 10px; }
@media (max-width: 760px) {
  .item { grid-template-columns: 1fr; }
  .item .ctl { grid-template-columns: 1fr 1fr; }
  .item .ctl select:first-child { grid-column: 1 / -1; }
  .drow { grid-template-columns: 52px 1fr; }
  .drow > *:nth-child(n+3) { grid-column: 1 / -1; }
  .lrow { grid-template-columns: 1fr 1fr; }
  .lrow > *:first-child { grid-column: 1 / -1; }
}
.note.warn { margin: 0 0 16px; padding: 10px 14px; color: #ffe7a3; background: rgba(255, 204, 51, .1); box-shadow: inset 0 0 0 1px rgba(255, 204, 51, .4); }
.note.warn b { color: #fff; }
.note.okn { margin: 0 0 16px; padding: 10px 14px; color: #c9f7df; background: rgba(94, 227, 161, .1); box-shadow: inset 0 0 0 1px rgba(94, 227, 161, .4); }
.tag-q { display: inline-block; margin-left: .5em; padding: 0 .45em; font-size: 12px; font-style: normal; font-weight: 800; color: #1a1300; background: var(--gold); }
.lrow-log { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 4px 12px; padding: 9px 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.lrow-log time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lrow-log.wait { box-shadow: inset 3px 0 0 0 var(--gold), inset 0 0 0 1px var(--line); }
.lrow-log.bad { box-shadow: inset 3px 0 0 0 var(--red), inset 0 0 0 1px var(--line); }
.lrow-log .err { grid-column: 2; color: var(--red); font-size: 13px; }
