/* ============================================================================
   CoachDossier — Weisfelt-modules · component-laag
   Bouwt uitsluitend op tokens.css. Laad ná tokens.css + nav-footer-system.css.
   ========================================================================== */

/* ---- App-romp ---------------------------------------------------------- */
.wd-main { flex: 1; width: 100%; }
.wd-wrap, .wd-wrap-inner { max-width: var(--content-max); margin: 0 auto; padding: var(--space-7) var(--space-5) var(--space-9); }
.wd-wrap.narrow, .wd-wrap-inner.narrow { max-width: var(--reading-max); }
[data-screen] { display: none; }
[data-screen].active { display: block; }

/* ---- ID-banner (dossier) ----------------------------------------------- */
.cd-idbanner { display: flex; align-items: center; gap: .6rem; font-size: var(--text-sm); color: var(--action); background: var(--action-soft); border: 1px solid color-mix(in oklab, var(--action) 20%, var(--border)); border-radius: var(--radius-md); padding: .65rem .9rem; margin-bottom: var(--space-5); }
.cd-idbanner svg { flex-shrink: 0; }
.cd-idbanner b { color: var(--brand-strong); font-family: var(--font-display); }

/* ---- Zone-tag ---------------------------------------------------------- */
.zone-tag { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: var(--radius-pill); vertical-align: middle; }
.zone-tag.b { background: var(--action-soft); color: var(--action); }
.zone-tag.a { background: var(--danger-soft); color: var(--danger); }

/* ---- ID-keuze: 5 voorstellen ------------------------------------------- */
.cd-idopts { display: flex; flex-wrap: wrap; gap: .5rem; }
.cd-idopt { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--brand-strong); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-pill); padding: .35rem .9rem .35rem .4rem; cursor: pointer; transition: all var(--dur-fast); }
.cd-idopt:hover { border-color: var(--action); background: var(--action-soft); }
.cd-idopt.sel { border-color: var(--action); background: var(--action-soft); }
.cd-idchosen { display: flex; align-items: center; gap: .8rem; background: var(--action-soft); border: 1px solid color-mix(in oklab, var(--action) 25%, var(--border)); border-radius: var(--radius-md); padding: .8rem 1rem; }
.cd-idchosen-id { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-extra); color: var(--brand-strong); }
.cd-idundo { background: none; border: none; color: var(--action); font-weight: var(--weight-semibold); cursor: pointer; text-decoration: underline; font-size: inherit; }

/* ---- Uitbreidings-helper (details) ------------------------------------- */
.cd-helper { margin-top: var(--space-4); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-2); }
.cd-helper > summary { cursor: pointer; padding: .7rem .9rem; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); display: flex; align-items: center; gap: .5rem; list-style: none; }
.cd-helper > summary::-webkit-details-marker { display: none; }
.cd-helper > summary::after { content: "▸"; margin-left: auto; color: var(--text-subtle); transition: transform var(--dur-fast); }
.cd-helper[open] > summary::after { transform: rotate(90deg); }
.cd-helper-tag { font-family: var(--font-mono); font-size: 9px; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: var(--radius-pill); }
.cd-helper-body { padding: 0 .9rem 1rem; }

/* ---- Connection rows (instellingen) ------------------------------------ */
.cd-conn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .7rem 1rem; margin-bottom: .5rem; }
.cd-conn > div:first-child { color: var(--action); display: flex; }
.cd-conn b { font-size: var(--text-sm); color: var(--text); }

/* ---- Mini-select (filters) --------------------------------------------- */
.wd-mini-select { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .4rem .6rem; cursor: pointer; }
.wd-mini-select:focus { outline: none; border-color: var(--action); box-shadow: var(--shadow-ring); }

/* ---- LLM-goedkeurflow (beheer) ----------------------------------------- */
.cd-llmwarn { display: flex; gap: .6rem; font-size: var(--text-sm); line-height: 1.55; color: var(--clay-700); background: var(--clay-50); border: 1px solid var(--clay-100); border-radius: var(--radius-md); padding: .8rem .9rem; margin-bottom: var(--space-4); }
.cd-llmwarn svg { flex-shrink: 0; color: var(--accent); }
.cd-llmwarn code { font-family: var(--font-mono); font-size: .82em; background: var(--surface); padding: 1px 5px; border-radius: var(--radius-xs); }
.cd-llmlist { display: flex; flex-direction: column; gap: .4rem; }
.cd-llmrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: var(--weight-semibold); color: var(--text); }
.cd-llmrow.ok { background: var(--success-soft); border-color: var(--sage-100); }
.cd-llmrow.no { opacity: .55; }
.cd-llmacts { display: flex; gap: .4rem; }

/* ---- QR-placeholder (2FA) ---------------------------------------------- */
.cd-qr { width: 96px; height: 96px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border-strong); display: flex; align-items: center; justify-content: center; color: var(--text-subtle); margin-top: .6rem; }
@keyframes wd-fade { from { transform: translateY(6px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { [data-screen].active { animation: none; } }

/* ---- Page-header (bestaande grammatica) -------------------------------- */
.wd-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); flex-wrap: wrap; }
.wd-ph-eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent); }
.wd-ph-title { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: var(--weight-extra); letter-spacing: -.025em; color: var(--brand-strong); margin-top: .35rem; line-height: 1.05; }
.wd-ph-sub { font-size: var(--text-base); color: var(--text-muted); max-width: 60ch; margin-top: .6rem; line-height: 1.6; }

/* ---- Knoppen ----------------------------------------------------------- */
.wd-btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-semibold); border-radius: var(--radius-sm); padding: .6rem 1.1rem; cursor: pointer; border: 1px solid transparent; text-decoration: none; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); white-space: nowrap; }
.wd-btn svg { width: 16px; height: 16px; }
.wd-btn-primary { background: var(--action); color: #fff; }
.wd-btn-primary:hover { background: var(--action-hover); }
.wd-btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.wd-btn-ghost:hover { border-color: var(--action); color: var(--action); }
.wd-btn-sm { padding: .4rem .75rem; font-size: var(--text-xs); }

/* ---- Cliënt-sigil (procedureel "bloei"-motief, geseed uit ID) ---------- */
.cd-sigil { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--surface-2); flex-shrink: 0; overflow: hidden; }
.cd-sigil svg { display: block; width: 100%; height: 100%; }
.cd-sigil.s-sm { width: 34px; height: 34px; border-radius: var(--radius-sm); }
.cd-sigil.s-md { width: 44px; height: 44px; }
.cd-sigil.s-lg { width: 64px; height: 64px; border-radius: var(--radius-lg); }

/* ---- Houding-tag (accent-spine codering) ------------------------------- */
.cd-houding { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--h-color, var(--text-muted)); }
.cd-houding::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--h-color, var(--stone-400)); }

/* ---- Cliëntenlijst (tabel) --------------------------------------------- */
.wd-toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: var(--space-5); }
.wd-search { position: relative; flex: 1; min-width: 220px; }
.wd-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-subtle); }
.wd-search input { width: 100%; font-family: var(--font-sans); font-size: var(--text-sm); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .7rem .55rem 2.1rem; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.wd-search input:focus { outline: none; border-color: var(--action); box-shadow: var(--shadow-ring); }
.wd-filterpill { font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: .45rem .85rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all var(--dur-fast); }
.wd-filterpill:hover { border-color: var(--action); color: var(--action); }
.wd-filterpill.on { background: var(--brand-deep); color: #fff; border-color: var(--brand-deep); }
.wd-count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-subtle); margin-left: auto; }

.wd-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.wd-table thead th { text-align: left; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--weight-semibold); color: var(--text-subtle); padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.wd-row { cursor: pointer; transition: background var(--dur-fast); border-left: 3px solid var(--h-color, transparent); }
.wd-row > td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: var(--text-sm); color: var(--text); }
.wd-table tbody tr:last-child > td { border-bottom: none; }
.wd-row:hover { background: var(--surface-2); }
.wd-row-id { display: flex; align-items: center; gap: .7rem; }
.wd-row-id .id-words { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-base); color: var(--brand-strong); letter-spacing: -.01em; }
.wd-cell-struct { display: inline-flex; align-items: center; gap: .45rem; }
.wd-mini-steps { display: inline-flex; align-items: center; gap: 2px; }
.wd-mini-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--surface-sunken); }
.wd-mini-dot.done { background: var(--action); }
.wd-mini-dot.cur { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.wd-stepnum { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
.wd-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }
.wd-status { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: var(--radius-pill); }
.wd-status.actief { background: var(--success-soft); color: var(--sage-700); }
.wd-status.gearchiveerd { background: var(--surface-sunken); color: var(--text-subtle); }

/* ---- Cliënt-identiteitsbalk -------------------------------------------- */
.cd-clientbar { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: var(--space-2); border-left: 4px solid var(--h-color, var(--action)); }
.cd-cb-body { flex: 1; min-width: 0; }
.cd-cb-eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-subtle); }
.cd-cb-id { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-extra); color: var(--brand-strong); letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
.cd-cb-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .5rem; }
.cd-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-xs); color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--radius-pill); }
.cd-chip b { color: var(--text); font-weight: var(--weight-semibold); }
.cd-cb-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* ---- Per-cliënt subtabs (onderlijn-grammar, echo van cdbar) ------------ */
.cd-subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--space-6); }
.cd-subtab { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1rem; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-muted); background: none; border: none; border-bottom: 2.5px solid transparent; cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast); margin-bottom: -1px; }
.cd-subtab svg { width: 16px; height: 16px; opacity: .8; }
.cd-subtab:hover { color: var(--text); }
.cd-subtab.active { color: var(--brand-strong); border-bottom-color: var(--action); }

/* ---- Section-card (Bloei) ---------------------------------------------- */
.wd-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: var(--space-5); overflow: hidden; }
.wd-card-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.wd-card-head h3 { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--brand-strong); letter-spacing: -.01em; }
.wd-card-head .wd-card-eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: var(--weight-semibold); margin-left: auto; }
.wd-card-body { padding: 1.2rem 1.1rem; }
.wd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 640px) { .wd-grid-2 { grid-template-columns: 1fr; } }
.cd-fieldgroup-lab { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); font-weight: var(--weight-semibold); margin: var(--space-4) 0 var(--space-2); padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.cd-fieldgroup-lab:first-child { margin-top: 0; }

/* ---- Formuliervelden --------------------------------------------------- */
.wd-field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: var(--space-4); }
.wd-field:last-child { margin-bottom: 0; }
.wd-label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-muted); }
.wd-label .req { color: var(--accent); }
.wd-hint { font-size: var(--text-xs); color: var(--text-subtle); }
.wd-input, .wd-textarea, .wd-select { font-family: var(--font-sans); font-size: var(--text-base); color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .7rem; width: 100%; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.wd-textarea { resize: vertical; min-height: 78px; line-height: 1.6; }
.wd-input:focus, .wd-textarea:focus, .wd-select:focus { outline: none; border-color: var(--action); box-shadow: var(--shadow-ring); }
.wd-input[readonly] { background: var(--surface); color: var(--text-muted); border-style: dashed; cursor: default; }
.wd-rubriek-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--action-soft); color: var(--action); font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-bold); margin-right: .35rem; }

/* ---- Inline naam-hint (zachte detectie) -------------------------------- */
.cd-namehint { display: none; align-items: flex-start; gap: .45rem; font-size: var(--text-xs); color: var(--clay-700); background: var(--clay-50); border: 1px solid var(--clay-100); border-radius: var(--radius-sm); padding: .4rem .6rem; margin-top: .35rem; line-height: 1.5; }
.cd-namehint.show { display: flex; }
.cd-namehint svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* ---- Rustige toelichting (amber, geen error) --------------------------- */
.cd-note { display: flex; gap: .6rem; font-size: var(--text-sm); line-height: 1.6; color: var(--clay-700); background: var(--clay-50); border: 1px solid var(--clay-100); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: .8rem .9rem; margin-top: var(--space-3); }
.cd-note svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.cd-note em { font-style: italic; }

/* ---- Privacy-waarschuwing zone A --------------------------------------- */
.cd-zonewarn { display: flex; gap: .6rem; font-size: var(--text-sm); line-height: 1.6; color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-100); border-left: 3px solid var(--danger); border-radius: var(--radius-sm); padding: .8rem .9rem; margin-bottom: var(--space-5); }
.cd-zonewarn svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.cd-zonewarn b { font-weight: var(--weight-bold); }

/* ---- Behandelplan: stappen-rail ---------------------------------------- */
.cd-model { margin-bottom: var(--space-6); }
.cd-model-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: var(--space-4); }
.cd-model-head h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--brand-strong); }
.cd-model-head .sub { font-size: var(--text-sm); color: var(--text-muted); }
.cd-model-head .legend { margin-left: auto; display: flex; gap: .8rem; font-size: var(--text-2xs); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); }
.cd-model-head .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.lg-done { background: var(--action); }
.lg-cur { background: var(--accent); }
.lg-plan { background: var(--surface-sunken); }

.cd-rail { display: flex; gap: .5rem; }
.cd-rail.cols7 > * { flex: 1; }
.cd-step { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .7rem .7rem .65rem; cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); min-width: 0; }
.cd-step:hover { border-color: var(--action); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cd-step:focus-visible { outline: none; box-shadow: var(--shadow-ring); }
.cd-step-top { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.cd-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold); background: var(--surface-sunken); color: var(--text-subtle); flex-shrink: 0; }
.cd-step-name { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); line-height: 1.2; }
.cd-step-kort { font-size: var(--text-xs); color: var(--text-subtle); line-height: 1.4; }
.cd-step[data-state="done"] { border-color: color-mix(in oklab, var(--action) 40%, var(--border)); }
.cd-step[data-state="done"] .cd-step-num { background: var(--action); color: #fff; }
.cd-step[data-state="cur"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cd-step[data-state="cur"] .cd-step-num { background: var(--accent); color: #fff; }
.cd-step-flag { position: absolute; top: -9px; right: 8px; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .05em; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: var(--radius-pill); display: none; }
.cd-step[data-state="cur"] .cd-step-flag { display: block; }
@media (max-width: 720px) { .cd-rail { flex-direction: column; } .cd-rail.cols7 > * { flex: none; } .cd-step { display: flex; align-items: center; gap: .7rem; } .cd-step-top { margin-bottom: 0; } .cd-step-body { flex: 1; } }

/* ---- Behandelplan: kruis-map (dwarsdoorsnede) -------------------------- */
.cd-crossmap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cd-cm-row { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--border); }
.cd-cm-row:last-child { border-bottom: none; }
.cd-cm-strat { display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; background: var(--surface-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text); border-right: 1px solid var(--border); }
.cd-cm-strat .n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text-muted); flex-shrink: 0; }
.cd-cm-strat.s-done { background: color-mix(in oklab, var(--action) 10%, var(--surface-2)); }
.cd-cm-strat.s-done .n { background: var(--action); color: #fff; border-color: var(--action); }
.cd-cm-strat.s-cur { background: var(--accent-soft); }
.cd-cm-strat.s-cur .n { background: var(--accent); color: #fff; border-color: var(--accent); }
.cd-cm-cells { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .7rem .9rem; }
.cd-cm-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--radius-pill); }
.cd-cm-chip .cn { font-family: var(--font-mono); font-weight: var(--weight-bold); color: var(--text); }
.cd-cm-chip.b-done { background: color-mix(in oklab, var(--action) 12%, var(--surface)); border-color: color-mix(in oklab, var(--action) 35%, var(--border)); color: var(--action); }
.cd-cm-chip.b-done .cn { color: var(--action); }
.cd-cm-chip.b-cur { background: var(--accent-soft); border-color: var(--accent); color: var(--clay-700); }
.cd-cm-chip.b-cur .cn { color: var(--clay-700); }
@media (max-width: 640px) { .cd-cm-row { grid-template-columns: 1fr; } .cd-cm-strat { border-right: none; border-bottom: 1px solid var(--border); } }

/* ---- Sessieoverzicht --------------------------------------------------- */
.cd-sesslist { display: flex; flex-direction: column; gap: .5rem; }
.cd-sess { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .8rem 1rem; cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.cd-sess:hover { border-color: var(--action); box-shadow: var(--shadow-sm); }
.cd-sess-nr { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-extra); color: var(--brand-strong); }
.cd-sess-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }
.cd-sess-steps { display: flex; gap: .35rem; }
.cd-sess-preview { font-size: var(--text-sm); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .cd-sess { grid-template-columns: auto 1fr; } .cd-sess-preview { grid-column: 1 / -1; white-space: normal; } }

/* ---- Toolbox: structuurprofiel-kaarten --------------------------------- */
.cd-struct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: var(--space-4); }
.cd-scard { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.1rem 1rem 1.2rem; cursor: pointer; display: flex; flex-direction: column; gap: .5rem; overflow: hidden; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), border-color var(--dur-base); box-shadow: var(--shadow-xs); }
.cd-scard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--h-color, var(--action)); }
.cd-scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in oklab, var(--h-color, var(--action)) 45%, var(--border)); }
.cd-scard-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--brand-strong); letter-spacing: -.01em; }
.cd-scard-leertaak { font-size: var(--text-sm); color: var(--text-muted); font-style: italic; line-height: 1.5; flex: 1; }
.cd-scard-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .2rem; }
.cd-scard-foot .open { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--action); }
.cd-scard-foot .open svg { width: 13px; height: 13px; }

/* (slide-over + cd-prof-* CSS verwijderd — de toolbox toont structuren/technieken nu inline) */

/* ---- Donker-toggle (demo) ---------------------------------------------- */
/* In deep mode is --brand-strong nog steeds donker; koppen die hem gebruiken
   krijgen hier een lichte kleur zodat ze leesbaar blijven op het donkere doek. */
:root[data-surface="deep"] .wd-ph-title,
:root[data-surface="deep"] .wd-card-head h3,
:root[data-surface="deep"] .cd-cb-id,
:root[data-surface="deep"] .cd-model-head h3,
:root[data-surface="deep"] .cd-subtab.active,
:root[data-surface="deep"] .wd-row-id .id-words,
:root[data-surface="deep"] .cd-scard-name,
:root[data-surface="deep"] .cd-sheet-title,
:root[data-surface="deep"] .cd-sess-nr { color: var(--on-brand); }
:root[data-surface="deep"] #wd-app-wrap { background: var(--canvas); }

.wd-theme { display: inline-flex; align-items: center; gap: .4rem; }
.wd-theme button { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border-onbrand); background: transparent; color: var(--on-brand-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--dur-fast); }
.wd-theme button:hover { background: rgba(255,255,255,.08); color: #fff; }
.wd-theme button svg { width: 16px; height: 16px; }

/* ---- Empty/inert hint -------------------------------------------------- */
.wd-inert { text-align: center; padding: var(--space-9) var(--space-5); color: var(--text-subtle); }
.wd-inert svg { width: 40px; height: 40px; margin-bottom: var(--space-3); color: var(--stone-400); }
.wd-inert h3 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--text-muted); font-weight: var(--weight-bold); }
.wd-inert p { font-size: var(--text-sm); max-width: 42ch; margin: .4rem auto 0; line-height: 1.6; }

/* ====================================================================== */
/* CLIËNT AANMAKEN — ID-generatie                                          */
/* ====================================================================== */
.cd-create { max-width: 720px; margin: 0 auto; }
.cd-idgen { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.cd-idgen-stage { padding: var(--space-7) var(--space-6); text-align: center; background: radial-gradient(120% 100% at 50% 0%, var(--surface-2), var(--surface)); border-bottom: 1px solid var(--border); }
.cd-idgen-label { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .12em; color: var(--text-subtle); }
.cd-idgen-display { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }
.cd-idgen-sigil { animation: cd-pop var(--dur-base) var(--ease-out); }
@keyframes cd-pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.cd-idgen-id { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: var(--weight-extra); color: var(--brand-strong); letter-spacing: -.03em; line-height: 1; }
.cd-idgen-id .wd-flip { display: inline-block; }
.cd-idgen-controls { display: flex; gap: .6rem; justify-content: center; margin-top: var(--space-5); flex-wrap: wrap; }
.cd-idgen-body { padding: var(--space-6); }
.cd-zoneexplain { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
@media (max-width: 640px) { .cd-zoneexplain { grid-template-columns: 1fr; } }
.cd-zone { border-radius: var(--radius-md); padding: 1rem 1.1rem; border: 1px solid var(--border); }
.cd-zone.a { background: var(--danger-soft); border-color: var(--danger-100); }
.cd-zone.b { background: var(--success-soft); border-color: var(--sage-100); }
.cd-zone-head { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--weight-semibold); margin-bottom: .5rem; }
.cd-zone.a .cd-zone-head { color: var(--danger); }
.cd-zone.b .cd-zone-head { color: var(--sage-700); }
.cd-zone-head svg { width: 15px; height: 15px; }
.cd-zone p { font-size: var(--text-sm); line-height: 1.6; color: var(--text-muted); }
.cd-zone ul { list-style: none; margin-top: .5rem; display: flex; flex-direction: column; gap: .25rem; }
.cd-zone li { font-size: var(--text-xs); color: var(--text-muted); padding-left: 1rem; position: relative; }
.cd-zone li::before { content: ""; position: absolute; left: 0; top: .5em; width: 5px; height: 5px; border-radius: 50%; }
.cd-zone.a li::before { background: var(--danger); }
.cd-zone.b li::before { background: var(--sage-600); }

/* ====================================================================== */
/* ZONE A — afgeschermde identiteitskluis                                  */
/* ====================================================================== */
.cd-vault { border: 1px solid var(--danger-100); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cd-vault-head { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; background: var(--danger-soft); border-bottom: 1px solid var(--danger-100); }
.cd-vault-head svg { width: 20px; height: 20px; color: var(--danger); flex-shrink: 0; }
.cd-vault-head h3 { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--danger); }
.cd-vault-head .sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }
.cd-vault-head .wd-status { margin-left: auto; }
.wd-status.zoneA { background: var(--danger); color: #fff; }
.cd-vault-body { padding: 1.2rem; background: var(--surface); position: relative; }
.cd-vault-locked { filter: blur(7px); pointer-events: none; user-select: none; opacity: .65; }
.cd-vault-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); text-align: center; padding: var(--space-5); background: color-mix(in oklab, var(--surface) 78%, transparent); }
.cd-vault-cover svg { width: 34px; height: 34px; color: var(--danger); }
.cd-vault-cover p { font-size: var(--text-sm); color: var(--text-muted); max-width: 38ch; line-height: 1.55; }
.cd-vault.open .cd-vault-locked { filter: none; pointer-events: auto; user-select: auto; opacity: 1; }
.cd-vault.open .cd-vault-cover { display: none; }

/* ====================================================================== */
/* OAUTH-STAPPEN (instellingen)                                            */
/* ====================================================================== */
.cd-steps-flow { display: flex; flex-direction: column; gap: 0; }
.cd-flowstep { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding-bottom: var(--space-5); position: relative; }
.cd-flowstep:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 2px; background: var(--border); }
.cd-flowstep.done:not(:last-child)::before { background: var(--action); }
.cd-flowstep-num { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--text-sm); background: var(--surface-2); color: var(--text-subtle); border: 1px solid var(--border-strong); flex-shrink: 0; z-index: 1; }
.cd-flowstep.done .cd-flowstep-num { background: var(--action); color: #fff; border-color: var(--action); }
.cd-flowstep.cur .cd-flowstep-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.cd-flowstep h4 { font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--text); }
.cd-flowstep p { font-size: var(--text-sm); color: var(--text-muted); margin-top: .2rem; line-height: 1.55; }
.cd-flowstep .wd-btn { margin-top: .7rem; }

/* ====================================================================== */
/* BEHEER — woordenlijsten + drempels                                      */
/* ====================================================================== */
.cd-wordcloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.cd-word { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--text-sm); color: var(--text); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 6px 4px 11px; border-radius: var(--radius-pill); }
.cd-word button { width: 17px; height: 17px; border-radius: 50%; border: none; background: transparent; color: var(--text-subtle); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cd-word button:hover { background: var(--danger-soft); color: var(--danger); }
.cd-addword { display: inline-flex; gap: .35rem; }
.cd-addword input { width: 130px; font-family: var(--font-sans); font-size: var(--text-sm); padding: 4px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); }
.cd-addword input:focus { outline: none; border-color: var(--action); border-style: solid; }
.cd-drempel { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.cd-drempel:last-child { border-bottom: none; }
.cd-drempel-info b { font-size: var(--text-sm); color: var(--text); font-weight: var(--weight-semibold); }
.cd-drempel-info .k { font-size: var(--text-xs); color: var(--text-subtle); margin-top: 1px; }
.cd-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; }
.cd-seg button { font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-medium); padding: 3px 10px; border: none; background: transparent; color: var(--text-muted); border-radius: var(--radius-xs); cursor: pointer; }
.cd-seg button.on { background: var(--surface); color: var(--action); box-shadow: var(--shadow-xs); font-weight: var(--weight-semibold); }
/* Toggle-switch */
.cd-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.cd-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cd-switch .track { position: absolute; inset: 0; background: var(--surface-sunken); border-radius: var(--radius-pill); transition: background var(--dur-fast); }
.cd-switch .thumb { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast); }
.cd-switch input:checked ~ .track { background: var(--action); }
.cd-switch input:checked ~ .thumb { transform: translateX(16px); }
.cd-switch input:focus-visible ~ .track { box-shadow: var(--shadow-ring); }

/* ====================================================================== */
/* ONBOARDING                                                              */
/* ====================================================================== */
.cd-onboard { max-width: 640px; margin: 0 auto; }
.cd-onboard-hero { text-align: center; margin-bottom: var(--space-7); }
.cd-onboard-hero .mark { width: 56px; height: 56px; margin: 0 auto var(--space-3); }
.cd-onboard-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--space-5); margin-bottom: var(--space-4); display: flex; align-items: flex-start; gap: var(--space-4); }
.cd-onboard-card .ic { width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--action-soft); color: var(--action); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cd-onboard-card .ic svg { width: 20px; height: 20px; }
.cd-onboard-card h4 { font-family: var(--font-display); font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--brand-strong); }
.cd-onboard-card p { font-size: var(--text-sm); color: var(--text-muted); margin-top: .25rem; line-height: 1.6; }
.cd-onboard-check { margin-left: auto; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--success); color: #fff; display: flex; align-items: center; justify-content: center; }
.cd-onboard-check svg { width: 14px; height: 14px; }

/* ====================================================================== */
/* EXPORT / PRINT                                                          */
/* ====================================================================== */
.cd-export-opts { display: flex; flex-direction: column; gap: .5rem; }
.cd-export-opt { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: border-color var(--dur-fast); }
.cd-export-opt:hover { border-color: var(--action); }
.cd-export-opt input { width: 18px; height: 18px; accent-color: var(--action); flex-shrink: 0; }
.cd-export-opt .lbl b { font-size: var(--text-sm); color: var(--text); }
.cd-export-opt .lbl p { font-size: var(--text-xs); color: var(--text-subtle); margin-top: 1px; }
.cd-export-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); }
.cd-paper { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: var(--space-5); max-width: 360px; margin: 0 auto; }
.cd-paper-h { display: flex; align-items: center; gap: .5rem; border-bottom: 2px solid var(--brand-deep); padding-bottom: .5rem; margin-bottom: .8rem; }
.cd-paper-h .mark { width: 22px; height: 22px; }
.cd-paper-h b { font-family: var(--font-display); font-size: var(--text-sm); color: var(--brand-strong); }
.cd-paper-line { height: 7px; background: var(--surface-sunken); border-radius: 2px; margin-bottom: .5rem; }
.cd-paper-line.s { width: 60%; }
.cd-paper-line.m { width: 85%; }

/* ====================================================================== */
/* EERSTE SESSIE — formulier met steprail, benaderingen, AI-hypothese      */
/* ====================================================================== */
.es-layout { display: grid; grid-template-columns: 210px 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 880px) { .es-layout { grid-template-columns: 1fr; } .es-steprail { display: none; } }
.es-steprail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.es-steprail .sr-label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--text-subtle); padding: 0 0 .6rem .15rem; }
.es-step { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--dur-fast); border: none; background: none; text-align: left; width: 100%; }
.es-step:hover { background: var(--surface-2); }
.es-step.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.es-step .num { width: 23px; height: 23px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-semibold); border: 1.5px solid var(--border-strong); color: var(--text-subtle); background: var(--surface); }
.es-step.active .num { background: var(--action); border-color: var(--action); color: #fff; }
.es-step .lab { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-muted); line-height: 1.25; }
.es-step.active .lab { color: var(--text); font-weight: var(--weight-semibold); }
.es-progress { margin-top: var(--space-4); }
.es-progress .bar { height: 5px; background: var(--surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.es-progress .bar i { display: block; height: 100%; background: var(--action); border-radius: var(--radius-pill); transition: width var(--dur-base); }
.es-progress .ptext { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-subtle); margin-top: .4rem; }

.es-section { margin-bottom: var(--space-5); scroll-margin-top: 80px; }

/* Testcase-balk */
.es-testcase { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--action-soft); border: 1px solid color-mix(in oklab, var(--action) 25%, var(--border)); border-radius: var(--radius-md); padding: .6rem .9rem; margin-bottom: var(--space-5); }
.es-testcase .tc-label { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--weight-semibold); color: var(--action); display: inline-flex; align-items: center; gap: .4rem; }
.es-testcase select { flex: 1; min-width: 200px; font-family: var(--font-sans); font-size: var(--text-sm); padding: .45rem .6rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.es-testcase .tc-loaded { display: none; font-size: var(--text-xs); color: var(--sage-700); font-weight: var(--weight-medium); }
.es-testcase-note { font-size: var(--text-xs); color: var(--text-subtle); margin: -.4rem 0 var(--space-5); padding-left: .2rem; }

/* Vier benaderingen */
.es-benaderingen { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-3); }
@media (max-width: 640px) { .es-benaderingen { grid-template-columns: 1fr; } }
.es-benadering { display: flex; flex-direction: column; gap: .3rem; }
.es-benadering .bl { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--brand-strong); }
.es-benadering .bs { font-size: var(--text-xs); color: var(--text-subtle); line-height: 1.45; }

/* Hypothese-knop + kader */
.es-hyp-btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: .6rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent-soft); color: var(--clay-700); cursor: pointer; transition: background var(--dur-fast); }
.es-hyp-btn:hover:not(:disabled) { background: color-mix(in oklab, var(--accent) 18%, var(--surface)); }
.es-hyp-btn:disabled { opacity: .5; cursor: not-allowed; }
.es-hyp-btn svg { width: 15px; height: 15px; }
.es-loader { display: none; align-items: center; gap: .5rem; color: var(--action); font-size: var(--text-sm); margin-top: .7rem; }
.es-dots { display: inline-flex; gap: 3px; }
.es-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--action); animation: es-bounce 1.2s infinite ease-in-out both; }
.es-dots span:nth-child(1) { animation-delay: -.32s; } .es-dots span:nth-child(2) { animation-delay: -.16s; }
@keyframes es-bounce { 0%,80%,100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.es-hyp-kader { display: none; margin-top: var(--space-4); background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 30%, var(--border)); border-left: 4px solid var(--accent); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.es-hyp-label { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--weight-semibold); color: var(--clay-700); }
.es-hyp-label svg { width: 14px; height: 14px; }
.es-hyp-kader p.toel { font-size: var(--text-base); line-height: 1.7; color: var(--text); margin: .6rem 0 .4rem; }
.es-hyp-kader p.disc { font-size: var(--text-xs); color: var(--text-muted); font-style: italic; }

/* Structuur-grid (groepen + pills) */
.es-structuur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: .6rem; }
@media (max-width: 640px) { .es-structuur-grid { grid-template-columns: 1fr; } }
.es-struct-groep { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.es-struct-head { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .06em; font-weight: var(--weight-semibold); color: #fff; padding: .45rem .7rem; }
.es-struct-pills { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem; }
.es-pill { cursor: pointer; }
.es-pill input { position: absolute; opacity: 0; pointer-events: none; }
.es-pill span { display: inline-block; font-size: var(--text-xs); font-weight: var(--weight-medium); padding: 4px 11px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); color: var(--text-muted); background: var(--surface); transition: all var(--dur-fast); }
.es-pill:hover span { border-color: var(--pk, var(--action)); color: var(--pk, var(--action)); }
.es-pill input:checked + span { background: var(--pk, var(--action)); border-color: var(--pk, var(--action)); color: #fff; }
.es-pill.voorstel span { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.es-pill { position: relative; display: inline-flex; align-items: center; }
.es-pill.voorstel::after { content: "voorstel"; font-family: var(--font-mono); font-size: 8px; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--accent); padding: 1px 4px; border-radius: var(--radius-pill); margin-left: -6px; align-self: flex-start; position: relative; z-index: 1; }
.es-ernst-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.es-ernst span { border-radius: var(--radius-pill); }
.es-ernst input:checked + span { background: var(--action); border-color: var(--action); color: #fff; }

/* Concept-blok */
.es-concept { display: none; margin-top: var(--space-6); padding-top: var(--space-6); border-top: 2px dashed var(--border-strong); }
.es-concept-textarea { width: 100%; font-family: var(--font-sans); font-size: var(--text-sm); line-height: 1.65; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: .7rem .8rem; resize: vertical; }
.es-concept-textarea:focus { outline: none; border-color: var(--action); box-shadow: var(--shadow-ring); }

/* ====================================================================== */
/* BEHEER — gebruikersbeheer + sub-tabs                                     */
/* ====================================================================== */
.wd-table .type-pill { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.type-pill.actief { background: var(--success-soft); color: var(--sage-700); }
.type-pill.demo { background: var(--accent-soft); color: var(--clay-700); }
.type-pill.verlopen { background: var(--danger-soft); color: var(--danger); }
.type-pill.inactief { background: var(--surface-sunken); color: var(--text-subtle); }
.type-pill.admin { background: transparent; color: var(--action); border: 1px solid var(--action); }
.wd-table tr.rij-verlopen > td { background: color-mix(in oklab, var(--danger) 5%, transparent); }
.wd-incasso-auto { color: var(--sage-700); font-weight: var(--weight-semibold); font-size: var(--text-xs); }
.wd-incasso-op { color: var(--accent); font-weight: var(--weight-semibold); font-size: var(--text-xs); }
.wd-incasso-hand { color: var(--text-subtle); font-size: var(--text-xs); }
.wd-actiebtn { font-family: var(--font-sans); font-size: var(--text-2xs); font-weight: var(--weight-semibold); padding: 3px 9px; border-radius: var(--radius-xs); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.wd-actiebtn:hover { border-color: var(--action); color: var(--action); }
.wd-actiebtn.groen:hover { border-color: var(--success); color: var(--sage-700); }
.wd-actiebtn.rood:hover { border-color: var(--danger); color: var(--danger); }
.wd-datum-kritiek { color: var(--danger); font-weight: var(--weight-semibold); }

/* ====================================================================== */
/* PROFIEL — accountoverzicht + facturen                                    */
/* ====================================================================== */
.cd-account-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-4); }
.cd-acc-item .lab { font-family: var(--font-mono); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); margin-bottom: .2rem; }
.cd-acc-item .val { font-size: var(--text-base); color: var(--text); font-weight: var(--weight-medium); }
.cd-acc-item .val.big { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--brand-strong); }
.cd-factuur { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.cd-factuur:last-child { border-bottom: none; }
.cd-factuur .fnr { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }
.cd-factuur .fbedrag { font-weight: var(--weight-semibold); color: var(--text); }
@media (max-width: 600px) { .cd-factuur { grid-template-columns: 1fr auto; gap: .3rem .8rem; } .cd-factuur .fplan { grid-column: 1 / -1; color: var(--text-subtle); font-size: var(--text-xs); } }

/* ====================================================================== */
/* UITLEG — hoe werkt het                                                   */
/* ====================================================================== */
.cd-hw-steps { display: flex; flex-direction: column; gap: 0; counter-reset: hw; }
.cd-hw-step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding-bottom: var(--space-6); position: relative; }
.cd-hw-step:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: -2px; width: 2px; background: var(--border); }
.cd-hw-num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-deep); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-md); flex-shrink: 0; z-index: 1; }
.cd-hw-step h3 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--brand-strong); }
.cd-hw-step p { font-size: var(--text-base); color: var(--text-muted); line-height: 1.65; margin-top: .3rem; max-width: 60ch; }
.cd-hw-callout { display: flex; gap: .7rem; background: var(--action-soft); border: 1px solid color-mix(in oklab, var(--action) 22%, var(--border)); border-radius: var(--radius-md); padding: 1rem 1.1rem; margin-top: var(--space-5); }
.cd-hw-callout svg { width: 20px; height: 20px; color: var(--action); flex-shrink: 0; margin-top: 1px; }
.cd-hw-callout p { font-size: var(--text-sm); color: var(--text); line-height: 1.6; }

/* ====================================================================== */
/* ABONNEMENT — plankeuze + Mollie (registratie / verlengen)               */
/* ====================================================================== */
.cd-planpick { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-2); }
@media (max-width: 560px) { .cd-planpick { grid-template-columns: 1fr; } }
.cd-plan { display: flex; flex-direction: column; gap: .12rem; text-align: left; padding: 1rem 1.1rem; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.cd-plan:hover { border-color: var(--action); }
.cd-plan.sel { border-color: var(--action); box-shadow: 0 0 0 3px var(--action-soft); }
.cd-plan-naam { font-family: var(--font-display); font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--brand-strong); }
.cd-plan-prijs { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--text); }
.cd-plan-per { font-size: var(--text-xs); color: var(--text-subtle); }
.cd-plan-sub { font-size: var(--text-xs); color: var(--text-muted); margin-top: .25rem; }
.cd-molliebadge { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--text-xs); color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: .4rem .8rem; margin-top: var(--space-3); }
.cd-molliebadge svg { width: 15px; height: 15px; color: var(--action); }

/* ====================================================================== */
/* DEMO-MODUS — banner + uitgeschakelde acties                             */
/* ====================================================================== */
.wd-demobar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--clay-700, #8a4b32); color: #fff; font-size: var(--text-sm); box-shadow: 0 -2px 12px rgba(0,0,0,.18); }
.wd-demobar svg { flex-shrink: 0; }
.wd-demobar span { flex: 1; line-height: 1.4; }
.wd-demobar b { font-weight: var(--weight-bold); }
.wd-demobar button { flex-shrink: 0; font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: .35rem .8rem; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.wd-demobar button:hover { background: rgba(255,255,255,.22); }
html.wd-demo body { padding-bottom: 52px; }
.is-demolocked { opacity: .45 !important; cursor: not-allowed !important; pointer-events: auto; position: relative; }
.is-demolocked::after { content: "demo"; font-family: var(--font-mono); font-size: 8px; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .04em; margin-left: .4rem; opacity: .8; }

/* ── Flash-meldingen (server-rendered app) ─────────────────────────────── */
.wd-flash { margin-bottom: var(--space-4); }
.wd-flash p { background: var(--accent-soft); border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--border)); color: var(--text); padding: .6rem .9rem; border-radius: var(--radius-md); font-size: var(--text-sm); }
.cdbar-nav a.on { color: #fff; font-weight: var(--weight-semibold); }

/* ── Thema-toggle in de app-balk ───────────────────────────────────────── */
.wd-theme { display: inline-flex; }
.wd-theme button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border-radius: var(--radius-pill); border: 1px solid var(--border-onbrand); background: transparent; color: var(--on-brand-muted); cursor: pointer; transition: color var(--dur-fast), background var(--dur-fast); }
.wd-theme button:hover { color: var(--on-brand); background: rgba(255,255,255,.08); }

/* Pagina-achtergrond volgt het thema (licht/donker) — geldt voor de app-schermen. */
body.wd-body { background: var(--canvas); color: var(--text); min-height: 100vh; transition: background var(--dur-base), color var(--dur-base); }
:root[data-surface="deep"] body.wd-body { background: var(--canvas); }
