:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f2f5; --border: #e3e6eb;
  --text: #16191f; --muted: #646b78; --accent: #2f5bd3; --accent-soft: #e8eefc;
  --s-nieuw: #2f5bd3; --s-nieuw-bg: #e8eefc;
  --s-benaderd: #a35c00; --s-benaderd-bg: #fdf1df;
  --s-gesprek: #7a3fc4; --s-gesprek-bg: #f2eafc;
  --s-klant: #1d7a46; --s-klant-bg: #e3f4ea;
  --s-afgewezen: #646b78; --s-afgewezen-bg: #eceef1;
  --shadow: 0 1px 2px rgba(16,24,40,.05);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318; --surface: #191c22; --surface-2: #20242c; --border: #2b3039;
    --text: #e8eaee; --muted: #9aa1ad; --accent: #7b9cff; --accent-soft: #1f2a47;
    --s-nieuw: #8fabff; --s-nieuw-bg: #1f2a47;
    --s-benaderd: #f0b45c; --s-benaderd-bg: #3a2a12;
    --s-gesprek: #c49cff; --s-gesprek-bg: #2d2140;
    --s-klant: #6fd39a; --s-klant-bg: #15301f;
    --s-afgewezen: #9aa1ad; --s-afgewezen-bg: #262a31;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 620; }
h3 { font-size: .95rem; font-weight: 620; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* kop */
.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--text); }
.brand:hover { text-decoration: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav a { color: var(--muted); padding: 6px 12px; border-radius: 8px; white-space: nowrap; font-weight: 520; }
nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
nav a.on { background: var(--accent-soft); color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }

/* blokken */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.grid { display: grid; gap: 16px; }
.cols-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .cols-main { grid-template-columns: minmax(0, 1fr); } }

/* kerncijfers */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > :last-child { grid-column: 1 / -1; }
}
.kpi { padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 520; }
.kpi .value { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .sub { color: var(--muted); font-size: .8rem; }

/* status */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 560; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-nieuw { color: var(--s-nieuw); background: var(--s-nieuw-bg); }
.st-benaderd { color: var(--s-benaderd); background: var(--s-benaderd-bg); }
.st-in-gesprek { color: var(--s-gesprek); background: var(--s-gesprek-bg); }
.st-klant { color: var(--s-klant); background: var(--s-klant-bg); }
.st-afgewezen { color: var(--s-afgewezen); background: var(--s-afgewezen-bg); }
.score { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); font-weight: 650; font-variant-numeric: tabular-nums; font-size: .85rem; }
.score.hoog { background: var(--accent-soft); color: var(--accent); }

/* formulieren */
select, input[type=search], textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { width: 100%; min-height: 140px; resize: vertical; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 560; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* tekstinhoud van het model */
.prose p { margin: 0 0 .7em; }
.prose ul, .prose ol { margin: 0 0 .7em; padding-left: 1.3em; }
.prose li { margin: .2em 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1 { font-size: 1.3rem; margin: 0 0 .8em; }
.prose h2 { margin: 1.4em 0 .6em; }

/* lijsten */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 14px 20px; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.findings { margin: 0; padding-left: 1.1em; color: var(--muted); }
.findings li { margin: 3px 0; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .78rem; font-weight: 560; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
@media (max-width: 700px) { .hide-sm { display: none; } }


.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .85rem; font-weight: 520; background: var(--surface); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tabs .n { opacity: .7; margin-left: 2px; font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h2 { color: var(--text); margin-bottom: 6px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--s-klant-bg); color: var(--s-klant); font-weight: 520; margin-bottom: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.logout { margin-left: auto; }
.logout button { font: inherit; font-size: .85rem; color: var(--muted); background: none; border: 0; padding: 6px 4px; cursor: pointer; white-space: nowrap; }
.logout button:hover { color: var(--text); text-decoration: underline; }

/* inlogpagina */
.login-wrap { max-width: 380px; margin: 9vh auto 0; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 1.1rem; margin-bottom: 20px; }
.login-card { padding: 28px; display: flex; flex-direction: column; }
.login-card label { font-size: .85rem; font-weight: 560; margin: 0 0 6px; }
.login-card input[type=text], .login-card input[type=password] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; width: 100%;
}
.login-card .btn { justify-content: center; padding: 10px 14px; margin-top: 4px; }
.alert { padding: 10px 14px; border-radius: 8px; background: #fdecec; color: #a32020; font-size: .9rem; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .alert { background: #3a1717; color: #ff9b9b; } }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .88em; }

/* ---------- vervangt de inline styles (CSP staat geen style-attributen toe) ---------- */
.lead-naam { font-size: 1.3rem; }
.lead-meta { margin: 6px 0 16px; }
.tussenkop { margin: 18px 0 6px; }
.acties { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.sectie { margin-top: 16px; }
.rechts { text-align: right; }
.regio { display: flex; justify-content: space-between; gap: 8px; }
.nieuws-uitleg, .nieuws-bron { margin-top: 3px; }
.zoek { display: flex; gap: 8px; }
.tabs { margin-bottom: 14px; }
.terug { margin-bottom: 10px; }
.veld { margin: 4px 0 14px; }
#notitie { margin-top: 4px; }
.opslaan-rij { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }
.smal { max-width: 760px; }
.login-sub { margin: 4px 0 20px; }
progress.bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 6px; border: 0; margin-top: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
progress.bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
