/* De klant-app van Nissio. Regels: Pulse/plannen/Klant_App_Huisstijl_v1.md.
   Kleuren gelijk aan de website (100digital-site/src/styles/tokens.css); geen
   nieuwe hexcodes en geen blauw. Een stylesheet en alleen klassen: de CSP staat
   geen inline stijl toe. */

:root {
  /* Vlakken */
  --bg: #fbfaf6; --surface: #fff; --surface2: #f0efe8; --surface3: #e8e7e0;
  /* Tekst. --text3 haalt geen AA: alleen voor uitgeschakeld en versiering. */
  --text: #1a1a18; --text2: #6b6b67; --text3: #9a9a96;
  --border: rgba(0, 0, 0, 0.09); --border-strong: rgba(0, 0, 0, 0.45);
  /* Merk. De gewone kleur is voor vlakken en lijnen, -ink voor tekst en iconen. */
  --orange: #EF8D16; --orange-soft: rgba(239, 141, 22, 0.12); --orange-ink: #A15F06; --on-orange: #1a1a18;
  --green: #5E8F6B; --green-soft: rgba(94, 143, 107, 0.15); --green-ink: #4A6E56;
  --red: #B55A4F; --red-soft: rgba(181, 90, 79, 0.12); --red-ink: #7d3d36;
  /* Letterschaal: de maten van de website op telefoonformaat. */
  --fs-nav: 12px; --fs-xs: 13.12px; --fs-sm: 14.4px; --fs-md: 16px; --fs-btn: 16.8px; --fs-base: 17px; --fs-lg: 17px; --fs-lede: 16px; --fs-xl: 22px; --fs-2xl: 22px;
  /* Vorm */
  --radius: 12px; --radius-sm: 8px; --radius-xs: 4px; --radius-lg: 20px; --radius-pill: 999px;
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .14); --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --tap: 44px; --toast-ok: #4A6E56; --crop-bg: #1a1a18;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; font-size: var(--fs-base); line-height: 1.45; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 2px; }
.num, input.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.center { text-align: center; }
.small { font-size: var(--fs-sm); color: var(--text2); line-height: 1.45; }
.strong { font-weight: 700; }
.ico { flex: none; vertical-align: -3px; }
pulse-app, app-shell, app-login { display: block; height: 100%; }

.splash { height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-2xl); }
.wordmark { display: block; height: 30px; width: auto; margin: 0 auto; }
.nav .logo .wordmark { height: 24px; margin: 0; }

/* ---- schil ---- */
.shell { display: flex; height: 100%; }
.col { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; height: 100%; }
.top {
  display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 16px 6px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.adm {
  display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-base); flex: 1; min-width: 0; min-height: var(--tap);
  background: none; border: none; padding: 0; color: var(--text); text-align: left; cursor: pointer;
}
.adm:disabled { cursor: default; color: var(--text); }
.adm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm .admt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
/* Domeinnaam boven de administratie, alleen als die over meer domeinen verspreid zijn. */
.adm .admd { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang {
  border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 700; color: var(--text2);
  min-width: var(--tap); min-height: var(--tap); padding: 0 12px; background: var(--surface); cursor: pointer;
}
/* Tandwiel naar Account, naast de taal (Account staat niet meer in de onderbalk). */
.gear {
  display: flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text2); cursor: pointer; padding: 0;
}
.gear.on, .gear.via { color: var(--orange-ink); border-color: var(--orange); }
.main { flex: 1; overflow: auto; padding: 16px 16px calc(150px + var(--safe-b)); }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface);
  border-top: 1px solid var(--border); display: flex; padding: 6px 4px calc(8px + var(--safe-b));
}
.nav .logo { display: none; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: var(--fs-nav); line-height: 1.2; font-weight: 640;
  color: var(--text2); background: none; border: none; cursor: pointer; padding: 4px 0;
}
.tab.on { color: var(--orange-ink); }
.tab.web { display: none; }
/* Ongelezen antwoorden op Berichten. */
.tab { position: relative; }
.tab .badge {
  position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--orange); color: var(--on-orange); font-size: var(--fs-xs); font-weight: 700; line-height: 17px; text-align: center;
}

/* web: zijbalk i.p.v. tabbladen (plan §3) */
@media (min-width: 820px) {
  .nav {
    position: static; flex-direction: column; width: 230px; border-top: none; border-right: 1px solid var(--border);
    padding: 16px 10px; gap: 2px;
  }
  .nav .logo { display: block; font-weight: 700; font-size: var(--fs-base); padding: 4px 10px 16px; }
  .tab {
    flex: none; flex-direction: row; gap: 10px; padding: 10px; border-radius: var(--radius-sm); font-size: var(--fs-md);
    color: var(--text2); justify-content: flex-start;
  }
  .tab.on { background: var(--orange-soft); color: var(--orange-ink); }
  .tab.web { display: flex; }
  .gear.via { color: var(--text2); border-color: var(--border); } /* Documenten heeft op het web een eigen plek */
  .tab .badge { position: static; margin-left: auto; }
  .main { padding: 24px 32px 40px; }
  .main > * { display: block; max-width: 820px; }
}

/* ---- inhoud ---- */
h2 { font-size: var(--fs-md); text-transform: none; letter-spacing: 0; color: var(--text); margin: 20px 2px 8px; font-weight: 640; }
.hello { font-size: var(--fs-2xl); line-height: 1.25; letter-spacing: -.015em; font-weight: 700; margin: 4px 2px 6px; }
.hello2 { color: var(--text2); font-size: var(--fs-md); margin: 0 2px 14px; line-height: 1.45; }
.h { font-size: var(--fs-lg); line-height: 1.3; font-weight: 640; margin: 0 0 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.card.plain { border-top: none; border: 1px solid var(--border); }
.card.left { text-align: left; }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.rowbtn { width: 100%; background: none; border: none; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; color: var(--text); }
.ic {
  width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--surface2); display: flex; align-items: center;
  justify-content: center; color: var(--text2); flex: none;
}
.ic.o { background: var(--orange-soft); color: var(--orange-ink); }
.ic.g { background: var(--green-soft); color: var(--green-ink); }
.ic.r { background: var(--red-soft); color: var(--red-ink); }
.ic.big { width: 56px; height: 56px; border-radius: var(--radius); margin: 0 auto 12px; }
.rt { flex: 1; min-width: 0; }
.rt b { display: block; font-size: var(--fs-base); line-height: 1.3; font-weight: 640; }
.rt small { display: block; color: var(--text2); font-size: var(--fs-sm); margin-top: 2px; line-height: 1.4; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.btn {
  border: 1px solid transparent; background: var(--orange-soft); border-radius: var(--radius-sm); padding: 8px 16px; min-height: var(--tap);
  font-size: var(--fs-md); font-weight: 640; line-height: 1.25; color: var(--text); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.p { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
.btn.g { background: none; border: none; color: var(--text2); }
.btn.full { width: 100%; padding: 10px 16px; min-height: 46px; font-size: var(--fs-md); margin-top: 8px; }
.btn.big { padding: 10px 16px; min-height: 46px; font-size: var(--fs-md); }
.btn:disabled { opacity: .55; cursor: default; }
.back { padding-left: 0; }
.st { font-size: var(--fs-xs); font-weight: 700; border-radius: var(--radius-pill); padding: 3px 9px; white-space: nowrap; }
.st.wacht { background: var(--red-soft); color: var(--red-ink); }
.st.bezig { background: var(--orange-soft); color: var(--orange-ink); }
.st.klaar { background: var(--green-soft); color: var(--green-ink); }
.st.plan { background: var(--surface2); color: var(--text2); }
.tag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; color: var(--text2); background: var(--surface2); border-radius: var(--radius-xs); padding: 2px 6px; margin-left: 6px; }
.ch5 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 10px; }
.ch5 button {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 2px;
  font-size: var(--fs-xs); font-weight: 640; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
}
.ch5 button.new { border-color: var(--orange); color: var(--orange-ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 8px 0; }
.three .btn { white-space: normal; flex-direction: column; gap: 4px; padding: 12px 4px; font-size: var(--fs-sm); line-height: 1.2; }
.mailline { text-align: center; overflow-wrap: anywhere; margin: 0 0 8px; }
.mailline button { background: none; border: none; padding: 0 0 0 8px; color: var(--orange-ink); font: inherit; font-weight: 640; cursor: pointer; }
.field { display: block; margin-bottom: 10px; }
.field select + input { margin-top: 8px; }
.field span { display: block; font-size: var(--fs-xs); font-weight: 640; color: var(--text2); margin-bottom: 4px; }
.field input, .field select, .field textarea, input.otp {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; font-size: var(--fs-md); background: var(--surface); color: var(--text);
}
input.otp { text-align: center; letter-spacing: 10px; font-size: var(--fs-2xl); font-weight: 700; margin: 10px 0; font-variant-numeric: tabular-nums; }
.match { border: 1px dashed var(--orange); border-radius: var(--radius); padding: 12px; background: var(--orange-soft); margin-bottom: 10px; }
.seg { display: flex; background: var(--surface2); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: none; background: none; padding: 8px; border-radius: 6px; min-height: var(--tap); font-weight: 640; font-size: var(--fs-sm); color: var(--text2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); }
.lock { text-align: center; padding: 28px 8px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.thumb { position: relative; margin: 0; width: 72px; height: 96px; border-radius: var(--radius-xs); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; font-size: var(--fs-xs); font-weight: 700; color: var(--text2); gap: 4px; }
.thumb .edit { display: block; width: 100%; height: 100%; padding: 0; border: none; background: none; cursor: pointer; }
/* Fotovak krimpt mee met de zichtbare hoogte, zodat de knoppen eronder altijd in beeld staan (ook met browserbalken). */
.cropbox { --crop-rest: calc(335px + var(--safe-t) + var(--safe-b)); min-height: 200px; max-height: 460px; height: calc(100vh - var(--crop-rest)); height: calc(100dvh - var(--crop-rest)); border-radius: var(--radius-sm); overflow: hidden; background: var(--crop-bg); margin-bottom: 2px; }
.crop-note ~ .cropbox { --crop-rest: calc(400px + var(--safe-t) + var(--safe-b)); }
.cropbox svg { display: block; width: 100%; height: 100%; touch-action: none; }
.cropbox .edge { fill: none; stroke: var(--orange); }
.cropbox .shade { fill: rgba(0, 0, 0, .5); fill-rule: evenodd; }
.cropbox .handle { fill: #fff; stroke: var(--orange); }
.cropbox .hit { fill: transparent; cursor: grab; }
.crop-note { font-size: var(--fs-sm); line-height: 1.4; border-radius: var(--radius-sm); padding: 9px 10px; margin: 0 0 8px; background: var(--orange-soft); color: var(--text); }
.crop-note.e { background: var(--red-soft); color: var(--red-ink); }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(26, 26, 24, .6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.skeleton { height: 160px; border-radius: var(--radius); background: var(--surface2); }
.notice { border-radius: var(--radius-sm); padding: 10px 12px; font-size: var(--fs-sm); }
.notice.err { background: var(--red-soft); color: var(--red-ink); }

/* ---- inzicht ---- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
@media (min-width: 820px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--orange); border-radius: var(--radius); padding: 10px 12px; }
.kpi .l { font-size: var(--fs-xs); color: var(--text2); font-weight: 640; }
.kpi .v { font-size: var(--fs-xl); font-weight: 700; margin-top: 4px; }
.kpi .s { font-size: var(--fs-xs); color: var(--text2); margin-top: 3px; }
.kpi .s.warn { color: var(--red-ink); }
/* Overzicht (PUL-944): aantikbare kaarten, verschil met vorig jaar, staafjes per maand. */
.kpi .l, .kpi .v, .kpi .s { display: block; }
.kpi.tap { width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.kpi .l .chev { float: right; color: var(--text2); font-size: var(--fs-base); line-height: 1; }
.kpi .up { color: var(--green-ink); font-weight: 700; }
.kpi .dn { color: var(--red-ink); font-weight: 700; }
.ov-chart { margin: 8px 0; }
.ov-chart .seg { margin-bottom: 8px; }
.ov-chart-t { font-weight: 640; color: var(--text); margin: 0 0 4px; }
.bars { display: block; width: 100%; height: auto; }
.bars .bar-now { fill: var(--orange); }
.bars .bar-prev { fill: var(--surface3); }
.bars .bar-lbl { fill: var(--text2); font-size: 9px; }
.legend { display: flex; gap: 14px; margin-top: 6px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.legend .lg-now { background: var(--orange); }
.legend .lg-prev { background: var(--surface3); }
/* Debiteuren en crediteuren (PUL-945) */
/* Btw en opzij zetten (PUL-947) */
.vat-calc { margin-top: 4px; }
.rt small.warn { color: var(--red-ink); }
.rt small.vat-pay { font-weight: 640; }
.rt small.vat-pay.ok { color: var(--green-ink); }
.rt small.vat-pay.wait { color: var(--orange-ink); }
.rt small.vat-pay.late { color: var(--red-ink); }
.oi-amt .vat-dir { color: var(--text2); font-size: var(--fs-xs); }
.vat-calc summary { cursor: pointer; color: var(--orange-ink); font-weight: 640; font-size: var(--fs-sm); padding: 6px 0; list-style: none; }
.vat-calc summary::-webkit-details-marker { display: none; }
.vat-calc .spread { padding: 4px 0; font-size: var(--fs-sm); }
.reserve .spread { padding: 6px 0 2px; }
.reserve .small { margin: 0 0 6px; color: var(--text2); }
.reserve .reserve-muted { color: var(--text2); }
.reserve .spread > :last-child { white-space: nowrap; }
/* Bezittingen en schulden (PUL-946) */
.bs-check { margin-top: 6px; }
.bs-check .spread { padding: 4px 0; }
.bs-check .bs-tot { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 9px; }
.bs-check.ok { border-top-color: var(--green); }
.bs-check.ok .bs-tot b { color: var(--green-ink); }
.bs-check.off { border-top-color: var(--red); }
.bs-check.off .bs-tot b { color: var(--red-ink); }
.oi-light { font-weight: 500; }
.oi-muted { color: var(--text2); white-space: nowrap; }
.oi-without { border-style: dashed; }
.oi-without > .small:first-child { margin: 4px 0 2px; }
.oi-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }

/* ---- factuurmaker ---- */
.iline { display: grid; grid-template-columns: 1fr 52px 84px 150px 24px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.iline.head { border-bottom: none; padding-bottom: 0; }
.iline input, .iline select { width: 100%; min-height: var(--tap); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 6px; font-size: var(--fs-md); background: var(--surface); color: var(--text); min-width: 0; }
.iline .x { width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--surface2); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.iline .iamt { position: relative; min-width: 0; }
.iline .iamt.pre::before { content: attr(data-pre); position: absolute; left: 7px; top: 50%; transform: translateY(-50%); color: var(--text2); font-size: var(--fs-md); pointer-events: none; }
.iline .iamt.pre input { padding-left: 20px; }
.btn.addline { margin-top: 10px; border: 1px dashed var(--orange); background: var(--orange-soft); color: var(--orange-ink); }
@media (max-width: 480px) { .iline { grid-template-columns: 1fr 44px 84px 24px; } .iline [data-f=vat_code] { grid-column: 1 / 4; } .iline.head span:nth-child(4) { display: none; } }
.tot { display: flex; justify-content: space-between; font-size: var(--fs-md); padding: 4px 0; }
.tot.b { font-weight: 700; font-size: var(--fs-base); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
/* Vaste totaalbalk boven Opslaan/Versturen. sticky rekent vanaf de
   padding-box van .main (zie .ak-actzone): telefoon -88px = net boven de
   tabbalk, web -40px = onderkant van het scherm. */
view-invoice-edit { display: block; }
.totbar { position: sticky; bottom: -88px; z-index: 4; background: var(--surface); border-top: 2px solid var(--orange); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 10px 14px; margin: 10px 0; }
.totbar-l { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 640; }
.totbar-l b { font-size: var(--fs-xl); font-weight: 700; }
.totbar-s { font-size: var(--fs-xs); color: var(--text2); margin-top: 2px; text-align: right; }
@media (min-width: 820px) { .totbar { bottom: -40px; } }
/* Voorbeeld van de factuur voor versturen (zoals de klant hem krijgt). */
/* Het voorbeeld als A4-blad: echte maat en marges van de pdf, geschaald in .a4-wrap (view-invoice-edit fitA4). */
.a4-wrap { position: relative; overflow: hidden; margin-bottom: 12px; }
.a4-wrap.zoom { overflow-x: auto; }
.invdoc.a4 { width: 210mm; min-height: 297mm; box-sizing: border-box; padding: 16mm 18mm 28mm; transform-origin: top left;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.a4 .invdoc-parties { grid-template-columns: 1fr 1fr; }
.a4-zoom { margin-bottom: 12px; }
.invdoc h2 { color: var(--text); letter-spacing: 0; margin: 0 0 12px; font-size: var(--fs-xl); }
.invdoc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.invdoc-head h2 { margin: 0; }
.invlogo { max-width: 55%; max-height: 56px; object-fit: contain; }
.logo-box { display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 10px; margin-bottom: 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: #fff; }
.logo-box img { max-width: 100%; max-height: 72px; object-fit: contain; }
.logo-box small { color: var(--text2); font-size: var(--fs-sm); text-align: center; }
.invdoc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.invdoc .party { display: flex; flex-direction: column; font-size: var(--fs-sm); line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.invdoc .party small { font-size: var(--fs-xs); font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; }
.invdoc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 8px; font-size: var(--fs-sm); }
.invdoc-meta span { display: block; font-size: var(--fs-xs); color: var(--text2); }
.invdoc-lines .dl { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-md); }
.invdoc-lines .dl.head { font-size: var(--fs-xs); font-weight: 700; color: var(--text2); padding-top: 0; }
.invdoc-lines .dl > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.invdoc-lines .dl small { display: block; color: var(--text2); font-size: var(--fs-sm); margin-top: 2px; }
.invdoc-lines .dl > span:last-child { white-space: nowrap; }
.mailprev h2 { margin: 0 0 8px; font-size: var(--fs-lg); font-weight: 700; }
.mailprev dl { margin: 0 0 10px; }
.mailprev dl div { display: flex; gap: 8px; padding: 3px 0; }
.mailprev dt { flex: none; width: 34%; color: var(--text2); }
.mailprev dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mailbody { padding: 10px 12px; margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--surface2); }
.mailbody p { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.mailbody p:last-child { margin-bottom: 0; }
.invdoc-note, .invdoc-pay { font-size: var(--fs-sm); color: var(--text2); margin: 10px 0 0; }
.notice ul { margin: 4px 0 0; padding-left: 18px; }
/* Filter en concept verwijderen in de lijst met eigen facturen. */
/* Formulier van Nissio in de app (view-form). */
.fm-keuze { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.fm-keuze .btn { flex: 1 1 auto; }
.fm-vink { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-md); }
/* "al bekend" naast de vraag, niet als balk eronder (.field span is een blok). */
.field span .tag { display: inline-block; margin-left: 6px; vertical-align: middle; }
/* Agiostorting: een kaart per aandeelhouder, en een melding die opvalt. */
/* Vorige/Volgende altijd in beeld, vast net boven de tabbalk (iPhone, 05-11-2026).
   Telefoon: position fixed (sticky in een scrollende .main gaf op iOS Safari
   een laatste veld dat achter de balk bleef). Het formulier krijgt onderaan
   ruimte ter hoogte van de balk (view-form meet hem, --fm-acts-h), en een veld
   met focus scrolt boven de balk (scroll-margin). */
.fm-acts { position: fixed; left: 0; right: 0; bottom: calc(62px + var(--safe-b)); z-index: 9; display: grid; gap: 8px; grid-template-columns: 1fr; margin: 0; padding: 10px 16px 12px; background: var(--bg); border-top: 1px solid var(--border); }
.fm-acts.two { grid-template-columns: 1fr 2fr; }
.fm-acts .btn { width: 100%; margin: 0; }
view-form { display: block; padding-bottom: var(--fm-acts-h, 84px); }
view-form input, view-form select, view-form textarea, view-form .fm-keuze { scroll-margin-bottom: calc(var(--fm-acts-h, 84px) + 80px); }
@media (min-width: 820px) {
  .fm-acts { position: sticky; bottom: 0; left: auto; right: auto; margin: 14px 0 0; padding: 10px 0 12px; }
  view-form { padding-bottom: 0; }
}
/* Een veld steekt nooit buiten de kaart (het oude datumveld van iOS deed dat). */
view-form .field input, view-form .field select, view-form .field textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.fm-kaart h3 { font-size: var(--fs-base); margin: 0 0 10px; }
.fm-warn { color: var(--red-ink); }
.card.fm-warn { color: inherit; border-color: rgba(181,90,79,0.45); }
/* Twee velden naast elkaar (row: 2 in het formulier), op de telefoon onder elkaar. */
.fm-half { display: inline-block; width: calc(50% - 6px); vertical-align: top; }
.fm-half + .fm-half { margin-left: 8px; }
@media (max-width: 420px) { .fm-half { display: block; width: auto; } .fm-half + .fm-half { margin-left: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: var(--radius-pill); padding: 7px 12px; font-size: var(--fs-sm); font-weight: 640; cursor: pointer; }
.chip.on { background: var(--orange-soft); border-color: var(--orange); color: var(--text); }
.chip .num { color: var(--text2); font-weight: 700; margin-left: 2px; }
.rowwrap { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border); }
.rowwrap:last-child { border-bottom: none; }
.rowwrap .rowbtn { flex: 1; min-width: 0; border-bottom: none; }
.rowdel { flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--surface2); color: var(--text2); font-size: var(--fs-lg); font-weight: 700; line-height: 1; cursor: pointer; }
.btn.danger, .rowbtn.danger b { color: var(--red-ink); }
.btn.p.danger-p { background: var(--red); border-color: var(--red); color: #fff; }
.failtag { display: inline-block !important; margin-top: 3px; font-size: var(--fs-xs) !important; font-weight: 700; color: var(--red-ink) !important; background: var(--red-soft); border-radius: var(--radius-xs); padding: 1px 6px; }
.notice .probs li { margin: 2px 0; }
.notice.err + .notice.err { margin-top: 8px; }
.notice.err > .btn { margin-top: 4px; }
.notice .probs .btn { padding: 0 0 0 4px; color: inherit; text-decoration: underline; font-weight: 640; }
@media (max-width: 380px) { .invdoc-parties { grid-template-columns: 1fr; } }
.legal { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 640; }
.legal p { margin: 2px 0; }
.acts { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 6px; }
.notice.warn { background: var(--orange-soft); color: var(--text); margin: 6px 0 10px; }
.notice.warn .btn { padding-left: 0; margin-top: 4px; color: var(--text); text-decoration: underline; }
.notice.ok { background: var(--green-soft); color: var(--text); margin-bottom: 10px; }
.notice p { margin: 0 0 4px; }
.notice p:last-child { margin-bottom: 0; }
.ferr { display: block; color: var(--red-ink); font-size: var(--fs-sm); margin-top: 4px; }
.vies { display: inline-block; font-size: var(--fs-xs); font-weight: 640; margin-top: 6px; padding: 3px 8px; border-radius: var(--radius-xs); background: var(--surface2); color: var(--text2); }
.vies.ok { background: var(--green-soft); color: var(--green-ink); }
.vies.invalid { background: var(--orange-soft); color: var(--text); }

/* ---- berichten ---- */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 70px; }
.bub { max-width: 82%; padding: 9px 12px; border-radius: var(--radius); font-size: var(--fs-md); line-height: 1.45; overflow-wrap: anywhere; }
.bub.me { align-self: flex-end; background: var(--orange-soft); border-bottom-right-radius: 4px; }
.bub.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bub.busy { opacity: .7; }
.bub.fail { background: var(--red-soft); }
.bub small { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: var(--fs-xs); color: var(--text2); margin-top: 4px; }
.bub .who { font-size: var(--fs-xs); font-weight: 700; color: var(--text2); margin-bottom: 2px; }
.bub .att { display: flex; gap: 5px; align-items: center; font-size: var(--fs-xs); color: var(--text2); margin-top: 4px; }
.bub .err { display: inline-flex; gap: 4px; align-items: center; color: var(--red-ink); font-weight: 640; }
.bub .lnk { background: none; border: none; padding: 6px 0; font-size: var(--fs-xs); font-weight: 700; color: var(--text); text-decoration: underline; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.attimg { display: block; max-width: 100%; max-height: 65vh; margin: 10px auto; border-radius: var(--radius-xs); object-fit: contain; }
.chat .older { align-self: center; font-size: var(--fs-sm); }
.sys { align-self: center; font-size: var(--fs-xs); color: var(--text2); background: var(--surface2); border-radius: var(--radius-pill); padding: 4px 10px; display: flex; gap: 5px; align-items: center; text-align: center; }
.sys.closed { color: var(--text2); }
.comp {
  position: fixed; left: 0; right: 0; bottom: calc(62px + var(--safe-b)); z-index: 9; background: var(--surface);
  border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; padding: 8px 12px;
}
.comprow { display: flex; gap: 8px; align-items: flex-end; }
.attrow { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); color: var(--text2); }
.attrow[hidden] { display: none; }
.attrow .fname { display: inline-flex; gap: 5px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attrow .x { width: 28px; height: 28px; flex: none; border-radius: 50%; border: none; background: var(--surface2); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.comp .clip { width: 40px; height: 40px; flex: none; border-radius: 50%; border: none; background: none; color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* 16px: kleiner laat iOS bij het tikken inzoomen. */
.comp textarea { flex: 1; min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 9px 14px; font: inherit; font-size: var(--fs-base); line-height: 1.35; background: var(--bg); resize: none; color: var(--text); }
.comp textarea:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
@media (min-width: 820px) { .comp { position: sticky; bottom: 0; left: auto; right: auto; } }

/* ---- berichten: tickets (PUL-771) ---- */
.tk-lijst { display: flex; flex-direction: column; gap: 8px; }
.tk-grp { font-size: var(--fs-xs); font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin: 8px 2px 0; }
.tk-card { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.tk-card.wacht { border-color: rgba(239, 141, 22, .55); box-shadow: inset 3px 0 0 var(--orange); }
.tk-ond { font-weight: 640; }
.tk-last { grid-column: 1 / 3; font-size: var(--fs-sm); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-meta { grid-column: 1 / 3; font-size: var(--fs-xs); color: var(--text2); display: flex; gap: 6px; align-items: center; }
.tk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); display: inline-block; }
.tk-st { font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; height: fit-content; background: var(--surface2); color: var(--text2); }
.tk-st.jouw_antwoord { background: var(--orange); color: var(--on-orange); }
.tk-st.opgelost, .tk-st.afgerond { background: var(--green-soft, rgba(94, 143, 107, .12)); color: var(--green-ink); }
.tk-dicht summary { font-size: var(--fs-sm); color: var(--text2); text-align: center; cursor: pointer; padding: 6px; }
.tk-dicht .tk-card { margin-top: 8px; }
.tk-kop { position: sticky; top: -16px; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.tk-terug { align-self: flex-start; background: none; border: none; color: var(--orange-ink); font-weight: 640; font-size: var(--fs-sm); padding: 0; cursor: pointer; }
.tk-titel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tk-nr { color: var(--text2); font-size: var(--fs-xs); }
.tk-vraag { margin: 0; background: var(--orange-soft); border-radius: var(--radius-sm); padding: 6px 10px; font-size: var(--fs-sm); color: var(--orange-ink); }
.tk-sluit { margin: 0; font-size: var(--fs-xs); color: var(--text2); }
.tk-ok { align-self: flex-start; }
.tk-lab { display: block; font-size: var(--fs-sm); color: var(--text2); margin: 8px 0; }
.tk-lab input, .tk-lab textarea { display: block; width: 100%; margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; font: inherit; font-size: var(--fs-base); background: var(--bg); color: var(--text); }
.tk-att { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.tk-att .btn { display: inline-flex; gap: 6px; align-items: center; }
.tk-att .ico { width: 18px; height: 18px; }

/* ---- inloggen ---- */
.login { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; max-width: 440px; margin: 0 auto; text-align: center; }
.brand { font-weight: 700; font-size: var(--fs-2xl); margin-bottom: 4px; }
.brandsub { color: var(--text2); font-size: var(--fs-md); margin: 0 0 24px; }

/* ---- onderblad en melding ---- */
.sheet { position: fixed; inset: 0; background: rgba(26, 26, 24, .35); display: flex; align-items: flex-end; z-index: 50; }
.sheetin {
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-top: 3px solid var(--orange); width: 100%;
  padding: 16px 16px calc(24px + var(--safe-b)); max-height: 85%; overflow: auto; box-shadow: var(--shadow-lg);
}
.sheetin h3 { margin: 0 0 4px; font-size: var(--fs-lg); }
/* Wisselaar: kopje per domein; per administratie twee tellers, ongelezen
   berichten en taken (mockup 11-11-2026). Dezelfde tellers staan als totaal in de bovenbalk. */
/* Domeinkop: klein oranje kopje in hoofdletters, zodat het niet op een administratie lijkt (Michel, 11-11-2026). */
.swg { margin: 16px 0 0; padding: 6px 0 2px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--orange-ink); }
.swl .swg:first-child { margin-top: 8px; }
.swl .rowbtn { gap: 8px; }
.swl .rowbtn .rt { min-width: 0; flex: 1; display: flex; align-items: center; gap: 6px; }
.swl .rowbtn .rt b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swl .rowbtn .rt .tag { margin-left: 0; flex: none; }
.swcur { flex: none; display: inline-flex; color: var(--orange-ink); }
.cslot { flex: none; width: 60px; display: flex; justify-content: center; }
.cnt { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 700; line-height: 1; }
.cnt.msg { background: var(--orange-soft); color: var(--text); }
.cnt.task { background: var(--orange); color: var(--on-orange); }
.topc { flex: none; display: inline-flex; gap: 6px; margin-left: 4px; }
.topc .cnt { height: 26px; padding: 0 8px; font-size: var(--fs-xs); }
/* Vandaag: er wacht ook iets in een andere administratie. */
.alsobtn { display: flex; align-items: center; gap: 8px; width: 100%; border: none; text-align: left; cursor: pointer; font-size: var(--fs-sm); margin: 0 0 8px; }
.alsobtn span { flex: 1; }
@media (min-width: 820px) {
  .sheet { align-items: center; justify-content: center; }
  .sheetin { width: 420px; border-radius: var(--radius); }
  /* De wisselaar: een dropdown onder de naam in de bovenbalk (app-shell placeDropdown). */
  .sheet.drop { background: transparent; align-items: flex-start; justify-content: flex-start; }
  .sheet.drop .sheetin { position: absolute; top: var(--drop-top, 64px); left: var(--drop-left, 240px);
    max-height: calc(100vh - var(--drop-top, 64px) - 24px); padding-bottom: 16px; box-shadow: var(--shadow-md); border: 1px solid var(--border); border-top: 3px solid var(--orange); }
}
.toast {
  position: fixed; left: 50%; bottom: calc(140px + var(--safe-b)); transform: translateX(-50%); background: var(--toast-ok); color: #fff;
  font-size: var(--fs-sm); font-weight: 640; padding: 10px 16px; border-radius: var(--radius-pill); z-index: 60; max-width: calc(100% - 32px);
  text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.err { background: var(--red); }
.toast.show { opacity: 1; }

/* ---- aandachtspunten: de flow van aanleveren.html (1-op-1, besluit 12-10-2026) ----
   Zelfde maten en vormen als Pulse/Dashboard/repo/aanleveren.html, met het
   voorvoegsel ak- zodat niets botst met de rest van de app. */
view-intake { display: block; }
.ak { display: flex; flex-direction: column; margin: -16px -16px -88px; min-height: calc(100dvh - 114px - var(--safe-b) - var(--safe-t)); background: var(--bg); touch-action: manipulation; }
.ak-i { display: inline-block; vertical-align: -.15em; flex-shrink: 0; }
.ak-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); display: inline-block; }
.ak-intro { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 18px; }
.ak-introtop { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 13px; margin-bottom: 13px; display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); font-weight: 640; }
.ak-introcard { background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--orange); border-radius: var(--radius); padding: 18px 16px; }
.ak-introh { font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; letter-spacing: -.2px; margin-bottom: 8px; }
.ak-introt { font-size: var(--fs-md); line-height: 1.6; color: var(--text2); }
.ak-introl { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 11px; }
.ak-introrij { display: flex; gap: 11px; align-items: flex-start; }
.ak-introic { width: 30px; height: 30px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--orange-soft); color: var(--orange-ink); display: flex; align-items: center; justify-content: center; }
.ak-introkt { font-size: var(--fs-sm); font-weight: 640; line-height: 1.3; }
.ak-introkd { font-size: var(--fs-xs); line-height: 1.45; color: var(--text2); margin-top: 2px; }
.ak-introrust { margin-top: 15px; display: flex; gap: 8px; align-items: flex-start; background: var(--surface2); border-radius: var(--radius-sm); padding: 11px 12px; }
.ak-introrust .ak-i { color: var(--text2); margin-top: 1px; }
.ak-introrust span { font-size: var(--fs-xs); line-height: 1.5; color: var(--text2); }
.ak-introvul { flex: 1; min-height: 16px; }
.ak-introfijn { text-align: center; font-size: var(--fs-xs); color: var(--text2); margin-top: 11px; line-height: 1.5; }
.ak-introfijn a { color: var(--orange-ink); font-weight: 640; text-decoration: none; }
.ak-hd { position: sticky; top: -16px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 9px 16px 10px; z-index: 5; }
.ak-toprow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.ak-brand { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text2); font-weight: 500; }
.ak-ovwbtn { display: flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-pill); padding: 6px 12px; font-size: var(--fs-xs); font-weight: 640; color: var(--text2); cursor: pointer; }
.ak-progbar { height: 6px; border-radius: var(--radius-pill); background: var(--surface3); overflow: hidden; }
.ak-progfill { height: 100%; background: var(--orange); width: 0; transition: width .3s; }
.ak-progrow { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; }
.ak-progtxt { font-size: var(--fs-xs); color: var(--text2); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.ak-body { flex: 1; padding: 14px 18px 8px; }
.ak-khead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ak-knaam { font-size: var(--fs-lg); font-weight: 640; line-height: 1.25; min-width: 0; word-break: break-word; }
.ak-kamt { font-size: var(--fs-lg); font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ak-ksub { font-size: var(--fs-xs); color: var(--text2); margin-top: 3px; }
.ak-ksub b { color: var(--orange-ink); font-weight: 640; text-transform: uppercase; letter-spacing: .4px; font-size: var(--fs-xs); }
.ak-det { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 13px; overflow: hidden; }
.ak-det:empty { display: none; }
.ak-dr { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: var(--fs-sm); border-top: 1px solid rgba(0, 0, 0, .06); }
.ak-dr:first-child { border-top: none; }
.ak-dr.ak-vraag { display: block; line-height: 1.5; white-space: pre-wrap; }
.ak-dk { color: var(--text2); }
.ak-dv { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; word-break: break-word; }
.ak-fold { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: none; font-size: var(--fs-xs); font-weight: 640; color: var(--text2); padding: 12px 2px 0; cursor: pointer; text-align: left; }
.ak-fchev { display: inline-flex; transition: transform .15s; color: var(--text2); }
.ak-fchev.open { transform: rotate(180deg); }
.ak-why { margin-top: 6px; padding: 0 2px; font-size: var(--fs-xs); line-height: 1.5; color: var(--text2); }
/* sticky rekent vanaf de padding-box van .main (padding-bottom 150px +
   safe-area); de tabbalk is 62px + safe-area hoog: 62 - 150 = -88. */
.ak-actzone { position: sticky; bottom: -88px; padding: 10px 14px 12px; background: var(--surface); border-top: 1px solid var(--border); z-index: 4; }
.ak-ibanrow { margin-bottom: 8px; }
/* IBAN en antwoord staan in de inhoud, onder "Waarom vragen we dit?" (iPhone-toetsenbord). */
.ak-invoer { margin-top: 14px; scroll-margin: 16px; }
.ak.ak-typen .ak-actzone { display: none; }
.ak-ibanrow input, .ak-ibanrow textarea { font-family: inherit; width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; font-size: var(--fs-base); letter-spacing: .5px; background: var(--surface); color: var(--text); resize: vertical; }
.ak-ibanrow input:focus, .ak-ibanrow textarea:focus { border-color: var(--orange); }
.ak-ibanfout { font-size: var(--fs-xs); color: var(--red-ink); margin-top: 6px; }
.ak-hint { display: flex; gap: 8px; align-items: flex-start; background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; font-size: var(--fs-xs); line-height: 1.5; color: var(--text2); }
.ak-hint .ak-i { color: var(--text2); margin-top: 1px; }
.ak-hint b { color: var(--text); }
.ak-acts { display: grid; gap: 6px; }
.ak-acts.ak-n1 { grid-template-columns: 1fr; }
.ak-acts.ak-n2 { grid-template-columns: repeat(2, 1fr); }
.ak-acts.ak-n3 { grid-template-columns: repeat(3, 1fr); }
.ak-acts.ak-n4 { grid-template-columns: repeat(4, 1fr); }
.ak-acts.ak-n5 { grid-template-columns: repeat(5, 1fr); }
.ak-b { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 2px; font-size: var(--fs-xs); font-weight: 640; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; text-align: center; }
.ak-b .ak-i { color: var(--text2); }
.ak-b.sel { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-ink); border-width: 1.5px; }
.ak-b.sel .ak-i { color: var(--orange-ink); }
.ak-cbar { margin-top: 10px; }
.ak-crow { display: flex; align-items: center; gap: 8px; }
.ak-arrow { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ak-arrow[disabled] { opacity: .3; cursor: default; }
.ak-cbtn { flex: 1; background: var(--orange); color: var(--on-orange); border: none; border-radius: var(--radius-sm); padding: 13px 8px; font-size: var(--fs-md); font-weight: 640; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.ak-intro .ak-cbtn { flex: 0 0 auto; }
.ak-cbtn[disabled] { background: var(--surface3); color: var(--text3); cursor: default; }
.ak-cbtn.big { flex-direction: column; gap: 2px; padding: 8px; }
.ak-cbtnrow { display: flex; align-items: center; gap: 7px; }
.ak-cbtnsub { font-size: var(--fs-xs); font-weight: 500; opacity: .85; }
.ak-att { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; margin-bottom: 8px; cursor: pointer; }
.ak-attthumb { width: 34px; height: 44px; flex-shrink: 0; background: var(--surface); border: 1px solid rgba(0, 0, 0, .14); border-radius: var(--radius-xs); padding: 6px 5px; display: flex; flex-direction: column; gap: 3px; }
.ak-attline { height: 2px; background: var(--surface3); border-radius: 1px; }
.ak-attline.short { width: 55%; }
.ak-attline.oranje { background: var(--orange); width: 70%; margin-top: auto; }
.ak-attimg { width: 34px; height: 44px; flex-shrink: 0; border-radius: var(--radius-xs); object-fit: cover; border: 1px solid rgba(0, 0, 0, .14); display: block; }
.ak-attgroot { width: 100%; max-height: 480px; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface2); }
.ak-attmid { flex: 1; min-width: 0; }
.ak-attname { font-size: var(--fs-sm); font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-attsub { font-size: var(--fs-xs); color: var(--text2); margin-top: 1px; }
.ak-attx { border: none; background: var(--surface2); border-radius: var(--radius-pill); width: 26px; height: 26px; flex-shrink: 0; color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ak-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 36px 30px; }
.ak-cic { width: 76px; height: 76px; border-radius: 50%; background: var(--green-soft); color: var(--green-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ak-ch { font-size: var(--fs-xl); font-weight: 640; margin-bottom: 8px; }
.ak-ct { font-size: var(--fs-sm); color: var(--text2); line-height: 1.6; max-width: 280px; }
.ak-ovl { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 60; display: flex; align-items: flex-end; }
.ak-sheet { background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 16px 16px calc(22px + var(--safe-b)); width: 100%; max-width: 520px; margin: 0 auto; }
.ak-shh { font-size: var(--fs-base); font-weight: 640; margin: 2px 0 3px; }
.ak-shd { font-size: var(--fs-xs); color: var(--text2); margin-bottom: 14px; line-height: 1.45; }
.ak-shd b { color: var(--text); }
.ak-addr { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface2); border-radius: var(--radius-sm); padding: 12px 13px; margin-bottom: 10px; }
.ak-addrv { font-size: var(--fs-sm); font-weight: 640; word-break: break-all; }
.ak-addrl { font-size: var(--fs-xs); color: var(--text2); font-weight: 640; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.ak-copy { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 11px; font-size: var(--fs-xs); font-weight: 640; color: var(--text2); cursor: pointer; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.ak-mailbtn { width: 100%; background: var(--surface); border: 1px solid var(--orange); color: var(--orange-ink); border-radius: var(--radius-sm); padding: 12px; font-size: var(--fs-sm); font-weight: 640; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 9px; text-decoration: none; }
.ak-confirm { width: 100%; background: var(--orange); color: var(--on-orange); border: none; border-radius: var(--radius-sm); padding: 13px; font-size: var(--fs-md); font-weight: 640; cursor: pointer; }
.ak-cancel { width: 100%; margin-top: 10px; background: var(--surface2); border: none; border-radius: var(--radius-sm); padding: 12px; font-size: var(--fs-sm); font-weight: 640; color: var(--text2); cursor: pointer; }
.ak-cancel.ak-narrow { max-width: 280px; margin-top: 20px; }
.ak-ovw { position: fixed; inset: 0; background: var(--bg); z-index: 61; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.ak-ovwhd { background: var(--surface); border-bottom: 1px solid var(--border); padding: calc(14px + var(--safe-t)) 16px 14px; display: flex; align-items: center; justify-content: space-between; }
.ak-ovwt { font-size: var(--fs-base); font-weight: 640; }
.ak-ovwt span { display: block; font-size: var(--fs-xs); color: var(--text2); font-weight: 400; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ak-ovwx { border: none; background: var(--surface2); border-radius: var(--radius-pill); width: 32px; height: 32px; color: var(--text2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ak-ovwlist { flex: 1; overflow-y: auto; padding: 8px 12px calc(16px + var(--safe-b)); }
.ak-ovwsec { font-size: var(--fs-xs); font-weight: 640; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); margin: 16px 4px 6px; display: flex; align-items: center; gap: 5px; }
.ak-ovwgrp { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: var(--fs-xs); font-weight: 640; color: var(--text2); margin: 12px 4px 4px; padding-bottom: 3px; border-bottom: 1px solid var(--border); }
.ak-ovwgrp span { font-weight: 500; color: var(--text2); font-variant-numeric: tabular-nums; }
.ak-ovwrow { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; margin-bottom: 7px; cursor: pointer; }
.ak-ovwrow.ak-static { cursor: default; }
.ak-oic { width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ak-oic.st-open { background: var(--surface2); color: var(--text2); }
.ak-oic.st-ok { background: var(--green-soft); color: var(--green-ink); }
.ak-oic.st-neu { background: var(--surface3); color: var(--text2); }
.ak-ovwmid { flex: 1; min-width: 0; }
.ak-ovwrel { font-size: var(--fs-sm); font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-ovwsub { font-size: var(--fs-xs); color: var(--text2); font-variant-numeric: tabular-nums; margin-top: 1px; }
.ak-ovwright { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.ak-ovwamt { font-size: var(--fs-sm); font-weight: 640; font-variant-numeric: tabular-nums; }
.ak-ovwst { font-size: var(--fs-xs); font-weight: 640; color: var(--text2); }
.ak-ovwst.ok { color: var(--green-ink); }
.ak-ovwst.neu { color: var(--text2); }
@media (min-width: 820px) {
  .ak { margin: -24px 0 -40px; max-width: 520px; min-height: calc(100dvh - 110px); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .ak-hd { top: -24px; }
  .ak-actzone { bottom: 0; }
  .ak-ovl { align-items: center; }
  .ak-sheet { max-width: 420px; border-radius: var(--radius-lg); }
}

/* ---- vreemde valuta en vaste facturen (pulse-api#259, mockup factuurmaker v2) ---- */
/* Euro-blok bij een factuur in een andere munt: oranje-zacht, laatste regel grijs. */
.fxblock { background: var(--orange-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0 4px; font-size: var(--fs-sm); }
.fxblock p { margin: 0 0 3px; }
.fxblock p:last-child { margin-bottom: 0; }
.fxblock .small { color: var(--text2); }
/* Rechterkolom in de lijst vaste facturen: bedrag met "incl. btw" eronder. */
.amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.amt small { font-size: var(--fs-xs); color: var(--text2); }
.amt.muted b { color: var(--text2); }
.card.muted { opacity: .6; }
/* Keuzerondjes met uitleg (versturen, alleen deze keer / alle volgende). */
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.radio input { margin-top: 3px; accent-color: var(--orange); }
.radio small { display: block; color: var(--text2); font-size: var(--fs-sm); line-height: 1.45; margin-top: 2px; }
code.ph { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--fs-xs); background: var(--surface2); border-radius: var(--radius-xs); padding: 1px 4px; }

/* ---- antwoordadres bevestigen (PUL-950) ----
   Stand onder het veld Antwoordadres (pil uit .st), de link "Opnieuw sturen"
   en het publieke bevestigscherm (#/reply-to). */
.rstate { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 12px; font-size: var(--fs-sm); line-height: 1.45; color: var(--text2); }
.rstate .st { flex: none; font-size: var(--fs-xs); padding: 2px 8px; }
.rstate b { color: var(--text); font-weight: 640; overflow-wrap: anywhere; }
.linkbtn { background: none; border: none; padding: 0; font: inherit; font-weight: 640; color: var(--orange-ink); cursor: pointer; }
.linkbtn:disabled { opacity: .55; cursor: default; }
.notice.warn b { overflow-wrap: anywhere; }
app-reply-to { display: block; height: 100%; }
.rt-card { text-align: center; padding: 26px 18px; }
.rt-text { color: var(--text2); line-height: 1.5; font-size: var(--fs-md); margin: 6px 0 10px; }
.rt-text b { color: var(--text); overflow-wrap: anywhere; }

/* Inzicht v2: omzet en kosten per rekening (PUL-943) */
.lg-sub { margin: 0 2px 12px; }
.lg-custom { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-items: end; margin-bottom: 4px; }
.lg-custom .btn, .lg-custom #lg-err { grid-column: 1 / -1; }
.lg-custom[hidden], #lg-err[hidden] { display: none; }
.lg-group summary { list-style: none; cursor: pointer; font-size: var(--fs-md); }
.lg-group summary::-webkit-details-marker { display: none; }
.lg-cmp { text-align: right; margin: 2px 0 4px; color: var(--text2); }
.lg-acc { gap: 10px; }
.lg-acc .rt b { font-weight: 500; }
.lg-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.lg-amt small { color: var(--text2); font-size: var(--fs-xs); }
.lg-chev { color: var(--text2); font-size: var(--fs-lg); }
.lg-result .spread { font-size: var(--fs-base); }
.lg-line .rt b { font-weight: 500; }
.lg-line { gap: 10px; }
.lg-detail { margin: 4px 0 14px; }
.lg-detail .spread { padding: 7px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.lg-detail .spread b { font-weight: 500; text-align: right; }
.small.warn { color: var(--red-ink); }

/* ---- afstemming met de website (Klant_App_Huisstijl_v1) ---- */
/* Waar je bent: donkere tekst plus een oranje streep, niet alleen kleur. Zelfde regel als de websitekop. */
.tab.on { color: var(--text); box-shadow: inset 0 2px 0 var(--orange); }
.tab.on .ico { color: var(--orange-ink); }
@media (min-width: 820px) {
  .tab.on { background: var(--orange-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--orange); }
}
/* Raakvlak 44px, ook waar de knop zelf kleiner oogt. */
.chip, .ak-ovwbtn, .linkbtn, .iline .x, .attrow .x, .ak-attx, .rowdel, .tk-terug, .bub .lnk, .mailline button, .notice .btn { position: relative; }
.chip::after, .ak-ovwbtn::after, .linkbtn::after, .iline .x::after, .attrow .x::after, .ak-attx::after, .rowdel::after, .tk-terug::after, .bub .lnk::after, .mailline button::after, .notice .btn::after {
  content: ''; position: absolute; inset: 50% auto auto 50%; width: max(100%, var(--tap)); height: var(--tap); transform: translate(-50%, -50%);
}
.chip { min-height: 40px; padding: 8px 14px; }
/* Maten en lucht zoals op de website: de klant is geen expert. */
.hello2 { font-size: var(--fs-sm); line-height: 1.4; margin: 0 2px 10px; }
h2 { margin: 16px 2px 6px; }
/* Knoppen: een fel oranje hoofdknop, de rest zacht oranje, nooit wit. Alleen Terug is tekst. */
.card.actie { border-top: 2px solid var(--orange); }
.btn.g, .btn.addline { background: var(--orange-soft); border: 1px solid transparent; color: var(--text); }
.btn.back { background: none; padding-left: 0; color: var(--text2); }
.linkbtn, .mailline button, .bub .lnk { background: var(--orange-soft); color: var(--text); padding: 6px 12px; border-radius: var(--radius-sm); text-decoration: none; }
.notice.warn { background: var(--surface2); }
.notice .btn { background: var(--orange-soft); color: var(--text); padding: 6px 12px; text-decoration: none; }
.row { min-height: var(--tap); }
.notice.warn .btn { padding-left: 12px; text-decoration: none; }
/* Lijsten: geen icoontegels, status is een stip met tekst. */
.row > .ic:not(.big), .rowbtn > .ic:not(.big) { display: none; }
.chev { flex: none; display: flex; color: var(--text2); }
.st, .tk-st { background: none !important; padding: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 640; }
.st::before, .tk-st::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tk-st.jouw_antwoord { color: var(--red-ink); }
.fselect { display: block; width: 100%; min-height: var(--tap); margin: 0 0 8px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: var(--fs-md); }
.row { padding: 8px 0; }
.ic { width: 32px; height: 32px; }
.rt small { margin-top: 1px; }
.two .btn, .three .btn { white-space: normal; padding-left: 10px; padding-right: 10px; }
.tk-card { padding: 10px 12px; }
@media (min-width: 820px) { .card { padding: 14px 18px; } }
.notice .btn { min-height: 0; }
.thumb .x { width: 28px; height: 28px; }
summary, .ak-fold, .alsobtn { min-height: var(--tap); }
summary.spread { align-items: center; }
.tk-dicht summary, .vat-calc summary { padding: 12px 6px; }
/* Keuzeveld: de browserpijl heeft ruimte nodig, anders valt EUR weg op een smal scherm. */
.field select { padding-left: 10px; padding-right: 4px; }
/* Sectiekopjes: zelfde vorm als het oranje kopje op de website. */
.tk-grp, .ak-ovwsec { color: var(--text); font-size: var(--fs-md); font-weight: 640; text-transform: none; letter-spacing: 0; }
/* Keuze in een hele zin, zoals de keuzeblokken in het offerteformulier. Tik = meteen doen. */
.keuzes { display: grid; gap: 8px; margin-top: 8px; }
.keuze { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 8px 16px; background: var(--orange-soft); border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-md); font-weight: 640; line-height: 1.25; text-align: center; cursor: pointer; }
.keuze.on { border-color: var(--orange); background: var(--orange-soft); }
@media (hover: hover) { .keuze:hover { filter: brightness(.96); } }
@media (hover: hover) {
  .btn:hover { filter: brightness(.96); }
  .btn.p:hover { background: var(--orange); filter: brightness(.94); }
  .btn.p.danger-p:hover { background: var(--red); }
  .rowbtn:hover, .tk-card:hover, .kpi.tap:hover { background: var(--surface2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- chat: emoji kiezen en emoji los in het gesprek ---- */
.bub.emoji-los { background: none; border: none; padding: 0; font-size: var(--fs-2xl); line-height: 1.15; }
.bub.emoji-los .who { font-size: var(--fs-xs); }
.emoji-zoek { display: block; width: 100%; min-height: var(--tap); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: var(--fs-md); }
.emoji-lijst { max-height: 46vh; overflow: auto; margin: 4px 0 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tap), 1fr)); }
.emoji-grid button { min-height: var(--tap); border: none; background: none; font-size: var(--fs-xl); line-height: 1; cursor: pointer; border-radius: var(--radius-sm); }
@media (hover: hover) { .emoji-grid button:hover { background: var(--surface2); } }

/* ---- donkere stand: zie src/lib/theme.ts (automatisch, licht of donker) ----
   Warm donker, geen blauw. Oranje vlakken blijven gelijk en houden donkere tekst.
   Factuurvoorbeeld en logovak blijven licht: dat is het papier van de klant. */
/* Het merkteken stond op een vaste plek; Vandaag toont het op de telefoon, het web heeft de zijbalk. */
.today-logo { height: 30px; margin: 0 0 16px 2px; }
@media (min-width: 820px) { .today-logo { display: none; } }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161513; --surface: #211f1c; --surface2: #2c2a26; --surface3: #3a3732;
  --text: #f4f3ee; --text2: #b5b3ab; --text3: #7d7b74;
  --border: rgba(255, 255, 255, 0.12); --border-strong: rgba(255, 255, 255, 0.36);
  --orange-soft: rgba(239, 141, 22, 0.18); --orange-ink: #F5A94D;
  --green-soft: rgba(94, 143, 107, 0.24); --green-ink: #A3CDAF;
  --red-soft: rgba(181, 90, 79, 0.26); --red-ink: #EDB0A6;
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55); --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .wordmark { content: url(/icons/nissio-logo-dark.svg); }
[data-theme="dark"] .invdoc, [data-theme="dark"] .logo-box {
  color-scheme: light; background: #fff; color: #1a1a18;
  --text: #1a1a18; --text2: #6b6b67; --text3: #6b6b67; --surface: #fff; --surface2: #f0efe8;
  --border: rgba(0, 0, 0, 0.09); --border-strong: rgba(0, 0, 0, 0.18);
}
[data-theme="dark"] .ak-dr { border-top-color: var(--border); }
[data-theme="dark"] .ak-attthumb, [data-theme="dark"] .ak-attimg { border-color: var(--border-strong); }
[data-theme="dark"] .btn.p:hover { filter: brightness(1.06); }

/* ---- aanleveren per onderdeel en de teller op Vandaag (klanttaken, 10-11-2026) ---- */
.tel { min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--orange); color: var(--on-orange); font-size: var(--fs-xs); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kopregel { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kopregel .h { margin: 0; font-size: var(--fs-2xl); }
.van { font-size: var(--fs-sm); color: var(--text2); white-space: nowrap; }
.terug { min-height: 32px; margin: -6px 0 0 -4px; }
.kv { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.35; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.kv dt { color: var(--text2); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv-vraag { margin: 6px 0; white-space: pre-wrap; }
.bestand { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; margin-top: 12px; color: var(--text); }
.bestand span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.klaar { text-align: center; padding: 28px 18px 18px; }
.klaar .ak-cic { margin: 0 auto 14px; }
a.btn { text-decoration: none; }

/* ---- Backoffice vanuit Pulse (src/lib/backoffice.ts) ----
   De balk is altijd oranje met donkere tekst, ook bij thema Donker, zodat
   je nooit vergeet dat je niet de klant zelf bent (mockup 11-11-2026). */
html.bo body { display: flex; flex-direction: column; }
html.bo pulse-app { flex: 1 1 auto; min-height: 0; height: auto; }
.bo-bar { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 12px; background: var(--orange); color: var(--on-orange); font-size: var(--fs-sm); position: relative; z-index: 70; }
.bo-naam { flex: 1 1 160px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bo-group { display: inline-flex; background: rgba(255, 255, 255, .55); border-radius: var(--radius-sm); padding: 2px; }
.bo-seg { border: 0; background: none; color: var(--on-orange); font: inherit; font-weight: 640; min-height: 36px; padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.bo-seg.on { background: var(--on-orange); color: #fff; }
.bo-close { border: 0; background: var(--on-orange); color: #fff; font: inherit; font-weight: 640; min-height: 36px; padding: 4px 14px; border-radius: var(--radius-sm); cursor: pointer; }
.bo-seg:focus-visible, .bo-close:focus-visible { outline: 3px solid var(--on-orange); outline-offset: 2px; }
html.bo-phone pulse-app { display: none; }
.bo-stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 20px 0; background: var(--bg); }
.bo-frame { width: 390px; height: 844px; max-height: calc(100dvh - 100px); border: 8px solid var(--crop-bg); border-radius: 36px; background: var(--bg); flex: none; }
.bo-hint { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface2); color: var(--text); font-size: var(--fs-sm); }
.bo-expired { padding: 48px 24px; }
.bo-expired p { margin-top: 16px; color: var(--text2); }
