/* Pyrotest admin. Farver fra designretning A (nattehimmel + guld) med lyse arbejdsflader. */
:root {
  --night: #0B0E1A;
  --night-2: #141A2E;
  --gold: #F2B544;
  --gold-dark: #8A5A00;
  --ink: #15161A;
  --muted: #5C5F6A;
  --line: #DDE0E5;
  --bg: #F4F5F8;
  --card: #FFFFFF;
  --ok: #0E7C4A;
  --ok-bg: #E6F4EC;
  --warn: #8A4B00;
  --warn-bg: #FFF4DF;
  --err: #B3122A;
  --err-bg: #FDECEE;
  --info: #1F4F99;
  --info-bg: #E9F0FB;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: #1F4F99; }
a:hover { color: #0D2E63; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; background: #EEF0F3; padding: 2px 6px; border-radius: 4px; }
code.wrap { word-break: break-all; display: inline-block; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: absolute; top: 8px; left: 8px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Topbar */
.topbar { background: var(--night); color: #EDEFF7; }
.topbar__inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 64px; }
.brand { font-weight: 800; letter-spacing: .06em; font-size: 20px; color: #EDEFF7; text-decoration: none; }
.brand span { color: var(--gold); }
.brand small { font-weight: 500; letter-spacing: 0; color: #A3A9C2; font-size: 13px; margin-left: 4px; }
.brand--dark { color: var(--night); font-size: 24px; margin-bottom: 1.25rem; }
.brand--dark span { color: var(--gold-dark); }
.mainnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; flex: 1 1 auto; }
.mainnav a, .mainnav .linkbtn { color: #EDEFF7; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.mainnav a:hover, .mainnav .linkbtn:hover { background: var(--night-2); color: var(--gold); }
.mainnav a[aria-current="page"] { background: var(--night-2); color: var(--gold); font-weight: 600; }
.mainnav__spacer { flex: 1; }
.menu-toggle { display: none; margin-left: auto; background: transparent; border: 0; color: #EDEFF7; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .mainnav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .nav-open .mainnav { display: flex; }
  .mainnav__spacer { display: none; }
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 20px; }
.adminfoot { color: var(--muted); font-size: 13px; padding-top: 0; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions--stack { flex-direction: column; align-items: flex-start; margin: 1rem 0; }
.crumbs { margin: 0 0 .25rem; font-size: 14px; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols > * { flex: 1 1 380px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card--highlight { border: 2px solid var(--gold); background: #FFFBF1; }

/* Formularer */
.form { display: flex; flex-direction: column; gap: 14px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--ink); border: 1px solid #B9BEC8; border-radius: 8px; padding: 10px 12px; min-height: 44px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
input:disabled { background: #F0F1F4; color: var(--muted); }
.help { color: var(--muted); font-size: 14px; margin: 0; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.checks { border: 1px solid var(--line) !important; border-radius: 8px; padding: 12px 14px !important; gap: 4px !important; margin-bottom: 8px !important; }
.checks legend { font-weight: 700; padding: 0 6px; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; min-height: 44px; padding-top: 10px; }
.check input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--night); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: .5rem 0; }
.inline-form label { flex: 1 1 220px; }
.inline-form input[name="code"] { max-width: 180px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 1rem 0; }
.filters label { min-width: 200px; }
form.inline { display: inline; }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid #B9BEC8; background: #fff; color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: #F0F1F4; color: var(--ink); }
.btn--primary { background: var(--night); border-color: var(--night); color: #fff; }
.btn--primary:hover { background: #222A45; color: #fff; }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.btn--passkey { background: var(--gold); border-color: var(--gold); color: var(--night); }
.btn--passkey:hover { background: #F7C766; color: var(--night); }
.btn--danger { color: var(--err); border-color: #E3A3AD; }
.btn--danger:hover { background: var(--err-bg); color: var(--err); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn--block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 8px 0; font: inherit; color: #1F4F99; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Beskeder og mærker */
.alert { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; border: 1px solid; }
.alert--success { background: var(--ok-bg); color: var(--ok); border-color: #A8D8BC; }
.alert--error { background: var(--err-bg); color: var(--err); border-color: #F1B5BF; }
.alert--warning { background: var(--warn-bg); color: var(--warn); border-color: #F2D29B; }
.alert--info { background: var(--info-bg); color: var(--info); border-color: #B9CDEE; }
.alert a { color: inherit; font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #EEF0F3; color: var(--muted); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }

/* Tabeller og lister */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #FAFBFC; }
.table tr:last-child td { border-bottom: 0; }
.list { list-style: none; margin: 0 0 1rem; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.log { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.log li { padding: 4px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.codes code { font-size: 1.05rem; display: block; text-align: center; padding: 8px; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 1rem; }
.qr { margin: 12px 0; }
.qr img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.secret { display: inline-block; margin-top: 4px; letter-spacing: .08em; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.subnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.pager { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { display: flex; gap: 10px; padding: 6px 0; }
.checklist__mark { font-weight: 800; width: 1.2em; }
.checklist .ok .checklist__mark { color: var(--ok); }
.checklist .fail { color: var(--err); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Oversigt */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 1rem 0 1.5rem; }
.tile { background: var(--night); color: #EDEFF7; border-radius: var(--radius); padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.tile:hover { background: var(--night-2); color: #fff; }
.tile__num { font-size: 2.2rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.tile__num--small { font-size: 1.5rem; }
.tile__label { color: #C9CEE0; }
.tile__note { color: var(--gold); font-size: 14px; }
.roadmap { list-style: none; padding: 0; margin: 0; }
.roadmap li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
.roadmap li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #B9BEC8; }
.roadmap li.done::before { background: var(--ok); border-color: var(--ok); }

/* Login-sider */
body.auth, body.soon { background: var(--night); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.authbox { background: #fff; border-radius: 14px; padding: 32px 28px; width: 100%; max-width: 420px; }
.authbox--wide { max-width: 760px; }
.authbox h1 { font-size: 1.6rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 13px; font-weight: 700; color: var(--gold-dark); margin: 0 0 .25rem; }
.soon__box { color: #EDEFF7; text-align: center; max-width: 560px; }
.soon__box .brand--dark { color: #EDEFF7; font-size: 32px; }
.soon__box .brand--dark span { color: var(--gold); }
.soon__box h1 { font-size: 2.2rem; }
.soon__box p { color: #B4BAD1; font-size: 1.1rem; }
