@font-face { font-family: "Caprasimo"; src: url("/fonts/Caprasimo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("/fonts/Rubik.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }

/* Opzet: aubergine kopband met tabs, daaronder één werkvlak per tab. De kaart is het podium,
   panelen en grafieken zijn rustig wit (of donker aubergine) zodat geel alleen activiteit markeert. */
:root {
  --bg: #EFEBE3; --surface: #FFFFFF; --surface-2: #F6F3EC; --ink: #260815; --ink-2: #5E4A53; --ink-3: #8B7C82;
  --line: #DCD5C8; --geel: #F0E51B; --olijf: #8E8E6B; --rood: #800A01; --kop: #260815; --kop-ink: #F3EEE6;
  --zee: #E3DED2; --land-ctx: #EAE6DB; --land: #FFFFFF; --land-rand: #B9B49C;
  --goed: #2F7A3D; --slecht: #A01207; --vol: #B3170B;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --kopfont: "Caprasimo", Georgia, serif; --font: "Rubik", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1A0610; --surface: #2A0E1A; --surface-2: #33141F; --ink: #F3EEE6; --ink-2: #CDBDC3; --ink-3: #9C8990;
  --line: #4B2B38; --kop: #12030A; --zee: #14040B; --land-ctx: #1F0813; --land: #33141F; --land-rand: #6B5B50;
  --goed: #7CC98B; --slecht: #F08A80; --vol: #F0766B;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #1A0610; --surface: #2A0E1A; --surface-2: #33141F; --ink: #F3EEE6; --ink-2: #CDBDC3; --ink-3: #9C8990;
  --line: #4B2B38; --kop: #12030A; --zee: #14040B; --land-ctx: #1F0813; --land: #33141F; --land-rand: #6B5B50;
  --goed: #7CC98B; --slecht: #F08A80; --vol: #F0766B;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; color-scheme: dark }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font); }
.wrap { max-width: 1440px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--kopfont); font-weight: 400; margin: 0; text-wrap: balance; }
h2 { font-size: 1.5rem; line-height: 1.2; }
h3 { font-family: var(--font); font-weight: 600; font-size: 0.95rem; }
p { margin: 0; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.klein { font-size: 0.82rem; }
.lbl { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }

/* kop */
.top { background: var(--kop); color: var(--kop-ink); }
.top-in { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px 10px; }
.top h1 { color: #F0E51B; font-size: 1.55rem; line-height: 1; }
.top .model { font-size: 0.85rem; color: #CDBDC3; min-width: 0; }
.top .spacer { flex: 1; }
.top label { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: #CDBDC3; margin-right: 8px; }
.top select { background: #3A1826; color: #F3EEE6; border: 1px solid #5B3646; border-radius: 6px; padding: 6px 10px; max-width: 100%; }
.top .merk img { height: 13px; display: block; opacity: 0.9; }
.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: #CDBDC3; padding: 10px 16px; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; font-weight: 500; }
.tabs button:hover { color: #F3EEE6; }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); }
main { padding-block: 20px 56px; }
.tab { display: flex; flex-direction: column; gap: 20px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.pad { padding: 16px 18px; }

/* netwerk */
.net { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.transport { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.btn { background: var(--ink); color: var(--surface); border: 0; border-radius: 7px; padding: 8px 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn.sec { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { background: var(--surface); border: 0; padding: 7px 11px; cursor: pointer; font-size: 0.85rem; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--geel); color: #260815; font-weight: 500; }
.datum { font-weight: 500; min-width: 11.5em; }
.transport input[type=range] { flex: 1; min-width: 140px; accent-color: var(--olijf); }
#map { display: block; width: 100%; height: auto; max-height: 82vh; border-radius: 0 0 10px 10px; background: var(--zee); }
#map text { font-family: var(--font); fill: var(--ink); }
.land-ctx { fill: var(--land-ctx); stroke: var(--zee); stroke-width: 1; }
.land { fill: var(--land); stroke: var(--land-rand); stroke-width: 1; }
.rt { fill: none; stroke: var(--ink-2); stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .2s, opacity .2s; }
.rt.lh { stroke: var(--olijf); }
.rt.idle { opacity: 0.16; stroke-width: 1px !important; }
.rt.cancel { opacity: 0.3; stroke-dasharray: 3 5; stroke-width: 1px !important; }
.rt.full { stroke: var(--vol); }
.rt.sel { stroke: var(--s1); opacity: 1; }
.hit { fill: none; stroke: transparent; stroke-width: 12px; cursor: pointer; }
.dst { fill: var(--surface); stroke: var(--ink); stroke-width: 1.2; cursor: pointer; }
.dst.got { fill: var(--geel); }
.dst.sel, .hub.sel rect { stroke: var(--s1); stroke-width: 3; }
.hub { cursor: pointer; }
.hub rect { fill: var(--ink); stroke: var(--geel); stroke-width: 2; }
.hubq { fill: var(--geel); opacity: 0.4; }
.plaats { font-size: 11px; fill: var(--ink-2) !important; pointer-events: none; paint-order: stroke; stroke: var(--land); stroke-width: 3px; }
.hubnaam { font-size: 12.5px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: var(--land); stroke-width: 3px; }
.truck { fill: var(--s1); stroke: var(--surface); stroke-width: 1.5; pointer-events: none; }
.truck.ch { fill: var(--vol); }
#nacht { fill: #12030A; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; font-size: 0.8rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { flex: none; }
.side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 10px; }
.stat b { display: block; font-size: 1.25rem; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hubbars { margin-top: 14px; display: grid; gap: 5px; }
.hubbar { display: grid; grid-template-columns: 8.4em 1fr 6.6em; gap: 8px; align-items: center; font-size: 0.82rem; }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--olijf); border-radius: 4px; }
.bar i.vol { background: var(--vol); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-top: 10px; font-size: 0.88rem; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dagen { display: inline-flex; gap: 3px; vertical-align: middle; }
.dagen i { width: 17px; height: 17px; border-radius: 4px; font-style: normal; font-size: 0.62rem; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.dagen i.aan { background: var(--ink); color: var(--surface); }
.pill { display: inline-block; font-size: 0.72rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); }
.pill.warn { border-color: var(--vol); color: var(--vol); }

/* kpi */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tile { padding: 14px 16px; }
.tile b { display: block; font-size: 1.7rem; font-weight: 500; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.delta { font-size: 0.82rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.delta.goed { color: var(--goed); } .delta.slecht { color: var(--slecht); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 16px; }
.chart { padding: 14px 16px 10px; min-width: 0; }
.ch-head { display: flex; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.lg { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-2); }
.lg span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.ch-body { position: relative; }
.ch-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.ch-body svg text { font-family: var(--font); font-size: 11px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.grid { stroke: var(--line); stroke-width: 1; }
.tip { position: absolute; top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: 0.8rem; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px rgba(38, 8, 21, 0.14); z-index: 2; }
.tip div { display: flex; align-items: center; gap: 7px; } .tip .v { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; color: var(--ink); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--ink-2); font-size: 0.78rem; white-space: nowrap; }
th[data-sort] { cursor: pointer; } th[data-sort]:hover { color: var(--ink); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.klik { cursor: pointer; } tbody tr.klik:hover { background: var(--surface-2); }
.inbar { display: inline-block; width: 64px; height: 7px; background: var(--surface-2); border-radius: 4px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.inbar i { display: block; height: 100%; background: var(--olijf); }
code, .formule { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem; }
.formule { display: block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* scenario's */
.scen { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.sc-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sc-item:last-child { border-bottom: 0; }
.sc-item input { margin-top: 4px; accent-color: var(--olijf); }
.sc-item .nm { font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 0.8rem; }
.lever { display: grid; gap: 4px; margin-top: 12px; }
.lever .rij { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; }
.lever input[type=range] { width: 100%; accent-color: var(--olijf); }
.lever select { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; width: 100%; }
.runrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.runrow select { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 8px; }
.prog { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--geel); transition: width .15s; }
.cmp td small { display: block; color: var(--ink-3); font-size: 0.74rem; white-space: nowrap; }
.cmp td .delta { white-space: nowrap; }
.cmp th .dot { margin-right: 6px; }
.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }

/* model */
.lagen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 16px; }
.laag { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.laag .kop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.intro { max-width: 68ch; }
.feiten { display: flex; gap: 10px 28px; flex-wrap: wrap; margin-top: 12px; }
.feiten b { font-size: 1.4rem; font-weight: 500; display: block; line-height: 1.1; }
.fout { color: var(--slecht); margin-top: 8px; }
ul.strak { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 4px; }
details summary { cursor: pointer; color: var(--ink-2); }

@media (max-width: 980px) {
  .net, .scen { grid-template-columns: minmax(0, 1fr); }
  .top .merk { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rt, .prog i { transition: none; } }

/* app-kop: modelkeuze, gebruiker, menu op mobiel */
html, body { margin: 0; }
[hidden] { display: none !important; }
.top .wie { font-size: 0.82rem; color: #CDBDC3; display: inline-flex; gap: 10px; align-items: center; }
.top .wie button { background: none; border: 0; color: #CDBDC3; text-decoration: underline; cursor: pointer; padding: 0; font-size: 0.82rem; }
.menuknop { display: none; background: none; border: 1px solid #5B3646; color: #F3EEE6; border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.melding { font-size: 0.85rem; color: var(--ink-2); min-height: 1.3em; }
.bewaar { display: flex; gap: 8px; margin-top: 12px; }
.bewaar input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
.laden { padding: 60px 0; text-align: center; color: var(--ink-2); }
@media (max-width: 720px) {
  .menuknop { display: inline-block; }
  .tabs { display: none; flex-direction: column; padding-bottom: 8px; }
  .tabs.open { display: flex; }
  .tabs button { text-align: left; border-radius: 8px; }
  .top .wie { display: none; }
}
/* inlogpagina */
.inlog { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--kop); }
.inlog main { background: var(--surface); border-radius: 12px; padding: 30px 28px; width: 100%; max-width: 420px; }
.inlog h1 { font-size: 2rem; }
.inlog p { margin: 10px 0 0; color: var(--ink-2); }
.inlog form { display: grid; gap: 8px; margin-top: 20px; }
.inlog input { font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.inlog .btn { justify-content: center; padding: 11px 14px; font-size: 1rem; }
