/* RGI App — UI "Norm & Vertrouwen". Componenten bovenop tokens.css.
   Vuistregel: numeriek/code/datum/status = mono; narratief = Space Grotesk. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
.loading { padding: 4rem; text-align: center; color: var(--sub); font-family: var(--font-mono); }
a { color: var(--accent); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--sub); }
.small { font-size: .82rem; }

/* ---------- Topbar + merk-lockup ---------- */
header.topbar {
  height: 58px; display: flex; align-items: center; gap: 1rem;
  padding: 0 1.4rem; background: var(--bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.lockup { display: flex; align-items: center; gap: 10px; }
.lockup svg { width: 26px; height: 26px; display: block; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.wordmark .suffix {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--sub);
  letter-spacing: .04em; margin-left: 9px; padding-left: 9px; border-left: 1px solid var(--line);
}
header.topbar .spacer { flex: 1; }
.role-badge {
  font-family: var(--font-mono); font-weight: 600; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.who { font-size: .85rem; color: var(--sub); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.badge {
  font-family: var(--font-mono); font-size: 10.5px; padding: 2px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 500;
}

/* ---------- Tabs ---------- */
nav.tabs { display: flex; gap: 6px; padding: 0 1.4rem; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
nav.tabs a {
  padding: 9px 16px; margin: 7px 0; text-decoration: none; color: var(--sub); font-size: 13.5px;
  border-radius: var(--radius-s); transition: background-color .15s, color .15s;
}
nav.tabs a:hover { background: var(--line-soft); }
nav.tabs a.active { background: var(--accent); color: #fff; font-weight: 600; }
nav.tabs a.active:hover { background: var(--accent); }

/* Benut de schermbreedte op desktop (cap voor leesbaarheid), blijft responsive. */
main { max-width: 1600px; margin: 1.4rem auto; padding: 0 1.8rem; }
@media (min-width: 1100px) { .grid.cols-3.wide { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Typografie ---------- */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: .2rem 0 .3rem; }
h2 { font-size: 16px; font-weight: 600; margin: 1.3rem 0 .6rem; }
h3 { font-size: 15px; font-weight: 600; margin: 1rem 0 .4rem; }
p { line-height: 1.65; }
.breadcrumb { font-family: var(--font-mono); font-size: 11.5px; color: var(--sub); margin-bottom: .5rem; }
.breadcrumb a { cursor: pointer; }
.meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--sub); }
.code {
  font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent);
}

/* ---------- Panels / cards / document ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow-card); }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 26px 30px; box-shadow: var(--shadow-card); }
.grid { display: grid; gap: .9rem; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .9rem 1rem; cursor: pointer; transition: border-color .15s, background-color .15s; box-shadow: var(--shadow-card); }
.card:hover { border-color: var(--accent); background: var(--accent-soft); }
.card h3 { margin: 0 0 .3rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- KPI ---------- */
.kpi { text-align: center; }
.kpi .v { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.kpi .l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--sub); margin-top: .2rem; }
.kpi.key { background: var(--accent-ink); border-color: var(--accent-ink); }
.kpi.key .v, .kpi.key .l { color: #fff; }
.bar { height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* ---------- Forms / buttons ---------- */
input, select, textarea {
  width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-family: var(--font-ui); font-size: 14px; background: var(--surface-2); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--sub); margin: .55rem 0 .2rem; }
button {
  font-family: var(--font-ui); font-weight: 600; font-size: 13.5px; line-height: 1;
  background: var(--accent); color: #fff; border: 0; border-radius: var(--radius-s);
  padding: .6rem .95rem; cursor: pointer; transition: filter .15s, background-color .15s;
}
button:hover { filter: brightness(.94); }
button.ghost { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
button.ghost:hover { background: var(--accent-soft); filter: none; }
button.sub { background: var(--accent-bright); }
button.warn { background: var(--surface); color: var(--nc); border: 1px solid var(--nc); }
button.warn:hover { background: var(--nc-soft); filter: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-family: var(--font-mono); color: var(--sub); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
td .mononum, td.num { font-family: var(--font-mono); }

/* ---------- Badges: status + bevindingen + niveau ---------- */
.tag { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; padding: 2.5px 9px; border-radius: 99px; letter-spacing: .03em; background: var(--line-soft); color: var(--sub); }
.tag.open, .tag.ai_draft { background: var(--accent-soft); color: var(--accent-ink); }
.tag.answered, .tag.corrected, .tag.running { background: var(--obs-soft); color: var(--obs); }
.tag.processed, .tag.approved, .tag.done { background: var(--c-soft); color: var(--c); }
.tag.error { background: var(--err-soft); color: var(--err); }

/* volledige bevindings-badge (CONFORM / NON-CONFORMITEIT / …) */
.find { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; padding: 2.5px 10px; border-radius: 99px; letter-spacing: .04em; }
.find.C { background: var(--c-soft); color: var(--c); }
.find.NC { background: var(--nc-soft); color: var(--nc); }
.find.OBS { background: var(--obs-soft); color: var(--obs); }
.find.OFI { background: var(--ofi-soft); color: var(--ofi); }

/* inline gekleurde classificatie-letter */
.ft { font-family: var(--font-mono); font-weight: 700; }
.ft.C { color: var(--c); } .ft.NC { color: var(--nc); } .ft.OBS { color: var(--obs); } .ft.OFI { color: var(--ofi); }

.level { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; letter-spacing: .06em; text-transform: uppercase; }
.level.engagement { background: var(--accent-soft); color: var(--accent-ink); }
.level.client { background: var(--c-soft); color: var(--c); }
.level.sector { background: var(--obs-soft); color: var(--obs); }
.level.system { background: var(--ofi-soft); color: var(--ofi); }

/* ---------- Status-stip (template-rail) ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; background: var(--sub); opacity: .45; }
.dot.approved { background: var(--c); opacity: 1; }
.dot.corrected, .dot.review { background: var(--warn); opacity: 1; }
.dot.ai_draft { background: var(--sub); opacity: .5; }

/* ---------- Rail + sectie-rij ---------- */
.rail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 8px; box-shadow: var(--shadow-card); max-height: 70vh; overflow: auto; }
.rail .chap { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); padding: 10px 8px 4px; }
.rail-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-m); cursor: pointer; transition: background-color .15s; }
.rail-row:hover { background: var(--accent-soft); }
.rail-row.active { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.rail-row .rcode { font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--accent); flex: 0 0 auto; }
.rail-row .rtitle { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.rail-row .rstate { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; color: var(--sub); flex: 0 0 auto; }

/* Filterbalk boven lijstweergaven (dossiers, audit-trail, …) — naast elkaar */
.filterbar { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin: .2rem 0 1rem; align-items: center; }
.filterbar > * { width: 100%; min-width: 0; margin: 0; }
@media (max-width: 720px) { .filterbar { grid-template-columns: 1fr; } }

/* Template-overzicht: klikbare vragenlijst links + context-preview rechts */
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.tpl-preview { position: sticky; top: 16px; }
.tpl-q { cursor: pointer; transition: background-color .12s; }
.tpl-q:hover { background: var(--accent-soft); }
.tpl-q.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.tpl-head { display: flex; align-items: center; gap: 8px; }
.tpl-field { margin-top: .7rem; }
.tpl-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--sub); margin-bottom: 3px; }
.tpl-value { font-size: 13px; color: var(--ink); line-height: 1.45; }
@media (max-width: 980px) { .tpl-layout { grid-template-columns: 1fr; } .tpl-preview { position: static; } }

/* Inklapbare hoofdstukgroepen in de review-rail */
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.rail-head .rh-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); }
.rail-head .rh-count { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--c); }
.chap-group { margin-bottom: 2px; }
.chap-hd { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 8px; border: none; background: none; cursor: pointer; border-radius: var(--radius-m); text-align: left; transition: background-color .15s; }
.chap-hd:hover { background: var(--accent-soft); }
.chap-hd .ccode { font-family: var(--font-mono); font-weight: 700; font-size: 11px; color: var(--accent); flex: 0 0 auto; }
.chap-hd .ctitle { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chap-hd .ccount { font-family: var(--font-mono); font-size: 11px; color: var(--sub); flex: 0 0 auto; }
.chap-hd .caret { color: var(--sub); font-size: 10px; flex: 0 0 auto; transition: transform .15s; }
.chap-group.open .chap-hd .caret { transform: rotate(90deg); }
.chap-body { display: none; padding-left: 10px; margin: 2px 0 6px; border-left: 1px solid var(--line); }
.chap-group.open .chap-body { display: block; }

/* ---------- Evidence-register ---------- */
.evidence { border-left: 3px solid var(--accent); background: var(--surface-2); padding: .5rem .7rem; border-radius: 0 8px 8px 0; margin: .4rem 0; font-size: 13px; line-height: 1.5; }
.evidence .prov { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: .25rem; }
.evidence.transcript { border-left-color: var(--accent); }
.evidence.document { border-left-color: var(--ofi); }
.evidence.client_answer { border-left-color: var(--c); }
.evidence.client_answer .prov { color: var(--c); }
.evidence.document .prov { color: var(--ofi); }
.evidence.auditor_input { border-left-color: var(--obs); }

/* ---------- Review-document (auditor kernscherm) ---------- */
.doc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.doc-head .clause { font-family: var(--font-mono); font-size: 10px; color: var(--sub); }
.qtext { font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--ink); margin: .3rem 0 14px; }
.find-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 4px 11px; margin-bottom: 16px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; }
.find-pill .fdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.find-pill.C { background: var(--c-soft); color: var(--c); } .find-pill.C .fdot { background: var(--c); }
.find-pill.NC { background: var(--nc-soft); color: var(--nc); } .find-pill.NC .fdot { background: var(--nc); }
.find-pill.OBS { background: var(--obs-soft); color: var(--obs); } .find-pill.OBS .fdot { background: var(--obs); }
.find-pill.OFI { background: var(--ofi-soft); color: var(--ofi); } .find-pill.OFI .fdot { background: var(--ofi); }
.docbody p { font-size: 14.5px; line-height: 1.65; color: var(--ink); margin: .2rem 0 .8rem; }
.corrected-note { border-left: 3px solid var(--c); background: var(--c-soft); border-radius: 0 8px 8px 0; padding: .55rem .7rem; margin: .2rem 0 1rem; font-size: 13.5px; line-height: 1.55; }
.corrected-note .cn-label { display: block; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--c); margin-bottom: .2rem; }
.so-note { border-left: 3px solid var(--accent-bright); background: var(--accent-soft); border-radius: 0 8px 8px 0; padding: .55rem .7rem; margin: .2rem 0 1rem; font-size: 13.5px; }
.so-note .prov { font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .25rem; }
.ev-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--sub); margin: 18px 0 9px; }
.review-actions { border-top: 1px solid var(--line-soft); padding-top: 18px; margin-top: 18px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.correct-form { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 15px; }
.correct-form[hidden] { display: none; }

/* ---------- Gating-balk ---------- */
.gating { display: flex; align-items: center; gap: .8rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: .6rem .9rem; margin: .6rem 0; }
.gating .pct { font-family: var(--font-mono); font-weight: 700; color: var(--accent-ink); }
.gating .bar { flex: 1; }

/* ---------- Notices / log ---------- */
.notice { padding: .55rem .8rem; border-radius: var(--radius-s); font-size: 13px; margin: .6rem 0; }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.ok { background: var(--c-soft); color: var(--c); }
.log { background: var(--accent-ink); color: #cfe0ec; padding: .7rem; border-radius: var(--radius-s); font-family: var(--font-mono); font-size: 11px; max-height: 200px; overflow: auto; white-space: pre-wrap; }

/* ---------- CRM-kanban ---------- */
.lead-add { margin-bottom: 1rem; }
.lead-add > summary { display: inline-block; cursor: pointer; font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: #fff; background: var(--accent); border-radius: var(--radius-s); padding: 8px 15px; list-style: none; }
.lead-add > summary::-webkit-details-marker { display: none; }
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: .5rem; align-items: flex-start; }
.board-col { background: var(--board-col); border-radius: 12px; padding: 12px; min-width: 230px; flex: 1 1 0; min-height: 80px; transition: background .12s, outline-color .12s; outline: 2px dashed transparent; outline-offset: -4px; }
.board-col.drag-over { background: var(--accent-soft); outline-color: var(--accent); }
.bcol-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bcol-name { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; }
.bcol-count { font-size: 11px; color: var(--sub); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 11px 13px; margin-bottom: 9px; box-shadow: var(--shadow-kcard); cursor: grab; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; }
.kc-company { font-weight: 700; font-size: 12.5px; color: var(--ink); margin-bottom: 7px; }
.kc-meta { display: flex; align-items: center; gap: 6px; }
.sector-pill { font-family: var(--font-mono); font-size: 9.5px; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 7px; border-radius: 99px; }
.sector-pill.done { color: var(--sub); background: var(--line-soft); }
.kc-info { font-size: 10px; color: var(--sub); margin-left: auto; }
.kc-convert { font-size: 11px; font-weight: 600; color: var(--accent); border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 9px; cursor: pointer; }
.kc-convert:hover { text-decoration: underline; }
.kc-convert.done { color: var(--sub); font-weight: 500; cursor: default; }
.kc-convert.done:hover { text-decoration: none; }
.kc-move { display: none; margin-top: 8px; width: 100%; font-size: 11px; padding: .3rem .4rem; }
.kcard:hover .kc-move, .kcard:focus-within .kc-move { display: block; }

/* ---------- Rondleiding (interactieve demo) ---------- */
.tour-card {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: min(580px, 92vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: 0 14px 50px rgba(21,32,43,.30);
  padding: 1.1rem 1.2rem; z-index: 1000;
}
.tour-card h4 { margin: 0 0 .4rem; font-size: 15.5px; padding-right: 1.5rem; }
.tour-card .tbody { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.tour-card .tbody strong { color: var(--accent-ink); }
.tour-card .trow { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; }
.tour-card .tour-progress { flex: 1; font-family: var(--font-mono); font-size: 11px; color: var(--sub); }
.tour-card .tclose { position: absolute; top: .6rem; right: .7rem; background: none; color: var(--sub); padding: .2rem .4rem; font-size: 14px; }
.tour-card .tclose:hover { color: var(--ink); filter: none; }
.tour-highlight {
  position: relative; z-index: 900; border-radius: 10px;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 4000px rgba(21,32,43,.45);
  transition: box-shadow .2s;
}
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 1rem; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 34px 32px; width: 340px; box-shadow: var(--shadow-card); }
.login-card button { width: 100%; height: 44px; margin-top: 1.1rem; }
.login-lockup { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-bottom: 1.5rem; }
.login-lockup svg { width: 44px; height: 44px; }
.login-lockup .wordmark { font-size: 24px; }
.login-help { font-size: 11.5px; color: var(--sub); text-align: center; margin: 1.1rem 0 0; line-height: 1.5; }

/* ---------- Klantvragen ---------- */
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow-card); }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.q-meta { font-family: var(--font-mono); font-size: 11px; color: var(--sub); }
.q-text { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.q-attach { display: inline-flex; align-items: center; gap: 7px; border: 1px dashed #C7CDD4; border-radius: 8px; padding: 8px 13px; font-size: 13px; color: var(--sub); }

/* ---------- Lessen-wachtrij ---------- */
.queue-head { font-family: var(--font-mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--warn); margin: .4rem 0 .7rem; }
.lesson-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.lc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.lc-origin { font-family: var(--font-mono); font-size: 11px; color: var(--sub); margin-left: auto; }
.lc-body { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin-bottom: 13px; }
.ref-pill { font-family: var(--font-mono); font-size: 9.5px; color: var(--accent); background: var(--surface-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 99px; }

/* ---------- Leereffect: verticale staafgrafiek ---------- */
.barchart { display: flex; align-items: flex-end; gap: 16px; height: 150px; padding: 14px 4px 0; overflow-x: auto; }
.bc-col { flex: 1; min-width: 46px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bc-bar { width: 100%; max-width: 46px; border-radius: 6px 6px 0 0; transition: height .3s; }
.bc-val { font-size: 10px; color: var(--ink); font-weight: 600; }
.bc-lab { font-size: 10px; color: var(--sub); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* SoA — uitgesloten controls visueel gedempt */
tr.soa-excluded td:nth-child(2) { color: var(--sub); text-decoration: line-through; }
tr.soa-excluded { opacity: .72; }

/* Leereffect / topical evidence / SoA-advies */
.notice.warn { background: var(--obs-soft); color: var(--obs); }
.evidence .prov .topical { color: var(--obs); font-weight: 600; }

/* Rondleiding: fase-lint bovenaan elke kaart (waar zit je in het proces) */
.tour-phase { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 3px 10px; border-radius: 99px; margin-bottom: .5rem; }
.tour-steps { margin: .4rem 0 0; padding-left: 1.1rem; }
.tour-steps li { margin: .15rem 0; }

/* Live run-voortgang */
.notice.live { background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; gap: .5rem; }
.spinner { width: 13px; height: 13px; border: 2px solid var(--accent); border-top-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Uitleg-blok bij Rapport-runs */
.run-help { margin: .3rem 0 .2rem; }
.run-help > summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.run-help ul { margin: .5rem 0 .2rem; padding-left: 1.1rem; color: var(--sub); }
.run-help li { margin: .25rem 0; line-height: 1.5; }

/* Laatste activiteiten (overzicht) */
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { display: flex; align-items: baseline; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line-soft); }
.activity-feed li:last-child { border-bottom: 0; }
.act-icon { width: 1.2rem; text-align: center; flex: none; }
.act-text { flex: 1; font-size: 13.5px; }
.act-ts { font-size: 10.5px; color: var(--sub); flex: none; }

/* Documenten: lijst + preview-pane */
.doc-list { display: flex; flex-direction: column; gap: 4px; }
.doc-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 8px 11px; cursor: pointer; font-weight: 400; }
.doc-item:hover { background: var(--accent-soft); filter: none; }
.doc-item.active { border-color: var(--accent); background: var(--accent-soft); }
.di-name { font-size: 13px; font-weight: 600; word-break: break-all; }
.di-meta { font-size: 10px; color: var(--sub); }
.doc-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s); }
.doc-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius-s); }
.doc-text { white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 12px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .7rem; max-height: 70vh; overflow: auto; }

/* SoA motivering: compacte textarea i.p.v. krappe input */
.soa-just { min-height: 38px; font-size: 12.5px; line-height: 1.4; }

/* Klikbare gebruikersnaam → profiel */
.who-link { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: inherit; }
.who-link:hover .who { color: var(--accent); }

/* Profiel: meerdere certificaten */
.cert-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.cert-row .cert-input { flex: 1; }
.cert-row .cert-del { flex: 0 0 auto; padding: .4rem .6rem; }

/* 2FA recovery-codes grid */
.rc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem .9rem; font-size: 13px; margin-top: .4rem; }
.rc-grid span { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .35rem .55rem; text-align: center; }

/* ---------- Info-tooltip ("i") ---------- */
.info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; font-style: normal;
  cursor: help; position: relative; vertical-align: middle; margin-left: .4rem;
  text-transform: none; letter-spacing: 0;
}
.info:hover, .info:focus { background: var(--accent); color: #fff; outline: none; }
.info::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 300px; white-space: normal; text-align: left;
  background: var(--accent-ink); color: #fff; font-family: var(--font-ui); font-weight: 400;
  font-size: 12px; line-height: 1.45; letter-spacing: 0; padding: .5rem .65rem;
  border-radius: var(--radius-s); box-shadow: 0 6px 24px rgba(21,32,43,.22);
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 50; pointer-events: none;
}
.info::before {
  content: ""; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: var(--accent-ink);
  opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 51;
}
.info:hover::after, .info:focus::after, .info:hover::before, .info:focus::before { opacity: 1; visibility: visible; }
/* Tooltips bij rechtse panelen niet buiten beeld laten lopen */
.info.right::after { left: auto; right: 0; transform: none; }
.info.right::before { left: auto; right: 6px; transform: none; }
/* info-chip leesbaar op de donkere key-KPI-kaart */
.kpi.key .info { background: rgba(255,255,255,.22); color: #fff; }
.kpi.key .info:hover, .kpi.key .info:focus { background: rgba(255,255,255,.4); }

/* Sector-beheer chips */
.sector-chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent-soft); color: var(--accent-ink); border-radius: 99px; padding: 4px 6px 4px 11px; font-size: 12.5px; }
.sector-chip .chip-del { background: none; border: 0; color: var(--accent-ink); cursor: pointer; font-size: 11px; padding: 0 4px; border-radius: 99px; opacity: .6; }
.sector-chip .chip-del:hover { opacity: 1; filter: none; background: rgba(0,0,0,.06); }

/* Verplichte 2FA-inschrijving: iets breder dan de login-kaart (QR + recovery-codes) */
.login-card.force2fa { width: 420px; }
