/* ZZP-administratie. Tokens uit design/_ds/.../colors_and_type.css,
   componenten volgens design/Administratie v2.dc.html (inline styles
   overgenomen als klassen, maten 1-op-1). */

/* Fonts lokaal (latin-subset van Google Fonts, OFL): Cormorant Garamond 600, Nunito Sans variabel. */
@font-face { font-family: 'Cormorant Garamond'; src: url('fonts/CormorantGaramond.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('fonts/NunitoSans.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --xap-blue: rgb(10, 58, 111);
  --xap-blue-700: rgb(8, 47, 90);
  --xap-blue-300: rgb(120, 152, 187);
  --xap-aqua: rgb(76, 169, 183);
  --xap-aqua-700: rgb(58, 142, 156);
  --xap-aqua-100: rgb(225, 240, 243);
  --xap-green: rgb(129, 175, 55);
  --xap-green-700: rgb(105, 145, 42);

  --xap-white: #ffffff;
  --xap-paper: #fbfcfd;
  --xap-cloud: #f5f7fa;
  --xap-mist: #eef2f6;
  --xap-border: #e5e7eb;
  --xap-rule: #d8dee5;
  --xap-muted: #6b7280;
  --xap-muted-2: #9aa3af;
  --xap-ink: rgb(10, 58, 111);

  --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  --shadow-md: 0 4px 10px rgba(10, 58, 111, 0.08), 0 2px 4px rgba(10, 58, 111, 0.04);
  --shadow-lg: 0 14px 30px rgba(10, 58, 111, 0.10), 0 6px 10px rgba(10, 58, 111, 0.05);
  --shadow-focus: 0 0 0 3px rgba(76, 169, 183, 0.35);

  --ease-standard: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-base: 200ms;
}

/* --- basis ---------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: var(--xap-blue);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
input, select, button, textarea { font-family: var(--font-sans); }
a { color: var(--xap-aqua); text-decoration: none; }
a:hover { color: var(--xap-green); }
button, .knop, .tekstknop, .nav a, .klikrij { transition: color var(--dur-base) var(--ease-standard), background var(--dur-base) var(--ease-standard); }
h1, h2 { color: var(--xap-blue); }

/* --- header ---------------------------------------------------------------- */

.kopbalk { border-bottom: 1px solid var(--xap-border); background: #fff; }
.kopbalk-in {
  max-width: 1320px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 40px;
}
.woordmerk { display: flex; align-items: baseline; gap: 10px; font-size: 16px; letter-spacing: 0.02em; }
.woordmerk b { font-weight: 700; }
.woordmerk .pijp { color: var(--xap-aqua); }
.woordmerk .logo { align-self: center; height: 30px; width: auto; margin-right: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.nav a {
  border-bottom: 2px solid transparent; color: var(--xap-muted); padding: 8px 0;
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em; line-height: normal;
}
.nav a.actief { color: var(--xap-blue); border-bottom-color: var(--xap-aqua); }
.icoon { width: 1em; height: 1em; flex: none; }

/* Mobiel (toevoeging, zie AFWIJKINGEN.md): tandwiel in de kopbalk en een tabbalk onderin. */
.kop-instellingen, .tabbar { display: none; }
.kop-instellingen { width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 24px; color: var(--xap-muted); border-radius: 6px; }
.kop-instellingen.actief { color: var(--xap-blue); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: #fff; border-top: 1px solid var(--xap-border);
  padding: 0 max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-right));
}
.tabbar a {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 2px 6px; border-top: 2px solid transparent; margin-top: -1px;
  color: var(--xap-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3;
}
.tabbar a .icoon { font-size: 24px; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a.actief { color: var(--xap-blue); border-top-color: var(--xap-aqua); }
.tabbar a:hover, .kop-instellingen:hover { color: var(--xap-blue); }

/* Menu, tandwiel en uitloggen als één groep rechts, zodat Uitloggen nooit los afbreekt.
   Uitloggen (toevoeging): even hoog als de menulinks, op mobiel alleen het icoon. */
.kop-rechts { display: flex; align-items: center; gap: 12px 40px; margin-left: auto; }
.kop-rechts > form { margin-right: -10px; }
.kop-uitloggen {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: -1px 0; padding: 0 10px;
  border: none; border-radius: var(--radius-md); background: none; color: var(--xap-muted); cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
}
.kop-uitloggen .icoon { font-size: 20px; }
.kop-uitloggen:hover { color: var(--xap-blue); }

main { max-width: 1320px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 40px) 96px; }
main.login { max-width: 480px; }
main.login .h1 { margin-bottom: 24px; }
main.login .login-logo { display: block; height: 80px; width: auto; margin-bottom: 28px; }
main.login .formulier .v-1 { flex-basis: 100%; }

/* --- typografie ------------------------------------------------------------- */

.h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px); font-weight: 600; margin: 0; letter-spacing: -0.01em; line-height: 1.2; }
.h2 { font-family: var(--font-sans); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: 0; line-height: 1.2; }
.h2-18 { font-size: 18px; }
.muted { color: var(--xap-muted); }
.tab { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.intro { font-size: 15px; color: var(--xap-muted); margin-bottom: 40px; max-width: 65ch; }

.paginakop-knoppen { display: flex; flex-wrap: wrap; gap: 12px; }
.paginakop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }

/* --- knoppen ---------------------------------------------------------------- */

.knop {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  height: 44px; padding: 0 20px; border-radius: 6px; border: none; background: var(--xap-blue); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer; line-height: 1;
}
.knop:hover { background: var(--xap-green); color: #fff; }
.knop-sec { border: 1px solid var(--xap-blue); background: #fff; color: var(--xap-blue); }
.knop-sec:hover { background: var(--xap-blue); color: #fff; }
.knop-klein { height: 40px; padding: 0 16px; font-size: 14px; }
.tekstknop {
  background: none; border: none; padding: 0; color: var(--xap-aqua-700); font-size: 14px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.tekstknop:hover { color: var(--xap-green); }
.stilknop { height: 44px; padding: 0 12px; border: none; background: none; color: var(--xap-muted); font-size: 15px; font-weight: 600; cursor: pointer; }
.stilknop:hover { color: var(--xap-blue); }
form.inline { display: inline; margin: 0; }

/* --- formulieren ------------------------------------------------------------- */

.veld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--xap-muted); line-height: 1.4; }
.invoer {
  height: 44px; box-sizing: border-box; border: 1px solid var(--xap-rule); border-radius: 6px; padding: 0 12px;
  font-size: 15px; color: var(--xap-blue); background: #fff; outline: none; width: 100%; font-weight: 400;
}
select.invoer { padding: 0 10px; }
textarea.invoer { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.invoer:focus { border-color: var(--xap-aqua); box-shadow: var(--shadow-focus); }
.invoer-40 { height: 40px; font-size: 14px; padding: 0 10px; }
.invoer-36 { height: 36px; font-size: 14px; padding: 0 6px; }
.foutmelding { margin-top: 10px; font-size: 14px; color: var(--xap-blue); }
.vinkje { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--xap-blue); cursor: pointer; }
.vinkje input { width: 20px; height: 20px; margin: 0; accent-color: var(--xap-blue); cursor: pointer; }

/* --- tabellen (div-grid) ------------------------------------------------------- */

.tabelkop { display: grid; gap: 16px; padding: 0 12px 10px; font-size: 13px; font-weight: 600; color: var(--xap-muted); border-bottom: 1px solid var(--xap-rule); line-height: 1.4; }
.tabelrij { display: grid; gap: 16px; padding: 16px 12px; font-size: 15px; border-bottom: 1px solid var(--xap-border); align-items: baseline; line-height: 1.5; }
.klikrij { cursor: pointer; color: inherit; }
.klikrij:hover { background: var(--xap-cloud); color: inherit; }
.ellips { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blok { display: block; }
.sub { display: block; font-size: 14px; color: var(--xap-muted); }
.tel { white-space: nowrap; color: var(--xap-aqua-700); }
.scroll { overflow-x: auto; }
.mobiel-label { display: none; }
.tabel-facturen { min-width: 950px; }
.tabel-projecten { min-width: 640px; }
.tabel-klanten { min-width: 1300px; }
.klantrij { padding: 20px 0; }
.klantrij label { display: block; }

.cols-facturen { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr) 150px 150px 120px 120px; }
.cols-projecten { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 140px 90px; }
.projectrij { padding: 20px 0; }
.cols-klanten { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 110px 160px 160px 90px 130px 150px 90px; }
.cols-ov-facturen { grid-template-columns: 90px minmax(0, 1fr) 150px 120px; gap: 12px; }
/* CHF-regel onder het bedrag van een EUR-factuur (bedrijf in Zwitserland) */
.c-bedrag .sub, .c-omzet .sub { font-weight: 400; white-space: nowrap; }
.tabel-export { max-width: 880px; }
.cols-export { grid-template-columns: 80px 120px minmax(0, 1fr) 248px; }
.c-zip { justify-self: end; display: flex; gap: var(--space-2); }
.c-zip .knop-klein { min-width: 52px; padding: 0 var(--space-3); gap: var(--space-1); }
.c-zip .icoon { font-size: 16px; }

/* --- status ----------------------------------------------------------------- */

.status { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.status .stip { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.st-concept { color: var(--xap-muted); } .st-concept .stip { background: var(--xap-muted-2); }
.st-open { color: var(--xap-blue); font-weight: 600; } .st-open .stip { background: var(--xap-aqua); }
.st-laat { color: var(--xap-blue); font-weight: 800; } .st-laat .stip { background: var(--xap-blue); }
.st-betaald { color: var(--xap-muted); font-weight: 600; } .st-betaald .stip { background: var(--xap-green); }
.status.lijst.st-concept, .status.lijst.st-open, .status.lijst.st-betaald { font-weight: 600; }

/* --- overzicht --------------------------------------------------------------- */

.kengetallen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 56px; border-top: 1px solid var(--xap-border); border-bottom: 1px solid var(--xap-border); }
.kengetal { padding: 32px; border-left: 1px solid var(--xap-border); }
.kengetal:first-child { padding-left: 0; border-left: none; }
.kengetal-label { font-size: 14px; font-weight: 600; color: var(--xap-muted); letter-spacing: 0.03em; }
.kengetal-waarde { font-family: var(--font-display); font-size: 48px; font-weight: 600; line-height: 1.1; margin-top: 10px; }
.kengetal-sub { font-size: 14px; color: var(--xap-muted); margin-top: 6px; }
/* Vier kengetallen (bedrijf in Zwitserland, zie AFWIJKINGEN.md): waarden op de mobiele maat, zodat
   "CHF 100.000" op één regel past; onder 1200px twee bij twee. */
.kengetallen-vier { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kengetallen-vier .kengetal-waarde { font-size: 40px; }
@media (max-width: 1199px) {
  .kengetallen-vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kengetallen-vier .kengetal:nth-child(3) { padding-left: 0; border-left: none; }
  .kengetallen-vier .kengetal:nth-child(n+3) { border-top: 1px solid var(--xap-border); }
}
.overzicht-sectie { margin-top: var(--space-16); }
.sectiekop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.totaalrij { display: flex; justify-content: space-between; gap: var(--space-4); padding: 16px 12px; font-size: 15px; font-weight: 700; }
.totaalrij > .tab { white-space: nowrap; }

/* --- uren ---------------------------------------------------------------------- */

.snelinvoer { background: var(--xap-cloud); border-radius: 12px; padding: clamp(16px, 3vw, 28px); display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.snelinvoer .v-datum { flex: 1 1 150px; }
.snelinvoer .v-klant { flex: 1 1 180px; }
.snelinvoer .v-project { flex: 1 1 180px; }
.snelinvoer .v-uren { flex: 0 1 96px; }
.snelinvoer .v-omschrijving { flex: 3 1 260px; }
.snelinvoer .knop { flex: 1 0 auto; padding: 0 24px; }
.sectie { margin-top: 56px; }
.sectie-titel { padding-bottom: 12px; border-bottom: 1px solid var(--xap-rule); }
.factureerrij { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 14px 0; border-bottom: 1px solid var(--xap-border); line-height: 1.5; }
.weken { margin-top: 56px; display: flex; flex-direction: column; gap: 48px; }
.weekkop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--xap-rule); line-height: 1.5; }
.urenrij { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--xap-border); line-height: 1.5; }
.urenrij.gefactureerd { color: var(--xap-muted); }
.pil { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--xap-blue); line-height: 1.5; }
.pil-open { background: var(--xap-aqua-100); }
.pil-open .stip { width: 7px; height: 7px; border-radius: 50%; background: var(--xap-aqua); }
.pil-concept { border: 1px solid var(--xap-rule); }

/* --- editor --------------------------------------------------------------------- */

.editor { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.editor-kolom { flex: 1 1 480px; min-width: 0; }
.editor-kop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 32px; }
.editor-kop .status { font-weight: 600; }
.urenlijst-rij { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--xap-border); font-size: 14px; line-height: 1.5; }
.wisselknop { flex: 0 0 92px; background: none; border: none; padding: 0; text-align: right; font-size: 14px; font-weight: 600; color: var(--xap-aqua-700); cursor: pointer; }
.wisselknop.aan { color: var(--xap-muted); }
.wisselknop:hover { color: var(--xap-green); }
.regelkop { display: flex; gap: 8px; padding-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--xap-muted); border-bottom: 1px solid var(--xap-rule); line-height: 1.4; }
.regel { display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--xap-border); line-height: 1.5; }
.regel-vast { padding: 10px 0; font-size: 14px; }
.regel-vast .blok { white-space: pre-line; }
.regel-invoer { padding: 8px 0; }
/* Omschrijving over meerdere regels: groeit mee met de tekst (rows als terugval) */
.regel-invoer textarea.k-omschr { height: auto; min-height: 40px; padding: 9px 10px; line-height: 20px; resize: vertical; field-sizing: content; }
.k-omschr { flex: 1 1 200px; min-width: 0; }
.k-aantal { flex: 0 0 64px; width: 64px; }
.k-eenheid { flex: 0 0 80px; width: 80px; }
.k-prijs { flex: 0 0 88px; width: 88px; }
.k-bedrag { flex: 0 0 96px; text-align: right; font-variant-numeric: tabular-nums; }
.k-x { flex: 0 0 32px; }
.regel-vast .k-aantal, .regel-vast .k-eenheid, .regel-vast .k-prijs { padding-left: 10px; box-sizing: border-box; }
.regel-invoer .k-bedrag { font-size: 14px; line-height: 40px; }
.regel-invoer .verwijderregel { margin-top: 4px; }
.uit-uren { display: block; font-size: 12px; color: var(--xap-aqua-700); }
.verwijderregel { flex: 0 0 32px; height: 32px; border: none; background: none; color: var(--xap-muted); font-size: 18px; cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.verwijderregel:hover { color: var(--xap-blue); background: var(--xap-cloud); }
.regel-toevoegen { margin-top: 12px; height: 40px; padding: 0 4px; letter-spacing: 0.03em; }
.editor-totalen { margin-top: 32px; margin-left: auto; max-width: 340px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; }
.editor-totalen > div { display: flex; justify-content: space-between; gap: var(--space-4); }
.editor-totalen > div > span:last-child { white-space: nowrap; }
.editor-totalen .totaal { padding-top: 10px; border-top: 1px solid var(--xap-rule); font-weight: 800; font-size: 17px; }
.bevestig { margin-top: 48px; background: var(--xap-cloud); border-radius: 8px; padding: 24px; }
.bevestig-titel { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.bevestig-tekst { font-size: 15px; line-height: 1.6; max-width: 60ch; }
.bevestig-knoppen { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.acties { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.acties .noot { flex: 1 1 200px; font-size: 14px; color: var(--xap-muted); }
.voorbeeld { flex: 0 1 688px; max-width: 100%; position: sticky; top: 24px; background: var(--xap-cloud); border-radius: 12px; padding: 24px; box-sizing: border-box; overflow-x: auto; }
.voorbeeld-label { font-size: 13px; font-weight: 600; color: var(--xap-muted); margin-bottom: 14px; letter-spacing: 0.03em; }

/* --- klanten / instellingen formulier (toevoeging, zie AFWIJKINGEN.md) --------- */

.formulier { background: var(--xap-cloud); border-radius: 12px; padding: clamp(16px, 3vw, 28px); display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; max-width: 880px; }
.formulier .v-1 { flex: 1 1 260px; }
.formulier .v-2 { flex: 2 1 400px; }
.formulier .v-s { flex: 0 1 140px; }
.formulier-knoppen { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.teller { font-family: var(--font-display); font-size: 36px; font-weight: 600; line-height: 1.1; margin-top: 6px; }

/* --- toast ------------------------------------------------------------------------ */

.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--xap-blue); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 15px; box-shadow: var(--shadow-lg); z-index: 10; }
.toast[hidden] { display: none; }

/* --- beheer (/beheer, zie app/beheer.py) --------------------------------------------- */

.beheer-terug { min-height: 40px; margin-bottom: var(--space-3); }
.beheer-terug .icoon { font-size: 16px; }
.beheer-kop { margin-bottom: var(--space-3); overflow-wrap: anywhere; }
.beheer-sectie { margin-top: var(--space-8); max-width: 880px; }
.tabelrij.beheer-rij { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); grid-template-areas: none; min-height: 40px; box-sizing: border-box; text-decoration: none; }
.beheer-naam { font-weight: 700; overflow-wrap: anywhere; }
.beheer-omschrijving { min-width: 0; overflow-wrap: anywhere; }
.beheer-zoek { margin-bottom: var(--space-4); }
.beheer-aantal { font-size: 14px; margin-bottom: var(--space-2); }
.beheer-lijst, .beheer-slot, .beheer-noot { max-width: 880px; box-sizing: border-box; }
.beheer-leeg { padding: var(--space-4) 0; font-size: 15px; }
.beheer-veld { flex: 1 1 100%; }
.beheer-json, .beheer-diff { font-family: var(--font-mono); font-size: 14px; line-height: 1.5; tab-size: 2; }
.beheer-json[readonly] { background: var(--xap-mist); }
.beheer-uitleg { font-size: 14px; font-weight: 400; }
.beheer-link { display: inline-flex; align-items: center; text-decoration: none; }
.beheer-slot { margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--xap-aqua); background: var(--xap-aqua-100); border-radius: var(--radius-sm); font-size: 15px; }
.beheer-noot { margin-top: var(--space-3); font-size: 14px; }
.beheer-versie { margin-top: var(--space-8); max-width: 880px; }
.beheer-versie-titel { font-size: 18px; overflow-wrap: anywhere; }
.beheer-versie-kop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.beheer-diff { margin: var(--space-3) 0 0; padding: var(--space-3) 0; background: var(--xap-cloud); color: var(--xap-ink); border-radius: var(--radius-md); overflow-x: auto; white-space: pre; }
.beheer-diff > span { display: block; padding: 0 var(--space-4); }
.beheer-diff .diff-plus { background: var(--xap-aqua-100); box-shadow: inset 3px 0 0 var(--xap-aqua); }
.beheer-diff .diff-min { background: var(--xap-rule); box-shadow: inset 3px 0 0 var(--xap-blue-300); }
.beheer-diff .diff-weg { color: var(--xap-muted); }
.bevestig:focus { outline: none; box-shadow: var(--shadow-focus); }
.beheer-diff:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* --- mobiel (toevoeging, zie AFWIJKINGEN.md) --------------------------------------- */

@media (max-width: 720px) {
  .tabelrij.beheer-rij { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
  .nav { display: none; }
  .kopbalk-in { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .woordmerk { min-width: 0; overflow: hidden; white-space: nowrap; }
  .woordmerk b { overflow: hidden; text-overflow: ellipsis; }
  .woordmerk .pijp, .woordmerk .pijp + span { display: none; }  /* ruimte voor de bedrijfsnaam */
  .kop-instellingen { display: inline-flex; }
  .kop-rechts { gap: 8px; }
  .kop-instellingen:last-child { margin-right: -10px; }
  .kop-uitloggen { width: 44px; min-height: 44px; margin: 0; justify-content: center; padding: 0; }
  .kop-uitloggen .icoon { font-size: 24px; }
  .kop-uitloggen span { display: none; }
  .tabbar { display: flex; }
  main { padding-top: 28px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); box-sizing: border-box; }
  .paginakop { margin-bottom: 28px; }
  .intro { margin-bottom: 24px; }

  /* tabellen worden kaartjes */
  .tabel { min-width: 0; }
  .tabelkop { display: none; }
  .mobiel-label { display: inline; }
  .tabelrij {
    grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 4px; align-items: baseline;
    grid-template-areas: "nummer status" "klant klant" "datum bedrag";
  }
  .klikrij { padding-left: 8px; padding-right: 8px; }
  .c-nummer { grid-area: nummer; font-size: 14px; }
  .c-status { grid-area: status; justify-self: end; }
  .c-klant { grid-area: klant; font-size: 16px; }
  .c-datum, .c-verval { grid-area: datum; font-size: 14px; }
  .c-bedrag { grid-area: bedrag; font-weight: 700; }
  .c-project { grid-area: project; font-size: 14px; }
  .cols-facturen { grid-template-areas: "nummer status" "klant klant" "project project" "verval bedrag"; }
  .cols-facturen .c-datum { display: none; }
  .cols-facturen .c-verval { grid-area: verval; }
  .cols-projecten {
    grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px;
    grid-template-areas: "project bewerken" "pklant tarief";
  }
  .cols-projecten .c-project { font-size: 16px; }
  .c-pklant { grid-area: pklant; font-size: 14px; color: var(--xap-muted); }
  .cols-projecten .c-tarief { font-size: 14px; }
  .cols-ov-facturen { grid-template-areas: "nummer verval" "klant bedrag"; }
  .cols-ov-facturen .c-verval { grid-area: verval; justify-self: end; }
  .cols-export { grid-template-areas: "jaar zip" "aantal omzet"; align-items: center; }
  .c-jaar { grid-area: jaar; font-size: 16px; }
  .c-zip { grid-area: zip; }
  .c-aantal { grid-area: aantal; font-size: 14px; }
  .c-omzet { grid-area: omzet; font-weight: 700; }
  .totaalrij { padding: 16px 4px; }

  .cols-klanten {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1.2fr); gap: 4px 10px;
    grid-template-areas: "klant klant bewerken" "contact contact contact" "land btwnr tarief" "valuta taal btw";
  }
  .klantrij { padding: 20px 0; align-items: start; }
  .c-klant { grid-area: klant; }
  .c-contact { grid-area: contact; }
  .c-land, .c-btwnr, .c-tarief { font-size: 14px; }
  .c-land { grid-area: land; }
  .c-btwnr { grid-area: btwnr; overflow: hidden; text-overflow: ellipsis; }
  .c-tarief { grid-area: tarief; }
  .c-valuta { grid-area: valuta; }
  .c-taal { grid-area: taal; }
  .c-btw { grid-area: btw; }
  .c-bewerken { grid-area: bewerken; justify-self: end; min-height: 40px; }
  .c-valuta, .c-taal, .c-btw { margin-top: 10px; }
  .klantrij .mobiel-label { display: block; font-size: 12px; font-weight: 600; color: var(--xap-muted); line-height: 1.4; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* overzicht */
  .kengetallen { margin-top: 32px; }
  .kengetal { padding: 20px 0; border-left: none; border-top: 1px solid var(--xap-border); }
  .kengetal:first-child { border-top: none; }
  .kengetal-waarde { font-size: 40px; }
  .kengetallen-vier { grid-template-columns: minmax(0, 1fr); }
  .overzicht-sectie { margin-top: var(--space-12); }

  /* uren */
  .sectie, .weken { margin-top: 40px; }
  .urenrij { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .urenrij .u-datum { grid-column: 1; grid-row: 1; }
  .urenrij .u-uren { grid-column: 2; grid-row: 1 / span 2; }
  .urenrij .u-omschr { grid-column: 1; grid-row: 2; }
  .urenrij .u-staat { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start !important; margin-top: 4px; }

  /* editor: regels in twee lagen */
  .editor { gap: 40px; }
  .regelkop { display: none; }
  .regel { flex-wrap: wrap; }
  .regel .k-omschr { flex: 1 1 100%; }
  .regel-vast .k-aantal, .regel-vast .k-eenheid, .regel-vast .k-prijs { padding-left: 0; flex-basis: auto; width: auto; color: var(--xap-muted); }
  .regel-vast .k-prijs::before { content: "\00d7  "; }
  .regel-invoer .k-aantal, .regel-invoer .k-eenheid, .regel-invoer .k-prijs { flex: 1 1 0; width: auto; min-width: 0; }
  .regel .k-bedrag { flex: 1 0 auto; }
  .regel-vast .k-x { display: none; }
  .editor-totalen { max-width: none; }
  .voorbeeld { padding: 12px; position: static; }
  .voorbeeld .a4 { zoom: 0.45; }
  @media (min-width: 560px) { .voorbeeld .a4 { zoom: 0.75; } }
}

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