:root {
  /* Dark theme (default) */
  --menu-bar-h: 70px;
  --bg1: #0b1220;
  --bg2: #0a0f1f;
  --card: rgba(17, 24, 39, 0.72);
  --card-blur: saturate(140%) blur(6px);
  --stroke: rgba(148, 163, 184, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --flash: #0ea5e9;
  --flash-bg: rgba(14, 165, 233, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Light theme override */
body.gray {
  --bg1: #f8fafc;
  --bg2: #f1f5f9;
  --card: rgba(255, 255, 255, 0.95);
  --card-blur: saturate(140%) blur(6px);
  --stroke: rgba(148, 163, 184, 0.25);
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --flash: #0284c7;
  --flash-bg: rgba(2, 132, 199, 0.12);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
body.light {
  --bg1: #fffbea; /* zacht warm geel in plaats van koel grijs */
  --bg2: #fff5d7; /* iets donkerder variant */
  --card: rgba(255, 255, 255, 0.95);
  --card-blur: saturate(140%) blur(6px);
  --stroke: rgba(212, 163, 66, 0.3); /* goudachtig randje */
  --text: #1a1509; /* donkerbruin ipv blauwzwart */
  --muted: #7c6f57; /* warm grijsbruin */
  --accent: #f59e0b; /* zonnig oranjegeel */
  --accent-hover: #d97706; /* diep oranje */
  --accent-soft: rgba(245, 158, 11, 0.15); /* zachte zonnige highlight */
  --flash: #facc15; /* helder geel voor meldingen */
  --flash-bg: rgba(250, 204, 21, 0.15);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body.dashboard {
  background: radial-gradient(1200px 800px at 80% -10%, rgba(59,130,246,0.18), transparent 55%),
              radial-gradient(900px 600px at -10% 110%, rgba(168,85,247,0.14), transparent 60%),
              linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(10, 15, 31, 0.65);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}
.brand { font-weight: 700; letter-spacing: 0.2px; }
.nav { display: flex; gap: 14px; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(148,163,184,0.08); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }

/* Buttons */
.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white; cursor: pointer;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.28);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
  width: 800px;
}
.btn:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(59,130,246,0.38); }
.btn:active { transform: translateY(1px); }
.btn.small {
  padding: 6px 10px;
  font-size: 14px;
}
/* Layout */
.container { max-width: 1100px; margin: 22px auto; padding: 0 16px; }

.flash {
  margin: 0 0 16px;
  background: var(--flash-bg);
  color: var(--flash);
  border: 1px solid rgba(14,165,233,0.4);
  padding: 10px 12px;
  border-radius: 12px;
}

/* Cards */
.card {
  background: var(--card);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.title { margin: 0 0 8px; font-weight: 700; letter-spacing: .2px; }
.subtitle { margin: 0 0 8px; color: var(--text); font-weight: 600; }
.meta { color: var(--muted); margin-top: 6px; }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Tabel (users) */
.table-wrap { width: 100%; overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
}
.table thead {
  background: rgba(148, 163, 184, 0.08);
}
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  color: var(--text);
}
.table th { font-weight: 600; color: #cbd5e1; }
.table tr:hover td { background: rgba(148,163,184,0.06); }
.table tr:last-child td { border-bottom: none; }

/* Rol-formulier in tabel */
.role-form { display: flex; align-items: center; gap: 10px; }
.role-form select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(2, 6, 23, 0.6);
  color: var(--text);
  outline: none;
}
.role-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Form */
.form { display: grid; gap: 10px; }
.form input {
  margin-bottom: 5px;  
  font-size: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(2, 6, 23, 0.6);
  color: var(--text);
  outline: none;
}
.form input::placeholder { color: var(--muted); }
.form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* Button */
.form button {
  font-size: 16px;
  margin-bottom: 5px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 18px rgba(59,130,246,0.28);
  transition: transform .08s ease, box-shadow .2s ease, filter .2s ease;
}
.form button:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(59,130,246,0.38); }
.form button:active { transform: translateY(1px); }

/* Link terug */
.link {
  color: var(--accent);
  text-decoration: none;
}
.link:hover { text-decoration: underline; }
/* === SIDEBAR LAYOUT ===================================================== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: rgba(10, 15, 31, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}

.sidebar .brand {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background .2s, color .2s;
}
.sidebar a:hover {
  background: rgba(148,163,184,.08);
  color: var(--text);
}
.sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar .bottom {
  margin-top: auto;
}

.main {
  flex: 1;
  padding: 22px;
}
/* === SIDEBAR LAYOUT ===================================================== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: rgba(10, 15, 31, 0.85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-right: 1px solid var(--stroke);
  display: flex; flex-direction: column;
  padding: 20px 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { font-weight: 700; font-size: 18px; margin-bottom: 20px; }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sidebar a {
  color: var(--muted); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; transition: background .2s, color .2s;
}
.sidebar a:hover { background: rgba(148,163,184,.08); color: var(--text); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar .bottom { margin-top: auto; }
.main { flex: 1; padding: 22px; }

/* === MOBILE / COLLAPSIBLE ============================================== */
.menu-bar {
  display: flex;   
  gap: 10px; align-items: center; 
  justify-content: space-between;
  padding: 12px 16px; 
  border-bottom: 1px solid var(--stroke);
  background: rgba(10,15,31,.65); 
  -webkit-backdrop-filter: blur(10px); 
  backdrop-filter: blur(10px);
}
.menu-title { font-weight: 700; }
#menu-toggle {
  border: 1px solid var(--stroke); border-radius: 10px; background: var(--card);
  padding: 8px 10px; cursor: pointer; color: var(--text);
}

/*@media (max-width: 900px) {*/
  .menu-bar { 
      display: flex; 
      position: sticky; 
      top: 0; 
      z-index: 20; 
  }
  .layout { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 52px; height: calc(100vh - 52px);
    transform: translateX(-100%); transition: transform .25s ease;
    z-index: 30;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .main { padding: 16px; }
  .sidebar-overlay {
    content: ""; display: none; position: fixed; inset: 0; z-index: 25;
    background: rgba(0,0,0,.4);
  }
  body.sidebar-open .sidebar-overlay { display: block; }
/*}*/

