:root {
  --bg: #f6f6f2; --surface: #ffffff; --text: #1c1d1a; --muted: #6b6c64; --line: #e2e2da;
  --green: #038C4C; --green-soft: #e6f3ec; --acid: #c8f542; --red: #c0392b; --red-soft: #fbeceb;
  --amber: #a86b00; --amber-soft: #fdf3dd; --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0b; --surface: #161814; --text: #ecece6; --muted: #9a9b92; --line: #2a2c27;
    --green: #2fb874; --green-soft: #13261b; --red: #ef6f61; --red-soft: #2c1714; --amber: #e6b04a;
    --amber-soft: #2a2312; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
header.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 56px; }
.logo { font-weight: 700; font-size: 19px; white-space: nowrap; text-decoration: none; color: var(--text); }
.logo span { color: var(--green); }
nav.main { display: flex; gap: 16px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav.main a { color: var(--muted); text-decoration: none; white-space: nowrap; font-size: 14px; padding: 16px 0;
  border-bottom: 2px solid transparent; }
nav.main a.on, nav.main a:hover { color: var(--text); border-bottom-color: var(--green); }
.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--green);
  color: #fff; font-size: 11px; text-align: center; line-height: 18px; margin-left: 3px; }
main.wrap { padding-top: 44px; padding-bottom: 72px; }
h1, h2, .logo, .stat .v { font-family: "Fraunces", Georgia, serif; }
h1 { font-size: 32px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.5px; line-height: 1.15; }
h2 { font-size: 20px; font-weight: 600; margin: 34px 0 12px; letter-spacing: -0.2px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .4px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list a { text-decoration: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--line);
  color: var(--text); white-space: nowrap; }
.pill.betaald, .pill.omgezet, .pill.akkoord { background: var(--green-soft); color: var(--green); }
.pill.te.laat, .pill.afgewezen, .pill.failed { background: var(--red-soft); color: var(--red); }
.pill.open, .pill.nieuw, .pill.incasso { background: var(--amber-soft); color: var(--amber); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=tel],
select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 6px;
  border: 1px solid var(--green); background: var(--green); color: #fff; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--green); }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; }
form.inline { display: inline; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; background: var(--green-soft); color: var(--green); }
.flash.error { background: var(--red-soft); color: var(--red); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cols3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.side { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.lines-ed { width: 100%; border-collapse: collapse; }
.lines-ed td { padding: 4px 4px 4px 0; vertical-align: top; }
.lines-ed th { font-size: 12px; color: var(--muted); font-weight: 500; text-align: left; padding: 0 4px 4px 0; }
.lines-ed textarea { min-height: 40px; }
.lines-ed .q { width: 80px; } .lines-ed .p { width: 120px; } .lines-ed .v { width: 80px; } .lines-ed .x { width: 30px; }
.totals { margin-left: auto; min-width: 260px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals .grand { border-top: 1px solid var(--text); font-weight: 700; margin-top: 4px; padding-top: 6px; }
.events { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.events li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.empty { padding: 26px; text-align: center; color: var(--muted); }
pre.snippet { background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 6px;
  overflow-x: auto; font-size: 12px; white-space: pre-wrap; }
.public { max-width: 640px; margin: 0 auto; padding: 32px 16px 60px; }
.public .logo { display: block; margin-bottom: 24px; font-size: 20px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14px; }
.check input { margin-top: 4px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  header.top .wrap { gap: 12px; }
  .side, .cols, .cols3 { grid-template-columns: 1fr; }
  .side > *, .grid > * { min-width: 0; }
  table.list { display: block; overflow-x: auto; }
  .public .spread > div { text-align: left !important; }
  table.list .hide-m { display: none; }
  main.wrap { padding-top: 28px; }
  h1 { font-size: 26px; }
  .lines-ed .p { width: 90px; } .lines-ed .q, .lines-ed .v { width: 60px; }
}
