:root {
  --bg: #f4f5f8;
  --panel: #ffffff;
  --ink: #1d2433;
  --ink-2: #5b6478;
  --ink-3: #8a93a6;
  --line: #e3e6ec;
  --line-2: #eef0f4;
  --brand: #0f3d5e;
  --brand-2: #1a5a86;
  --accent: #f2a900;
  --focus: #2f7de1;
  --danger: #d83a3a;
  --ok: #10a36b;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(16, 30, 54, .14);
  --row-h: 38px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.4 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); }
.hidden { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 7px 12px; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: #c9ced8; background: #fafbfc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--danger); }
.btn.big { padding: 14px 18px; font-size: 16px; border-radius: 10px; justify-content: center; }
.input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: #fff; }
.input:focus, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }

/* ---------- login ---------- */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--brand) 0%, #0b2a42 100%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card p { margin: 0 0 20px; color: var(--ink-2); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.logo-mark { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 7px; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.error-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 0; }

/* ---------- desktop layout ---------- */
.app { display: grid; grid-template-columns: 220px 1fr; height: 100%; }
.side { background: var(--brand); color: #dce6ef; display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; overflow-y: auto; }
.side .logo { color: #fff; padding: 4px 8px 16px; }
.side a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.side a:hover { background: rgba(255,255,255,.08); }
.side a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.side .sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 4px; }
.side .me { margin-top: auto; padding: 10px; font-size: 13px; color: #b9c8d6; }
.side .me b { color: #fff; display: block; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 20px 0; }
.topbar h1 { margin: 0 0 10px; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 8px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.toolbar { display: flex; gap: 8px; align-items: center; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .search { max-width: 260px; }
.toolbar .count { color: var(--ink-3); font-size: 13px; margin-left: auto; }
.content { flex: 1; overflow: auto; padding: 16px 20px 60px; }

/* ---------- board table ---------- */
.group { margin-bottom: 26px; }
.group-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 4px 0 8px; cursor: pointer; user-select: none; position: sticky; left: 0; }
.group-head .chev { transition: transform .15s; display: inline-block; }
.group.collapsed .chev { transform: rotate(-90deg); }
.group.collapsed .tbl { display: none; }
.group-head small { font-weight: 400; color: var(--ink-3); }
.tbl { display: table; border-collapse: separate; border-spacing: 0; background: var(--panel); border-left: 6px solid var(--gc, #579bfc); border-radius: 6px 0 0 6px; }
.tr { display: table-row; }
.tc { display: table-cell; height: var(--row-h); border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); vertical-align: middle; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; position: relative; }
.th .tc { height: 34px; font-size: 12px; color: var(--ink-2); font-weight: 600; text-align: center; background: #fafbfc; position: sticky; top: -16px; z-index: 2; }
.tc.first { position: sticky; left: 0; background: var(--panel); z-index: 1; font-weight: 500; }
.th .tc.first { z-index: 3; text-align: left; background: #fafbfc; }
.tr:not(.th):hover .tc { background: #f7f9fc; }
.tr:not(.th):hover .tc.status-cell { background: var(--sc); }
.tc.first .open { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: 0; border: 1px solid var(--line); background: #fff; border-radius: 5px; font-size: 12px; padding: 2px 7px; color: var(--ink-2); }
.tr:hover .tc.first .open { opacity: 1; }
.tc.editable { cursor: pointer; }
.tc.editable:hover { outline: 1px solid #c7d3e6; outline-offset: -1px; }
.status-cell { background: var(--sc); color: #fff; text-align: center; font-weight: 500; padding: 0 6px; }
.status-cell.empty { background: #c4c4c4; }
.tc.num { text-align: right; font-variant-numeric: tabular-nums; }
.tc.center { text-align: center; }
.add-row .tc { color: var(--ink-3); }
.add-row input { border: none; outline: none; width: 100%; background: transparent; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 500; }
.avatars { display: inline-flex; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; border: 2px solid #fff; margin-left: -6px; }
.avatar:first-child { margin-left: 0; }
.tl-bar { display: inline-block; padding: 2px 10px; border-radius: 11px; background: #579bfc; color: #fff; font-size: 12px; }
.files-chip { font-size: 12px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-3); }

/* ---------- popovers ---------- */
.pop { position: fixed; z-index: 50; background: #fff; border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 8px; min-width: 200px; max-height: 360px; overflow: auto; }
.pop .opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; width: 330px; }
.pop .opt { border: none; color: #fff; padding: 8px; border-radius: 5px; font-weight: 500; text-align: center; }
.pop .opt:hover { filter: brightness(1.08); }
.pop .opt.clear { background: #fff; color: var(--ink-2); border: 1px dashed var(--line); }
.pop .list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: none; padding: 7px 8px; border-radius: 6px; }
.pop .list button:hover { background: var(--line-2); }
.pop .list button.sel { background: #e8f1fd; }

/* ---------- drawer (item details) ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 25, 40, .28); z-index: 40; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(720px, 100%); background: var(--panel); z-index: 41; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer-head { padding: 16px 20px 0; border-bottom: 1px solid var(--line); }
.drawer-head .title { display: flex; gap: 10px; align-items: center; }
.drawer-head .title input { font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; flex: 1; min-width: 0; }
.drawer-head .title input:hover { border-color: var(--line); }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px 40px; }
.fields { display: grid; grid-template-columns: 170px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fields > div { padding: 0 12px; min-height: 40px; display: flex; align-items: center; border-bottom: 1px solid var(--line-2); }
.fields > .fl { background: #fafbfc; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.fields > .fv { cursor: pointer; padding: 0; }
.fields > .fv > * { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 0 12px; }
.fields > .fv .status-cell { justify-content: center; }
.fields > .fv.ro { cursor: default; }
.comment { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.comment .meta { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.activity { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.activity b { color: var(--ink); font-weight: 600; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.file-tile { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fafbfc; display: flex; flex-direction: column; text-decoration: none; color: inherit; position: relative; }
.file-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #e9ecf1; }
.file-tile .doc { aspect-ratio: 4/3; display: grid; place-items: center; font-size: 30px; }
.file-tile .fn { font-size: 11px; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-tile .del { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; line-height: 1; display: none; }
.file-tile:hover .del { display: block; }
.section-title { font-weight: 700; margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }

/* ---------- timeline view ---------- */
.tl { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.tl-grid { display: grid; min-width: 900px; }
.tl-grid > div { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); min-height: 34px; display: flex; align-items: center; padding: 0 8px; font-size: 13px; }
.tl-grid .h { flex-direction: column; line-height: 1.25; padding: 4px 2px; background: #fafbfc; font-weight: 600; color: var(--ink-2); justify-content: center; font-size: 12px; position: sticky; top: 0; z-index: 1; }
.tl-grid .h.now { color: var(--brand); background: #fff7e0; }
.tl-grid .name { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 500; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-grid .grp { background: #f3f5f9; font-weight: 700; grid-column: 1 / -1; position: sticky; left: 0; }
.tl-grid .bar { height: 22px; border-radius: 11px; color: #fff; font-size: 11px; padding: 0 8px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; cursor: pointer; margin: 0 2px; }

/* ---------- admin ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 18px; max-width: 980px; }
.card h2 { margin: 0 0 12px; font-size: 17px; }
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
table.simple th { color: var(--ink-2); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--danger); }
.modal-bg { position: fixed; inset: 0; background: rgba(15,25,40,.35); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 440px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- phone app ---------- */
.m-app { display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.m-top { background: var(--brand); color: #fff; padding: calc(env(safe-area-inset-top) + 12px) 16px 14px; display: flex; align-items: center; gap: 10px; }
.m-top .logo-mark { font-size: 11px; height: 26px; }
.m-top h1 { font-size: 18px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-top button { background: rgba(255,255,255,.14); border: none; color: #fff; border-radius: 8px; padding: 6px 10px; }
.m-body { flex: 1; overflow: auto; padding: 14px 14px 100px; -webkit-overflow-scrolling: touch; }
.m-nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.m-nav a { text-decoration: none; color: var(--ink-3); text-align: center; font-size: 11px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.m-nav a .ic { font-size: 21px; line-height: 1; }
.m-nav a.active { color: var(--brand); font-weight: 600; }
.m-seg { display: flex; background: #e6e9ef; border-radius: 9px; padding: 3px; margin-bottom: 12px; }
.m-seg button { flex: 1; border: none; background: none; padding: 7px; border-radius: 7px; font-weight: 500; color: var(--ink-2); }
.m-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.m-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(16,30,54,.06); border-left: 5px solid var(--gc, #579bfc); display: block; text-decoration: none; color: inherit; }
.m-card .t { font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.m-card .s { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.m-card .row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.m-h { font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .4px; margin: 18px 2px 8px; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.m-kv { background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.m-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.m-kv > div:last-child { border-bottom: none; }
.m-kv span:first-child { color: var(--ink-2); }
.m-kv span:last-child { text-align: right; font-weight: 500; }
.m-search { margin-bottom: 12px; }
.clock-card { background: #fff; border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 14px; }
.clock-card .timer { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 6px 0; }
.upload-progress { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 120px 1fr; }
}

/* updates bubble (like monday) */
.tc.first.has-cb { padding-right: 52px; }
.tc.first .cb { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: #e8f1fd; color: var(--brand-2); border-radius: 10px; font-size: 11px; font-weight: 600; padding: 2px 7px; cursor: pointer; }
.tc.first .cb:hover { background: #d3e5fb; }
.tc.first.has-cb .open { right: 56px; }
.tr:hover .tc.first.has-cb { padding-right: 104px; }

/* Meldingen (notifications) */
.nb { background: #e2445c; color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: auto; line-height: 16px; }
.m-bell { position: relative; color: #fff; text-decoration: none; font-size: 20px; padding: 2px 4px; }
.m-bell .nb { position: absolute; top: -4px; right: -6px; margin: 0; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.notif:hover { background: var(--line-2); }
.notif.unread { background: #eef5ff; }
.notif .nt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
.m-body .notif-list { background: #fff; border-radius: 12px; overflow: hidden; }
.m-body .notif { font-size: 14px; padding: 12px; }

/* Manurenregistratie */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 7px 12px; font-size: 14px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.wk-nav { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 10px; }
.wk-nav b { text-align: center; flex: 1; font-size: 14px; }
.wk-status { background: #fff; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.wk-status.ok { background: #d6f5e6; color: #037f4c; }
.wk-status.sig { background: #fff1d6; color: #8a5a00; }
.wk-day { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.wk-day.today { box-shadow: inset 3px 0 0 var(--brand-2); }
.wk-dh { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.wk-row { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; width: 100%; text-align: left; background: var(--line-2); border: none; border-radius: 8px; padding: 8px 10px; margin: 4px 0; font-size: 14px; color: var(--ink); }
.wk-row .p { font-weight: 600; }
.wk-row .h { font-weight: 700; }
.wk-row .x { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); }
.wk-row:disabled { opacity: 1; }
.wk-add { background: none; border: 1px dashed var(--line); color: var(--brand-2); border-radius: 8px; width: 100%; padding: 8px; margin-top: 4px; font-size: 14px; }
.sig-pad { position: relative; border: 2px dashed var(--line); border-radius: 10px; background: #fff; margin: 10px 0; touch-action: none; }
.sig-pad canvas { width: 100%; height: 180px; display: block; touch-action: none; }
.sig-pad span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-3, #9aa5b1); pointer-events: none; }
.sig-box { background: #fff; border-radius: 10px; padding: 8px; text-align: center; }
.sig-box img { max-width: 100%; max-height: 140px; }
.mu-table { width: 100%; max-width: 1000px; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.mu-table th, .mu-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 14px; }
.mu-table th { background: var(--line-2); font-size: 12px; color: var(--ink-2); }
.mu-table tbody tr { cursor: pointer; }
.mu-table tbody tr:hover { background: #f5f9ff; }

/* Weekstaat (paper form layout) */
.weekstaat { background: #fff; color: #111; padding: 22px; max-width: 1100px; border-radius: 6px; box-shadow: var(--shadow); font-size: 13px; }
.weekstaat table { border-collapse: collapse; }
.weekstaat td, .weekstaat th { border: 1px solid #222; padding: 5px 7px; }
.ws-top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.ws-head { flex: 1; }
.ws-head td { height: 26px; }
.ws-head .stamp { width: 30%; position: relative; vertical-align: bottom; }
.ws-head .stamp span { font-size: 12px; }
.stamp-in { border: 2px solid #1d4f91; color: #1d4f91; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-weight: 700; transform: rotate(-3deg); display: inline-block; }
.ws-logo { width: 190px; text-align: center; }
.ws-logo img { width: 70px; display: block; margin: 0 auto 6px; }
.ws-main { width: 100%; }
.ws-main th { text-align: left; font-weight: 500; vertical-align: bottom; }
.ws-main td { height: 24px; }
.ws-main td.dag { font-weight: 500; vertical-align: top; width: 95px; }
.ws-main td.dag small, .ws-main td small { color: #666; font-weight: 400; }
.ws-foot { margin-top: 22px; width: 50%; min-width: 420px; }
.ws-foot td { height: 26px; }
.ws-foot .sig { vertical-align: bottom; height: 70px; }
.ws-foot .sig img { max-height: 60px; display: block; }
@media print {
  body * { visibility: hidden; }
  .weekstaat, .weekstaat * { visibility: visible; }
  .weekstaat { position: absolute; left: 0; top: 0; width: 100%; max-width: none; box-shadow: none; padding: 0; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* View options: filter / sort / hide / group */
.tb-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; background: none; border-radius: 6px; padding: 6px 10px; color: var(--ink); font-size: 14px; white-space: nowrap; }
.tb-btn:hover { background: var(--line-2); }
.tb-btn.on { background: #dcebff; color: var(--brand-2); border-color: #b9d4fb; }
.tb-link { background: none; border: none; color: var(--brand-2); padding: 6px 8px; font-size: 13px; cursor: pointer; }
.tb-link:hover { text-decoration: underline; }
.vs-pop { padding: 6px; }
.vs-h { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; }
.vs-h b { font-size: 15px; }
.fcols { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.fcol { flex: 0 0 180px; }
.fcol-h { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcol-l { max-height: 300px; overflow-y: auto; display: grid; gap: 4px; padding-right: 4px; }
.fval { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.fval:hover { background: var(--line-2); }
.fval.on { background: #dcebff; border-color: var(--brand-2); }
.fval i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fval span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fval small { color: var(--ink-3); }
.srow { display: flex; gap: 6px; margin-bottom: 8px; }
.hrow { display: flex; gap: 8px; align-items: center; padding: 5px 4px; font-size: 14px; cursor: pointer; }
.hlist { max-height: 360px; overflow-y: auto; }
.weekstaat a.gps { text-decoration: none; font-size: 11px; }
@media print { .weekstaat a.gps { display: none; } }
.valid-badge { font-size: 12px; font-weight: 600; margin-left: 10px; cursor: pointer; border-bottom: 1px dashed currentColor; }

/* Column header: menu and resize handle */
.th-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-menu { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: #fff; border-radius: 4px; padding: 0 5px; font-size: 14px; line-height: 20px; color: var(--ink-2); opacity: 0; cursor: pointer; }
.tr.th .tc:hover .th-menu { opacity: 1; }
.th-menu:hover { background: var(--line); }
.rz { position: absolute; right: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 2; }
.rz:hover, body.resizing .rz { background: rgba(0, 115, 234, .35); }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
.pop .list hr { border: none; border-top: 1px solid var(--line-2); margin: 4px 0; }
.modal.wide-sheet { max-width: 760px !important; max-height: 88vh; overflow-y: auto; border-radius: 16px !important; }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.nf-grid .wide { grid-column: 1 / -1; }
.nf-acc { background: var(--line-2); border-radius: 10px; padding: 12px; margin: 6px 0 10px; }

/* Faces + contact card */
.avatar { position: relative; overflow: hidden; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.status-cell .vm-av { border: 2px solid rgba(255,255,255,.85); margin: 0 6px 0 -4px; vertical-align: middle; }
.ucard { position: fixed; z-index: 80; width: 330px; background: #1f2a3a; color: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); padding: 16px; font-size: 14px; }
.ucard .muted { color: #b8c4d4; }
.uc-top { display: flex; gap: 14px; align-items: center; }
.uc-av { border: none !important; margin: 0 !important; }
.uc-name { font-size: 18px; font-weight: 600; margin-bottom: 2px; }
.uc-time { margin: 4px 0 6px; }
.uc-role { display: inline-block; background: #2d4a8a; color: #fff; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
.uc-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
.uc-acts a, .uc-acts button { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); border: none; border-radius: 8px; padding: 8px 10px; text-align: left; font-size: 14px; cursor: pointer; }
.uc-acts a:hover, .uc-acts button:hover { background: rgba(255,255,255,.16); }
.roles-t { border-collapse: collapse; min-width: 900px; }
.roles-t th, .roles-t td { border-bottom: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
.roles-t th { min-width: 130px; }
.roles-t th .input { font-weight: 600; padding: 6px 8px; }
.roles-t th small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 4px; }
.roles-t td.c { text-align: center; vertical-align: middle; }
.roles-t td.c input { width: 18px; height: 18px; }

/* Vakantie overview */
.v-wrap { padding: 4px 4px 30px; max-width: 1500px; }
.v-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.v-kpi { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: baseline; gap: 10px; border-left: 4px solid #579bfc; }
.v-kpi b { font-size: 28px; line-height: 1; }
.v-kpi span { color: var(--ink-2); font-size: 14px; }
.v-kpi.warn { border-left-color: #fdab3d; }
.v-kpi.sick { border-left-color: #ff007f; }
.v-sec { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 22px; }
.v-sec h2 { margin: 0 0 14px; font-size: 18px; }
.v-sec h2 small { background: var(--line-2); color: var(--ink-2); border-radius: 10px; padding: 1px 8px; font-size: 13px; margin-left: 6px; vertical-align: middle; }
.v-req { display: grid; grid-template-columns: 240px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.v-req:first-of-type { border-top: none; }
.v-req-who { display: flex; gap: 12px; align-items: center; }
.v-req-who .muted { font-size: 12px; }
.v-req-what { display: grid; gap: 4px; font-size: 14px; }
.v-type { display: inline-block; justify-self: start; background: var(--tc); color: #fff; border-radius: 6px; padding: 2px 10px; font-size: 13px; font-weight: 600; text-shadow: 0 1px 1px rgba(0,0,0,.15); }
.v-warn { color: #b26b00; font-size: 13px; }
.v-req-act { display: flex; gap: 8px; align-items: center; }
.btn.ok { background: #00c875; border-color: #00c875; color: #fff; font-weight: 600; }
.btn.ok:hover { filter: brightness(1.05); }
.v-empty { color: var(--ink-2); padding: 18px; text-align: center; background: var(--line-2); border-radius: 10px; }
.v-cal-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.v-cal-h h2 { margin: 0 10px 0 0; }
.v-legend { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.v-legend span { display: inline-flex; align-items: center; gap: 5px; }
.v-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.v-legend i.pending-i, .v-bar.pending { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 5px, transparent 5px 10px); }
.v-legend i.pending-i { background-color: #a9bee8; }
.v-cal { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.v-row { display: grid; align-items: center; min-width: 1000px; border-top: 1px solid var(--line-2); position: relative; }
.v-row.v-head { border-top: none; background: #fafbfc; position: sticky; top: 0; z-index: 2; }
.v-name { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 14px; font-weight: 500; position: sticky; left: 0; background: #fff; z-index: 1; height: 100%; border-right: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-head .v-name { background: #fafbfc; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.v-day { grid-row: 1; text-align: center; font-size: 12px; font-weight: 600; padding: 4px 0; line-height: 1.2; color: var(--ink-2); }
.v-day small { display: block; font-weight: 400; font-size: 10px; text-transform: uppercase; }
.v-day.today { background: var(--brand-2); color: #fff; border-radius: 6px; }
.v-day.we, .v-cell.we { background: #f3f4f7; }
.v-cell { grid-row: 1; height: 42px; border-left: 1px solid #f4f5f8; }
.v-cell.today { background: rgba(0, 115, 234, .08); }
.v-bar { grid-row: 1; height: 26px; margin: 0 2px; border: none; border-radius: 13px; background-color: var(--tc); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; z-index: 1; padding: 0 8px; }
.v-bar:hover { filter: brightness(1.07); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
@media (max-width: 900px) { .v-req { grid-template-columns: 1fr; gap: 8px; } }

/* Dashboard */
.d-content { padding: 0 !important; background: linear-gradient(180deg, #eef3fb 0, #f4f6fa 240px); }
.d-wrap { padding: 22px 26px 40px; max-width: 1600px; }
.d-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.d-hero h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.d-hero p { margin: 4px 0 0; color: var(--ink-2); text-transform: capitalize; }
.d-sync { background: #fff; border-radius: 20px; padding: 6px 12px; font-size: 12px; color: var(--ink-2); box-shadow: var(--shadow); }
.d-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.d-f { width: auto; min-width: 150px; background: #fff; border-radius: 10px; }
.d-q { min-width: 240px; }
.d-seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.d-seg button { border: none; background: none; padding: 6px 12px; border-radius: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.d-seg button.on { background: var(--brand); color: #fff; }
.d-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; margin-bottom: 20px; }
.d-kpi { background: #fff; border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.05); text-decoration: none; color: inherit; transition: transform .12s; }
a.d-kpi:hover { transform: translateY(-2px); }
.d-kpi-i { width: 40px; height: 40px; border-radius: 12px; background: #eef3fb; display: grid; place-items: center; font-size: 20px; flex: none; }
.d-kpi b { display: block; font-size: 24px; line-height: 1.05; }
.d-kpi span { font-size: 13px; color: var(--ink-2); }
.d-kpi.warn .d-kpi-i { background: #fff3dc; }
.d-kpi.bad .d-kpi-i { background: #ffe3e8; }
.d-kpi.bad b { color: #d02b47; }
.d-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.d-col { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.05); display: flex; flex-direction: column; max-height: 560px; }
.d-col header { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2); }
.d-col h3 { margin: 0; font-size: 16px; }
.d-col header span { color: var(--ink-3); font-size: 13px; }
.d-col header b { margin-left: auto; background: var(--brand); color: #fff; border-radius: 12px; padding: 1px 9px; font-size: 13px; }
.d-list { overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; }
.d-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line-2); border-left: 4px solid var(--sc); border-radius: 10px; padding: 10px 12px; background: #fff; transition: box-shadow .12s, transform .12s; }
.d-card:hover { box-shadow: 0 4px 14px rgba(16,24,40,.1); transform: translateY(-1px); }
.d-card-top { display: flex; align-items: center; gap: 6px; }
.d-card-top b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-tag { background: #efe6fb; color: #7e3b8a; border-radius: 5px; padding: 0 6px; font-size: 11px; font-weight: 600; }
.d-cb { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.d-card-sub { font-size: 12px; color: var(--ink-2); margin: 2px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-card-bot { display: flex; align-items: center; gap: 8px; }
.d-st { border-radius: 5px; padding: 2px 8px; font-size: 11px; font-weight: 600; }
.d-st.empty { background: var(--line-2); color: var(--ink-3); }
.d-wk { font-size: 12px; color: var(--ink-2); margin-left: auto; }
.d-vm { font-size: 12px; color: var(--ink-2); }
.d-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 18px 8px; }
.d-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.d-panel { background: #fff; border-radius: 16px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.05); }
.d-panel h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.d-stackbar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin-bottom: 12px; background: var(--line-2); }
.d-statlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.d-statrow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer; text-align: left; }
.d-statrow.on { border-color: var(--brand-2); background: #eef5ff; }
.d-statrow i { width: 10px; height: 10px; border-radius: 3px; }
.d-statrow b { margin-left: auto; }
.d-leg { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.d-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.d-leg i.a, .d-bars .a { background: #0073ea; }
.d-leg i.b, .d-bars .b { background: #a9c9f5; }
.d-loads { display: grid; gap: 6px; max-height: 330px; overflow-y: auto; }
.d-load { display: grid; grid-template-columns: 26px 120px 1fr 52px; gap: 10px; align-items: center; border: none; background: none; padding: 3px 0; text-align: left; cursor: pointer; font-size: 13px; }
.d-load:hover .d-load-n { color: var(--brand-2); }
.d-load-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bars { display: grid; gap: 3px; }
.d-bars span { height: 7px; border-radius: 4px; min-width: 2px; }
.d-load-c { color: var(--ink-2); font-size: 12px; text-align: right; }
.d-feeds { display: grid; gap: 4px; max-height: 380px; overflow-y: auto; }
.d-feed { display: flex; gap: 10px; text-decoration: none; color: inherit; padding: 8px; border-radius: 10px; }
.d-feed:hover { background: var(--line-2); }
.d-feed p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-feed .muted { font-size: 12px; }
.d-sub { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 6px; }
.d-sub:first-of-type { margin-top: 0; }
.d-person { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; text-decoration: none; color: inherit; }
.d-person .muted { margin-left: auto; font-size: 12px; }
.d-person .v-type { margin-left: auto; }
@media (max-width: 1100px) { .d-cols, .d-grid2 { grid-template-columns: 1fr; } }
.m-body .d-wrap { padding: 0; }
.m-body .d-hero h1 { font-size: 22px; }
.m-body .d-f, .m-body .d-q { flex: 1 1 140px; min-width: 0; }
.m-body .d-kpis { grid-template-columns: 1fr 1fr; }
.m-body .d-col { max-height: none; }
.m-seg a { flex: 1; text-align: center; padding: 8px; border-radius: 8px; color: var(--ink-2); font-size: 14px; }

/* Schades overview */
.d-chip { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 13px; }
.s-bars { display: grid; gap: 6px; }
.s-bar { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; border: none; background: none; padding: 2px 0; text-align: left; }
button.s-bar { cursor: pointer; border-radius: 6px; }
button.s-bar:hover .s-bl, .s-bar.on .s-bl { color: var(--brand-2); font-weight: 600; }
.s-bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-bt { background: var(--line-2); border-radius: 6px; height: 12px; overflow: hidden; }
.s-bt span { display: block; height: 100%; border-radius: 6px; min-width: 3px; }
.s-bar b { text-align: right; }
.s-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 200px; align-items: end; }
.s-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 12px; }
.s-col b { font-size: 12px; }
.s-colbar { width: 70%; max-width: 34px; background: #0073ea; border-radius: 6px 6px 2px 2px; display: flex; align-items: flex-end; overflow: hidden; min-height: 2px; }
.s-colbar span { width: 100%; background: #df2f4a; }
.s-col small { color: var(--ink-2); }
.s-recent { display: grid; gap: 4px; }
.s-item { display: flex; gap: 10px; align-items: center; padding: 7px; border-radius: 10px; text-decoration: none; color: inherit; font-size: 13px; }
.s-item:hover { background: var(--line-2); }
.s-item .d-st { margin-left: auto; }
.s-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #fff3dc; display: grid; place-items: center; flex: none; }
.s-thumb img { width: 100%; height: 100%; object-fit: cover; }
.content .d-wrap { padding-top: 6px; }

/* Schade detail */
.hs-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.hs-btns button { border: 2px solid var(--oc); background: #fff; color: var(--ink); border-radius: 8px; padding: 9px 4px; font-weight: 600; font-size: 14px; }
.hs-btns button.on { background: var(--oc); color: #fff; }
.loc-box { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; }
.loc-box iframe { width: 100%; height: 220px; border: 0; display: block; }
.loc-info { display: grid; gap: 3px; padding: 10px 12px; font-size: 13px; }
.drawer .loc-box iframe { height: 260px; }
.m-h .btn { text-transform: none; letter-spacing: 0; font-weight: 500; }
