:root {
  --oranje: #f0902d;
  --grijs: #8d9aa5;
  --donker: #22303a;
  --lijn: #e3e8ec;
  --achtergrond: #f7f9fa;
  --wit: #ffffff;
  --groen: #2e9e5b;
  --rood: #cc3d3d;
  --geel: #b98a1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--achtergrond);
  color: var(--donker);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--wit);
  border-bottom: 1px solid var(--lijn);
}

.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: var(--oranje);
  color: var(--wit);
  font-size: 1.2rem;
}
.brand-name { color: var(--grijs); letter-spacing: 0.06em; }
.brand-name small { color: var(--oranje); }

nav { display: flex; align-items: center; gap: 1rem; }
/* display:flex zou het hidden-attribuut overrulen — menu pas ná inloggen. */
nav[hidden] { display: none; }
nav a { color: var(--donker); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--oranje); }

.container { max-width: 1100px; margin: 1.5rem auto; padding: 0 1.5rem; }

.card {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: 0.6rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat { text-align: center; }
.stat .n { font-size: 2rem; font-weight: 700; color: var(--oranje); }
.stat .l { color: var(--grijs); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--lijn); vertical-align: top; }
th { color: var(--grijs); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--lijn);
}
.badge.risk-0, .badge.risk-1 { background: #e2f3e9; color: var(--groen); }
.badge.risk-2 { background: #fdf3d9; color: var(--geel); }
.badge.risk-3, .badge.risk-4 { background: #fbe3e3; color: var(--rood); }

button {
  font: inherit;
  border: none;
  border-radius: 0.4rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  background: var(--oranje);
  color: var(--wit);
  font-weight: 600;
}
button.secondary { background: var(--wit); color: var(--donker); border: 1px solid var(--lijn); }
button.danger { background: var(--rood); }
button.linklike { background: none; color: var(--grijs); padding: 0; font-weight: 500; }
button:disabled { opacity: 0.5; cursor: default; }

input[type="email"], input[type="text"], input[type="password"] {
  font: inherit;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--lijn);
  border-radius: 0.4rem;
  width: 100%;
  max-width: 26rem;
}

.muted { color: var(--grijs); }
.error { color: var(--rood); }
.ok { color: var(--groen); }
.login-box { max-width: 30rem; margin: 3rem auto; }
.login-box h1 { font-size: 1.3rem; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.summary { white-space: pre-line; font-size: 1.05rem; line-height: 1.8; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
.rationale { color: var(--grijs); font-size: 0.85rem; max-width: 34rem; }
