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

:root {
  --bg:       #0d1117;
  --bg2:      #161b27;
  --bg3:      #1e2638;
  --rand:     #2a3040;
  --rand2:    #353d52;
  --tekst:    #e2e8f0;
  --sub:      #64748b;
  --sub2:     #475569;
  --blauw:    #4f8ef7;
  --blauw2:   #3a7ae8;
  --groen:    #22c55e;
  --rood:     #ef4444;
  --amber:    #f59e0b;
  --paars:    #a78bfa;
  --r:        8px;
  --schaduw:  0 4px 20px rgba(0,0,0,.4);
  --font:     'DM Sans', system-ui, sans-serif;
  --mono:     'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tekst);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── AUTH ── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 60% at 20% 20%, rgba(79,142,247,.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 80%, rgba(167,139,250,.08) 0%, transparent 60%),
    var(--bg);
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--rand);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--schaduw);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 8px;
}
.auth-brand span { font-size: 38px; display: block; margin-bottom: 10px; }
.auth-brand h1 { font-size: 22px; font-weight: 600; }
.auth-brand p  { color: var(--sub); font-size: 13px; margin-top: 4px; }

.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fg label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sub2);
}

/* ── APP LAYOUT ── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--rand);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--rand);
}

.brand-icoon {
  font-size: 22px;
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1e3a5f, #2d4a7a);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.brand-naam { font-size: 14px; font-weight: 600; line-height: 1.2; }
.brand-sub  { font-size: 11px; color: var(--sub); }

nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--sub2);
  font-size: 13.5px;
  transition: all .15s;
}
.nav-item:hover  { background: var(--bg3); color: var(--tekst); }
.nav-item.actief { background: rgba(79,142,247,.15); color: var(--blauw); font-weight: 500; }

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--rand);
}

.user-blok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 6px;
}

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blauw), var(--paars));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}

.u-naam { font-size: 13px; font-weight: 500; }
.u-sub  { font-size: 11px; color: var(--sub); }

.uitloggen {
  width: 100%;
  background: transparent;
  border: 1px solid var(--rand);
  color: var(--sub);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  transition: all .15s;
}
.uitloggen:hover { border-color: var(--rood); color: var(--rood); }

.main { flex: 1; margin-left: 210px; display: flex; flex-direction: column; min-height: 100vh; }

.pagina-kop {
  padding: 20px 24px 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--rand);
  position: sticky; top: 0; z-index: 50;
}
.pagina-kop h1 { font-size: 19px; font-weight: 600; padding-bottom: 14px; }
.pagina-body   { padding: 20px 24px; flex: 1; max-width: 1200px; }

/* ── KAARTEN ── */
.kaart {
  background: var(--bg2);
  border: 1px solid var(--rand);
  border-radius: var(--r);
  margin-bottom: 18px;
  overflow: hidden;
}

.kaart-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rand);
}
.kaart-kop h2 { font-size: 14px; font-weight: 600; }

/* ── STATS ── */
.stats-rij {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-kaart {
  background: var(--bg2);
  border: 1px solid var(--rand);
  border-radius: var(--r);
  padding: 16px;
  text-align: center;
}
.stat-kaart.hl { border-color: rgba(79,142,247,.35); background: rgba(79,142,247,.05); }
.stat-icoon  { font-size: 22px; margin-bottom: 8px; }
.stat-waarde { font-size: 28px; font-weight: 700; font-family: var(--mono); line-height: 1; }
.stat-label  { font-size: 11px; color: var(--sub); margin-top: 4px; text-transform: uppercase; letter-spacing: .4px; }

.twee-kolom { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ── TABEL ── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 14px;
  color: var(--sub); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--rand); background: var(--bg3);
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td     { background: rgba(255,255,255,.015); }
.tbl td.leeg         { text-align: center; color: var(--sub); padding: 24px; }

/* ── FORMULIEREN ── */
.form-rij {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding: 4px 0 0;
}

input[type=text], input[type=email], input[type=password],
input[type=url], input[type=number], input[type=date],
select, textarea {
  background: var(--bg3);
  border: 1px solid var(--rand2);
  border-radius: 6px;
  color: var(--tekst);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blauw); }
select option { background: var(--bg3); }

/* ── KNOPPEN ── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 6px; border: none;
  cursor: pointer; font-family: var(--font); font-size: 13px;
  font-weight: 500; text-decoration: none; transition: all .15s;
}
.btn-primary { background: var(--blauw); color: #fff; }
.btn-primary:hover { background: var(--blauw2); }
.btn-rood { background: rgba(239,68,68,.15); color: var(--rood); border: 1px solid rgba(239,68,68,.3); }
.btn-rood:hover { background: rgba(239,68,68,.25); }
.btn-sm  { padding: 4px 9px; font-size: 12px; }
.btn-vol { width: 100%; justify-content: center; }
.kaart > .btn, .kaart > form > .btn { margin: 8px 14px 16px; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 500; }
.badge-groen { background: rgba(34,197,94,.15);  color: var(--groen); }
.badge-rood  { background: rgba(239,68,68,.15);  color: var(--rood); }
.badge-info  { background: rgba(79,142,247,.15); color: var(--blauw); }
.badge-amber { background: rgba(245,158,11,.15); color: var(--amber); }

/* ── ALERTS ── */
.alert { padding: 11px 14px; border-radius: 6px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.5; }
.alert.ok, .alert-ok   { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.alert.err, .alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-info { background: rgba(79,142,247,.1); border: 1px solid rgba(79,142,247,.25); color: #93c5fd; }

/* ── LINKS ── */
.link      { color: var(--blauw); text-decoration: none; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link-sterk { color: var(--tekst); text-decoration: none; font-weight: 500; }
.link-sterk:hover { color: var(--blauw); }
.link-sub  { color: var(--sub); text-decoration: none; font-size: 13px; }

/* ── MODAL ── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--rand);
  border-radius: 12px; padding: 24px; width: 100%;
  box-shadow: var(--schaduw);
}
.modal-kop { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-kop h3 { font-size: 15px; font-weight: 600; }
.sluit { background: none; border: none; color: var(--sub); font-size: 16px; cursor: pointer; }

/* ── MISC ── */
.mono { font-family: var(--mono); font-size: 12px; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rand2); border-radius: 4px; }
