/* ── Custom properties ───────────────────────────────────────────── */
:root {
  --kleur-primair:     #1A1A2E;
  --kleur-accent:      #2C5F8A;
  --kleur-accent-h:    #1e4a6e;
  --kleur-licht:       #EEF2F7;
  --kleur-achtergrond: #F8FAFC;
  --kleur-oppervlak:   #FFFFFF;
  --kleur-tekst:       #1A1A2E;
  --kleur-tekst-sub:   #6B7280;
  --kleur-rand:        #D1D9E0;
  --kleur-groen:       #2E7D52;
  --kleur-blauw:       #2C5F8A;
  --kleur-oranje:      #D97706;
  --kleur-rood:        #C0392B;
  --font:              system-ui, -apple-system, sans-serif;
  --radius:            8px;
  --shadow:            0 1px 3px rgba(0,0,0,.1);
}

[data-theme="donker"] {
  --kleur-achtergrond: #0F0F1A;
  --kleur-oppervlak:   #1A1A2E;
  --kleur-tekst:       #F1F5F9;
  --kleur-tekst-sub:   #94A3B8;
  --kleur-rand:        #2D3748;
}

/* ── Reset & base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.hoofd { flex: 1 0 auto; }

a { color: var(--kleur-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover,
.btn--primary:hover,
.btn--secondary:hover,
.btn--danger:hover { text-decoration: none; }

/* ── Navigation ───────────────────────────────────────────────────── */
.nav {
  background: var(--kleur-primair);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: .03em;
}
.nav-logo:hover { text-decoration: none; opacity: .85; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; text-decoration: none; }
.nav-links a.active { border-bottom: 2px solid var(--kleur-accent); padding-bottom: 2px; }

.nav-burger { display: none; }

.btn-theme {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 1.15rem;
  padding: 4px;
  display: flex;
  align-items: center;
}
.btn-theme:hover { color: #fff; }

/* Show sun in light mode, moon in dark mode (shows active theme) */
.nav-icon-light  { display: inline; }  /* sun visible in light mode */
.nav-icon-dark { display: none; }    /* moon hidden in light mode */
[data-theme="donker"] .nav-icon-light  { display: none; }    /* sun hidden in dark mode */
[data-theme="donker"] .nav-icon-dark { display: inline; }  /* moon visible in dark mode */

/* Logout: show text on wide screens, icon only on narrow */
.nav-logout-text { margin-left: .3rem; }
@media (max-width: 640px) { .nav-logout-text { display: none; } }

/* ── Mobile nav ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }
  .nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--kleur-primair);
    padding: .5rem 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .75rem 1.5rem; }
}

/* ── Main ───────────────────────────────────────────────────────── */
.hoofd {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

/* ── Alerts (flash) ───────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .9rem;
}
.alert--error    { background: #fee2e2; color: var(--kleur-rood); border: 1px solid #fca5a5; }
.alert--success  { background: #d1fae5; color: var(--kleur-groen); border: 1px solid #6ee7b7; }
.alert--info    { background: #dbeafe; color: var(--kleur-blauw); border: 1px solid #93c5fd; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .9rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn--primary  { background: var(--kleur-accent); color: #fff; }
.btn--primary:hover { background: var(--kleur-accent-h); text-decoration: none; }
.btn--secondary { background: var(--kleur-oppervlak); color: var(--kleur-tekst); border-color: var(--kleur-rand); }
.btn--secondary:hover { background: var(--kleur-licht); }
.btn--danger   { background: var(--kleur-rood); color: #fff; }
.btn--danger:hover { opacity: .88; }
.btn--full      { width: 100%; justify-content: center; }

/* ── Form fields ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--kleur-tekst-sub); }
.field input,
.field select,
.field textarea {
  padding: .55rem .75rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  background: var(--kleur-oppervlak);
  color: var(--kleur-tekst);
  font-family: var(--font);
  font-size: .95rem;
  transition: border-color .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--kleur-accent); }

/* ── Login ───────────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  min-height: 0;
}
.login-card {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}
.login-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.login-sub   { color: var(--kleur-tekst-sub); font-size: .9rem; margin-bottom: 1.75rem; }

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.card-row   { font-size: .9rem; }

/* ── Portal ─────────────────────────────────────────────────────── */
.portal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.portal-title { font-size: 1.4rem; font-weight: 700; }
.portal-sub   { color: var(--kleur-tekst-sub); font-size: .85rem; margin-top: .15rem; }

/* ── Tabs ────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 2px solid var(--kleur-rand);
  margin-bottom: 1.75rem;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .6rem 1.1rem;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--kleur-tekst-sub);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover    { color: var(--kleur-tekst); }
.tab-btn.active   { color: var(--kleur-accent); border-bottom-color: var(--kleur-accent); font-weight: 600; }

[x-cloak] { display: none !important; }

/* ── KPI blocks ─────────────────────────────────────────────────── */
.kpi-raster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
@media (max-width: 640px) {
  .kpi-raster { grid-template-columns: repeat(2, 1fr); }
}

.kpi-block {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  text-align: center;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--kleur-tekst);
}
.kpi-label  { font-size: .78rem; color: var(--kleur-tekst-sub); text-transform: uppercase; letter-spacing: .05em; }

.kpi--green { color: var(--kleur-groen); }
.kpi--blue { color: var(--kleur-accent); }
.kpi--orange{ color: var(--kleur-oranje); }
.kpi--red  { color: var(--kleur-rood); }
.kpi--dim   { color: var(--kleur-tekst-sub); }

/* ── Trend cards ───────────────────────────────────────────────── */
.trend-row {
  display: flex;
  gap: .75rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.trend-card {
  flex: 1;
  min-width: 140px;
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.trend-card--success { border-left: 4px solid var(--kleur-groen); }
.trend-card--danger  { border-left: 4px solid var(--kleur-rood); }
.trend-number { font-size: 1.5rem; font-weight: 700; }
.trend-label   { font-size: .8rem; color: var(--kleur-tekst-sub); }
.trend-card--success .trend-number { color: var(--kleur-groen); }
.trend-card--danger  .trend-number { color: var(--kleur-rood); }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge--groen { background: #d1fae5; color: var(--kleur-groen); }
.badge--rood  { background: #fee2e2; color: var(--kleur-rood); }
.badge--grijs { background: var(--kleur-licht); color: var(--kleur-tekst-sub); }

/* ── Placeholder (temporary) ─────────────────────────────────────── */
.placeholder {
  padding: 3rem;
  text-align: center;
  color: var(--kleur-tekst-sub);
  font-style: italic;
}

/* ── Position table ────────────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}
.table-search {
  padding: .45rem .75rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  background: var(--kleur-oppervlak);
  color: var(--kleur-tekst);
  font-family: var(--font);
  font-size: .9rem;
  width: 260px;
}
.table-search:focus { outline: none; border-color: var(--kleur-accent); }
.table-count { font-size: .82rem; color: var(--kleur-tekst-sub); }

.table-wrap { overflow-x: auto; }

.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.pos-table thead th {
  background: var(--kleur-primair);
  color: #fff;
  padding: .55rem .75rem;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}
.th-sort { cursor: pointer; }
.th-sort:hover { background: var(--kleur-accent); }
.th-pos { width: 70px; text-align: center; }
.th-url { width: 220px; }
.th-term { min-width: 200px; }

.pos-table tbody tr {
  border-bottom: 1px solid var(--kleur-rand);
  transition: background .1s;
}
.pos-table tbody tr:hover { background: var(--kleur-licht); }
.table-row-clickable { cursor: pointer; }
.table-row-clickable:hover { background: var(--kleur-licht) !important; }
.td-actions { text-align: right; white-space: nowrap; padding: .45rem .75rem; }
/* Last column in any pos-table always right-aligns action buttons */
.pos-table td:last-child:has(.btn) { text-align: right; white-space: nowrap; }
.row--top10 { background: #f0fdf4 !important; }
[data-theme="donker"] .row--top10 { background: #0d2818 !important; }
.row--top10:hover { background: #dcfce7 !important; }
[data-theme="donker"] .row--top10:hover { background: #14391f !important; }

.td-term {
  padding: .55rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.matched-query {
  font-size: .75rem;
  color: var(--kleur-tekst-sub);
  font-style: italic;
}
.td-pos {
  padding: .55rem .5rem;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.td-pos--nu { font-size: 1rem; }
.td-url {
  padding: .55rem .75rem;
  font-size: .8rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-url a { color: var(--kleur-tekst-sub); }
.td-url a:hover { color: var(--kleur-accent); }

/* Wide URL column with expand button */
.td-url-wide {
  padding: .45rem .75rem;
  font-size: .8rem;
  max-width: 340px;
}
.td-url-link {
  color: var(--kleur-tekst-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
  display: inline-block;
  vertical-align: middle;
}
.td-url-link:hover { color: var(--kleur-accent); }
.btn-copy {
  background: none;
  border: 1px solid var(--kleur-rand);
  border-radius: 4px;
  cursor: pointer;
  color: var(--kleur-tekst-sub);
  font-size: .72rem;
  padding: .1rem .35rem;
  line-height: 1.4;
  flex-shrink: 0;
}
.btn-copy:hover { border-color: var(--kleur-accent); color: var(--kleur-accent); }

/* URL expand row in position tables */
.row-clickable { cursor: pointer; }
.url-expand-row td { background: var(--kleur-licht) !important; }
[data-theme="donker"] .url-expand-row td { background: var(--kleur-oppervlak) !important; }
.td-empty {
  padding: 2rem;
  text-align: center;
  color: var(--kleur-tekst-sub);
  font-style: italic;
}

/* Position color classes */
.pos--green  { color: var(--kleur-groen); }
.pos--blue  { color: var(--kleur-accent); }
.pos--orange { color: var(--kleur-oranje); }
.pos--red   { color: var(--kleur-rood); }
.pos--none   { color: var(--kleur-tekst-sub); }

/* Trend classes (in the table) */
.trend--up { color: var(--kleur-groen); font-weight: 700; }
.trend--down  { color: var(--kleur-rood);  font-weight: 700; }
.trend--neutral  { color: var(--kleur-tekst-sub); }

/* Sort icon */
.sort-icon        { opacity: .35; font-size: .75rem; margin-left: .2rem; }
.sort-icon--active{ opacity: 1; color: #fff; }

/* Legend below the table */
.legend {
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--kleur-tekst-sub);
}

/* ── Chart tab ─────────────────────────────────────────────────── */
.chart-wrap {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  max-height: 420px;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .35rem .5rem;
  max-height: 260px;
  overflow-y: auto;
  padding: .5rem;
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
}
.chart-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: .83rem;
  color: var(--kleur-tekst-sub);
  transition: background .1s;
}
.chart-label:hover { background: var(--kleur-licht); }
.chart-label--active { color: var(--kleur-tekst); font-weight: 500; }

.chart-check { display: none; }

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .35;
  transition: opacity .1s;
}
.chart-label--active .chart-dot { opacity: 1; }

.chart-term {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-pos {
  font-weight: 700;
  font-size: .8rem;
  min-width: 24px;
  text-align: right;
}

/* ── Step indicator ─────────────────────────────────────────────── */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.25rem 0 .25rem;
}
.step {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--kleur-tekst-sub);
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--kleur-rand);
  color: var(--kleur-tekst-sub);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  flex-shrink: 0;
}
.step--done .step-num  { background: var(--kleur-groen); color: #fff; }
.step--active .step-num { background: var(--kleur-accent); color: #fff; }
.step--done  { color: var(--kleur-groen); }
.step--active { color: var(--kleur-accent); font-weight: 600; }
.step-line {
  flex: 1; height: 2px;
  background: var(--kleur-rand);
  margin: 0 .5rem;
  min-width: 24px;
}

/* ── Tag chips ───────────────────────────────────────────────────── */
.tag-chip {
  display: inline-block;
  padding: .15rem .5rem;
  background: var(--kleur-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: 999px;
  font-size: .75rem;
  color: var(--kleur-tekst-sub);
}

/* ── Terms & tags list ─────────────────────────────────────────── */
.term-row {
  border-bottom: 1px solid var(--kleur-rand);
  padding-bottom: .5rem;
}
.term-row:last-child { border-bottom: none; padding-bottom: 0; }
.term-row-content { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.term-name { font-size: .88rem; min-width: 140px; }
.term-chips { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }

/* Tag chip with ✕ inside */
.tag-chip--removable {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.chip-x {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .55;
  font-size: .65rem;
  padding: 0;
  line-height: 1;
}
.chip-x:hover { opacity: 1; color: var(--kleur-rood); }

.chip-add {
  background: none;
  border: 1px dashed var(--kleur-rand);
  border-radius: 999px;
  cursor: pointer;
  color: var(--kleur-tekst-sub);
  font-size: .75rem;
  padding: .1rem .4rem;
  line-height: 1.4;
}
.chip-add:hover { border-color: var(--kleur-accent); color: var(--kleur-accent); }

/* Bulk actions bar */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .5rem .6rem;
  background: var(--kleur-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  margin-bottom: .4rem;
}

/* Term row with edit/delete (client search terms) */
.term-row-manage {
  border-bottom: 1px solid var(--kleur-rand);
  padding: .3rem 0;
}
.term-row-manage:last-child { border-bottom: none; }
.term-row-display {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.tag-input {
  padding: .35rem .6rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  background: var(--kleur-oppervlak);
  color: var(--kleur-tekst);
  font-family: var(--font);
  font-size: .85rem;
}
.tag-input:focus { outline: none; border-color: var(--kleur-accent); }

/* Custom autocomplete dropdown */
.tag-ac-wrap    { position: relative; flex: 1; min-width: 0; max-width: 180px; }
.tag-ac-wrap .tag-input { width: 100%; box-sizing: border-box; }
.tag-ac-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
}
.tag-ac-item {
  display: block;
  width: 100%;
  padding: .4rem .7rem;
  font-size: .85rem;
  font-family: var(--font);
  color: var(--kleur-tekst);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.tag-ac-item:hover { background: var(--kleur-licht); }

/* ── Domain selector (client portal) ─────────────────────────────── */
.domain-selector {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.domain-select {
  padding: .4rem .65rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  background: var(--kleur-oppervlak);
  color: var(--kleur-tekst);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 180px;
}
.domain-select:focus { outline: none; border-color: var(--kleur-accent); }
.domain-badge {
  font-size: .88rem;
  font-weight: 600;
  color: var(--kleur-tekst);
  padding: .4rem .65rem;
  background: var(--kleur-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
}

/* Keep old project-btn class for backward compat */
.project-selector { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.project-btn { padding: .35rem .75rem; border-radius: var(--radius); border: 1px solid var(--kleur-rand); background: var(--kleur-oppervlak); color: var(--kleur-tekst-sub); font-size: .82rem; text-decoration: none; }
.project-btn--active { background: var(--kleur-accent); color: #fff; border-color: var(--kleur-accent); font-weight: 600; }

/* ── Admin layout ────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  color: var(--kleur-tekst-sub);
  margin-bottom: .4rem;
  text-decoration: none;
}
.back-link:hover { color: var(--kleur-accent); text-decoration: none; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .75rem;
}
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 768px) { .admin-grid { grid-template-columns: 1fr; } }

/* Search terms editor */
.search-textarea {
  width: 100%;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: .82rem;
  line-height: 1.5;
  padding: .6rem .75rem;
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  resize: vertical;
}
.search-textarea:focus { outline: none; border-color: var(--kleur-accent); }
.zoek-dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .75rem; font-size: .88rem; }
.zoek-dl dt { color: var(--kleur-tekst-sub); }
.zoek-dl dd { font-weight: 700; }
.zoek-formaat {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: .78rem;
  background: var(--kleur-achtergrond);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .6rem .75rem;
  white-space: pre;
  overflow-x: auto;
}

/* ── Reports tab ───────────────────────────────────────────────── */
.report-section { margin-bottom: 1rem; }

.report-recent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.report-date   { font-weight: 700; font-size: 1.05rem; }
.report-file { font-size: .8rem; color: var(--kleur-tekst-sub); margin-top: .15rem; }

.report-info {
  font-size: .9rem;
  color: var(--kleur-tekst-sub);
  margin-bottom: .85rem;
}

.report-list { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.report-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  background: var(--kleur-achtergrond);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
}
.report-item-date { font-size: .82rem; color: var(--kleur-tekst-sub); min-width: 90px; }
.report-item-link  { flex: 1; font-size: .82rem; color: var(--kleur-tekst-sub);
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-item-link:hover { color: var(--kleur-accent); }
.report-item-btn  { padding: .25rem .6rem; font-size: .82rem; }

/* Toggle switch */
.monthly-toggle {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
}
.toggle-wrap     { flex-shrink: 0; position: relative; width: 44px; height: 24px; }
.toggle-input    {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--kleur-rand);
  border-radius: 24px;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-input:checked + .toggle-slider { background: var(--kleur-accent); }
.toggle-input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-text { font-size: .9rem; line-height: 1.5; padding-top: .15rem; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer-bar {
  width: 100%;
  border-top: 1px solid var(--kleur-rand);
  background: var(--kleur-oppervlak);
  flex-shrink: 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  font-size: .78rem;
  color: var(--kleur-tekst-sub);
}
