/* Release 132 (Claude): de bonnenflow volgens Figma (bonflow.js).
   A. 'Bon gelezen' (Figma 264:3480-3482): onderblad op de telefoon (390 breed, hoek 28), een venster van 480 op de pc.
   B. 'Foto gemaakt' (Figma 325:3787/3865/3942): onderblad op de telefoon, op de pc foto links en de keuzes rechts.
   Kleuren uit de bestaande MC-tokens (--ds-*, dagstart.css; donker via data-theme of het systeem). De hoofdknop is het
   vaste MC-blauw #315de7, net als .sc-primary in scans.css. */

/* ---------- gedeeld ---------- */
#blad:has(>.bf-melding),#blad:has(>.bf-foto){background:var(--ds-card);color:var(--ds-ink);border:1px solid var(--ds-line);border-bottom:0;font-family:MCInter,Inter,sans-serif;overflow-x:hidden}
:is(.bf-melding,.bf-foto){font-size:13px;line-height:1.5;color:var(--ds-ink)}
:is(.bf-melding,.bf-foto) *{box-sizing:border-box;min-width:0}
:is(.bf-melding,.bf-foto) :is(p,h3,h4,ol,ul){margin:0}
.bf-icoon{display:block;flex:none}
.bf-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* het bestaande ✕ van het blad (openBlad), als het ronde sluitknopje uit het ontwerp */
#blad:has(>.bf-melding)>.blad-sluit,#blad:has(>.bf-foto)>.blad-sluit{display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--ds-bg);color:var(--ds-muted);font-size:0;z-index:3;cursor:pointer}
#blad:has(>.bf-melding)>.blad-sluit::before,#blad:has(>.bf-foto)>.blad-sluit::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E") center/18px 18px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E") center/18px 18px no-repeat}
#blad:has(>.bf-melding)>.blad-sluit:hover,#blad:has(>.bf-foto)>.blad-sluit:hover{color:var(--ds-ink)}
#blad:has(>.bf-melding) :is(button,a):focus-visible,#blad:has(>.bf-foto) :is(button,a):focus-visible{outline:3px solid var(--ds-blue);outline-offset:2px}
#blad:has(>.bf-melding)>.blad-sluit:focus-visible,#blad:has(>.bf-foto)>.blad-sluit:focus-visible{outline-offset:-1px}

/* kleuren per toon: groen (klaar), blauw (wacht/informatie), amber (jouw keuze), rood (niet gelukt), neutraal */
.bf-groen{--bf-vul:var(--ds-mint);--bf-inkt:var(--ds-teal)}
.bf-blauw{--bf-vul:var(--ds-pale);--bf-inkt:var(--ds-blue)}
.bf-amber{--bf-vul:var(--ds-cream);--bf-inkt:var(--ds-amber)}
.bf-rood{--bf-vul:var(--ds-rose);--bf-inkt:var(--ds-red)}
.bf-neutraal{--bf-vul:var(--ds-bg);--bf-inkt:var(--ds-muted)}

/* ---------- A. Bon gelezen ---------- */
#blad:has(>.bf-melding){padding:11px 24px calc(env(safe-area-inset-bottom) + 2px);border-radius:28px 28px 0 0;max-height:calc(100dvh - 24px)}
#blad:has(>.bf-melding)::before{width:48px;height:4px;border-radius:2px;background:var(--ds-line);margin:0 auto}
#blad:has(>.bf-melding)>.blad-sluit{position:sticky;top:8px;float:right;width:40px;height:40px;margin:19px -6px 0 12px}
/* maten uit Figma: pictogram op 40 van de bovenrand, de kaart 24 eronder */
.bf-kop{display:flex;align-items:center;gap:12px;margin:21px 0}
.bf-teken{flex:none;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--bf-vul);color:var(--bf-inkt)}
.bf-kop-tekst{min-width:0}
#blad .bf-kop h3{margin:0;font:700 23px/33px MCManrope,Manrope,sans-serif;letter-spacing:0;color:var(--ds-ink);overflow-wrap:anywhere}
.bf-kop p{font-size:12px;line-height:17px;color:var(--ds-muted)}
.bf-doc{background:var(--ds-bg);border:1px solid var(--ds-line);border-radius:17px;padding:16px 13px 17px 15px}
.bf-doc-kop{display:flex;align-items:flex-start;gap:14px}
.bf-doc-icoon{flex:none;width:40px;height:44px;margin-top:1px;border-radius:11px;display:grid;place-items:center;background:var(--ds-pale);color:var(--ds-blue)}
.bf-doc-naam{flex:1;display:flex;flex-direction:column;gap:6px;padding-top:0}
.bf-doc-naam b{font:700 17px/25px MCManrope,Manrope,sans-serif;color:var(--ds-ink);overflow-wrap:anywhere}
.bf-doc-naam span{font-size:12px;line-height:17px;color:var(--ds-muted)}
.bf-doc-bedrag{flex:none;margin-left:auto;font:700 22px/32px MCManrope,Manrope,sans-serif;color:var(--ds-ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.bf-doc-op{margin-top:18px!important;font-size:11px;line-height:16px;color:var(--ds-muted)}
.bf-labels{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px!important}
.bf-noot{margin-top:8px!important;font-size:12px;line-height:17px;color:var(--ds-muted);overflow-wrap:anywhere}
.bf-noot-fout{color:var(--ds-red);font-weight:500}
.bf-pil{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 9px;border-radius:999px;background:var(--bf-vul,var(--ds-pale));color:var(--bf-inkt,var(--ds-blue));font-size:11px;line-height:16px;font-weight:600;overflow-wrap:anywhere}
.bf-pil.bf-neutraal{background:var(--ds-card);border:1px solid var(--ds-line)}

/* stappen Opgeslagen — Gelezen — Bank: bolletjes van 28, de buitenste 44 px van de rand */
.bf-stappen{list-style:none;padding:0;margin:24px 0 0!important;display:grid;grid-template-columns:88px minmax(0,1fr) 88px;align-items:start}
.bf-stap{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center}
.bf-bol{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:var(--bf-vul);color:var(--bf-inkt)}
.bf-stap-klaar{--bf-vul:var(--ds-mint);--bf-inkt:var(--ds-teal)}
.bf-stap-wacht{--bf-vul:var(--ds-pale);--bf-inkt:var(--ds-blue)}
.bf-stap-let{--bf-vul:var(--ds-cream);--bf-inkt:var(--ds-amber)}
.bf-stap-fout{--bf-vul:var(--ds-rose);--bf-inkt:var(--ds-red)}
.bf-stap-open,.bf-stap-leeg{--bf-vul:var(--ds-bg);--bf-inkt:var(--ds-muted)}
.bf-stap-naam{margin-top:10px;font-size:11px;line-height:16px;font-weight:500;color:var(--ds-muted)}
.bf-stap-sub{font-size:10px;line-height:14px;color:var(--ds-muted)}
.bf-stap-fout .bf-stap-naam,.bf-stap-fout .bf-stap-sub{color:var(--ds-red)}
.bf-stappen>li:nth-child(2)::before,.bf-stappen>li:nth-child(2)::after{content:"";position:absolute;top:13px;height:2px;border-radius:1px;background:repeating-linear-gradient(90deg,var(--ds-line) 0 4px,transparent 4px 8px)}
.bf-stappen>li:nth-child(2)::before{left:-26px;right:calc(50% + 18px)}
.bf-stappen>li:nth-child(2)::after{left:calc(50% + 18px);right:-26px}
.bf-stappen.bf-lijn1-vol>li:nth-child(2)::before,.bf-stappen.bf-lijn2-vol>li:nth-child(2)::after{background:var(--ds-teal)}

/* uitleg: 'Wacht op bank', 'Gekoppeld aan je bank', 'Jij beslist', … */
.bf-uitleg{margin-top:17px;padding:14px 16px 15px;border-radius:14px;background:var(--bf-vul);overflow-wrap:anywhere}
.bf-uitleg.bf-neutraal{border:1px solid var(--ds-line)}
.bf-uitleg-titel{display:flex;align-items:center;gap:9px;font-size:14px;line-height:20px;color:var(--bf-inkt)}
.bf-uitleg-titel b{font-weight:600}
.bf-uitleg p+p{margin-top:6px;font-size:12px;line-height:18px;color:var(--ds-muted)}

/* knoppen: blauwe hoofdknop, Ongedaan met een rand, Gereed als tekstknop */
.bf-acties{display:flex;flex-direction:column;margin-top:22px}
#blad .bf-melding .bf-hoofdknop{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;margin:0;padding:0 16px;border:0;border-radius:12px;background:#315de7;color:#fff;font:600 14px/20px MCInter,Inter,sans-serif}
#blad .bf-melding .bf-hoofdknop:hover{filter:brightness(.94)}
#blad .bf-melding .bf-tweede{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:10px 0 0;padding:6px 16px;border:1px solid var(--ds-line);border-radius:12px;background:var(--ds-card);color:var(--ds-ink);font:600 13px/19px MCInter,Inter,sans-serif;white-space:normal;text-align:center}
.bf-gereed{display:block;width:100%;min-height:44px;margin-top:2px;padding:0 16px;border:0;border-radius:12px;background:none;color:var(--ds-muted);font:600 13px/19px MCInter,Inter,sans-serif;cursor:pointer}
.bf-gereed:hover{color:var(--ds-ink)}
.bf-gereed.bf-gereed-los{margin:0 0 14px;min-height:48px;border:1px solid var(--ds-line);background:var(--ds-card);color:var(--ds-ink);font-size:14px}

/* meer documenten: per document een compacte kaart */
.bf-meer .bf-kop{margin-bottom:20px}
.bf-lijst{list-style:none;padding:0;display:flex;flex-direction:column;gap:12px}
.bf-item{padding:14px;border:1px solid var(--ds-line);border-radius:16px;background:var(--ds-bg)}
.bf-item .bf-doc-kop{gap:12px}
.bf-item .bf-doc-icoon{width:36px;height:40px;border-radius:10px;margin-top:0}
.bf-item .bf-doc-naam{gap:2px}
.bf-item .bf-doc-naam b{font-size:15px;line-height:22px}
.bf-item .bf-doc-bedrag{font-size:17px;line-height:22px}
.bf-item-stand{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px!important}
.bf-item-tekst{margin-top:8px!important;font-size:12px;line-height:18px;color:var(--ds-muted);overflow-wrap:anywhere}
.bf-item .bf-doc-op{margin-top:6px!important}
.bf-item-knoppen{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
#blad .bf-item-knoppen .knop{flex:0 1 auto;width:auto;min-height:40px;margin:0;padding:0 14px;border:1px solid var(--ds-line);border-radius:10px;background:var(--ds-card);color:var(--ds-ink);font:600 13px/18px MCInter,Inter,sans-serif;justify-content:center}
.bf-meer .bf-acties{margin:20px 0 14px}

/* ---------- B. Foto gemaakt ---------- */
#blad:has(>.bf-foto){padding:0;border-radius:20px 20px 0 0;max-height:calc(100dvh - 12px)}
#blad:has(>.bf-foto)::before{width:44px;height:4px;border-radius:999px;background:var(--ds-line);margin:10px auto}
#blad:has(>.bf-foto)>.blad-sluit{position:absolute;top:49px;right:20px;float:none;width:44px;height:44px;margin:0}
.bf-foto-kop{padding:20px 84px 20px 20px;border-bottom:1px solid var(--ds-line)}
#blad .bf-foto-kop h3{margin:0;font:700 22px/30px MCManrope,Manrope,sans-serif;letter-spacing:0;color:var(--ds-ink)}
.bf-foto-sub{margin-top:4px!important;font-size:14px;line-height:20px;color:var(--ds-muted)}
.bf-foto-romp{display:flex;flex-direction:column;gap:16px;padding:20px 20px calc(env(safe-area-inset-bottom) + 20px)}
.bf-foto-links{display:flex;flex-direction:column;gap:8px}
.bf-foto-vak{position:relative;height:clamp(150px,calc(100dvh - 620px),228px);border-radius:16px;background:#0b1422;overflow:hidden;display:flex;align-items:center;justify-content:center}
.bf-foto-beeld{display:block;width:100%;height:100%;object-fit:contain}
.bf-vergroot{position:absolute;right:12px;bottom:12px;width:44px;height:44px;border:0;border-radius:12px;background:var(--ds-card);color:var(--ds-ink);display:grid;place-items:center;padding:0;cursor:pointer}
.bf-strook{display:flex;gap:8px;overflow-x:auto;padding:3px 3px 2px;scrollbar-width:thin}
.bf-mini{position:relative;flex:none;width:44px;height:56px;padding:0;border:1px solid var(--ds-line);border-radius:8px;background:#0b1422;overflow:hidden;cursor:pointer}
.bf-mini img{display:block;width:100%;height:100%;object-fit:cover}
.bf-mini span{position:absolute;right:3px;bottom:3px;min-width:16px;padding:0 4px;border-radius:6px;background:var(--ds-card);color:var(--ds-ink);font-size:10px;line-height:15px;font-weight:600}
.bf-mini.bf-mini-nu{outline:2px solid var(--ds-blue);outline-offset:1px}
.bf-foto-onder{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px;line-height:17px;color:var(--ds-muted)}
.bf-foto-pagina{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}
.bf-foto-rechts{display:flex;flex-direction:column;gap:16px}
.bf-foto-intro{display:none}
.bf-status{display:flex;align-items:flex-start;gap:12px;padding:12px;border-radius:12px;background:var(--ds-pale);color:var(--ds-blue)}
.bf-status-tekst{display:flex;flex-direction:column;gap:4px;color:var(--ds-muted);font-size:12px;line-height:18px}
.bf-status-tekst b{font-size:15px;line-height:21px;font-weight:600;color:var(--ds-ink)}
.bf-status-x{color:var(--ds-ink)}
.bf-apart{display:block;font-weight:600;color:var(--ds-ink);margin-bottom:2px}
.bf-keuzes{display:flex;flex-direction:column;gap:12px}
#blad .bf-foto .bf-keuze{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:72px;margin:0;padding:16px;border:1px solid var(--ds-line);border-radius:16px;background:var(--ds-card);color:var(--ds-ink);text-align:left;font-family:MCInter,Inter,sans-serif;white-space:normal}
#blad .bf-foto .bf-keuze-hoofd{border-color:#315de7;background:#315de7;color:#fff}
#blad .bf-foto .bf-keuze-hoofd:hover{filter:brightness(.94)}
.bf-keuze-icoon{flex:none;width:32px;height:32px;display:grid;place-items:center}
.bf-keuze-tekst{display:flex;flex-direction:column;gap:4px;min-width:0}
.bf-keuze-tekst b{font-size:15px;line-height:21px;font-weight:600}
.bf-keuze-uitleg{font-size:12px;line-height:17px;font-weight:400;color:var(--ds-muted)}
.bf-keuze-hoofd .bf-keuze-uitleg{color:#edf2ff}
#blad .bf-foto .bf-klaar{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:0;padding:0 16px;border:1px solid var(--ds-line);border-radius:12px;background:var(--ds-card);color:var(--ds-ink);font:600 14px/20px MCInter,Inter,sans-serif}
.bf-voet{font-size:12px;line-height:18px;color:var(--ds-muted)}
#blad .bf-foto[data-verstuurd] .bf-pagina-keuze,.bf-foto[data-verstuurd] .bf-status-x{display:none}
.bf-foto[data-verstuurd] .bf-status{background:var(--ds-mint);color:var(--ds-teal)}
/* de vergroting van de foto (#vergroot uit app.js) */
.bf-vergroot-beeld img{margin:auto;background:#0b1422}  /* in het midden; groot (2×) blijft helemaal te scrollen */

/* ---------- pc: het venster in het midden ---------- */
@media (min-width:900px){
  #blad:has(>.bf-melding){width:480px;max-width:calc(100vw - 48px);padding:15px 24px 2px;border-radius:28px;border-bottom:1px solid var(--ds-line);max-height:calc(100dvh - 48px)}
  #blad:has(>.bf-melding.bf-meer){width:560px}
  #blad:has(>.bf-foto){width:min(1000px,calc(100vw - 48px));max-width:none;border-radius:20px;border-bottom:1px solid var(--ds-line);max-height:calc(100dvh - 48px)}
  #blad:has(>.bf-foto)>.blad-sluit{top:29px;right:24px}
  .bf-foto-kop{padding:24px 92px 24px 24px}
  .bf-foto-romp{flex-direction:row;align-items:flex-start;gap:24px;padding:24px}
  .bf-foto-links{flex:0 1 432px}
  .bf-foto-vak{height:clamp(260px,calc(100dvh - 280px),440px)}
  .bf-foto-rechts{flex:1 1 496px;gap:20px}
  .bf-foto-intro{display:flex;flex-direction:column;gap:20px}
  .bf-foto-intro h4{font:700 18px/26px MCManrope,Manrope,sans-serif;color:var(--ds-ink)}
  .bf-foto-intro p{font-size:14px;line-height:20px;color:var(--ds-muted)}
}
