:root {
  --green: #5AC800;
  --green-dark: #3F8F00;
  --green-soft: #EEF9E3;
  --black: #0B0B0B;
  --anthracite: #2E2E2E;
  --grey: #E8E8E8;
  --grey-2: #F4F4F4;
  --line: #DCDCDC;
  --muted: #6B6B6B;
  --bg: #F4F4F4;
  --card: #FFFFFF;
  --red: #D93025;
  --orange: #E8890C;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* thema-afhankelijke tokens (licht) */
  --text: #0B0B0B;
  --text-2: #2E2E2E;
  --surface: #FFFFFF;
  --surface-2: #EAEAEA;
  --hover-border: #2E2E2E;
  --danger-soft: #FDECEA; --danger-text: #8A1C14;
  --warn-soft: #FFF4E0;   --warn-text: #9A5B00;
  --ok-soft: #EEF9E3;     --ok-text: #2D5F00;
  --link: #3F8F00;
  --on-bg: #2E2E2E; --on-fg: #FFFFFF;
  color-scheme: light;

  --fc-border-color: var(--grey);
  --fc-today-bg-color: rgba(90,200,0,.08);
  --fc-now-indicator-color: var(--green);
  --fc-button-bg-color: var(--anthracite);
  --fc-button-border-color: var(--anthracite);
  --fc-button-hover-bg-color: var(--black);
  --fc-button-hover-border-color: var(--black);
  --fc-button-active-bg-color: var(--link);
  --fc-button-active-border-color: var(--link);
  --fc-event-border-color: transparent;
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: rgba(128,128,128,.12);
  --fc-neutral-text-color: var(--muted);
  --fc-list-event-hover-bg-color: var(--grey-2);
}

/* Donker thema: automatisch volgens het toestel (tenzij 'licht' gekozen), of expliciet gekozen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #121212;
  --card: #1C1C1C;
  --surface: #1C1C1C;
  --surface-2: #171717;
  --grey: #2C2C2C;
  --grey-2: #242424;
  --line: #3A3A3A;
  --muted: #9B9B9B;
  --text: #ECECEC;
  --text-2: #CFCFCF;
  --hover-border: #8A8A8A;
  --green-soft: #1E2E12;
  --danger-soft: #3B1F1D; --danger-text: #F4A39C;
  --warn-soft: #3A2E17;   --warn-text: #F0B45C;
  --ok-soft: #1E2E12;     --ok-text: #A6E36B;
  --link: #7BDA2B;
  --on-bg: #E8E8E8; --on-fg: #0B0B0B;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.35);
  --fc-today-bg-color: rgba(90,200,0,.12);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --card: #1C1C1C;
  --surface: #1C1C1C;
  --surface-2: #171717;
  --grey: #2C2C2C;
  --grey-2: #242424;
  --line: #3A3A3A;
  --muted: #9B9B9B;
  --text: #ECECEC;
  --text-2: #CFCFCF;
  --hover-border: #8A8A8A;
  --green-soft: #1E2E12;
  --danger-soft: #3B1F1D; --danger-text: #F4A39C;
  --warn-soft: #3A2E17;   --warn-text: #F0B45C;
  --ok-soft: #1E2E12;     --ok-text: #A6E36B;
  --link: #7BDA2B;
  --on-bg: #E8E8E8; --on-fg: #0B0B0B;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.35);
  --fc-today-bg-color: rgba(90,200,0,.12);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); }
small { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 60px; background: var(--black); color: #fff; border-bottom: 3px solid var(--green); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; flex-shrink: 0; }
.brand .logo { height: 36px; width: auto; color: #fff; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; color: #cfcfcf; white-space: nowrap; }
.tabs a:hover { color: #fff; background: rgba(255,255,255,.07); }
.tabs a.active { color: var(--black); background: var(--green); }
.usermenu { display: flex; align-items: center; gap: 14px; flex-shrink: 0; font-size: 13px; }
.usermenu a { text-decoration: none; color: #cfcfcf; }
.usermenu a:hover { color: #fff; }
.usermenu small { color: var(--green); }
.theme-btn { background: none; border: 1px solid rgba(255,255,255,.2); color: #cfcfcf; border-radius: 99px; height: 28px; padding: 0 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.theme-btn:hover { color: #fff; border-color: rgba(255,255,255,.45); }
.theme-btn svg { width: 14px; height: 14px; }
.timer-pill { background: var(--green); color: var(--black); font-weight: 700; padding: 4px 10px; border-radius: 99px; cursor: pointer; font-variant-numeric: tabular-nums; }

main { padding: 20px; max-width: 1800px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
.narrow { max-width: 1100px; margin: 0 auto; }

/* ---------- basis ---------- */
.panel, .card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 18px 20px; margin-bottom: 18px; }
.card > h3:first-child, .card-head h3 { display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.section-title::before, .card-head h3::before { content: ''; width: 22px; height: 3px; background: var(--green); display: inline-block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--hover-border); }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--black); }
.btn-primary:hover { background: #4fb300; border-color: #4fb300; }
.btn-dark { background: var(--anthracite); border-color: var(--anthracite); color: #fff; }
.btn-dark:hover { background: var(--black); }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 16px; padding: 4px 8px; color: var(--muted); border-radius: 6px; }
.icon-btn:hover { background: var(--grey-2); color: var(--text); }

input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(90,200,0,.35); border-color: var(--green); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--link); }
input[type=color] { padding: 2px; height: 36px; width: 56px; }
textarea { resize: vertical; min-height: 70px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 12px; color: var(--text-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 12px; }
.form-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 13px; }
.alert-error { background: var(--danger-soft); color: var(--danger-text); }
.alert-info { background: var(--ok-soft); color: var(--ok-text); }
.alert-warn { background: var(--warn-soft); color: var(--warn-text); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.copybox { display: flex; gap: 6px; }
.copybox input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
pre.code { background: var(--black); color: #e8e8e8; padding: 12px; border-radius: 8px; overflow: auto; font-size: 12px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--grey); color: var(--text-2); white-space: nowrap; }
.chip-toggle { cursor: pointer; border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; font-size: 12px; user-select: none; }
label.chip { flex-direction: row; font-weight: 600; color: var(--text-2); }
.chip-toggle.on {background: var(--on-bg); border-color: var(--on-bg); color: var(--on-fg); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--grey); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--grey); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--grey-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--grey); }
.table-wrap { overflow-x: auto; }
tr.done td { color: var(--muted); }
tr.done .what { text-decoration: line-through; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- modal & toasts ---------- */
dialog#modal { background: var(--card); color: var(--text); border: 0; border-radius: 14px; padding: 0; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog#modal::backdrop { background: rgba(11,11,11,.55); }
#modalForm { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
#modalForm > header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--grey); }
#modalForm > header h3 { margin: 0; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
#modalForm > footer { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--grey); flex-wrap: wrap; }
#modalForm > footer .left { margin-right: auto; }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: var(--black); color: #fff; padding: 10px 16px; border-radius: 8px; border-left: 4px solid var(--green); box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 380px; animation: toastin .2s ease; }
.toast.error { border-left-color: var(--red); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }

/* ---------- agenda ---------- */
.agenda-layout { display: grid; grid-template-columns: 270px 1fr; gap: 18px; align-items: start; }
.filters { padding: 16px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.filters h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; display: flex; justify-content: space-between; align-items: center; }
.filters h4:first-child { margin-top: 0; }
.filters h4 button { font-size: 11px; background: none; border: 0; color: var(--link); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 600; }
.filter-toggle { display: none; }
.src-list label.check { padding: 3px 0; }
.src-list .err { color: var(--red); font-size: 11px; margin-left: 18px; display: block; font-weight: 400; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-x { background: var(--anthracite); color: #fff; padding-right: 3px; }
.chip-x button { background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 5px; border-radius: 99px; }
.chip-x button:hover { background: rgba(255,255,255,.2); }
.ex-form { display: flex; gap: 6px; margin-top: 8px; }
.ex-form input { padding: 5px 8px; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; background: var(--surface); color: var(--text); border: 0; cursor: pointer; }
.seg button.on { background: var(--on-bg); color: var(--on-fg); }
.sync-status { font-size: 12px; color: var(--muted); margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-wrap { padding: 16px; min-width: 0; }
.fc { font-size: 13px; }
.fc .fc-toolbar-title { font-size: 20px; font-weight: 700; text-transform: capitalize; }
.fc .fc-button { font-weight: 600; font-size: 13px; text-transform: capitalize; box-shadow: none !important; }
.fc .fc-col-header-cell-cushion { text-transform: capitalize; font-weight: 600; color: var(--text-2); text-decoration: none; }
.fc .fc-daygrid-day-number { text-decoration: none; color: var(--text-2); }
.fc .fc-event { cursor: pointer; border-radius: 5px; }
.fc .fc-daygrid-event { padding: 1px 3px; }
.fc .ev-tentative { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 6px, transparent 6px 12px); }
.fc .ev-free { opacity: .55; }
.fc .ev-todo { border: 1.5px dashed rgba(0,0,0,.4) !important; }
.fc-list-event-dot { border-color: var(--green) !important; }
.ev-detail dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0 0 14px; }
.ev-detail dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.ev-detail dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.ev-detail .desc { white-space: pre-wrap; background: var(--grey-2); padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; font-size: 13px; }

/* ---------- kanban ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; background: var(--card); padding: 14px 16px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.toolbar .grp { display: flex; flex-direction: column; gap: 6px; }
.toolbar .grp > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.toolbar .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; padding: 6px 8px; font-size: 13px; }
.toolbar .spacer { flex: 1; }
.toolbar .tb-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: minmax(600px, 3fr) repeat(3, minmax(230px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; letter-spacing: .08em; font-size: 13px; padding: 4px 6px 10px; text-transform: uppercase; }
.col-head .count { background: var(--anthracite); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; letter-spacing: 0; }
.col-todo { background: var(--anthracite); color: #fff; }
.col-todo > .col-head .count { background: var(--green); color: var(--black); }
.subcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.subcol { background: rgba(255,255,255,.08); border-radius: 8px; padding: 8px; min-width: 0; }
.subcol-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 4px 8px; }
.subcol-head .lbl { display: flex; align-items: center; gap: 6px; }
.subcol-head .icon-btn { color: #fff; font-size: 18px; line-height: 1; padding: 0 6px; }
.subcol-head .icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.col-head .icon-btn { font-size: 18px; line-height: 1; padding: 0 6px; }
.list { min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); color: var(--text); border-radius: 8px; padding: 10px 11px; box-shadow: 0 1px 2px rgba(0,0,0,.12); cursor: pointer; border-left: 4px solid var(--grey); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.kcard:hover { box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.kcard .top { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.kcard .desc { font-weight: 600; font-size: 13px; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.kcard .date { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--grey-2); color: var(--text-2); }
.kcard .date.overdue { background: var(--danger-soft); color: var(--danger-text); }
.kcard .date.soon { background: var(--warn-soft); color: var(--warn-text); }
.kcard.done .desc { text-decoration: line-through; color: var(--muted); }
.kcard.sortable-ghost { opacity: .35; }
.kcard.sortable-chosen { box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cat-nieuwpoort { --cat: #1F7AE0; } .cat-bere { --cat: #5AC800; } .cat-prive { --cat: #8E44AD; } .cat-huis { --cat: #E8890C; }
.kcard[class*="cat-"] { border-left-color: var(--cat); }
.chip.cat { background: color-mix(in srgb, var(--cat) 18%, var(--surface)); color: color-mix(in srgb, var(--cat) 70%, var(--text)); }
.prio-dringend { --prio: #D93025; } .prio-snel { --prio: #E8890C; } .prio-niet_dringend { --prio: #8A8A8A; }
.chip.prio { background: color-mix(in srgb, var(--prio) 16%, var(--surface)); color: color-mix(in srgb, var(--prio) 75%, var(--text)); }
.subcol-head .dot { background: var(--prio); }
.col-archive { padding: 2px 8px; font-size: 11px; margin-right: 4px; letter-spacing: 0; text-transform: none; }
.arch-list { display: grid; gap: 8px; }
.arch-item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--grey); border-radius: 8px; padding: 10px 12px; }
.arch-item .top { display: flex; gap: 5px; margin-bottom: 4px; }
.arch-desc { font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.arch-notes { white-space: pre-wrap; margin-top: 2px; }
.arch-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.more-done { font-size: 12px; text-align: center; padding: 6px; }
.more-done button { background: none; border: 0; color: var(--link); font-weight: 600; cursor: pointer; }

/* ---------- start ---------- */
.home-hero { display: flex; justify-content: space-between; align-items: end; margin: 4px 0 18px; }
.home-hero h1 { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.home-hero h1::after { content: ''; display: block; width: 40px; height: 4px; background: var(--green); margin-top: 8px; border-radius: 2px; }
.home-hero p { margin: 8px 0 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.home-card { display: block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; color: inherit; border-top: 4px solid var(--green); transition: transform .12s ease, box-shadow .12s ease; }
.home-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.home-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.home-card-head h2 { margin: 0; font-size: 17px; flex: 1; }
.home-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--anthracite); color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.home-icon svg { width: 19px; height: 19px; }
.home-open { font-size: 12px; font-weight: 600; color: var(--link); opacity: 0; transition: opacity .12s; }
.home-card:hover .home-open { opacity: 1; }
.home-card h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.home-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.home-stats .stat .v { font-size: 22px; }
.home-stats .stat.warn .v { color: var(--warn-text); }
.home-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.home-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.home-list .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
.home-list .t.r { margin-left: auto; color: var(--text); font-weight: 600; }
.home-list .x { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ok-mark { color: var(--link); font-weight: 800; margin-left: auto; }
.home-timer { margin: 12px 0 0; font-size: 13px; }
.home-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.home-tile { width: 40px; height: 40px; border-radius: 9px; background: var(--tile); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; cursor: pointer; }
.home-tile img { width: 24px; height: 24px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px; }
.home-tile:hover { transform: scale(1.08); }

/* ---------- shows ---------- */
.show-stats { margin-bottom: 14px; }
.show-stats .card-head { margin-bottom: 6px; }
.ss-pick { flex-direction: row; align-items: center; gap: 8px; }
.ss-pick select { width: auto; padding: 5px 8px; }
.ss-table td, .ss-table th { padding: 7px 10px; }
.ss-table .dot { vertical-align: middle; }
.ss-bar { display: inline-block; width: 140px; height: 8px; background: var(--grey); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.ss-bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.shows-sum { margin: 0 0 6px; }
.month-head { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 22px 0 8px; display: flex; gap: 8px; align-items: center; }
.month-head span { background: var(--grey); color: var(--text-2); border-radius: 99px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
.show-row { display: grid; grid-template-columns: 64px 1fr 220px; gap: 16px; align-items: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 8px; border-left: 5px solid var(--show); cursor: pointer; }
.show-row:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.show-row.past { opacity: .6; }
.show-row.next { outline: 2px solid var(--green); }
.show-row.st-geannuleerd .sr-title strong { text-decoration: line-through; }
.sr-date { display: flex; flex-direction: column; align-items: center; line-height: 1.1; text-transform: uppercase; }
.sr-date .w { font-size: 11px; color: var(--muted); font-weight: 600; }
.sr-date .d { font-size: 26px; font-weight: 800; }
.sr-date .m { font-size: 11px; font-weight: 700; color: var(--text-2); }
.sr-title { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.show-chip { background: var(--show); color: #fff; }
.st-chip { background: var(--warn-soft); color: var(--warn-text); }
.st-geannuleerd .st-chip { background: var(--danger-soft); color: var(--danger-text); }
.next-chip { background: var(--green); color: var(--black); }
.sr-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.sr-techs { display: flex; gap: 4px; flex-wrap: wrap; }
.tech-chip { background: var(--anthracite); color: #fff; }
.warn-chip { background: var(--danger-soft); color: var(--danger-text); }
.sr-notes { margin-top: 8px; background: var(--grey-2); border-radius: 6px; padding: 6px 9px; font-size: 13px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sr-info { margin-top: 6px; }
.sr-contact { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.sr-contact .ok { color: var(--link); font-weight: 600; }
.sr-contact .todo { color: var(--warn-text); font-weight: 600; }
.sr-contactinfo { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.contact-row .contact-date { flex-direction: row; align-items: center; gap: 8px; }
.contact-row .contact-date input { width: auto; }
span.lbl { display: block; font-weight: 600; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }

/* ---------- dashboard (webshortcuts) ---------- */
.lk-cluster { margin-bottom: 26px; }
.lk-cluster-head { display: flex; align-items: center; gap: 10px; font-size: 18px; text-transform: uppercase; letter-spacing: .08em; margin: 6px 0 12px; }
.lk-cluster-head .dot { width: 14px; height: 14px; }
.lk-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
.lk-cat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px 14px; min-width: 0; }
.lk-cat-head { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; color: var(--text-2); }
.lk-cat-head small { color: var(--muted); font-weight: 600; letter-spacing: 0; }
.bar { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.lk-cat-head .bar { margin: 0; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.lk-tile { position: relative; aspect-ratio: 1; border-radius: 12px; background: var(--tile); color: var(--tile-fg); text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .12s ease, box-shadow .12s ease; overflow: hidden; }
.lk-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.lk-icon { width: 44px; height: 44px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; color: #2E2E2E; flex-shrink: 0; overflow: hidden; }
.lk-icon img { width: 32px; height: 32px; object-fit: contain; }
.lk-title { font-size: 12px; font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.lk-tile.editing { outline: 2px dashed rgba(0,0,0,.25); outline-offset: -4px; }
.lk-pen { position: absolute; top: 5px; right: 6px; font-size: 13px; background: rgba(255,255,255,.9); color: var(--black); border-radius: 99px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.lk-add { background: var(--grey-2); color: var(--muted); border: 2px dashed var(--line); box-shadow: none; }
.lk-add .lk-icon { background: transparent; font-size: 26px; color: var(--muted); }
.lk-manage { border: 1px solid var(--grey); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.lk-manage-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.lk-manage ul { list-style: none; margin: 8px 0 0; padding: 0; }
.lk-manage li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--grey); flex-wrap: wrap; }
.lk-shares { display: grid; gap: 10px; }
.lk-share { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border: 1px solid var(--grey); border-radius: 8px; padding: 10px 12px; }
.lk-share > div { flex: 1; min-width: 0; }
.share-page main { max-width: 1400px; }
.share-page .brand span { display: inline !important; letter-spacing: .08em; }

/* ---------- uren ---------- */
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.timer-card { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.timer-card .elapsed { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-running { background: var(--black); color: #fff; }
.timer-running .muted { color: #aaa; }
.timer-running label { color: #ddd; }
.summary-total { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 8px; }
.stat .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.badge-ok { color: var(--link); font-weight: 700; }
.client-block { border: 1px solid var(--grey); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.client-block.inactive { opacity: .6; }
.client-block .ch { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.client-block ul { list-style: none; margin: 8px 0 0; padding: 0; }
.client-block li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px dashed var(--grey); align-items: center; }
.perm-sum { display: flex; flex-wrap: wrap; gap: 4px; }
.perm-none { opacity: .45; text-decoration: line-through; }
.perm-write { background: var(--ok-soft); color: var(--ok-text); }
.perm-matrix th.c, .perm-matrix td.c { text-align: center; width: 90px; }
.perm-matrix td { vertical-align: middle; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- login ---------- */
.login-page { background: var(--black); min-height: 100vh; display: flex; }
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; width: 100%; min-height: 100vh; }
.login-brand { color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; gap: 18px; background: radial-gradient(circle at 20% 80%, rgba(90,200,0,.12), transparent 50%), var(--black); }
.logo-xl { width: 240px; height: auto; color: #fff; }
.brand-tag { letter-spacing: .3em; font-size: 13px; font-weight: 500; margin: 0; }
.brand-tag span { color: var(--green); }
.login-brand h1 { font-size: 46px; line-height: 1.02; font-weight: 800; margin: 20px 0 0; }
.login-brand h1 span { color: var(--green); }
.muted-light { color: #aaa; max-width: 420px; }
.login-form { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
.login-form .card { width: 100%; max-width: 380px; display: grid; gap: 14px; padding: 28px; }
.login-form h2::before { content: ''; display: block; width: 28px; height: 3px; background: var(--green); margin-bottom: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .time-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; overflow: visible; }
}
@media (max-width: 760px) {
  main { padding: 12px 10px; }
  .topbar { gap: 10px; padding: 0 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; }
  .brand span { display: none; }
  .tabs { order: 3; flex-basis: 100%; padding-bottom: 6px; }
  .usermenu { margin-left: auto; }
  .usermenu .user { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .subcols { grid-template-columns: 1fr; }
  .lk-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .lk-icon { width: 38px; height: 38px; }
  .show-row { grid-template-columns: 52px 1fr; gap: 10px; padding: 10px 12px; }
  .sr-contact { grid-column: 2; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { padding: 30px 20px 10px; }
  .login-brand h1 { font-size: 30px; }
  .logo-xl { width: 150px; }
  .form-grid .span-2 { grid-column: auto; }
  .fc .fc-toolbar { flex-direction: column; gap: 8px; }
  .fc .fc-toolbar-title { font-size: 17px; }
  .cal-wrap, .card { padding: 12px; }
  .ev-detail dl { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .filter-toggle { display: flex; }
  .filters { padding: 10px; }
  .filters:not(.open) .filter-body { display: none; }
  .filters.open .filter-body { margin-top: 12px; }
}
