:root{
  --bg:#0f172a; --card:#ffffff; --ink:#0f172a; --muted:#64748b;
  --brand:#1d4ed8; --brand-ink:#fff; --line:#e2e8f0; --ok:#16a34a; --bad:#dc2626;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);background:#f1f5f9}
body.center{min-height:100vh;display:grid;place-items:center;
  background:linear-gradient(135deg,#0f172a,#1e3a8a)}
.card{background:var(--card);padding:28px;border-radius:14px;width:340px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);display:flex;flex-direction:column;gap:14px}
.card h1{margin:0;font-size:22px}
.card .sub{margin:0;color:var(--muted);font-size:14px}
label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
input,select{padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:15px;color:var(--ink)}
button{background:var(--brand);color:var(--brand-ink);border:0;padding:11px 14px;border-radius:8px;
  font-size:15px;font-weight:600;cursor:pointer}
button.ghost{background:#fff;color:var(--brand);border:1px solid var(--brand)}
button.danger{background:var(--bad)}
button.mini{padding:6px 10px;font-size:13px;font-weight:500}
.alert{background:#fef2f2;color:var(--bad);border:1px solid #fecaca;padding:10px;border-radius:8px;font-size:14px}

/* Admin */
.wrap{max-width:1080px;margin:0 auto;padding:24px}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.topbar h1{font-size:20px;margin:0}
.topbar a{color:var(--brand);text-decoration:none;font-size:14px;margin-left:14px}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:24px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}
.kpi .n{font-size:28px;font-weight:700}
.kpi .l{color:var(--muted);font-size:13px}
.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:24px}
.panel h2{font-size:16px;margin:0 0 14px}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
th{color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.03em}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;font-weight:600}
.badge.on{background:#dcfce7;color:var(--ok)}
.badge.off{background:#fee2e2;color:var(--bad)}
.badge.admin{background:#e0e7ff;color:#3730a3}
.row-actions{display:flex;gap:6px;flex-wrap:wrap}
.newuser{display:grid;grid-template-columns:1fr 1fr 1fr auto auto;gap:10px;align-items:end}
.newuser label{color:var(--muted)}
@media(max-width:720px){.newuser{grid-template-columns:1fr 1fr}}
.muted{color:var(--muted)}

.pwrow{display:flex;gap:6px;align-items:stretch}
.pwrow input{flex:1;min-width:0}
.pwrow button{white-space:nowrap}

/* ---------- Gestylede login (huisstijl Processware) ---------- */
:root{ --brand-red:#b62626; --brand-red-dark:#9e1f1f; }
body.center{ background:#eef2f6; }
.loginwrap{ width:420px; max-width:92vw; }
.brandcard{ background:#fff; border-radius:16px; overflow:hidden;
  box-shadow:0 22px 55px rgba(2,6,23,.16); }
.brandhead{ background:var(--brand-red); color:#fff; padding:26px 28px 22px; text-align:center; }
.brandhead .ico{ width:54px; height:54px; margin:0 auto 12px; border:2px solid rgba(255,255,255,.9);
  border-radius:13px; display:flex; align-items:center; justify-content:center; }
.brandhead h1{ margin:0; font-size:23px; font-weight:700; letter-spacing:.2px; }
.brandhead .teams{ margin:6px 0 0; font-size:14px; font-weight:600; opacity:.95; }
.brandbody{ padding:22px 28px 26px; }
.brandbody .hint{ display:flex; gap:8px; align-items:center; justify-content:center;
  color:#64748b; font-size:14px; margin:2px 0 18px; }
.brandbody .hint svg{ color:#94a3b8; }
.brandbody label{ display:block; font-size:14px; color:#0f172a; font-weight:600; margin:0 0 6px; }
.ingroup{ display:flex; border:1px solid var(--line); border-radius:10px; overflow:hidden;
  margin-bottom:16px; background:#fff; transition:border-color .15s, box-shadow .15s; }
.ingroup:focus-within{ border-color:var(--brand-red); box-shadow:0 0 0 3px rgba(182,38,38,.12); }
.ingroup .pfx{ display:flex; align-items:center; justify-content:center; width:46px;
  background:#f8fafc; border-right:1px solid var(--line); color:#94a3b8; }
.ingroup input{ flex:1; min-width:0; border:0; padding:12px 12px; font-size:15px; outline:none; color:#0f172a; }
.btn-login{ width:100%; background:var(--brand-red); color:#fff; border:0; border-radius:10px;
  padding:13px; font-size:16px; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:8px; }
.btn-login:hover{ background:var(--brand-red-dark); }
.brandalert{ background:#fef2f2; color:var(--brand-red-dark); border:1px solid #fecaca;
  padding:10px 12px; border-radius:8px; font-size:14px; margin:0 0 16px; }
.brandfoot{ text-align:center; color:#94a3b8; font-size:13px; margin:18px 0 0; }
