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

:root {
  --bg: #f7f8f9;
  --card: #ffffff;
  --ink: #16191d;
  --ink-2: #33383f;
  --muted: #737b85;
  --faint: #9aa2ac;
  --line: #edeff2;
  --line-2: #e0e3e8;
  --accent: #0f766e;
  --accent-2: #0c625b;
  --accent-soft: #e8f3f1;
  --lime: #d4f24a;
  --sidebar: #131a1c;
  --sidebar-2: #1b2426;
  --green: #128a5a; --green-bg: #e7f5ee;
  --amber: #b7791f; --amber-bg: #fbf3e2;
  --red: #c23b34; --red-bg: #fbeceb;
  --blue: #2563c9; --blue-bg: #eaf1fc;
  --purple: #6d54d6; --purple-bg: #eeeafb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .04), 0 3px 12px rgba(20, 30, 40, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.006em;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
h1, h2, h3 { letter-spacing: -0.02em; }

/* ---------- login ---------- */
#login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--sidebar); }
.login-card { width: 340px; background: var(--card); border-radius: 16px; padding: 36px 32px; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.login-mark { font-size: 21px; font-weight: 600; color: var(--ink); letter-spacing: -0.03em; display: flex; align-items: center; gap: 9px; }
.login-mark .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.login-mark span { color: var(--muted); font-weight: 450; }
.login-sub { color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px; font-family: inherit; font-size: 14px; background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center; border: 1px solid transparent; border-radius: 9px;
  padding: 9px 15px; font-weight: 500; font-size: 13.5px; background: var(--ink); color: #fff; transition: background .12s, border-color .12s, opacity .12s; white-space: nowrap;
}
.btn:hover { background: #000; }
.btn.lime { background: var(--accent); color: #fff; }
.btn.lime:hover { background: var(--accent-2); }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--muted); background: #fcfcfd; }
.btn.danger { background: #fff; color: var(--red); border-color: #f0d4d2; }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; padding: 11px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---------- shell ---------- */
#shell { display: grid; grid-template-columns: 224px 1fr; height: 100vh; }
.side { background: var(--sidebar); color: #aeb8bc; display: flex; flex-direction: column; padding: 20px 14px; }
.side .mark { font-size: 17px; font-weight: 600; color: #fff; letter-spacing: -0.03em; padding: 4px 10px 22px; display: flex; align-items: center; gap: 9px; }
.side .mark .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--lime); }
.side .mark span { display: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; text-decoration: none; color: #99a4a8; font-weight: 450; font-size: 13.5px; transition: background .12s, color .12s;
}
.nav a .ic { width: 16px; text-align: center; font-size: 13px; opacity: .8; }
.nav a:hover { background: var(--sidebar-2); color: #fff; }
.nav a.active { background: rgba(255,255,255,.09); color: #fff; }
.nav a.active .ic { color: var(--lime); opacity: 1; }
.side .foot { margin-top: auto; padding-top: 16px; font-size: 12.5px; color: #6f7d81; display: flex; flex-direction: column; gap: 8px; }
.side .foot a { color: #8b989c; cursor: pointer; }
.side .foot a:hover { color: #fff; }

.main { overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 32px 8px; gap: 16px; }
.topbar h1 { font-size: 22px; font-weight: 600; margin: 0; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
#topActions { display: flex; align-items: center; gap: 8px; }
.content { padding: 16px 32px 64px; }

/* ---------- cards / metrics ---------- */
.grid { display: grid; gap: 14px; }
.metrics { grid-template-columns: repeat(4, 1fr); }
.metric { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.metric .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric .v { font-size: 30px; line-height: 1.1; margin-top: 8px; font-weight: 600; letter-spacing: -0.03em; }
.metric .v small { font-size: 16px; color: var(--muted); font-weight: 500; }
.metric.hot { background: var(--card); border-color: var(--line); position: relative; }
.metric.hot::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0; background: var(--accent); }
.metric.hot .v { color: var(--accent); }
.metric .d { font-size: 12px; color: var(--muted); margin-top: 6px; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px 20px; }
.panel h2 { font-size: 14px; font-weight: 600; margin: 0 0 14px; letter-spacing: -0.01em; }
.two-col { grid-template-columns: 1.5fr 1fr; }

.act { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; color: var(--ink-2); }
.act:last-child { border: none; }
.act .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; margin-top: 5px; }
.act .when { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; }
.act.stage .dot { background: var(--blue); } .act.demo .dot { background: var(--purple); }
.act.hire .dot { background: var(--green); } .act.placement .dot { background: var(--accent); }
.act.lead .dot, .act.client .dot { background: var(--amber); }

/* ---------- kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { min-width: 250px; width: 250px; flex-shrink: 0; background: transparent; border-radius: 12px; padding: 0; }
.col h3 { font-size: 12.5px; font-weight: 600; margin: 2px 2px 10px; display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); }
.col h3 .cnt { background: var(--line); border-radius: 20px; padding: 1px 8px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.cardc { background: var(--card); border-radius: 10px; padding: 12px 13px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(20,30,40,.05); cursor: pointer; border: 1px solid var(--line); transition: border-color .12s, box-shadow .12s, transform .08s; }
.cardc:hover { border-color: var(--line-2); box-shadow: 0 3px 10px rgba(20,30,40,.09); transform: translateY(-1px); }
.cardc .nm { font-weight: 500; font-size: 13.5px; }
.cardc .meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

.chip { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 6px; letter-spacing: 0; }
.chip.A { background: var(--green-bg); color: var(--green); } .chip.B { background: var(--amber-bg); color: var(--amber); } .chip.C { background: var(--red-bg); color: var(--red); }
.chip.niveau { background: var(--blue-bg); color: var(--blue); }
.chip.lang { background: var(--line); color: var(--muted); }
.chip.score { background: var(--accent-soft); color: var(--accent-2); }
.chip.stage { background: var(--line); color: var(--ink-2); }
.chip.status { background: var(--green-bg); color: var(--green); }
.chip.status.OPGEZEGD, .chip.status.AFGEROND { background: var(--red-bg); color: var(--red); }
.chip.status.VERVANGEN { background: var(--amber-bg); color: var(--amber); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* ---------- drawer ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(16,25,28,.32); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 40; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; max-width: 94vw; background: #fff; box-shadow: -8px 0 40px rgba(16,25,28,.16); transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.7,.2,1); z-index: 41; overflow: auto; }
.drawer.open { transform: translateX(0); }
.drawer .dh { background: var(--sidebar); color: #fff; padding: 22px 24px; }
.drawer .dh .nm { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.drawer .dh .role { color: #9aa8ac; margin-top: 4px; font-size: 13px; }
.drawer .db { padding: 20px 24px; }
.drawer .close { position: absolute; top: 16px; right: 18px; background: rgba(255,255,255,.12); border: none; color: #fff; width: 28px; height: 28px; border-radius: 7px; font-size: 16px; line-height: 1; }
.drawer .close:hover { background: rgba(255,255,255,.2); }
.field { margin-bottom: 14px; }
.field .l { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.field .v { font-size: 13.5px; }
.motiv { background: var(--accent-soft); border-radius: 9px; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.actions-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 6px 0 4px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16,25,28,.38); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 440px; max-width: 94vw; padding: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal h3 { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.modal label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin: 12px 0 4px; }
.modal .row { display: flex; gap: 10px; }
.modal .row > * { flex: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; justify-content: flex-end; }

.empty { text-align: center; color: var(--muted); padding: 44px; font-size: 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 9px; font-weight: 500; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .18s; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

.health { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.health.ok { background: var(--green); } .health.warn { background: var(--amber); } .health.bad { background: var(--red); }

.onb-steps { display: flex; flex-direction: column; gap: 6px; }
.onb-step { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; color: var(--ink-2); }
.onb-step.done { background: var(--green-bg); border-color: #cdeddc; color: var(--green); }
.onb-step input { width: auto; }
.progress { height: 6px; background: var(--line); border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 20px; }
