@import url("/static/fonts.css");

:root {
  --brand: #893A6A; --navy: #020240; --accent: #A9426E; --accent-dark: #8f3359;
  --bg: #F4F4FB; --text: #070639; --muted: #5b5a7a; --line: #e2e2ee; --card: #ffffff;
  --ok: #1f7a4d; --warn: #9a6400; --bad: #b3261e;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Lato, system-ui, sans-serif; }
h1, h2, h3 { font-family: Niramit, Lato, sans-serif; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- kop ---------- */
.top { background: var(--navy); color: #fff; }
.top .in { max-width: 1120px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top img { height: 34px; display: block; }
.top .who { flex: 1; min-width: 140px; font-family: Niramit, sans-serif; font-weight: 600; opacity: .92; }
.top a, .top button.link { color: #fff; opacity: .85; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.top a:hover, .top button.link:hover, .top a.on { opacity: 1; background: rgba(255,255,255,.12); }
.top nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.top form { margin: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }

/* ---------- knoppen en formulieren ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: var(--radius); padding: 10px 18px; font: 700 1rem Lato, sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); padding: 8px 14px; }
.btn.ghost:hover { background: rgba(169,66,110,.08); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], select { width: 100%; padding: 11px 12px; border: 1.5px solid #cfcfe0; border-radius: var(--radius); font: inherit; color: var(--text); background: #fff; }
input:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(169,66,110,.35); outline-offset: 1px; border-color: var(--accent); }
.alert { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; }
.alert.error { background: #fdecea; color: #7a1b15; }
.alert.notice { background: #e8f4ee; color: #17603b; }
.alert.secret { background: #fff8e1; color: #5a4300; border: 1.5px solid #e6c65c; }
.alert.secret code { font-size: 1.15rem; font-weight: 700; user-select: all; }

/* ---------- inloggen ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.login .brand { background: var(--navy) linear-gradient(160deg, #020240 55%, #3a1840 130%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .brand img { height: 46px; align-self: flex-start; }
.login .brand .slogan { font: 700 2.4rem/1.1 Niramit, sans-serif; margin: 0 0 12px; }
.login .brand p { margin: 0; opacity: .8; max-width: 30ch; }
.login .panel { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.login .box { width: 100%; max-width: 380px; }
.login .box h1 { margin-bottom: 4px; }
.login .box .btn { width: 100%; margin-top: 22px; padding: 13px; }
.login .langs { margin-top: 28px; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login .brand { padding: 24px 16px; gap: 20px; }
  .login .brand .slogan { font-size: 1.6rem; }
}

/* ---------- dashboard ---------- */
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.bar h1 { flex: 1; min-width: 200px; }
.tabs { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 3px; }
.tabs a { padding: 6px 14px; border-radius: 9px; text-decoration: none; color: var(--text); font-weight: 700; font-size: .92rem; }
.tabs a.on { background: var(--brand); color: #fff; }
.pager { display: inline-flex; align-items: center; gap: 6px; }
.pager a, .pager span.off { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--text); font-size: 1.1rem; }
.pager span.off { opacity: .35; }
.pager strong { min-width: 150px; text-align: center; font-family: Niramit, sans-serif; font-size: 1.05rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h2 { margin-bottom: 14px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .g4 { grid-template-columns: 1fr; } }

.hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-bottom: 16px; }
.hero .big { font: 700 4rem/1 Niramit, sans-serif; color: var(--brand); }
.hero .big small { font-size: 1.8rem; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; gap: 14px; } .hero .big { font-size: 3.2rem; } }
.share { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; margin: 10px 0 12px; }
.share .seg { display: block; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; margin: 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend b { font-variant-numeric: tabular-nums; }

.kpi .label { color: var(--muted); font-size: .9rem; font-weight: 700; }
.kpi .value { font: 700 2rem/1.15 Niramit, sans-serif; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.kpi .sub { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.delta { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.delta b { color: var(--text); }

.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #ececf4; stroke-width: 1; }
.chart .axis { stroke: #c9c9da; stroke-width: 1; }
.chart .tick { font: 11px Lato, sans-serif; fill: var(--muted); }
.chart .hit { fill: transparent; }
.chart .bar:hover .hit { fill: rgba(7,6,57,.05); }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: .95rem; }
.rows .track { height: 12px; }
.rows .fill { display: block; height: 100%; min-width: 2px; background: var(--brand); border-radius: 0 4px 4px 0; }
.rows .fill.zero { background: transparent; }
.rows .n { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
.rows .tag { font-size: .75rem; color: var(--muted); display: block; }
dl.facts { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
details { margin-top: 12px; font-size: .9rem; } summary { cursor: pointer; color: var(--accent); font-weight: 700; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.ok { background: #e8f4ee; color: var(--ok); } .pill.warn { background: #fff3d6; color: var(--warn); }
.pill.bad { background: #fdecea; color: var(--bad); } .pill.off { background: #ececf4; color: var(--muted); }
.notes { font-size: .85rem; color: var(--muted); }
.notes p { margin: 0 0 6px; max-width: 90ch; }
.adminbar { background: #fff8e1; border: 1.5px solid #e6c65c; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.adminbar span { flex: 1; min-width: 180px; }
.inline { display: inline; } .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 640px) { .formgrid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: 18px; height: 18px; }

#tip { position: fixed; z-index: 10; pointer-events: none; background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .85rem; max-width: 260px; display: none; }

.printhead { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11pt; }
  .top, .bar .tabs, .bar .pager a, .bar .pager span.off, .adminbar, details, .noprint, #tip { display: none !important; }
  .printhead { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .printhead img { height: 28px; }
  main { max-width: none; padding: 0; }
  .card { break-inside: avoid; padding: 12px; border-radius: 10px; }
  .grid { gap: 8px; margin-bottom: 8px; }
  .g4 { grid-template-columns: repeat(4, 1fr) !important; } .g2 { grid-template-columns: repeat(2, 1fr) !important; } .g3 { grid-template-columns: repeat(3, 1fr) !important; }
  .hero { grid-template-columns: auto 1fr !important; margin-bottom: 8px; }
  .hero .big { font-size: 3rem; } .kpi .value { font-size: 1.4rem; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
