:root {
  --bg: #0c0c0d;
  --side: #0f1011;
  --panel: #141516;
  --panel-2: #191a1c;
  --panel-3: #212225;
  --line: #2b2d30;
  --line-soft: #222427;
  --text: #f1f1ef;
  --text-2: #b7b9bc;
  --muted: #7d8085;
  --green: #3fb950;
  --green-ink: #5fd472;
  --green-bg: rgba(63, 185, 80, .12);
  --green-line: rgba(63, 185, 80, .35);
  --red: #e5534b;
  --red-ink: #ff7b72;
  --red-bg: rgba(229, 83, 75, .12);
  --red-line: rgba(229, 83, 75, .38);
  --amber: #e8a23a;
  --amber-ink: #f0b45a;
  --violet: #8b7cf6;
  --neutral-bar: #5a5f66;
  --radius: 14px;
  --radius-s: 9px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .metric .value, td.n, th.n { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.soft { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.eyebrow { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pos { color: var(--green-ink); }
.neg { color: var(--red-ink); }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line-soft); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; text-decoration: none; }
.brand img { width: 20px; height: 20px; opacity: .92; }
.brand .word { font-size: 13px; letter-spacing: .32em; font-weight: 500; }
.brand .sub { font-size: 9px; letter-spacing: .3em; color: var(--muted); display: block; margin-top: 1px; }
.nav-group { margin: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--text-2); font-size: 13px; position: relative; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--panel-3); color: var(--text); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--green); }
.nav .idx { font-family: var(--mono); font-size: 10.5px; color: var(--muted); width: 16px; }
.nav .ico { width: 16px; height: 16px; opacity: .75; flex: none; }
.nav .badge { margin-left: auto; font-size: 10.5px; min-width: 18px; text-align: center; padding: 0 5px; border-radius: 9px; background: var(--red-bg); color: var(--red-ink); border: 1px solid var(--red-line); }
.side-foot { margin-top: auto; padding-top: 14px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: rgba(10, 11, 11, .9); backdrop-filter: blur(8px); z-index: 20; }
.crumbs { font-size: 12.5px; color: var(--muted); }
.crumbs b { color: var(--text-2); font-weight: 400; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .lead { color: var(--text-2); margin-top: 4px; font-size: 13px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); background: var(--panel); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pill.ok { border-color: var(--green-line); color: var(--green-ink); background: var(--green-bg); }
.pill.ok .dot { background: var(--green); }
.pill.bad { border-color: var(--red-line); color: var(--red-ink); background: var(--red-bg); }
.pill.bad .dot { background: var(--red); }
.pill.warn { color: var(--amber-ink); border-color: rgba(201, 180, 138, .3); }
.pill.warn .dot { background: var(--amber-ink); }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.panel-pad { padding: 18px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { font-size: 14px; }
.panel-body { padding: 14px 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.metric { padding: 15px 16px 14px; min-width: 0; border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: 0; }
.metric .label { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .value { font-size: 23px; font-weight: 450; letter-spacing: -.02em; margin: 6px 0 4px; white-space: nowrap; }
.metric .value.unknown { color: var(--muted); font-size: 18px; }
.metric .meta { font-size: 11px; color: var(--muted); line-height: 1.45; }
.metric .delta { font-size: 11px; }

/* ---------- period bar ---------- */
.periodbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 5px; color: var(--text-2); font-size: 12px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--panel-3); color: var(--text); }
.seg button:hover { color: var(--text); }
.source-line { font-size: 11.5px; color: var(--muted); margin: 8px 0 14px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.notice { border: 1px solid var(--line); border-left: 2px solid var(--amber-ink); background: var(--panel); padding: 9px 14px; border-radius: var(--radius-s); font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.notice.red { border-left-color: var(--red); }
.notice.green { border-left-color: var(--green); }
.notice ul { margin: 2px 0 0; padding-left: 16px; }

/* ---------- forms ---------- */
input[type=text], input[type=number], input[type=date], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 7px 10px; font-size: 13px; outline: none; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: #3a4a42; box-shadow: 0 0 0 3px rgba(79, 143, 108, .12); }
textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
label.f, div.f { display: block; font-size: 11.5px; color: var(--text-2); }
label.f > span, div.f > span { display: block; margin-bottom: 4px; }
label.f + label.f { margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius-s); padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--text); white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #333a3f; background: var(--panel-3); }
.btn.primary { background: #20382c; border-color: #2f5a44; color: #d8eadf; }
.btn.primary:hover { background: #254233; }
.btn.danger { color: var(--red-ink); border-color: var(--red-line); background: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { padding: 3px 8px; font-size: 11.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--green); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-weight: 400; color: var(--muted); font-size: 11px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
td.n, th.n { text-align: right; white-space: nowrap; }
tr.total td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 500; color: var(--text); }
tr:hover td { background: rgba(255, 255, 255, .012); }
td .cell-input { width: 92px; text-align: right; padding: 4px 8px; font-size: 12.5px; }
td .unk { color: var(--muted); font-style: italic; }

/* ---------- chart ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; }
.chart .axis text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart .grid line { stroke: var(--line-soft); }
.chart .zero { stroke: #3a3f44; }
.tip { position: absolute; pointer-events: none; background: #0e1011; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; font-size: 11.5px; min-width: 170px; z-index: 5; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.tip .t { color: var(--text); margin-bottom: 4px; }
.tip .r { display: flex; justify-content: space-between; gap: 14px; color: var(--text-2); }
.tip .r b { font-weight: 400; color: var(--text); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.split-bars .item + .item { margin-top: 13px; }
.split-bars .top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.split-bars .top b { font-weight: 400; color: var(--text); }
.bar { height: 5px; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; }

/* ---------- lists / cards ---------- */
.list > .li { padding: 11px 18px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: flex-start; }
.list > .li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .title { font-size: 13px; }
.li .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kchip { font-size: 10.5px; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.kchip.red { color: var(--red-ink); border-color: var(--red-line); }
.kchip.green { color: var(--green-ink); border-color: var(--green-line); }
.kchip.amber { color: var(--amber-ink); border-color: rgba(201, 180, 138, .3); }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 13px 15px; }
.card + .card { margin-top: 10px; }
.card .card-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.card .card-title { font-size: 13.5px; }
.card .card-text { font-size: 12.5px; color: var(--text-2); margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.card .card-meta { font-size: 11px; color: var(--muted); margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.card.conflict { border-color: var(--red-line); }
.card.dim { opacity: .55; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.col { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); min-height: 160px; }
.col-head { padding: 11px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.col-body { padding: 10px; }
.col-body .card { background: var(--panel-2); padding: 10px 12px; }
.col.drop { border-color: var(--green-line); }

/* ---------- chief ---------- */
.chief-wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.chief-card { padding: 22px 20px; position: sticky; top: 72px; }
.orb { width: 92px; height: 92px; margin: 4px auto 14px; position: relative; }
.orb svg { width: 100%; height: 100%; }
.chief-card h2 { text-align: center; font-size: 17px; }
.chief-card .sub { text-align: center; color: var(--text-2); font-size: 12.5px; margin: 6px 0 16px; }
.chief-card .rule { display: flex; gap: 8px; font-size: 12px; color: var(--text-2); padding: 7px 0; border-top: 1px solid var(--line-soft); }
.chief-card .rule .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--green); }
.chief-card .rule .dot.r { background: var(--red); }
.thread { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 520px; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; }
.msg.user { align-self: flex-end; }
.msg .who { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.msg.user .who { text-align: right; }
.msg .bubble { border: 1px solid var(--line-soft); background: var(--panel-2); border-radius: var(--radius); padding: 11px 14px; font-size: 13px; }
.msg.user .bubble { background: var(--panel-3); }
.msg.chief .bubble { background: linear-gradient(180deg, rgba(63, 120, 90, .06), transparent 60%), var(--panel-2); border-color: #1f2a25; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul { margin: 4px 0 8px; padding-left: 18px; }
.msg .foot { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
details.src { margin-top: 8px; font-size: 12px; }
details.src summary { cursor: pointer; color: var(--text-2); list-style: none; }
details.src summary::-webkit-details-marker { display: none; }
details.src summary::before { content: "▸ "; color: var(--muted); }
details.src[open] summary::before { content: "▾ "; }
.src-item { border-left: 2px solid var(--line); padding: 6px 10px; margin: 8px 0 0; }
.src-item .st { color: var(--text); }
.src-item .sc { color: var(--text-2); white-space: pre-wrap; margin-top: 3px; max-height: 160px; overflow: auto; }
.composer { border-top: 1px solid var(--line-soft); padding: 12px 14px; display: grid; gap: 8px; }
.composer textarea { min-height: 54px; max-height: 200px; }
.typing { color: var(--muted); font-size: 12px; }

/* ---------- misc ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 12px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font-size: 13px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--green); }
.doc { white-space: pre-wrap; font-size: 12.5px; color: var(--text-2); line-height: 1.6; max-height: 520px; overflow: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.toast { position: fixed; bottom: 18px; right: 18px; background: var(--panel-3); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 14px; font-size: 12.5px; z-index: 60; max-width: 360px; }
.toast.err { border-color: var(--red-line); color: var(--red-ink); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .box { width: 360px; max-width: 100%; padding: 30px 28px; }
.login img { width: 28px; display: block; margin: 0 auto 14px; }
.img-prev { max-width: 100%; max-height: 260px; border-radius: var(--radius-s); border: 1px solid var(--line); display: block; margin-top: 8px; }
.sticky-col { position: sticky; top: 72px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .metric .value { font-size: 20px; }
  .g-main { grid-template-columns: 1fr; }
  .chief-wrap { grid-template-columns: 1fr; }
  .chief-card { position: static; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .7); }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .content { padding: 18px 16px 50px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { border-bottom: 1px solid var(--line-soft); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .metric .value { font-size: 21px; }
  .g2, .g3, .form-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .thread { height: calc(100vh - 120px); }
  .msg { max-width: 96%; }
  .sticky-col { position: static; }
  .hide-m { display: none; }
}

/* ================= 187N-geïnspireerde laag ================= */
html, body { font-size: 14.5px; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.page-head { margin-bottom: 20px; }
.page-crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.page-crumb b { color: var(--text-2); font-weight: 400; }
.panel, .metrics, .card, .col { border-color: var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.metric { padding: 20px 22px 18px; }
.metric .label { font-size: 13px; }
.metric .value { font-size: 30px; font-weight: 600; margin: 8px 0 6px; }
.metric .meta { font-size: 12px; }
.btn.primary { background: #2c6b37; border-color: #378544; color: #fff; }
.btn.primary:hover { background: #33793f; }
.pill.warn { color: var(--amber-ink); border-color: rgba(232, 162, 58, .35); background: rgba(232, 162, 58, .08); }
.pill.warn .dot { background: var(--amber); }
.kchip.amber { color: var(--amber-ink); border-color: rgba(232, 162, 58, .35); }
.notice { border-left-color: var(--amber); border-radius: var(--radius-s); }
.nav a { font-size: 14px; padding: 8px 12px; }
.nav a.active { background: var(--panel-3); }
.nav a.active::before { background: var(--amber); left: -12px; top: 9px; bottom: 9px; width: 3px; }
.nav .ico { width: 18px; height: 18px; }
.ws { margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; background: var(--panel); }
.ws small { color: var(--muted); display: block; font-size: 11px; }
.search { position: relative; margin-bottom: 10px; }
.search input { padding-left: 32px; padding-right: 38px; background: var(--panel); border-radius: 10px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--muted); }
.search kbd { position: absolute; right: 8px; top: 7px; font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.brand { padding: 6px 10px 16px; }
.brand img { width: 30px; height: 30px; }
.brand .word { font-size: 15px; letter-spacing: .28em; font-weight: 600; }
.brand .sub { font-size: 10px; letter-spacing: .26em; }
.topbar { height: 58px; }
.loaded { font-size: 13px; color: var(--muted); }
/* hero + KPI-kaarten */
.hero-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 30px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-height: 182px; display: flex; flex-direction: column; min-width: 0; }
.kpi .k-label { font-size: 13.5px; color: var(--text-2); }
.kpi .k-value { font-size: 30px; font-weight: 600; margin: 6px 0 10px; letter-spacing: -.02em; white-space: nowrap; }
.kpi .k-value small { font-size: 14px; font-weight: 400; color: var(--text-2); margin-left: 4px; }
.kpi.hero { background: radial-gradient(120% 90% at 0% 0%, rgba(63, 185, 80, .07), transparent 60%), var(--panel); }
.kpi.hero img { width: 54px; height: 54px; opacity: .95; }
.kpi.hero .h-mono { font: 11.5px var(--mono); letter-spacing: .18em; color: var(--muted); margin-top: auto; }
.kpi.hero .h-status { font-size: 16px; font-weight: 600; margin-top: 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dot-s { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot-s.g { background: var(--green); } .dot-s.a { background: var(--amber); } .dot-s.r { background: var(--red); }
.segbar { display: flex; gap: 3px; height: 8px; margin: 2px 0 12px; }
.segbar span { border-radius: 4px; min-width: 6px; }
.leg { font-size: 12.5px; color: var(--text-2); display: grid; gap: 5px; }
.leg div { display: flex; align-items: center; gap: 8px; }
.leg i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.leg b { color: var(--text); font-weight: 600; margin-left: 2px; }
.ring-wrap { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.ring-wrap .big { font-size: 30px; font-weight: 600; }
.spark { margin-top: auto; }
/* Wat vraagt jou */
.section-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 4px; }
.section-title { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.needs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.need { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 14px; display: flex; flex-direction: column; min-height: 196px; }
.need .n-head { display: flex; align-items: center; gap: 9px; }
.need .n-head .t { font-size: 15px; font-weight: 600; flex: 1; }
.need .n-head .c { font-size: 15px; font-weight: 600; white-space: nowrap; }
.need .n-head .c b { font-size: 22px; margin-right: 5px; }
.need .n-body { margin-top: 12px; flex: 1; font-size: 13.5px; }
.need .n-line + .n-line { margin-top: 9px; }
.need .n-line .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.need .n-empty { color: var(--text-2); }
.need .n-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-size: 13.5px; color: var(--text-2); }
.need .n-foot a { text-decoration: none; color: var(--text-2); }
.need .n-foot a:hover { color: var(--text); }
@media (max-width: 1280px) { .hero-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpi.hero { grid-column: span 1; } }
@media (max-width: 900px) {
  .hero-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi.hero { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
  .kpi.hero .h-mono { margin-top: 0; }
  .kpi { min-height: 150px; padding: 16px; }
  .kpi .k-value, .ring-wrap .big { font-size: 24px; }
  .needs { grid-template-columns: 1fr; }
  .metric .value { font-size: 23px; }
  h1 { font-size: 25px; }
  .loaded { display: none; }
}
.kpi.hero .h-text { margin-top: auto; }
.kpi.hero .h-mono { margin-top: 0; white-space: nowrap; }
.kpi.hero .h-status { font-size: 17px; }
@media (max-width: 900px) { .kpi.hero .h-text { margin-top: 0; } .kpi.hero img { width: 40px; height: 40px; } }
@media (max-width: 900px) {
  .topbar .crumbs { display: none; }
  .topbar .pill { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  .leg { grid-template-columns: 1fr !important; }
  .need .n-head .c b { font-size: 18px; }
  .source-line { font-size: 11px; }
  .content { overflow-x: hidden; }
}
@media (max-width: 900px) { .list > .li { flex-wrap: wrap; } .list > .li .check { min-width: 0 !important; } }
@media (max-width: 900px) { .metric .label { white-space: normal; overflow: visible; } .metric .value { white-space: normal; } }
.keygroup { border-top: 1px solid var(--line-soft); padding: 10px 0 2px; }
.keygroup summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
code { font: 12px var(--mono); background: var(--panel-3); padding: 1px 6px; border-radius: 5px; word-break: break-all; }
/* Legenda in KPI-kaarten: getallen rechts uitgelijnd per kolom, vaste ruimte tussen kolommen */
.leg { column-gap: 20px; row-gap: 6px; }
.leg div { min-width: 0; white-space: nowrap; }
.leg b { margin-left: auto; padding-left: 8px; font-variant-numeric: tabular-nums; }

/* Legenda-cijfers rechts uitlijnen binnen de kaart; labels krimpen in plaats van uit de kader te lopen. */
.kpi .leg div { min-width: 0; }

/* Second brain: inspreken en afbeeldingen */
.f-head { justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: nowrap; }
.f-head > span:first-child { margin: 0; }
.dictate .btn { font-size: 11.5px; }
.dictate { gap: 8px; align-items: center; flex-wrap: wrap; }
.dictate-note { max-width: 100%; }
.btn.rec { color: var(--red); border-color: var(--red); }
.paste-zone { border: 1px dashed var(--line, #333); border-radius: 10px; padding: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); cursor: pointer; outline: none; }
.paste-zone:focus, .paste-zone.over { border-color: var(--violet); color: var(--text); background: rgba(139, 124, 246, .06); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line, #333); }
.thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.thumb-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 20px; padding: 0; }
.full-img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 8px; }
/* Smal venster (o.a. Dock-app): formulier bovenaan, niet onder de hele lijst */
@media (max-width: 1180px) { .brain-form { order: -1; } }
/* Stand van zaken (project 09) */
.stand { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 6px 0 12px; background: var(--panel-2, rgba(255,255,255,.02)); }
.stand.ok { border-color: var(--green); }
.stand-title { font-weight: 600; margin-bottom: 8px; }
.stand.ok .stand-title { color: var(--green); }
.stand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
.stand-grid b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stand-grid span { font-size: 11.5px; color: var(--text-2); }
@media (max-width: 700px) { .stand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.redraft .li.pick { align-items: flex-start; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 8px; padding: 10px; margin-bottom: 6px; }
.redraft .li.pick:hover { border-color: rgba(55,133,68,.6); }
.redraft .li.on { outline: 2px solid #378544; outline-offset: -2px; border-radius: 8px; background: rgba(55,133,68,.08); }

/* opdrachten */
.cmd-text{width:100%;min-height:120px;font-size:15px;line-height:1.45}
.li.opd{align-items:flex-start}
.li.opd .title{white-space:normal}
.draft-pre{white-space:pre-wrap;font:inherit;font-size:13px;background:var(--bg-2,rgba(255,255,255,.03));padding:10px;border-radius:8px;margin-top:6px}
.kb-details[open] > summary{border-bottom:1px solid var(--line,rgba(255,255,255,.08))}
