/* Layout: mørkeblå sidebar i fuld højde med logo og menu, hvid topbar med sti og bruger, arbejdsflade på hvid/lyseblå */
:root {
  --navy: #242860;          /* LinkedInsider primær */
  --orange: #F26722;        /* accent og primære knapper */
  --periwinkle: #ADB6F9;
  --sky: #DBEDFD;
  --beige: #E8DFC9;
  --teal: #144E53;
  --mint: #D4E6DE;
  --leaf: #B9DAB8;
  --yellow: #F7C64E;
  --charcoal: #252424;

  --paper: #f6f8fc;
  --surface: #ffffff;
  --sunk: #eef3fb;
  --ink: var(--charcoal);
  --heading: var(--navy);
  --muted: #5d6079;
  --line: #e1e5f0;
  --brand: var(--navy);
  --brand-soft: var(--sky);
  --cta: var(--orange);
  --cta-ink: #ffffff;
  --side-bg: var(--navy);
  --side-ink: #ffffff;
  --side-muted: #b7bbe0;

  --good: #144E53; --good-soft: var(--mint);
  --warn: #7a5600; --warn-soft: #fcefcb;
  --crit: #b23a0b; --crit-soft: #fde4d6;
  --info: var(--navy); --info-soft: var(--sky);
  --neutral: #5a5446; --neutral-soft: #f1ece0;
  --av1: #242860; --av2: #144E53; --av3: #c4511a;
  --shadow: 0 1px 2px rgba(36, 40, 96, .06), 0 10px 30px rgba(36, 40, 96, .10);

  --f-display: "League Spartan", "Poppins", system-ui, sans-serif;
  --f-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121430; --surface: #1a1d40; --sunk: #22264f; --ink: #eceefa; --heading: #ffffff; --muted: #a4a8cc; --line: #2e3265;
    --brand: #ADB6F9; --brand-soft: #262b5e; --cta: #F26722; --cta-ink: #ffffff;
    --side-bg: #0c0e26; --side-ink: #ffffff; --side-muted: #9a9ec8;
    --good: #9fd3c6; --good-soft: #17393d; --warn: #f7c64e; --warn-soft: #3a3115; --crit: #ff9a6a; --crit-soft: #42200f; --info: #ADB6F9; --info-soft: #262b5e; --neutral: #d8cfb9; --neutral-soft: #2d2a24;
    --av1: #5961b8; --av2: #2b7c84; --av3: #F26722;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121430; --surface: #1a1d40; --sunk: #22264f; --ink: #eceefa; --heading: #ffffff; --muted: #a4a8cc; --line: #2e3265;
  --brand: #ADB6F9; --brand-soft: #262b5e; --cta: #F26722; --cta-ink: #ffffff;
  --side-bg: #0c0e26; --side-ink: #ffffff; --side-muted: #9a9ec8;
  --good: #9fd3c6; --good-soft: #17393d; --warn: #f7c64e; --warn-soft: #3a3115; --crit: #ff9a6a; --crit-soft: #42200f; --info: #ADB6F9; --info-soft: #262b5e; --neutral: #d8cfb9; --neutral-soft: #2d2a24;
  --av1: #5961b8; --av2: #2b7c84; --av3: #F26722;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--heading); }
h1 { font-family: var(--f-display); font-weight: 700; font-size: 2.1rem; letter-spacing: -.01em; line-height: 1.05; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.num.strong, .strong { font-weight: 600; }
.r { text-align: right; }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

/* Skal */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px max(14px, env(safe-area-inset-left, 0px)); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 6px; text-decoration: none; color: inherit; }
.logo { font-family: var(--f-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -.015em; line-height: 1; }
.logo .l1 { color: #ffffff; }
.logo .l2 { color: var(--orange); }
.product { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--side-muted); font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 9px; color: var(--side-muted); text-decoration: none; font-weight: 500; position: relative; }
.nav a:hover { color: #ffffff; background: rgba(255, 255, 255, .06); }
.nav a.on { color: #ffffff; background: rgba(255, 255, 255, .1); font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.badge { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--orange); color: #ffffff; font-size: .72rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding: 0 12px; }
.ver { font-size: .74rem; color: var(--side-muted); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding-block: 12px; padding-left: 36px; padding-right: max(24px, env(safe-area-inset-right, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; min-height: 60px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.crumb { font-size: .88rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumb strong { color: var(--heading); font-weight: 600; }
.proto { margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.who select { padding: 6px 28px 6px 10px; width: auto; border-color: transparent; background-color: var(--sunk); font-weight: 500; }
.avatar-user { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .85rem; }
.main { min-width: 0; padding-block: 32px 72px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .main { padding-left: 36px; padding-right: max(36px, env(safe-area-inset-right, 0px)); } }

.page { max-width: 1140px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p.muted { margin-top: 8px; max-width: 62ch; }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; color: var(--brand); }
.btn:hover:not(:disabled) { border-color: var(--brand); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn.ghost:hover:not(:disabled) { background: var(--sunk); }
.btn.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; }
.btn.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn.small { padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn.icon { padding: 6px 9px; }
.btn.wide { width: 100%; padding-block: 13px; font-size: .95rem; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.row-end.wrap { flex-wrap: wrap; }

/* Paneler */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel.flush { padding: 0; }
.panel-title { font-family: var(--f-body); font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-size: .9rem; font-weight: 700; flex: none; padding-top: 2px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 22px; align-items: start; }

/* Nøgletal */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.stat { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: var(--r); border: 1px solid transparent; background: var(--surface); cursor: pointer; color: var(--ink); }
.stat:hover { border-color: var(--brand); }
.stat.c1 { background: var(--brand-soft); }
.stat.c2 { background: var(--surface); border-color: var(--line); }
.stat.c3 { background: var(--crit-soft); }
.stat.c4 { background: var(--neutral-soft); }
.stat-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stat-val { font-family: var(--f-display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; color: var(--heading); font-variant-numeric: tabular-nums; padding-top: 4px; }
.stat-sub { font-size: .8rem; color: var(--muted); }

.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.todo-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0 13px 14px; border-top: 1px solid var(--line); border-left: 3px solid var(--line); }
.todo-item:first-child { border-top: 0; }
.todo-item > div { display: flex; flex-direction: column; min-width: 0; }
.todo-item.tone-crit { border-left-color: var(--orange); }
.todo-item.tone-warn { border-left-color: var(--yellow); }
.todo-item.tone-info { border-left-color: var(--navy); }
.fee-mini { list-style: none; margin: 0; padding: 0; }
.fee-mini li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.fee-mini li:first-child { border-top: 0; }

/* Status */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill-sm { padding: 2px 9px; font-size: .74rem; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-neutral.pill { background: var(--neutral-soft); color: var(--neutral); }
.tone-info.pill { background: var(--info-soft); color: var(--info); }
.tone-warn.pill { background: var(--warn-soft); color: var(--warn); }
.tone-crit.pill { background: var(--crit-soft); color: var(--crit); }
.tone-good.pill { background: var(--good-soft); color: var(--good); }
.dot-lg { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; background: var(--muted); }
.dot-lg.tone-good { background: #2f8f6b; } .dot-lg.tone-warn { background: var(--yellow); }
.over { color: var(--crit); font-weight: 600; font-size: .85em; white-space: nowrap; }
.warn-text { color: var(--warn); font-weight: 600; }
.note { padding: 11px 16px; border-radius: 10px; font-size: .88rem; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.note.info { background: var(--brand-soft); color: var(--ink); }
.note.warn { background: var(--warn-soft); }
.note.crit { background: var(--crit-soft); color: var(--crit); }

/* Avatarer og fordeling */
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .7rem; font-weight: 600; color: #fff; vertical-align: middle; flex: none; }
.av-c1 { background: var(--av1); } .av-c2 { background: var(--av2); } .av-c3 { background: var(--av3); }
.split-inline { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.split-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.split { display: flex; flex-direction: column; gap: 12px; }
.split-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.split-name { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pct-input { display: inline-flex; align-items: center; gap: 4px; }
.pct-input input { width: 68px; text-align: right; }
.split-fee { min-width: 110px; text-align: right; }
.split-sum { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 9px 14px; background: var(--sunk); font-size: .84rem; color: var(--good); font-weight: 600; }
.split-sum.bad { color: var(--crit); }
.split-sum .num { color: var(--ink); }

/* Formularer */
input, select { padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--surface); min-width: 0; width: 100%; }
input[type="checkbox"] { width: auto; accent-color: var(--orange); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: .8rem; font-weight: 600; color: var(--heading); }
.field-hint { font-size: .76rem; color: var(--muted); }
.field-error { color: var(--crit); font-size: .84rem; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.form-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); }
@media (max-width: 1060px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-side { position: static; } }
.cust-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px; background: var(--brand-soft); border-radius: 10px; }
.cust-card > div { display: flex; flex-direction: column; min-width: 0; }
.cust-card strong { color: var(--heading); }
.cust-pick { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cust-pick .field { width: 100%; }
.suggest { list-style: none; margin: 0; padding: 0; width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.suggest button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; flex-wrap: wrap; }
.suggest li:last-child button { border-bottom: 0; }
.suggest button:hover { background: var(--sunk); }
.cvr-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 10px; background: var(--sunk); }
.cvr-head { display: flex; justify-content: space-between; align-items: center; }
.cvr-head strong { color: var(--heading); }
.cvr-search { display: flex; gap: 10px; align-items: flex-end; }
.cvr-search .field { flex: 1; max-width: 260px; }
.cvr-hit { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--surface); border-radius: 10px; border-left: 4px solid var(--leaf); }
.cvr-hit strong { color: var(--heading); }
.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) 64px 100px 108px 32px; gap: 8px; align-items: center; }
.cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell-label { display: none; font-size: .74rem; font-weight: 600; color: var(--muted); }
.line-head { font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.line-total { padding-right: 4px; }
@media (max-width: 720px) {
  .line { grid-template-columns: 1fr 1fr; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
  .line-head { display: none; }
  .cell-label { display: block; }
  .cell-wide { grid-column: 1 / -1; }
  .line-total { text-align: left; }
  .line .btn.icon { justify-self: end; }
}
.summary { gap: 10px; }
.summary-cust { font-family: var(--f-display); font-size: 1.3rem; font-weight: 700; color: var(--heading); line-height: 1.15; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 4px 0 6px; font-size: .88rem; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; }
.totals .total { font-weight: 700; color: var(--heading); border-top: 1px solid var(--line); padding-top: 8px; font-size: 1rem; }
.problems { margin: 0; padding: 10px 12px 10px 28px; background: var(--crit-soft); color: var(--crit); border-radius: 10px; font-size: .84rem; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; font-size: .86rem; }

/* Tabeller */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.seg { display: flex; gap: 2px; flex-wrap: wrap; background: var(--sunk); padding: 4px; border-radius: 11px; }
.seg button { padding: 7px 13px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-weight: 500; font-size: .86rem; color: var(--muted); }
.seg button:hover { color: var(--heading); }
.seg button.on { background: var(--surface); color: var(--heading); font-weight: 600; box-shadow: 0 1px 3px rgba(36, 40, 96, .12); }
.count { font-weight: 500; color: var(--muted); margin-left: 3px; font-variant-numeric: tabular-nums; }
.search { max-width: 280px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table td.mono, .table td.nw { white-space: nowrap; }
.table .split-inline { flex-wrap: nowrap; }
.table th { text-align: left; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table th.r { text-align: right; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td strong { color: var(--heading); font-weight: 600; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr[tabindex] { cursor: pointer; }
.table tbody tr[tabindex]:hover td { background: var(--sunk); }
.table.compact td, .table.compact th { padding: 8px 10px; }
.table.compact { font-size: .86rem; }
.table tr.sum td { color: var(--muted); }
.table tr.total td { font-weight: 700; color: var(--heading); border-top: 1px solid var(--line); }
.table tfoot td { padding: 14px 16px; border-top: 2px solid var(--line); font-weight: 600; color: var(--heading); }
.fee-detail > td { background: var(--paper); padding: 6px 16px 12px 48px; }
.caret { color: var(--muted); display: inline-block; width: 12px; }

/* Skuffe */
.drawer-wrap { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(18, 20, 48, .5); }
.drawer { position: relative; width: min(580px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-family: var(--f-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.drawer-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 14px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 600; font-size: .8rem; padding-top: 2px; }
.kv dd { margin: 0; }
.sub-h { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; margin-top: 8px; display: flex; gap: 8px; align-items: baseline; }
.sub-h .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.timeline li { display: flex; flex-direction: column; position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--orange); }
.confirm { display: flex; flex-direction: column; gap: 10px; }
.pause-box { display: flex; gap: 8px; flex: 1 1 280px; }

/* Matchning */
.match-list { display: flex; flex-direction: column; gap: 12px; }
.match { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
@media (max-width: 720px) { .match { grid-template-columns: minmax(0, 1fr); } }
.match-tx { display: flex; flex-direction: column; gap: 4px; padding-right: 18px; border-right: 1px solid var(--line); }
@media (max-width: 720px) { .match-tx { border-right: 0; padding-right: 0; } }
.big { font-family: var(--f-display); font-size: 1.7rem; font-weight: 700; color: var(--heading); padding-top: 3px; }
.match-pick { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.integr { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.integr li { display: flex; gap: 12px; }
.integr li div { display: flex; flex-direction: column; }
.integr strong { color: var(--heading); font-weight: 600; }
.empty { padding: 30px 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; }

.toast-slot { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--navy); color: #ffffff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; font-size: .9rem; border-left: 4px solid var(--orange); }

/* Mobil: sidebaren bliver en mørkeblå topbjælke med vandret menu */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: column; gap: 10px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
  .brand { flex-direction: row; align-items: baseline; gap: 10px; padding: 0; }
  .side-foot { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -4px; padding-bottom: 6px; }
  .nav a { white-space: nowrap; padding: 7px 12px; }
  .nav a.on::before { left: 12px; right: 12px; top: auto; bottom: 0; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: static; }
  .crumb { display: none; }
  h1 { font-size: 1.7rem; }
  .table { font-size: .84rem; }
  .search { max-width: none; }
}

/* Login og beskeder */
.center-msg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.center-msg strong { font-family: var(--f-display); font-size: 1.5rem; color: var(--heading); }
.login { min-height: 100vh; display: grid; place-items: center; background: var(--side-bg); padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 16px; padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.6rem; margin-top: -6px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.logo.dark .l1 { color: var(--heading); }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.who-name { font-weight: 600; color: var(--heading); }
@media (max-width: 860px) { .who-name { display: none; } }

.proto.ok { color: var(--good); background: var(--good-soft); }
.integr-action { margin-top: 8px; }
.grid-2 > .span-2 { grid-column: 1 / -1; }
.pending-fees { margin-top: 32px; }
.pending-fees .section-title { margin: 0 0 4px; font-size: 1.15rem; color: var(--heading); }
.pending-fees > p { margin: 0 0 12px; }

.toolbar.wrap { flex-wrap: wrap; }
.date-range { display: inline-flex; align-items: center; gap: 8px; }
.date-range input { width: auto; }
.cust-actions { display: inline-flex; gap: 12px; align-items: flex-start; }
tr.click { cursor: pointer; }
tr.inactive td { opacity: .55; }
.hist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.hist input { width: auto; }
.integr-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pdf-actions { margin-left: auto; display: inline-flex; gap: 8px; }
