:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2433; --muted: #6b7385; --line: #e2e5eb;
  --brand: #1f4e79; --brand-2: #2e6da4; --ok: #1e7e34; --warn: #b26a00; --err: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; gap: 24px; background: var(--brand); color: #fff; padding: 0 20px; flex-wrap: wrap; }
.topbar .brand { color: #fff; font-weight: 700; font-size: 17px; padding: 14px 0; letter-spacing: .5px; }
.topbar nav { display: flex; flex-wrap: wrap; flex: 1; }
.topbar nav a { color: #d6e4f2; padding: 15px 11px; }
.topbar nav a.active, .topbar nav a:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.topbar .user { color: #d6e4f2; font-size: 13px; }
.topbar .user a { color: #fff; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 .actions { margin-left: auto; display: flex; gap: 8px; }
h2 { font-size: 16px; margin: 24px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.stat .v { font-size: 22px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { background: #eef1f5; font-weight: 600; font-size: 12px; color: #3a4357; position: sticky; top: 0; }
tr:hover td { background: #f9fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; }
tr.group td { background: #e7edf5; font-weight: 600; }
tr.total td { font-weight: 700; background: #f1f3f7; }
.muted { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.wide, .field-textarea { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field small { color: var(--muted); font-size: 11px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #c9ced8; border-radius: 6px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0e6; border-color: var(--brand-2); }
.field-checkbox { justify-content: flex-end; }
label.check { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px 16px; margin: 0 0 16px; background: var(--card); }
legend { font-weight: 700; padding: 0 6px; color: var(--brand); }
.btn, button { display: inline-block; font: inherit; font-weight: 600; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover, button:hover { background: var(--brand-2); text-decoration: none; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: #eef3f9; }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: #fbeaea; }
.btn-sm { padding: 3px 9px; font-size: 12px; }
.formactions { display: flex; gap: 8px; margin-top: 8px; }
.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.filters .field { min-width: 160px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash-ok { background: #e6f4ea; color: var(--ok); border: 1px solid #b7dfc2; }
.flash-err { background: #fbeaea; color: var(--err); border: 1px solid #f0c2bf; }
.flash-warn { background: #fff4e0; color: var(--warn); border: 1px solid #f2d39b; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #e8ebf0; color: #3a4357; }
.badge-actief, .badge-toegepast { background: #e6f4ea; color: var(--ok); }
.badge-voorstel, .badge-toekomstig { background: #fff4e0; color: var(--warn); }
.badge-beeindigd { background: #f1f1f1; color: #777; }
.badge-gecommuniceerd { background: #e3eefa; color: var(--brand); }
.badge-leeg { background: #fbeaea; color: var(--err); }
.err { color: var(--err); }
dl.kv { display: grid; grid-template-columns: 180px 1fr; gap: 4px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.login { max-width: 360px; margin: 80px auto; }
.inline { display: inline; }
@media (max-width: 700px) { main { padding: 12px; } dl.kv { grid-template-columns: 1fr; } }
h1 .btn, h2 .btn { font-size: 13px; font-weight: 600; }
