/* Arca Coach · én telefonsøjle med fast fanebjælke. Mørkt tema (SPEC). */
:root {
  --bg: #0f1215; --surface: #181d22; --surface-2: #212830; --line: #2b333c;
  --fg: #e9edf0; --muted: #8c97a3; --accent: #f2c94c; --accent-ink: #1a1500;
  --ok: #4cc38a; --wait: #f0a040; --wl: #6aa8f0; --bad: #ef6b6b;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; padding-top: env(safe-area-inset-top, 0px); }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.app { max-width: 480px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 calc(90px + env(safe-area-inset-bottom, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px 8px; }
.brand { font: 700 26px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.brand span { color: var(--accent); }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--muted); }
.demo-note { font-size: 12px; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 4px 8px; margin-bottom: 6px; }

h2 { font: 600 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; margin: 22px 0 10px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; }

.cap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.cap i { height: 8px; border-radius: 2px; background: var(--surface-2); }
.cap i.on { background: var(--accent); }
.capline { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 13px; color: var(--muted); }
.capline strong { font: 700 30px/1 var(--display); color: var(--fg); }

.day { margin-top: 18px; }
.day > .label { margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.card + .card { margin-top: 8px; }
.card.hl { border-color: var(--accent); }
.row { display: flex; align-items: center; gap: 12px; }
.time { font: 700 30px/1 var(--display); min-width: 64px; }
.what { flex: 1; min-width: 0; }
.what .name { font-weight: 600; }
.what .sub { font-size: 13px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.pill.confirmed { color: var(--ok); }
.pill.pending { color: var(--wait); }
.pill.waitlist { color: var(--wl); }
.pill.cancelled { color: var(--muted); }
.deadline { font-size: 13px; color: var(--wait); }
.deadline.calm { color: var(--muted); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 12px; font-weight: 600; min-height: 46px; }
.btn.keep { background: var(--ok); border-color: var(--ok); color: #06210f; }
.btn.drop { color: var(--bad); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 38px; padding: 7px 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.confirmbox { background: var(--surface-2); border-radius: 8px; padding: 10px; display: grid; gap: 8px; font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 0; }
.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.notice.err { border-style: solid; border-color: var(--bad); color: var(--fg); }

.scroller { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.daybtn { flex: 0 0 auto; width: 54px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 0; text-align: center; }
.daybtn .d { font: 700 22px/1 var(--display); display: block; }
.daybtn .w { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.daybtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.daybtn[aria-pressed="true"] .w { color: var(--accent-ink); }
.daybtn.locked { opacity: .5; }
select, input { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); padding: 11px 12px; font: inherit; width: 100%; min-width: 0; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slot .time { font-size: 24px; min-width: 54px; }
.slot .space { font-size: 13px; color: var(--muted); }
.slot .space.full { color: var(--wl); }

.rule { display: flex; align-items: center; gap: 10px; }
.rule .name { font: 600 20px/1.1 var(--display); letter-spacing: .02em; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; flex: 0 0 auto; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--accent-ink); }
.iconbtn { background: none; border: 0; color: var(--muted); padding: 8px; font-size: 18px; line-height: 1; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.formgrid > div { display: grid; gap: 4px; min-width: 0; }
.formgrid .full { grid-column: 1 / -1; }

.log { display: grid; }
.entry { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.entry .ts { color: var(--muted); font-size: 12px; padding-top: 2px; }
.entry.error .msg { color: var(--bad); }
.entry.warn .msg { color: var(--wait); }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting .sub { font-size: 13px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.stepper output { min-width: 58px; text-align: center; font: 700 20px/1 var(--display); }
.stack { display: grid; gap: 8px; }

.login { min-height: 70vh; display: grid; align-content: center; gap: 12px; }
.login .brand { font-size: 40px; }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(15, 18, 21, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); z-index: 20; }
nav.tabs .inner { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
nav.tabs button { background: none; border: 0; padding: 10px 0 12px; font-size: 11px; color: var(--muted); display: grid; justify-items: center; gap: 3px; position: relative; }
nav.tabs svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
nav.tabs button[aria-current="page"] { color: var(--accent); }
nav.tabs .dot { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--wait); color: #241400; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 30; max-width: calc(100% - 32px); text-align: center; }
.toast.err { background: var(--bad); color: #fff; }
.toast.has-action { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 22px; text-align: left; width: max-content; }
.toast.has-action button { flex: 0 0 auto; }
.toast button { border: 0; background: var(--bg); color: var(--accent); border-radius: 999px; padding: 7px 14px; font-weight: 700; min-height: 34px; }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

/* ---------- træning ---------- */
textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); padding: 11px 12px; font: inherit; width: 100%; resize: vertical; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; padding: 8px 6px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--fg); }
.q { font: 600 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; margin-top: 2px; }
.part { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 8px; }
.ph { display: flex; gap: 10px; align-items: center; }
.tag { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 18px/1 var(--display); }
.pn { font: 600 19px/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.pv { font-size: 14px; background: var(--bg); border-radius: 8px; padding: 9px 10px; line-height: 1.5; }
.pv b { color: var(--accent); }
.warn { color: var(--wait); }
.setchips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.setchips span { background: var(--surface-2); border-radius: 6px; padding: 2px 7px; font-size: 13px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; width: auto; color: var(--fg); }
select.mini { padding: 7px 12px; }
.formgrid.three { grid-template-columns: repeat(3, 1fr); }
.moverow { display: grid; grid-template-columns: 1fr 62px 62px 30px; gap: 6px; align-items: center; }
.moverow input, .moverow select { padding: 9px 8px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.check input { width: auto; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiles .pr, .pr { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.pr .v { font: 700 24px/1 var(--display); }
.pr .k { font-size: 12px; color: var(--muted); }
.pr.new { border-color: var(--accent); }
.pr.warnb { border-color: var(--wait); }
.pr.warnb .k { color: var(--wait); }
.listhead { display: grid; grid-template-columns: 1fr 84px 92px; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line); }
.listhead span:last-child { text-align: right; }
.exrow { display: grid; grid-template-columns: 1fr 84px 92px; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
.exrow .right { text-align: right; }
.exrow .big { font: 700 24px/1 var(--display); }
.exrow .big small { font: 500 12px var(--body); color: var(--muted); }
.spark { width: 84px; height: 30px; display: block; }
.delta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.badge { display: inline-block; font: 700 10px/1 var(--body); letter-spacing: .06em; background: var(--accent); color: var(--accent-ink); padding: 3px 5px; border-radius: 4px; vertical-align: 2px; }
.badge.warnbg { background: var(--wait); color: #241400; }
.backbtn { background: none; border: 0; color: var(--accent); padding: 6px 0; font-weight: 600; }
.chart { width: 100%; height: auto; display: block; }
.readout { font-size: 13px; color: var(--muted); min-height: 36px; }
.readout b { color: var(--fg); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pcell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: grid; gap: 2px; }
.pcell span { font-size: 12px; color: var(--muted); }
.pcell b { font: 700 20px/1 var(--display); }
.hist { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: start; }
.hist span:first-child { color: var(--muted); }
.ins { gap: 0; }
.inshead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 6px; }
.insrow { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.insrow .ic { font-size: 12px; padding-top: 3px; text-align: center; }
.insrow.ros .ic { color: var(--ok); }
.insrow.obs .ic { color: var(--wait); }
.insrow.forslag .ic { color: var(--accent); }
.facts { background: var(--bg); border-radius: 8px; padding: 10px; font: 11px/1.5 ui-monospace, Menlo, monospace; color: var(--muted); overflow-x: auto; white-space: pre; margin: 6px 0 10px; }
.mrow { display: grid; grid-template-columns: 118px 1fr 74px; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mname { font-size: 14px; }
.mname .badge { display: block; width: max-content; margin-top: 3px; }
.mbar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.mbar i.low { background: var(--wait); }
.mval { text-align: right; font-size: 14px; font-weight: 600; }
.mval span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.hmwrap { overflow-x: auto; }
.hmgrid { display: grid; grid-template-columns: 80px repeat(12, minmax(16px, 1fr)); gap: 3px; align-items: center; min-width: 300px; }
.hm-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk { border: 0; background: none; font-size: 11px; color: var(--muted); padding: 2px 0; border-radius: 4px; font-variant-numeric: tabular-nums; }
.wk[aria-pressed="true"] { background: var(--fg); color: var(--bg); font-weight: 700; }
.hm { display: block; height: 18px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--o) * 100%), var(--surface-2)); }
.hm.zero { background: var(--surface-2); }
.hm.sel { outline: 1.5px solid var(--fg); }
.hmlegend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 6px; justify-content: flex-end; }
.hmlegend i { width: 16px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--accent) calc(var(--o) * 100%), var(--surface-2)); }
.mini[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.linkbtn { background: none; border: 0; color: var(--accent); padding: 0; font: inherit; text-transform: none; letter-spacing: 0; text-decoration: underline; }
