/* Koolhaas-huisstijl (live site): navy #102D59, diep navy #06162E, blauw #247EB2, turquoise #42B8B6, licht turquoise #61CFC4, DM Sans. */
:root {
  --navy: #102D59; --navy-diep: #06162E; --blauw: #247EB2; --turq: #42B8B6; --turq-licht: #61CFC4;
  --ok: #17807D; --ok-zacht: #E3F5F3;
  --open: #A86412; --open-zacht: #FFF3E0;
  --blok: #B8392A; --blok-zacht: #FDECEA;
  --bg: #F2F5F8; --vlak: #FFFFFF; --inkt: #0D1B2E; --grijs: #56677D; --lijn: #DCE3EB;
  --r: 14px; --r-klein: 10px;
  --schaduw: 0 1px 2px rgba(6,22,46,.06), 0 6px 18px -8px rgba(6,22,46,.18);
  --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--inkt); background: var(--bg); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--blauw); }
h1, h2 { line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 16px; }
.wrap.smal { max-width: 760px; }

/* ---------- koppen ---------- */
.merkbalk { background: var(--navy-diep); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
.merkbalk .logo { height: 34px; width: auto; }
.proto { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--turq-licht); border: 1px solid rgba(97,207,196,.4); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.kop { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--navy); color: #fff; }
.kop-tekst { flex: 1; min-width: 0; }
.kop-titel { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kop-sub { font-size: 13px; color: #B9C8DD; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ikoon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: rgba(255,255,255,.08); }
.ikoon:active { background: rgba(255,255,255,.18); }
.teller { font-size: 15px; color: #B9C8DD; padding-right: 6px; font-variant-numeric: tabular-nums; }
.teller b { color: #fff; font-size: 20px; }

/* ---------- overzicht ---------- */
.intro { padding: 8px 0 4px; }
.intro h1 { font-size: 30px; color: var(--navy); }
.intro p { color: var(--grijs); margin: 6px 0 0; max-width: 56ch; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stats div { background: var(--vlak); border-radius: var(--r-klein); padding: 12px; box-shadow: var(--schaduw); }
.stats b { display: block; font-size: 26px; color: var(--navy); font-variant-numeric: tabular-nums; }
.stats span { font-size: 13px; color: var(--grijs); }
.stats .let-op b { color: var(--open); }
.lijst { display: grid; gap: 12px; }
@media (min-width: 760px) { .lijst { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .lijst { grid-template-columns: repeat(3, 1fr); } }
.kaart { background: var(--vlak); border-radius: var(--r); box-shadow: var(--schaduw); padding: 16px; color: inherit; text-decoration: none; display: block; }
a.kaart { transition: transform .15s ease, box-shadow .15s ease; }
a.kaart:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(6,22,46,.06), 0 14px 28px -12px rgba(6,22,46,.28); }
.dossier-kop { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.klant { font-weight: 700; font-size: 18px; color: var(--navy); }
.adres { font-size: 14px; color: var(--grijs); }
.inst-regel { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--lijn); }
.inst-midden { flex: 1; min-width: 0; }
.inst-naam { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.inst-naam span { color: var(--grijs); font-weight: 500; font-variant-numeric: tabular-nums; }
.type-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #E8F0F8; color: var(--navy); flex: none; }
.type-ico.groot { width: 48px; height: 48px; border-radius: 12px; }
.type-ico.groot svg { width: 28px; height: 28px; }
.t-zon { background: #FFF4DB; color: #8A5A00; }
.t-batterij { background: var(--ok-zacht); color: var(--ok); }
.t-laadpaal { background: #E6F1FA; color: var(--blauw); }
.t-groepenkast { background: #ECEFF5; color: var(--navy); }
.kaart.nieuw { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 96px; border: 2px dashed var(--lijn); box-shadow: none; background: transparent; color: var(--blauw); font-weight: 600; }
.voet { font-size: 13px; color: var(--grijs); margin: 28px 0 8px; }
.linkknop { background: none; border: 0; padding: 6px 2px; color: var(--blauw); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }

/* ---------- status ---------- */
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #ECEFF5; color: var(--grijs); }
.chip-ok { background: var(--ok-zacht); color: var(--ok); }
.chip-klaar { background: #E6F1FA; color: var(--blauw); }
.chip-open { background: var(--open-zacht); color: var(--open); }
.balk { height: 8px; border-radius: 999px; background: #E3E9F0; overflow: hidden; }
.balk span { display: block; height: 100%; border-radius: inherit; background: var(--open); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.balk.ok span, .balk.klaar span { background: linear-gradient(90deg, var(--ok), var(--turq)); }
.balk.nieuw span { background: var(--grijs); }

/* ---------- dossier ---------- */
.inst { margin-bottom: 14px; }
.inst-kop { display: flex; gap: 12px; align-items: center; }
.inst-kop h2 { font-size: 20px; color: var(--navy); }
.inst-voortgang { margin: 14px 0 12px; font-size: 14px; color: var(--grijs); display: grid; gap: 6px; }
.stappen-raster { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .stappen-raster { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1000px) { .stappen-raster { grid-template-columns: repeat(9, 1fr); } }
.tegel { display: block; text-decoration: none; color: var(--inkt); }
.tegel-beeld { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-klein); overflow: hidden; background: #E3E9F0; }
.tegel-beeld img { width: 100%; height: 100%; object-fit: cover; }
.tegel-beeld img.vb { opacity: .35; filter: grayscale(1); }
.tegel.mist .tegel-beeld { outline: 2px dashed #E2B47A; outline-offset: -2px; }
.tegel-status { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: var(--open); color: #fff; display: inline-flex; }
.tegel.ok .tegel-status { background: var(--ok); padding: 3px; }
.tegel.ok .tegel-status svg { width: 14px; height: 14px; stroke-width: 3; }
.tegel-naam { display: block; font-size: 12px; line-height: 1.25; margin-top: 5px; color: var(--grijs); }
.inst-acties { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.klein-tekst { font-size: 13px; color: var(--grijs); }

/* ---------- knoppen ---------- */
.knop { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; background: var(--blauw); color: #fff; transition: transform .12s ease, background .15s ease; user-select: none; -webkit-tap-highlight-color: transparent; }
.knop:active { transform: scale(.97); }
.knop.secundair { background: #E6EDF5; color: var(--navy); }
.kop .knop.secundair { background: rgba(255,255,255,.12); color: #fff; }
.knop.klein { min-height: 40px; padding: 0 12px; font-size: 14px; }
.knop.breed { width: 100%; }
.knop.vierkant { width: 52px; padding: 0; flex: none; }
.knop.gevaar { background: var(--blok); }
.knop.geblokkeerd { background: #E9ECF1; color: #8593A6; cursor: not-allowed; }
.knop.hoofd { flex: 1; min-height: 56px; font-size: 17px; }
.knop.hoofd:not(.secundair):not(.geblokkeerd) { background: var(--navy); }
.schud { animation: schud .35s ease; }
@keyframes schud { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- opleverflow ---------- */
body[data-scherm="o"] { background: var(--vlak); }
.segmenten { position: sticky; top: 64px; z-index: 9; display: flex; gap: 4px; padding: 10px 12px; background: var(--navy); }
.seg { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); transition: background .3s ease; position: relative; }
.seg.ok { background: var(--turq); }
.seg.nu { box-shadow: 0 0 0 2px #fff; }
.seg.eind { flex: .6; }
.seg::after { content: ""; position: absolute; inset: -12px 0; } /* groter tikvlak */
.stap { padding-bottom: calc(110px + var(--veilig-onder)); }
.stap-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.stapnr { font-size: 13px; font-weight: 700; color: var(--grijs); text-transform: uppercase; letter-spacing: .05em; }
.fase { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #ECEFF5; color: var(--navy); }
.fase svg { width: 15px; height: 15px; stroke-width: 2.2; }
.fase-voor { background: var(--open-zacht); color: var(--open); }
.stap h1 { font-size: 27px; color: var(--navy); }
.waarom { color: var(--grijs); margin: 8px 0 16px; }
.stap-raster { display: grid; grid-template-columns: 1fr 120px; gap: 14px; align-items: start; }
@media (min-width: 640px) { .stap-raster { grid-template-columns: 1fr 220px; } }
.zien h2, .mijn h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--grijs); margin-bottom: 6px; }
.zien ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.zien li { position: relative; padding-left: 26px; font-weight: 500; }
.zien li::before { content: ""; position: absolute; left: 2px; top: .3em; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--turq); }
.voorbeeld { margin: 0; }
.vb-knop { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.voorbeeld img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--r-klein); }
.voorbeeld figcaption { font-size: 12px; color: var(--grijs); margin-top: 4px; text-align: center; }
.mijn { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--lijn); }
.mijn-kop { display: flex; justify-content: space-between; align-items: baseline; }
.aantal { font-weight: 700; color: var(--open); display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.aantal.ok { color: var(--ok); }
.aantal svg { width: 18px; height: 18px; stroke-width: 2.6; }
.fotoraster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
@media (min-width: 640px) { .fotoraster { grid-template-columns: repeat(4, 1fr); } }
.foto { position: relative; aspect-ratio: 1; border-radius: var(--r-klein); overflow: hidden; border: 0; padding: 0; background: #E3E9F0; cursor: pointer; animation: erin .35s cubic-bezier(.2,.8,.2,1) both; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto-tijd { position: absolute; left: 5px; bottom: 5px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(6,22,46,.65); padding: 2px 6px; border-radius: 6px; }
.nieuw-foto { display: grid; place-content: center; justify-items: center; gap: 4px; border: 2px dashed #B9C6D6; background: #F6F8FB; color: var(--blauw); font-weight: 700; font-size: 13px; animation: none; }
.nieuw-foto svg { width: 28px; height: 28px; }
@keyframes erin { from { opacity: 0; transform: scale(.92); } }
.bronnen { display: flex; gap: 8px; align-items: center; color: var(--grijs); margin-top: 6px; font-size: 14px; }
.veld { display: grid; gap: 6px; margin-top: 16px; font-weight: 600; font-size: 15px; }
.veld input { font: inherit; font-weight: 500; min-height: 50px; padding: 0 14px; border: 1.5px solid var(--lijn); border-radius: 12px; background: #fff; color: var(--inkt); font-size: 17px; }
.veld input:focus { border-color: var(--blauw); outline: none; box-shadow: 0 0 0 3px rgba(36,126,178,.18); }
.actiebalk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--veilig-onder)); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--lijn); }
@media (min-width: 760px) { .actiebalk { left: 50%; transform: translateX(-50%); width: 760px; bottom: 16px; border: 1px solid var(--lijn); border-radius: 18px; box-shadow: var(--schaduw); padding-bottom: 10px; } }
.actiebalk > .knop:last-child:not(.hoofd) { min-width: 112px; min-height: 56px; padding: 0 14px; }
.actiebalk .knop.hoofd { padding: 0 12px; min-width: 0; }

/* afronden */
.melding { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); margin: 14px 0; }
.melding svg { margin-top: 2px; }
.melding.blok { background: var(--blok-zacht); color: #7A2217; }
.melding.ok { background: var(--ok-zacht); color: #0E5754; }
.checklijst { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.checklijst a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--inkt); background: #F6F8FB; min-height: 56px; }
.checklijst .mist a { background: var(--blok-zacht); }
.bol { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: #fff; color: var(--blok); border: 2px solid currentColor; flex: none; }
.ok .bol { background: var(--ok); color: #fff; border-color: var(--ok); }
.bol svg { width: 16px; height: 16px; stroke-width: 3; }
.cl-naam { flex: 1; font-weight: 600; }
.cl-naam small { display: block; font-weight: 500; color: var(--open); font-size: 12px; }
.cl-stand { font-size: 13px; color: var(--grijs); font-weight: 600; white-space: nowrap; }
.mist .cl-stand { color: var(--blok); }

/* nieuw */
.formulier { display: grid; gap: 4px; }
fieldset { border: 0; padding: 0; margin: 18px 0 12px; display: grid; gap: 8px; }
legend { font-weight: 700; margin-bottom: 8px; }
.keuze { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--vlak); box-shadow: var(--schaduw); cursor: pointer; min-height: 60px; }
.keuze input { width: 22px; height: 22px; accent-color: var(--blauw); }
.keuze small { display: block; color: var(--grijs); font-size: 13px; }

/* ---------- opleverbundel ---------- */
.bundel-scherm { background: #CBD3DD; min-height: 100vh; }
.paginas { display: grid; justify-content: center; gap: 18px; padding: 16px 12px 40px; }
.pagina { position: relative; background: #fff; width: min(210mm, calc(100vw - 24px)); min-height: min(297mm, 140vw); padding: clamp(18px, 5vw, 15mm); box-shadow: 0 10px 30px -12px rgba(6,22,46,.45); display: flex; flex-direction: column; overflow: hidden; }
.concept { position: absolute; top: 34%; left: -10%; right: -10%; text-align: center; transform: rotate(-24deg); font-size: clamp(30px, 8vw, 64px); font-weight: 700; color: rgba(184,57,42,.10); pointer-events: none; letter-spacing: .04em; text-transform: uppercase; }
.pag-logo { height: 46px; width: auto; align-self: flex-start; }
.voorblad { margin-top: auto; margin-bottom: auto; padding: 24px 0; }
.voorblad .label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--turq); }
.voorblad h1 { font-size: clamp(30px, 7vw, 44px); color: var(--navy); margin-top: 8px; }
.voorblad .adres { font-size: 17px; margin: 6px 0 22px; }
.meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 22px; padding: 14px 0; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--lijn); }
.meta dt { font-size: 12px; color: var(--grijs); }
.meta dd { margin: 2px 0 0; font-weight: 700; }
.uitleg { color: var(--grijs); max-width: 60ch; }
.inhoud { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
.inhoud th { text-align: left; font-size: 12px; color: var(--grijs); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--lijn); }
.inhoud td { padding: 10px 4px; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.inhoud td span { color: var(--grijs); }
.pag-kop { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--navy); }
.pag-kop div { flex: 1; }
.pag-kop h2 { font-size: 22px; color: var(--navy); }
.pag-kop p { margin: 2px 0 0; color: var(--grijs); font-size: 14px; }
.meetwaarden { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; font-size: 13px; }
.meetwaarden dt { color: var(--grijs); }
.meetwaarden dd { margin: 0; font-weight: 700; }
.bundel-raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; margin-top: 14px; }
@media (min-width: 640px) { .bundel-raster { grid-template-columns: repeat(3, 1fr); } }
.bundel-stap { margin: 0; break-inside: avoid; }
.bs-beeld { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: #EEF2F6; }
.bs-beeld img { width: 100%; height: 100%; object-fit: cover; }
.leeg { height: 100%; display: grid; place-items: center; border: 2px dashed #E2A59C; border-radius: 8px; color: var(--blok); font-weight: 700; font-size: 13px; background: var(--blok-zacht); }
.bs-extra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
.bs-extra img { aspect-ratio: 1; object-fit: cover; border-radius: 5px; }
.bundel-stap figcaption { font-size: 12px; margin-top: 6px; display: grid; gap: 1px; }
.bundel-stap figcaption b { font-size: 13px; }
.bundel-stap figcaption span { color: var(--grijs); }
.pag-voet { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: #8593A6; }

/* ---------- lichtbak en toast ---------- */
.lichtbak { border: 0; padding: 0; background: transparent; max-width: min(96vw, 980px); max-height: 94vh; }
.lichtbak::backdrop { background: rgba(6,22,46,.82); }
.lichtbak img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 12px; }
.lb-balk { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #fff; font-size: 14px; }
.lb-balk span { flex: 1; }
.lb-balk .knop.secundair { background: rgba(255,255,255,.14); color: #fff; }
#toast { position: fixed; left: 50%; bottom: calc(96px + var(--veilig-onder)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50; background: var(--navy-diep); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; max-width: calc(100vw - 32px); transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: var(--schaduw); }
#toast.zichtbaar { opacity: 1; transform: translate(-50%, 0); }
#toast.ok { background: var(--ok); }
#toast.fout { background: var(--blok); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- printen (PDF opslaan) ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body, .bundel-scherm { background: #fff; }
  .kop, .melding, #toast { display: none !important; }
  .paginas { display: block; padding: 0; }
  .pagina { width: 210mm; min-height: 297mm; height: 297mm; box-shadow: none; padding: 14mm; break-after: page; }
  .bundel-raster { grid-template-columns: repeat(3, 1fr); }
  .meta { grid-template-columns: repeat(3, 1fr); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
