/* EPD: Epic/KWS-stijl storyboard-banner links + tabbladen rechts. */

.epd-layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 56px); }
@media (max-width: 960px) { .epd-layout { grid-template-columns: 1fr; } }

/* ---------- Storyboard (linkerkolom) ---------- */
.storyboard {
  background: var(--c-surface); border-right: 1px solid var(--c-line);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
  position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow: auto;
}
@media (max-width: 960px) { .storyboard { position: static; max-height: none; } }

.sb-terug { font-size: 12px; font-weight: 600; color: var(--c-ink-2); display: inline-flex; gap: 5px; align-items: center; }
.sb-terug:hover { color: var(--c-accent); }

.sb-acuity { height: 5px; border-radius: 3px; background: var(--c-line); }
.sb-acuity.a-rood { background: var(--t-rood); }
.sb-acuity.a-oranje { background: var(--t-oranje); }
.sb-acuity.a-geel { background: var(--t-geel); }
.sb-acuity.a-groen { background: var(--t-groen); }
.sb-acuity.a-blauw { background: var(--t-blauw); }

.sb-foto {
  width: 64px; height: 64px; border-radius: 12px; background: var(--c-surface-3);
  display: grid; place-items: center; font-size: 26px; color: var(--c-ink-3);
  border: 1px solid var(--c-line-2);
}
.sb-naam { font-size: 18px; font-weight: 700; line-height: 1.2; }
.sb-sub { font-family: var(--font-data); font-size: 12px; color: var(--c-ink-2); }
.sb-rij { display: flex; align-items: center; gap: 8px; }

.sb-blok { border-top: 1px solid var(--c-line-2); padding-top: var(--sp-3); }
.sb-blok .eyebrow { margin-bottom: 6px; }
.sb-kv { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 13px; }
.sb-kv span:first-child { color: var(--c-ink-2); }
.sb-kv span:last-child { font-weight: 600; text-align: right; }

.sb-allergie {
  background: var(--t-rood-zacht); border: 1px solid #f1c3bf; border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 13px;
}
.sb-allergie .eyebrow { color: var(--t-rood); }
.sb-allergie .waarde { font-weight: 700; color: #a3271d; }

/* Codebeleid (DNR) in het storyboard */
.sb-dnr { border: 1px solid var(--c-line-2); border-radius: var(--r-sm); padding: 8px 10px; margin-top: var(--sp-3); }
.sb-dnr .waarde-klein { font-size: 11px; color: var(--c-ink-3); }
.sb-dnr-niveau { font-weight: 800; font-size: 15px; color: #16242e; }
.sb-dnr.niveau-1, .sb-dnr.niveau-2 { background: #fef6e7; border-color: #f0d8a8; }
.sb-dnr.niveau-2 .sb-dnr-niveau { color: #b9770a; }
.sb-dnr.niveau-3 { background: #fdecea; border-color: #f1c3bf; }
.sb-dnr.niveau-3 .sb-dnr-niveau { color: #a3271d; }
.sb-dnr.leeg { background: var(--c-surface-2); }

.sb-vlaggen { display: flex; flex-wrap: wrap; gap: 5px; }
.vlag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--c-surface-3); color: var(--c-ink-2); }
.vlag.zwanger { background: #fbe9f3; color: #a83279; }
.vlag.isolatie { background: #fff3df; color: #9a6400; }

.sb-wacht .getal { font-family: var(--font-data); font-size: 22px; font-weight: 700; }
.sb-wacht .doel { font-size: 11px; color: var(--c-ink-3); }

/* ---------- Hoofdgebied ---------- */
.epd-main { display: flex; flex-direction: column; min-width: 0; }
.tabstrip {
  display: flex; gap: 2px; padding: 0 var(--sp-4); background: var(--c-surface);
  border-bottom: 1px solid var(--c-line); position: sticky; top: 56px; z-index: 20;
  overflow-x: auto;
}
.tab {
  padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--c-ink-2);
  border: none; background: none; cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--c-ink); }
.tab.actief { color: var(--c-accent); border-bottom-color: var(--c-accent); }

.tabinhoud { padding: var(--sp-5); display: none; animation: opkomst .14s ease-out; }
.tabinhoud.actief { display: block; }

.paneel {
  background: var(--c-surface); border: 1px solid var(--c-line-2); border-radius: var(--r-lg);
  box-shadow: var(--schaduw-1); margin-bottom: var(--sp-4);
}
.paneel-kop {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--sp-4); border-bottom: 1px solid var(--c-line-2);
}
.paneel-kop h3 { font-size: 14px; }
.paneel-body { padding: var(--sp-4); }

/* Sleutel/waarde-rooster */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-3); }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv .k { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-3); }
.kv .v { font-weight: 600; }
.kv .v.mono { font-family: var(--font-data); }

/* Vitale parameters tabel + trend */
.param-tabel { width: 100%; border-collapse: collapse; font-size: 13px; }
.param-tabel th, .param-tabel td { padding: 7px 10px; text-align: right; border-bottom: 1px solid var(--c-line-2); font-family: var(--font-data); }
.param-tabel th:first-child, .param-tabel td:first-child { text-align: left; font-family: var(--font-ui); }
.param-tabel thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-2); font-family: var(--font-ui); background: var(--c-surface-2); }
.param-tabel td.afwijk { color: var(--c-alert); font-weight: 700; }

.trend { display: flex; align-items: flex-end; gap: 4px; height: 64px; padding: 8px 0; }
.trend .staaf { flex: 1; min-width: 6px; border-radius: 3px 3px 0 0; background: var(--c-accent); position: relative; }
.trend .staaf.r-laag { background: var(--ews-laag); }
.trend .staaf.r-midden { background: var(--ews-midden); }
.trend .staaf.r-hoog { background: var(--ews-hoog); }
.trend .staaf span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-family: var(--font-data); color: var(--c-ink-2); }
.trend .staaf.r-neutraal { background: var(--c-accent); }

/* Trend-rooster: kleine grafiekjes per parameter naast elkaar. */
.trend-rooster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.trend-kaart { border: 1px solid var(--c-line-2); border-radius: var(--r-sm); padding: 8px 10px 18px; background: var(--c-surface); }
.trend-titel { font-size: 11px; font-weight: 600; color: var(--c-ink-2); margin-bottom: 4px; }

/* Live afgeleide waarden in het parameter-invoerscherm (MAP / GCS / NEWS2). */
.param-feedback { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.param-chip { font-size: 12px; font-family: var(--font-data); background: var(--c-surface-2); border: 1px solid var(--c-line-2); border-radius: var(--r-sm); padding: 4px 12px; color: var(--c-ink-2); }
.param-chip.ews-laag { background: var(--t-groen-zacht, #e8f6ee); border-color: var(--ews-laag); }
.param-chip.ews-midden { background: var(--t-geel-zacht, #fff7e0); border-color: var(--ews-midden); }
.param-chip.ews-hoog { background: var(--t-rood-zacht, #fdeaea); border-color: var(--ews-hoog); }

/* Sticky live-feedback bovenaan het parameterscherm. */
.param-feedback { position: sticky; top: 0; z-index: 2; background: var(--c-surface); padding: 4px 0 8px; }

/* Sub-tabbladen binnen Parameters (Vitaal / Fysiek). */
.subtabstrip { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--c-line); }
.subtab { appearance: none; border: none; background: none; cursor: pointer; padding: 7px 14px;
  font-size: 13px; font-weight: 600; color: var(--c-ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab:hover { color: var(--c-ink); }
.subtab.actief { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* Parameter-invoerkaarten: overzichtelijk rooster met één kaart per parameter. */
.pkaart-rooster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.pkaart-sectie { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-ink-2); padding: 8px 2px 2px; border-bottom: 1px solid var(--c-line-2); }
.pkaart-sectie:first-child { padding-top: 0; }
.pkaart { border: 1px solid var(--c-line); border-radius: var(--r-sm); background: var(--c-surface); overflow: hidden; }
.pkaart.breed { grid-column: span 2; }
@media (max-width: 560px) { .pkaart.breed { grid-column: span 1; } }
.pkaart-kop { background: var(--c-surface-2); border-bottom: 1px solid var(--c-line-2); padding: 6px 10px;
  font-size: 12px; font-weight: 700; color: var(--c-ink); }
.pkaart-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.pveld { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pveld-l { font-size: 11px; color: var(--c-ink-2); }
.pveld-rij { display: flex; gap: 8px; }
.pkaart-voet { margin-top: 12px; max-width: 320px; }
.pkaart .invoer, .pkaart-voet .invoer { width: 100%; }

/* Notities (decursus / verpleegkundig) */
.notitie { border-left: 3px solid var(--c-accent); padding: 8px 12px; background: var(--c-surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin-bottom: 10px; }
.notitie.verpleegkundig { border-left-color: var(--t-blauw); }
.notitie .meta { font-size: 11px; color: var(--c-ink-3); margin-bottom: 3px; display: flex; gap: 8px; }
.notitie .meta .type { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.notitie .tekst { white-space: pre-wrap; }

.leeg-klein { color: var(--c-ink-3); font-size: 13px; padding: 8px 0; }

.epd-fout { padding: 60px; text-align: center; color: var(--c-ink-2); }

/* ---------- Burger & historiek + ontslagrapport ---------- */
.hist-lijst { display: flex; flex-direction: column; }
.hist-rij {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--c-line-2); color: var(--c-ink);
}
.hist-rij:last-child { border-bottom: none; }
.hist-rij:hover { background: var(--c-selectie); text-decoration: none; }
.hist-datum { font-size: 11px; color: var(--c-ink-2); width: 96px; flex: 0 0 auto; }
.hist-tekst { flex: 1; min-width: 0; }
.hist-titel { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-sub { font-size: 11px; color: var(--c-ink-3); }

.visit-kaart {
  border: 1px solid var(--c-line-2); border-left: 3px solid var(--c-paneelkop-2);
  border-radius: var(--r-md); padding: 8px 10px; margin-bottom: 8px; background: var(--c-surface-2);
}
.visit-kaart:last-child { margin-bottom: 0; }
.visit-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.visit-diag { font-weight: 700; font-size: 13px; }
.visit-datum { font-size: 11px; color: var(--c-ink-3); }
.visit-veld { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; }
.visit-veld .k { font-weight: 600; color: var(--c-ink-2); min-width: 92px; flex: 0 0 auto; }
.visit-veld .v { color: var(--c-ink); white-space: pre-wrap; }

.rapport-waarschuwing {
  background: var(--t-oranje-zacht); border: 1px solid var(--t-oranje);
  color: #7a4a00; padding: 8px 10px; border-radius: var(--r-md); font-size: 12px; margin-bottom: 12px;
}
.rapport-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }

/* ---------- Handelingen (KWS-stijl tegelrooster) ---------- */
.hk-rooster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.hk-tegel {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 62px; padding: 8px 10px; cursor: pointer;
  border: 1px solid var(--c-line); border-radius: var(--r-md);
  font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--c-ink);
  background: var(--c-surface-2); transition: filter .1s, transform .05s;
}
.hk-tegel:hover { filter: brightness(.97); }
.hk-tegel:active { transform: translateY(1px); }
.hk-tegel.hk-rood    { background: var(--t-rood-zacht);   border-color: var(--t-rood); }
.hk-tegel.hk-oranje  { background: var(--t-oranje-zacht); border-color: var(--t-oranje); }
.hk-tegel.hk-geel    { background: var(--t-geel-zacht);   border-color: var(--t-geel); }
.hk-tegel.hk-groen   { background: var(--t-groen-zacht);  border-color: var(--t-groen); }
.hk-tegel.hk-blauw   { background: var(--t-blauw-zacht);  border-color: var(--t-blauw); }
.hk-tegel.hk-paars   { background: #f0e9f8; border-color: #9b6dd0; }
.hk-tegel.hk-grijs   { background: var(--c-surface-3); border-color: var(--c-line); }
.hk-tegel.hk-andere  { background: var(--c-surface); border-style: dashed; color: var(--c-ink-2); }
.hk-tabel td { vertical-align: top; }

/* ---------- Attesten ---------- */
.attest-keuze { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.attest-knop {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--c-line); border-left: 3px solid var(--c-accent);
  border-radius: var(--r-md); background: var(--c-surface-2); font-family: var(--font-ui);
}
.attest-knop:hover { background: var(--c-selectie); }
.attest-knop-titel { font-weight: 700; font-size: 13px; color: var(--c-ink); }
.attest-knop-sub { font-size: 11.5px; color: var(--c-ink-2); }
.attest-rij {
  display: flex; align-items: center; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid var(--c-line-2);
}
.attest-rij:last-child { border-bottom: none; }
.attest-info { flex: 1; min-width: 0; }
.attest-titel { font-weight: 600; font-size: 13px; }
.attest-sub { font-size: 11px; color: var(--c-ink-3); font-family: var(--font-data); }
.attest-acties { display: flex; gap: 6px; flex: 0 0 auto; }

/* ---------- Documenten-invulvensters (voorschrift, aanvragen) ---------- */
.doc-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; margin-top: 2px; }
.doc-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.doc-check input { flex: 0 0 auto; }

.vs-lijst { display: flex; flex-direction: column; gap: 8px; }
.vs-rij { border: 1px solid var(--c-line-2); border-left: 3px solid var(--c-accent); border-radius: var(--r-sm); padding: 8px 10px; background: var(--c-surface-2); }
.vs-rij-kop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vs-nr { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-3); flex: 0 0 auto; }
.vs-naam { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; }
.vs-rij-velden { display: flex; gap: 6px; flex-wrap: wrap; }
.vs-rij-velden .invoer { flex: 1; min-width: 120px; }

/* Gegroepeerde checkboxes (labo/microbiologie aanvragen) */
.doc-groepen { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; padding: 6px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface-2); }
.doc-groep-kop { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--c-accent); margin-bottom: 2px; }
.doc-groep { border-bottom: 1px dashed var(--c-line-2); padding-bottom: 6px; }
.doc-groep:last-child { border-bottom: none; }

/* ---------- Triage: voorgeschiedenis ---------- */
.vg-lijst { margin: 4px 0 0; padding-left: 18px; }
.vg-lijst li { margin: 2px 0; }
.vg-edit { display: flex; flex-direction: column; gap: 6px; }
.vg-rij { display: flex; gap: 6px; align-items: center; }
.vg-rij .invoer:first-child { flex: 1; }

/* Ontslagbrief: read-only dossiervelden (uit het dossier overgenomen) */
.ontslag-dossier { background: var(--c-surface-2); border: 1px solid var(--c-line-2); border-radius: var(--r-sm); padding: 6px 9px; font-size: 12.5px; white-space: pre-wrap; }

/* Checkgroep-kop met "Alles"-toggle */
.doc-groep-alles { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.doc-groep-alles input { margin: 0; }
.doc-groep-hint { font-size: 10px; color: var(--c-ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Microbiologie: uitklapbare staaltype-blokken (alles aankruisbaar) */
.micro-cats { display: block; max-height: 50vh; overflow-y: auto; padding: 6px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface-2); }
.micro-cat { border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface); margin-bottom: 6px; }
.micro-cat:last-child { margin-bottom: 0; }
.micro-cat-kop { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; text-align: left; background: none; border: none; cursor: pointer; padding: 9px 12px; font-family: inherit; font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--c-ink); }
.micro-cat-kop:hover { background: var(--c-surface-2); }
.micro-cat-kop.actief { color: var(--c-accent); }
.micro-cat-pijl { flex: 0 0 auto; font-size: 11px; color: var(--c-ink-3); width: 12px; }
.micro-cat-naam { flex: 1; white-space: normal; }
.micro-cat-note { flex: 0 0 auto; font-size: 10px; font-weight: 400; color: var(--c-ink-3); font-style: italic; }
.doc-item-hint { font-size: 10px; color: var(--c-ink-3); font-style: italic; margin-left: 4px; }

/* DNR / codebeleid — "besproken met" */
.dnr-besproken { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.dnr-besproken-rij { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.dnr-besproken-rij > span { font-size: 12.5px; }
.micro-badge { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--c-accent); border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.micro-badge:empty { display: none; }
.micro-cat-body { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--c-line-2); }
.micro-cat-body[hidden] { display: none; }

/* Laboresultaten-invoer — thematisch gegroepeerd rooster */
.labres-kop { display: grid; grid-template-columns: minmax(150px,1fr) 130px 90px 120px 52px 30px; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--c-ink-3); padding: 0 2px 4px; }
.labres-lijst { display: grid; grid-template-columns: minmax(150px,1fr) 130px 90px 120px 52px 30px; gap: 5px 6px; align-items: center; }
.labres-rij { display: contents; }
.labres-naam { font-weight: 600; font-size: 12px; color: var(--c-ink); align-self: center; }
.labres-res { min-width: 0; }
.invoer.afw, .labres-res.afw { color: #b3261e; font-weight: 600; }
.labres-thema { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-chrome); background: var(--c-selectie); border-radius: var(--r-sm); padding: 4px 8px; margin-top: 8px; }
/* Microbiologie-uitslag: bredere resultaatkolom, geen eenheid/referentie */
.labres-lijst.micro-lijst { grid-template-columns: minmax(150px,1fr) 2fr 170px 52px 30px; }
.labres-res-breed { min-width: 0; }

/* Snelkeuzes (labo-aanvraag) + resultaat-toolbar */
.keuzechips { display: flex; gap: 6px; flex-wrap: wrap; }
.snelkeuze-rij { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.snelkeuze-knop { border-color: var(--c-chrome); color: var(--c-chrome); }
.snelkeuze-knop:hover { background: var(--c-selectie); }
.res-toolbar { margin: 4px 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================= */
/* EPD V2 — aanvullingen: rollen, blokjes-invoer, uitklapbare     */
/* handelingen, meetschalen en bezoektijdlijn.                    */
/* ============================================================= */

/* Rol-aanduiding */
.rol-pil { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 3px; margin-left: 6px; background: var(--c-surface-3);
  color: var(--c-ink-3); border: 1px solid var(--c-line-2); }
.leesbanner { display: flex; align-items: center; gap: 8px; background: var(--t-oranje-zacht);
  border: 1px solid var(--t-oranje); color: #7a4a00; padding: 7px 12px; border-radius: var(--r-md);
  font-size: 12px; margin-bottom: 12px; }

/* Blokjes-kiezer (parameters + meetschalen + handelingen) */
.blok-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; }
.pblok { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 46px; padding: 7px 9px; border: 1px solid var(--c-line); border-radius: var(--r-md);
  background: var(--c-surface-2); cursor: pointer; font-weight: 600; font-size: 11.8px; text-align: center; }
.pblok:hover { background: var(--c-selectie); }
.pblok .pb-laatst { font-size: 10px; color: var(--c-ink-3); font-family: var(--font-data); font-weight: 400; }
.pblok.gekozen { background: var(--c-accent-soft); border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); }
.pblok.gekozen::after { content: '✓'; position: absolute; top: 2px; right: 6px; color: var(--c-accent); font-weight: 700; }
.blok-sectie-titel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-ink-2); border-bottom: 1px solid var(--c-line-2); padding-bottom: 3px; margin: 12px 0 6px; }
.blok-sectie-titel:first-child { margin-top: 0; }
.preset-rij { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.preset { border: 1px dashed var(--c-accent-2); background: var(--c-surface); color: var(--c-accent);
  border-radius: var(--r-sm); padding: 3px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.preset:hover { background: var(--c-accent-soft); }

/* Invoerdok: grote-waarde velden + keuzechips (één rij per parameter) */
.invoerdok { border: 1px solid var(--c-accent-2); border-radius: var(--r-lg); background: var(--c-surface);
  margin-top: 12px; box-shadow: var(--schaduw-2); }
.invoerdok-kop { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--c-chrome);
  color: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0; font-size: 12.5px; font-weight: 700; flex-wrap: wrap; }
.invoerdok-kop .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.param-chip { font-size: 11.5px; font-family: var(--font-data); background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--r-sm); padding: 2px 10px; color: #fff; }
.param-chip.n-laag { background: var(--ews-laag); border-color: var(--ews-laag); }
.param-chip.n-midden { background: var(--ews-midden); border-color: var(--ews-midden); }
.param-chip.n-hoog { background: var(--ews-hoog); border-color: var(--ews-hoog); }
.invoerdok-lijst { padding: 4px 14px 8px; }
.invoerdok-voet { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-top: 1px solid var(--c-line-2); background: var(--c-surface-2); padding: 8px 12px;
  border-radius: 0 0 var(--r-lg) var(--r-lg); flex-wrap: wrap; }
.invoerdok-voet .door { font-size: 11.5px; color: var(--c-ink-2); }

.prij { display: flex; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--c-line-2); align-items: flex-start; }
.prij:last-child { border-bottom: none; }
.prij-kop { flex: 0 0 148px; min-width: 0; }
.prij-naam { font-weight: 700; font-size: 13px; }
.prij-laatst { font-size: 10.5px; color: var(--c-ink-3); font-family: var(--font-data); margin-top: 1px; }
.prij-weg { border: none; background: none; color: var(--c-ink-3); cursor: pointer; font-size: 11px; padding: 2px 0; margin-top: 4px; }
.prij-weg:hover { color: var(--c-alert); }
.prij-velden { flex: 1; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; min-width: 0; }
.prij-sub { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 9px 12px;
  background: var(--c-surface-2); border: 1px dashed var(--c-line); border-radius: var(--r-md); align-items: flex-end; }
.autochip { font-size: 10.5px; font-style: italic; color: var(--c-ink-3); align-self: center; max-width: 280px; }

.gveld { display: flex; flex-direction: column; gap: 3px; }
.gveld-doos { display: flex; align-items: baseline; gap: 6px; border: 1px solid var(--c-line);
  border-radius: var(--r-md); background: var(--c-surface); padding: 7px 11px; }
.gveld-doos:focus-within { border-color: var(--c-accent); box-shadow: 0 0 0 2px var(--c-accent-soft); }
.gveld-doos input { border: none; outline: none; background: none; font-family: var(--font-data);
  font-size: 19px; font-weight: 700; width: 64px; color: var(--c-ink); padding: 0; }
.gveld-doos .eenheid { font-size: 11px; color: var(--c-ink-3); font-weight: 600; }
.gveld-label { font-size: 10.5px; color: var(--c-ink-2); font-weight: 600; }
.chipgroep { display: flex; flex-direction: column; gap: 4px; }
.chipgroep-rij { display: flex; flex-wrap: wrap; gap: 4px; }
.keuzechip { border: 1px solid var(--c-line); background: var(--c-surface); border-radius: var(--r-sm);
  padding: 5px 13px; font-size: 11.5px; font-weight: 600; color: var(--c-ink-2); cursor: pointer; }
.keuzechip:hover { background: var(--c-selectie); }
.keuzechip.aan { background: var(--c-chrome); border-color: var(--c-chrome); color: #fff; }

/* Uitklapbare hoofdblokken (handelingen) */
.uitklap { border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface);
  margin-bottom: 8px; overflow: hidden; }
.uitklap-kop { display: flex; align-items: center; gap: 9px; width: 100%; border: none;
  background: var(--c-surface-2); cursor: pointer; padding: 9px 12px; font-size: 12.5px; font-weight: 700;
  color: var(--c-ink); text-align: left; font-family: inherit; }
.uitklap-kop:hover { background: var(--c-selectie); }
.uitklap-pijl { flex: 0 0 auto; font-size: 10px; color: var(--c-ink-3); width: 10px; }
.uitklap-letter { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 3px; background: var(--c-chrome);
  color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.uitklap-teller { margin-left: auto; font-size: 10.5px; color: var(--c-ink-3); font-weight: 400; font-family: var(--font-data); }
.uitklap-body { padding: 10px 12px; border-top: 1px solid var(--c-line-2); }

/* Inline handeling-/meetschaalformulier */
.hform { border: 1px solid var(--c-accent-2); border-radius: var(--r-md); margin-top: 8px;
  background: var(--c-surface); box-shadow: var(--schaduw-2); }
.hform-kop { display: flex; align-items: center; gap: 8px; background: var(--c-chrome); color: #fff;
  padding: 7px 11px; font-weight: 700; font-size: 12.5px; border-radius: var(--r-md) var(--r-md) 0 0; }
.hform-kop .sluit { margin-left: auto; border: none; background: none; color: var(--c-chrome-ink-2);
  cursor: pointer; font-size: 16px; line-height: 1; }
.hform-kop .sluit:hover { color: #fff; }
.hform-body { padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px 14px; }
.hform-body .vol { grid-column: 1 / -1; }
.hform-voet { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-top: 1px solid var(--c-line-2); background: var(--c-surface-2); padding: 7px 11px;
  border-radius: 0 0 var(--r-md) var(--r-md); flex-wrap: wrap; }
.hform-voet .door { font-size: 11px; color: var(--c-ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hform-voet .invoer-tijd { width: 66px; }
.hscore { font-size: 12px; font-family: var(--font-data); font-weight: 700; background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-2); color: var(--c-accent); border-radius: var(--r-sm); padding: 3px 12px; }

/* Bezoektijdlijn */
.tl-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-fchip { border: 1px solid var(--c-line); background: var(--c-surface); border-radius: var(--r-sm);
  padding: 3px 12px; font-size: 11.5px; font-weight: 700; cursor: pointer; color: var(--c-ink-2); }
.tl-fchip.aan { background: var(--c-chrome); border-color: var(--c-chrome); color: #fff; }
.tijdlijn { position: relative; margin-left: 74px; border-left: 2px solid var(--c-line); }
.tl-item { position: relative; padding: 0 0 14px 18px; }
.tl-tijd { position: absolute; left: -74px; top: 0; width: 52px; text-align: right;
  font-family: var(--font-data); font-size: 11.5px; color: var(--c-ink-2); font-weight: 700; }
.tl-dot { position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--c-line); background: var(--c-ink-3); }
.tl-kaart { background: var(--c-surface); border: 1px solid var(--c-line-2); border-left-width: 3px;
  border-radius: var(--r-sm); padding: 7px 10px; box-shadow: var(--schaduw-1); }
.tl-kop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-type { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 0 6px; border-radius: 3px; background: var(--c-surface-3); color: var(--c-ink-2); }
.tl-titel { font-weight: 700; font-size: 12.5px; }
.tl-door { margin-left: auto; font-size: 11px; color: var(--c-ink-3); }
.tl-sub { font-size: 11.5px; color: var(--c-ink-2); margin-top: 2px; white-space: pre-wrap; }
.tl-dag { margin: 0 0 10px 18px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--c-ink-3); }
.t-aanmelding .tl-dot, .t-triage .tl-dot { background: var(--t-rood); }
.t-aanmelding .tl-kaart, .t-triage .tl-kaart { border-left-color: var(--t-rood); }
.t-parameters .tl-dot { background: var(--ews-laag); } .t-parameters .tl-kaart { border-left-color: var(--ews-laag); }
.t-meetschaal .tl-dot { background: #0e7d7d; } .t-meetschaal .tl-kaart { border-left-color: #0e7d7d; }
.t-medicatie .tl-dot { background: #1d6fa5; } .t-medicatie .tl-kaart { border-left-color: #1d6fa5; }
.t-handeling .tl-dot { background: #5b3fa8; } .t-handeling .tl-kaart { border-left-color: #5b3fa8; }
.t-notitie .tl-dot { background: var(--ews-midden); } .t-notitie .tl-kaart { border-left-color: var(--ews-midden); }
.t-document .tl-dot { background: var(--c-ink-2); } .t-document .tl-kaart { border-left-color: var(--c-ink-2); }

/* Attest-/documentkaarten in Decursus */
.attest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.attest-kaart { border: 1px solid var(--c-line); border-top: 3px solid var(--c-accent); border-radius: var(--r-md);
  background: var(--c-surface-2); padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  font-family: inherit; text-align: left; }
.attest-kaart:hover { background: var(--c-selectie); }
.attest-kaart b { font-size: 12.5px; }
.attest-kaart span { font-size: 11px; color: var(--c-ink-2); }
.attest-kaart:disabled { opacity: .5; cursor: not-allowed; }

/* Bloedgroep in het storyboard */
.sb-bloed { display: inline-flex; align-items: center; gap: 6px; background: var(--c-surface-2);
  border: 1px solid var(--c-line-2); border-radius: var(--r-sm); padding: 3px 10px;
  font-family: var(--font-data); font-weight: 700; font-size: 13px; cursor: pointer; }
.sb-bloed:hover { background: var(--c-selectie); }
.sb-bloed.leeg { color: var(--c-ink-3); font-weight: 600; }

/* Voorgeschiedenis-bewerking in Overzicht */
.vg-toevoegen { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.vg-toevoegen .invoer-jaar { max-width: 110px; }
.vg-weg { border: none; background: none; color: var(--c-ink-3); cursor: pointer; font-size: 11px; margin-left: 8px; }
.vg-weg:hover { color: var(--c-alert); }

/* Meetschaal-registraties (weergave) */
.schaal-rij { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--c-line-2); }
.schaal-rij:last-child { border-bottom: none; }
.schaal-score { font-family: var(--font-data); font-weight: 700; font-size: 13px; flex: 0 0 auto;
  background: var(--c-accent-soft); border: 1px solid var(--c-accent-2); color: var(--c-accent);
  border-radius: var(--r-sm); padding: 2px 11px; }

/* ============ Microbiologie top-down (twee panelen) ============ */
.micro-thema-layout { display: flex; gap: 12px; align-items: flex-start; }
@media (max-width: 720px) { .micro-thema-layout { flex-direction: column; } }
.micro-thema-lijst { flex: 0 0 240px; max-height: 460px; overflow: auto;
  border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface); }
@media (max-width: 720px) { .micro-thema-lijst { flex: 0 0 auto; width: 100%; max-height: 200px; } }
.micro-thema-rij { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border: none; background: none; border-bottom: 1px solid var(--c-line-2); padding: 8px 10px;
  font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--c-ink); }
.micro-thema-rij:last-child { border-bottom: none; }
.micro-thema-rij:hover { background: var(--c-surface-2); }
.micro-thema-rij.actief { background: var(--c-accent-soft); font-weight: 700; box-shadow: inset 3px 0 0 var(--c-accent); }
.micro-thema-rij.heeftkeuze .micro-thema-naam { color: var(--c-accent); font-weight: 700; }
.micro-thema-naam { flex: 1; min-width: 0; }
.micro-thema-badge { flex: 0 0 auto; min-width: 18px; text-align: center; font-size: 10.5px; font-weight: 700;
  color: #fff; background: var(--c-accent); border-radius: var(--r-sm); padding: 1px 6px; }
.micro-thema-badge:empty { display: none; }
.micro-thema-detail { flex: 1; min-width: 0; border: 1px solid var(--c-line-2); border-radius: var(--r-sm);
  background: var(--c-surface); padding: 10px 12px; max-height: 460px; overflow: auto; }
.micro-detail-leeg { color: var(--c-ink-3); font-size: 12.5px; padding: 24px 12px; text-align: center; }

/* AI-knop "Automatische resultaten" */
.ai-knop { border-color: #7c5cbf; color: #5b3fa8; background: #f3eefb; font-weight: 700; }
.ai-knop:hover { background: #e9e1f7; }
.ai-knop:disabled { opacity: .6; }

/* Trendopvolging-modal — twee-paneel (parameterlijst + detail) */
.trendmodal-layout { display: flex; gap: 14px; align-items: flex-start; min-height: 440px; }
.trendmodal-zijbalk { flex: 0 0 236px; display: flex; flex-direction: column; }
.trendmodal-lijst { margin-top: 8px; max-height: 62vh; overflow: auto; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); }
.trendmodal-groep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-3); padding: 7px 10px 3px; background: var(--c-surface-2); position: sticky; top: 0; }
.trendmodal-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--c-line); background: var(--c-surface); padding: 6px 10px; cursor: pointer; }
.trendmodal-item:hover { background: var(--c-surface-2); }
.trendmodal-item.actief { background: var(--c-accent-soft); box-shadow: inset 3px 0 0 var(--c-accent); }
.trendmodal-item-naam { font-weight: 600; font-size: 12.5px; color: var(--c-ink); }
.trendmodal-item-meta { font-size: 10.5px; color: var(--c-ink-3); font-family: var(--font-data); }
.trendmodal-detail { flex: 1; min-width: 0; max-height: 66vh; overflow: auto; }
.trendmodal-detailkop { font-size: 15px; font-weight: 700; color: var(--c-ink); margin-bottom: 10px; }
.trendmodal-tabel { margin-top: 12px; }
.trendmodal-tabel td, .trendmodal-tabel th { vertical-align: top; }
@media (max-width: 720px) { .trendmodal-layout { flex-direction: column; } .trendmodal-zijbalk { flex: 0 0 auto; width: 100%; } }

/* Illustratiebeelden bij een radiologisch verslag (resultaatbrief beeldvorming).
   Aanvinkbare strook; enkel aangevinkte beelden komen op de afdruk. */
.bv-galerij { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.bv-beeld { flex: 0 0 auto; width: 168px; cursor: pointer; border: 1px solid var(--rand); border-radius: 3px; padding: 5px; background: var(--vlak); }
.bv-beeld img { width: 100%; height: 120px; object-fit: contain; background: #000; display: block; }
.bv-onder { display: flex; gap: 6px; align-items: flex-start; margin-top: 5px; font-size: 10px; line-height: 1.3; color: var(--tekst-zacht); }
.bv-onder input { margin: 1px 0 0; flex: 0 0 auto; }
