/* ================================================================
   HC Helmond Arbitragecommissie
   Dark trading/finance aesthetic — Bloomberg Terminal, maar modern
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Variables ──────────────────────────────────────────────────── */
/* Default = dark; light theme overrides below under [data-theme="light"] */
:root {
  --bg:             #070a0f;
  --bg-raised:      #0c1018;
  --bg-card:        #101520;
  --bg-card-hover:  #151d2a;
  --bg-input:       #0c1018;

  --border:         #1a2235;
  --border-mid:     #243044;
  --border-focus:   #5a9c2c;

  --text:           #dde4ef;
  --text-dim:       #8899b0;
  --text-muted:     #4a607a;

  --accent:         #8cc63f;
  --accent-hover:   #a3d666;
  --accent-glow:    rgba(140, 198, 63, 0.25);

  --green:          #22c55e;
  --green-bg:       rgba(34, 197, 94, 0.08);
  --green-border:   rgba(34, 197, 94, 0.25);

  --red:            #f43f5e;
  --red-bg:         rgba(244, 63, 94, 0.08);
  --red-border:     rgba(244, 63, 94, 0.25);

  --amber:          #f59e0b;
  --amber-bg:       rgba(245, 158, 11, 0.08);
  --amber-border:   rgba(245, 158, 11, 0.25);

  --blue:           #60a5fa;
  --blue-bg:        rgba(96, 165, 250, 0.08);
  --blue-border:    rgba(96, 165, 250, 0.25);

  --slate:          #4a607a;
  --slate-bg:       rgba(74, 96, 122, 0.1);
  --slate-border:   rgba(74, 96, 122, 0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;

  /* PicoCSS compatibility — keeps inline var(--pico-*) references working */
  --pico-muted-color:         var(--text-muted);
  --pico-muted-border-color:  var(--border);
  --pico-card-background-color: var(--bg-card);
  --pico-del-color:           var(--red);
  --pico-primary-border:      var(--accent);
  --pico-border-radius:       var(--radius-md);
  --pico-primary-color:       var(--accent);
}

/* ── Light theme ────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:             #f0f4f9;
  --bg-raised:      #e4eaf2;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f4f7fc;
  --bg-input:       #ffffff;

  --border:         #cdd6e3;
  --border-mid:     #b2becd;
  --border-focus:   #4b8f1e;

  --text:           #0c1a2b;
  --text-dim:       #2c4059;
  --text-muted:     #6a829a;

  --accent:         #4b8f1e;
  --accent-hover:   #5fa82a;
  --accent-glow:    rgba(75, 143, 30, 0.15);

  --green:          #16a34a;
  --green-bg:       rgba(22, 163, 74, 0.09);
  --green-border:   rgba(22, 163, 74, 0.3);

  --red:            #dc2626;
  --red-bg:         rgba(220, 38, 38, 0.08);
  --red-border:     rgba(220, 38, 38, 0.3);

  --amber:          #b45309;
  --amber-bg:       rgba(180, 83, 9, 0.08);
  --amber-border:   rgba(180, 83, 9, 0.3);

  --blue:           #1d4ed8;
  --blue-bg:        rgba(29, 78, 216, 0.08);
  --blue-border:    rgba(29, 78, 216, 0.25);

  --slate:          #64748b;
  --slate-bg:       rgba(100, 116, 139, 0.1);
  --slate-border:   rgba(100, 116, 139, 0.35);

  --pico-muted-color:           var(--text-muted);
  --pico-muted-border-color:    var(--border);
  --pico-card-background-color: var(--bg-card);
  --pico-del-color:             var(--red);
  --pico-primary-border:        var(--accent);
  --pico-primary-color:         var(--accent);
}

/* Primary button: donkere tekst past niet op donkerblauwe achtergrond in light mode */
[data-theme="light"] button:not(.secondary):not(.outline),
[data-theme="light"] [role="button"]:not(.secondary):not(.outline),
[data-theme="light"] input[type="submit"]:not(.secondary) {
  color: #ffffff;
}

/* Select-pijl in lichte kleur voor light mode */
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232c4059' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ── Theme toggle icon visibility ───────────────────────────────── */
/* In dark mode: toon zon (schakel naar licht) */
/* In light mode: toon maan (schakel naar donker) */
[data-theme="dark"] .icon-moon  { display: none; }
[data-theme="light"] .icon-sun  { display: none; }

/* Smooth transition bij wisselen */
body, article, table, thead th, tbody td,
input, textarea, select, .site-header, .site-footer, .badge {
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

/* ── HC Helmond huisstijl: logo lockup in de header (publiek + admin) ── */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.brand-lockup img {
  display: block;
  flex-shrink: 0;
  border-radius: 2px;
}

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

/* ── Base ───────────────────────────────────────────────────────── */
html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-md);
}

body.admin-layout {
  max-width: 960px;
}

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; margin-bottom: var(--space-lg); }
h3 { font-size: 1rem; }

p {
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.12s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

small {
  font-size: 0.8em;
  color: var(--text-muted);
}

strong {
  font-weight: 600;
  color: var(--text);
}

em {
  font-style: italic;
  color: var(--text-dim);
}

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  color: var(--amber);
}

ul, ol {
  padding-left: var(--space-lg);
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

li { margin-bottom: var(--space-xs); }

/* ── Layout ─────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header h1 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.12s;
}

.site-header h1 a:hover {
  color: var(--accent);
  text-decoration: none;
}

main {
  padding-bottom: var(--space-xl);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer p {
  color: inherit;
  margin: 0;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ── Admin Navigation ───────────────────────────────────────────── */
nav.admin-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

nav.admin-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  transition: color 0.12s, background 0.12s;
}

nav.admin-nav a:hover {
  color: var(--text);
  background: var(--bg-card);
  text-decoration: none;
}

nav.admin-nav small {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 var(--space-xs);
}

/* ── Forms ──────────────────────────────────────────────────────── */
form { margin: 0; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

legend {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 var(--space-sm);
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: var(--space-md);
}

label small {
  display: block;
  font-weight: 400;
  margin-top: 0.2rem;
}

label > input,
label > select,
label > textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-xs);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.45rem 0.65rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234a607a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 5rem;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 1em;
  height: 1em;
  cursor: pointer;
}

/* ── Switch (toggle) ────────────────────────────────────────────── */
.switch {
  position: relative;
  display: inline-block;
  width: 2.4rem;
  height: 1.35rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease;
}

.switch-track::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(1.35rem - 4px);
  height: calc(1.35rem - 4px);
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform .15s ease, background-color .15s ease;
}

.switch input:checked + .switch-track {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.switch input:checked + .switch-track::before {
  background: var(--accent);
  transform: translateX(calc(2.4rem - 1.35rem));
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Buttons ────────────────────────────────────────────────────── */
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  outline: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
  -webkit-appearance: none;
  appearance: none;
}

/* Primary */
button:not(.secondary):not(.outline),
[role="button"]:not(.secondary):not(.outline),
input[type="submit"]:not(.secondary),
input[type="button"]:not(.secondary) {
  background: var(--accent);
  color: #000c17;
  border-color: var(--accent);
  font-weight: 600;
}

button:not(.secondary):not(.outline):hover,
[role="button"]:not(.secondary):not(.outline):hover,
input[type="submit"]:not(.secondary):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 16px var(--accent-glow);
  text-decoration: none;
}

/* Secondary */
button.secondary,
[role="button"].secondary {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border-mid);
}

button.secondary:hover,
[role="button"].secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-mid);
  color: var(--text);
  text-decoration: none;
}

/* Outline */
button.outline,
[role="button"].outline,
button.secondary.outline,
[role="button"].secondary.outline {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

button.outline:hover,
[role="button"].outline:hover,
button.secondary.outline:hover,
[role="button"].secondary.outline:hover {
  background: var(--bg-card);
  color: var(--text-dim);
  border-color: var(--border-mid);
  text-decoration: none;
}

/* States */
button[aria-busy="true"],
button[aria-busy="true"]:hover {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

button[disabled],
[role="button"][disabled],
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Tables ─────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.845rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

thead th {
  text-align: left;
  padding: 0.55rem var(--space-md);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.6rem var(--space-md);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-dim);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--bg-card-hover);
  color: var(--text);
}

tbody td strong {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
}

tbody td a {
  color: var(--accent);
}

tbody td a:hover {
  color: var(--accent-hover);
}

/* Numeric columns */
tbody td:has(+ td),
td[style*="text-align:center"] {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ── Cards / Articles ───────────────────────────────────────────── */
article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

article:last-child {
  margin-bottom: 0;
}

article > header {
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
}

article > header strong {
  color: var(--text-muted);
  font-size: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  text-transform: inherit;
}

article > footer {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  border-top: 1px solid var(--border);
  background: none;
}

/* Dashboard stat card (wrapped in <a>) */
a > article {
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  text-align: center;
}

a > article:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  text-decoration: none;
}

a > article strong {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  line-height: 1.1;
  margin-bottom: var(--space-xs);
}

a > article small {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

/* Dashboard stat cards — "actief filter" en "vraagt aandacht" zijn twee
   verschillende betekenissen en krijgen elk een eigen, niet-overlappende
   vormtaal (niet allebei dezelfde blauwe rand). */
a > article.stat-card {
  position: relative;
}

a > article.stat-card.is-active {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

a > article.stat-card.is-active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

a > article.stat-card.is-active strong {
  color: var(--accent);
}

a > article.stat-card.is-attention strong::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.4rem;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ── Login card ─────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  justify-content: center;
  padding-top: var(--space-2xl);
}

.login-card {
  width: 100%;
  max-width: 320px;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--space-lg);
  right: var(--space-lg);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.login-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.login-card h2 {
  margin-bottom: var(--space-lg);
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.login-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-lg);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ── Meldingsformulier: stappen + contextpaneel ─────────────────── */
.melden-steps-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.melden-steps-label .is-current {
  color: var(--accent);
}

.melden-steps {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.melden-step {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}

.melden-step.is-current {
  background: var(--accent);
}

.melden-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 640px) {
  .melden-layout {
    grid-template-columns: 1fr;
  }
}

.melden-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.melden-sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.melden-sidebar-step {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.melden-sidebar-step:last-child {
  margin-bottom: 0;
}

.melden-sidebar-num {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.melden-sidebar-step.is-current .melden-sidebar-num {
  background: var(--accent);
  color: #000c17;
}

.melden-sidebar-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.melden-sidebar-step.is-current .melden-sidebar-text {
  color: var(--text-dim);
}

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  font-family: var(--font-sans);
}

/* Incident statuses */
.badge-pending_email_verification {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}

.badge-pending_review {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: var(--blue-border);
}

.badge-approved {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.badge-rejected {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.badge-expired {
  background: var(--slate-bg);
  color: var(--slate);
  border-color: var(--slate-border);
}

/* Mollie payment statuses */
.badge-paid {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.badge-open {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: var(--blue-border);
}

.badge-pending,
.badge-pending_creation {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}

.badge-failed,
.badge-canceled {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.badge-afgerond {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.badge-herinnerd {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}

.badge-mail-verzonden {
  background: var(--slate-bg);
  color: var(--slate);
  border-color: var(--slate-border);
}

.badge-mail-geopend {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: var(--blue-border);
}

.badge-mail-geklikt {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

/* ── Clickable table rows ────────────────────────────────────────── */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Banners & Alerts ───────────────────────────────────────────── */
.fout-banner,
[role="alert"] {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  padding: 0.7rem var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.845rem;
  line-height: 1.5;
}

/* Info/success banner */
[data-banner="info"] {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  color: var(--text-dim);
  padding: 0.7rem var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.845rem;
}

/* ── Dialog / Modal ─────────────────────────────────────────────── */
dialog {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 100%;
  width: 100%;
  position: fixed;
  inset: 0;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
}

dialog[open] {
  display: block;
}

dialog article {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(14, 165, 233, 0.1);
  max-width: 520px;
  margin: 5vh auto;
  padding: var(--space-lg);
}

dialog article > header {
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

dialog article > header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

/* ── Definition Lists ───────────────────────────────────────────── */
dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm) var(--space-lg);
  align-items: baseline;
  margin-bottom: var(--space-md);
}

dl:last-child {
  margin-bottom: 0;
}

dt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.1rem;
}

dd {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

dd strong {
  color: var(--text);
  font-weight: 500;
}

dd small {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.1rem;
}

.match-info {
  gap: var(--space-xs) var(--space-md);
}

/* ── Navigation (breadcrumb, pagination, filters) ───────────────── */
nav[aria-label="breadcrumb"] {
  margin-bottom: var(--space-md);
  font-size: 0.8rem;
}

nav[aria-label="breadcrumb"] a {
  color: var(--text-muted);
}

nav[aria-label="breadcrumb"] a:hover {
  color: var(--accent);
}

/* Filter pill nav */
nav[style*="display:flex"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

/* ── Scrollable table wrapper ───────────────────────────────────── */
div[style*="overflow-x:auto"] {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
}

/* ── Misc ────────────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

/* Logout form inline button */
form[style*="display:inline"] button {
  font-size: 0.72rem;
  padding: 0.15em 0.55em;
  letter-spacing: 0.02em;
}

/* Amount/price values get monospace */
td:nth-child(6) {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Theme toggle ───────────────────────────────────────────────── */
.theme-toggle {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  padding: 0.18em 0.42em !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: border-color 0.12s, color 0.12s, background 0.12s !important;
}

.theme-toggle:hover {
  border-color: var(--border-mid) !important;
  color: var(--text-dim) !important;
  background: var(--bg-card) !important;
}

/* ── Focus visible ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
[role="button"]:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
}
