/* Projectopvolging — sober, Horizon-achtig: neutrale grijzen, één accentblauw, systeemlettertype. */

:root {
  color-scheme: light;
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #eef0f2;
  --text: #1d2d3e;
  --text-muted: #556b82;
  --border: #d9dee3;
  --border-strong: #a9b4be;
  --accent: #0064d9;
  --accent-hover: #0050b0;
  --accent-contrast: #ffffff;
  --accent-soft: #e8f1fd;
  --kop-bg: #ffffff;

  --ok: #256f3a;      --ok-soft: #e6f4ea;
  --warn: #8d5100;    --warn-soft: #fff3e0;
  --err: #aa0808;     --err-soft: #ffeaea;
  --info: #0057b8;    --info-soft: #e5f0fc;
  --neutraal: #475e75; --neutraal-soft: #eaecee;

  --radius: 8px;
  --radius-s: 4px;
  --schaduw: 0 1px 2px rgba(29, 45, 62, .08), 0 1px 6px rgba(29, 45, 62, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "72", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12181f;
  --surface: #1b232c;
  --surface-2: #232d38;
  --text: #e6ebf0;
  --text-muted: #9aabbc;
  --border: #33404d;
  --border-strong: #4c5c6c;
  --accent: #4da3ff;
  --accent-hover: #7ab9ff;
  --accent-contrast: #0b1520;
  --accent-soft: #19304a;
  --kop-bg: #161d25;

  --ok: #6fcf8a;      --ok-soft: #173424;
  --warn: #f5b35c;    --warn-soft: #3a2a12;
  --err: #ff8a85;     --err-soft: #44191b;
  --info: #7fbcff;    --info-soft: #172d47;
  --neutraal: #b3c0cc; --neutraal-soft: #2a3440;
  --schaduw: 0 1px 2px rgba(0, 0, 0, .4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12181f;
    --surface: #1b232c;
    --surface-2: #232d38;
    --text: #e6ebf0;
    --text-muted: #9aabbc;
    --border: #33404d;
    --border-strong: #4c5c6c;
    --accent: #4da3ff;
    --accent-hover: #7ab9ff;
    --accent-contrast: #0b1520;
    --accent-soft: #19304a;
    --kop-bg: #161d25;

    --ok: #6fcf8a;      --ok-soft: #173424;
    --warn: #f5b35c;    --warn-soft: #3a2a12;
    --err: #ff8a85;     --err-soft: #44191b;
    --info: #7fbcff;    --info-soft: #172d47;
    --neutraal: #b3c0cc; --neutraal-soft: #2a3440;
    --schaduw: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

/* ---------- basis ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: var(--radius-s); overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
p { margin: 0 0 .75em; }
ul, ol { margin: 0 0 .75em; padding-left: 1.4em; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.inhoud, #app {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ---------- kop ---------- */

.kop { background: var(--kop-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.kop-binnen {
  max-width: 1240px; margin: 0 auto; padding: 8px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
}
.merk { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.merk:hover { text-decoration: none; }
.merk-prefix {
  background: var(--accent); color: var(--accent-contrast); font-weight: 700; font-size: .8rem;
  border-radius: var(--radius-s); padding: 4px 7px; letter-spacing: .03em;
}
.merk-tekst { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.merk-naam { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merk-klant { font-size: .8rem; color: var(--text-muted); }
.kop-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.kop-nav a { color: var(--text-muted); padding: 6px 10px; border-radius: var(--radius-s); font-weight: 500; }
.kop-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.kop-nav a.is-actief { color: var(--accent); background: var(--accent-soft); }
.kop-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--text-muted); min-width: 0; }
.gebruiker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.rol { display: inline-block; font-size: .72rem; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.thema-knop {
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 50%;
  width: 32px; height: 32px; font-size: 1rem; cursor: pointer; flex: none;
}
.thema-knop:hover { background: var(--surface-2); }

.voet { border-top: 1px solid var(--border); color: var(--text-muted); font-size: .8rem; }
.voet-binnen { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: space-between; }

/* ---------- algemene componenten ---------- */

.paneel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--schaduw); margin-bottom: 16px; }
.fout-paneel { max-width: 640px; margin: 40px auto; }
.laden, .leeg { color: var(--text-muted); padding: 24px 0; text-align: center; }
.fout { color: var(--err); }
.hulp { color: var(--text-muted); font-size: .9rem; }
.pagina-titel { margin-bottom: 16px; }
.teller { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 10px; background: var(--surface-2); color: var(--text-muted); font-size: .78rem; font-weight: 600; text-align: center; vertical-align: middle; }

.knop {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--accent); color: var(--accent-contrast); border: 1px solid var(--accent);
  border-radius: var(--radius-s); padding: 7px 14px; font: inherit; font-weight: 500;
}
.knop:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.knop:disabled { opacity: .6; cursor: default; }
.knop-licht { background: transparent; color: var(--accent); border-color: var(--border-strong); }
.knop-licht:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.badge {
  display: inline-block; font-size: .74rem; font-weight: 600; line-height: 1.5;
  padding: 1px 8px; border-radius: 10px; white-space: nowrap; border: 1px solid transparent;
}
.toon-ok { background: var(--ok-soft); color: var(--ok); }
.toon-warn { background: var(--warn-soft); color: var(--warn); }
.toon-err { background: var(--err-soft); color: var(--err); }
.toon-info { background: var(--info-soft); color: var(--info); }
.toon-accent { background: var(--accent); color: var(--accent-contrast); }
.toon-neutraal { background: var(--neutraal-soft); color: var(--neutraal); }
.toon-omlijnd { background: transparent; color: var(--text-muted); border-color: var(--border-strong); }
.badge.type-bug { color: var(--err); border-color: currentColor; }
.chip { display: inline-block; font-size: .76rem; padding: 1px 8px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.issue-code { font-family: var(--mono); font-weight: 600; font-size: .85rem; color: var(--text-muted); }
.meta-regel { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--text-muted); font-size: .8rem; }

/* ---------- lijst ---------- */

.tegels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px; margin-bottom: 10px; }
.tegels-status { grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 8px; margin-bottom: 16px; }
.tegel {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--schaduw);
}
.tegel:hover { text-decoration: none; border-color: var(--accent); }
.tegel.is-actief { outline: 2px solid var(--accent); outline-offset: -1px; }
.tegels-status .tegel { padding: 8px 12px; }
.tegel-getal { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.tegels-status .tegel-getal { font-size: 1.15rem; }
.tegel-label { font-size: .8rem; color: var(--text-muted); }
.toon-rand-ok { border-left-color: var(--ok); }
.toon-rand-warn { border-left-color: var(--warn); }
.toon-rand-err { border-left-color: var(--err); }
.toon-rand-info { border-left-color: var(--info); }
.toon-rand-accent { border-left-color: var(--accent); }
.toon-rand-neutraal { border-left-color: var(--neutraal); }

.filterbalk {
  display: grid; gap: 10px; align-items: end;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
}
.filter-veld { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--text-muted); min-width: 0; }
.filter-zoek { grid-column: 1 / -1; }
@media (min-width: 900px) { .filter-zoek { grid-column: span 2; } }
input, select, textarea {
  font: inherit; font-size: .92rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-s); padding: 6px 8px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 1px solid var(--accent); }
.filter-reset { justify-content: center; }
.resultaat-telling { color: var(--text-muted); font-size: .85rem; margin: 4px 0 8px; }

.kaart-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.kaart {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--schaduw); display: flex; flex-direction: column; min-width: 0;
}
.kaart:hover { border-color: var(--accent); }
.kaart.is-opgelost { opacity: .78; }
.kaart-link { display: flex; flex-direction: column; gap: 8px; padding: 14px; color: var(--text); flex: 1; }
.kaart-link:hover { text-decoration: none; }
.kaart-kop { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kaart-titel { font-size: 1rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0; overflow-wrap: anywhere; }
.kaart-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.kaart-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .78rem; color: var(--text-muted); margin-top: auto; }
.kaart-actie { position: absolute; right: 10px; bottom: 10px; font-size: .78rem; padding: 2px 8px; border-radius: var(--radius-s); background: var(--surface); }
.kaart-actie:hover { background: var(--accent-soft); text-decoration: none; }
.kaart-link .kaart-meta { padding-right: 70px; }

/* ---------- detail ---------- */

.detail { max-width: 920px; margin: 0 auto; }
.detail-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: .9rem; }
.detail-buren { display: flex; gap: 14px; }
.detail-kop { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--schaduw); margin-bottom: 16px; }
.detail-kop h1 { overflow-wrap: anywhere; margin-top: 6px; }
.detail-code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kenmerken { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 10px 16px; margin: 12px 0; }
.kenmerken dt { font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.kenmerken dd { margin: 2px 0 0; font-weight: 500; }

.sectie { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--schaduw); min-width: 0; }
.sectie > h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; }
.veld { margin-bottom: 14px; }
.veld:last-child { margin-bottom: 0; }
.tekst > :last-child { margin-bottom: 0; }

.tekstblok { border-left: 3px solid var(--border-strong); padding: 2px 0 2px 12px; margin-bottom: 14px; }
.tekstblok:last-child { margin-bottom: 0; }
.tekstblok-origineel { border-left-color: var(--accent); }
.tekstblok-kop { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; font-size: .85rem; }
.verbatim { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 12px; font-size: .92rem; }

.impact { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.impact-label { display: block; font-size: .74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.grootte { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; background: var(--neutraal-soft); color: var(--neutraal); }
.grootte-s { background: var(--ok-soft); color: var(--ok); }
.grootte-m { background: var(--warn-soft); color: var(--warn); }
.grootte-l { background: var(--err-soft); color: var(--err); }
.bestanden { list-style: none; padding: 0; }
.bestanden li { margin-bottom: 3px; }

.reactie { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.reactie:last-child { margin-bottom: 0; }
.reactie.is-dubbel { opacity: .7; border-style: dashed; }
.reactie-kop { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.klanttekst { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.klanttekst > :last-child { margin-bottom: 0; }
.antwoord { padding-left: 12px; border-left: 3px solid var(--accent); }
.antwoord > :last-child { margin-bottom: 0; }
.antwoord-label { display: block; font-size: .74rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

.tijdlijn { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--border); }
.tijdlijn li { position: relative; padding: 0 0 14px 10px; }
.tijdlijn li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tijdlijn-kop { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tijdlijn time { font-size: .82rem; font-weight: 600; margin-right: 4px; }
.pijl { color: var(--text-muted); }

.koppelingen { list-style: none; padding: 0; margin: 0; }
.koppelingen li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); }
.koppelingen li:last-child { border-bottom: 0; }
.koppel-soort { font-size: .78rem; color: var(--text-muted); min-width: 110px; }
.koppel-omschrijving { color: var(--text-muted); font-size: .88rem; }
.detail-voet { margin: 8px 0 0; }

/* ---------- screenshots ---------- */

.ss-lijst { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.ss { margin: 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ss-beeld { position: relative; display: inline-block; max-width: 100%; line-height: 0; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface-2); }
.ss-beeld img { display: block; max-width: 100%; max-height: 640px; width: auto; height: auto; border-radius: var(--radius-s); }
.ss-label {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e0001b; color: #fff; font: 700 13px/1 var(--font);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  pointer-events: auto; cursor: default;
}
.ss figcaption { width: 100%; font-size: .88rem; }
.ss-onderschrift { display: block; color: var(--text); margin-bottom: 6px; text-align: center; }
.ss-legende { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ss-legende li { display: flex; gap: 8px; align-items: flex-start; }
.ss-nr {
  flex: none; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e0001b; color: #fff; font-size: 11px; font-weight: 700;
}
.ss-geen { width: 100%; padding: 28px 12px; text-align: center; color: var(--text-muted); font-size: .85rem; border: 1px dashed var(--border-strong); border-radius: var(--radius-s); }

.link-knop { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.link-knop:hover { text-decoration: underline; }
.verwijder-knop { color: var(--err); font-size: .8rem; }
.ss figcaption .verwijder-knop { display: block; margin: 6px auto 0; }

/* ---------- bijlagen ---------- */

.bijlagen { list-style: none; padding: 0; margin: 0; }
.bijlage { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.bijlage:last-child { border-bottom: 0; }
.bijlage-soort {
  flex: none; width: 44px; height: 32px; border-radius: var(--radius-s);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  background: var(--neutraal-soft); color: var(--neutraal);
}
.bijlage-pdf { background: var(--err-soft); color: var(--err); }
.bijlage-doc { background: var(--info-soft); color: var(--info); }
.bijlage-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bijlage-naam { font-weight: 500; overflow-wrap: anywhere; }
.bijlage-omschrijving { font-size: .88rem; }

/* ---------- upload ---------- */

.upload-zone {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  border: 2px dashed var(--border-strong); box-shadow: none; background: transparent;
}
.upload-zone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-zone.is-sleep { border-color: var(--accent); background: var(--accent-soft); }
.upload-tekst { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.upload-tekst .hulp { font-size: .85rem; }
.upload-kies { flex: none; }
.upload-status { flex: 1 1 100%; font-size: .88rem; }
.upload-status:empty { display: none; }
.upload-status .ok { color: var(--ok); }
.upload-status .fout { color: var(--err); }
kbd { font-family: var(--mono); font-size: .8em; padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface-2); }

/* ---------- takenmonitor ---------- */

.takenmonitor { max-width: 860px; margin: 0 auto; }
.tm-form { display: flex; flex-direction: column; gap: 12px; }
.tm-form h2 { margin: 0; }
.tm-form .hulp { margin: 0; }
.tm-soort { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tm-soort legend { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; padding: 0; }
.radio { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.radio input { width: auto; }
.veld-form { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--text-muted); }
.veld-form textarea { resize: vertical; min-height: 110px; }
.tm-acties { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.melding { font-size: .88rem; }
.melding.ok { color: var(--ok); }
.melding.fout { color: var(--err); }
.tm-lijst-kop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.schakelaar { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; cursor: pointer; }
.schakelaar input { width: auto; }
.tm-events { list-style: none; padding: 0; margin: 0; }
.tm-event { border-top: 1px solid var(--border); padding: 12px 0; }
.tm-event.is-verwerkt { opacity: .75; }
.tm-event-kop { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.tm-nr { font-weight: 700; }
.tm-voorstel { display: inline-flex; gap: 4px; align-items: center; color: var(--text-muted); }
.tm-id { font-family: var(--mono); font-size: .72rem; opacity: .7; overflow-wrap: anywhere; }

/* ---------- thema's (epics) ---------- */

.badge.epic { font-family: var(--mono); font-weight: 600; }
.epics, .epic-detail, .beheer { max-width: 1100px; margin: 0 auto; }
.epic-detail { max-width: 920px; }
.epic-kaart .kaart-link { gap: 8px; }
.epic-meta { margin-top: 0; }
.epic-omschrijving { font-size: .88rem; color: var(--text-muted); max-height: 4.6em; overflow: hidden; position: relative; }
.epic-omschrijving p, .epic-omschrijving ul { margin: 0 0 .3em; }
.epic-nieuw > summary { cursor: pointer; font-weight: 600; }
.epic-nieuw[open] > summary { margin-bottom: 12px; }
.epic-kop h1 { margin-top: 6px; }
.epic-kop .voortgang { margin: 12px 0; max-width: 420px; }
.epic-kop .tm-acties { margin-top: 12px; }
.epic-bewerk h2, .epic-koppel-form + * { margin-top: 0; }
.form-raster { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.form-breed { grid-column: 1 / -1; }
.epic-koppel-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.epic-koppel-form .veld-form { flex: 1 1 280px; }
.knop-gevaar { color: var(--err); border-color: var(--err); }
.knop-gevaar:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.epic-lijst { list-style: none; padding: 0; margin: 0 0 12px; }
.epic-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.epic-item:last-child { border-bottom: 0; }
.epic-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.epic-wie { color: var(--text-muted); font-size: .85rem; }
.epic-koppel { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.epic-koppel .filter-veld { flex: 1 1 240px; }

.voortgang { display: flex; align-items: center; gap: 10px; }
.voortgang-balk { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.voortgang-balk > span { display: block; height: 100%; background: var(--ok); }
.voortgang-getal { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- tabellen en tabs (beheer, wijzigingen) ---------- */

.tabel-wrap { overflow-x: auto; max-width: 100%; }
.tabel { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabel th, .tabel td { text-align: left; padding: 5px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabel th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); white-space: nowrap; background: var(--surface); }
.tabel tbody tr:nth-child(even) { background: var(--surface-2); }
.tabel .nowrap, .nowrap { white-space: nowrap; }
.tabel-velden { margin-top: 6px; background: var(--surface); }
.tabel-velden tbody tr:nth-child(even) { background: transparent; }
.leeg-waarde { color: var(--text-muted); }
.wijz-velden { margin-top: 4px; font-size: .85rem; }
.wijz-velden > summary { cursor: pointer; color: var(--accent); }
.wijz-door { font-weight: 500; }
.tijdlijn.wijzigingen .tekst { font-size: .9rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: 6px 0 14px; }
.tabs a { padding: 8px 14px; color: var(--text-muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-actief { color: var(--accent); border-bottom-color: var(--accent); }
.beheer-tegels { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-bottom: 14px; }
.tegel-sub { font-size: .72rem; color: var(--text-muted); }
.beheer .filterbalk { margin-bottom: 12px; background: var(--surface-2); }
.filter-schakel { align-self: end; padding-bottom: 6px; }
.afmelden { white-space: nowrap; }

/* ---------- bal ligt bij / statuspaneel ---------- */

.chip-bal { background: var(--info-soft); color: var(--info); }
.kaart.is-bij-mij { border-left: 3px solid var(--accent); }
.kaart.is-bij-mij .chip-bal { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.kenmerk-meta { display: block; margin-top: 2px; font-size: .74rem; font-weight: 400; color: var(--text-muted); }
.hist-label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.badge.bal { white-space: normal; }

.status-paneel { display: flex; flex-direction: column; gap: 12px; }
.status-paneel h2 { margin: 0; }
.status-velden { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: start; }
.status-paneel .veld-form textarea { min-height: 70px; }
.bal-snel { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bal-snel .knop { padding: 3px 10px; font-size: .82rem; }

/* ---------- nieuw issue ---------- */

.nieuw-paneel { max-width: 860px; margin: 0 auto 16px; }
.nieuw-paneel .paneel-titel { margin: 0; font-size: 1.25rem; }
.nieuw-velden { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nieuw-velden .form-breed { grid-column: 1 / -1; }
.nieuw-epics { border: 0; padding: 0; margin: 0; flex-flow: row wrap; gap: 6px 18px; }
.nieuw-epics legend { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; padding: 0; width: 100%; }
.nieuw-paneel .veld-fout { border-color: var(--err); outline: 1px solid var(--err); }
.lijst-acties { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.tm-event-acties { margin-top: 6px; }

/* ---------- export ---------- */

.export-melding { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-s); padding: 8px 12px; font-size: .85rem; margin-bottom: 12px; }

/* ---------- smal scherm ---------- */

@media (max-width: 600px) {
  body { font-size: 14px; }
  h1 { font-size: 1.25rem; }
  .kop { position: static; }
  .kop-rechts { margin-left: 0; width: 100%; justify-content: space-between; }
  .sectie, .detail-kop, .paneel { padding: 12px; }
  .status-velden, .nieuw-velden { grid-template-columns: 1fr; }
  .bal-snel .knop, .status-paneel .tm-acties .knop { flex: 1 1 auto; justify-content: center; }
  .ss-beeld img { max-height: 520px; }
}

/* ---------- afdrukken ---------- */

@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f3f4f5; --text: #000; --text-muted: #444; --border: #bbb; --schaduw: none;
  }
  body { background: #fff; color: #000; font-size: 11pt; }
  .kop { position: static; border-bottom: 1px solid #999; }
  .status-paneel, .kop-nav, .afmelden, .thema-knop, .filterbalk, .kaart-actie, .detail-nav, .tm-form, .knop, .schakelaar, .upload-zone, .tm-upload, .ss-notitie-acties, .verwijder-knop { display: none !important; }
  .sectie, .paneel, .kaart, .tegel, .detail-kop { box-shadow: none; break-inside: avoid-page; }
  .ss, .reactie, .tekstblok { break-inside: avoid; }
  a { color: inherit; }
  .ss-label, .ss-nr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- screenshots bij notities en takenmonitor ---------- */
.tm-upload { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.tm-upload.is-sleep { border-color: var(--accent); background: var(--accent-soft); }
.tm-upload-kop { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.tm-upload .melding:empty { display: none; }
.tm-miniaturen { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-miniaturen:empty { display: none; }
.tm-mini { position: relative; width: 64px; height: 64px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); }
.tm-mini img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-s); }
.tm-mini-weg {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; padding: 0; line-height: 1; font-size: .75rem; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--err);
}
.tm-mini-weg:hover { background: var(--err-soft); }
.tm-shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tm-shots a { display: block; line-height: 0; border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
.tm-shots img { display: block; width: 96px; height: 72px; object-fit: cover; }
.ss-notitie-lijst { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.ss.ss-notitie { align-items: flex-start; max-width: 360px; }
.ss-notitie .ss-beeld img { max-height: 280px; }
.ss-notitie-acties { margin-top: 8px; font-size: .85rem; }
.ss-toevoegen { display: inline-block; }
@media (max-width: 600px) {
  .tm-upload-kop .knop { flex: 1 1 auto; text-align: center; }
  .ss.ss-notitie { max-width: 100%; }
}
