/* ==========================================================================
   Planbord – gedeelde stijlen voor de ontwerpschetsen, richting "Rustig"
   De klassen volgen de blokcatalogus (ui-*, vpb-*) uit het implementatieplan.
   Regels: effen vlakken, haarlijnen van 1 px, hoeken alleen waar functioneel,
   schaduw alleen voor wat zweeft, geen verloop, geen glas, geen zijstrepen.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
ui-app, ui-topbar, ui-rail, ui-panel, ui-grid, ui-timeline, ui-map, ui-dock, ui-chart,
vpb-trip-grid, vpb-leg-grid, vpb-resource-list, vpb-inspector, vpb-ai-panel, vpb-plan-editor,
vpb-trip-card, vpb-load-meter, vpb-command-status, ui-statusbar { display: block; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.94em; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--space-2); }
.col { display: flex; flex-direction: column; }
.sep { width: 1px; align-self: stretch; background: var(--line); margin: 6px 2px; }

/* ---------- App-shell ---------- */
ui-app { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: 48px 1fr 26px; height: 100vh; overflow: hidden; }
ui-topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-4);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line); position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; width: 232px; }
.brand-mark { width: 24px; height: 24px; border-radius: var(--radius-control); background: var(--text); display: grid; place-items: center; color: var(--bg-elevated); }
.brand-mark svg { stroke: currentColor; }
.brand-name { font-weight: var(--weight-semibold); font-size: var(--text-lg); }
.admin-picker { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-control); color: var(--text-2); font-size: var(--text-sm); }
.admin-picker b { color: var(--text); font-weight: var(--weight-semibold); }
.search { flex: 0 1 420px; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: var(--radius-control); background: var(--bg-elevated); border: 1px solid var(--line-strong); color: var(--text-3); margin: 0 auto; }
.search span { flex: 1; }
kbd { font-family: var(--font-ui); font-size: var(--text-xs); color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 5px; line-height: 16px; background: transparent; }
.topbar-right { display: flex; align-items: center; gap: var(--space-3); }
.live-pill { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--text-sm); }
.live-pill .dot { background: var(--ok); }
.dot { width: 7px; height: 7px; border-radius: var(--radius-round); background: currentColor; flex: none; }
.icon-btn { position: relative; width: 30px; height: 30px; border-radius: var(--radius-control); display: grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { background: var(--bg-hover); }
.badge-count { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: var(--radius-round); background: var(--crit); color: #fff; font-size: 9.5px; font-weight: var(--weight-semibold); display: grid; place-items: center; box-shadow: 0 0 0 1px var(--bg-elevated); }
.avatar { width: 26px; height: 26px; border-radius: var(--radius-round); display: grid; place-items: center; font-size: 10.5px; font-weight: var(--weight-semibold); color: #fff; background: var(--text-3); flex: none; }
.avatar.sm { width: 18px; height: 18px; font-size: 8.5px; }
.avatar.a1 { background: var(--person-1); } .avatar.a2 { background: var(--person-2); } .avatar.a3 { background: var(--person-3); } .avatar.a4 { background: var(--person-4); }

/* Navigatierail: rustig, één duidelijke selectie */
ui-rail { grid-row: 2 / 4; background: var(--bg-sidebar); border-right: 1px solid var(--line); padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: var(--radius-control); color: var(--text-2); font-size: 10.5px; font-weight: var(--weight-medium); }
.rail-item svg.i { width: 19px; height: 19px; }
.rail-item.active { background: var(--bg-pressed); color: var(--text); }
.rail-spacer { flex: 1; }

/* Werkruimte: vlakken liggen tegen elkaar, gescheiden door een haarlijn */
.workspace { grid-column: 2; grid-row: 2; overflow: hidden; display: grid; gap: 1px; padding: 0; background: var(--line); min-height: 0; }

/* ---------- Panelen: geen kaarten, geen hoeken, geen schaduw ---------- */
ui-panel { background: var(--bg-elevated); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: var(--space-2); padding: 8px 12px 8px 14px; min-height: 44px; }
.panel-title { font-weight: var(--weight-semibold); font-size: var(--text-lg); }
.panel-count { color: var(--text-3); font-weight: var(--weight-regular); font-size: var(--text-md); }
.panel-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.panel-body { flex: 1; min-height: 0; overflow: hidden; position: relative; }

/* ---------- Bedieningselementen ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 11px; border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: var(--bg-elevated); color: var(--text); font: inherit; font-weight: var(--weight-medium); font-size: var(--text-sm); white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.btn.ai svg.i { color: var(--ai); }            /* AI-acties zijn gewone knoppen met een herkenbaar icoon */
.btn.primary.ai svg.i { color: inherit; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.sm { height: 24px; padding: 0 8px; font-size: var(--text-xs); }
.btn.touch { height: var(--control-h-touch); padding: 0 18px; font-size: 15px; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--radius-control); background: var(--bg-sunken); gap: 2px; }
.seg span { padding: 3px 10px; border-radius: 3px; font-size: var(--text-sm); color: var(--text-2); font-weight: var(--weight-medium); white-space: nowrap; }
.seg span.on { background: var(--bg-elevated); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--radius-control); border: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; }
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip svg.i { width: 13px; height: 13px; }
.toggle { width: 28px; height: 16px; border-radius: var(--radius-round); background: var(--line-strong); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: var(--radius-round); background: #fff; }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 14px; }
.check { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--bg-elevated); flex: none; display: grid; place-items: center; }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

/* Afdeling: klein vierkant als categorie (status gebruikt een rond stipje) */
.dept { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--text-2); white-space: nowrap; }
.dept::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: var(--c); flex: none; }
.d-export { --c: var(--dept-export); } .d-import { --c: var(--dept-import); } .d-pakket { --c: var(--dept-pakket); }
.d-koel { --c: var(--dept-koel); } .d-bouw { --c: var(--dept-bouw); } .d-retail { --c: var(--dept-retail); }
.d-charter { --c: var(--dept-charter); } .d-overig { --c: var(--dept-overig); }

/* Status: stip of icoon plus tekst, zonder vulling of pil */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--bc, var(--text-3)); flex: none; }
.badge:has(svg)::before { display: none; }
.badge svg.i { color: var(--bc, currentColor); }
.badge.ok { --bc: var(--ok); }
.badge.warn { --bc: var(--warn); color: var(--warn); }
.badge.crit { --bc: var(--crit); color: var(--crit); }
.badge.info { --bc: var(--accent); }
.badge.ai { --bc: var(--ai); color: var(--ai); }
.bc { width: 16px; height: 16px; display: grid; place-items: center; }
.bc svg.i { width: 14px; height: 14px; }
.bc.sent { color: var(--ok); }
.bc.todo { color: var(--crit); }
.bc.resend { color: var(--warn); }
.bc.none { color: var(--text-3); }

/* Meters: dun en recht */
.meter { height: 4px; border-radius: var(--radius-mark); background: var(--bg-sunken); overflow: hidden; position: relative; }
.meter > i { position: absolute; inset: 0 auto 0 0; background: var(--text-3); }
.meter.ok > i { background: var(--ok); } .meter.warn > i { background: var(--warn); } .meter.crit > i { background: var(--crit); }
/* Resterende rijtijd: getal met een dunne meter eronder (geen ring) */
.ring { --p: 50; --c: var(--ok); display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; width: 40px; flex: none; font-size: var(--text-xs); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; color: var(--text); }
.ring::before { content: attr(data-label); }
.ring::after { content: ""; width: 100%; height: 3px; border-radius: var(--radius-mark); background: linear-gradient(90deg, var(--c) calc(var(--p) * 1%), var(--bg-sunken) 0); }

/* ---------- ui-grid ---------- */
.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.grid th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: var(--weight-medium); color: var(--text-3); font-size: var(--text-xs); height: 28px; padding: 0 8px; background: var(--bg-elevated); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th.r, .grid td.r { text-align: right; }
.grid td { height: var(--row-h); padding: 0 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.grid tr:last-child td { border-bottom: none; }
.grid td:first-child, .grid th:first-child { padding-left: 14px; }
.grid tr.sel td { background: var(--accent-soft); }
.grid tr.locked td { color: var(--text-3); }
.grid tr.busy td { background: var(--bg-subtle); }
.grid tr.child td { background: var(--bg-subtle); height: 26px; color: var(--text-2); font-size: var(--text-xs); }
.grid tr.drop td { background: var(--accent-softer); }
.grid tr.drop-target td { border-top: 1px dashed var(--accent); border-bottom: 1px dashed var(--accent); }
.grid .trip { font-weight: var(--weight-semibold); color: var(--text); font-variant-numeric: tabular-nums; }
.grid .route { color: var(--text); }
.grid .arrow { color: var(--text-3); margin: 0 3px; }
.ld { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 2px; border-radius: var(--radius-mark); border: 1px solid var(--line-strong); font-size: 9.5px; font-weight: var(--weight-semibold); color: var(--text-2); }
.mini-ldm { display: flex; align-items: center; gap: 6px; }
.mini-ldm .meter { width: 46px; }
.lock-tag { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--text-2); }

/* ---------- Resources: lijst, geen kaartjes ---------- */
.res-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.res-item:first-child { border-top: none; }
.res-item.sel { background: var(--accent-soft); }
.res-icon { width: 20px; height: 20px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.res-icon.crit { color: var(--crit); }
.res-main { flex: 1; min-width: 0; }
.res-title { display: flex; align-items: center; gap: 6px; font-weight: var(--weight-semibold); font-size: var(--text-md); }
.res-sub { font-size: var(--text-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-side { text-align: right; font-size: var(--text-xs); color: var(--text-2); }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-2); }
.state .dot { width: 6px; height: 6px; }
.state.free .dot { background: var(--ok); } .state.drive .dot { background: var(--accent); } .state.rest .dot { background: var(--warn); } .state.off .dot { background: var(--text-3); }
.state.fault { color: var(--crit); } .state.fault .dot { background: var(--crit); }

/* ---------- Inspector ---------- */
.insp-sec { padding: 12px 16px; border-top: 1px solid var(--line); }
.insp-label { font-size: var(--text-xs); color: var(--text-3); font-weight: var(--weight-medium); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kv { display: grid; grid-template-columns: 96px 1fr; row-gap: 7px; font-size: var(--text-sm); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: var(--weight-medium); }
.stop { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; position: relative; padding-bottom: 12px; }
.stop:not(:last-child)::before { content: ""; position: absolute; left: 6.5px; top: 18px; bottom: 2px; width: 1px; background: var(--line-strong); }
.stop.done:not(:last-child)::before { background: var(--ok); }
.stop-dot { width: 14px; height: 14px; margin-top: 2px; border-radius: var(--radius-round); display: grid; place-items: center; background: var(--bg-elevated); border: 1px solid var(--line-strong); }
.stop.done .stop-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stop.now .stop-dot { border-color: var(--accent); background: var(--accent-soft); }
.stop-title { font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.stop-sub { font-size: var(--text-xs); color: var(--text-2); }
.stop-time { text-align: right; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }

/* ---------- Statusbalk ---------- */
ui-statusbar { grid-column: 2; grid-row: 3; display: flex; align-items: center; gap: 18px; padding: 0 14px; font-size: var(--text-xs); color: var(--text-2); border-top: 1px solid var(--line); background: var(--bg-subtle); }
ui-statusbar .row { gap: 6px; }

/* ---------- Tijdlijn: het raster draagt betekenis ---------- */
.tl { position: relative; display: grid; grid-template-columns: 232px 1fr; height: 100%; }
.tl-res { border-right: 1px solid var(--line); background: var(--bg-elevated); z-index: 2; }
.tl-res-head, .tl-scale { height: 36px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; padding: 0 12px 6px; font-size: var(--text-xs); color: var(--text-3); }
.tl-group { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 12px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-2); background: var(--bg-subtle); border-bottom: 1px solid var(--line); }
.tl-row-label { height: var(--tl-row, 44px); display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tl-row-label .t { font-weight: var(--weight-semibold); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.tl-row-label .s { font-size: var(--text-xs); color: var(--text-2); }
.tl-row-label .drive { margin-left: auto; width: 44px; text-align: right; font-size: 10.5px; color: var(--text-2); }
.tl-row-label .drive .meter { height: 3px; margin-top: 3px; }
.tl-row-label.fault { background: var(--crit-soft); }
.tl-row-label.cand { background: var(--ai-soft); }
.tl-canvas { position: relative; overflow: hidden; }
.tl-scale { position: relative; padding: 0; align-items: stretch; }
.tl-tick { position: absolute; bottom: 0; top: 0; border-left: 1px solid var(--line); font-size: 10.5px; color: var(--text-3); padding: 6px 0 0 6px; font-variant-numeric: tabular-nums; }
.tl-tick.day { color: var(--text); font-weight: var(--weight-semibold); }
.tl-grid-line { position: absolute; top: 36px; bottom: 0; border-left: 1px solid var(--line); }
.tl-grid-line.minor { opacity: .55; }
.tl-lane { position: relative; height: var(--tl-row, 44px); border-bottom: 1px solid var(--line); }
.tl-lane.group { height: 26px; background: var(--bg-subtle); }
.tl-lane.fault { background: var(--crit-soft); }
.tl-lane.cand { background: var(--ai-soft); }
.tl-now { position: absolute; top: 24px; bottom: 0; width: 1.5px; background: var(--live); z-index: 4; }
.tl-now::before { content: attr(data-time); position: absolute; top: -2px; left: 50%; transform: translateX(-50%); background: var(--live); color: #fff; font-size: 10px; font-weight: var(--weight-semibold); padding: 0 5px; line-height: 15px; border-radius: var(--radius-mark); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Balk: zachte afdelingsvulling met een gelijkmatige rand van 1 px rondom */
.bar { position: absolute; top: 7px; height: calc(var(--tl-row, 44px) - 14px); border-radius: var(--radius-mark); background: color-mix(in srgb, var(--c) 13%, var(--bg-elevated)); border: 1px solid color-mix(in srgb, var(--c) 38%, var(--bg-elevated)); display: flex; align-items: center; gap: 6px; padding: 0 7px; font-size: 11.5px; overflow: hidden; white-space: nowrap; color: var(--text); }
.bar .p { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 14%, transparent); pointer-events: none; }
.bar b { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; position: relative; }
.bar span { color: var(--text-2); position: relative; overflow: hidden; text-overflow: ellipsis; }
.bar svg.i { position: relative; width: 13px; height: 13px; }
.bar.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bar.late::after { content: attr(data-late); position: absolute; right: 0; top: 0; bottom: 0; padding: 0 6px; display: grid; place-items: center; font-size: 10px; font-weight: var(--weight-semibold); color: var(--warn); background: var(--warn-soft); }
.bar.fault { border-color: var(--crit); background: repeating-linear-gradient(-45deg, var(--crit-soft) 0 5px, var(--bg-elevated) 5px 10px); }
.bar.fault svg.i { color: var(--crit); }
.bar.ghost { background: var(--bg-elevated); border: 1px dashed var(--ai); color: var(--ai); }
.bar.ghost b { color: var(--ai); }
.bar.notime { width: 16px !important; padding: 0; justify-content: center; }
.bar.absent { --c: var(--dept-overig); background: repeating-linear-gradient(-45deg, var(--bg-sunken) 0 4px, transparent 4px 9px); border-color: var(--line-strong); color: var(--text-2); }
.drive-line { position: absolute; bottom: 4px; height: 2px; background: color-mix(in srgb, var(--ai) 50%, transparent); }
.eta-mark { position: absolute; top: 5px; width: 1.5px; height: calc(var(--tl-row, 44px) - 10px); background: var(--warn); }

/* ---------- AI-paneel: een voorstel, geen show ---------- */
vpb-ai-panel { display: flex; flex-direction: column; min-height: 0; }
.ai-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.ai-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-2); }
.ai-kicker svg.i { color: var(--ai); }
.ai-title { font-size: var(--text-xl); font-weight: var(--weight-semibold); margin: 6px 0 3px; }
.ai-sub { font-size: var(--text-sm); color: var(--text-2); }
.opt { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-elevated); }
.opt.best { background: var(--ai-soft); }
.opt-top { display: flex; align-items: flex-start; gap: 10px; }
.opt-rank { width: 14px; font-weight: var(--weight-semibold); font-size: var(--text-md); color: var(--text-3); font-variant-numeric: tabular-nums; }
.opt.best .opt-rank { color: var(--ai); }
.opt-name { font-weight: var(--weight-semibold); font-size: var(--text-md); }
.opt-desc { font-size: var(--text-xs); color: var(--text-2); }
.opt-score { margin-left: auto; text-align: right; }
.opt-score b { font-size: var(--text-xl); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.opt-score small { display: block; font-size: 10px; color: var(--text-3); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 10px 0 0 24px; }
.fact small { display: block; font-size: 10.5px; color: var(--text-3); }
.fact b { font-size: var(--text-sm); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.fact.bad b { color: var(--crit); } .fact.mid b { color: var(--warn); }
.opt-actions { display: flex; gap: 6px; margin: 12px 0 0 24px; }
.ai-chat { padding: 12px 16px; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.bubble { padding: 6px 0; max-width: 100%; }
.bubble.me { width: fit-content; max-width: 86%; margin-left: auto; padding: 6px 10px; border-radius: var(--radius-control); background: var(--bg-sunken); }
.bubble.ai { color: var(--text); }
.ai-input { display: flex; align-items: center; gap: 8px; margin-top: 8px; height: 30px; border-radius: var(--radius-control); padding: 0 3px 0 10px; background: var(--bg-elevated); border: 1px solid var(--line-strong); color: var(--text-3); }
.ai-foot { margin-top: auto; padding: 10px 16px; border-top: 1px solid var(--line); font-size: var(--text-xs); color: var(--text-3); display: flex; align-items: center; gap: 6px; }

/* ---------- Meldingen ---------- */
.toast { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-overlay); background: var(--bg-overlay); box-shadow: var(--shadow-overlay); border: 1px solid var(--line); font-size: var(--text-sm); z-index: 20; }
.toast .ti { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
/* Banner in een vlak: volle breedte, zachte vulling, geen hoeken */
.banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: var(--text-sm); color: var(--text); }
.banner > svg.i { flex: none; }
.banner.ok { background: var(--ok-soft); } .banner.ok > svg.i { color: var(--ok); }
.banner.warn { background: var(--warn-soft); } .banner.warn > svg.i { color: var(--warn); }
.banner.crit { background: var(--crit-soft); } .banner.crit > svg.i { color: var(--crit); }
.banner b { font-weight: var(--weight-semibold); }
.note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--text-2); }
.note.ok svg.i { color: var(--ok); }

/* ---------- Slepen ---------- */
.drag-ghost { position: absolute; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-control); background: var(--bg-overlay); box-shadow: var(--shadow-overlay); border: 1px solid var(--accent); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.drag-ghost .n { min-width: 16px; height: 16px; border-radius: var(--radius-mark); background: var(--accent); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: var(--weight-semibold); padding: 0 4px; }
.cursor { position: absolute; z-index: 31; width: 18px; height: 18px; }

/* ---------- Kaart ---------- */
.map-wrap { position: relative; height: 100%; overflow: hidden; }
.map-floating { position: absolute; background: var(--bg-overlay); border-radius: var(--radius-overlay); box-shadow: var(--shadow-overlay); border: 1px solid var(--line); }
.truck-pin { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; padding: 2px 6px 2px 2px; border-radius: var(--radius-control); background: var(--bg-overlay); border: 1px solid var(--line-strong); font-size: 11px; font-weight: var(--weight-semibold); white-space: nowrap; }
.truck-pin .tp { width: 18px; height: 18px; border-radius: var(--radius-round); display: grid; place-items: center; color: #fff; background: var(--accent); }
.truck-pin .tp svg.i { width: 12px !important; height: 12px !important; }
.truck-pin.ok .tp { background: var(--ok); } .truck-pin.warn .tp { background: var(--warn); } .truck-pin.crit .tp { background: var(--crit); } .truck-pin.rest .tp { background: var(--dept-overig); }
.truck-pin.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cluster { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: var(--radius-round); background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: var(--weight-semibold); font-size: 12px; border: 2px solid var(--bg-elevated); }
.stop-pin { position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: var(--radius-round); display: grid; place-items: center; font-size: 10px; font-weight: var(--weight-semibold); color: #fff; border: 1.5px solid var(--bg-elevated); }
.stop-pin.l { background: var(--accent); } .stop-pin.d { background: var(--ok); } .stop-pin.todo { background: var(--bg-elevated); color: var(--text); border-color: var(--text-3); }

/* ---------- Apparaatkaders (de hardware zelf, geen UI) ---------- */
.device-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 56px; background: #e9eaed; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .device-stage { background: #111113; } }
.phone { width: 393px; height: 852px; border-radius: 56px; padding: 12px; background: #111; box-shadow: inset 0 0 0 2px #333; position: relative; flex: none; }
.phone-screen { width: 100%; height: 100%; border-radius: 45px; overflow: hidden; position: relative; background: var(--bg); }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; border-radius: 20px; background: #000; z-index: 50; }
.ios-status { height: 54px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px 6px 36px; font-weight: var(--weight-semibold); font-size: 15px; }
.tablet { width: 1180px; height: 820px; border-radius: 36px; padding: 14px; background: #1b1b1d; box-shadow: inset 0 0 0 2px #333; flex: none; }
.tablet-screen { width: 100%; height: 100%; border-radius: 24px; overflow: hidden; position: relative; background: var(--bg); }

/* ---------- Schetslabel ---------- */
.sketch-label { position: fixed; right: 14px; bottom: 36px; z-index: 99; font-size: 10.5px; color: var(--text-3); background: var(--bg-overlay); padding: 3px 8px; border-radius: var(--radius-control); border: 1px solid var(--line); }
