/* Salespirit Sales — zwart-wit, in de stijl van AIRGROW */
:root {
  --bg: #efefef;
  --card: #ffffff;
  --fg: #0a0a0a;
  --dim: #6f6f73;
  --line: #dedede;
  --soft: #f6f6f6;
  --inv: #0a0a0a;
  --invfg: #ffffff;
  --f: "Bricolage Grotesque", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 22px;
  --r-sm: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #141414; --fg: #fff; --dim: #8d8d90; --line: #262626; --soft: #1c1c1c; --inv: #fff; --invfg: #000; color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--f); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.ti { font-size: 18px; line-height: 1; vertical-align: -3px; }

/* ---------- Basis ---------- */
.glass, .card { background: var(--card); border-radius: var(--r); }
.card { padding: 22px; }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.error-msg { background: var(--inv); color: var(--invfg); padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; padding: 9px 16px;
  border-radius: 99px; border: 1.5px solid var(--fg);
  background: var(--fg); color: var(--bg);
  text-decoration: none; white-space: nowrap;
  transition: transform .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.ghost { background: var(--card); color: var(--fg); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.danger { background: transparent; color: var(--fg); border-style: dashed; }
.btn.wide { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=tel], input[type=url], select, textarea {
  width: 100%; background: var(--soft); border: 1.5px solid transparent;
  border-radius: 14px; padding: 11px 13px; font-weight: 500; color: var(--fg);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fg); background: var(--card); }
input::placeholder, textarea::placeholder { color: var(--dim); }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); }

/* ---------- Avatar ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--fg); color: var(--bg);
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800; object-fit: cover;
}
.avatar.xs { width: 24px; height: 24px; font-size: 10px; }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; }
.avatar.lg { width: 76px; height: 76px; font-size: 24px; }
.person { display: flex; align-items: center; gap: 12px; }
.photo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 4px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); padding: 32px; border-radius: 28px; }
.auth-card h1 { font-size: 36px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 22px 0 8px; }
.auth-card > p { margin: 0 0 24px; }
.auth-card form { display: grid; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; flex: none;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; letter-spacing: -.04em; text-decoration: none;
}

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 14px; padding: 14px; min-height: 100vh; }
.rail {
  position: sticky; top: 14px; height: calc(100vh - 28px);
  background: var(--card); border-radius: var(--r);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 18px;
}
.rail .brand-mark { margin-left: 6px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 14px;
  text-decoration: none; font-weight: 600; color: var(--dim);
}
.nav a:hover { background: var(--soft); color: var(--fg); }
.nav a.active { background: var(--fg); color: var(--bg); }
.nav-label { flex: 1; }
.count { font-size: 11px; font-weight: 800; min-width: 22px; text-align: center; padding: 2px 7px; border-radius: 99px; background: var(--fg); color: var(--bg); }
.nav a.active .count { background: var(--bg); color: var(--fg); }
.rail-btn {
  margin-top: auto; display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 14px; border: 0; background: none;
  color: var(--dim); font-weight: 600; text-align: left;
}
.rail-btn::after { content: "Uitloggen"; }
.rail-btn:hover { background: var(--soft); color: var(--fg); }

.main-wrap { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border-radius: 99px; padding: 8px 8px 8px 22px;
  position: sticky; top: 14px; z-index: 20;
}
.crumb { display: flex; gap: 8px; font-weight: 700; font-size: 14px; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.viewas { display: flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 99px; padding: 0 4px 0 12px; }
.viewas select { background: transparent; border: 0; padding: 8px 8px; font-weight: 700; font-size: 13px; width: auto; }
.me { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 14px 4px 4px; border-radius: 99px; background: var(--soft); }
.me:hover { background: var(--line); }
.me-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; }
.me-text b { font-weight: 700; }
.me-text .muted { font-size: 11.5px; }

.main { padding: 14px 10px 60px; min-width: 0; }
.viewing-as { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 18px; margin-bottom: 18px; background: var(--inv); color: var(--invfg); border-radius: 18px; font-size: 14px; }
.viewing-as .btn { background: var(--invfg); color: var(--inv); border-color: var(--invfg); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(36px, 4.6vw, 60px); line-height: .95; letter-spacing: -.05em; margin: 0; font-weight: 800; }
.page-head p { margin: 10px 0 0; color: var(--dim); font-size: 16px; max-width: 60ch; }
.page-head .date { margin: 0 0 8px; font-weight: 700; color: var(--fg); font-size: 14px; }
.page-head .date::first-letter { text-transform: uppercase; }

.section-title { font-size: 20px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 2px; }
.section-sub { margin: 0 0 16px; color: var(--dim); font-size: 13.5px; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 13px; font-weight: 700; color: var(--dim); }
.stat-n { font-size: 44px; font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat.glow { background: var(--inv); color: var(--invfg); }
.stat.glow .stat-label { color: inherit; opacity: .6; }

.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 14px; }

.follow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.follow-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: var(--soft); border-radius: var(--r-sm); padding: 14px 16px; cursor: pointer;
  transition: background .12s, color .12s;
}
.follow-list li:hover { background: var(--fg); color: var(--bg); }
.follow-list li:hover .muted { color: inherit; opacity: .65; }
.follow-list li:hover .btn.ghost { background: transparent; color: var(--bg); border-color: var(--bg); }
.follow-name { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.follow-reason { font-size: 13.5px; margin-top: 2px; }

.empty { text-align: center; color: var(--dim); padding: 30px 14px; background: var(--soft); border-radius: var(--r-sm); font-weight: 600; }
.empty .btn { margin-top: 12px; }

.pipeline { display: flex; flex-direction: column; gap: 10px; }
.pipe-row { display: grid; grid-template-columns: 112px 1fr 30px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; }
.pipe-bar { height: 12px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.pipe-bar span { display: block; height: 100%; background: var(--fg); border-radius: 99px; }
.pipe-row .n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Tabellen ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input[type=search] { max-width: 320px; background: var(--card); border-radius: 99px; padding-left: 18px; }
.toolbar select { width: auto; background: var(--card); border-radius: 99px; font-weight: 700; }
.table-wrap { overflow-x: auto; padding: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 700; padding: 12px 12px; white-space: nowrap; font-size: 12.5px; color: var(--dim); }
td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--soft); }
tbody tr.clickable:hover td:first-child { border-radius: 14px 0 0 14px; }
tbody tr.clickable:hover td:last-child { border-radius: 0 14px 14px 0; }
td .strong { font-weight: 700; }
td select { width: auto; padding: 5px 10px; font-size: 12.5px; font-weight: 700; border-radius: 99px; background: var(--soft); }
td input[type=checkbox], th input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--fg); }
.status-pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--fg); color: var(--bg); white-space: nowrap; }
.status-pill.verloren { background: transparent; color: var(--dim); border: 1.5px solid var(--line); }
.late { font-weight: 800; background: var(--fg); color: var(--bg); padding: 1px 8px; border-radius: 99px; font-size: 12.5px; }

/* ---------- Taken ---------- */
.tabs { display: inline-flex; background: var(--card); border-radius: 99px; padding: 4px; gap: 2px; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; color: var(--dim); }
.tabs button.active { background: var(--fg); color: var(--bg); }
.task-group { margin-bottom: 26px; }
.task-group h3 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }
.task-group h3 .muted { font-size: 13px; }
#tList > .task, .task-group .task { background: var(--card); }
.task {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: var(--r-sm); margin-bottom: 8px; background: var(--soft);
}
.task input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--fg); margin-top: 2px; cursor: pointer; }
.task-title { font-weight: 700; }
.task.done .task-title { text-decoration: line-through; color: var(--dim); }
.task-meta { font-size: 12.5px; color: var(--dim); display: flex; gap: 4px 12px; flex-wrap: wrap; margin-top: 3px; font-weight: 600; }
.task-desc { font-size: 14px; margin-top: 6px; white-space: pre-wrap; color: var(--dim); }
.prio-hoog { background: var(--fg); color: var(--bg); padding: 0 8px; border-radius: 99px; }
.task-actions { display: flex; gap: 2px; }
.icon-btn { border: 0; background: none; padding: 6px 8px; min-width: 30px; border-radius: 99px; color: var(--dim); font-size: 12.5px; font-weight: 700; }
.icon-btn:hover { background: var(--line); color: var(--fg); }
.ai-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 10px 10px 18px; border-radius: 99px; margin-bottom: 22px; }
.ai-box > .ti { font-size: 20px; }
.ai-box input { flex: 1; min-width: 200px; background: transparent; }

/* ---------- Assistent ---------- */
.chat { display: grid; grid-template-rows: 1fr auto; height: calc(100vh - 290px); min-height: 420px; max-width: 900px; background: var(--card); border-radius: var(--r); padding: 18px; }
.chat-log { overflow-y: auto; padding: 4px 4px 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 86%; }
.msg.user { align-self: flex-end; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 22px 22px 6px 22px; font-weight: 500; }
.msg.assistant { align-self: flex-start; background: var(--soft); padding: 12px 16px; border-radius: 22px 22px 22px 6px; }
.msg.assistant p:first-child { margin-top: 0; }
.msg.assistant p:last-child { margin-bottom: 0; }
.chat-input { display: grid; gap: 10px; padding-top: 12px; }
.chat-input form { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { min-height: 50px; height: 50px; border-radius: 26px; padding: 13px 18px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--fg); background: var(--card); border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 700; }
.chip:hover { background: var(--fg); color: var(--bg); }
.thinking { opacity: .6; }

/* ---------- Markdown ---------- */
.md h1, .md h2, .md h3 { letter-spacing: -.03em; line-height: 1.15; margin: 1.2em 0 .4em; font-weight: 800; }
.md h1 { font-size: 30px; }
.md h2 { font-size: 22px; }
.md h3 { font-size: 17px; }
.md > :first-child { margin-top: 0; }
.md p, .md ul, .md ol { margin: .6em 0; }
.md ul, .md ol { padding-left: 1.3em; }
.md li { margin: .25em 0; }
.md code { background: var(--soft); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.md pre { background: var(--soft); padding: 14px; border-radius: 14px; overflow-x: auto; }
.md blockquote { border-left: 3px solid var(--fg); margin: .8em 0; padding-left: 12px; color: var(--dim); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md em { font-style: normal; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kennisbank ---------- */
.kb { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.kb-list { position: sticky; top: 90px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.kb-list input[type=search] { margin-bottom: 6px; }
.kb-cat { font-size: 12.5px; color: var(--dim); font-weight: 700; margin: 12px 0 4px 10px; }
.kb-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 12px; font-weight: 600; }
.kb-item:hover { background: var(--soft); }
.kb-item.active { background: var(--fg); color: var(--bg); }
.kb-doc { padding: 26px 30px; }
.kb-doc .md { font-size: 16px; line-height: 1.65; max-width: 72ch; }
.kb-meta { color: var(--dim); font-size: 13px; font-weight: 600; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.kb-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kb-editor textarea { min-height: 460px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.kb-preview { background: var(--soft); border-radius: 14px; padding: 18px; min-height: 460px; overflow: auto; }

/* ---------- Pop-up ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 20px; }
.panel { background: var(--card); border-radius: 26px; width: min(640px, 100%); max-height: 100%; overflow-y: auto; padding: 26px; animation: pop .16s ease-out; }
.panel.wide { width: min(980px, 100%); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.panel form, .panel .stack { display: grid; gap: 14px; }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.close { border: 0; background: var(--soft); border-radius: 50%; width: 36px; height: 36px; font-size: 20px; line-height: 1; flex: none; }
.close:hover { background: var(--fg); color: var(--bg); }
.activity { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 6px; font-size: 14px; }
.activity .when { font-size: 12px; color: var(--dim); font-weight: 600; }
.preview-table { max-height: 340px; overflow: auto; background: var(--soft); border-radius: 14px; padding: 4px; }
.preview-table table { font-size: 13px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 12px 20px; border-radius: 99px; z-index: 100; font-size: 14px; font-weight: 700; max-width: 90vw; }


/* ---------- Gedeeld: lijstjes in pop-ups ---------- */
input[type=time] { width: 100%; background: var(--soft); border: 1.5px solid transparent; border-radius: 14px; padding: 11px 13px; font-weight: 500; color: var(--fg); }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.panel-sec { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.panel-sec .section-title { margin: 0; }
.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--soft); border: 0; border-radius: 14px; padding: 10px 12px; text-align: left; width: 100%; font-size: 14px; }
button.mini-row:hover { background: var(--line); }
.mini-row.done .pt-title { text-decoration: line-through; color: var(--dim); }
.row-start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-start input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--fg); flex: none; }
.row-end { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.inline-form { display: grid !important; grid-template-columns: 1fr 150px 150px auto; gap: 8px; }
.stack .avatar, .stack { display: inline-flex; }
.stack .avatar { margin-left: -6px; border: 2px solid var(--card); }
.stack .avatar:first-child { margin-left: 0; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--soft); border: 1.5px solid transparent; border-radius: 99px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 600; cursor: pointer; }
.person-chip input { position: absolute; opacity: 0; pointer-events: none; }
.person-chip:has(input:checked) { border-color: var(--fg); background: var(--card); }
.person-chip:has(input:focus-visible) { outline: 2px solid var(--fg); outline-offset: 2px; }
.field > span { font-size: 13px; font-weight: 700; }
div.field { display: grid; gap: 6px; }

/* ---------- Dashboard: afspraken ---------- */
.ev-list { display: flex; flex-direction: column; gap: 6px; }
.ev-item { display: flex; gap: 12px; align-items: baseline; background: var(--soft); border: 0; border-radius: 14px; padding: 10px 12px; text-align: left; font-size: 14px; }
.ev-item:hover { background: var(--fg); color: var(--bg); }
.ev-item .ev-time { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Projecten: bord ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { background: var(--card); border-radius: var(--r); padding: 12px; min-height: 240px; transition: background .12s; }
.col.over { background: var(--line); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; font-size: 15px; }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.col-empty { border: 1.5px dashed var(--line); border-radius: var(--r-sm); padding: 18px 10px; text-align: center; color: var(--dim); font-size: 13px; font-weight: 600; }
.pcard { background: var(--soft); border-radius: var(--r-sm); padding: 12px 14px; cursor: grab; display: flex; flex-direction: column; gap: 4px; }
.pcard:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.pcard.dragging { opacity: .4; }
.pcard-title { font-weight: 800; letter-spacing: -.02em; font-size: 15.5px; line-height: 1.25; }
.pcard-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--dim); margin-top: 6px; }
.pcard-meta .ti { font-size: 14px; }

/* ---------- Agenda ---------- */
.week-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.week-label { margin-left: 8px; font-size: 16px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--card); border-radius: var(--r-sm); padding: 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); }
.day-head span { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: capitalize; }
.day-head b { font-size: 22px; font-weight: 800; letter-spacing: -.04em; }
.day.today .day-head b { background: var(--fg); color: var(--bg); border-radius: 99px; min-width: 34px; height: 34px; display: inline-grid; place-items: center; font-size: 17px; }
.day-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.day-add { border: 1.5px dashed var(--line); background: none; border-radius: 12px; padding: 6px; color: var(--dim); }
.day-add:hover { border-color: var(--fg); color: var(--fg); }
.ev { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.ev.mine { background: var(--fg); color: var(--bg); }
.ev.mine .avatar { border-color: var(--fg); }
.ev:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.ev.mine:hover { box-shadow: inset 0 0 0 1.5px var(--bg); }
.ev .ev-time { font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.ev-title { font-weight: 700; line-height: 1.25; }
.ev-sub { font-size: 12px; opacity: .7; }
.ev .stack { margin-top: 4px; }

/* ---------- Teamchat ---------- */
.tchat { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; height: calc(100vh - 250px); min-height: 460px; }
.tchat-side { padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tchat-sec { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--dim); padding: 8px 10px 4px; }
.tchat-sec + div { margin-bottom: 8px; }
.tchat-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.tchat-item:hover { background: var(--soft); }
.tchat-item.active { background: var(--fg); color: var(--bg); }
.tchat-item .count { flex: none; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hash { font-weight: 800; color: var(--dim); width: 24px; text-align: center; }
.tchat-item.active .hash { color: inherit; }
.hash.big { font-size: 22px; width: auto; }
.tchat-main { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; overflow: hidden; }
.tchat-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 16px; }
.tchat-head .icon-btn { margin-left: auto; }
.tchat-log { overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; }
.tmsg { display: flex; gap: 12px; margin-top: 14px; }
.tmsg.cont { margin-top: 2px; padding-left: 50px; }
.tmsg-meta { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.tmsg-body { font-size: 14.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.tmsg-body a { text-decoration: underline; }
.tchat-input { display: flex; gap: 8px; align-items: flex-end; padding: 12px; border-top: 1px solid var(--line); }
.tchat-input textarea { min-height: 46px; height: 46px; max-height: 160px; border-radius: 23px; padding: 12px 18px; resize: none; }
.tchat-input .btn { height: 46px; width: 46px; justify-content: center; padding: 0; flex: none; }

@media (max-width: 1100px) {
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .day { min-height: 0; }
}
@media (max-width: 820px) {
  .board { grid-template-columns: repeat(4, 78vw); }
  .week { grid-template-columns: 1fr; }
  .tchat { grid-template-columns: 1fr; height: auto; }
  .tchat-side { max-height: 220px; }
  .tchat-main { height: 70vh; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :first-child { grid-column: 1 / -1; }
}


/* ---------- Schakelaar ---------- */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 38px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--fg); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); background: var(--bg); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--fg); outline-offset: 2px; }

/* ---------- Johny ---------- */
.msg-by { font-size: 11.5px; font-weight: 800; letter-spacing: .02em; margin-bottom: 4px; opacity: .6; }
.ai-label { font-weight: 600; font-size: 14px; flex: 1; min-width: 200px; }
.ai-sep { width: 1px; height: 26px; background: var(--line); }

/* ---------- Social links bij leads ---------- */
.socs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.soc { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--fg); color: var(--bg); font-size: 10.5px; font-weight: 800; text-decoration: none; letter-spacing: .02em; }
.soc:hover { opacity: .75; }
.soc-box { background: var(--soft); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 10px; }
.dm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dm-row select { width: auto; background: var(--card); }
#dmOut { display: grid; gap: 8px; }
#dmOut textarea { background: var(--card); }

/* ---------- Rollen ---------- */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.role-card { padding: 18px; }
.role-mods, .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--soft); }
.pcard .tag { background: var(--card); }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; background: var(--soft); border-radius: 14px; padding: 14px; }

/* ---------- Social planner ---------- */
.board-5 { grid-template-columns: repeat(5, minmax(210px, 1fr)); }
.pcard-media { position: relative; border-radius: 12px; overflow: hidden; background: var(--fg); aspect-ratio: 16 / 10; margin-bottom: 6px; }
.pcard-media video, .pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-count { position: absolute; right: 6px; bottom: 6px; background: var(--fg); color: var(--bg); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.media-item { background: var(--soft); border-radius: var(--r-sm); padding: 8px; display: grid; gap: 6px; min-width: 0; }
.media-item video, .media-item img { width: 100%; max-height: 300px; border-radius: 10px; background: #000; object-fit: contain; }
.media-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
a.icon-btn { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.upload-btn { cursor: pointer; }
.up-row { display: grid; grid-template-columns: 1fr auto 140px; gap: 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.up-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--fg); transition: width .2s; }
.up-fail .up-bar span { background: transparent; border: 1px dashed var(--fg); }
.panel.drop { box-shadow: inset 0 0 0 3px var(--fg); }
.gen-box { background: var(--soft); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 12px; }
.gen-box select, .gen-box textarea { background: var(--card); }
.gen-box .mini-row { background: var(--card); }
.wrap { white-space: normal; overflow: visible; }
.inline-note { display: flex !important; gap: 8px; }
.inline-note input { flex: 1; }

/* ---------- Financiën ---------- */
.stat-n.money { font-size: 34px; }
.connect { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.legend { display: inline-flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--fg); display: inline-block; }
.dot.light { background: var(--dim); opacity: .45; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 220px; align-items: end; margin-top: 14px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-stack { flex: 1; width: 100%; max-width: 44px; display: flex; flex-direction: column-reverse; background: var(--soft); border-radius: 10px; overflow: hidden; }
.b-s { background: var(--fg); display: block; }
.b-f { background: var(--dim); opacity: .45; display: block; }
.bar-label { font-size: 12px; font-weight: 700; color: var(--dim); }
.inv-head, .inv-line { display: grid; grid-template-columns: 1fr 80px 110px 110px 34px; gap: 8px; align-items: center; }
.inv-head { font-size: 12px; font-weight: 700; color: var(--dim); padding: 0 4px; }
.inv-line { margin-bottom: 6px; }
.inv-line .lTot { text-align: right; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
#lines { display: grid; }
.inv-totals { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; }
.tot-lines { justify-self: end; width: min(320px, 100%); display: grid; gap: 6px; font-size: 14px; }
.tot-lines div { display: flex; justify-content: space-between; }
.tot-lines .grand { border-top: 1.5px solid var(--fg); padding-top: 8px; font-size: 18px; }

@media (max-width: 820px) {
  .board-5 { grid-template-columns: repeat(5, 78vw); }
  .inv-head { display: none; }
  .inv-line { grid-template-columns: 1fr 1fr; background: var(--soft); padding: 8px; border-radius: 12px; }
  .inv-line .lDesc { grid-column: 1 / -1; }
  .inv-totals { grid-template-columns: 1fr; }
  .up-row { grid-template-columns: 1fr auto; }
  .up-row .up-bar { grid-column: 1 / -1; }
  .ai-sep { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash, .kb { grid-template-columns: 1fr; }
  .kb-list { position: static; }
  .kb-editor { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px; gap: 8px; overflow-x: auto; }
  .rail .brand-mark { margin: 0; width: 38px; height: 38px; }
  .nav { flex-direction: row; }
  .nav a { white-space: nowrap; padding: 9px 12px; }
  .rail-btn { margin: 0 0 0 auto; }
  .rail-btn::after { content: none; }
  .topbar { position: static; padding-left: 16px; }
  .me-text { display: none; }
  .me { padding: 4px; }
  .main { padding: 8px 4px 50px; }
  .grid-2 { grid-template-columns: 1fr; }
  .chat { height: calc(100vh - 320px); }
}
@media (max-width: 520px) {
  .nav-label { display: none; }
  .stat-n { font-size: 34px; }
  .crumb { display: none; }
  .ai-box { border-radius: var(--r); }
}
@media (prefers-reduced-motion: reduce) {
  .panel { animation: none; }
  .btn { transition: none; }
}
