:root {
  --bg: #f4f6f5; --surface: #ffffff; --ink: #1d2523; --ink-2: #4a5552; --muted: #78837f;
  --line: #dfe5e3; --accent: #1f7a6d; --accent-ink: #ffffff; --accent-soft: #e3f1ee;
  --bar: #2f8c7e; --ok-bg: #e5f4ea; --ok-ink: #1e6b3a; --err-bg: #fbe9e7; --err-ink: #9b2c1f;
  --warn-bg: #fff4d6; --warn-ink: #7a5a00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121716; --surface: #1b2220; --ink: #e8eeec; --ink-2: #b9c4c0; --muted: #8b9793;
    --line: #2d3734; --accent: #4fb3a3; --accent-ink: #0d1514; --accent-soft: #1d3330;
    --bar: #5cbdad; --ok-bg: #173323; --ok-ink: #8fd6a6; --err-bg: #3a1d19; --err-ink: #f2a497;
    --warn-bg: #352c10; --warn-ink: #f0d27a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Kop en navigatie */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding-top: .75rem; padding-bottom: .75rem; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: .35rem .7rem; border-radius: 6px; }
.nav a.actief, .nav a:hover { background: var(--accent-soft); color: var(--ink); }
.nav .uit { margin-left: auto; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1.25rem 16px; }
.testbanner { background: var(--warn-bg); color: var(--warn-ink); text-align: center;
  padding: .45rem 16px; font-size: .9rem; }

/* Meldingen */
.flash { padding: .65rem .9rem; border-radius: 8px; margin-bottom: .6rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.fout { background: var(--err-bg); color: var(--err-ink); }

/* Kaarten en raster */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid.twee { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: .9rem 1rem; }
.tile .label { color: var(--muted); font-size: .85rem; }
.tile .waarde { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.tile .sub { color: var(--muted); font-size: .8rem; }

/* Knoppen en formulieren */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 7px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; }
.btn.secundair { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.klein { padding: .25rem .6rem; font-size: .85rem; font-weight: 500; }
.btn.gevaar { background: transparent; color: var(--err-ink); border: 1px solid var(--err-ink); }
label { display: block; font-weight: 600; margin: .8rem 0 .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url],
select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 7rem; resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: .2rem; }
.rij { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; }
.rij > * { flex: 1 1 180px; }
.inline { display: inline; }
.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }

/* Tabellen */
.tabel-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line);
  vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .8rem;
  background: var(--accent-soft); color: var(--ink-2); white-space: nowrap; }
.badge.gereageerd, .badge.verstuurd { background: var(--ok-bg); color: var(--ok-ink); }
.badge.fout, .badge.afgemeld { background: var(--err-bg); color: var(--err-ink); }
.badge.testmodus, .badge.overgeslagen { background: var(--warn-bg); color: var(--warn-ink); }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filters a { text-decoration: none; padding: .25rem .65rem; border-radius: 99px;
  border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.filters a.actief { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Staafdiagram verdeling 0-10 */
.verdeling { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; align-items: end;
  height: 160px; border-bottom: 1px solid var(--line); }
.verdeling .kolom { display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; position: relative; }
.verdeling .staaf { width: 70%; max-width: 34px; background: var(--bar); border-radius: 4px 4px 0 0;
  min-height: 0; }
.verdeling .kolom:hover .staaf { filter: brightness(1.15); }
.verdeling .aantal { font-size: .75rem; color: var(--ink-2); margin-bottom: 2px; }
.assen { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; text-align: center;
  font-size: .8rem; color: var(--muted); margin-top: 4px; }
.zones { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted);
  margin-top: .4rem; }

.citaat { border-left: 3px solid var(--line); padding: .2rem 0 .2rem .8rem; margin: 0 0 .9rem; }
.citaat .meta { color: var(--muted); font-size: .8rem; }

/* Publieke pagina's (patiënt) */
.publiek { max-width: 620px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.publiek .kop { text-align: center; margin-bottom: 1.25rem; }
.publiek .kop .praktijk { color: var(--accent); font-weight: 700; }
.vraag { margin-bottom: 1.5rem; }
.vraag > .titel { font-weight: 600; margin-bottom: .5rem; }
.schaal { display: grid; gap: 6px; }
.schaal.elf { grid-template-columns: repeat(11, 1fr); }
.schaal.vijf { grid-template-columns: repeat(5, 1fr); }
.schaal input { position: absolute; opacity: 0; pointer-events: none; }
.schaal label { margin: 0; text-align: center; padding: .6rem 0; border: 1px solid var(--line);
  border-radius: 7px; cursor: pointer; font-weight: 600; background: var(--surface);
  user-select: none; }
.schaal.vijf label { font-size: .8rem; font-weight: 500; padding: .55rem .15rem; line-height: 1.25; }
.schaal input:checked + label { background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); }
.schaal input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.uitersten { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem;
  margin-top: .3rem; }
@media (max-width: 480px) {
  .schaal.elf { grid-template-columns: repeat(6, 1fr); }
  .schaal.vijf { grid-template-columns: 1fr; }
  .schaal.vijf label { text-align: left; padding: .6rem .8rem; font-size: .9rem; }
}
.iframe-mail { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 8px;
  background: #f3f5f4; }
