/* Lettertypes lokaal (geen verzoeken naar Google). Licentie: SIL Open Font License. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains-mono.woff2") format("woff2"); }

/* Werk-app: navigatie links (op telefoon bovenaan), rechts het scherm; RSV-blauw als enige accent. */
:root {
  --bg: #f3f5f9; --surface: #ffffff; --ink: #152238; --muted: #5b6a82; --line: #dde3ec;
  --accent: #27519b; --accent-soft: #e6edf8;
  --good: #1f7a4d; --good-soft: #e3f3ea; --warn: #a15c00; --warn-soft: #fbefdc; --bad: #b3261e; --bad-soft: #fbe5e3;
  --f-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1522; --surface: #162033; --ink: #e6ecf5; --muted: #97a6bd; --line: #26334a;
    --accent: #7fa6e8; --accent-soft: #1d2d4a;
    --good: #5cc592; --good-soft: #163527; --warn: #e6a54a; --warn-soft: #3a2a12; --bad: #f08a80; --bad-soft: #3e1b19;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
img { max-width: 100%; }

/* --- Indeling --- */
.wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.zijbalk {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 20px 16px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 14px; }
.brand img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.brand-tekst { font-family: var(--f-display); font-size: 22px; font-weight: 700; letter-spacing: .02em; color: var(--accent); line-height: 1.15; }
.brand-tekst small { display: block; font-family: var(--f-body); font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.demo {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); background: var(--warn-soft);
  border-radius: 4px; padding: 3px 8px; margin: -4px 0 12px; align-self: flex-start;
}
.zijbalk .navlink { padding: 8px 10px; border-radius: 6px; color: var(--muted); font-weight: 500; text-decoration: none; }
.zijbalk .navlink:hover { background: var(--accent-soft); color: var(--ink); }
.zijbalk .navlink[aria-current="page"] { background: var(--accent); color: var(--surface); }
.user { margin-top: auto; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.user b { color: var(--ink); font-weight: 600; display: block; }
.user-links { display: flex; gap: 12px; margin-top: 6px; align-items: center; }
.user-links form { margin: 0; }

main { padding: 24px 28px 48px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Zonder login (inloggen, 2FA): gecentreerd */
.los { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 64px 16px; gap: 20px; }
.los .brand { flex-direction: column; text-align: center; margin: 0; }
.los .brand img { width: 96px; height: 96px; }
.los .panel { width: 100%; max-width: 420px; }
.los .demo { align-self: center; margin: 0; }

/* --- Typografie --- */
h1 { font-family: var(--f-display); font-size: 30px; font-weight: 700; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h2 { font-family: var(--f-display); font-size: 20px; font-weight: 600; margin: 0 0 10px; letter-spacing: .02em; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.sub { color: var(--muted); margin: 2px 0 0; }
.note { font-size: 13px; color: var(--muted); font-weight: 400; }
.mono { font-family: var(--f-mono); font-size: 13px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

/* --- Bouwstenen --- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px; min-width: 0; }
.panel.smal { max-width: 520px; }
.ruimte-boven { margin-top: 10px; }
.panel .rij { margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

button, .btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--surface); border: 0; border-radius: 6px; padding: 8px 14px; text-decoration: none;
}
button.ghost, .btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
button.gevaar { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
button.link { background: none; box-shadow: none; padding: 0; color: var(--accent); font-weight: 500; font-size: 13px; }
button.klein { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.inactief td { opacity: .55; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
td.acties { display: flex; gap: 6px; flex-wrap: wrap; }
td.acties form { margin: 0; }
td code { font-family: var(--f-mono); font-size: 12px; word-break: break-all; color: var(--muted); }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ok { background: var(--good-soft); color: var(--good); }
.wa { background: var(--warn-soft); color: var(--warn); }
.er { background: var(--bad-soft); color: var(--bad); }
.in { background: var(--accent-soft); color: var(--accent); }

.melding { padding: 10px 14px; border-radius: 6px; font-weight: 500; }
.melding.ok { background: var(--good-soft); color: var(--good); }
.melding.fout { background: var(--bad-soft); color: var(--bad); }
.panel .melding { margin-bottom: 14px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums;
}
.done .dot { background: var(--good); color: var(--surface); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.fact span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fact b { font-family: var(--f-display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.toolbar { margin-bottom: 12px; }
.zoek { flex: 1; min-width: 220px; max-width: 420px; }
.lijst { margin: 0; padding-left: 18px; }
.lijst li { margin-bottom: 4px; }
.uitleg { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.uitleg li { margin-bottom: 6px; }

.melding.wa-melding { background: var(--warn-soft); color: var(--warn); font-weight: 400; font-size: 14px; }
tr.totaalrij td { border-top: 2px solid var(--ink); }
.a4-miniatuur { width: 84px; height: 119px; object-fit: fill; border: 1px solid var(--line); border-radius: 4px; background: #fff; flex: none; }
.a4-miniatuur.leeg { display: grid; place-items: center; }
input.bedrag { width: 110px; display: inline-block; margin-left: 6px; }
.twee { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.filterrij th { padding: 6px 4px 8px; text-transform: none; letter-spacing: 0; }
th.selectie, td.selectie { width: 32px; padding-right: 0; }
tr.bezig { opacity: .5; }
tr.opgeslagen td { background: var(--good-soft); }
tr td { transition: background-color .6s ease; }
.bulkbalk { padding: 8px 10px; margin-bottom: 12px; border-radius: 6px; background: var(--bg); border: 1px dashed var(--line); }
.bulkbalk.actief { background: var(--accent-soft); border: 1px solid var(--accent); }
.kolomfilter { width: 100%; min-width: 72px; font-size: 12.5px; padding: 4px 6px; font-weight: 400; }
td select.kolomfilter[name=categorie] { min-width: 210px; }
.kolomfilter.gekozen { border-color: var(--accent); background: var(--accent-soft); }
input.kolomfilter:not(:placeholder-shown) { border-color: var(--accent); background: var(--accent-soft); }

/* --- Formulieren --- */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
textarea { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); resize: vertical; }
input, select {
  font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--ink); min-width: 0;
}
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; margin: 0; flex: none; }
input[type=file] { padding: 6px; }
.rij { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.vinkje, .form label.vinkje { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
.raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.raster label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }

.qr { display: block; margin: 8px auto; background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.wachtwoord { font-family: var(--f-mono); font-size: 20px; letter-spacing: 1px; }
.logo-voorbeeld {
  width: 120px; height: 120px; object-fit: contain; border: 1px dashed var(--line); border-radius: 8px; padding: 8px;
  background: var(--bg);
}
.logo-leeg { width: 120px; height: 120px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 8px; }

.paginering { display: flex; gap: 16px; justify-content: center; align-items: center; }

/* --- Telefoon --- */
@media (max-width: 760px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .zijbalk {
    position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px;
  }
  .brand { width: 100%; margin-bottom: 4px; }
  .brand img { width: 36px; height: 36px; }
  .demo { margin: 0 0 6px; }
  .user { margin: 8px 0 0; width: 100%; padding-top: 8px; }
  main { padding: 20px 16px 40px; }
  .raster { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Tabbladen en sleutel/waarde-tabellen (Instellingen) --- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 8px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--accent); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
table.kv th {
  width: 40%; text-transform: none; letter-spacing: 0; font-size: 13px; white-space: normal;
  border-bottom: 1px solid var(--line); padding: 7px 10px 7px 0; vertical-align: top;
}
table.kv { table-layout: fixed; }
table.kv td { padding: 7px 0; overflow-wrap: anywhere; }
table.kv td .pill { white-space: normal; line-height: 1.4; }
table.kv tr:last-child th { border-bottom: 0; }
