/* Tender Insights – huisstijl
   Inkt (navy) voor structuur, papier-wit voor inhoud, één blauw voor "besteld",
   en statuskleuren die alleen gebruikt worden als er iets aan de hand is. */
:root {
  --ink: #14233C;
  --ink-2: #3A4A63;
  --ink-3: #66748A;
  --paper: #FFFFFF;
  --mist: #EEF2F6;
  --mist-2: #E3E9F0;
  --line: #D5DCE5;
  --ordered: #2456A6;
  --ordered-soft: #9DB7E3;
  --nav-accent: #5B8DEF;
  --ok: #1E7B4F;
  --ok-bg: #E4F3EB;
  --warn: #9A5B00;
  --warn-bg: #FCF1DC;
  --crit: #B3261E;
  --crit-bg: #FBE6E4;
  --focus: #F2B705;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(20, 35, 60, .06), 0 4px 16px rgba(20, 35, 60, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ordered); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.boot { padding: 48px; color: var(--ink-3); }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.rail {
  background: var(--ink); color: #DCE3EE; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; padding: 0 8px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  color: #C7D1E0; padding: 9px 12px; border-radius: var(--radius-s); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.nav a:hover { background: #1E3150; color: #fff; text-decoration: none; }
.nav a.active { background: #22385C; color: #fff; box-shadow: inset 3px 0 0 var(--nav-accent); }
.nav .count { font-size: 12px; background: var(--crit); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.rail-foot { margin-top: auto; font-size: 13px; color: #9FAEC3; display: flex; flex-direction: column; gap: 12px; }
.account { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--radius-m); background: #1A2C49; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #2E4469; color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; letter-spacing: .02em; }
.account-text { min-width: 0; }
.account-org { color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-field { display: flex; flex-direction: column; gap: 4px; padding: 0 2px; }
.rail-field select { width: 100%; background: #1E3150; color: #fff; border: 1px solid #2E4469; border-radius: var(--radius-s); padding: 7px 8px; font: inherit; }
.rail-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rail-row .lang-switch { flex: 1 1 120px; min-width: 0; }
.rail-btn { background: transparent; color: #C7D1E0; border: 1px solid #2E4469; border-radius: var(--radius-s); padding: 6px 10px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.rail-btn:hover { background: #1E3150; color: #fff; }
.rail-version { font-size: 11px; opacity: .55; padding: 0 2px; }
.linkbtn { background: none; border: 0; color: #C7D1E0; padding: 0; cursor: pointer; text-align: left; }
.linkbtn:hover { color: #fff; text-decoration: underline; }

.main { padding: 32px clamp(20px, 3vw, 48px) 64px; min-width: 0; }
.page { max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; color: var(--ink-2); }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; display: block; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; }

/* ---------- Cijfers ---------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); overflow: hidden; }
.figure { padding: 18px 22px; border-right: 1px solid var(--line); }
.figure:last-child { border-right: 0; }
.figure .label { font-size: 13px; color: var(--ink-3); }
.figure .value { font-size: 26px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.figure .note { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.figure.bad .value { color: var(--crit); }
.figure.warn .value { color: var(--warn); }

/* ---------- Maximumbalk (kern van het product) ---------- */
.gauge { display: flex; flex-direction: column; gap: 10px; }
.gauge-track { position: relative; height: 34px; background: var(--mist-2); border-radius: 8px; overflow: visible; }
.gauge-ext { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #DCE3EC 0 6px, #E8EDF3 6px 12px); border-radius: 0 8px 8px 0; }
.gauge-ordered { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ordered); border-radius: 8px 0 0 8px; }
.gauge-invoiced { position: absolute; left: 0; top: 11px; height: 12px; background: var(--ordered-soft); border-radius: 0 6px 6px 0; }
.gauge-over .gauge-ordered { background: var(--crit); }
.gauge-max { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--ink); }
.gauge-max span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; white-space: nowrap; }
.gauge-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); }
.gauge-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gauge-headline { font-size: 17px; }
.gauge-headline b { font-weight: 700; }

.mini-gauge { width: 120px; height: 8px; background: var(--mist-2); border-radius: 4px; position: relative; overflow: hidden; }
.mini-gauge > div { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ordered); }
.mini-gauge.over > div { background: var(--crit); }
.mini-gauge.warn > div { background: var(--warn); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--mist-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: #F6F8FB; }
.ref { font-weight: 600; white-space: nowrap; }

/* ---------- Status ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--mist); color: var(--ink-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.crit { background: var(--crit-bg); color: var(--crit); }

.signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.signals li { display: grid; grid-template-columns: 10px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--mist-2); }
.signals li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--ink-3); }
.dot.critical { background: var(--crit); }
.dot.warning { background: #D98A00; }
.signals .title { font-weight: 600; }
.signals .detail { color: var(--ink-2); font-size: 14px; }

/* ---------- Formulieren en knoppen ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-s); cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary:hover { background: #22385C; }
.btn:disabled { opacity: .6; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=email], input[type=password], input[type=search], select.input {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); min-width: 0;
}
input:focus { border-color: var(--ordered); outline: none; box-shadow: 0 0 0 3px rgba(36, 86, 166, .18); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { width: min(100%, 320px); }
.error { background: var(--crit-bg); color: var(--crit); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; }

/* ---------- Modulekaarten (overzicht) ---------- */
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.modules.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.modules.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modules.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1380px) { .modules.n5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .modules, .modules.n5, .modules.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .modules, .modules.n5, .modules.n3, .modules.n2 { grid-template-columns: 1fr; } }
.module { --accent: var(--ink-3); display: flex; flex-direction: column; gap: 4px; padding: 20px 22px 18px; background: var(--paper);
  border-radius: 14px; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden; min-height: 178px; }
.module::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.module:hover { text-decoration: none; box-shadow: 0 2px 4px rgba(20,35,60,.08), 0 10px 28px rgba(20,35,60,.12); }
.module.status-ok { --accent: var(--ok); }
.module.status-warn { --accent: #D98A00; }
.module.status-crit { --accent: var(--crit); }
.module.status-nodata, .module.status-unknown { --accent: #B9C3D0; }
.module-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.module-name { font-weight: 600; font-size: 15px; }
.module-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--mist); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.module-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status-ok .module-status { background: var(--ok-bg); color: var(--ok); }
.status-warn .module-status { background: var(--warn-bg); color: var(--warn); }
.status-crit .module-status { background: var(--crit-bg); color: var(--crit); }
.module-value { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.status-nodata .module-value { color: #A7B2C1; }
.module-label { font-size: 13px; color: var(--ink-2); }
.module .bar { margin: 8px 0 2px; }
.module-note { font-size: 13px; color: var(--ink-3); margin-top: auto; padding-top: 8px; }

/* ---------- Kerncijfer-tegels (contract) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); }
a.tile:hover { text-decoration: none; }
.tile-label { font-size: 14px; color: var(--ink-2); }
.tile-value { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.tile-sub { font-size: 14px; color: var(--ink-3); display: flex; gap: 6px; align-items: baseline; }
.tile-sub.bad { color: var(--crit); }
.tile-sub.good { color: var(--ok); }
.tile-sub.warn { color: var(--warn); }
.tile-arrow { font-weight: 700; }

/* ---------- Balken ---------- */
.bar { height: 8px; background: var(--mist-2); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--ordered); border-radius: 999px; }
.bar.warn > div { background: #D98A00; }
.bar.crit > div { background: var(--crit); }
.bar.term > div { background: #7F93B0; }
.bar.term.warn > div { background: #D98A00; }
.bar.term.crit > div { background: var(--crit); }
.bar.empty > div { width: 0; }
.bar-caption { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-top: 5px; white-space: nowrap; }
.contract-table td { vertical-align: middle; }
.contract-table .col-bar { width: 26%; min-width: 180px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 46ch; }
.pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* ---------- Termijnen ---------- */
.deadlines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.deadlines li { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--mist-2); }
.deadlines li:last-child { border-bottom: 0; }
.dl-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50px; border-radius: 10px; background: var(--mist); line-height: 1.1; }
.dl-date b { font-size: 18px; }
.dl-date span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.dl-date.warn { background: var(--warn-bg); color: var(--warn); }
.dl-date.crit { background: var(--crit-bg); color: var(--crit); }
.dl-title { font-weight: 600; }
.dl-when { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dl-when.warn { color: var(--warn); font-weight: 600; }
.dl-when.crit { color: var(--crit); font-weight: 600; }

/* ---------- Start (lege organisatie) ---------- */
.onboarding { display: flex; flex-direction: column; gap: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.steps li { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-m); background: var(--mist); font-size: 14px; color: var(--ink-2); }
.steps li b { color: var(--ink); }

/* ---------- Grafieken ---------- */
.linechart { display: flex; flex-direction: column; gap: 6px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-bottom: 4px; }
.legend-item { display: flex; flex-direction: column; padding-left: 12px; border-left: 4px solid var(--c); border-radius: 2px; }
.legend-label { font-size: 13px; color: var(--ink-2); }
.legend-value { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.chart .grid { stroke: #CFD7E2; stroke-dasharray: 2 4; }
.chart .ref { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart .cursor { stroke: #8D99AB; stroke-width: 1; }
.chart .cursor-label { font-size: 12px !important; font-weight: 700; fill: var(--ink) !important; }
.chart-empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; justify-content: center; min-height: 220px; padding: 24px;
  border-radius: var(--radius-m); background: repeating-linear-gradient(0deg, transparent 0 43px, #E6EBF1 43px 44px), #FAFBFD; color: var(--ink-2); }
.chart-empty b { color: var(--ink); font-size: 16px; }
.chart-empty .btn { margin-top: 8px; }

/* ---------- Instellingen ---------- */
input[type=text].input, input.input:not([type]) { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); width: 100%; }
.btn.danger { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.danger:hover { background: #962019; }
.btn.ghost-danger { color: var(--crit); border-color: #EBC3BF; }
.btn.ghost-danger:hover { background: var(--crit-bg); border-color: var(--crit); }
.btn.small-btn { padding: 5px 10px; font-size: 13px; }
.text-crit { color: var(--crit); }
.linkbtn-dark { background: none; border: 0; padding: 0; color: var(--ordered); cursor: pointer; font: inherit; font-size: 14px; }
.linkbtn-dark:hover { text-decoration: underline; }

.add-user { display: grid; gap: 14px; padding: 18px; border-radius: var(--radius-m); background: var(--mist); }
.add-user .field input { max-width: 420px; }
.role-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.role-pick legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.role-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px 40px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: var(--paper); cursor: pointer; font-size: 13px; color: var(--ink-2); }
.role-card b { font-size: 14px; color: var(--ink); }
.role-card input { position: absolute; left: 14px; top: 14px; accent-color: var(--ordered); width: 16px; height: 16px; margin: 0; }
.role-card.on { border-color: var(--ordered); box-shadow: 0 0 0 2px rgba(36, 86, 166, .18); }
.role-card:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.credentials { margin-top: 14px; padding: 16px 18px; border-radius: var(--radius-m); background: var(--ok-bg); border: 1px solid #BFE0CC; display: grid; gap: 10px; }
.cred-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; color: var(--ok); }
.credentials dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.credentials dt { color: var(--ink-2); }
.credentials dd { margin: 0; font-weight: 600; word-break: break-all; }
.credentials dd.pw { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 16px; letter-spacing: .04em; }

.members td { vertical-align: middle; }
.member { display: flex; gap: 12px; align-items: center; }
.member-email { font-weight: 600; }
.avatar.small { width: 30px; height: 30px; font-size: 12px; }
.members select.input { min-width: 150px; }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions .btn + .btn { margin-left: 6px; }
.confirm-inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--mist-2); font-size: 13px; color: var(--ink-2); }
.role-legend div { display: flex; flex-direction: column; gap: 2px; }
.role-legend b { color: var(--ink); }
.file-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.is-reverted td { color: var(--ink-3); }
tr.is-reverted .file-cell { text-decoration: line-through; }

.me-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; align-items: start; }
.pw-form { display: grid; gap: 14px; max-width: 420px; }
.pw-form input { width: 100%; }
.first-pw { width: min(100%, 420px); display: flex; flex-direction: column; gap: 16px; }
.first-pw .linkbtn-dark { align-self: flex-start; }
.brand.dark { color: var(--ink); padding: 0; }
.danger-zone { border-color: #EBC3BF; }
.danger-zone h2 { color: var(--crit); }

/* ---------- Taalkeuze ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lang-switch select {
  font: inherit; font-size: 13px; padding: 6px 28px 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2366748A' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink); appearance: none; cursor: pointer;
}
.lang-switch.dark select { width: 100%; background-color: #1E3150; color: #fff; border-color: #2E4469;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23C7D1E0' stroke-width='1.5'/%3E%3C/svg%3E"); }

/* ---------- Importeren ---------- */
.other-langs { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 12px; }
.other-lang { display: inline-flex; gap: 8px; align-items: baseline; }
.other-lang b { color: var(--ink-2); font-weight: 600; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.download { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink-2); font-size: 14px; }
.download b { color: var(--ink); }
.download .small { color: var(--ordered); margin-top: auto; padding-top: 6px; }
.download:hover { border-color: var(--ordered); text-decoration: none; background: #F6F8FB; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 30px 20px; border: 2px dashed var(--line); border-radius: var(--radius-m); background: #F8FAFC; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--ordered); background: #EEF3FB; }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.success { background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; }
.success a { margin-left: 8px; font-weight: 600; }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; }
.notice ul { margin: 6px 0 0 18px; padding: 0; }

/* ---------- Inloggen ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); }
.login-side { background: var(--ink); color: #DCE3EE; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-side h1 { color: #fff; font-size: 34px; max-width: 16ch; }
.login-side p { max-width: 46ch; margin-top: 14px; color: #B8C4D6; }
.login-demo { background: #1B2E4D; border-radius: var(--radius-m); padding: 22px; display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.login-demo .gauge-track { background: #2A3F62; }
.login-demo .gauge-max { background: #fff; }
.login-demo .gauge-max span { color: #fff; }
.login-form { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--paper); }
.login-lang { position: absolute; top: 20px; right: 24px; }
.login-form form { width: min(100%, 360px); display: flex; flex-direction: column; gap: 16px; }

/* ---------- Grafiek ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--ink-3); }
.empty { text-align: left; padding: 8px 0; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.empty b { color: var(--ink); }

/* ---------- Klantkeuze in het menu ---------- */
:root { --brand: #2456A6; --brand-soft: #E3EBF6; --brand-strong: #1D468A; }
.client-switch { position: relative; display: flex; flex-direction: column; gap: 6px; margin-top: -10px; }
.cs-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8A9AB2; padding: 0 4px; }
.cs-current {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  background: #1A2C49; border: 1px solid #2E4469; border-radius: var(--radius-m); padding: 9px 10px; color: #fff; font: inherit;
  box-shadow: inset 3px 0 0 var(--brand);
}
.cs-current:hover { background: #20365A; border-color: #3B557F; }
.cs-current.single { cursor: default; }
.cs-current.single:hover { background: #1A2C49; border-color: #2E4469; }
.cs-badge { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .02em; }
.cs-logo { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #fff; display: grid; place-items: center; overflow: hidden; padding: 3px; }
.cs-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cs-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cs-caret { flex: none; width: 14px; height: 14px; color: #9FAEC3; }
.cs-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: -40px; z-index: 30; max-height: 360px; overflow: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 12px 32px rgba(10, 20, 40, .28); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.cs-search { margin: 2px 2px 6px; }
.cs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; border-radius: var(--radius-s); cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.cs-item:hover { background: var(--mist); }
.cs-item.on { background: var(--brand-soft); }
.cs-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.cs-item-name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-item-role { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.nav-section { margin: 14px 0 4px; padding: 0 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8A9AB2; }

/* Banner "je laadt op bij klant X" */
.client-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-m);
  background: var(--brand-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-left: 4px solid var(--brand); font-size: 15px;
}
.cb-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }

/* ---------- Platformbeheer ---------- */
.grid-1 { display: grid; gap: 24px; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.client-card {
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--paper), #FAFBFD); transition: border-color .15s, box-shadow .15s;
}
.client-card:hover { border-color: #B9C4D3; box-shadow: var(--shadow); }
.client-top { display: flex; gap: 12px; align-items: center; }
.client-badge { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.client-id { min-width: 0; }
.client-id h3 { margin: 0 0 2px; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mod-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(102, 116, 138, .5); }
.mod-chip.on { background: var(--ok-bg); color: var(--ok); text-decoration: none; font-weight: 600; }
.client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 12px 0; border-top: 1px solid var(--mist-2); border-bottom: 1px solid var(--mist-2); }
.client-stats div { display: flex; flex-direction: column; gap: 2px; }
.client-stats dt { font-size: 12px; color: var(--ink-3); }
.client-stats dd { margin: 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.client-card .actions { margin-top: auto; }

.new-client { border-color: var(--ordered-soft); box-shadow: 0 0 0 4px rgba(36, 86, 166, .06); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 20px; }
.form-grid .span-all { grid-column: 1 / -1; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.form-grid select.input { width: 100%; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; font-weight: 500; font-size: 14px; background: var(--paper); user-select: none; transition: background .15s, border-color .15s;
}
.check-chip input { accent-color: var(--ink); margin: 0; width: 16px; height: 16px; }
.check-chip.on { background: var(--mist); border-color: var(--ink-3); }

.subnav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius-m); position: sticky; top: 0; z-index: 5; }
.subnav a { padding: 7px 12px; border-radius: var(--radius-s); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.subnav a:hover { background: var(--mist); color: var(--ink); text-decoration: none; }
.page [id^="pf-"] { scroll-margin-top: 64px; }

.savebar { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--mist-2); flex-wrap: wrap; }
.saved { color: var(--ok); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.saved::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Huisstijl */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; position: relative; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch.on::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.swatch.custom { background: conic-gradient(#E5484D, #F5A524, #46A758, #0091FF, #8E4EC6, #E5484D); overflow: hidden; }
.swatch.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.swatches code { margin-left: 4px; color: var(--ink-3); background: var(--mist); padding: 3px 7px; border-radius: 4px; }
.logo-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.logo-box { width: 150px; height: 64px; border: 1px dashed var(--line); border-radius: var(--radius-s); display: grid; place-items: center; padding: 8px; background: repeating-conic-gradient(#F4F6F9 0 25%, #fff 0 50%) 0 0/14px 14px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-preview { display: flex; flex-direction: column; gap: 8px; }
.brand-preview > .small { margin-bottom: 2px; }
.brand-preview { --pv: #2456A6; }
.brand-preview .pv-rail { background: var(--ink); border-radius: var(--radius-m) var(--radius-m) 0 0; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.pv-client { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; padding: 7px 8px; border-radius: 8px; background: #1A2C49; box-shadow: inset 3px 0 0 var(--pv); margin-bottom: 6px; }
.pv-client i { width: 20px; height: 20px; border-radius: 6px; background: var(--pv); }
.pv-client img { width: 22px; height: 22px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px; }
.pv-nav { color: #C7D1E0; font-size: 12px; padding: 5px 8px; border-radius: 5px; }
.pv-nav.on { background: #22385C; color: #fff; box-shadow: inset 3px 0 0 var(--pv); }
.pv-main { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-m) var(--radius-m); padding: 14px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.pv-bar { flex: 1; height: 8px; background: var(--mist-2); border-radius: 4px; overflow: hidden; }
.pv-bar div { width: 62%; height: 100%; background: var(--pv); border-radius: 4px; }
.pv-btn { border: 0; background: var(--pv); color: #fff; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; }

/* Blokken en drempels */
.switch-list, .threshold-list { display: flex; flex-direction: column; }
.switch-row, .threshold-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--mist-2); cursor: pointer; }
.switch-row:last-child, .threshold-row:last-child { border-bottom: 0; }
.switch-row > span, .threshold-row > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row b, .threshold-row b { font-weight: 600; font-size: 14px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #C9D2DE; position: relative; cursor: pointer; margin: 0; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.num-input { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); overflow: hidden; }
.num-input:focus-within { border-color: var(--ordered); box-shadow: 0 0 0 3px rgba(36, 86, 166, .18); }
.num-input input.input { width: 84px; border: 0; padding: 8px 10px; text-align: right; font: inherit; font-variant-numeric: tabular-nums; background: transparent; color: var(--ink); }
.num-input input.input:focus { box-shadow: none; }
.num-input em { font-style: normal; font-size: 13px; color: var(--ink-3); background: var(--mist); padding: 9px 10px; border-left: 1px solid var(--line); min-width: 44px; text-align: center; }

/* Afdrukken met huisstijl van de klant */
.print-head { display: none; }

@media (max-width: 1000px) { .brand-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .client-switch { margin-top: 0; flex: 1 1 220px; }
  .cs-label { display: none; }
  .cs-menu { right: 0; }
  .nav-section { display: none; }
}
@media print {
  .print-head { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 3px solid var(--brand); }
  .print-head img { max-height: 44px; max-width: 180px; object-fit: contain; }
  .print-head div { display: flex; flex-direction: column; }
  .print-head b { font-size: 16px; }
  .print-head span { font-size: 12px; color: var(--ink-3); }
  .print-head .print-by { margin-left: auto; }
  .client-banner, .subnav { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Contractformulier (stap voor stap) ---------- */
.cf-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 28px; align-items: start; }
.cf-steps { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.cf-progress { height: 6px; border-radius: 3px; background: var(--mist-2); overflow: hidden; }
.cf-progress div { height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s ease; }
.cf-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cf-steps li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: var(--radius-s); cursor: pointer; font: inherit; color: var(--ink-2); text-align: left; }
.cf-steps li button:hover { background: var(--paper); }
.cf-num { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.cf-name { display: flex; flex-direction: column; line-height: 1.2; font-size: 14px; }
.cf-name em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.cf-steps li.on button { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.cf-steps li.on .cf-num { border-color: var(--ink); background: var(--ink); color: #fff; }
.cf-steps li.ok .cf-num { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.cf-steps li.skip .cf-name { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(102, 116, 138, .5); }
.cf-draft { margin: 4px 10px 0; line-height: 1.4; }

.cf-card { padding: 32px 36px; border-top: 6px solid var(--brand); display: flex; flex-direction: column; gap: 18px; }
.cf-count { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cf-card h2 { font-size: 24px; margin: -10px 0 0; line-height: 1.25; }
.cf-intro { margin: -8px 0 4px; color: var(--ink-2); line-height: 1.5; }
.cf-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--mist-2); }
.btn.big { padding: 11px 22px; font-size: 15px; }

.q-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px 22px; }
.q { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.q.wide { grid-column: 1 / -1; }
.q.span2 { grid-column: span 2; }
@media (max-width: 720px) { .q.span2 { grid-column: 1 / -1; } }
.q-label { font-weight: 600; font-size: 14px; color: var(--ink); }
.req { color: var(--crit); margin-left: 3px; }
.q-help { font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-top: -2px; }
.q .input, .q select.input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); min-height: 42px; }
.q .input:focus { border-color: var(--ordered); outline: none; box-shadow: 0 0 0 3px rgba(36, 86, 166, .18); }
.q .input:disabled { background: var(--mist); color: var(--ink-3); }
.q.has-error .input, .q.has-error .affix { border-color: var(--crit); }
.q.has-error .affix .input { border-color: transparent; }
.q-error, .cf-card > .q-error { color: var(--crit); font-size: 13px; font-weight: 500; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); overflow: hidden; }
.affix:focus-within { border-color: var(--ordered); box-shadow: 0 0 0 3px rgba(36, 86, 166, .18); }
.affix .input { border: 0 !important; box-shadow: none !important; border-radius: 0; flex: 1; min-width: 0; }
.affix em { font-style: normal; display: grid; place-items: center; padding: 0 12px; background: var(--mist); color: var(--ink-3); font-size: 14px; }
.affix.pre em { border-right: 1px solid var(--line); }
.affix:not(.pre) em { border-left: 1px solid var(--line); }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { font: inherit; font-size: 14px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--ink-3); }
.choice.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice.big { padding: 11px 22px; font-weight: 600; }
.choice-row.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.choice.card { border-radius: var(--radius-m); text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.choice.card span { font-size: 13px; color: var(--ink-3); }
.choice.card.on { background: var(--brand-soft); color: var(--ink); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.choice.card.on span { color: var(--ink-2); }
.switch-inline { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 42px; }

.ask { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--mist); border-radius: var(--radius-m); }
.ask b { font-size: 15px; }
.more { display: flex; flex-direction: column; gap: 14px; }
.textbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ordered); cursor: pointer; text-align: left; }
.textbtn:hover { text-decoration: underline; }
.more > .textbtn { align-self: flex-start; font-weight: 600; }
.more-body { padding: 16px 0 2px; border-top: 1px dashed var(--line); }

.items { display: flex; flex-direction: column; gap: 14px; }
.item { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; background: #FBFCFD; border-left: 4px solid var(--ordered-soft); }
.item.has-error { border-left-color: var(--crit); }
.item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item-head b { font-size: 15px; }
.danger-link { color: var(--crit) !important; }
.add-item { align-self: flex-start; border-style: dashed; }

.review { display: flex; flex-direction: column; gap: 14px; }
.rv-block { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.rv-head { display: flex; justify-content: space-between; align-items: baseline; }
.rv-dl { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.rv-dl dt { color: var(--ink-3); }
.rv-dl dd { margin: 0; font-weight: 500; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.rv-count { font-weight: 600; }
.error ul { margin: 6px 0 0 18px; padding: 0; }

.cf-done { max-width: 560px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px; }
.cf-check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/44px no-repeat; }

/* Formulier aanbevolen op de importpagina */
.form-promo { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-color: var(--ordered-soft); background: linear-gradient(90deg, var(--brand-soft), var(--paper) 70%); }
.fp-icon { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--paper); color: var(--brand); display: grid; place-items: center; box-shadow: var(--shadow); }
.fp-icon svg { width: 26px; height: 26px; }
.fp-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 3px; }
.fp-text b { font-size: 16px; }
.fp-text span { color: var(--ink-2); }

@media (max-width: 1100px) {
  .cf-layout { grid-template-columns: 1fr; }
  .cf-steps { position: static; }
  .cf-steps ol { flex-direction: row; flex-wrap: wrap; }
  .cf-steps li button { width: auto; padding: 6px 8px; }
  .cf-name em, .cf-draft { display: none; }
}
@media (max-width: 560px) { .cf-card { padding: 22px 18px; } .cf-steps .cf-name { display: none; } }


/* ---------- Acties (US-06) ---------- */
.signal-action { margin-top: 8px; }
.signals .impact { font-size: 13px; font-weight: 600; color: var(--crit); margin-top: 2px; }
.btn.ghost-action { border-style: dashed; color: var(--ink-2); background: transparent; }
.btn.ghost-action:hover { border-style: solid; border-color: var(--ink); color: var(--ink); background: var(--paper); }
.action-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.action-chip:hover { text-decoration: none; filter: brightness(.97); }
.action-chip .ac-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.action-chip.late { background: var(--crit-bg); color: var(--crit); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(20, 35, 60, .45); display: grid; place-items: start center; padding: 6vh 16px; overflow: auto; animation: fade-in .15s ease-out; }
.modal { width: min(640px, 100%); background: var(--paper); border-radius: 14px; box-shadow: 0 24px 64px rgba(10, 20, 40, .35); padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; border-top: 5px solid var(--brand); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--mist-2); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--mist); color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: var(--mist-2); color: var(--ink); }
.modal textarea.input { font: inherit; resize: vertical; min-height: 72px; }
.origin-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 14px; }
.origin-note .dot { margin-top: 6px; flex: none; }
.inline-row { display: flex; gap: 10px; align-items: center; }
.inline-row .input { flex: 1; }
.choice.prio-high.on { background: var(--crit); border-color: var(--crit); }
.choice.prio-low.on { background: var(--ink-3); border-color: var(--ink-3); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--mist); border-radius: var(--radius-m); margin-bottom: 16px; }
.seg-btn { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: transparent; color: var(--ink-2); padding: 7px 12px; border-radius: var(--radius-s); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 35, 60, .12); }
.seg-count { font-size: 12px; font-weight: 700; color: var(--ink-3); min-width: 18px; text-align: center; }
.seg-btn.alert .seg-count { color: #fff; background: var(--crit); border-radius: 999px; padding: 0 6px; }

.action-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.action-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px 130px 150px; gap: 16px; align-items: center; padding: 14px 4px 14px 14px; border-bottom: 1px solid var(--mist-2); position: relative; }
.action-row::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 2px; background: var(--ordered-soft); }
.action-row.prio-high::before { background: var(--crit); }
.action-row.prio-low::before { background: var(--line); }
.action-row.closed { opacity: .62; }
.action-row.closed .ar-title { text-decoration: line-through; text-decoration-color: rgba(20, 35, 60, .35); }
.action-row:last-child { border-bottom: 0; }
.ar-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ar-title { font: inherit; font-weight: 600; font-size: 15px; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.ar-title:hover:not(:disabled) { color: var(--ordered); text-decoration: underline; }
.ar-title:disabled { cursor: default; }
.ar-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; min-width: 0; }
.ar-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--mist); color: var(--ink-3); }
.ar-tag.high { background: var(--crit-bg); color: var(--crit); }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.ar-meta .clamp1 { flex: 1 1 160px; }
.ar-owner { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.mini-avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.ar-due { display: flex; flex-direction: column; font-size: 13px; color: var(--ink-3); }
.ar-due b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.ar-due.soon span { color: var(--warn); font-weight: 600; }
.ar-due.late b, .ar-due.late span { color: var(--crit); font-weight: 700; }
.status-select { width: 100%; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
.status-select.st-in_progress { border-color: var(--ordered-soft); background: #F1F5FC; }
.status-select.st-done { border-color: #B9DFC9; background: var(--ok-bg); color: var(--ok); }
.status-select.st-cancelled { color: var(--ink-3); }
.pill.st-done { background: var(--ok-bg); color: var(--ok); }
.pill.st-in_progress { background: #E3EBF6; color: var(--ordered); }
@media (max-width: 900px) {
  .action-row { grid-template-columns: 1fr 1fr; }
  .ar-main { grid-column: 1 / -1; }
}

/* ---------- Responsief en print ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .rail-foot { margin-top: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .main { padding: 20px 16px 48px; }
  .login { grid-template-columns: 1fr; }
  .login-side { padding: 32px 24px; }
  .figure { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media print {
  .rail, .actions, .toolbar { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .panel, .figures { break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) {
  .gauge-ordered, .mini-gauge > div { transition: width .6s ease-out; }
}

/* Bron van een upload (Excel, formulier, leveranciersrapport …) */
.src-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 4px; background: var(--mist); color: var(--ink-3); font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: 1px; white-space: nowrap; }

/* ---------- Plafond vooruit bewaken (US-07) ---------- */
.gauge-track.has-levels { margin-bottom: 18px; }
.gauge-level { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgba(20, 35, 60, .35); }
.gauge-level.passed { border-left-color: rgba(255, 255, 255, .85); }
.gauge-level span { position: absolute; top: calc(100% + 3px); left: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.gauge-level.passed span { color: var(--ink-2); }
.forecast { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--mist-2); display: flex; flex-direction: column; gap: 14px; }
.fc-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m); background: var(--ok-bg); }
.fc-head div { display: flex; flex-direction: column; gap: 2px; }
.fc-head b { font-size: 14px; }
.fc-head.warn { background: var(--warn-bg); }
.fc-head.crit { background: var(--crit-bg); }
.fc-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); margin-top: 1px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17l6-6 4 4 8-8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15 7h6v6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17l6-6 4 4 8-8' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15 7h6v6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.fc-head.warn .fc-icon { background: var(--warn); }
.fc-head.crit .fc-icon { background: var(--crit); }
.fc-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fc-level { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fc-pct { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.fc-amount { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.fc-when { font-size: 13px; color: var(--ink-2); }
.fc-level.reached { background: var(--mist); }
.fc-level.reached .fc-when { color: var(--ink); font-weight: 600; }
.fc-level.coming { border-color: #E9C46A; background: #FFFBF0; }
.fc-level.coming .fc-when { color: var(--warn); font-weight: 600; }
.fc-source { margin: 0; line-height: 1.5; }
.levels-input { width: 130px !important; text-align: left !important; }

/* ---------- Herkomst en geschiedenis (US-09) ---------- */
.src-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); white-space: nowrap; cursor: help; }
.src-chip em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.src-chip.src-excel { background: #E4F3EB; color: #1E6B44; }
.src-chip.src-form { background: #E3EBF6; color: var(--ordered); }
.src-chip.src-supplier_report { background: #F1E8FA; color: #6B3FA0; }
.src-chip.src-manual { background: var(--warn-bg); color: var(--warn); }
.src-chip.src-api { background: #E0F2F4; color: #0E6670; }
.src-chip.unknown { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); font-weight: 500; }
.src-chip .has-reason { font-style: normal; font-size: 11px; }
.origin-table td { vertical-align: middle; }
.origin-table td:first-child { width: 28%; }
.origin-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.origin-list { list-style: none; margin: 0; padding: 0; }
.origin-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--mist-2); }
.origin-list li:last-child { border-bottom: 0; }
.ol-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .textbtn + .textbtn { margin-left: 14px; }
.modal.wide { width: min(820px, 100%); }
.current-val { padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-weight: 600; min-height: 42px; display: flex; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--mist-2); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ordered); margin-top: 2px; z-index: 1; }
.tl-item.op-insert .tl-dot { border-color: var(--ok); }
.tl-item.op-delete .tl-dot { border-color: var(--crit); }
.tl-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl-version { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--mist); padding: 1px 6px; border-radius: 4px; }
.tl-reason { padding: 8px 10px; border-left: 3px solid var(--warn); background: var(--warn-bg); border-radius: 0 6px 6px 0; font-size: 14px; }
.tl-fields { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.tl-fields em { font-style: normal; color: var(--ink-3); margin-right: 4px; }
table.diff { width: auto !important; min-width: 0; border-collapse: collapse; font-size: 13px; }
table.diff th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 3px 12px 3px 0; text-transform: none; letter-spacing: 0; background: none; }
table.diff td { padding: 3px 6px; border: 0; }
table.diff .old { color: var(--crit); text-decoration: line-through; text-decoration-color: rgba(179, 38, 30, .5); }
table.diff .new { color: var(--ok); font-weight: 600; }
table.diff .arrow { color: var(--ink-3); }
@media (max-width: 700px) { .origin-list li { grid-template-columns: 1fr; gap: 6px; } .row-actions { text-align: left; } }

/* ---------- Leverancierstemplate (US-05) ---------- */
.st-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-summary div { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-summary b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-summary span { font-size: 12px; color: var(--ink-3); }
.supplier-promo { background: linear-gradient(90deg, #FFF8E1, var(--paper) 70%); border-color: #F0DFA8; }
.supplier-promo .fp-icon { color: #9A6A00; }
@media (max-width: 560px) { .st-summary { grid-template-columns: 1fr; } }

/* ---------- SLA-berekening (US-03) ---------- */
.month-pick { display: inline-flex; align-items: center; gap: 8px; }
.month-pick select.input { width: auto; min-width: 120px; padding: 6px 10px; }
.sla-calc td { vertical-align: middle; }
.modal.xwide { width: min(1040px, 100%); }
.rule-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 14px; border-radius: var(--radius-m); background: var(--mist); }
.rule-box div { display: flex; flex-direction: column; gap: 2px; }
.rule-box span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.rule-box b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.calc-line { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.calc-step { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; display: flex; flex-direction: column; min-width: 110px; }
.calc-step span { font-size: 12px; color: var(--ink-3); }
.calc-step b { font-size: 20px; font-variant-numeric: tabular-nums; }
.calc-step em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.calc-step.bad b { color: var(--crit); }
.calc-step.result { border-width: 2px; }
.calc-step.result.good { border-color: var(--ok); background: var(--ok-bg); }
.calc-step.result.good b { color: var(--ok); }
.calc-step.result.bad { border-color: var(--crit); background: var(--crit-bg); }
.calc-step.muted-step { opacity: .7; border-style: dashed; }
.calc-op { display: grid; place-items: center; font-size: 20px; color: var(--ink-3); padding: 0 2px; }
.calc-table { max-height: 46vh; overflow: auto; }
.calc-table tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.calc-table tr.row-muted { color: var(--ink-3); }
.manual-outage { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-m); }
.modal > .ghost-action { align-self: flex-start; }

/* ---------- Leveranciersrapport valideren (US-04) ---------- */
.rep-btn { font: inherit; font-variant-numeric: tabular-nums; background: none; border: 0; border-bottom: 1px dashed var(--ink-3); padding: 0; color: var(--ink); cursor: pointer; }
.rep-btn:hover { color: var(--ordered); border-bottom-color: var(--ordered); }
.rep-btn.off { color: var(--crit); font-weight: 600; border-bottom-color: var(--crit); }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.cmp-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cmp-box span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.cmp-box b { font-size: 24px; font-variant-numeric: tabular-nums; }
.cmp-box em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.cmp-box.bad { border-color: var(--crit); background: var(--crit-bg); } .cmp-box.bad b { color: var(--crit); }
.cmp-box.good { border-color: #B9DFC9; background: var(--ok-bg); } .cmp-box.good b { color: var(--ok); }
.cmp-box.final { border: 2px solid var(--ink); }
.rv-h3 { font-size: 15px; margin: 6px 0 -4px; }
.diff-table { max-width: 620px; }
.hints { margin: 0; padding: 12px 14px 12px 32px; background: #F6F8FB; border-radius: var(--radius-m); display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.supplier-comment { padding: 10px 12px; border-left: 3px solid #6B3FA0; background: #F5F0FA; border-radius: 0 6px 6px 0; font-size: 14px; }
.evidence summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 6px 0; }
.evidence .table-wrap { max-height: 34vh; overflow: auto; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notes li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); }
.notes li p { margin: 0 0 2px; white-space: pre-wrap; }
.note-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding-top: 2px; }
.notes .note-question { background: var(--warn-bg); } .notes .note-question .note-kind { color: var(--warn); }
.notes .note-supplier { background: #F5F0FA; } .notes .note-supplier .note-kind { color: #6B3FA0; }
.notes .note-decision { background: var(--ok-bg); } .notes .note-decision .note-kind { color: var(--ok); }
.note-form { display: flex; flex-direction: column; gap: 8px; }
.note-form textarea.input { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); resize: vertical; }
.decide { display: flex; flex-direction: column; gap: 12px; }
.decided { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m); background: var(--ok-bg); }
.modal { max-height: calc(100vh - 12vh); overflow: auto; }
.modal > * { flex-shrink: 0; }

/* ---------- Looptijd en verlenging (US-08) ---------- */
.renewal { display: flex; flex-direction: column; gap: 18px; }
.renewal .panel-head { margin-bottom: 0; align-items: center; }
.renewal .panel-head .actions { align-items: center; }
.rn-callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-m); background: #F6F8FB; border: 1px solid var(--mist-2); color: var(--ink); line-height: 1.5; }
.rn-callout.big { font-size: 16px; padding: 16px 18px; margin-bottom: 18px; }
.rn-callout .small { margin-top: 4px; color: var(--ink-2); }
.rn-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; background: var(--ink-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4.2v4.3l2.6 1.6' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat; }
.rn-callout.ok { background: var(--ok-bg); border-color: #B9DFC9; } .rn-callout.ok .rn-icon { background-color: var(--ok); }
.rn-callout.warn { background: var(--warn-bg); border-color: #EED3A0; } .rn-callout.warn .rn-icon { background-color: var(--warn); }
.rn-callout.crit { background: var(--crit-bg); border-color: #EFB9B4; } .rn-callout.crit .rn-icon { background-color: var(--crit); }
.rn-callout.warn b, .rn-callout.crit b { color: inherit; }

.rn-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--mist-2); border: 1px solid var(--mist-2); border-radius: var(--radius-m); overflow: hidden; }
.rn-facts > div { background: var(--paper); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rn-facts span { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.rn-facts b { font-size: 20px; font-weight: 700; }
.rn-facts em { font-style: normal; font-size: 13px; color: var(--ink-3); }

.rn-timeline { position: relative; padding: 62px 4px 0; }
.rn-marks { position: absolute; left: 4px; right: 4px; top: 0; height: 62px; }
.rn-mark { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.rn-mark i { order: 2; width: 2px; height: 14px; background: var(--warn); }
.rn-mark i::after { content: ""; position: absolute; bottom: 10px; left: 50%; width: 10px; height: 10px; background: var(--warn); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.rn-mark em { order: 1; font-style: normal; font-size: 12px; font-weight: 600; color: var(--warn); white-space: nowrap; margin-bottom: 10px; transform: translateX(calc(50% - 8px)); }
.rn-mark.flip em { transform: translateX(calc(-50% + 8px)); }
.rn-mark.late i, .rn-mark.late i::after { background: var(--crit); } .rn-mark.late em { color: var(--crit); }
.rn-mark:not(.next):not(.retender) em { display: none; }
.rn-mark.retender em { margin-bottom: 30px; }
.rn-mark.retender i { height: 32px; }
.rn-mark.retender i::after { bottom: 28px; }
.rn-mark.retender i, .rn-mark.retender i::after { background: var(--ordered); } .rn-mark.retender em { color: var(--ordered); }
.rn-track { position: relative; height: 18px; border-radius: 9px; background: var(--mist); }
.rn-seg { position: absolute; top: 0; bottom: 0; border-radius: 9px; border: 2px solid var(--paper); }
.rn-seg.init { background: var(--brand); }
.rn-seg.exercised { background: color-mix(in srgb, var(--brand) 62%, #fff); }
.rn-seg.optional { background: repeating-linear-gradient(135deg, var(--brand-soft) 0 6px, #fff 6px 11px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 55%, #fff); }
.rn-seg.declined { background: repeating-linear-gradient(135deg, var(--mist-2) 0 5px, #fff 5px 10px); box-shadow: inset 0 0 0 1px var(--line); }
.rn-today { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--ink); border-radius: 1px; transform: translateX(-1px); }
.rn-today em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--paper); background: var(--ink); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.rn-labels { position: relative; height: 64px; margin-top: 22px; }
.rn-label { position: absolute; top: 0; padding: 0 6px 0 2px; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.rn-label b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rn-label span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rn-label .rn-st { font-weight: 600; }
.rn-st.exercised { color: var(--ok); } .rn-st.declined { color: var(--ink-3); text-decoration: line-through; } .rn-st.optional { color: var(--ordered); }
.rn-table tr.rn-next td { background: #F6F8FB; }
.rn-table tr.rn-next td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.rn-last { margin: -4px 0 0; }
.rn-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.rn-cell b { font-weight: 600; font-size: 14px; white-space: nowrap; }
.sig-decide { font-weight: 600; }

/* ---------- Beslissingsfiche ---------- */
.decision-sheet .grid-2 { margin-bottom: 0; }
.decision-sheet .page-head .actions { align-items: center; }
.ds-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.ds-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; }
.ds-chip:hover { text-decoration: none; border-color: var(--ink-3); }
.ds-chip em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.ds-chip.ok em { color: var(--ok); } .ds-chip.warn em { color: var(--warn); } .ds-chip.crit em { color: var(--crit); }
.ds-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-right: 2px; }
.ds-dot.ok { background: var(--ok); } .ds-dot.warn { background: #D99A1E; } .ds-dot.crit { background: var(--crit); }
.ds-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.ds-sec.crit { border-top: 4px solid var(--crit); } .ds-sec.warn { border-top: 4px solid #D99A1E; } .ds-sec.ok { border-top: 4px solid var(--ok); }
.ds-facts { display: grid; grid-template-columns: minmax(150px, 42%) 1fr; gap: 10px 16px; margin: 0; }
.ds-facts dt { color: var(--ink-3); font-size: 14px; }
.ds-facts dd { margin: 0; font-size: 14px; }
.ds-meter { margin-bottom: 16px; }
.ds-meter-bar { height: 12px; border-radius: 6px; background: var(--mist); overflow: hidden; }
.ds-meter-bar i { display: block; height: 100%; background: var(--ordered); border-radius: 6px; }
.ds-meter-bar i.crit { background: var(--crit); }
.ds-meter-cap { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.ds-meter-cap b { font-size: 18px; color: var(--ink); }
.ds-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ds-list li { position: relative; padding: 8px 12px 8px 30px; border-radius: var(--radius-s); background: #F6F8FB; font-size: 14px; display: flex; flex-direction: column; gap: 1px; }
.ds-list li::before { content: ""; position: absolute; left: 12px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.ds-list li.warn { background: var(--warn-bg); } .ds-list li.warn::before { background: #D99A1E; }
.ds-list li.crit { background: var(--crit-bg); } .ds-list li.crit::before { background: var(--crit); }
.ds-list li.ok { background: var(--ok-bg); } .ds-list li.ok::before { background: var(--ok); }
.ds-list li.next { box-shadow: inset 3px 0 0 var(--brand); } .ds-list li.next::before { background: var(--brand); }
.ds-list li.muted { color: var(--ink-3); } .ds-list li.muted b { text-decoration: line-through; }
.ds-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ds-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ds-checks li > span { flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px; }
.ds-checks li.ok > span { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ds-checks li.bad > span { background: #D99A1E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4v5' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12' r='1.2' fill='%23fff'/%3E%3C/svg%3E") center/14px no-repeat; }
.ds-checks li.na { color: var(--ink-3); } .ds-checks li.na > span { background: var(--mist-2); }
.ds-decide { border-top: 6px solid var(--brand); }
.ds-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.ds-options .choice.card:disabled { opacity: .5; cursor: not-allowed; }
.ds-options .choice.card b { font-size: 15px; }
.choice.card.dec-postpone.on { background: #F6F8FB; border-color: var(--ink-3); box-shadow: 0 0 0 1px var(--ink-3); }
.choice.card.dec-terminate.on, .choice.card.dec-retender.on { background: var(--warn-bg); border-color: #D99A1E; box-shadow: 0 0 0 1px #D99A1E; }
.ds-decide textarea.input { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); resize: vertical; }
.ds-action-grid { display: grid; grid-template-columns: minmax(0, 1fr) 160px 220px; gap: 8px; }
@media (max-width: 760px) { .ds-action-grid { grid-template-columns: 1fr; } }
.ds-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ds-history li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--mist); font-size: 14px; }
.ds-history li p { margin: 4px 0 0; white-space: pre-wrap; }
.ds-hist-kind { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding-top: 2px; }
.ds-history li.dec-extend { background: var(--ok-bg); } .ds-history li.dec-extend .ds-hist-kind { color: var(--ok); }
.ds-history li.dec-retender, .ds-history li.dec-terminate { background: var(--warn-bg); }
@media print {
  .ds-summary, .ds-decide, .decision-sheet .page-head .actions { display: none; }
  .ds-sec { break-inside: avoid; }
}
.rn-cell { min-width: 140px; }
.rn-cell b { white-space: normal; }
@media (max-width: 1500px) { .mini-gauge { width: 64px; } }

/* ---------- Herstel en export per klant ---------- */
.rc-bar { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-m); border: 1px solid var(--mist-2); background: var(--paper); font-size: 14px; }
.rc-bar > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-bar ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.rc-bar code { font-size: 13px; background: rgba(20, 35, 60, .06); padding: 1px 5px; border-radius: 4px; }
.rc-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; background: var(--ink-3) center/14px no-repeat; }
.rc-bar.ok { background: var(--ok-bg); border-color: #B9DFC9; }
.rc-bar.ok .rc-icon { background-color: var(--ok); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.8l5 2v4c0 3.1-2.2 5.4-5 6.4-2.8-1-5-3.3-5-6.4v-4z' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M5.6 8.1l1.7 1.7 3.2-3.3' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.rc-bar.warn { background: var(--warn-bg); border-color: #EED3A0; } .rc-bar.warn .rc-icon { background-color: #D99A1E; }
.rc-bar.crit { background: var(--crit-bg); border-color: #EFB9B4; } .rc-bar.crit .rc-icon { background-color: var(--crit); }
.rc-bar.warn .rc-icon, .rc-bar.crit .rc-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4v5' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12' r='1.2' fill='%23fff'/%3E%3C/svg%3E"); }
.recovery { display: flex; flex-direction: column; gap: 16px; }
.recovery .panel-head { margin-bottom: 0; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.rc-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.rc-card > b { font-size: 15px; }
.rc-progress { display: flex; flex-direction: column; gap: 6px; }
.rc-progress-bar { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; }
.rc-progress-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .25s ease; }
.rc-ways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rc-ways li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.rc-ways li > div { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.rc-tag { display: inline-block; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 6px; border-radius: 999px; background: var(--mist); color: var(--ink-3); margin-top: 1px; }
.rc-tag.ok { background: var(--ok-bg); color: var(--ok); }
.rc-h3 { font-size: 15px; margin: 4px 0 -6px; }
.rc-grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.rc-last { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.rc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.rc-dot.ok { background: var(--ok); } .rc-dot.crit { background: var(--crit); }
.rc-card .notice ul { margin: 6px 0 0 18px; }
.rc-card code { font-size: 12px; background: rgba(20, 35, 60, .06); padding: 1px 5px; border-radius: 4px; }
.rc-card .success, .rc-card .error { word-break: break-word; }
.rc-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius-s); cursor: pointer; font-size: 14px; color: var(--ink-2); }
.rc-file:hover { border-color: var(--ink-3); }
.rc-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rc-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.rc-file span::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1.5h5l3 3v10H4z' fill='none' stroke='%2366748A' stroke-width='1.3' stroke-linejoin='round'/%3E%3Cpath d='M9 1.5v3h3' fill='none' stroke='%2366748A' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- Herstel per klant ---------- */
.rc-ways .small-btn, .btn.small-btn { align-self: flex-start; margin-top: 6px; padding: 5px 12px; font-size: 13px; }
.restore { gap: 14px; }
.rs-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.rs-steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--mist); color: var(--ink-3); font-size: 13px; font-weight: 600; }
.rs-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: 12px; }
.rs-steps li.on { background: var(--ink); color: #fff; } .rs-steps li.on span { color: var(--ink); }
.rs-steps li.ok { background: var(--ok-bg); color: var(--ok); }
.rs-source { font-size: 14px; padding: 10px 12px; border-radius: var(--radius-s); background: #F6F8FB; word-break: break-word; }
.rs-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.rs-totals > div { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.rs-totals b { font-size: 24px; }
.rs-totals span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.rs-totals .ins b { color: var(--ok); } .rs-totals .upd b { color: var(--ordered); } .rs-totals .del b { color: var(--crit); } .rs-totals .unk b { color: var(--warn); }
.rs-table { max-height: 34vh; overflow: auto; }
.rs-confirm { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid #EFB9B4; border-radius: var(--radius-m); background: #FFF8F7; }
.rs-confirm .input { max-width: 420px; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; margin-bottom: 4px; }
label.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.rs-run { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-run li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-3); }
.rs-run li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.rs-run li.on { color: var(--ink); font-weight: 600; } .rs-run li.on::before { border-color: var(--brand); border-top-color: transparent; animation: rs-spin .8s linear infinite; }
.rs-run li.ok { color: var(--ok); } .rs-run li.ok::before { background: var(--ok); border-color: var(--ok); }
@keyframes rs-spin { to { transform: rotate(360deg); } }

/* ---------- Koppelingen (US-02) ---------- */
.ig-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ig-how > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); font-size: 14px; color: var(--ink-2); }
.ig-how b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); font-size: 13px; }
.ig-list { display: flex; flex-direction: column; gap: 16px; }
.ig-card { display: flex; flex-direction: column; gap: 14px; }
.ig-card.off { background: #FBFCFD; }
.ig-top { display: flex; align-items: center; gap: 14px; }
.ig-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ig-id h2 { font-size: 18px; }
.ig-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft) center/22px no-repeat; }
.ig-icon.rest { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D468A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h10M10 8l4 4-4 4'/%3E%3Crect x='15' y='4' width='5' height='16' rx='1.5'/%3E%3C/svg%3E"); }
.ig-icon.inbox { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D468A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l2.5-7h11L20 13v5a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18z'/%3E%3Cpath d='M4 13h4.5l1.5 2.5h4l1.5-2.5H20'/%3E%3C/svg%3E"); }
.ig-icon.excel { background-color: #E4F3EB; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 8l6 8M15 8l-6 8'/%3E%3C/svg%3E"); }
.ig-excel { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ig-excel .ig-top { flex: 1; }
.ig-empty { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ig-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; margin: 0; background: var(--mist-2); border: 1px solid var(--mist-2); border-radius: var(--radius-m); overflow: hidden; }
.ig-facts > div { background: var(--paper); padding: 10px 14px; }
.ig-facts dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.ig-facts dd { margin: 2px 0 0; font-size: 14px; }
.ig-inbox { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--radius-m); background: #F6F8FB; }
.ig-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.ig-row > .small { width: 70px; }
.ig-row code, .ig-example pre { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12.5px; }
.ig-row code { background: var(--paper); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; word-break: break-all; }
.ig-key { border-color: var(--brand) !important; }
.ig-example summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.ig-example pre { background: #14233C; color: #E3E9F0; padding: 12px 14px; border-radius: 8px; overflow: auto; margin: 6px 0 0; line-height: 1.5; }
.ig-actions { flex-wrap: wrap; }
.ig-confirm { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--crit); flex-wrap: wrap; }
.ig-log { border-top: 1px solid var(--mist-2); padding-top: 12px; }
.ig-msgs { margin: 4px 0 0 16px; padding: 0; }
.ig-wizard { gap: 14px; }
.ig-sample { max-height: 30vh; overflow: auto; }
.ig-sample th { white-space: nowrap; font-family: Consolas, monospace; font-size: 12px; }
.ig-map { max-height: 46vh; overflow: auto; }
.ig-map td { vertical-align: top; }
.ig-map .input { min-width: 140px; }
.ig-map tr.ig-missing td:first-child { box-shadow: inset 3px 0 0 #D99A1E; }
.ig-trans-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.ig-trans { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--mist); padding: 12px 14px; }
.ig-trans-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.ig-trans table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ig-trans th:first-child { width: 46%; }
.ig-trans th:nth-child(2) { width: 22px; }
.ig-trans td code { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ig-trans th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); padding: 2px 4px 6px; }
.ig-trans td { padding: 3px 4px; vertical-align: middle; }
.ig-trans td code { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 3px 7px; font-size: 12.5px; }
.ig-trans .input { width: 100%; min-width: 0; padding-top: 6px; padding-bottom: 6px; }
.ig-arrow { color: var(--ink-3); width: 18px; text-align: center; }
.ig-soon { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--mist-2); border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }

/* Tickets op de contractfiche */
.tk-toolbar { margin-bottom: 12px; }
.tk-toolbar select.input { width: auto; min-width: 130px; }
.tk-toolbar input[type=search] { width: min(100%, 230px); }
.tk-toolbar .tk-csv { margin-left: auto; }
.tk-note { margin-bottom: 12px; }
.tk-table td { vertical-align: middle; }
.tk-table .tk-id { font-family: Consolas, "SFMono-Regular", monospace; font-size: 13px; white-space: nowrap; color: var(--ink); }
.tk-table .tk-title { min-width: 180px; max-width: 300px; }
.tk-table .tk-title .small { margin-top: 2px; }
.tk-table .nowrap { white-space: nowrap; }
.tk-table .src-tag { margin-left: 0; }
.src-tag.src-api { background: #E7EEFB; color: var(--ordered); }
.tk-more { display: flex; justify-content: center; margin-top: 12px; }
@media (max-width: 720px) { .tk-toolbar .tk-csv { margin-left: 0; } .tk-toolbar select.input { flex: 1 1 140px; } .tk-toolbar input[type=search] { width: 100%; } }

/* Dashboard: open P1/P2-incidenten */
.ov-inc { list-style: none; margin: 0; padding: 0; }
.ov-inc li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--mist-2); }
.ov-inc li:first-child { border-top: 0; padding-top: 2px; }
.ov-prio { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 6px;
  background: var(--warn-bg); color: var(--warn); font-weight: 700; font-size: 12.5px; }
.ov-prio.crit { background: var(--crit-bg); color: var(--crit); }
.ov-inc-body { min-width: 0; }
.ov-inc-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-inc-title code { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin-right: 4px; }
.ov-age { font-size: 12.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.ov-age.warn { color: var(--warn); }
.ov-age.crit { color: var(--crit); }
.nav-gap { height: 12px; }
/* Tickets: snelle filters */
.tk-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tk-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 13px; cursor: pointer; }
.tk-chip b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: 12px; text-align: center; }
.tk-chip:hover { border-color: var(--ink-3); }
.tk-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tk-chip.on b { background: rgba(255,255,255,.18); color: #fff; }
.tk-chip.crit b { background: var(--crit-bg); color: var(--crit); }
.tk-chip.crit.on b { background: var(--crit); color: #fff; }

/* Terug-knop bovenaan module- en beheerpagina's */
a.crumb.back-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-weight: 600; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 9px; margin-bottom: 12px; text-decoration: none; }
a.crumb.back-link::before { content: "←"; font-weight: 700; }
a.crumb.back-link:hover { border-color: var(--ink-3); color: var(--ink); }

/* Modulepagina's: overzicht bovenaan */
.mod-hero .figures { margin-bottom: 4px; }
.figure.ok .value { color: var(--ok); }
.mod-grid { gap: 28px; margin-top: 18px; }
.mod-list-head { margin: 4px 2px 10px; }
.hbar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hbar li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.hbar-rank { width: 24px; height: 24px; border-radius: 50%; background: var(--mist); color: var(--ink-2); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.hbar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.hbar-head a, .hbar-head b { font-weight: 600; }
.hbar-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--mist); border-radius: 999px; margin: 6px 0 3px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 999px; background: var(--ordered); }
.hbar-fill.warn { background: #D98A00; }
.hbar-fill.crit { background: var(--crit); }
.hbar-fill.sup { background: #5B7FB8; }
.segbar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--mist); gap: 2px; }
.segbar span { display: block; min-width: 6px; }
.seg-met { background: var(--ok); } .seg-at_risk { background: #D98A00; } .seg-missed { background: var(--crit); } .seg-no_data { background: #B9C3D0; }
.seg-critical { background: var(--crit); } .seg-warning { background: #D98A00; } .seg-info { background: #8A9AB2; }
.kpi-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi-st { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-m);
  background: var(--paper); font: inherit; cursor: pointer; text-align: left; border-left-width: 4px; }
.kpi-st b { font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.kpi-st span { font-size: 13px; color: var(--ink-2); }
.kpi-st.kpi-met { border-left-color: var(--ok); } .kpi-st.kpi-at_risk { border-left-color: #D98A00; }
.kpi-st.kpi-missed { border-left-color: var(--crit); } .kpi-st.kpi-no_data { border-left-color: #B9C3D0; }
.kpi-st.on { background: var(--mist); box-shadow: inset 0 0 0 1px var(--ink-3); }
.kpi-st.kpi-missed b { color: var(--crit); }
@media (max-width: 720px) { .kpi-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pivot td, .pivot th { vertical-align: middle; }
.pivot .col-seg { width: 26%; min-width: 120px; }
.pivot tr.on td { background: var(--mist); }
.pivot tr.pv-total td { border-top: 2px solid var(--line); }
.sev-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sev-dot.critical { background: var(--crit); } .sev-dot.warning { background: #D98A00; } .sev-dot.info { background: #8A9AB2; }
.pv-cell { font: inherit; font-weight: 700; min-width: 34px; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; background: var(--mist); color: var(--ink); }
.pv-cell.critical { background: var(--crit-bg); color: var(--crit); }
.pv-cell.warning { background: var(--warn-bg); color: var(--warn); }
.pv-cell.on { border-color: var(--ink); }
.link-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.trend-up { color: var(--ok); } .trend-down { color: var(--crit); }

/* Instellingen: gegevens beheren */
.manage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.manage-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius-m);
  background: var(--paper); color: var(--ink); text-decoration: none; transition: box-shadow .15s, border-color .15s; }
.manage-card:hover { text-decoration: none; border-color: var(--ink-3); box-shadow: 0 2px 4px rgba(20,35,60,.06), 0 8px 22px rgba(20,35,60,.10); }
.manage-card b { font-size: 15px; margin-top: 6px; }
.manage-card span:not(.mc-icon) { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.mc-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft) center/22px no-repeat; }
.mc-form { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D468A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M9 8h6M9 12h6M9 16h3'/%3E%3C/svg%3E"); }
.mc-excel { background-color: #E4F3EB; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E7B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M9 8l6 8M15 8l-6 8'/%3E%3C/svg%3E"); }
.mc-link { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D468A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1'/%3E%3Cpath d='M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E"); }

/* Contracten: eerst aflopend */
.term-list { list-style: none; margin: 0; padding: 0; }
.term-list li { display: grid; grid-template-columns: 26px minmax(160px, 1.1fr) 2fr minmax(170px, 1fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--mist-2); }
.term-list li:first-child { border-top: 0; }
.term-ref { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.term-ref:hover b { text-decoration: underline; }
.term-bar .hbar-track { margin: 0 0 4px; }
.hbar-fill.ext { background: var(--ok); }
.term-ext { display: flex; flex-direction: column; }
.ext-yes { font-weight: 700; color: var(--ok); font-size: 13.5px; }
.ext-no { font-weight: 700; color: var(--crit); font-size: 13.5px; }
.ct-term { min-width: 180px; }
.ct-term-dates { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.ct-term-dates b { color: var(--ink); }
@media (max-width: 860px) { .term-list li { grid-template-columns: 26px 1fr; } .term-bar, .term-ext { grid-column: 2; } }

/* Contractfiche: springen naar een onderdeel */
.sec-anchor { scroll-margin-top: 18px; border-radius: 14px; }
.sec-flash > .panel, section.sec-flash { animation: secFlash 2.2s ease-out; }
@keyframes secFlash { 0%, 30% { box-shadow: 0 0 0 3px var(--focus), var(--shadow); } 100% { box-shadow: var(--shadow); } }
.kpi-sum.compact .kpi-st { cursor: default; padding: 10px 14px; }
.kpi-sum.compact .kpi-st b { font-size: 22px; }
.kpi-row.missed td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
.kpi-row.at_risk td:first-child { box-shadow: inset 3px 0 0 #D98A00; }

/* ---------- US-02 stap D: KPI aan een bron koppelen ---------- */
.modal.kc-modal { width: min(820px, 100%); }
.kc-target { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 14px; background: var(--mist); border-radius: var(--radius-s); color: var(--ink-2); }
.kc-target b { color: var(--ink); font-variant-numeric: tabular-nums; }
.kc-preview { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px 12px; background: var(--paper); }
.kc-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kc-preview-head h3 { margin: 0; font-size: 15px; }
.kc-table td, .kc-table th { padding-top: 8px; padding-bottom: 8px; }
.kc-table td.num b { font-variant-numeric: tabular-nums; }
.kc-table tr.kc-running td { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(20, 35, 60, .025) 8px 16px); }
.kc-table tr.kc-running td.num b { color: var(--ink-3); }
.text-warn { color: var(--warn); font-weight: 600; }
.kc-src-cell { min-width: 150px; }
.kc-src-name { max-width: 220px; line-height: 1.35; margin: 3px 0 2px; }
.kc-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-3); white-space: nowrap; }
.kc-tag.auto { background: var(--ok-bg); color: var(--ok); }
.kc-tag .kc-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(30, 123, 79, .15); }
.kc-src-cell .link-btn { font-size: 13px; font-weight: 600; color: var(--ordered, var(--ink)); margin-top: 3px; }
.trend-flat { color: var(--ink-3); }
@media (max-width: 640px) { .kc-src-name { max-width: none; } .kc-target { gap: 4px 14px; } }
.kc-table td.kc-period { white-space: nowrap; }
.kc-msg { margin: -4px 0 12px; padding: 9px 12px; border-radius: var(--radius-s); background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 500; }
.kc-start-note { margin: 0 0 10px; padding: 9px 12px; border-radius: var(--radius-s); background: var(--mist); color: var(--ink-2); border-left: 3px solid var(--ordered); }
.kc-table tr.kc-before td { color: var(--ink-3); }
.kc-table tr.kc-before td.num b { color: var(--ink-3); font-weight: 600; }
.kc-table tr.kc-before .pill { opacity: .55; }

/* ---------- Afspraak wijzigen (SLA/KPI met ingangsdatum) ---------- */
.modal.ag-modal { width: min(760px, 100%); }
.ag-listbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin: 0 0 12px; border-radius: var(--radius-s); background: var(--mist); }
.ag-listbar .small { max-width: 640px; line-height: 1.4; }
.textbtn.strong { font-weight: 600; }
.origin-list li.ag-stopped .ol-main b { color: var(--ink-3); }
.ag-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.ag-badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2); white-space: nowrap; }
.ag-badge.info { background: #E6EEFA; color: var(--ordered); }
.ag-badge.warn { background: var(--warn-bg); color: var(--warn); }
.ag-badge.muted { background: var(--mist); color: var(--ink-3); }

.ag-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 16px 6px; background: var(--paper); }
.ag-box-h { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.ag-timeline { list-style: none; margin: 0; padding: 0; }
.ag-tl { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 0 0 12px; }
.ag-tl:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--mist-2); }
.ag-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; background: var(--paper); border: 3px solid var(--ink-3); }
.ag-tl.current .ag-dot { border-color: var(--ok); background: var(--ok); }
.ag-tl.planned .ag-dot { border-color: var(--ordered); border-style: dashed; }
.ag-tl-when { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-tl-val { font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 1px; }
.ag-tl.history .ag-tl-val { color: var(--ink-3); font-weight: 600; }
.ag-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; background: var(--mist); color: var(--ink-3); }
.ag-tag.current { background: var(--ok-bg); color: var(--ok); }
.ag-tag.planned { background: #E6EEFA; color: var(--ordered); }

.ag-compare { display: grid; gap: 6px; }
.ag-compare-head, .ag-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(90px, .8fr) minmax(140px, 1fr); gap: 12px; align-items: center; }
.ag-compare-head { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 0 10px; }
.ag-row { padding: 6px 10px; border-radius: var(--radius-s); transition: background .15s; }
.ag-row .q-label { margin: 0; }
.ag-row .ag-old { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ag-row.changed { background: #FFF8E6; }
.ag-row.changed .ag-old { text-decoration: line-through; text-decoration-color: rgba(154, 91, 0, .5); }
.ag-row .input { width: 100%; }

.ag-summary { padding: 10px 14px; border-radius: var(--radius-s); font-size: 14px; border-left: 3px solid var(--ok); background: var(--ok-bg); color: var(--ink); }
.ag-summary.future { border-left-color: var(--ordered); background: #E6EEFA; }
.ag-amend { align-self: flex-start; }

@media (max-width: 640px) {
  .ag-compare-head { display: none; }
  .ag-row { grid-template-columns: 1fr 1fr; }
  .ag-row .q-label { grid-column: 1 / -1; }
}

/* ---------- Leveranciersevaluatie ---------- */
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--mist); }
.ev-sum { margin-bottom: 18px; }
.kpi-st.ev-st-A { border-left-color: var(--ok); } .kpi-st.ev-st-A b { color: var(--ok); }
.kpi-st.ev-st-B { border-left-color: #D98A00; } .kpi-st.ev-st-B b { color: var(--warn); }
.kpi-st.ev-st-C { border-left-color: var(--crit); } .kpi-st.ev-st-C b { color: var(--crit); }

.ev-class { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: 15px;
  background: var(--mist); color: var(--ink-3); }
.ev-class.A { background: var(--ok-bg); color: var(--ok); }
.ev-class.B { background: var(--warn-bg); color: var(--warn); }
.ev-class.C { background: var(--crit-bg); color: var(--crit); }
.ev-class.big { display: inline-flex; gap: 14px; height: auto; padding: 14px 22px; border-radius: 14px; }
.ev-class.big b { font-size: 46px; line-height: 1; }
.ev-class.big em { font-style: normal; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

.ev-top { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
.ev-top .panel { margin: 0; }
.ev-total { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ev-cover { width: 100%; height: 6px; border-radius: 3px; background: var(--mist-2); overflow: hidden; margin-top: 4px; }
.ev-cover div { height: 100%; background: var(--ink-3); border-radius: 3px; }
.ev-trend ol { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 0; }
.ev-trend li a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink-2); min-width: 84px; }
.ev-trend li a:hover { text-decoration: none; background: var(--mist); }
.ev-trend li.on a { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(20, 35, 60, .08); }

.ev-table td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.ev-table tr.ev-nodata td { color: var(--ink-3); }
.ev-w { width: 92px; }
.ev-w .input { width: 72px; text-align: right; padding: 6px 8px; }
.ev-dots { display: inline-flex; gap: 6px; }
.ev-dot { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--paper); font: inherit; font-weight: 700; font-size: 14px; color: var(--ink-3); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.ev-dot:hover:not(:disabled) { border-color: var(--ink-3); color: var(--ink); }
.ev-dot:disabled { cursor: default; }
.ev-dot.fill.s1, .ev-dot.fill.s2 { background: var(--crit-bg); border-color: #E7B3AE; color: var(--crit); }
.ev-dot.fill.s3 { background: var(--warn-bg); border-color: #EBCB8F; color: var(--warn); }
.ev-dot.fill.s4, .ev-dot.fill.s5 { background: var(--ok-bg); border-color: #A9D3BC; color: var(--ok); }
.ev-dot.on { box-shadow: 0 0 0 3px rgba(20, 35, 60, .12); color: var(--ink); }
.ev-note-in { margin-top: 8px; width: 100%; max-width: 520px; }
.ev-note { margin-top: 6px; color: var(--ink-2); }
.ev-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.ev-text { display: grid; gap: 14px; }
.ev-text p { margin: 4px 0 0; white-space: pre-wrap; }
.ev-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-top: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 -6px 18px rgba(20, 35, 60, .06); }
.ev-bar .small { margin-right: auto; }
@media (max-width: 760px) { .ev-top { grid-template-columns: 1fr; } .ev-dot { width: 30px; height: 30px; } }
@media print {
  .ev-bar, .ev-page .page-head .actions .btn, .ev-note-in, .back-link { display: none !important; }
  .ev-page .panel { break-inside: avoid; }
}

/* ---------- E-mail (Microsoft 365) op het platform ---------- */
.mail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; margin: 0 0 14px; }
.mail-facts div { padding: 10px 12px; background: var(--mist); border-radius: var(--radius-s); }
.mail-facts .wide { grid-column: 1 / -1; background: var(--crit-bg); }
.mail-facts dt { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mail-facts dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Acties als opvolgsysteem: historiek en opmerkingen ---------- */
.modal.modal-wide { width: min(760px, 100%); }
.plain-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.plain-fs[disabled] .input { background: var(--mist); color: var(--ink-2); }
.fu { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.fu-title { margin: 0; font-size: 15px; color: var(--ink); }
.fu-list { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.fu-list::before { content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--mist-2); }
.fu-item { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.fu-event { align-items: center; font-size: 13px; color: var(--ink-2); padding-left: 4px; }
.fu-dot { flex: none; width: 10px; height: 10px; margin: 0 7px 0 4px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-3); z-index: 1; }
.fu-event.k-created .fu-dot { border-color: var(--brand); background: var(--brand); }
.fu-event.k-assigned .fu-dot { border-color: var(--brand); }
.fu-event.st-done .fu-dot { border-color: var(--ok); background: var(--ok); }
.fu-event.st-cancelled .fu-dot { border-color: var(--ink-3); background: var(--ink-3); }
.fu-event.st-in_progress .fu-dot { border-color: var(--warn); }
.fu-text { flex: 1; min-width: 0; }
.fu-text b { color: var(--ink); font-weight: 600; }
.fu-time { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fu-comment .mini-avatar { z-index: 1; box-shadow: 0 0 0 3px var(--paper); }
.fu-comment.mine .mini-avatar { background: var(--brand); }
.fu-bubble { flex: 1; min-width: 0; background: var(--mist); border-radius: 4px var(--radius-m) var(--radius-m) var(--radius-m); padding: 9px 13px 10px; }
.fu-comment.mine .fu-bubble { background: var(--brand-soft); }
.fu-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.fu-meta b { color: var(--ink); font-size: 13px; }
.fu-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.fu-form { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; }
.fu-buttons { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ar-comments { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border: 0; border-radius: 999px; padding: 1px 8px 1px 7px; cursor: pointer; }
.ar-comments:hover { background: var(--mist-2); }

/* ---------- Contractowner op de contractfiche ---------- */
.owner-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.owner-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.owner-select { width: auto; min-width: 240px; max-width: 100%; padding-top: 6px; padding-bottom: 6px; }
.ok-text { color: var(--ok); font-weight: 600; }
.crit-text { color: var(--crit); font-weight: 600; }
@media print { .owner-select { border: 0; padding: 0; appearance: none; background: none; } }

/* ---------- Leveranciersevaluatie stap B: vergelijking over periodes ---------- */
.ev-view { margin: 0 0 14px; }
.ev-trend-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ev-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-delta span { font-size: 10px; }
.ev-delta.up { color: var(--ok); }
.ev-delta.down { color: var(--crit); }
.ev-delta.flat { color: var(--ink-3); }
.ev-delta.big { font-size: 16px; }
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ev-card { margin: 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.ev-card:hover { text-decoration: none; border-color: var(--ink-3); box-shadow: 0 6px 22px rgba(20, 35, 60, .1); transform: translateY(-1px); }
.ev-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ev-card-head b { font-size: 15px; }
.ev-card-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ev-card-score { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ev-card-foot { display: flex; flex-wrap: wrap; gap: 4px 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.ev-card-go { margin-left: auto; color: var(--brand); font-weight: 700; }
.ev-spark { flex: none; overflow: visible; }
.ev-spark.none { width: 96px; height: 30px; }
.ev-spark .g { stroke: var(--mist-2); stroke-width: 1; stroke-dasharray: 3 3; }
.ev-spark polyline { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ev-spark circle { stroke: var(--paper); stroke-width: 1.5; }
.ev-spark.cA circle { fill: var(--ok); } .ev-spark.cB circle { fill: var(--warn); } .ev-spark.cC circle { fill: var(--crit); }

.ev-cmp-top { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 18px; margin-bottom: 18px; }
.ev-cmp-top .panel { margin: 0; }
.ev-chart-panel .panel-head { margin-bottom: 4px; }
.ev-chart { width: 100%; height: auto; display: block; }
.ev-chart .zone.A { fill: var(--ok-bg); } .ev-chart .zone.B { fill: var(--warn-bg); } .ev-chart .zone.C { fill: var(--crit-bg); opacity: .7; }
.ev-chart .grid { stroke: rgba(20, 35, 60, .08); }
.ev-chart .ytick, .ev-chart .xtick { font-size: 12px; fill: var(--ink-3); font-family: var(--font); }
.ev-chart .xtick { font-weight: 600; fill: var(--ink-2); }
.ev-chart .zl { font-size: 12px; font-weight: 800; font-family: var(--font); opacity: .7; }
.ev-chart .zl.A { fill: var(--ok); } .ev-chart .zl.B { fill: var(--warn); } .ev-chart .zl.C { fill: var(--crit); }
.ev-chart .line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ev-chart .pt { stroke: var(--paper); stroke-width: 2.5; fill: var(--ink); }
.ev-chart .pt.A { fill: var(--ok); } .ev-chart .pt.B { fill: var(--warn); } .ev-chart .pt.C { fill: var(--crit); }
.ev-chart .pt.draft { fill: var(--paper); stroke: var(--ink-3); stroke-dasharray: 2 2; }
.ev-chart .pv { font-size: 12px; font-weight: 700; fill: var(--ink); font-family: var(--font); font-variant-numeric: tabular-nums; }
.ev-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ev-ins { margin: 0; border-top: 4px solid var(--line); }
.ev-ins.up { border-top-color: var(--ok); } .ev-ins.down { border-top-color: var(--crit); } .ev-ins.focus { border-top-color: var(--warn); }
.ev-ins h3 { margin: 0 0 10px; font-size: 14px; }
.ev-ins ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-ins li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ev-ins li span { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.ev-matrix th, .ev-matrix td { white-space: nowrap; }
.ev-matrix .ev-cell { text-align: center; }
.ev-matrix thead .ev-cell a { font-weight: 700; }
.ev-matrix .ev-grp th { background: var(--mist); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); text-align: left; }
.ev-matrix tfoot th, .ev-matrix tfoot td { border-top: 2px solid var(--line); padding-top: 12px; }
.ev-matrix tfoot .ev-class { min-width: 26px; height: 26px; font-size: 13px; margin-left: 4px; }
.ev-sc { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 13px; border: 1.5px solid; }
.ev-sc.s1, .ev-sc.s2 { background: var(--crit-bg); border-color: #E7B3AE; color: var(--crit); }
.ev-sc.s3 { background: var(--warn-bg); border-color: #EBCB8F; color: var(--warn); }
.ev-sc.s4, .ev-sc.s5 { background: var(--ok-bg); border-color: #A9D3BC; color: var(--ok); }
.ev-mini { font-size: 9px; margin-left: 3px; vertical-align: top; }
.ev-mini.up { color: var(--ok); } .ev-mini.down { color: var(--crit); }
.ds-eval .ev-class { min-width: 26px; height: 26px; font-size: 13px; }
@media (max-width: 900px) {
  .ev-cmp-top, .ev-insights { grid-template-columns: 1fr; }
}
@media print {
  .ev-card { break-inside: avoid; }
  .ev-cmp .check { display: none; }
}
.ev-cmp label.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ink-2); }
.ev-cmp label.check input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
@media (max-width: 640px) { .ev-chart-panel { overflow-x: auto; } .ev-chart { min-width: 540px; } }

/* ---------- Vervaldatum clientgeheim ---------- */
.mail-setup .rc-bar { margin: 0 0 14px; }
.mail-facts .exp-warn { background: var(--warn-bg); }
.mail-facts .exp-warn dd { color: var(--warn); }
.mail-facts .exp-crit { background: var(--crit-bg); }
.mail-facts .exp-crit dd { color: var(--crit); }

/* ---------- Voorspelling contractwaarde ---------- */
.fc2-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-m); background: var(--mist); margin-bottom: 16px; line-height: 1.5; }
.fc2-head.ok { background: var(--ok-bg); } .fc2-head.warn { background: var(--warn-bg); } .fc2-head.crit { background: var(--crit-bg); }
.fc2-head .fc-icon { flex: none; margin-top: 2px; }
.fc2-start { margin-top: 4px; }
.fc2-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.fc2-card { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; background: var(--paper); }
.fc2-card.normal { border-color: var(--ink-3); box-shadow: 0 0 0 1px var(--ink-3) inset; }
.fc2-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fc2-rate { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14px; }
.fc2-key { width: 18px; height: 0; border-top: 3px solid var(--ink); display: inline-block; }
.fc2-key.low { border-top: 3px dashed #6E8CB8; } .fc2-key.normal { border-top-color: var(--ordered); } .fc2-key.high { border-top: 3px dashed var(--warn); }
.fc2-card dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.fc2-card dt { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.fc2-card dt:first-child { margin-top: 0; }
.fc2-card dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.fc2-chart-wrap { border-top: 1px solid var(--line); padding-top: 14px; }
.fc-chart { width: 100%; height: auto; display: block; }
.fc-chart .grid { stroke: rgba(20, 35, 60, .07); }
.fc-chart .ytick, .fc-chart .xtick { font-size: 12px; fill: var(--ink-3); font-family: var(--font); font-variant-numeric: tabular-nums; }
.fc-chart .fc-max { stroke: var(--crit); stroke-width: 1.5; }
.fc-chart .fc-max.ext { stroke-dasharray: 5 4; opacity: .7; }
.fc-chart .fc-max-l { font-size: 11px; font-weight: 700; fill: var(--crit); font-family: var(--font); }
.fc-chart .fc-max-l.ext { opacity: .75; }
.fc-chart .fc-v line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.fc-chart .fc-v text { font-size: 11px; font-weight: 700; fill: var(--ink-2); font-family: var(--font); }
.fc-chart .fc-v.start line { stroke: var(--warn); stroke-dasharray: none; stroke-width: 1.5; }
.fc-chart .fc-v.start text { fill: var(--warn); }
.fc-chart .fc-today { stroke: var(--ink); stroke-width: 1; opacity: .25; }
.fc-chart .fc-hist { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.fc-chart .fc-proj { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.fc-chart .fc-proj.normal { stroke: var(--ordered); }
.fc-chart .fc-proj.low { stroke: #6E8CB8; stroke-dasharray: 6 5; }
.fc-chart .fc-proj.high { stroke: var(--warn); stroke-dasharray: 6 5; }
.fc-chart .fc-now { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.fc2-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; color: var(--ink-2); }
.fc2-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fc2-legend .lg { width: 20px; height: 0; border-top: 3px solid var(--ink); display: inline-block; }
.fc2-legend .lg.low { border-top: 3px dashed #6E8CB8; } .fc2-legend .lg.normal { border-top-color: var(--ordered); }
.fc2-legend .lg.high { border-top: 3px dashed var(--warn); } .fc2-legend .lg.max { border-top: 2px solid var(--crit); }
.fc2-basis { margin: 10px 0 0; }
@media (max-width: 900px) { .fc2-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .fc2-chart-wrap { overflow-x: auto; } .fc-chart { min-width: 560px; } }
@media print { .fc2 { break-inside: avoid; } }
.fc2-head.warn .fc-icon { background: var(--warn); } .fc2-head.crit .fc-icon { background: var(--crit); }

/* ---------- Rondleiding ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-dim { position: fixed; inset: 0; background: rgba(10, 20, 40, .55); }
.tour-hole { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 20, 40, .55), 0 0 0 3px var(--focus); transition: all .2s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 32px)); background: var(--paper); border-radius: 14px; padding: 20px 22px 16px;
  box-shadow: 0 24px 64px rgba(10, 20, 40, .35); border-top: 5px solid var(--brand); display: flex; flex-direction: column; gap: 10px; }
.tour-card.center { width: min(460px, calc(100vw - 32px)); }
.tour-card.side::before { content: ""; position: absolute; left: -7px; top: var(--arrow, 30px); width: 16px; height: 16px; background: var(--paper); transform: rotate(45deg); border-radius: 3px; }
.tour-card h2 { margin: 0; font-size: 18px; color: var(--ink); }
.tour-card p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.tour-progress { display: flex; gap: 5px; }
.tour-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--mist-2); }
.tour-progress i.done { background: var(--ink-3); }
.tour-progress i.on { background: var(--brand); }
.tour-count { margin-top: -4px; }
.tour-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tour-foot .tour-skip { margin-right: auto; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }
@media print { .tour { display: none; } }

/* ---------- Prioriteitsmatrix ---------- */
.pm-wrap { display: grid; grid-template-columns: auto minmax(260px, 1fr); gap: 24px; align-items: start; }
.pm-table { border-collapse: separate; border-spacing: 6px; margin: -6px; }
.pm-table th { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: center; padding: 4px 6px; white-space: nowrap; border: 0; background: none; }
.pm-table tbody th { text-align: right; }
.pm-corner { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 11px !important; color: var(--ink-3) !important; text-transform: uppercase; letter-spacing: .04em; }
.pm-table td { padding: 0; border: 0; }
.pm-sel { width: 96px; text-align: center; font-weight: 800; padding: 10px 8px; border-radius: var(--radius-m); border-width: 1.5px; }
.pm-sel.p1 { background: var(--crit-bg); color: var(--crit); border-color: #E7B3AE; }
.pm-sel.p2 { background: var(--warn-bg); color: var(--warn); border-color: #EBCB8F; }
.pm-sel.p3 { background: var(--brand-soft); color: var(--brand-strong); border-color: #B9CBE6; }
.pm-sel.p4, .pm-sel.p5 { background: var(--mist); color: var(--ink-2); }
.pm-mode { display: flex; flex-direction: column; gap: 8px; }
.pm-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); cursor: pointer; }
.pm-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.pm-opt input { margin-top: 3px; accent-color: var(--ink); }
.pm-opt > span { display: flex; flex-direction: column; gap: 2px; }
.prio-calc { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--brand-strong); cursor: help; }
@media (max-width: 760px) { .pm-wrap { grid-template-columns: 1fr; } .pm-table { border-spacing: 4px; } .pm-sel { width: 64px; padding: 8px 2px; } .pm-table th { padding: 4px 2px; font-size: 11px; } }

/* ---------- Prijsherziening en indexcijfers ---------- */
.px-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.px-top > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--mist); border-radius: var(--radius-m); }
.px-formula b { font-size: 15px; font-variant-numeric: tabular-nums; }
.px-now b { font-size: 20px; font-variant-numeric: tabular-nums; }
.px-grid { gap: 20px; margin-top: 4px; }
.px-h { margin: 6px 0 8px; font-size: 14px; color: var(--ink); }
.px-future td { color: var(--ink-3); }
.px-miss { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 800; margin-left: 4px; }
.px-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.px-form { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--mist); }
.px-term .inline-row { gap: 8px; flex-wrap: wrap; }
.px-term select.input { flex: 1 1 240px; }
.px-w { width: 96px; text-align: right; }
.ix-wrap { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; }
.ix-list { display: flex; flex-direction: column; gap: 6px; }
.ix-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--paper); font: inherit; cursor: pointer; color: var(--ink); }
.ix-tab:hover { border-color: var(--ink-3); }
.ix-tab.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.ix-add { display: flex; gap: 6px; margin-top: 6px; }
.ix-add .input { flex: 1; min-width: 0; }
.ix-table { max-height: 460px; overflow: auto; }
.ix-in { width: 120px; text-align: right; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.ix-changed td { background: var(--warn-bg); }
@media (max-width: 900px) { .px-top, .px-methods, .ix-wrap { grid-template-columns: 1fr; } }
.px-form .input.px-w, .q .input.px-w { flex: 0 0 110px; width: 110px; height: 40px; padding: 8px 10px; }
.ix-table td .input.ix-in { width: 130px; margin-left: auto; display: block; height: 36px; }
input[type=number].input, input[type=month].input, input[type=date].input { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
input[type=number].input:focus, input[type=month].input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }

/* ---------- Pakketten ---------- */
.plan-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.plan-limits { margin-bottom: 6px; }
.plan-mods { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink2); margin: 6px 0 14px; }
.plan-mods input { margin-top: 3px; accent-color: var(--ink); }
.plan-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 10px; }
.plan-meter-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.plan-meter-head b { color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-bar { height: 8px; border-radius: 4px; background: var(--mist-2); overflow: hidden; }
.plan-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ink-3); }
.plan-bar.ok i { background: var(--ok); } .plan-bar.warn i { background: var(--warn); } .plan-bar.crit i { background: var(--crit); }
.plan-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mist); color: var(--ink-2); }
.plan-pill.p-basis { background: var(--mist-2); color: var(--ink); }
.plan-pill.p-professioneel { background: var(--brand-soft); color: var(--brand-strong); }
.plan-pill.p-enterprise { background: var(--ink); color: #fff; }
@media (max-width: 900px) { .plan-choices { grid-template-columns: 1fr 1fr; } .plan-meters { grid-template-columns: 1fr; } }

/* ---------- Meldingen (belletje en instellingen) ---------- */
.rail { z-index: 40; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2E4469 transparent; }
.nt { position: relative; }
.nt-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-s);
  background: transparent; color: #C7D1E0; font: inherit; font-weight: 500; text-align: left; cursor: pointer;
}
.nt-btn:hover, .nt-btn.on { background: #1E3150; color: #fff; }
.nt-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.nt-label { display: inline-flex; align-items: center; gap: 8px; }
.nt-label svg { width: 16px; height: 16px; opacity: .85; }
.nt-badge { font-size: 12px; background: var(--brand, #2456A6); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.nt-pop {
  position: fixed; top: 80px; left: 258px; z-index: 120; width: 380px; max-height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 12px 40px rgba(20, 35, 60, .22); overflow: hidden;
}
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--mist-2); }
.nt-head b { font-size: 15px; }
.nt-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.nt-item {
  display: grid; grid-template-columns: 10px 1fr; gap: 10px; width: 100%; text-align: left; background: none; border: 0;
  padding: 11px 16px; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px solid var(--mist);
}
.nt-list li:last-child .nt-item { border-bottom: 0; }
.nt-item:hover { background: var(--mist); }
.nt-item:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: transparent; }
.nt-item.unread { background: #F4F8FE; }
.nt-item.unread:hover { background: #EAF1FC; }
.nt-item.unread .nt-dot { background: var(--brand, #2456A6); }
.nt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-line { font-size: 13px; color: var(--ink-2); }
.nt-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-quote {
  font-size: 13px; color: var(--ink-2); border-left: 3px solid var(--mist-2); padding-left: 8px; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-meta { display: flex; gap: 8px; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.nt-meta span + span::before { content: "·"; margin-right: 8px; }
.nt-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 26px; color: var(--ink-2); }
.nt-empty svg { width: 28px; height: 28px; color: var(--ink-3); }
.nt-foot { display: block; flex: none; background: var(--paper); padding: 11px 16px; border-top: 1px solid var(--mist-2); font-size: 13px; font-weight: 600; text-align: center; }
.nt-foot:hover { background: var(--mist); text-decoration: none; }

.nt-set .nt-scope { margin-bottom: 4px; }
.nt-help { margin: 10px 0 14px; }
.nt-grid { width: 100%; border-collapse: collapse; }
.nt-grid th, .nt-grid td { padding: 13px 10px; border-bottom: 1px solid var(--mist-2); text-align: left; vertical-align: middle; }
.nt-grid thead th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-top: 4px; }
.nt-grid thead th:not(:first-child), .nt-grid td { text-align: center; width: 120px; }
.nt-grid tbody th { font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.nt-grid tbody th b { display: block; font-weight: 600; font-size: 14px; }
.nt-grid tbody tr:last-child > * { border-bottom: 0; }
.nt-grid .switch { vertical-align: middle; }
.nt-mailto { margin: 10px 0 0; }

@media (max-width: 900px) {
  .nt-btn { width: auto; }
  .nt-pop { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
}
@media (max-width: 560px) {
  .nt-grid thead { display: none; }
  .nt-grid, .nt-grid tbody, .nt-grid tr { display: block; width: 100%; }
  .nt-scope { display: flex; flex-wrap: wrap; }
  .nt-scope .seg-btn { flex: 1 1 auto; }
  .nt-grid tr { padding: 12px 0; border-bottom: 1px solid var(--mist-2); }
  .nt-grid tbody tr:last-child { border-bottom: 0; }
  .nt-grid tbody th { display: block; padding: 0 0 8px; border: 0; }
  .nt-grid td { display: flex; align-items: center; justify-content: space-between; width: auto; padding: 6px 0; border: 0; text-align: left; }
  .nt-grid td::before { content: attr(data-label); font-size: 14px; color: var(--ink-2); }
}
@media print { .nt { display: none !important; } }

/* ---------- Aanvragen ontbrekende gegevens (US-10) ---------- */
.rq-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.rq-dates { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rq-dates .input { width: auto; min-width: 160px; flex: 0 1 190px; }
.rq-none { padding: 14px 16px; border-radius: var(--radius-m); background: var(--ok-bg); color: var(--ok); font-size: 14px; }
.rq-pick { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.rq-pick-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; background: var(--mist); border-bottom: 1px solid var(--line); }
.rq-pick ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.rq-pick li + li { border-top: 1px solid var(--mist-2); }
.rq-pick label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px; cursor: pointer; }
.rq-pick label:hover { background: #F6F8FB; }
.rq-pick input { margin-top: 3px; accent-color: var(--brand, #2456A6); }
.rq-pick label > span { display: flex; flex-direction: column; min-width: 0; }
.rq-pick b { font-weight: 600; font-size: 14px; }
.rq-howto { margin: 0; padding: 10px 14px; background: var(--mist); border-radius: var(--radius-m); }
.rq-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 18px; padding: 14px 16px; background: var(--mist); border-radius: var(--radius-m); }
.rq-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-meta span { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.rq-meta b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.rq-steps { list-style: none; margin: 0; padding: 0 0 0 4px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rq-steps li { position: relative; padding-left: 20px; }
.rq-steps li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); }
.rq-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.rq-steps li.bad::before { background: var(--crit); border-color: var(--crit); }
.rq-steps .muted { margin-left: 6px; font-size: 13px; }
.rq-msg { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.rq-msg p { margin: 2px 0 0; white-space: pre-wrap; }
.rq-table td { vertical-align: top; }
.rq-table tr.conflict td { background: var(--warn-bg); }
.rq-quote { font-size: 13px; color: var(--ink-2); border-left: 3px solid var(--mist-2); padding-left: 8px; margin-top: 4px; }
.rq-list td .clamp1 { max-width: 220px; display: inline-block; vertical-align: bottom; }
.btn.danger-text { color: var(--crit); border-color: transparent; background: transparent; }
.btn.danger-text:hover { background: var(--crit-bg); }

/* formulier voor de ontvanger (zonder account) */
.pr-page { min-height: 100vh; background: var(--mist); padding: 40px 16px 32px; display: flex; flex-direction: column; align-items: center; }
.pr-card { width: min(800px, 100%); background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 28px 32px 30px; border-top: 6px solid var(--brand, #2456A6); }
.pr-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); margin-bottom: 18px; flex-wrap: wrap; }
.pr-brand img { width: 26px; height: 26px; }
.pr-org { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.pr-title { font-size: 26px; margin: 0 0 6px; line-height: 1.25; }
.pr-intro { color: var(--ink-2); margin: 0 0 16px; }
.pr-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 18px; margin: 0 0 16px; padding: 14px 16px; background: var(--mist); border-radius: var(--radius-m); }
.pr-meta > div { min-width: 0; }
.pr-meta dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pr-meta dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.pr-group { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.pr-group legend { font-weight: 700; font-size: 15px; padding: 0 0 8px; text-transform: capitalize; }
.pr-item { padding: 14px 0; border-top: 1px solid var(--mist-2); }
.pr-item.has-error { background: var(--crit-bg); margin: 0 -12px; padding: 14px 12px; border-radius: var(--radius-s); }
.pr-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.pr-label b { font-weight: 600; }
.pr-inputs { display: grid; grid-template-columns: 170px 130px 130px 1fr; gap: 10px; align-items: end; }
.pr-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-f > span:first-child { font-size: 12px; color: var(--ink-3); }
.pr-f .input { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); min-height: 40px; }
.pr-f .affix .input { border: 0; }
.pr-inputs:not(:has(.pr-f:nth-child(3))) { grid-template-columns: 170px 1fr; }
.pr-err { color: var(--crit); font-size: 13px; font-weight: 600; margin-top: 6px; }
.pr-bottom { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pr-name.has-error .input { border-color: var(--crit); }
.pr-submit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.pr-submit .btn { min-width: 160px; }
.pr-state { text-align: center; padding: 24px 8px 12px; }
.pr-state h1 { font-size: 24px; margin: 6px 0 8px; }
.pr-state p { color: var(--ink-2); max-width: 520px; margin: 0 auto; }
.pr-check { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 28px; font-weight: 700; }
.pr-foot { color: var(--ink-3); margin-top: 18px; text-align: center; }
@media (max-width: 640px) {
  .pr-card { padding: 22px 18px 24px; }
  .pr-title { font-size: 22px; }
  .pr-inputs, .pr-inputs:not(:has(.pr-f:nth-child(3))) { grid-template-columns: 1fr 1fr; }
  .pr-f.pr-c { grid-column: 1 / -1; }
  .pr-f:first-child:nth-last-child(2) { grid-column: 1 / -1; }
}
.nav .nt-pop a.nt-foot { display: block; color: var(--brand-strong, #1D468A); font-weight: 600; border-radius: 0; padding: 11px 16px; }
.nav .nt-pop a.nt-foot:hover { background: var(--mist); color: var(--brand-strong, #1D468A); }

/* Signalen: kritieke signalen uitgelicht (link vanuit de teller in het menu) */
.sg-focus { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--crit-bg); color: var(--crit); border-left: 4px solid var(--crit); border-radius: var(--radius-s);
  padding: 12px 14px; margin-bottom: 10px; }
.sg-focus .small { color: var(--ink-2); margin-top: 2px; }
.sg-focus > div { flex: 1 1 320px; min-width: 0; }
.sg-focus .btn { flex: 0 0 auto; }

/* Testomgeving herkenbaar onderaan het menu (niet op app.tenderinsight.be) */
.rail-version .env-test { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #D98A00; color: #fff; font-weight: 600; letter-spacing: .02em; }

/* ---------------------------------------------------------------- Contractenlijst 2.0 */
/* statusbol (kleur uit de database: v_contract_list.health) */
.hb { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; flex: 0 0 auto; box-shadow: 0 0 0 3px var(--paper); }
.hb-critical { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-bg); }
.hb-warning { background: #D98A00; box-shadow: 0 0 0 3px var(--warn-bg); }
.hb-ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.hb-no_data { background: #fff; border: 2px solid #B9C3D0; width: 12px; height: 12px; box-sizing: border-box; }
.hb-inactive { background: #B9C3D0; }
.cl-table td.cl-narrow, .cl-table th.cl-narrow { width: 34px; padding-right: 0; text-align: center; }

/* snelkeuze per status */
.cl-health { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cl-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 10px; cursor: pointer; }
.cl-chip b { color: var(--ink); }
.cl-chip:hover { border-color: var(--ink-3); }
.cl-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cl-chip.on b { color: #fff; }
.cl-chip .hb { width: 10px; height: 10px; box-shadow: none; }

/* werkbalk en panelen */
.cl-toolbar { margin-bottom: 12px; flex-wrap: wrap; }
.cl-toolbar .btn.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cl-count { margin-left: auto; }
.cl-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.cl-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; padding: 14px 16px; margin-bottom: 14px;
  background: var(--mist); border: 1px solid var(--mist-2); border-radius: var(--radius-s); }
.cl-pick { display: flex; flex-direction: column; gap: 4px; }
.cl-pick .input { width: 100%; }
.cl-cols { display: block; }
.cl-cols p { margin: 0 0 10px; }
.cl-col-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; margin-bottom: 10px; }
.cl-col { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.cl-col input { width: 16px; height: 16px; accent-color: var(--ink); }
.cl-none { padding: 18px 0; }

/* sorteerbare koppen */
.cl-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-align: inherit; }
.cl-sort:hover { color: var(--ink); text-decoration: underline; }
th.num .cl-sort { justify-content: flex-end; width: 100%; }
.cl-arrow { font-size: 10px; min-width: 8px; }

/* prestatiebalk: gehaald (groen) tegenover gemist (rood) */
.pb { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.pb-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--mist-2); }
.pb-ok { background: var(--ok); }
.pb-miss { background: var(--crit); opacity: .85; }
.cl-sig { display: inline-flex; gap: 10px; font-weight: 600; font-size: 13px; white-space: nowrap; }

@media (max-width: 700px) {
  .cl-count { margin-left: 0; width: 100%; }
  .cl-panel { grid-template-columns: 1fr; }
  .cl-toolbar input[type="search"] { width: 100%; }
}

/* ---------- Responsief: aanmeldscherm en meter (0.21.1) ---------- */
.gauge-track { margin-top: 22px; }
.gauge-max.end span { left: auto; right: -1px; transform: none; }
.login { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-side, .login-form { min-width: 0; }
.login-demo .gauge-legend { color: #B8C4D6; }
.login-demo .gauge-legend i { box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); min-height: 100svh; }
  .login-side { gap: 24px; }
  .login-side h1 { font-size: clamp(24px, 7vw, 32px); }
  .login-form { padding: 64px 20px 40px; align-items: flex-start; }
  .login-lang { top: 16px; right: 16px; }
}
@media (max-width: 480px) {
  .login-side { padding: 24px 20px; }
  .login-demo { padding: 16px; }
  .login-demo .gauge-legend { gap: 4px 14px; font-size: 12px; }
}

/* ---------- Responsief: smalle schermen in de app (0.21.1) ---------- */
.pm-wrap > * { min-width: 0; }
.pm-scroll { overflow-x: auto; padding: 6px; margin: -6px; }
.add-user { min-width: 0; }
.add-user > * { min-width: 0; max-width: 100%; }
.add-user .field input { width: 100%; }
.add-user .actions { flex-wrap: wrap; }
@media (max-width: 480px) {
  .deadlines li { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 12px; }
  .deadlines li > :last-child { grid-column: 2; }
  .dl-when { white-space: normal; }
  .rn-mark em { white-space: normal; width: max-content; max-width: 112px; line-height: 1.25; text-align: left; }
  .rn-mark.flip em { text-align: right; }
}
@media (max-width: 480px) {
  .pm-table { border-spacing: 3px; }
  .pm-sel { width: 54px; padding: 8px 0; font-size: 13px; -webkit-appearance: none; appearance: none; text-align-last: center; }
  .pm-table th { font-size: 10px; padding: 2px 1px; white-space: normal; }
  .pm-corner span { display: block; }
}
