/* Commaxx control tower – stijl Mercury-zacht (brand/stijlnotitie.md).
   Overgenomen uit experiments/: shared.css, attention-list.css, de inline stijl van de pagina en theme.css,
   in dezelfde volgorde als in de HTML-demo. Nieuwe regels voor de Blazor-app staan onderaan. */

/* ── shared.css ── */
:root {
  --indigo: #2e2865;
  --indigo-light: #3f368a;
  --indigo-dim: #262153;
  --indigo-tint: #ecebf5;
  --ink: #111111;
  --muted: #5f5f6b;
  --line: #e8e8e1;
  --surface: #ffffff;
  --page: #f6f6f3;
  --crit: #c22a1c;
  --crit-tint: #fbeae8;
  --warn: #b86400;
  --warn-tint: #fdf1e2;
  --ok: #1f7a4d;
  --info: #104a75;
  --font: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--page); font-size: 15px; line-height: 1.5; }
button { font: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* Kopbalk */
.topbar { display: flex; flex-wrap: wrap; row-gap: 8px; align-items: center; gap: 24px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar img { height: 26px; }
.topbar .title { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.topbar .spacer { flex: 1; }
.proto { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--indigo); color: #fff; padding: 6px 12px; }
.route-nav { display: flex; gap: 4px; }
.route-nav a { white-space: nowrap; font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 10px; border: 1px solid transparent; }
.route-nav a[aria-current="page"] { color: var(--indigo); border-color: var(--indigo); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
h1 { font-weight: 400; font-size: 30px; letter-spacing: .02em; margin: 0 0 4px; color: var(--indigo); }
.lede { color: var(--muted); margin: 0 0 20px; }

/* Aandachtslijst */
.list { background: var(--surface); border: 1px solid var(--line); margin-top: 20px; }
.list-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-head h2 { margin: 0; font-weight: 500; font-size: 18px; }
.list-head .count { color: var(--muted); }
.list-head .clear { margin-left: auto; background: none; border: 1px solid var(--line); padding: 4px 10px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 18px; border-bottom: 1px solid var(--line); }
td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 8px; margin: 0 4px 4px 0; border: 1px solid; white-space: nowrap; }
.tag.ds { color: var(--indigo); border-color: var(--indigo); background: var(--indigo-tint); }
.tag.eta, .tag.etd { color: var(--crit); border-color: #f0b9b3; background: var(--crit-tint); }
.tag.chg { color: var(--warn); border-color: #f2cf9f; background: var(--warn-tint); }
.reason { color: var(--muted); font-size: 13px; }
.act { background: var(--indigo); color: #fff; border: 0; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.act:hover { background: var(--indigo-light); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: #fff; padding: 10px 18px; font-size: 14px; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

:focus-visible { outline: 2px solid var(--indigo-light); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Skiplink en varianten-menu */
.skip { position: absolute; left: 12px; top: -48px; background: var(--indigo); color: #fff; padding: 8px 14px; z-index: 50; text-decoration: none; }
.skip:focus { top: 8px; }
.variants { position: relative; }
.variants summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 10px; border: 1px solid var(--line); user-select: none; }
.variants summary::-webkit-details-marker { display: none; }
.variants summary::after { content: " ▾"; font-size: 10px; }
.variants[open] summary { color: var(--indigo); border-color: var(--indigo); }
.variants nav { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(30,28,60,.12); display: grid; min-width: 240px; z-index: 40; }
.variants nav a { padding: 10px 14px; font-size: 14px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.variants nav a:last-child { border-bottom: 0; }
.variants nav a:hover { background: var(--indigo-tint); }
.variants nav a[aria-current="page"] { color: var(--indigo); box-shadow: inset 3px 0 0 var(--indigo); }
.topbar { position: relative; }

/* Druk-feedback (emil-design-eng) */
button, .variants summary { transition: transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 150ms ease, opacity 150ms ease; }
button:active, .variants summary:active { transform: scale(.97); }

/* Signaalkleuren: rood = verstreken, leisteen = datum schuift (dataviz: rood/oranje te dicht bij elkaar) */
:root { --slate: #4b5768; --slate-tint: #eef0f3; }
.tag.chg { color: var(--slate); border-color: #c9ced6; background: var(--slate-tint); }
.tag.chg::before { content: "↻"; font-size: 12px; }
.logout { font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); }
.logout:hover { color: var(--indigo); border-color: var(--indigo); }

/* ── attention-list.css ── */

#attn.attention-list {
  --mono: 'IBM Plex Mono', monospace;
  --line: #e3e2dc;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 24px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
#attn *, #attn *::before, #attn *::after { box-sizing: border-box; }
#attn [hidden] { display: none !important; }
#attn button { border-radius: 0; font: inherit; font-size: 13px; transition: none; animation: none; transform: none; cursor: pointer; }
#attn :focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
#attn .attn-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 400; }
#attn .attn-muted { color: var(--muted); font-size: 13px; }
#attn .attn-label { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
#attn .attn-main { min-width: 0; background: var(--surface); border: 1px solid var(--line); }
#attn .attn-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; padding: 20px 20px 8px; }
#attn h2 { margin: 0; font-size: 22px; font-weight: 500; color: var(--indigo); line-height: 1.25; }
#attn .attn-total { color: var(--muted); font-size: 13px; white-space: nowrap; }
#attn .attn-filters { display: flex; flex-wrap: wrap; gap: 6px; }
#attn .attn-filter { background: var(--indigo-tint); border: 1px solid var(--indigo); color: var(--indigo); padding: 4px 10px; }
#attn .attn-sort { margin: 0; padding: 0 20px 20px; max-width: 76ch; font-size: 13px; color: var(--muted); }
#attn .attn-table-scroll { overflow-x: auto; }
#attn .attn-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#attn .attn-table th, #attn .attn-table td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
#attn .attn-table thead th { background: #fafaf8; font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
#attn .attn-table thead th:nth-child(1) { width: 42px; }
#attn .attn-table thead th:nth-child(2) { width: 130px; }
#attn .attn-table thead th:nth-child(4) { width: 140px; }
#attn .attn-table thead th:nth-child(5), #attn .attn-table thead th:nth-child(6) { width: 76px; }
#attn .attn-table .attn-select-cell { padding-left: 12px; padding-right: 8px; }
#attn .attn-check { display: block; width: 17px; height: 17px; margin: 3px 0; border-radius: 0; accent-color: var(--indigo); cursor: pointer; }
#attn .attn-group-heading td, #attn .attn-group-heading th { background: #f1f0f7; vertical-align: middle; padding-top: 12px; padding-bottom: 12px; }
#attn .attn-group-heading th { text-transform: none; letter-spacing: 0; }
#attn .attn-group-toggle { display: inline-flex; align-items: center; gap: 9px; padding: 0 0 2px; border: 0; color: var(--indigo); background: none; text-align: left; }
#attn .attn-group-title { font-size: 15px; font-weight: 500; }
#attn .attn-group-count { color: var(--muted); }
#attn .attn-chevron { width: 12px; font-size: 14px; }
#attn .attn-group-hint { display: block; margin-left: 21px; color: var(--muted); font-size: 13px; font-weight: 400; }
#attn .attn-order-row { cursor: pointer; }
#attn .attn-order-row:hover { background: #f7f7fa; }
#attn .attn-order-row.attn-selected { background: #f4f3fa; }
#attn .attn-order-row.attn-current { background: var(--indigo-tint); }
#attn .attn-current .attn-order-id { box-shadow: inset 3px 0 var(--indigo); }
#attn .attn-order-row:focus-visible { outline-offset: -3px; }
#attn .attn-order-id > span, #attn .attn-product > span { display: block; }
#attn .attn-order-id > .attn-muted { margin-top: 4px; }
#attn .attn-product strong { display: block; font-size: 14px; font-weight: 500; }
#attn .attn-product, #attn .attn-reason { overflow-wrap: anywhere; }
#attn .attn-reason { margin: 7px 0 0; font-size: 13px; color: var(--muted); }
#attn .attn-date { white-space: nowrap; }
#attn .attn-overdue { color: var(--crit); }
#attn .attn-tags { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 5px; }
#attn .attn-tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid; padding: 2px 6px; font-size: 13px; line-height: 1.4; }
#attn .attn-tag-ds { color: var(--indigo); background: var(--indigo-tint); border-color: #ccc8e3; }
#attn .attn-tag-eta, #attn .attn-tag-etd { color: var(--crit); background: var(--crit-tint); border-color: #efc5c0; }
#attn .attn-tag-chg { color: var(--slate); background: var(--slate-tint); border-color: #c9ced6; }
#attn .attn-tag-chg::before { content: '↻'; }
#attn .attn-more-row td { padding-left: 52px; }
#attn .attn-link { padding: 5px 0; border: 0; background: none; color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
#attn .attn-link:hover { color: var(--indigo-light); }
#attn .attn-detail-dock { position: sticky; top: 16px; width: 380px; min-width: 0; }
#attn .attn-detail { padding: 22px; border: 1px solid var(--line); background: var(--surface); max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-gutter: stable; }
#attn .attn-detail-empty { min-height: 185px; }
#attn .attn-detail-empty > .attn-muted { max-width: 32ch; margin-bottom: 0; }
#attn .attn-detail-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
#attn .attn-detail-top .attn-link { white-space: nowrap; }
#attn h3 { margin: 0; font-size: 23px; line-height: 1.3; color: var(--indigo); }
#attn .attn-detail-product { margin: 12px 0; font-size: 15px; overflow-wrap: anywhere; }
#attn .attn-explanation { margin: 18px 0; }
#attn .attn-explanation p { margin: 0 0 10px; font-size: 15px; }
#attn .attn-primary { padding: 10px 14px; border: 1px solid var(--indigo); background: var(--indigo); color: white; }
#attn .attn-primary:hover { background: var(--indigo-light); }
#attn .attn-facts { margin: 24px 0; }
#attn .attn-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
#attn .attn-facts dt { color: var(--muted); font-size: 13px; }
#attn .attn-facts dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
#attn .attn-history { padding-top: 18px; border-top: 1px solid var(--line); }
#attn .attn-history > p { margin: 0 0 16px; }
#attn .attn-timeline { margin: 16px 0 0 5px; padding: 0 0 0 18px; list-style: none; border-left: 1px solid var(--line); }
#attn .attn-timeline li { position: relative; padding: 0 0 16px; font-size: 13px; }
#attn .attn-timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 7px; height: 7px; background: var(--slate); }
#attn .attn-timeline time, #attn .attn-timeline span { display: block; }
#attn .attn-history .attn-history-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
#attn .attn-source { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; font-size: 13px; }
#attn .attn-source summary { color: var(--indigo); cursor: pointer; font-size: 14px; }
#attn .attn-source ul { padding-left: 18px; }
#attn .attn-source li { margin: 12px 0; }
#attn .attn-source li p { margin: 4px 0 0; overflow-wrap: anywhere; }
#attn .attn-source strong { font-weight: 500; }
#attn .attn-empty { padding: 30px 20px 40px; border-top: 1px solid var(--line); }
#attn .attn-empty p { margin: 0 0 16px; }
#attn .attn-bulk { position: fixed; z-index: 70; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); width: max-content; padding: 12px 16px; background: var(--indigo); color: white; box-shadow: 0 8px 32px #211d4233; }
#attn .attn-bulk > span { font-size: 13px; margin-right: 6px; white-space: nowrap; }
#attn .attn-bulk button { padding: 8px 12px; border: 1px solid #ffffff88; white-space: nowrap; }
#attn .attn-bulk-primary { color: var(--indigo); background: white; }
#attn .attn-bulk-secondary { color: white; background: transparent; }
#attn .attn-bulk .attn-bulk-clear { color: white; background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
#attn .attn-bulk :focus-visible { outline-color: white; }
#attn.attn-has-selection { padding-bottom: 100px; }
#attn .attn-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* shared.js maakt de toast buiten #attn. Geen bijkomende beweging uit shared.css. */
.toast { z-index: 80; bottom: 105px; max-width: calc(100% - 32px); width: max-content; transition: none; transform: translateX(-50%); }
.toast.show { transform: translateX(-50%); }
#attn .attn-detail-enter { animation: attn-detail-in 150ms cubic-bezier(.23, 1, .32, 1); }
@keyframes attn-detail-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1179.98px) {
  #attn.attention-list { display: block; }
  #attn .attn-detail-dock { display: none; }
  #attn .attn-inline-detail > td { padding: 0 20px 20px 52px; background: var(--indigo-tint); }
  #attn .attn-inline-detail .attn-detail { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  #attn .attn-inline-detail .attn-facts > div { grid-template-columns: 150px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #attn .attn-table { min-width: 720px; }
  #attn .attn-bulk { flex-wrap: wrap; justify-content: center; gap: 8px; bottom: 12px; width: calc(100% - 24px); padding: 10px; }
  #attn .attn-bulk > span { width: 100%; text-align: center; }
  #attn.attn-has-selection { padding-bottom: 150px; }
  .toast { bottom: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  #attn .attn-detail-enter { animation: none; }
}

/* ── inline stijl route-ab-reis-en-kerkrade.html ── */

  :root { --mono: "IBM Plex Mono", ui-monospace, monospace; --hair: #e3e2dc; --ease-out: cubic-bezier(.23, 1, .32, 1); }
  .wrap { max-width: 1680px; }
  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
  .muted { color: var(--muted); } .small { font-size: 13px; }
  .proto { white-space: nowrap; }

  /* ── Kop: begroeting + klikbare kerncijfers ── */
  .head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 14px; }
  .kpis { display: flex; flex-wrap: wrap; border: 1px solid var(--hair); background: #fff; }
  .kpi { background: #fff; border: 0; border-right: 1px solid var(--hair); padding: 10px 18px; min-width: 132px; text-align: left; }
  .kpi:last-child { border-right: 0; }
  .kpi:hover { background: #f7f7fb; }
  .kpi[aria-pressed="true"] { background: var(--indigo); color: #fff; }
  .kpi[aria-pressed="true"] .k, .kpi[aria-pressed="true"] .v, .kpi.crit[aria-pressed="true"] .v { color: #fff; }
  .kpi .k { display: block; font-size: 13px; color: var(--muted); }
  .kpi .v { display: block; font-family: var(--mono); font-size: 24px; line-height: 1.2; }
  .kpi.crit .v { color: var(--crit); }

  /* ── Top 3 vandaag ── */
  .top3 { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--hair); background: #fff; margin-bottom: 14px; }
  .top3 .t3-title { padding: 14px 18px; border-right: 1px solid var(--hair); display: grid; align-content: center; }
  .top3 .t3-title b { font-weight: 500; font-size: 15px; }
  .top3 .t3-title span { font-size: 13px; color: var(--muted); }
  .t3 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-right: 1px solid var(--hair); align-items: start; }
  .t3:last-child { border-right: 0; }
  .t3 .t3-open { grid-column: 1; background: none; border: 0; padding: 0; text-align: left; color: inherit; }
  .t3 .t3-open:hover .t3-prod { text-decoration: underline; text-underline-offset: 3px; }
  .t3 .t3-id { font-family: var(--mono); font-size: 13px; color: var(--muted); }
  .t3 .t3-prod { display: block; font-size: 14px; }
  .t3 .t3-prod b { font-weight: 500; }
  .t3 .t3-why { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
  .t3 .act { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

  /* ── Fasechips ── */
  .phasebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
  .chip { display: inline-flex; align-items: baseline; gap: 8px; background: #fff; border: 1px solid var(--hair); padding: 7px 12px; font-size: 14px; }
  .chip .n { font-family: var(--mono); font-size: 13px; }
  .chip .a { font-family: var(--mono); font-size: 12px; color: var(--crit); }
  .chip[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
  .chip[aria-pressed="true"] .a { color: #fff; }
  .ghost { background: none; border: 1px solid var(--hair); padding: 7px 12px; font-size: 13px; color: var(--muted); }
  .ghost:hover { color: var(--indigo); border-color: var(--indigo); }

  /* ── Wereld + inzicht ── */
  .tower { display: grid; grid-template-columns: minmax(0, 1fr) 420px; border: 1px solid var(--hair); background: #fff; }
  .stage { position: relative; height: clamp(420px, 58vh, 720px); background: radial-gradient(120% 90% at 50% 20%, #f4f5f6 0%, #ecede9 100%); overflow: hidden; border-right: 1px solid var(--hair); }
  .stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
  .stage.dragging canvas { cursor: grabbing; }
  .nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }

  .label { position: absolute; transform: translate(-50%, -100%); background: #fff; border: 1px solid var(--hair); padding: 6px 12px 7px; text-align: left; min-width: 116px; box-shadow: 0 8px 24px rgba(30,28,60,.10); transition: opacity 150ms ease, transform 140ms var(--ease-out); }
  .label::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 1px; height: 8px; background: var(--indigo); }
  .label:active { transform: translate(-50%, -100%) scale(.97); }
  .label[aria-pressed="true"] { background: var(--indigo); color: #fff; }
  .label[aria-pressed="true"] .l-sub { color: #fff; }
  .label .l-name { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
  .label .l-n { font-family: var(--mono); font-size: 22px; line-height: 1.15; }
  .label .l-sub { font-size: 13px; color: var(--crit); }
  .label.dim { opacity: .4; }
  .ship-tag { background: rgba(255,255,255,.92); padding: 2px 6px; color: var(--ink); letter-spacing: .02em; text-transform: none; font-family: var(--mono); font-size: 12px; transition: opacity .3s; }
  .place { position: absolute; transform: translate(-50%, 0); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #6c6a78; pointer-events: none; white-space: nowrap; }

  .tools { position: absolute; right: 16px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; z-index: 20; max-width: 60%; }
  .label, .place { z-index: 2; }
  .seg { display: flex; background: #fff; border: 1px solid var(--hair); }
  .seg button { background: none; border: 0; padding: 8px 12px; font-size: 13px; min-width: 36px; }
  .seg button + button { border-left: 1px solid var(--hair); }
  .seg button[aria-pressed="true"] { background: var(--indigo); color: #fff; }
  .hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: calc(100% - 32px); text-align: center; background: rgba(17,17,17,.84); color: #fff; font-size: 13px; padding: 7px 12px; z-index: 6; opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
  .hint.show { opacity: 1; }
  .legend { position: absolute; left: 16px; bottom: 12px; max-width: 36%; z-index: 5; background: rgba(255,255,255,.94); border: 1px solid var(--hair); padding: 8px 12px; font-size: 13px; display: grid; gap: 3px; }
  .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

  /* Fase-inzicht */
  #insight { padding: 22px 22px 18px; overflow: auto; max-height: clamp(420px, 58vh, 720px); }
  #insight .fade { animation: fadeUp 150ms var(--ease-out); }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  #insight h2 { margin: 0; font-weight: 500; font-size: 22px; color: var(--indigo); }
  .i-sub { margin: 2px 0 16px; font-size: 14px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); margin-bottom: 20px; }
  .st { padding: 10px 12px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: grid; gap: 2px; }
  .st span { font-size: 13px; color: var(--muted); }
  .st b { font-weight: 400; font-size: 22px; }
  .st.crit b { color: var(--crit); }
  .c-title { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
  .bars { display: grid; gap: 8px; margin-bottom: 20px; }
  .bar { display: grid; grid-template-columns: 120px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
  .bar:hover .b-f { background: var(--indigo-light); }
  .b-l { color: var(--ink); line-height: 1.25; }
  .b-t { height: 10px; background: #f0efea; }
  .b-f { display: block; height: 100%; background: var(--indigo); border-radius: 0 2px 2px 0; }
  .b-v { text-align: right; }
  .mini { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--hair); }
  .mini li { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
  .advice { background: var(--indigo-tint); padding: 14px 16px; margin-bottom: 14px; }
  .advice p { margin: 4px 0 12px; font-size: 14px; }
  .advice .act { padding: 9px 14px; }
  .i-empty { padding: 14px 16px; background: #f6f6f3; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
  .linkbtn { background: none; border: 0; padding: 0; color: var(--indigo); font-size: 13px; margin-bottom: 12px; }

  @media (max-width: 1180px) {
    .tower { grid-template-columns: 1fr; } .stage { border-right: 0; } #insight { max-height: none; border-top: 1px solid var(--hair); }
    .top3 { grid-template-columns: 1fr; } .top3 .t3-title, .t3 { border-right: 0; border-bottom: 1px solid var(--hair); }
  }

/* ── theme.css ── */
/* Thema "Mercury-zacht" (reference lock in brand/stijlnotitie.md).
   Laadt als laatste en legt de app-schil, kaarten, knoppen en de lijst in één visuele taal. */

:root {
  --canvas: #f5f5f7;
  --card: #ffffff;
  --border: #ebebef;
  --border-strong: #dcdce3;
  --ink: #16151d;
  --muted: #6b6a78;
  --faint: #9a99a6;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-pop: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --sb: 248px;
  --hair: var(--border);
  --line: var(--border);
}

body { background: var(--canvas); color: var(--ink); }
.ic { width: 16px; height: 16px; flex: none; }
svg.ic, i.ic { display: inline-block; vertical-align: -3px; }

/* ── App-schil ─────────────────────────────────────────── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb); background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 18px 12px 14px; z-index: 30; }
.sb-brand { padding: 4px 10px 22px; }
.sb-brand img { height: 26px; width: auto; display: block; }
.sb-section { display: block; font-size: 12px; font-weight: 500; color: var(--faint); padding: 0 10px 8px; letter-spacing: .02em; }
.sb-nav { display: grid; gap: 2px; }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: 14px; }
.sb-item:hover { background: #f4f4f7; }
.sb-item.active { background: #efeef7; color: var(--indigo); font-weight: 500; }
.sb-item.muted { color: var(--muted); cursor: default; }
.sb-item.muted:hover { background: none; }
.sb-item em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--faint); background: #f4f4f7; border-radius: 999px; padding: 1px 8px; }
.sb-foot { margin-top: auto; display: grid; gap: 6px; border-top: 1px solid var(--border); padding-top: 12px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.sb-user b { display: block; font-weight: 500; font-size: 14px; }
.sb-user small { display: block; font-size: 12px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--indigo); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.sb-item.logout { color: var(--muted); }

main.wrap { margin-left: var(--sb); max-width: none; padding: 0 32px 56px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 0; margin: 0 0 6px; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(10px); border: 0; }
.search { display: flex; align-items: center; gap: 10px; width: min(520px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; height: 40px; box-shadow: var(--shadow); color: var(--muted); }
.search:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(46, 40, 101, .12); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; background: none; color: var(--ink); }
.search kbd { font-family: var(--mono); font-size: 11px; color: var(--faint); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.peil { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.icon-btn:hover { border-color: var(--border-strong); }
.skip { left: 12px; }

/* ── Kop ───────────────────────────────────────────────── */
h1 { color: var(--ink); font-size: 32px; font-weight: 400; letter-spacing: -.01em; margin: 6px 0 4px; }
.lede { color: var(--muted); font-size: 15px; }
.head { align-items: flex-end; margin-bottom: 18px; }

/* Kerncijfers als kaarten */
.kpis { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 12px; border: 0; background: none; width: 100%; margin-top: 16px; }
.head { display: block; }
.kpi { background: var(--card); border: 1px solid var(--border) !important; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; display: grid; gap: 4px; text-align: left; transition: border-color 150ms ease, box-shadow 150ms ease, transform 140ms var(--ease-out); }
.kpi:hover { background: var(--card); border-color: var(--border-strong) !important; box-shadow: var(--shadow-pop); }
.kpi .k { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.kpi-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f2f1f8; color: var(--indigo); }
.kpi.crit .kpi-ic { background: #fbecea; color: var(--crit); }
.kpi .v { font-size: 30px; line-height: 1.1; margin-top: 6px; color: var(--ink); }
.kpi.crit .v { color: var(--crit); }
.kpi.hero .v { font-size: 40px; }
.kpi .s { font-size: 13px; color: var(--muted); }
.kpi[aria-pressed="true"] { background: var(--card) !important; border-color: var(--indigo) !important; box-shadow: 0 0 0 3px rgba(46, 40, 101, .12), var(--shadow); }
.kpi[aria-pressed="true"] .k { color: var(--indigo) !important; }
.kpi[aria-pressed="true"] .v { color: inherit; }
.kpi.crit[aria-pressed="true"] .v { color: var(--crit) !important; }
.kpi:not(.crit)[aria-pressed="true"] .v { color: var(--ink) !important; }

/* ── Kaarten algemeen ──────────────────────────────────── */
.top3, .tower, #attn .attn-main, #attn .attn-detail { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.top3 { overflow: hidden; margin-bottom: 18px; grid-template-columns: 220px repeat(3, minmax(0, 1fr)); }
.top3 .t3-title { display: flex; flex-direction: column; justify-content: center; gap: 2px; border-right: 1px solid var(--border); padding: 16px 20px; }
.card-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fbecea; color: var(--crit); margin-bottom: 8px; }
.t3 { border-right: 1px solid var(--border); padding: 16px 18px; }
.t3:hover { background: #fafafc; }

/* Knoppen: pillen met icoon */
.act, .attn-primary, .attn-bulk-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px !important; background: var(--indigo); color: #fff; border: 0; padding: 8px 14px; font-size: 13px; font-weight: 500; box-shadow: 0 1px 2px rgba(46, 40, 101, .25); }
.act:hover, .attn-primary:hover, .attn-bulk-primary:hover { background: var(--indigo-light); }
.ghost, .pill.ghost { border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--ink); padding: 7px 14px; box-shadow: var(--shadow); }
.ghost:hover { border-color: var(--border-strong); color: var(--ink); }

/* Fasechips */
.phasebar { gap: 8px; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); padding: 7px 14px 7px 12px; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--border-strong); } }
.chip .ic { color: var(--muted); }
.chip .n { color: var(--muted); }
.chip .a { background: #fbecea; color: var(--crit); border-radius: 999px; padding: 0 7px; }
.chip[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.chip[aria-pressed="true"] .ic, .chip[aria-pressed="true"] .n { color: #fff; }
.chip[aria-pressed="true"] .a { background: rgba(255, 255, 255, .18); color: #fff; }

/* Wereld + inzicht als één kaart */
.tower { overflow: hidden; }
.stage { border-right: 1px solid var(--border); background: radial-gradient(120% 90% at 50% 15%, #f7f8fa 0%, #eceef0 100%); }
/* Nacht (19 nov): zelfde wereld, nachtblauwe lucht achter het canvas; de nevel in stage.js heeft dezelfde kleur */
.stage.night { background: radial-gradient(120% 90% at 50% 10%, #2a3466 0%, #121834 55%, #0b1024 100%); transition: background .4s ease; }
.stage .seg button[data-act="night"][aria-pressed="true"] { background: #ffe2a8; color: #1b1630; }   /* warm 'lamp aan', valt op tegen de nachtlucht */
.seg { border-radius: 999px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.seg button { display: inline-flex; align-items: center; gap: 6px; }
.label { border-radius: 10px; border-color: var(--border); box-shadow: var(--shadow-pop); padding: 8px 12px 9px; }
.label::after { display: none; }
.label .l-name { letter-spacing: .04em; text-transform: none; font-size: 13px; color: var(--muted); }
.label[aria-pressed="true"] .l-name { color: #d9d7ee; }
.legend { border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow); border-color: var(--border); }
.hint { border-radius: 999px; }

#insight h2 { color: var(--ink); font-size: 24px; font-weight: 400; }
.stats { border: 0; gap: 10px; }
.st { border: 1px solid var(--border) !important; border-radius: var(--r-sm); background: #fbfbfd; }
.advice { background: #f3f2fa; border-radius: var(--r); padding: 16px 18px; }
.i-empty { border-radius: var(--r); }
.b-t { border-radius: 999px; overflow: hidden; height: 8px; }
.b-f { border-radius: 999px; }

/* Toast */
.toast { border-radius: 999px; padding: 10px 18px; box-shadow: var(--shadow-pop); }

/* ── Aandachtslijst (Codex) in dezelfde taal ───────────── */
#attn { gap: 16px; background: none; border: 0; margin-top: 18px; }
#attn button { border-radius: var(--r-sm); }
#attn .attn-main { overflow: hidden; }
#attn .attn-head h2 { font-size: 20px; font-weight: 400; }
#attn .attn-filter { border-radius: 999px !important; }
#attn .attn-table thead th { background: #fafafc; font-size: 12px; letter-spacing: .02em; text-transform: none; color: var(--muted); }
#attn .attn-group-heading th, #attn .attn-group-heading td { background: #fafafc; }
#attn .attn-order-row:hover td { background: #fafafc; }
#attn .attn-current td { background: #f3f2fa !important; }
#attn .attn-tag, #attn .tag { border-radius: 6px; }
#attn .attn-detail { border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }
#attn .attn-facts > div, #attn .attn-source { border-radius: var(--r-sm); }
#attn .attn-bulk { border-radius: 999px; box-shadow: var(--shadow-pop); padding-left: 22px; }
#attn .attn-bulk button { border-radius: 999px !important; }
#attn input[type="checkbox"] { accent-color: var(--indigo); width: 16px; height: 16px; border-radius: 4px; }

@media (max-width: 1100px) {
  .sidebar { display: none; }
  main.wrap { margin-left: 0; padding: 0 18px 40px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .top3 { grid-template-columns: 1fr; }
}
.skip { top: -80px; }
.skip:focus { top: 10px; }
.legend { flex-wrap: wrap; }
.legend span { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }

/* ── Blazor-app: nieuw in iteratie 2 ───────────────────── */
.sb-section + .sb-section, .sb-nav + .sb-section { margin-top: 18px; }
.sb-item.active .ic { color: var(--indigo); }
.sb-foot form { margin: 0; }
.sb-foot button.sb-item { width: 100%; background: none; border: 0; text-align: left; }
.sample-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: #7a4a00; background: #fdf1e2; border: 1px solid #f2cf9f; border-radius: 999px; padding: 2px 10px; }
.sample-label .ic { width: 14px; height: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); }
.empty-state { padding: 40px 32px; display: grid; justify-items: start; gap: 8px; max-width: 640px; }
.empty-state .card-ic { background: #f2f1f8; color: var(--indigo); }
.empty-state h2 { margin: 0; font-weight: 400; font-size: 22px; }
.empty-state p { margin: 0; color: var(--muted); }
.kpi { cursor: default; }
.kpi .v { font-family: var(--mono); }

/* Inlogscherm (zelfde taal als scripts/demo_login.html) */
.login-page { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #16161c url("/brand/warehouse.webp") center 40% / cover no-repeat; color: var(--ink); }
.login-page::before { content: ""; position: fixed; inset: 0; z-index: 0; background: rgba(16, 16, 22, .58); }   /* vlakke donkere laag over de echte foto, geen paars verloop (UX-ronde 20 nov) */
.login-stage { position: relative; z-index: 1; width: 100%; display: grid; justify-items: center; gap: 22px; }
.login-eyebrow { margin: 0; color: #fff; font-size: 15px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-align: center; text-shadow: 0 1px 12px rgba(10, 8, 30, .5); }
.login-panel { width: min(100%, 420px); padding: 34px 32px 30px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px) saturate(140%); border: 1px solid rgba(255, 255, 255, .7); border-radius: 16px; box-shadow: 0 24px 60px rgba(14, 12, 40, .4), 0 2px 8px rgba(14, 12, 40, .12); }
.login-logo { display: block; width: 188px; height: auto; margin: 0 auto 24px; }
.login-panel h1 { margin: 0 0 4px; font-weight: 400; font-size: 26px; color: var(--ink); text-align: center; }
.login-panel h1.login-title { margin-bottom: 14px; }
.login-sub { margin: 0 0 18px; color: #55546a; font-size: 14px; text-align: center; }
.login-panel label { display: grid; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--ink); }
.login-field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); color: var(--muted); }
.login-field:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(46, 40, 101, .14); }
.login-field input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; }
.login-submit { width: 100%; height: 48px; margin-top: 22px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; background: var(--indigo); color: #fff; box-shadow: 0 1px 2px rgba(46, 40, 101, .3), 0 6px 16px rgba(46, 40, 101, .25); }
.login-submit:hover { background: var(--indigo-light); }
.login-submit:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
a.login-submit { text-decoration: none; }
.login-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 16px; color: var(--ink); font-size: 14px; line-height: 1.5; }
.login-steps > li { counter-increment: step; position: relative; padding-left: 36px; display: grid; gap: 8px; justify-items: start; }
.login-steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--indigo); color: #fff; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.login-steps > li > .login-field { justify-self: stretch; }
.login-steps label { margin: 0; font-weight: 400; }
.login-qr { display: block; margin: 2px 0 0; border: 1px solid var(--border); border-radius: 8px; background: #fff; image-rendering: pixelated; }
.login-key-label { color: #55546a; font-size: 13px; }
.login-key { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; user-select: all; word-spacing: .2em; }
.login-field input.login-code { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .24em; font-size: 17px; }
.login-codes { columns: 2; margin: 0; padding: 14px 14px 14px 34px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-family: var(--mono); font-size: 14px; line-height: 1.8; color: var(--ink); user-select: all; }
.login-alt { margin: 18px 0 0; color: #55546a; font-size: 14px; text-align: center; }
.login-alt a { color: var(--indigo); font-weight: 500; }
.login-hint { margin: 6px 0 0; color: #55546a; font-size: 13px; line-height: 1.45; }
.login-panel select, .login-panel textarea { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.login-panel select { height: 46px; padding: 0 12px; }
.login-panel textarea { min-height: 72px; padding: 10px 14px; resize: vertical; }
.login-panel select:focus, .login-panel textarea:focus { outline: 0; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(46, 40, 101, .14); }
.pick-admin { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--indigo); font-size: 14px; font-weight: 500; text-decoration: none; }
.no-access { max-width: 520px; margin: 48px auto; padding: 28px; }
.no-access h1 { font-size: 22px; margin: 0 0 6px; }
.login-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--crit-tint); color: var(--crit); font-size: 14px; line-height: 1.45; }
.login-foot { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .78); font-size: 13px; letter-spacing: .06em; }
.login-foot img { width: 120px; height: auto; border-radius: 8px; box-shadow: 0 2px 14px rgba(0, 0, 0, .35); }

/* Foutpagina */
.error-page { max-width: 560px; margin: 12vh auto; padding: 32px; }
.sb-nav + .sb-nav { margin-top: 18px; }
/* Blazor zet bij navigeren de focus op de h1 (voor schermlezers); geen zichtbaar kader nodig. */
h1:focus { outline: none; }

/* ── Stap 1: wereld in Blazor ──────────────────────────── */
.legend .dash { width: 18px; height: 0; border-top: 2px dashed var(--indigo); background: none; vertical-align: 3px; }
.label .l-sub.muted { color: var(--muted); }
.label[aria-pressed="true"] .l-sub.muted { color: #d9d7ee; }
.chip.dim { opacity: .55; }
.chip.dim[aria-pressed="true"] { opacity: 1; }
.tools .seg button > span[data-ic] { display: inline-flex; }
.tools .seg button > span[data-ic][hidden] { display: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.next-step { margin-top: 18px; }

/* Volledig scherm: de wereld vult het venster, het inzicht blijft rechts */
html.world-expanded { overflow: hidden; }
.tower.expanded { position: fixed; inset: 12px; z-index: 60; margin: 0; box-shadow: var(--shadow-pop); grid-template-rows: minmax(0, 1fr); }
.tower.expanded .stage { height: auto; min-height: 0; }
.tower.expanded #insight { max-height: none; }

/* Fase-inzicht onder de wereld (teamoverleg 20 okt: naast de wereld was het te druk). In twee kolommen,
   zodat het geen lange smalle strook wordt. Op volledig scherm blijft het rechts: daar is ruimte genoeg. */
.tower:not(.expanded) { grid-template-columns: minmax(0, 1fr); }
.tower:not(.expanded) .stage { border-right: 0; }
.tower:not(.expanded) #insight { max-height: none; border-top: 1px solid var(--border); padding: 20px 24px 16px; }
.tower:not(.expanded) #insight > .fade { columns: 2 320px; column-gap: 40px; }
.tower:not(.expanded) #insight.ship-detail > .fade { columns: auto; }
.tower:not(.expanded) #insight > .fade > * { break-inside: avoid; }
.tower:not(.expanded) #insight > .fade > :is(.eyebrow, h2, .i-sub) { column-span: all; }
/* De kerncijfers (KPI-tegels) zweven rechtsboven op de wereld (wens Arrya 20 okt): de wereld houdt de volle breedte. */
.tower:not(.expanded) { position: relative; }
.tower:not(.expanded) #insight > .fade { animation-name: fadeIn; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.tower:not(.expanded) #insight .stats { position: absolute; top: 14px; right: 14px; z-index: 8; margin: 0; display: flex; gap: 8px; max-width: calc(100% - 28px); }
.tower:not(.expanded) #insight .st { background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); min-width: 112px; padding: 8px 12px; }
.tower:not(.expanded) #insight .st b { font-size: 20px; }

/* Rolpaneel naast de wereld (stap 1, tot de rol een eigen werkgebied krijgt) */
.role-panel .role-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; }
.role-panel .role-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.role-panel .role-list .ic { color: var(--indigo); margin-top: 3px; }
.role-panel p { font-size: 14px; }

/* Foutbalk van Blazor: alleen zichtbaar als de verbinding echt een fout geeft */
#blazor-error-ui { display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; background: #fff; border: 1px solid #f0b9b3; border-radius: 999px; box-shadow: var(--shadow-pop); padding: 10px 44px 10px 18px; font-size: 14px; color: var(--crit); }
#blazor-error-ui .reload { color: var(--indigo); margin-left: 6px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 9px; color: var(--muted); border: 0; background: none; padding: 0; }
#content:focus { outline: none; }

/* Compacte labels als de wereld klein is: naam, aantal en aandacht op één regel, zodat ze bij hun station blijven */
.stage.compact .label { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px 5px; min-width: 0; white-space: nowrap; }
.stage.compact .label .l-name { font-size: 12px; }
.stage.compact .label .l-n { font-size: 15px; line-height: 1.2; }
.stage.compact .label .l-sub { font-size: 11px; }

/* Ontwerpregels 21 okt (redesign, referentie Fingerprint via Refero; wens Arrya: niet meer "standaard Claude").
   Geen kapitalen met wijde spatiëring, geen getinte kaarten, cijfers in de gewone letter met tabular-nums,
   minder pillen, rustige hover/focus van 200 ms. prefers-reduced-motion zet de overgangen uit (regel bovenaan). */
.eyebrow { font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.kpi .v, .label .l-n, .chip .n, .chip .a, .ship-tag { font-family: inherit; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.label .l-n { font-weight: 400; }

/* Stationknoppen: rustig wit; de gekozen knop met een zachte schaduw; aandacht als rode stip met getal */
.chip { box-shadow: none; transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out); }
.chip:active { transform: scale(.98); }
.chip[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .10); font-weight: 500; }
.chip[aria-pressed="true"] .ic { color: var(--indigo); }
.chip[aria-pressed="true"] .n { color: var(--muted); }
.chip .a, .chip[aria-pressed="true"] .a { display: inline-flex; align-items: center; gap: 5px; background: none; padding: 0; color: var(--crit); font-size: 13px; }
.chip .a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--crit); }

/* Advies zonder getinte kaart */
.advice { background: #fff; border: 1px solid var(--border); }

/* Labels in de wereld: het gekozen label wit met een indigo rand, niet helemaal indigo */
.label { transition: opacity 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .label:hover { transform: translate(-50%, calc(-100% - 2px)); } }
.label[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo), var(--shadow-pop); }
.label[aria-pressed="true"] .l-name { color: var(--indigo); }
.label[aria-pressed="true"] .l-sub { color: var(--crit); }

/* Knoppen in de wereld */
.seg button { transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .seg button:hover:not([aria-pressed="true"]) { background: #f4f4f7; } }
.chip:focus-visible, .seg button:focus-visible, .label:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* Geen dubbele cijfers (review 21 okt, bevinding 6): in het overzicht staan de kerncijfers al in de tegels bovenaan;
   de zwevende kaart op de wereld verschijnt pas als je een station kiest. */
.tower:not(.expanded) #insight > .fade[data-station=""] .stats { display: none; }

/* Bronlabel (SourceTag): groen = Opera-export, oranje = testdata */
.src-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.src-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.src-tag.test::before { background: var(--warn); }

/* Live-feed in de wereld (3 nov, herzien 4 nov): een compacte indigo ballon met een staartje naar het station.
   De toon zit in een stip vooraan (info, waarschuwing, kritiek), niet in een gekleurde rand (feedback Arrya 4 nov:
   geen sjabloonkaart met een streep links). Indigo onderscheidt de melding van de witte stationslabels eronder.
   Komt kort in (200 ms, vanaf het station) en gaat sneller weg (150 ms); prefers-reduced-motion zet dat uit. */
.pulse-tip { position: absolute; z-index: 9; text-wrap: pretty; left: 0; top: 0; display: flex; align-items: baseline; gap: 8px; transform: translate(-50%, -100%); transform-origin: 50% 100%; max-width: min(300px, calc(100% - 16px)); padding: 6px 14px 7px 12px; background: var(--indigo); color: #fff; border-radius: 14px; box-shadow: 0 10px 24px rgba(46, 40, 101, .28), 0 1px 3px rgba(46, 40, 101, .2); font-family: var(--font); font-size: 13px; font-weight: 400; line-height: 1.35; letter-spacing: .005em; pointer-events: none; opacity: 0; translate: 0 4px; scale: .97; transition: opacity 200ms var(--ease-out), translate 200ms var(--ease-out), scale 200ms var(--ease-out); }
.pulse-tip::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #b8b3ec; box-shadow: 0 0 0 3px rgba(184, 179, 236, .22); transform: translateY(-1px); }
.pulse-tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: var(--indigo); border-radius: 0 0 2px 0; transform: rotate(45deg); }
.pulse-tip.in { opacity: 1; translate: 0 0; scale: 1; }
.pulse-tip.out { opacity: 0; transition-duration: 150ms; }
.pulse-tip.warn::before { background: #f3a94a; box-shadow: 0 0 0 3px rgba(243, 169, 74, .24); }
.pulse-tip.crit::before { background: #ff7a6b; box-shadow: 0 0 0 3px rgba(255, 122, 107, .26); }
.stage.compact .pulse-tip { font-size: 12px; max-width: min(230px, calc(100% - 16px)); padding: 5px 12px 6px 10px; }
/* Grijze ondertekst onder een label (StationDto.SubKind "muted"), bijvoorbeeld QC zonder afgekeurde PO's */
.label .l-sub.muted, .label[aria-pressed="true"] .l-sub.muted { color: var(--muted); }

/* ── Inklapbare zijbalk (overleg 4 nov) ──────────────────
   html.sb-collapsed (gezet door Sidebar.razor en het script in App.razor) maakt er een smalle balk met alleen iconen.
   De teksten blijven voor schermlezers staan; de tooltip komt uit data-tip. */
.sidebar, main.wrap { transition: width 200ms cubic-bezier(.23, 1, .32, 1), margin-left 200ms cubic-bezier(.23, 1, .32, 1), padding 200ms cubic-bezier(.23, 1, .32, 1); }
.sb-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-toggle { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: none; border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.sb-toggle:hover { background: #f4f4f7; color: var(--indigo); }
.sb-toggle .ic { transform: rotate(90deg); transition: transform 200ms cubic-bezier(.23, 1, .32, 1); }
.sb-toggle:active { transform: scale(.94); }
.sb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

html.sb-collapsed { --sb: 68px; }
.sb-collapsed .sidebar { padding: 18px 10px 14px; }
.sb-collapsed .sb-brand { justify-content: center; padding: 0 0 18px; }
.sb-collapsed .sb-brand img { display: none; }
.sb-collapsed .sb-toggle .ic { transform: rotate(-90deg); }
.sb-collapsed .sb-section, .sb-collapsed .sb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sb-collapsed .sb-nav + .sb-nav { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.sb-collapsed .sb-item { justify-content: center; padding: 10px 0; }
.sb-collapsed .sb-item em { display: none; }
.sb-collapsed .sb-item .ic { width: 18px; height: 18px; }
.sb-collapsed .sb-user { justify-content: center; padding: 6px 0; }

/* Tooltip rechts naast het icoon, bij hover en toetsenbordfocus */
.sb-collapsed .sidebar [data-tip] { position: relative; }
.sb-collapsed .sidebar [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 40; padding: 5px 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.4; white-space: nowrap; border-radius: 6px; box-shadow: var(--shadow-pop); opacity: 0; transform: translate(-4px, -50%); pointer-events: none; transition: opacity 120ms ease, transform 120ms cubic-bezier(.23, 1, .32, 1); }
.sb-collapsed .sidebar [data-tip]:hover::after, .sb-collapsed .sidebar [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* Bediening op de wereld met ademruimte tot de rand (feedback Arrya 4 nov): overal dezelfde inzet. */
.stage { --inset: 18px; }
.tools { right: var(--inset); bottom: var(--inset); max-width: calc(64% - var(--inset)); }
.legend { left: var(--inset); bottom: var(--inset); max-width: calc(36% - var(--inset)); }
.tower:not(.expanded) #insight .stats { top: 18px; right: 18px; max-width: calc(100% - 36px); }
@media (max-width: 760px) {
  .stage { --inset: 16px; }
  .legend { border-radius: 12px; padding: 6px 12px; max-width: calc(40% - var(--inset)); }
  .legend span { display: grid; grid-template-columns: auto 1fr; gap: 4px 0; white-space: nowrap; }
}

/* Geen doorzichtige kaarten in de wereld (wens Arrya 5 nov, alle modules): de kaarten blijven dicht.
   Een station dat niet gekozen is, wordt rustiger door grijze tekst, niet door doorzichtigheid. */
.label.dim { opacity: 1; background: #f6f6f8; box-shadow: var(--shadow); }
.label.dim .l-name, .label.dim .l-n, .label.dim .l-sub, .label.dim .l-sub.muted { color: #a3a1ad; }
.ship-tag { background: #fff; }
/* Scheepslabels zijn knoppen (1-op-1, 19 nov): klik = schip met containers en PO's in het zijpaneel */
.place.ship-tag { pointer-events: auto; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 0; border-radius: 999px; background: transparent; line-height: 1.3; text-transform: none; letter-spacing: 0; transform: translate(-50%, -50%); font-family: inherit; z-index: 1; }
.ship-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ship-tag.att .ship-dot { background: var(--crit); border-color: #fff; }
.ship-txt { display: none; white-space: nowrap; }
.place.ship-tag:hover, .place.ship-tag:focus-visible, .place.ship-tag[aria-pressed="true"] { background: #fff; border: 1px solid var(--hair); padding: 3px 10px 3px 6px; z-index: 3; }
.place.ship-tag:hover .ship-txt, .place.ship-tag:focus-visible .ship-txt, .place.ship-tag[aria-pressed="true"] .ship-txt { display: inline; }
.place.ship-tag[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.place.ship-tag:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.legend { background: #fff; }
.tower:not(.expanded) #insight .st { background: #fff; }

/* ── Bovenbalk zonder zijbalk (overleg Pim 5 nov) ─────────────────────────────────
   Eén witte balk over de volle breedte: merk, live, datamoment en rechtsboven de persona. Dicht, niet doorzichtig. */
main.wrap { margin-left: 0; }
.topbar { margin: 0 -32px 10px; padding: 10px 32px; background: #fff; backdrop-filter: none; border-bottom: 1px solid var(--border); gap: 16px; }
.tb-brand { flex: none; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 4px 6px 4px 0; border-radius: var(--r-sm); }
.tb-brand img { width: 20px; height: 28px; }
.tb-name { display: grid; line-height: 1.05; }
.tb-name b { font-weight: 600; font-size: 17px; letter-spacing: .02em; color: var(--indigo); }
.tb-name span { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.tb-brand:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

.pm { position: relative; flex: none; }
.pm-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 3px 12px 3px 4px; background: #fff; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); font: inherit; cursor: pointer; transition: border-color 200ms var(--ease-out), transform 140ms var(--ease-out); }
.pm-btn:hover { border-color: var(--border-strong); }
.pm-btn:active { transform: scale(.98); }
.pm-btn[aria-expanded="true"] { border-color: var(--indigo); }
.pm-btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.pm-btn > svg { width: 14px; height: 14px; color: var(--muted); transition: transform 200ms var(--ease-out); }
.pm-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.pm-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--indigo); color: #fff; font-size: 14px; font-weight: 500; }
.pm-av.sm { width: 28px; height: 28px; font-size: 13px; }
.pm-who { display: grid; text-align: left; line-height: 1.2; }
.pm-name { font-size: 14px; font-weight: 500; }
.pm-role { font-size: 12px; color: var(--muted); }
.pm-scrim { position: fixed; inset: 0; z-index: 40; background: none; border: 0; cursor: default; }
.pm-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 41; width: 300px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-pop); animation: pm-in 160ms var(--ease-out); transform-origin: top right; }
@keyframes pm-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .pm-menu { animation: none; } }
.pm-h { margin: 6px 8px 4px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.pm-item:hover, .pm-item:focus-visible { background: var(--indigo-tint); outline: none; }
.pm-item.on { background: var(--indigo-tint); }
.pm-item > svg { flex: none; width: 16px; height: 16px; color: var(--muted); }
.pm-item.on > svg:last-child { margin-left: auto; color: var(--indigo); }
.pm-item b { font-weight: 500; }
.pm-sub { color: var(--muted); font-size: 13px; }
.pm-foot { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.pm-foot form { margin: 0; }

/* Keuzescherm na het inloggen: "Continue as"-lijst in een dichte kaart op de warehouse-foto */
.role-panel-pick { width: min(100%, 520px); padding: 32px 28px 22px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(14, 12, 40, .4), 0 2px 8px rgba(14, 12, 40, .12); }
.role-panel-pick h1 { margin: 0 0 4px; font-weight: 400; font-size: 26px; text-align: center; }
.pick-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.pick { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); color: var(--ink); text-decoration: none; transition: border-color 200ms var(--ease-out), background-color 200ms var(--ease-out), transform 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .pick:hover { border-color: var(--indigo); background: #fafaff; } }
.pick:active { transform: scale(.99); }
.pick:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.pick-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--indigo); color: #fff; font-size: 16px; font-weight: 500; }
.pick-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pick-name { font-size: 15px; font-weight: 500; }
.pick-role { font-weight: 400; color: var(--muted); }
.pick-blurb { font-size: 13px; color: var(--muted); text-wrap: pretty; }
.pick > svg { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .pick:hover > svg { transform: translateX(2px); color: var(--indigo); } }
.pick-out { margin: 16px 0 0; text-align: center; }
.pick-out button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.pick-out button:hover { color: var(--indigo); }
.pick-out svg { width: 15px; height: 15px; }

@media (max-width: 1100px) {
  .topbar { margin: 0 -18px 10px; padding: 10px 18px; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .tb-name { display: none; }
  .pm-who { display: none; }
  .pm-btn { padding-right: 8px; }
}
/* Labels in een wereld die alleen beeld is (Purchasing Asia): niet klikbaar, wel even goed leesbaar */
.label.static { cursor: default; pointer-events: none; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .label.static:hover { transform: translate(-50%, -100%); } }

/* Asia worklist levels in the world: orange At risk under the red Attention number (mijlpalen 18 nov). */
.label .l-risk { font-size: 13px; color: var(--warn); font-variant-numeric: tabular-nums; }
.label .l-risk:empty { display: none; }
.label .l-unit { font-size: 12px; color: var(--muted); margin-left: 2px; }   /* "orders" achter het grote getal */
.label[aria-pressed="true"] .l-unit { color: inherit; opacity: .8; }
.label[aria-pressed="true"] .l-risk { color: var(--warn); }
.label.dim .l-risk { color: #a3a1ad; }
/* At risk zoals Attention: een stip met getal, geen getinte pil (UX-ronde 20 nov) */
.chip .a.risk, .chip[aria-pressed="true"] .a.risk { background: none; color: var(--warn); }
.chip .a.risk::before { background: var(--warn); }

/* Kaartjes in de wereld, overzichtelijker (Arrya 19 nov): naam klein bovenaan, één groot getal, gekleurde tellers eronder */
.label { min-width: 0; padding: 8px 12px 9px; text-align: left; }
.label .l-name { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.label .l-n { display: flex; align-items: baseline; gap: 5px; font-size: 26px; line-height: 1.1; font-weight: 600; color: var(--ink); margin-top: 1px; }
.label .l-unit { font-size: 12px; font-weight: 400; color: var(--muted); }
.label .l-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.label .l-tags > span { display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; line-height: 1.5; white-space: nowrap; }
.label .l-tags b { font-weight: 600; font-variant-numeric: tabular-nums; }
.label .l-tags .l-sub { background: var(--crit-tint); color: var(--crit); }
.label .l-tags .l-risk { background: var(--warn-tint); color: var(--warn); }
.label .l-tags .l-sub.muted { background: none; padding: 0; color: var(--muted); }
.label[aria-pressed="true"] .l-tags .l-sub { color: var(--crit); }
/* Lege stations rustig: kleiner en grijs, zodat de stations met werk eruit springen */
.label.empty { padding: 6px 10px 7px; background: rgba(255,255,255,.85); box-shadow: var(--shadow); }
.label.empty .l-n { font-size: 18px; font-weight: 500; color: var(--muted); }
/* Kleine wereld: alles op één regel */
.stage.compact .label { align-items: center; }
.stage.compact .label .l-n { font-size: 15px; margin: 0; }
.stage.compact .label .l-unit { display: none; }
.stage.compact .label .l-tags { margin: 0; flex-wrap: nowrap; }
.stage.compact .label .l-tags > span { font-size: 10.5px; padding: 0 6px; }
.label.dim .l-tags > span { background: #f0f0f3; color: #a3a1ad; }

/* Compacte logistieke labels: naam en routefeit, kleur alleen voor selectie/aandacht. */
.label { border-radius:6px; }
.label.obj { width:178px; max-width:178px; padding:9px 11px 8px; border:1px solid #dedee7; border-radius:7px; background:rgba(255,255,255,.98); box-shadow:0 2px 6px rgba(22,24,42,.07); z-index:1; }
.label.obj::after { background:#aaa8bc; }
.label.obj .obj-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.label.obj .l-name { font-size:12px; line-height:1.35; font-weight:500; letter-spacing:0; text-transform:none; color:var(--ink); overflow:hidden; text-overflow:ellipsis; }
.label.obj .obj-arrow { color:var(--muted); font-size:13px; opacity:.65; }
.label.obj .obj-facts { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-top:6px; }
.label.obj .l-n { display:flex; gap:4px; margin:0; font-size:17px; font-weight:500; line-height:1.1; letter-spacing:-.03em; }
.label.obj .l-unit { font-size:10.5px; letter-spacing:0; }
.label.obj .obj-eta { color:var(--muted); font-size:10.5px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.label.obj .l-tags { margin:5px 0 0; gap:8px; }
.label.obj .l-tags > span { padding:0; border-radius:0; background:none; font-size:10.5px; }
.label.obj .l-tags .l-sub { color:var(--crit); background:none; }
.label.obj .l-tags .l-sub::before { content:""; width:4px; height:4px; margin-right:2px; align-self:center; border-radius:50%; background:currentColor; }
.label.obj .l-tags .l-risk { color:var(--warn); background:none; }
.label.obj.att { box-shadow:0 2px 6px rgba(22,24,42,.07); }
.label.obj:hover,.label.obj:focus-visible { border-color:#aaa6c8; background:#fff; box-shadow:0 4px 12px rgba(30,28,60,.12); z-index:3; }
.label.obj[aria-pressed="true"] { background:#f7f6fc; color:var(--ink); border-color:var(--indigo); box-shadow:0 0 0 1px var(--indigo); z-index:4; }
.label.obj[aria-pressed="true"] .obj-arrow { color:var(--indigo); opacity:1; }
.stage.compact .label.obj { display:block; width:166px; max-width:166px; padding:7px 9px; }
.stage.compact .label.obj .l-name { overflow:hidden; }
.stage.compact .label.obj .l-n { font-size:16px; }
.stage.compact .label.obj .l-unit { display:inline; font-size:10px; }
.stage.compact .label.obj .l-tags .l-risk { display:inline-flex; }

/* Hover over een schip in de wereld (20 nov): naam, aankomst, waar het ongeveer is */
.stage .ship-tip { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; display: grid; gap: 1px;
  max-width: 260px; padding: 8px 11px 9px; background: rgba(22, 21, 29, .92); color: #fff; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(22, 21, 29, .22); font-size: 12.5px; line-height: 1.35; backdrop-filter: blur(6px); }
.stage .ship-tip[hidden] { display: none; }
.stage .ship-tip .st-name { font-weight: 600; font-size: 13.5px; letter-spacing: .005em; }
.stage .ship-tip .st-meta { color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.stage .ship-tip .st-near { color: #ffd88a; }
.stage .ship-tip .st-near[hidden] { display: none; }

/* ── UX-ronde 20 nov: laadskelet, legenda en mobiel ─────────────────────────────
   Skelet in de maten van de echte stationknoppen en wereld, zodat er niets verspringt. */
.stage.stage-loading, .chip.skel { background: linear-gradient(90deg, #eceef0 0%, #f6f7f9 50%, #eceef0 100%); background-size: 200% 100%; }
.stage.stage-loading { display: grid; place-items: center; }
.chip.skel { height: 36px; width: 112px; padding: 0; border-color: transparent; box-shadow: none; }
.chip.skel:nth-child(1) { width: 136px; } .chip.skel:nth-child(2) { width: 104px; } .chip.skel:nth-child(3) { width: 124px; }
.chip.skel:nth-child(4) { width: 92px; } .chip.skel:nth-child(5) { width: 128px; } .chip.skel:nth-child(6) { width: 108px; }
.skel-note { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); }
.skel-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--indigo); }
@media (prefers-reduced-motion: no-preference) {
  .stage.stage-loading, .chip.skel { animation: shimmer 1.4s linear infinite; }
  .skel-spin { animation: skel-spin 700ms linear infinite; }
}
@keyframes skel-spin { to { transform: rotate(360deg); } }

/* Legenda: drie paren op één regel, ronde stippen zoals op de kaartjes */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; width: max-content; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink); }
.legend .lg-dot { width: 8px; height: 8px; margin: 0; border-radius: 50%; flex: none; }
.lg-dot.you { background: var(--indigo); }
.lg-dot.crit { background: var(--crit); }
.lg-dot.warn { background: var(--warn); }

/* Koppen gebalanceerd */
h1, h2, h3 { text-wrap: balance; }


/* Mobiel: stationknoppen als één scrollbare rij, een lagere wereld en de bediening als één rij iconen.
   De teksten blijven voor schermlezers (visueel verborgen, niet display:none). */
@media (max-width: 760px) {
  .phasebar { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: -18px; padding: 2px 18px 6px; scroll-padding-inline: 18px; }
  .phasebar::-webkit-scrollbar, .tools::-webkit-scrollbar { display: none; }
  .phasebar .chip { flex: none; white-space: nowrap; }
  .stage { height: clamp(360px, 56vh, 460px); }
  .tools { left: var(--inset); right: var(--inset); max-width: none; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .tools .seg { flex: none; }
  .tools .seg button > span:not([data-ic]) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tools .seg button[data-act="overview"] { font-size: 0; gap: 0; }
  .legend { bottom: calc(var(--inset) + 48px); max-width: calc(100% - 2 * var(--inset)); }
}
@media (max-width: 560px) { .legend { display: none; } }
/* Vinger: knoppen in de wereld minstens 40 px */
@media (pointer: coarse) { .seg button { min-width: 40px; min-height: 40px; justify-content: center; } }

/* ── UX-ronde 20 nov, deel 2: feedback, hit areas, safe area en beweging ───────────
   Spacing-schaal en hoeken als tokens; nieuwe regels gebruiken alleen deze waarden. */
:root {
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --dur-in: 200ms; --dur-out: 160ms;   /* uitgang ~20% korter dan ingang */
}

/* Melding met Undo: klikbaar, langer zichtbaar, en boven de thuisbalk van een telefoon */
.toast { display: inline-flex; align-items: center; gap: var(--s-3); margin-bottom: env(safe-area-inset-bottom, 0px);
  translate: 0 8px; transition: opacity var(--dur-out) ease-out, translate var(--dur-out) ease-out; }
.toast.show { translate: 0 0; transition-duration: var(--dur-in); transition-timing-function: var(--ease-out); }
.toast.has-undo.show { pointer-events: auto; padding-right: 8px; }
.toast-undo { position: relative; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 500; font-size: 13.5px; padding: 6px 14px; min-height: 32px; transition: background-color 150ms ease-out, transform 150ms ease-out; }
.toast-undo::after { content: ""; position: absolute; inset: -6px; }   /* raakvlak 44 px */
.toast-undo:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .toast-undo:hover { background: rgba(255, 255, 255, .24); } }

/* Gelukte actie: een korte puls op de rij (twee namen, zodat dezelfde rij opnieuw kan pulsen) */
.owl-row.pulse-a > td { animation: row-pulse-a 900ms var(--ease-out); }
.owl-row.pulse-b > td { animation: row-pulse-b 900ms var(--ease-out); }
@keyframes row-pulse-a { 0% { background-color: #e7f4ec; } 100% { background-color: transparent; } }
@keyframes row-pulse-b { 0% { background-color: #e7f4ec; } 100% { background-color: transparent; } }

/* Groep openklappen: de eerste 10 rijen 30 ms na elkaar, kort en van boven */
.owl-row.owl-in > td { animation: row-in 200ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } }

/* Personamenu: vanaf de knop (rechtsboven), start op .95, uitgang korter (200 ms in) */
.pm-menu { transform-origin: top right; animation: pm-in var(--dur-in) var(--ease-out); }
@keyframes pm-in { from { opacity: 0; transform: scale(.95); } }

/* Fitts: op een touchscherm minstens 44 px raakvlak, ook als het zichtbare icoon kleiner is */
@media (pointer: coarse) {
  body .owl-chev.owl-chev, body .d-close.d-close, body .pd-close.pd-close { position: relative; width: 40px; height: 40px; }
  body .owl-chev.owl-chev::after, body .d-close.d-close::after, body .pd-close.pd-close::after { content: ""; position: absolute; inset: -4px; }
  body .owl-tab.owl-tab, body .owl-btn.owl-btn, body .oc-seen.oc-seen { min-height: 44px; }
  body .owl-station-x.owl-station-x { position: relative; padding: 6px 12px; }
  body .owl-station-x.owl-station-x::after { content: ""; position: absolute; inset: -8px -4px; }
  .linkbtn { min-height: 44px; }
  input[type="checkbox"] { width: 20px; height: 20px; }
  td:has(> input[type="checkbox"]), th:has(> input[type="checkbox"]) { min-width: 44px; }
}

/* Safe area: vaste knoppen en balken blijven boven de thuisbalk en naast de notch */
body .mx-launch { margin-bottom: env(safe-area-inset-bottom, 0px); margin-right: env(safe-area-inset-right, 0px); }
#attn .attn-bulk { margin-bottom: env(safe-area-inset-bottom, 0px); }
@media (max-width: 560px) { body .pd.pd { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } }

/* Onderblad (PO-details op de telefoon): een greep bovenaan; het blad volgt de vinger (js/gestures.js) */
@media (max-width: 560px) {
  body .pd.pd { touch-action: pan-y; }
  body .pd.pd::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 99px; background: #d6d5de; margin: -8px auto 10px; }
  body .pd.pd.dragging { transition: none; }
  body .pd.pd.settling { transition: transform 240ms var(--ease-out); }
}

/* Icoonwissel (pauze/afspelen, volledig scherm): kruisfade met schaal en een beetje blur */
.tools .seg button > span[data-ic] { transition: opacity 150ms ease-out, scale 150ms ease-out, filter 150ms ease-out; }
.tools .seg button > span[data-ic][hidden] { display: inline-flex; position: absolute; left: 12px; top: 50%; translate: 0 -50%; opacity: 0; scale: .6; filter: blur(2px); pointer-events: none; }
.tools .seg button { position: relative; }

/* Segmenten (Board/Strip): de knop drukt in bij klikken */
.seg button { transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 150ms var(--ease-out); }
.seg button:active { transform: scale(.97); }

/* Paginawissel: korte cross-fade waar de browser het kan (View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 120ms ease-out both; }
::view-transition-new(root) { animation: vt-in 160ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* Toetsenbordhint alleen waar een toetsenbord en muis zijn */
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; line-height: 1; color: var(--muted); background: #fff; font-family: var(--font); }
@media (hover: none), (pointer: coarse) { .kbd { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .owl-row.owl-in > td, .owl-row.pulse-a > td, .owl-row.pulse-b > td { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Zoekknop in de bovenbalk en het commandomenu (Ctrl/Cmd+K). Geen open-animatie: vaak gebruikt, dus direct. */
.tb-search { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-2) 0 var(--s-3); border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; transition: border-color 150ms ease-out, transform 150ms ease-out; }
.tb-search:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .tb-search:hover { border-color: var(--border-strong); color: var(--ink); } }
@media (max-width: 640px) { .tb-search { min-width: 40px; min-height: 40px; padding: 0; justify-content: center; } .tb-search > span:not(.kbd) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.cmdk-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(17, 17, 17, .28); }
.cmdk { position: fixed; z-index: 96; top: min(14vh, 120px); left: 50%; translate: -50% 0; width: min(560px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-pop); overflow: hidden; }
.cmdk-input { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); color: var(--muted); }
.cmdk-input input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); background: none; padding: var(--s-1) 0; }
.cmdk-list { list-style: none; margin: 0; padding: var(--s-2); max-height: min(60vh, 420px); overflow: auto; overscroll-behavior: contain; }
.cmdk-group { padding: var(--s-2) var(--s-2) var(--s-1); font-size: 12px; color: var(--muted); }
.cmdk-item { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-3); border-radius: var(--r-sm); cursor: pointer; }
.cmdk-item .ic { color: var(--muted); }
.cmdk-item.on { background: var(--indigo-tint); }
.cmdk-item.on .ic { color: var(--indigo); }
.cmdk-label { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmdk-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.cmdk-empty { padding: var(--s-4) var(--s-3); color: var(--muted); font-size: 14px; text-wrap: pretty; }

/* Laadskeletten voor tegels, regels en een losse regel */
.skel { display: grid; gap: var(--s-2); }
.skel-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.skel-block { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eceef0 0%, #f6f7f9 50%, #eceef0 100%); background-size: 200% 100%; }
.skel-tiles .skel-block { height: 72px; border-radius: var(--r-sm); }
.skel-rows .skel-block:nth-child(2n) { width: 82%; }
.skel-line .skel-block { height: 12px; } .skel-line .skel-block:first-child { height: 22px; width: 50%; }
@media (prefers-reduced-motion: no-preference) { .skel-block { animation: shimmer 1.4s linear infinite; } }

/* Toetsenbordhint naast "View" in de wereld */
.tools .seg button .kbd { margin-left: 2px; }

/* Mono alleen voor codes (PO-, container- en artikelnummers). Getallen, datums en KPI's in Jost met tabular-nums. */
body .kpi .v, body .qc-v.qc-v, body .qc-count.qc-count, body .qc-aqlv.qc-aqlv, body .qc-sec h2 small,
body .dm-text time, body .port-n strong, body .port-facts dd, body .fs-metric strong {
  font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0;
}

/* Het canvas van de wereld is er nog niet (three.js laadt): hetzelfde skelet als WorldLoading, tot stage.js data-ready zet */
#stage.stage:not([data-ready]):not(:has(.nogl)) { background: linear-gradient(90deg, #eceef0 0%, #f6f7f9 50%, #eceef0 100%); background-size: 200% 100%; }
#stage.stage:not([data-ready]):not(:has(.nogl))::after { content: "Loading the world…"; position: absolute; left: 50%; top: 45%; translate: -50% -50%; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) { #stage.stage:not([data-ready]):not(:has(.nogl)) { animation: shimmer 1.4s linear infinite; } }

/* Telefoon: de zoekknop weg uit de bovenbalk (de pagina heeft zijn eigen PO-zoekveld), zodat merk, data en persona op één regel passen */
@media (max-width: 480px) { .tb-search { display: none; } .topbar { margin: 0 -18px 10px; padding: 8px 18px; gap: var(--s-2); flex-wrap: nowrap; } }

/* Glass cards over the world (Arrya 21 nov: "tot kaarten zijn, waardoor ik de wereld erachter nog een beetje zie").
   The world is the backdrop of the whole block; strip, insight and detail panels float over its lower part as frosted
   cards. loop.js reads --world-cover and centres the world in the part that stays visible. */
.tower:not(.expanded) { background: radial-gradient(120% 90% at 50% 15%, #f7f8fa 0%, #eceef0 100%); padding: 0 14px 14px; row-gap: 12px; }
.tower:not(.expanded):has(> .jw + :is(.strip, aside, .port)) { --world-cover: 132px; }
.tower:not(.expanded) > :is(.jw, .stage) { margin: 0 -14px; background: transparent; }
.tower:not(.expanded) > .jw + :is(.strip, aside, .port) { margin-top: calc(-1 * var(--world-cover) - 12px); }
.tower:not(.expanded) > :is(.strip, aside, .port) {
    position: relative; z-index: 6; border: 1px solid rgba(255, 255, 255, .75); border-radius: 16px;
    background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
}
.tower:not(.expanded) > #insight { border-top: 1px solid rgba(255, 255, 255, .75); }
.tower:not(.expanded) > #insight .advice { background: rgba(255, 255, 255, .7); }
#insight .sd-name { font-size: 26px; font-weight: 500; }          /* beats the global #insight h2 */
@media (max-width: 760px) { .jw .legend { bottom: calc(var(--world-cover, 0px) + 56px); } }
@media (pointer: coarse) { .jw-tool { min-height: 44px; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tower:not(.expanded) > :is(.strip, aside, .port) { background: rgba(255, 255, 255, .95); }
}
