@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url('/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url('/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url('/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/space-grotesk-600.woff2') format('woff2'); }

:root {
  --grond: #f5f6f3;
  --vlak: #ffffff;
  --lijn: #e2e5e0;
  --lijn-zacht: #eef0ec;
  --rand-knop: #cbd1cb;
  --inkt: #18212b;
  --inkt-zacht: #56606b;
  --accent: #1f5f74;
  --accent-donker: #174a5b;
  --accent-zacht: #e4eef1;
  --let-op: #8a3f0a;
  --let-op-zacht: #fbeadb;
  --goed: #2d6a3e;
  --goed-zacht: #e3f0e6;
  --grijs-zacht: #e9ece7;
  --kop: 'Space Grotesk', Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grond); color: var(--inkt); font: 16px/1.5 Inter, system-ui, sans-serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-donker); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--kop); font-weight: 600; margin: 0; line-height: 1.2; }
h1 { font-size: 34px; letter-spacing: -0.01em; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p { margin: 0; }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--vlak); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid #7fb3c4; outline-offset: 2px; }

/* Kop */
.kop { background: var(--vlak); border-bottom: 1px solid var(--lijn); }
.kop-binnen { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--inkt); font-family: var(--kop); font-weight: 600; font-size: 19px; }
.kop-rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wie { font-size: 15px; color: var(--inkt-zacht); }

/* Pagina */
.pagina { max-width: 1200px; margin: 0 auto; padding: 48px 24px 96px; display: flex; flex-direction: column; gap: 56px; }
.sectie { display: flex; flex-direction: column; gap: 20px; }
.rij { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.rij-tussen { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.vme-kop { background: var(--vlak); border-bottom: 1px solid var(--lijn); }
.vme-kop-binnen { max-width: 1200px; margin: 0 auto; padding: 28px 24px 0; display: flex; flex-direction: column; gap: 18px; }
.terug { font-size: 15px; font-weight: 500; text-decoration: none; }

/* Tabbladen */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.tabs a { padding: 12px 0; border-bottom: 3px solid transparent; color: var(--inkt-zacht); font-weight: 500; text-decoration: none; }
.tabs a[aria-current='page'] { border-bottom-color: var(--accent); color: var(--inkt); font-weight: 600; }
.keuze { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--grijs-zacht); padding: 4px; border-radius: 12px; }
.keuze button, .keuze a { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: #3d4650; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.keuze [aria-pressed='true'], .keuze [aria-selected='true'], .keuze [aria-current='true'] { background: var(--vlak); color: var(--inkt); box-shadow: 0 1px 2px rgba(24, 33, 43, 0.12); }

/* Knoppen */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--rand-knop); border-radius: 10px; background: var(--vlak); color: var(--inkt); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knop:hover { border-color: #a9b2a9; color: var(--inkt); }
.knop-primair { background: var(--accent); border-color: var(--accent); color: #fff; }
.knop-primair:hover { background: var(--accent-donker); color: #fff; }
.knop-klein { min-height: 38px; padding: 0 12px; font-size: 14px; }
.knop:disabled { opacity: 0.5; cursor: not-allowed; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--rand-knop); border-radius: 999px; background: var(--vlak); font-weight: 500; font-size: 15px; cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.stem { min-height: 36px; padding: 0 12px; border: 1px solid var(--rand-knop); border-radius: 8px; background: var(--vlak); font-size: 14px; font-weight: 500; cursor: pointer; }
.stem[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Labels */
.label { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 500; background: #eef0ec; color: #3d4650; white-space: nowrap; }
.label-info { background: var(--accent-zacht); color: var(--accent); }
.label-let-op { background: var(--let-op-zacht); color: var(--let-op); }
.label-goed { background: var(--goed-zacht); color: var(--goed); }

/* Tegels en kaarten */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.raster-klein { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.kaart { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.tegel { text-align: left; background: var(--vlak); border: 1px solid var(--lijn); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; color: var(--inkt); text-decoration: none; cursor: pointer; }
.tegel:hover { border-color: #b9c3bb; color: var(--inkt); }
.tegel-actief { border: 2px solid var(--accent); padding: 23px; }
.tegel-rij { flex-direction: row; align-items: center; }
.icoon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-zacht); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icoon-let-op { background: var(--let-op-zacht); color: var(--let-op); }
.icoon-goed { background: var(--goed-zacht); color: var(--goed); }
.tegel-titel { font-family: var(--kop); font-size: 20px; font-weight: 600; }
.zacht { color: var(--inkt-zacht); font-size: 15px; }
.cijfers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cijfer { display: flex; flex-direction: column; gap: 2px; }
.cijfer-label { font-size: 13px; color: var(--inkt-zacht); }
.cijfer-waarde { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.groot { font-family: var(--kop); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.taak { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--vlak); border: 1px solid var(--lijn); border-radius: 14px; padding: 16px 20px; }
.taak-tekst { flex: 1 1 260px; display: flex; flex-direction: column; }

/* Tabellen */
.tabel-vak { background: var(--vlak); border: 1px solid var(--lijn); border-radius: 16px; overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.tabel th { text-align: left; font-weight: 500; color: var(--inkt-zacht); font-size: 13px; padding: 10px 16px; border-bottom: 1px solid var(--lijn); white-space: nowrap; }
.tabel td { padding: 12px 16px; border-bottom: 1px solid var(--lijn-zacht); vertical-align: middle; }
.tabel tr:last-child td { border-bottom: 0; }
.tabel .getal { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabel tfoot td { font-weight: 600; border-top: 1px solid var(--lijn); }
.tabel .acties { text-align: right; white-space: nowrap; }
.vet { font-weight: 600; }
.leeg { background: var(--vlak); border: 1px dashed var(--rand-knop); border-radius: 16px; padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* Formulieren */
.velden { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.veld { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 500; }
.veld input, .veld select, .veld textarea, .invoer { min-height: 44px; border: 1px solid var(--rand-knop); border-radius: 10px; padding: 8px 12px; background: var(--vlak); font-weight: 400; width: 100%; }
.veld textarea { min-height: 260px; line-height: 1.5; }
.vinkje { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 44px; }
.vinkje input { width: 20px; height: 20px; }
.veld input:disabled, .invoer:disabled { background: var(--grond); color: var(--inkt-zacht); }
.invoer-bedrag { text-align: right; font-variant-numeric: tabular-nums; max-width: 160px; }

/* Venster */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgba(24, 33, 43, 0.25); }
dialog.breed { width: min(900px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(24, 33, 43, 0.4); }
.venster-form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.venster-form h2 { font-size: 22px; padding: 24px 24px 0; }
.venster-inhoud { padding: 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.venster-knoppen { padding: 16px 24px 24px; display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--lijn-zacht); }

/* Meldingen */
#melding { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 32px)); }
.toast { background: var(--inkt); color: #fff; border-radius: 12px; padding: 14px 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.toast-fout { background: var(--let-op); }

/* Aanmelden */
.aanmelden { max-width: 440px; margin: 10vh auto; padding: 0 24px; display: flex; flex-direction: column; gap: 24px; }
.voet { max-width: 1200px; margin: 0 auto; padding: 0 24px 40px; font-size: 14px; color: var(--inkt-zacht); }

/* Tekst */
.tekst { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; display: flex; flex-direction: column; gap: 20px; }
.tekst h2 { margin-top: 20px; font-size: 22px; }

#afdruk { display: none; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .pagina { padding: 32px 16px 80px; gap: 44px; }
  .kop-binnen, .vme-kop-binnen { padding-left: 16px; padding-right: 16px; }
}

@media print {
  body { background: #fff; font-size: 11pt; }
  body > *:not(#afdruk) { display: none !important; }
  #afdruk { display: block; }
  .afdruk-pagina { page-break-after: always; padding: 0; }
  .afdruk-pagina:last-child { page-break-after: auto; }
  .afdruk-pagina h1 { font-size: 20pt; margin-bottom: 12pt; }
  .afdruk-pagina table { width: 100%; border-collapse: collapse; margin: 10pt 0; }
  .afdruk-pagina th, .afdruk-pagina td { text-align: left; padding: 4pt 6pt; border-bottom: 1px solid #ccc; }
  .afdruk-pagina .getal { text-align: right; }
  .afdruk-pagina p { margin: 0 0 8pt; }
  .afdruk-pagina pre { white-space: pre-wrap; font: inherit; }
}
