/* Yexa-huisstijl (zelfde tokens als yexa.be). Lettertypes staan op deze server. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("fonts/geist-300-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap; src: url("fonts/archivo-400-900-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/jetbrains-mono-400-latin.woff2") format("woff2"); }

:root {
  --ink: #0f1c19;
  --ink-2: #2a3b37;
  --muted: #5b6b67;
  --line: #d5e2dd;
  --bg: #eaf5f1;
  --surface: #ffffff;
  --accent: #0f1c19;
  --accent-ink: #ffffff;
  --accent-soft: #d3f1ea;
  --link: #077366;
  --mint: #1fd6c2;
  --warn: #9a3412;
  --ok: #077366;
  --radius: 8px;
  --font: "Geist", "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", "Arial Black", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0; }
h1 { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; margin: 32px 0 8px; }
p { margin: 0 0 8px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 48px; padding-bottom: 128px; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 64ch; margin-top: 12px; }
.muted { color: var(--muted); }
.tr { color: var(--muted); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Kop */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink-2); }
.brand img { display: block; height: 30px; width: auto; }
.brand-client { font-size: 14px; font-weight: 550; padding-left: 12px; border-left: 1px solid var(--line); line-height: 24px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-weight: 550; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.logout { color: var(--muted); font-size: 14px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lang button { font: inherit; font-size: 14px; font-weight: 650; border: 0; background: var(--surface); color: var(--ink-2); padding: 8px 14px; cursor: pointer; min-height: 40px; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 650; font-size: 15px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 10px 22px; min-height: 44px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.12); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--accent-soft); filter: none; }
.link { font: inherit; background: none; border: 0; padding: 4px 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Login */
.is-login main.wrap { max-width: 480px; }
.login h1 { margin-bottom: 4px; }
.login-form { margin-top: 32px; display: grid; gap: 8px; }
.login-form label { font-weight: 650; }
.login-form button { margin-top: 16px; justify-self: start; }
.error { color: var(--warn); font-weight: 600; margin-top: 8px; }

/* Formuliervelden */
input[type="text"], input[type="password"], textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid #cfc9c1; border-radius: var(--radius);
  padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
input.short { max-width: 200px; }

/* Rijen met haarlijnen (overzicht en antwoorden) */
.rows { border-top: 1px solid var(--line); margin-top: 24px; }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 32px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.row-k { font-weight: 650; }
.row-v p:last-child { margin-bottom: 0; }
.code { font-family: var(--mono); font-size: 17px; letter-spacing: 0.08em; background: var(--surface); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.share { margin-bottom: 64px; }

/* Analyse-document */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 48px clamp(16px, 5vw, 64px); }
.doc h1 { font-size: 30px; margin-bottom: 16px; }
.doc h2 { font-size: 22px; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.doc h3 { margin-top: 24px; }
.doc p, .doc li { max-width: 75ch; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 16px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--bg); padding: 1px 5px; border-radius: 4px; }

/* Bestanden */
.group { margin-top: 40px; }
.group h2 { font-size: 15px; color: var(--ink-2); font-weight: 650; margin-bottom: 8px; word-break: break-word; }
.table { border-top: 1px solid var(--line); }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 100px 90px; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tname { font-weight: 550; word-break: break-word; }
.tnum, .tdate { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; }
.tdl { font-size: 14px; text-align: right; }

/* Antwoorden */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sub { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.sub summary { cursor: pointer; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; list-style: none; }
.sub summary::-webkit-details-marker { display: none; }
.sub summary::after { content: "+"; margin-left: auto; font-weight: 600; color: var(--muted); }
.sub[open] summary::after { content: "−"; }
.sub-name { font-weight: 700; font-size: 18px; }
.sub-meta { color: var(--muted); font-size: 14px; }
.sub > h3, .sub > .rows { margin-left: 24px; margin-right: 24px; }
.sub > .rows:last-child { margin-bottom: 24px; }

/* Vragenlijst */
.intro { margin-bottom: 40px; }
.qsec { margin-top: 56px; }
.qsec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.qsec-head .for { margin: 0; color: var(--muted); font-size: 14px; }
.qrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.qlabel { font-weight: 600; margin: 0; padding-top: 10px; }
.qinput { display: grid; gap: 10px; align-content: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; pointer-events: none; }
.chip label {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  background: var(--surface); border: 1px solid #cfc9c1; border-radius: 999px;
  cursor: pointer; font-size: 15px; user-select: none;
}
.chip label:hover { border-color: var(--accent); }
.chip input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { min-height: 44px; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.hint.is-warn { color: var(--warn); font-weight: 600; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.other { max-width: 360px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.files:empty { display: none; }
.files li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.files .fname { word-break: break-word; }
.files .link { margin-left: auto; font-size: 14px; }
.thanks { margin-top: 40px; padding: 16px 20px; background: #e8f1e9; color: var(--ok); border-radius: var(--radius); font-weight: 600; }
.resume { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; max-width: 720px; }
.resume h2 { font-size: 17px; }
.resume-row { display: flex; gap: 8px; }
.resume-row input { font-size: 14px; color: var(--ink-2); }
.resume .link { justify-self: start; font-size: 14px; margin-top: 8px; }

/* Vaste balk onderaan */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(29, 29, 27, 0.06); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.bar-in { display: flex; align-items: center; gap: 8px 24px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.bar-count { font-weight: 650; font-variant-numeric: tabular-nums; }
.bar-status { color: var(--muted); font-size: 14px; }
.bar-status.is-error { color: var(--warn); font-weight: 600; }
.bar .btn { margin-left: auto; }

@media (max-width: 760px) {
  main.wrap { padding-top: 32px; }
  .top-in { gap: 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 26px; }
  .nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
  .row, .qrow { grid-template-columns: 1fr; gap: 8px; }
  .qlabel { padding-top: 0; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .tdate { display: none; }
  .tdl { grid-column: 2; }
  .tnum { grid-row: 1; grid-column: 2; }
  .tdl { grid-row: 2; }
  .bar-in { gap: 4px 12px; }
  .bar-status { order: 3; width: 100%; }
  .bar .btn { padding: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- Dashboard ---------- */
.small { font-size: 14px; }
.d-intro { margin-bottom: 32px; }
.d-intro .lead { max-width: 80ch; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.kpi-label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -0.01em; margin: 8px 0 4px; line-height: 1.1; }
.kpi-sub { color: var(--muted); font-size: 13px; line-height: 1.4; }
.dsec { margin-top: 64px; }
.dsec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.dsec-head h2 { font-size: 24px; }
.dsec-head p { margin: 0; font-size: 14px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; margin-top: 16px; min-width: 0; }
.dcard h3 { margin: 0 0 16px; font-size: 17px; }
.dcard.sim { background: #fbf8f7; border-color: #ecdcd9; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.legend { display: flex; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.key:first-child { margin-left: 0; }
.c-blue { background: #2a78d6; }
.c-orange { background: #eb6834; }
.c-aqua { background: #1baf7a; }
.chart-box { margin-top: 8px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tick { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .grid { stroke: #ece8e2; stroke-width: 1; }
.chart .base { stroke: #c3c2b7; stroke-width: 1; }
.chart .dlabel { fill: var(--ink-2); font-size: 12px; font-family: var(--font); }
.chart .dlabel.strong { fill: var(--ink); font-weight: 650; font-size: 13px; }
.chart .xhair { stroke: #b9b4ad; stroke-width: 1; }
.chart path[data-tip]:hover, .chart path[data-tip]:focus-visible { opacity: 0.8; outline: none; }
.only-mob { display: none; }
.hbars { display: grid; gap: 10px; }
.hb-row { display: grid; grid-template-columns: minmax(120px, 32%) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.hb-label { font-size: 14px; line-height: 1.3; }
.hb-label span { display: block; color: var(--muted); font-size: 12px; }
.hb-track { height: 16px; display: flex; gap: 2px; }
.hb-bar { height: 16px; width: 0; border-radius: 0 4px 4px 0; cursor: default; }
.hb-track.stack .hb-bar:not(:last-child) { border-radius: 0; }
.hb-bar:hover, .hb-bar:focus-visible { opacity: 0.8; }
.hb-val { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-weight: 600; }
.as-table { margin-top: 16px; }
.as-table summary { cursor: pointer; color: var(--link); font-size: 14px; font-weight: 600; }
.dtable-wrap { overflow-x: auto; margin-top: 8px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th { text-align: left; font-weight: 650; color: var(--ink-2); padding: 8px 12px 8px 0; border-bottom: 1px solid #cfc9c1; white-space: nowrap; }
.dtable td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.mini-kpis > div { display: grid; gap: 2px; }
.mk-v { font-size: 26px; font-weight: 750; line-height: 1.1; }
.mk-l { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.facts { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip-good { background: #e7f4e7; color: #1d6b1d; }
.chip-warning { background: #fdf1d6; color: #7a5300; }
.chip-serious { background: #fde9df; color: #8a3a12; }
.chip-critical { background: #fbe4e4; color: #9b2323; }
.tag { display: inline-block; padding: 1px 6px; margin: 0 4px 4px 0; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; background: var(--surface); }
.pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pipe { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; display: grid; gap: 2px; }
.pipe-n { font-size: 30px; font-weight: 750; line-height: 1.1; }
.pipe-l { font-weight: 650; }
.pipe-s { color: var(--muted); font-size: 13px; }
.week + .week { margin-top: 16px; }
.week h4 { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.dlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dlist li { display: grid; grid-template-columns: 52px 96px minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dl-date { font-variant-numeric: tabular-nums; font-weight: 600; }
.dl-sup { color: var(--ink-2); }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 6px; max-width: 280px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 16px; }
  .kpi-value { font-size: 22px; }
  .dgrid, .pipeline { grid-template-columns: 1fr; }
  .dcard { padding: 16px; }
  .only-desk { display: none; }
  .only-mob { display: block; }
  .hb-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hb-track { grid-column: 1 / -1; grid-row: 2; }
  .dlist li { grid-template-columns: 48px minmax(0, 1fr); }
  .dl-klant { grid-column: 2; }
}

.hbars + p { margin-top: 12px; }

.hello { font-size: 20px; font-weight: 650; margin: 0 0 8px; color: var(--link); }
.locked-person { margin: 0; padding-top: 10px; font-weight: 600; }
.c-gray { background: #b4b0a8; }
