:root {
  --bg: #f5f6f8;
  --paper: #ffffff;
  --ink: #1a1d21;
  --ink-soft: #5b6470;
  --line: #e2e5ea;
  --brand: #1d4ed8;
  --brand-dark: #16309b;
  --brand-soft: #eef2ff;
  --side: #131a26;
  --side-soft: #1e2836;
  --ok: #0f7b46;
  --ok-soft: #e6f5ee;
  --warn: #9a6200;
  --warn-soft: #fdf3e0;
  --bad: #b3261e;
  --bad-soft: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.25; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }

/* ---------------------------------------------------------------- layout */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: 0 0 232px; background: var(--side); color: #c8d1de;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side .merk {
  padding: 18px 18px 14px; font-weight: 700; color: #fff; font-size: 1rem;
  border-bottom: 1px solid #26303f; display: flex; gap: 10px; align-items: center;
}
.side .merk small { display: block; font-weight: 400; font-size: .72rem; color: #8b98a9; }
.side nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.side nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 8px;
  color: #c8d1de; font-size: .9rem; margin-bottom: 2px;
}
.side nav a:hover { background: var(--side-soft); color: #fff; text-decoration: none; }
.side nav a.actief { background: var(--brand); color: #fff; }
.side .kop { padding: 14px 12px 5px; font-size: .68rem; letter-spacing: .09em;
  text-transform: uppercase; color: #6c7a8d; }
.side .voet { padding: 12px; border-top: 1px solid #26303f; font-size: .8rem; }
.side .voet a { color: #c8d1de; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 22px;
  display: flex; gap: 14px; align-items: center; position: sticky; top: 0; z-index: 20;
}
.top form.zoek { flex: 1; max-width: 460px; }
.top .rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.inhoud { padding: 22px; max-width: 1500px; width: 100%; }

/* ----------------------------------------------------------------- kaart */
.kaart {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.kaart > header {
  padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 10px; flex-wrap: wrap;
}
.kaart > header h2, .kaart > header h3 { margin: 0; }
.kaart > header .rechts { margin-left: auto; display: flex; gap: 8px; }
.kaart .body { padding: 16px; }
.kaart .body.plat { padding: 0; }

.rooster { display: grid; gap: 18px; }
.rooster.k2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.rooster.k3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rooster.k4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ------------------------------------------------------------- statistiek */
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); }
.stat .cijfer { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat .label { color: var(--ink-soft); font-size: .82rem; }

/* ---------------------------------------------------------------- tabellen */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); background: #fafbfc; font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: #fafbfd; }
td.acties { text-align: right; white-space: nowrap; }
.tabelwrap { overflow-x: auto; }
.leeg { padding: 34px 16px; text-align: center; color: var(--ink-soft); }

/* --------------------------------------------------------------- knoppen */
.knop, button.knop, a.knop {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font-size: .86rem; font-family: inherit; cursor: pointer;
  text-decoration: none; font-weight: 500; white-space: nowrap;
}
.knop:hover { background: #f2f4f7; text-decoration: none; }
.knop.primair { background: var(--brand); border-color: var(--brand); color: #fff; }
.knop.primair:hover { background: var(--brand-dark); }
.knop.gevaar { color: var(--bad); border-color: #f2c7c4; background: var(--bad-soft); }
.knop.klein { padding: 4px 9px; font-size: .78rem; }
.knop:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------ formulieren */
label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px;
  color: #333a44; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #ccd2da; border-radius: 8px;
  font-family: inherit; font-size: .9rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,78,216,.13);
}
textarea { min-height: 84px; resize: vertical; }
.veld { margin-bottom: 14px; }
.veld .hint { font-size: .76rem; color: var(--ink-soft); margin-top: 3px; }
.veldrooster { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 16px; }
.veld.breed { grid-column: 1 / -1; }
.vinkje { display: flex; align-items: center; gap: 8px; }
.vinkje input { width: auto; }
.vinkje label { margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  margin: 0 0 16px; }
legend { font-weight: 600; font-size: .85rem; padding: 0 6px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .74rem;
  font-weight: 600; background: #eef0f3; color: #445; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--brand-soft); color: var(--brand-dark); }

/* ------------------------------------------------------------- meldingen */
.melding { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 16px;
  border: 1px solid; font-size: .9rem; }
.melding.ok { background: var(--ok-soft); border-color: #bfe3d0; color: #0b5c34; }
.melding.fout { background: var(--bad-soft); border-color: #f3c8c5; color: #8f1d17; }
.melding.waarschuwing { background: var(--warn-soft); border-color: #f0dcb4; color: #7a4e00; }
.melding.info { background: var(--brand-soft); border-color: #ccd8fb; color: var(--brand-dark); }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line);
  margin-bottom: 18px; }
.tabs a { padding: 9px 13px; font-size: .87rem; color: var(--ink-soft); border-bottom: 2px solid transparent;
  font-weight: 500; }
.tabs a:hover { color: var(--ink); text-decoration: none; background: #fff; }
.tabs a.actief { color: var(--brand); border-bottom-color: var(--brand); background: #fff; }
.tabs .telling { font-size: .72rem; background: #e8ebef; border-radius: 999px;
  padding: 1px 6px; margin-left: 5px; color: #55606e; }

/* --------------------------------------------------------------- geheimen */
.geheim { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace,
  "Cascadia Mono", Consolas, monospace; font-size: .85rem; }
.geheim .waarde { background: #f1f3f6; padding: 3px 8px; border-radius: 6px;
  min-width: 92px; display: inline-block; letter-spacing: .06em; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .86rem; }

/* ----------------------------------------------------------------- login */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #16223a 0%, #0d1420 100%); padding: 20px; }
.loginkaart { background: #fff; border-radius: 14px; padding: 30px; width: 100%;
  max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.32); }
.loginkaart h1 { font-size: 1.25rem; margin-bottom: 4px; }
.loginkaart p.sub { color: var(--ink-soft); font-size: .87rem; margin: 0 0 20px; }

/* ------------------------------------------------------------- hulpklassen */
.rij { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rij.eind { justify-content: flex-end; }
.zacht { color: var(--ink-soft); }
.klein { font-size: .8rem; }
.mb0 { margin-bottom: 0; } .mt16 { margin-top: 16px; }
.definitie { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 7px 14px; }
.definitie dt { color: var(--ink-soft); font-size: .82rem; }
.definitie dd { margin: 0; }
.balk { height: 7px; background: #e8ebef; border-radius: 5px; overflow: hidden; }
.balk > span { display: block; height: 100%; background: var(--brand); }
.print-only { display: none; }

@media (max-width: 880px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; }
  .side nav { display: flex; flex-wrap: wrap; }
  .definitie { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .acties, .knop, .tabs { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; } .kaart { box-shadow: none; }
}
