:root {
  --navy: #0b2733;
  --navy-2: #133a47;
  --navy-3: #2a5160;
  --cream: #f3efe6;
  --paper: #ffffff;
  --paper-2: #fbfaf7;
  --gold: #d4b05b;
  --gold-soft: #f4e9cc;
  --orange: #e8623b;
  --orange-soft: #fbe0d6;
  --sage: #7fa08d;
  --sage-soft: #e1ece5;
  --grey-soft: #e9ebea;
  --red: #a83224;
  --red-soft: #f7dcd7;
  --green: #2f6b3a;
  --ink: #0b2733;
  --muted: #5d6b70;
  --line: #e2ddd1;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--cream); color: var(--ink);
  display: grid; grid-template-rows: 60px minmax(0, 1fr) 26px;
  font-size: 14px; letter-spacing: -0.005em;
}
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.12em; flex: none; }
.ico.fill { fill: currentColor; stroke: none; }
kbd { font: 600 11px/1 Consolas, monospace; padding: 2px 5px; border-radius: 4px; background: rgba(11,39,51,.12); }

/* ---------- Header ---------- */
.top {
  background: var(--navy); color: #fff;
  display: grid; grid-template-columns: auto auto minmax(200px, 460px) 1fr; align-items: center; gap: 18px; padding: 0 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 19px; }
.brand h1 { font-size: 17px; margin: 0; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: #b9c6cb; margin-top: 2px; }
.btn-intercom {
  display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--navy); border: 0;
  border-radius: 8px; padding: 9px 16px; font-weight: 800; font-size: 15px;
}
.btn-intercom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn-intercom:hover { filter: brightness(1.06); }
.btn-intercom.actief { background: #fff; }
.search { position: relative; }
.search input { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--navy-3); background: var(--navy-2); color: #fff; }
.search input::placeholder { color: #9fb2b9; }
.search-results {
  position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--paper); color: var(--ink); border-radius: 10px; box-shadow: 0 14px 40px rgba(11,39,51,.3); max-height: 60vh; overflow: auto;
}
.search-results li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.search-results li:hover, .search-results li.sel { background: var(--cream); }
.search-results li.leeg { display: block; color: var(--muted); cursor: default; }
.search-results small { color: var(--muted); }
.bakje-groot { background: var(--navy); color: #fff; border-radius: 8px; text-align: center; padding: 4px 0; line-height: 1.05; }
.bakje-groot b { display: block; font-size: 20px; }
.bakje-groot span { font-size: 10px; opacity: .8; }
.tools { display: flex; align-items: center; gap: 10px; justify-self: end; }
.btn { background: var(--gold); color: var(--navy); border: 0; border-radius: 7px; padding: 7px 13px; font-weight: 700; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.quiet { background: transparent; color: #fff; border: 1px solid var(--navy-3); }
.btn.quiet:hover:not(:disabled) { background: var(--navy-2); }
.btn.quiet.dark { color: var(--navy); border-color: var(--line); }
.btn.quiet.dark:hover:not(:disabled) { background: var(--cream); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #e3b7ae; }
.btn.danger:hover { background: var(--red-soft); }
.btn.big { font-size: 16px; padding: 12px 18px; width: 100%; }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.who { display: flex; flex-direction: column; font-size: 11px; color: #b9c6cb; gap: 2px; }
.who input { width: 58px; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--navy-3); background: var(--navy-2); color: #fff; font-weight: 700; text-transform: uppercase; }
.clock { text-align: right; line-height: 1.15; min-width: 120px; }
.clock b { font-size: 18px; display: block; }
.clock span { font-size: 11.5px; color: #b9c6cb; }

/* ---------- Layout ---------- */
main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; padding: 14px; min-height: 0; }
.left { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; min-width: 0; }
.card { background: var(--paper); border-radius: var(--radius); padding: 12px 14px; min-height: 0; }
.card h2 { font-size: 14px; margin: 0; font-weight: 700; }
.card h2 span { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--paper); border-radius: var(--radius); padding: 9px 12px; border: 0; text-align: left; position: relative; }
.stat b { font-size: 26px; line-height: 1; display: block; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat span { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }
.stat.klik { cursor: pointer; }
.stat.klik:hover { box-shadow: inset 0 0 0 2px var(--gold-soft); }
.stat.s-goed b { color: var(--green); }
.stat.s-let b { color: #b8862a; }
.stat.s-slecht b { color: var(--red); }
.stat.s-oranje b { color: var(--orange); }

/* ---------- Plattegrond ---------- */
.plan-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.seg { display: inline-flex; background: var(--cream); border-radius: 8px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(11,39,51,.15); }
.seg.light { background: var(--cream); }
/* min-width 0 + overflow: de breedte komt van de kolom, niet van de plattegrond, zodat hij meekrimpt met het venster. */
.plan-wrap { flex: 1; min-height: 260px; min-width: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#plan { position: relative; background: var(--cream); border-radius: 8px; width: 100%; aspect-ratio: 1560 / 812; }
#plan.bewerk { background: repeating-linear-gradient(45deg, #efe9dc 0 10px, var(--cream) 10px 20px); }
.tegel {
  position: absolute; border: 1px solid #9aa7ab; background: var(--paper); color: var(--navy);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 0.3em; overflow: hidden; border-radius: 0.35em; transition: box-shadow .12s, opacity .12s;
}
.tegel.label { background: transparent; border: 1px dashed #a9b2b4; color: var(--muted); font-size: 0.8em; font-style: italic; font-weight: 600; }
.tegel.label.vertical { writing-mode: vertical-rl; transform: rotate(180deg); }
.tegel.vak { cursor: pointer; user-select: none; }
.tegel.vak:hover { box-shadow: inset 0 0 0 0.22em var(--gold); }
.tegel .nr { position: absolute; top: 0.25em; left: 0.4em; font-weight: 800; font-size: 1.05em; line-height: 1; }
.tegel.vrij .nr { position: static; font-size: 1.4em; color: #8c989c; }
.tegel .ico-rij { position: absolute; top: 0.3em; right: 0.35em; display: flex; gap: 0.2em; font-size: 0.85em; color: var(--navy); }
.tegel.vrij .ico-rij { color: #6f8c7c; }
.tegel .naam { font-weight: 700; font-size: 0.98em; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0.7em; }
.tegel .sub { font-size: 0.78em; line-height: 1.15; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tegel .auto { font-size: 0.72em; line-height: 1.15; color: var(--muted); display: flex; align-items: center; gap: 0.3em; max-width: 100%; white-space: nowrap; overflow: hidden; margin-bottom: 0.9em; }
.tegel .sleutel { position: absolute; right: 0.3em; bottom: 0.3em; font-size: 0.74em; font-weight: 800; background: var(--navy); color: #fff; border-radius: 0.4em; padding: 0.05em 0.4em; display: flex; align-items: center; gap: 0.2em; }
.tegel.klein .naam { margin-top: 0.5em; }
.tegel.klein .auto { display: none; }
.tegel.mini .sub { display: none; }
.tegel.smal .sub, .tegel.geblokkeerd .sub { white-space: normal; }
.kleurstip { width: 0.8em; height: 0.8em; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; flex: none; }

.v-vandaag { background: var(--orange-soft); border-color: var(--orange); }
.v-morgen { background: var(--gold-soft); border-color: #c9a24a; }
.v-later { background: var(--sage-soft); border-color: var(--sage); }
.v-onbekend { background: var(--grey-soft); border-color: #a3abad; }
.v-verlopen { background: var(--red-soft); border-color: var(--red); }
.tegel.bezet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 0.28em; }
.tegel.v-vandaag::before { background: var(--orange); }
.tegel.v-morgen::before { background: var(--gold); }
.tegel.v-later::before { background: var(--sage); }
.tegel.v-verlopen::before { background: var(--red); }
.tegel.geblokkeerd { background: repeating-linear-gradient(135deg, #eceeee 0 0.5em, #dfe3e3 0.5em 1em); color: #6b777b; border-style: dashed; }
.tegel.geblokkeerd .sub { opacity: 1; font-weight: 600; }
.tegel.vrij.ingesloten { background: repeating-linear-gradient(135deg, #f6f4ef 0 0.4em, #ebe7de 0.4em 0.8em); border-style: dashed; }
.tegel.vrij.ingesloten .nr { color: #a7b0b3; }
.tegel.vrij.ingesloten .sub { color: var(--muted); font-style: italic; margin-top: 0.2em; }
.tegel.conflict { box-shadow: inset 0 0 0 0.2em var(--red); }
.tegel.conflict .nr::after { content: "!"; margin-left: 0.25em; background: var(--red); color: #fff; border-radius: 1em; padding: 0 0.35em; font-size: 0.8em; }
.tegel.dim { opacity: .25; }
.tegel.zoek-hit { box-shadow: 0 0 0 0.3em var(--navy), inset 0 0 0 0.15em #fff; z-index: 3; }
.tegel.keten-voor { box-shadow: inset 0 0 0 0.22em var(--navy-3); }
.tegel.keten-achter { box-shadow: inset 0 0 0 0.22em #7a9aa6; }
.tegel.advies { box-shadow: 0 0 0 0.3em var(--gold), 0 0 1.2em 0.3em rgba(212,176,91,.7); z-index: 4; animation: puls 1.4s ease-in-out infinite; }
.tegel.alt { box-shadow: inset 0 0 0 0.2em var(--gold); }
.tegel .rang { position: absolute; bottom: 0.25em; left: 0.35em; font-size: 0.7em; font-weight: 800; background: var(--gold); color: var(--navy); border-radius: 0.4em; padding: 0 0.35em; }
.tegel.advies .rang { font-size: 0.85em; }
@keyframes puls { 50% { box-shadow: 0 0 0 0.45em var(--gold), 0 0 1.6em 0.5em rgba(212,176,91,.55); } }
@media (prefers-reduced-motion: reduce) { .tegel.advies { animation: none; } }
.tegel.dz-goed { box-shadow: inset 0 0 0 0.25em #5d9b6c; background: #e7f2ea; }
.tegel.dz-matig { box-shadow: inset 0 0 0 0.25em #d4b05b; }
.tegel.dz-slecht { box-shadow: inset 0 0 0 0.25em #d98c80; }
.tegel.over { box-shadow: inset 0 0 0 0.4em var(--orange) !important; }
.tegel.sleept { opacity: .4; }
.tegel.exit { border: 0.16em dashed var(--navy); background: #eef3f2; cursor: pointer; gap: 0.15em; }
.tegel.exit b { font-size: 1.25em; }
.tegel.exit span { font-size: 0.75em; color: var(--muted); }
.tegel.exit.heeft { background: var(--navy); color: #fff; border-style: solid; }
.tegel.exit.heeft span { color: #c9d4d8; }
.bewerk .tegel.vak .bewerk-info { font-size: 0.66em; color: var(--muted); margin-top: 0.2em; }
.bewerk .tegel.vak.laad { background: #e9f3ec; }
#ketenLaag { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: visible; }
#ketenLaag line { stroke: var(--navy); stroke-width: 2.2; opacity: .55; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; border: 1px solid; }
.sw-conflict { background: #fff; border: 2px solid var(--red); }
.sw-blok { background: repeating-linear-gradient(135deg, #eceeee 0 3px, #cfd5d5 3px 6px); border-color: #a3abad; }
.leg-ico { display: inline-flex; align-items: center; gap: 4px; }
.leg-ico .ico { fill: var(--navy); stroke: none; }
.bewerk-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--cream); border-radius: 8px; padding: 8px 10px; }
.bewerk-bar label { display: flex; align-items: center; gap: 6px; }
.bewerk-bar a.btn { text-decoration: none; }
.bewerk-bar input { width: 80px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; }

/* ---------- Zijpaneel ---------- */
aside { position: relative; min-height: 0; display: flex; flex-direction: column; }
.side-card { display: flex; flex-direction: column; flex: 1; padding: 0; overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 11px 4px 9px; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 3px solid transparent; display: flex; gap: 5px; justify-content: center; align-items: center; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }
.tabs .badge { background: var(--cream); color: var(--ink); border-radius: 10px; font-size: 11px; padding: 0 6px; font-weight: 700; }
.tabs .badge.rood { background: var(--red); color: #fff; }
.side-body { overflow: auto; padding: 12px 14px 16px; flex: 1; }
.side-body h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 6px; display: flex; justify-content: space-between; align-items: center; }
.side-body h3:first-child { margin-top: 2px; }
.lijst { list-style: none; margin: 0; padding: 0; }
.lijst li { display: grid; grid-template-columns: 58px 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid #f0ece3; font-size: 13px; cursor: pointer; border-radius: 6px; }
.lijst li:hover { background: var(--paper-2); }
.lijst li.leeg { display: block; color: var(--muted); cursor: default; font-size: 12.5px; }
.lijst .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.lijst .t.unk { color: #98a3a7; font-weight: 400; }
.lijst .nm small { display: block; color: var(--muted); font-size: 11.5px; }
.bk { background: var(--navy); color: #fff; border-radius: 6px; font-size: 12px; font-weight: 800; text-align: center; padding: 3px 0; }
.bk.leeg { background: var(--grey-soft); color: var(--muted); }
.vk { border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-weight: 700; padding: 2px 7px; white-space: nowrap; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 8px; background: var(--cream); color: var(--muted); }
.chip.ok { background: #e1f0e4; color: var(--green); }
.chip.let { background: var(--gold-soft); color: #8a6716; }
.chip.rood { background: var(--red-soft); color: var(--red); }

.grafiek { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 92px; padding-top: 14px; }
.grafiek .groep { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 100%; }
.grafiek .staaf { width: 34%; border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.grafiek .staaf span { position: absolute; top: -15px; left: -6px; right: -6px; text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.grafiek .staaf.v { background: var(--orange); }
.grafiek .staaf.m { background: var(--gold); }
.as { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.noot { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.noot i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 110px; align-items: end; position: relative; padding-top: 4px; }
.week .dag { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.week .seg-b { background: var(--navy); }
.week .seg-o { background: repeating-linear-gradient(135deg, #8d9a9e 0 3px, #b8c1c3 3px 6px); }
.week .seg-r { background: var(--gold); }
.week .dag > div:last-child { border-radius: 3px 3px 0 0; }
.week .cap { position: absolute; left: -3px; right: -3px; border-top: 2px dashed var(--red); }
.week .vol { position: absolute; top: -2px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 800; color: var(--red); }
.week-as { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.week-as b { display: block; color: var(--ink); font-size: 12px; }

.lijst.res li { grid-template-columns: 74px 1fr auto auto; }
.res-knoppen { display: flex; gap: 4px; }
.res-knoppen:empty { display: none; }
.res-knoppen.twee { grid-column: 2 / -1; }
.afgehandeld summary { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: 16px 0 6px; cursor: pointer; }
.aandacht li { grid-template-columns: 22px 1fr; }
.aandacht .ico { color: var(--red); font-size: 15px; }
.aandacht li.zacht .ico { color: #b8862a; }
.weg-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--paper-2); cursor: grab; }
.weg-item:hover { border-color: var(--gold); }
.weg-item .kop { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.weg-item small { color: var(--muted); display: block; margin-top: 2px; }
.weg-item .bk { min-width: 30px; padding: 3px 6px; }
.weg-item .row { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.drop-weg { border: 2px dashed var(--line); border-radius: 8px; padding: 10px; text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.drop-weg.over { border-color: var(--orange); background: var(--orange-soft); }

/* ---------- Intercom ---------- */
.ic { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; padding: 0; box-shadow: 0 0 0 3px var(--gold); overflow: hidden; }
.ic[hidden] { display: none; }
.ic-head { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px; }
.ic-head b { font-size: 15px; flex: 1; }
.ic-timer { font-variant-numeric: tabular-nums; font-weight: 700; background: var(--navy-2); border-radius: 12px; padding: 2px 10px; font-size: 13px; }
.ic-timer.ok { background: #2f6b3a; }
.ic-timer.traag { background: var(--red); }
.x { background: none; border: 0; color: inherit; font-size: 22px; line-height: 1; padding: 0 4px; }
.ic-steps { display: flex; list-style: none; margin: 0; padding: 8px 14px; gap: 4px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.ic-steps li { flex: 1; text-align: center; padding-bottom: 5px; border-bottom: 3px solid var(--grey-soft); }
.ic-steps li.klaar { border-bottom-color: var(--sage); color: var(--ink); }
.ic-steps li.nu { border-bottom-color: var(--gold); color: var(--ink); font-weight: 700; }
.ic-body { padding: 14px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.ic-vraag { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0; }
.ic-vraag::before { content: "“"; color: var(--gold); margin-right: 2px; }
.ic-vraag::after { content: "”"; color: var(--gold); margin-left: 2px; }
.ic-sub { color: var(--muted); font-size: 12.5px; margin: -4px 0 0; }
.ic-knoppen { display: grid; gap: 8px; }
.ic-knoppen.twee { grid-template-columns: 1fr 1fr; }
.ic-knop { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--paper-2); border-radius: 9px; padding: 11px 12px; font-size: 15px; font-weight: 600; }
.ic-knop:hover { border-color: var(--gold); background: #fffaf0; }
.ic-knop kbd { min-width: 22px; text-align: center; }
.ic-knop small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ic-knop.voorkeur { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ic-knop.zwak { background: transparent; font-weight: 500; color: var(--muted); }
.ic-banner { border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.ic-banner.ok { background: #e1f0e4; color: #1f4d29; }
.ic-banner.let { background: var(--gold-soft); color: #6d5212; }
.ic-banner.rood { background: var(--red-soft); color: #6d2016; }
.ic-script { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 6px; padding: 10px 12px; font-size: 15px; line-height: 1.4; margin: 0; }
.ic-vak { display: flex; align-items: center; gap: 14px; }
.ic-vak .groot { background: var(--navy); color: #fff; border-radius: 12px; padding: 8px 16px; text-align: center; line-height: 1; }
.ic-vak .groot small { display: block; font-size: 11px; opacity: .75; margin-bottom: 4px; }
.ic-vak .groot b { font-size: 44px; }
.ic-vak .info { font-size: 13px; color: var(--muted); line-height: 1.45; }
.ic-vak .info b { color: var(--ink); }
.waarom { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.5; }
.waarom li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }
.waarom li.min::before { content: "!"; color: var(--red); }
.alts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.alts button { border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 4px 10px; font-weight: 700; }
.alts button.goed { border-color: #9cc5a6; }
.alts button.matig { border-color: #e2cb8d; }
.alts button.slecht { border-color: #e3b7ae; color: var(--red); }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle { border: 1px solid var(--line); background: var(--paper); border-radius: 16px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.toggle.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ic label.veld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ic input.veld, .ic label.veld input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-2); }
.samenvatting { font-size: 12px; color: var(--muted); }
.terug { background: none; border: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; align-self: flex-start; padding: 0; }
.klaar-blok { text-align: center; padding: 10px 0; }
.klaar-blok .rij { display: flex; justify-content: center; gap: 14px; margin: 8px 0 12px; }
.klaar-blok .groot { background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 18px; min-width: 110px; }
.klaar-blok .groot small { display: block; font-size: 11px; opacity: .75; }
.klaar-blok .groot b { font-size: 40px; line-height: 1.1; }
.klaar-blok .groot.goud { background: var(--gold); color: var(--navy); }

/* ---------- Dialogen ---------- */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(720px, 94vw); box-shadow: 0 20px 60px rgba(11,39,51,.35); color: var(--ink); }
dialog::backdrop { background: rgba(11,39,51,.5); }
.dlg { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.dlg h2 { margin: 0 0 4px; font-size: 17px; }
.dlg h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
dialog:has(.narrow) { width: min(460px, 94vw); }
dialog:has(.wide) { width: min(1000px, 94vw); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; }
.dlg label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dlg label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; padding-top: 16px; }
.dlg .wide { grid-column: 1 / -1; }
.dlg input:not([type=checkbox]), .dlg select, .dlg textarea { font-size: 13.5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-2); }
.dlg input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--navy); }
.dlg textarea { resize: vertical; }
#excelInput { font: 11.5px/1.35 Consolas, monospace; white-space: pre; }
.dlg .checks { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: flex-end; }
.dlg .checks label.check { padding-top: 0; }
.inuit-blok { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; background: var(--paper-2); }
.inuit-blok legend { font-size: 12px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.inuit-blok legend span { font-weight: 400; color: var(--muted); }
.inuit-dagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; margin-bottom: 8px; }
.dlg .inuit-dagen label { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-weight: 600; }
.dlg .inuit-dagen input { width: 92px; padding: 4px 6px; }
.ic .inuit-dagen { grid-template-columns: 1fr; }
.ic .inuit-dagen label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.ic .inuit-dagen input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; width: 110px; }
.terugkomers h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 6px; }
.ic-knop .vak-label { margin-left: auto; background: var(--navy); color: #fff; border-radius: 7px; padding: 4px 10px; font-weight: 800; white-space: nowrap; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 10px; }
.spacer { flex: 1; }
.meta { font-size: 12px; color: var(--muted); margin: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; min-height: 1em; }
.hint.err { color: var(--red); font-weight: 600; }
.hint.ok { color: var(--green); }
.table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { text-align: left; padding: 6px 9px; border-bottom: 1px solid #f0ece3; vertical-align: top; }
th { position: sticky; top: 0; background: var(--cream); font-weight: 700; }
td.nw { white-space: nowrap; font-variant-numeric: tabular-nums; }
#logZoek { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 220px; }
.fb-soorten { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg label.fb-chip { flex-direction: row; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 18px; padding: 6px 14px; font-size: 13px; color: var(--ink); cursor: pointer; background: var(--paper-2); }
.fb-chip input { position: absolute; opacity: 0; pointer-events: none; }
.dlg label.fb-chip:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.dlg label.fb-chip:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.fb-lijst summary { font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; margin: 4px 0 8px; }
.fb-lijst .table-wrap { max-height: 34vh; margin-top: 8px; }
.fb-lijst td.tekst { white-space: pre-wrap; min-width: 260px; }
.fb-weg { background: none; border: 0; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.fb-weg:hover { color: var(--red); }

/* ---------- Overig ---------- */
.status-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 16px; font-size: 11.5px; color: var(--muted); }
.status-bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; }
.status-bar .dot.uit { background: var(--red); }
.status-bar .dot.half { background: var(--gold); }
.status-bar .link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: inherit; }
/* Gedeelde versie: geen verbinding. Vast bovenaan, over de inhoud, zodat het niet te missen is. */
.verbinding-banner { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 900; width: min(860px, 94vw);
  background: var(--red-soft); color: var(--red); border: 2px solid var(--red); border-radius: 10px; padding: 10px 14px;
  font-size: 13.5px; line-height: 1.4; box-shadow: 0 10px 30px rgba(11,39,51,.25); }
.verbinding-banner button { margin-left: 6px; background: var(--red); color: #fff; border: 0; border-radius: 6px; padding: 3px 10px; font-weight: 600; }
.brand .omgeving { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 1px 7px; border-radius: 5px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(11,39,51,.35); z-index: 1000; display: flex; gap: 14px; align-items: center; font-size: 13.5px; }
.toast button { background: none; border: 0; color: var(--gold); font-weight: 700; text-decoration: underline; }

.btn, .btn-intercom { white-space: nowrap; }
@media (max-width: 1500px) {
  main { grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; padding: 10px; }
  .top { gap: 12px; padding: 0 12px; }
  .clock { min-width: 0; }
  .brand small { display: none; }
  .stat b { font-size: 22px; }
}
@media (max-width: 1280px) {
  body { grid-template-rows: auto auto auto; height: auto; }
  html, body { height: auto; }
  .top { grid-template-columns: auto auto 1fr; padding: 10px 14px; }
  .tools { grid-column: 1 / -1; justify-self: start; flex-wrap: wrap; }
  main { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  aside { min-height: 560px; }
}
