:root { --brand: #1B7EF2; --ink: var(--fg); --on-ink: var(--bg); --ink-line: var(--ink); }
/* 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(--ink-line);
  background: var(--ink); color: var(--on-ink);
  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(--ink); color: var(--on-ink);
  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; flex: none;
  display: grid; place-items: center; text-decoration: none;
}
.brand-mark picture, .brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-card .brand-mark { width: 56px; height: 56px; }

/* ---------- 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;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.rail .nav { flex: 0 0 auto; }
.rail .rail-btn { flex: none; }
.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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); }
.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: "Log out"; }
.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(--ink); color: var(--on-ink); }
.follow-list li:hover .muted { color: inherit; opacity: .65; }
.follow-list li:hover .btn.ghost { background: transparent; color: var(--on-ink); border-color: var(--on-ink); }
.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(--ink); 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(--ink); color: var(--on-ink); white-space: nowrap; }
.status-pill.verloren { background: transparent; color: var(--dim); border: 1.5px solid var(--line); }
.late { font-weight: 800; background: var(--ink); color: var(--on-ink); 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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); 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(--ink); color: var(--on-ink); 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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); 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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); 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(--ink); color: var(--on-ink); }
.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(--ink); color: var(--on-ink); }
.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(--ink); }
.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(--ink); color: var(--on-ink); 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(--ink); 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(--ink); color: var(--on-ink); 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(--ink); 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(--ink); 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(--ink); 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; }
}

/* ---------- Betaallinks ---------- */
.pay-box { background: var(--soft); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 10px; }
.pay-url { background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; display: flex; min-width: 0; }
.pay-url .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-pill.open-pill { background: transparent; color: var(--fg); border: 1.5px solid var(--fg); }

/* ---------- Bestanden ---------- */
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; }
.att { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 99px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600; }
.att button { border: 0; background: var(--line); border-radius: 50%; width: 20px; height: 20px; font-size: 11px; line-height: 1; }
.att-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ink); }
.attach-btn { padding: 0; width: 50px; height: 50px; justify-content: center; font-size: 18px; border-radius: 50%; cursor: pointer; flex: none; }
.dropzone { display: grid; place-items: center; gap: 4px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-sm); padding: 28px 16px; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--fg); background: var(--soft); }
.prop-list { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; }
.prop { display: grid; grid-template-columns: 22px 1fr 150px 110px; gap: 8px; align-items: center; }
.prop input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--fg); }
#ftAct { align-items: center; }

/* ---------- Content-overzicht ---------- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.content-item { background: var(--card); border: 0; border-radius: var(--r-sm); padding: 8px; text-align: left; display: grid; gap: 6px; min-width: 0; }
.content-item:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.content-thumb { position: relative; aspect-ratio: 9 / 12; border-radius: 12px; overflow: hidden; background: #000; }
.content-thumb video, .content-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 34px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.content-meta { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 4px; }
.content-meta .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content-sub { padding: 0 4px 4px; }
.viewer { background: #000; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; }
.viewer video, .viewer img { max-width: 100%; max-height: 70vh; display: block; }
#sUploads { display: grid; gap: 0; margin-bottom: 8px; }

@media (max-width: 820px) {
  .prop { grid-template-columns: 22px 1fr; }
  .prop .pDate, .prop .pPrio { grid-column: 2; }
}

/* ---------- Social-taken en bulk ---------- */
.dm-text { background: var(--card); border: 1.5px dashed var(--line); border-radius: 12px; padding: 10px 12px; color: var(--fg); }
.dm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.task-meta .soc { color: var(--on-ink); }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 18px; margin-bottom: 12px; position: sticky; top: 80px; z-index: 10; box-shadow: 0 0 0 1.5px var(--fg); }
.bulk-bar select, .bulk-bar input { width: auto; padding: 7px 10px; font-size: 13px; }

/* ---------- Teksten uit de lijst ---------- */
.soc.txt { background: var(--card); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.extra-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.extra-line b { font-weight: 700; }
.csv-box { gap: 12px; }
.csv-text { display: grid; gap: 6px; justify-items: start; }
.csv-text .dm-text { width: 100%; white-space: pre-wrap; font-size: 14px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.kv > div { background: var(--card); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; font-size: 14px; }


/* ---------- Knowledge base (Notion-style) ---------- */
.notion { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.nt-side { position: sticky; top: 90px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 110px); overflow: auto; }
.nt-new { display: flex; gap: 6px; flex-wrap: wrap; }
.nt-tree { display: flex; flex-direction: column; gap: 1px; }
.nt-item { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; min-width: 0; }
.nt-item:hover { background: var(--soft); }
.nt-item.active { background: var(--ink); color: var(--on-ink); }
.nt-tog { border: 0; background: none; width: 18px; color: inherit; opacity: .55; font-size: 11px; padding: 0; flex: none; }
.nt-ic { flex: none; width: 20px; text-align: center; }
.nt-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-add { border: 0; background: none; color: inherit; opacity: 0; font-size: 16px; padding: 0 4px; border-radius: 6px; }
.nt-item:hover .nt-add { opacity: .6; }
.nt-add:hover { opacity: 1 !important; background: var(--line); }
.nt-hit { display: flex; gap: 8px; text-align: left; border: 0; background: none; padding: 8px; border-radius: 10px; width: 100%; font-size: 14px; }
.nt-hit:hover { background: var(--soft); }
.nt-snip { display: block; margin-top: 2px; }
.nt-main { padding: 28px 40px 48px; min-height: 60vh; position: relative; }
.nt-crumbs { font-size: 13px; color: var(--dim); font-weight: 600; margin-bottom: 18px; }
.nt-crumbs a { text-decoration: none; }
.nt-crumbs a:hover { text-decoration: underline; }
.nt-head { margin-bottom: 18px; position: relative; }
.nt-icon { font-size: 54px; line-height: 1; border: 0; background: none; padding: 4px; border-radius: 14px; }
.nt-icon:not([disabled]):hover { background: var(--soft); }
.nt-title { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; margin: 8px 0 6px; outline: none; }
.nt-title:empty::before { content: "Untitled"; color: var(--dim); }
.nt-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nt-actions { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.nt-actions select { width: auto; max-width: 190px; padding: 5px 10px; font-size: 12.5px; border-radius: 99px; }
.nt-db select.cell { min-width: 150px; }
.emoji-pop { position: absolute; z-index: 30; top: 70px; left: 0; display: grid; grid-template-columns: repeat(10, 34px); gap: 2px; padding: 8px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.15); }
.emoji-pop button { border: 0; background: none; font-size: 20px; border-radius: 8px; height: 34px; }
.emoji-pop button:hover { background: var(--soft); }
.nt-body { font-size: 16px; line-height: 1.7; min-height: 120px; border-radius: 12px; padding: 6px 8px; margin: 0 -8px; cursor: text; }
.nt-body:hover { background: var(--soft); }
.nt-edit { width: 100%; min-height: 240px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; background: var(--soft); border-radius: 12px; resize: none; }
.nt-hint { margin-top: 6px; }
.nt-children { margin-top: 26px; display: grid; gap: 4px; }
.nt-child { text-align: left; border: 0; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.nt-child:hover { background: var(--line); }
.nt-addrow { display: flex; gap: 8px; margin-top: 16px; }
.nt-db { padding: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; }
.nt-db th { padding: 0; }
.th-btn { border: 0; background: none; padding: 10px 12px; width: 100%; text-align: left; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--dim); white-space: nowrap; }
.th-btn:hover { background: var(--soft); color: var(--fg); }
.ty { display: inline-block; min-width: 18px; opacity: .7; }
.nt-db td { padding: 4px 6px; border-top: 1px solid var(--line); }
.nt-db .cell { border: 1.5px solid transparent; background: transparent; border-radius: 8px; padding: 7px 8px; width: 100%; min-width: 110px; font-size: 14px; }
.nt-db .cell:hover { background: var(--soft); }
.nt-db .cell:focus { background: var(--card); border-color: var(--fg); }
.nt-db input[type=checkbox].cell { width: 18px; height: 18px; min-width: 0; accent-color: var(--fg); }
.first-cell { display: flex; align-items: center; gap: 4px; }
.first-cell .cell { font-weight: 700; min-width: 160px; }
.open-row { border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; opacity: 0; white-space: nowrap; }
tr:hover .open-row, .open-row:focus { opacity: 1; }
.cell-url { display: flex; align-items: center; gap: 4px; }
.cell-url a { text-decoration: none; font-weight: 800; padding: 0 4px; }
.props { display: grid; gap: 4px; }
.prop-row { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 10px; }
.prop-row .cell { width: 100%; }
.md-table { overflow-x: auto; margin: .8em 0; }
.md-table table { border-collapse: collapse; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md-table th { background: var(--soft); color: var(--fg); }
.md ul.todo { list-style: none; padding-left: 0; }
.md ul.todo li { display: flex; gap: 8px; align-items: baseline; }
.cb { width: 14px; height: 14px; border: 1.5px solid var(--fg); border-radius: 4px; display: inline-block; flex: none; transform: translateY(2px); }
.cb.on { background: var(--ink); }

/* ---------- Brain ---------- */
.brain { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.type-card { text-align: left; border: 1.5px solid transparent; background: var(--soft); border-radius: 16px; padding: 12px 14px; display: grid; gap: 4px; }
.type-card b { font-size: 15px; }
.type-card span { font-size: 12.5px; color: var(--dim); line-height: 1.35; }
.type-card:hover { border-color: var(--line); }
.type-card.active { background: var(--ink); color: var(--on-ink); }
.type-card.active span { color: inherit; opacity: .7; }
.callout { padding: 14px 18px; border-radius: 18px; margin-bottom: 14px; font-weight: 600; }
.callout a { text-decoration: underline; }
.report { font-size: 15.5px; line-height: 1.65; }
.sources { font-size: 13.5px; padding-left: 1.3em; color: var(--dim); }
.sources a { color: var(--fg); }

/* ---------- Agencies ---------- */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ws-card { padding: 20px; }
.ws-card.off { opacity: .6; }
.ws-stats { display: flex; gap: 16px; margin-top: 10px; font-size: 14px; }
.ws-stats b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-right: 2px; }

/* ---------- Integrations ---------- */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 14px 0; }
.prov { background: var(--soft); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.prov input { background: var(--card); }
.prov a { text-decoration: underline; }
.prop.prop-5 { grid-template-columns: 22px 1fr 150px 140px 100px; }
.gen-box select { width: auto; }

@media (max-width: 1100px) {
  .notion, .brain { grid-template-columns: 1fr; }
  .nt-side { position: static; max-height: none; }
  .nt-main { padding: 20px; }
}
@media (max-width: 820px) {
  .prop.prop-5 { grid-template-columns: 22px 1fr; }
  .prop.prop-5 > :nth-child(n+3) { grid-column: 2; }
  .prop-row { grid-template-columns: 1fr; }
}

/* ---------- Tickets ---------- */
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
tr.unread td { font-weight: 700; }
.thread { display: grid; gap: 10px; }
.tmsg-card { background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.tmsg-card.staff { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--brand); }
.tmsg-card .md { font-size: 14.5px; margin-top: 4px; }
.soc.ticket { background: var(--brand); color: #fff; }

/* ---------- 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; }
}

/* ---------- SEO report in email ---------- */
.seo-mail { background: var(--soft); border-radius: 14px; padding: 10px 12px; display: grid; gap: 10px; }
.seo-mail input { background: var(--card); }

/* ---------- High priority ---------- */
.icon-btn.tFlag { filter: grayscale(1); opacity: .35; font-size: 15px; }
.icon-btn.tFlag:hover { opacity: .8; }
.icon-btn.tFlag.on { filter: none; opacity: 1; }
.task-group.hi h3 { color: var(--fg); }
.task-group.hi .task { box-shadow: inset 3px 0 0 var(--brand); }

/* ---------- Report cover on screen ---------- */
.md-cover { background: #0A0A0A; color: #fff; border-radius: 18px; padding: 26px 26px 22px; margin-bottom: 18px; position: relative; overflow: hidden; }
.md-cover::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: var(--brand); right: -80px; top: -110px; }
.md-cover > * { position: relative; z-index: 1; }
.mc-eyebrow { font-family: "Kalam", cursive; color: #7FB5F8; font-size: 18px; }
.mc-title { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.mc-title span { display: block; color: #7FB5F8; }
.md-cover p { color: #E3E9F1; max-width: 60ch; }
.mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.mc-tags span { border: 1px solid #8A8F98; border-radius: 99px; padding: 3px 11px; font-size: 12px; }
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.mc-stats div { border-top: 2px solid var(--brand); padding-top: 8px; display: grid; }
.mc-stats b { font-size: 26px; font-weight: 800; }
.mc-stats small { color: #C9D1DC; font-size: 12px; }
.md-eyebrow { color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-top: 1.4em; }
.md-eyebrow + h1, .md-eyebrow + h2, .md-eyebrow + h3 { margin-top: .2em; }

/* ---------- Agents and team jobs ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.agent-card { text-align: left; border: 0; border-radius: 20px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.agent-card:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.agent-card.off { opacity: .55; }
.ag-emoji { font-size: 34px; line-height: 1; }
.ag-emoji.small { font-size: 18px; }
.ag-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.ag-role { font-weight: 700; color: var(--brand); font-size: 13.5px; }
.ag-instr { line-height: 1.4; }
.ag-ai { font-size: 12px; font-weight: 700; color: var(--dim); }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-row label { cursor: pointer; }
.emoji-row input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-row span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 20px; background: var(--soft); }
.emoji-row input:checked + span { box-shadow: inset 0 0 0 2px var(--brand); background: var(--card); }
.job-list { display: grid; gap: 12px; }
.job-card { padding: 18px; }
.team-chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.tc { background: var(--soft); border-radius: 99px; padding: 4px 11px; font-size: 13px; font-weight: 700; }
.tc-arrow { color: var(--brand); font-weight: 800; }
.step-row { display: grid; grid-template-columns: 28px 260px 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.step-n { width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.step-btns { display: inline-flex; }
.run-steps { display: grid; gap: 8px; }
.run-step { background: var(--soft); border-radius: 16px; padding: 10px 14px; }
.run-step summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.run-step summary::-webkit-details-marker { display: none; }
.run-step.working { box-shadow: inset 0 0 0 1.5px var(--brand); }
.run-step.failed { box-shadow: inset 0 0 0 1.5px var(--fg); }
.run-step .md { margin-top: 10px; font-size: 14.5px; background: var(--card); border-radius: 12px; padding: 12px 14px; max-height: 60vh; overflow: auto; }
@media (max-width: 820px) {
  .step-row { grid-template-columns: 28px 1fr; }
  .step-row .stInstr, .step-row .step-btns { grid-column: 2; }
  .agent-grid { grid-template-columns: 1fr; }
}

/* ---------- Autopilot ---------- */
.ap-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 14px; flex-wrap: wrap; }
.ap-hero.on { box-shadow: inset 0 0 0 2px var(--brand); }
.ap-state { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ap-hero.on .ap-state { color: var(--brand); }
.ap-stats { grid-template-columns: repeat(6, 1fr); }
.ap-how { padding-left: 1.2em; line-height: 1.55; font-size: 14.5px; }
.ap-how li { margin-bottom: 6px; }
.ap-log { display: grid; gap: 2px; max-height: 70vh; overflow: auto; }
.ap-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.ap-row:nth-child(odd) { background: var(--soft); }
.ap-k { width: 20px; text-align: center; flex: none; }
.ap-row.error .grow { font-weight: 600; }
.agent-box { margin-top: 10px; border-radius: 14px; padding: 10px 12px; background: var(--soft); box-shadow: inset 3px 0 0 var(--brand); }
.agent-box.failed { box-shadow: inset 3px 0 0 var(--fg); }
.agent-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.agent-line .icon-btn { margin-left: auto; font-size: 12px; width: auto; padding: 0 8px; }
.agent-line .icon-btn + .icon-btn { margin-left: 0; }
.agent-res summary { cursor: pointer; font-weight: 700; font-size: 13px; margin-top: 6px; }
.agent-res .md { margin-top: 8px; background: var(--card); border-radius: 10px; padding: 10px 12px; font-size: 14px; max-height: 50vh; overflow: auto; }
.agent-mail { display: grid; gap: 8px; margin-top: 8px; }
.agent-mail input, .agent-mail textarea { background: var(--card); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches label { cursor: pointer; display: inline-flex; }
.swatches input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { width: 32px; height: 32px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatches input:checked + span, .swatches input:checked + input { outline: 3px solid var(--fg); outline-offset: 2px; }
.swatches input[type=color] { width: 36px; height: 36px; border: 0; padding: 0; border-radius: 50%; background: none; }
@media (max-width: 1100px) { .ap-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .ap-stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Google Maps lead finder ---------- */
.maps-form { display: grid; grid-template-columns: 1.3fr 1fr 110px auto; gap: 10px; align-items: end; }
.maps-table td { vertical-align: top; }
.maps-emails { grid-column: 1 / -1; font-size: 13px; }
.maps-table tr.muted-row td { opacity: .5; }
@media (max-width: 820px) { .maps-form { grid-template-columns: 1fr; } }

/* ---------- Maps ---------- */
.map-box { height: 340px; border-radius: 16px; overflow: hidden; background: var(--soft); margin-top: 6px; position: relative; z-index: 0; }
.map-box.tall { height: 62vh; }
.map-box.small { height: 220px; margin-top: 10px; }
.map-box.map-empty { height: auto; padding: 14px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; margin-top: 8px; align-items: center; }
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.12); }
.map-pop { font: 13px/1.45 inherit; display: grid; gap: 3px; min-width: 170px; }
.map-pop a { color: var(--brand); font-weight: 600; }
.map-pop .pop-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.map-pop .pop-tags span { background: #EEF5FE; border-radius: 99px; padding: 1px 8px; font-size: 11.5px; }
.map-pop .pop-reason { font-style: italic; color: #33373D; }
.map-pop .btn { margin-top: 6px; justify-self: start; }
.leaflet-container { font-family: inherit; }
@media (max-width: 820px) { .map-box { height: 260px; } .map-box.tall { height: 60vh; } }

/* ---------- Bots without AI ---------- */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-pick label { cursor: pointer; }
.mode-pick input { position: absolute; opacity: 0; pointer-events: none; }
.mode-pick span { display: grid; gap: 3px; padding: 14px; border-radius: 16px; background: var(--soft); box-shadow: inset 0 0 0 1.5px transparent; height: 100%; }
.mode-pick small { color: var(--dim); font-size: 12.5px; }
.mode-pick input:checked + span { background: var(--card); box-shadow: inset 0 0 0 2px var(--brand); }
.act-card { background: var(--soft); border-radius: 14px; padding: 12px; margin-bottom: 8px; }
.act-head { display: flex; align-items: center; gap: 8px; }
.act-head .step-btns { margin-left: auto; }
.act-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.act-fields .field:has(textarea) { grid-column: 1 / -1; }
.act-fields input, .act-fields select, .act-fields textarea { background: var(--card); }
.add-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.add-act select { width: auto; flex: 1; min-width: 220px; }
.ag-run { justify-self: start; margin-top: 4px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--ink); color: var(--on-ink); cursor: pointer; }
.ag-last { line-height: 1.35; }
@media (max-width: 820px) { .mode-pick { grid-template-columns: 1fr; } }

/* ---------- Approvals ---------- */
.ap-list { display: grid; gap: 12px; }
.ap-card { padding: 16px 18px; transition: opacity .3s, transform .3s; }
.ap-card.gone { opacity: 0; transform: translateX(30px); }
.ap-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.ap-kind { font-size: 12px; font-weight: 700; color: var(--brand); background: #EEF5FE; border-radius: 99px; padding: 3px 10px; }
.ap-body { display: grid; gap: 10px; margin-bottom: 12px; }
.ap-body textarea, .ap-body input { background: var(--soft); }
.ap-tasks { display: grid; gap: 6px; }
.ap-task { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; }
.ap-set { margin-bottom: 12px; padding: 14px 18px; }
.ap-set summary { cursor: pointer; }
.ap-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; margin-bottom: 14px; text-decoration: none; box-shadow: inset 0 0 0 2px var(--brand); }
.chip.active { background: var(--ink); color: var(--on-ink); }

/* ---------- Task selection and auto-mail ---------- */
.tSel { width: 18px; height: 18px; margin: 0 10px 0 0; vertical-align: -3px; accent-color: var(--brand); }
.task.selected { box-shadow: inset 0 0 0 2px var(--brand); }
#tBulk { position: sticky; top: 80px; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; margin-bottom: 12px; }
.am-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Mail connection ---------- */
.mail-ways { display: grid; gap: 10px; margin-bottom: 12px; }
.mail-way { background: var(--soft); border-radius: 16px; padding: 14px 16px; display: grid; gap: 6px; }
.mail-way.on { box-shadow: inset 0 0 0 2px var(--brand); background: var(--card); }
.smtp-more summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* ---------- Plan web (moodboards) ---------- */
.pw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pw-card { text-align: left; border: 0; border-radius: 20px; padding: 10px 10px 14px; display: grid; gap: 4px; }
.pw-card:hover { box-shadow: inset 0 0 0 1.5px var(--fg); }
.pw-thumb { height: 150px; border-radius: 14px; background: var(--soft) center/cover no-repeat; display: grid; place-items: center; font-size: 34px; position: relative; overflow: hidden; margin-bottom: 6px; }
.pw-mini-pal { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: 12px; }
.pw-mini-pal i { flex: 1; }
.pw-title { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 0; outline: none; }
.pw-add { padding: 14px; border-radius: 18px; display: grid; gap: 10px; margin-bottom: 12px; }
.pw-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pw-add-row input[type=text] { flex: 1; min-width: 240px; }
.pw-colorbtn { position: relative; }
.pw-colorbtn input { width: 22px; height: 22px; border: 0; padding: 0; background: none; vertical-align: middle; margin-left: 4px; }
.pw-ai { padding: 14px 18px; border-radius: 18px; margin-bottom: 14px; }
.pw-ai summary { cursor: pointer; }
.pw-ai-body { display: grid; gap: 12px; margin-top: 12px; }
.pw-dir { display: grid; gap: 14px; }
.pw-dir h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.pw-dir p { margin: 0; line-height: 1.55; }
.pw-concept p { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.pw-pal { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); border-radius: 14px; overflow: hidden; }
.pw-pal-c { height: 86px; border: 0; display: flex; align-items: flex-end; padding: 8px; cursor: pointer; }
.pw-pal-c span { background: rgba(255,255,255,.88); color: #0a0a0a; border-radius: 8px; padding: 3px 7px; font-size: 11px; font-weight: 700; text-align: left; line-height: 1.3; }
.pw-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pw-cols ol, .pw-cols ul { margin: 0; padding-left: 1.2em; line-height: 1.5; font-size: 14px; }
.pw-ideas { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.pw-ideas li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.pw-search { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-term { background: var(--soft); border-radius: 99px; padding: 5px 12px; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.pw-term a { color: var(--brand); font-weight: 600; font-size: 12px; }
.pw-board { columns: 4 240px; column-gap: 12px; }
.pw-item { break-inside: avoid; margin-bottom: 12px; background: var(--card); border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 1px 0 var(--line); }
.pw-media-wrap { position: relative; cursor: pointer; min-height: 110px; background: var(--soft); }
.pw-media { width: 100%; display: block; background: var(--soft); }
.pw-media.empty { height: 120px; display: grid; place-items: center; font-size: 30px; color: var(--dim); }
.pw-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(10,10,10,.72); color: #fff; display: grid; place-items: center; font-size: 20px; padding-left: 4px; pointer-events: none; }
.pw-item.playable:hover .pw-play { background: var(--brand); }
.pw-meta { padding: 10px 12px; display: grid; gap: 2px; font-size: 13.5px; }
.pw-meta a { text-decoration: none; }
.pw-del { position: absolute; top: 8px; right: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(10,10,10,.6); color: #fff; font-size: 12px; opacity: 0; cursor: pointer; }
.pw-item:hover .pw-del { opacity: 1; }
.pw-item.note { background: #FFF8D6; color: #2a2a2a; }
.pw-note { padding: 14px 16px; font-size: 14.5px; }
.pw-item.color { display: flex; align-items: center; }
.pw-swatch { width: 74px; height: 74px; border: 0; flex: none; cursor: pointer; }
.pw-player { display: grid; place-items: center; background: #000; border-radius: 14px; overflow: hidden; }
.pw-player-video { width: 100%; max-height: 75vh; background: #000; }
.pw-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.pw-frame.vertical { width: min(100%, 400px); aspect-ratio: 9 / 16; max-height: 78vh; }
@media (max-width: 900px) { .pw-cols { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .pw-board { columns: 2 150px; } .pw-del { opacity: 1; } }

/* ---------- Email signature ---------- */
.sig-preview { background: #fff; border-radius: 14px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; }
.sig-frame { width: 100%; border: 0; height: 160px; background: #fff; }
.sig-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sig-form { display: grid; gap: 12px; margin-top: 12px; }
@media (max-width: 820px) { .sig-ways { grid-template-columns: 1fr; } }

/* ---------- Hooks table ---------- */
.pw-hooks { padding: 14px 18px; border-radius: 18px; margin-bottom: 14px; }
.pw-hooks summary { cursor: pointer; }
#pwHookLang { width: auto; padding: 6px 12px; }
.pw-hook-wrap { max-height: 70vh; overflow: auto; }
.pw-hook-table { min-width: 1100px; }
.pw-hook-table td { vertical-align: top; padding: 6px; }
.pw-hook-table th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.pw-hc { width: 100%; min-width: 160px; font-size: 13px; background: var(--soft); border-radius: 10px; padding: 7px 9px; resize: vertical; }
.pw-hv { display: flex; gap: 8px; align-items: flex-start; min-width: 200px; }
.pw-hthumb { width: 46px; height: 64px; border-radius: 8px; border: 0; background: #0a0a0a center/cover; color: #fff; flex: none; cursor: pointer; }

/* ---------- Phone preview ---------- */
.phone-tabs { margin: 0 auto 14px; display: flex; width: max-content; max-width: 100%; }
.phone-stage { display: grid; place-items: center; padding: 6px 0; }
.phone { position: relative; width: 300px; height: 620px; border-radius: 46px; background: #0b0b0c; padding: 11px; box-shadow: 0 0 0 2px #2b2b2e, 0 30px 60px rgba(0,0,0,.35); }
.ph-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 16px; background: #000; z-index: 5; }
.ph-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #000; color: #fff; font: 13px/1.35 -apple-system, "Helvetica Neue", Arial, sans-serif; }
.ph-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 18%, transparent 58%, rgba(0,0,0,.6)); pointer-events: none; }
.ph-status { position: absolute; top: 12px; left: 26px; right: 22px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; z-index: 3; }
.ph-status.light { color: #fff; }
.tt-top, .rl-top { position: absolute; top: 46px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; font-size: 15px; z-index: 3; }
.tt-top span { opacity: .7; } .tt-top span:last-child { position: absolute; right: 16px; opacity: 1; }
.rl-top { justify-content: space-between; padding: 0 16px; font-size: 18px; }
.ph-side { position: absolute; right: 8px; bottom: 120px; display: grid; gap: 14px; justify-items: center; z-index: 3; }
.ph-ic { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ph-ic svg { width: 30px; height: 30px; fill: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #7FB5F8); border: 2px solid #fff; display: inline-block; flex: none; position: relative; }
.ph-avatar.big { width: 42px; height: 42px; }
.ph-avatar.big i { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: #fe2c55; font-style: normal; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.ph-disc { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle, var(--brand) 0 25%, #222 26% 100%); border: 6px solid #333; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ph-bottom { position: absolute; left: 12px; right: 64px; bottom: 64px; z-index: 3; display: grid; gap: 6px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.reels .ph-bottom { bottom: 22px; }
.ph-user { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rl-follow { border: 1px solid #fff; border-radius: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.ph-cap { font-size: 13px; }
.ph-music { display: flex; gap: 6px; align-items: center; font-size: 12px; white-space: nowrap; overflow: hidden; }
.ph-music svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2; flex: none; }
.tt-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; background: #000; display: flex; justify-content: space-around; align-items: center; font-size: 18px; z-index: 4; }
.tt-nav span { display: grid; justify-items: center; line-height: 1; } .tt-nav small { font-size: 9px; margin-top: 3px; opacity: .8; }
.tt-plus { width: 40px; height: 26px; border-radius: 8px; background: #fff; color: #000; display: grid !important; place-items: center; font-weight: 800; box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55; }
.ig-feed { background: #fff; color: #000; }
.ig-feed .ph-status { color: #000; }
.igf-top { position: absolute; top: 40px; left: 14px; right: 14px; display: flex; justify-content: space-between; font-size: 20px; font-family: Georgia, serif; }
.igf-head { position: absolute; top: 78px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.igf-head .ph-more { margin-left: auto; } .igf-head svg { width: 18px; fill: #000; }
.igf-media { position: absolute; top: 116px; left: 0; right: 0; height: 280px; background: #eee; }
.igf-media .ph-media { position: absolute; }
.igf-actions { position: absolute; top: 404px; left: 12px; right: 12px; display: flex; justify-content: space-between; }
.igf-actions svg { width: 24px; height: 24px; fill: none; stroke: #000; stroke-width: 1.8; margin-right: 12px; }
.igf-text { position: absolute; top: 440px; left: 12px; right: 12px; display: grid; gap: 3px; font-size: 13px; }
@media (max-width: 820px) { .phone { width: 270px; height: 560px; } }

/* ---------- Today (day plan + CRM record) ---------- */
:root { --td-meet: #121417; --td-mail: var(--brand); --td-dm: #c13584; --td-task: #8a9099; --td-now: #e5484d; }
@media (prefers-color-scheme: dark) { :root { --td-meet: #e8eaed; } }
.td { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
.td-left { display: grid; gap: 12px; min-width: 0; }
.td-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.td-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.td-date { margin: 0 0 4px; color: var(--dim); font-weight: 600; font-size: 13.5px; }
.td-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.td .ap-banner { margin-bottom: 0; }
.td-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.td-kpis > div { padding: 10px 14px; border-right: 1px solid var(--line); min-width: 0; }
.td-kpis > div:last-child { border: 0; }
.td-kpis b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-kpis span { font-size: 12px; color: var(--dim); }
.td-bad { color: var(--td-now); font-weight: 700; }
.td-strip { padding: 12px 14px; border-radius: 16px; }
.td-strip-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--dim); margin-bottom: 8px; flex-wrap: wrap; }
.td-strip-lbl b { color: var(--fg); }
.td-track { position: relative; height: 24px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.td-blk { position: absolute; top: 0; bottom: 0; border-right: 2px solid var(--card); border-radius: 3px; }
.td-now { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--td-now); }
.td-hours { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--dim); margin-top: 4px; font-variant-numeric: tabular-nums; }
.td-sheet { border-radius: 16px; overflow: auto; padding: 0; }
.td-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.4px; font-variant-numeric: tabular-nums; }
.td-table th, .td-table td { border-bottom: 1px solid var(--line); padding: 0 10px; height: 40px; text-align: left; white-space: nowrap; }
.td-table td + td, .td-table th + th { border-left: 1px solid var(--line); }
.td-table th { position: sticky; top: 0; background: var(--soft); color: var(--dim); font-weight: 600; font-size: 12.5px; z-index: 1; }
.td-table tr:last-child td { border-bottom: 0; }
.td-table .num { text-align: right; }
.td-rn { width: 32px; text-align: center !important; color: var(--dim); font-size: 11.5px; background: var(--soft); }
.td-time { font-weight: 800; width: 64px; }
.td-what { white-space: normal !important; min-width: 200px; line-height: 1.3; }
.td-who { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.td-kind { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--dim); }
.td-kind i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.td-hi { font-size: 12px; }
.td-row { cursor: pointer; }
.td-row:hover td:not(.td-rn) { background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.td-row.past td:not(.td-rn) { color: var(--dim); }
.td-row.past .td-what { text-decoration: line-through; text-decoration-color: var(--dim); }
.td-row.now td:not(.td-rn) { background: color-mix(in srgb, var(--td-now) 7%, var(--card)); }
.td-row.now .td-time { color: var(--td-now); }
.td-row.sel td:not(.td-rn) { background: color-mix(in srgb, var(--brand) 11%, var(--card)); }
.td-row.sel .td-rn { background: var(--brand); color: #fff; }
.td-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.td-chk { width: 18px; height: 18px; accent-color: var(--brand); vertical-align: -4px; }
.td-qhead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.td-qhead h2 { margin: 0; font-size: 16px; }
.td-plan { display: flex; gap: 6px; align-items: center; border-left: 1px solid var(--line); }
.td-plan .td-tm { width: 104px; padding: 4px 8px; font-size: 13px; }
/* record */
.td-rec { position: sticky; top: 90px; border-radius: 18px; max-height: calc(100vh - 110px); overflow: auto; padding: 0; }
.td-rtop { padding: 18px 18px 12px; }
.td-who-row { display: flex; gap: 12px; align-items: center; }
.td-who-row h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; line-height: 1.15; }
.td-av { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; font-size: 15px; }
.td-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); margin-top: 14px; }
.td-facts > div { padding: 9px 11px; border-right: 1px solid var(--line); }
.td-facts > div:last-child { border: 0; }
.td-facts b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.td-facts span { font-size: 11.5px; color: var(--dim); }
.td-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.td-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.td-tabs button { border: 0; background: none; padding: 10px 11px; font-weight: 700; font-size: 13px; color: var(--dim); border-bottom: 2px solid transparent; white-space: nowrap; }
.td-tabs button.on { color: var(--fg); border-bottom-color: var(--brand); }
.td-rbody { padding: 14px 18px 20px; display: grid; gap: 10px; }
.td-kv { display: grid; grid-template-columns: 120px 1fr; font-size: 13.4px; border-top: 1px solid var(--line); }
.td-kv > div { padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.td-kv > div:nth-child(odd) { color: var(--dim); }
.td-kv a { color: var(--brand); text-decoration: none; }
.td-sub { margin: 8px 0 0; font-size: 13.5px; }
.td-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.td-list li { display: flex; justify-content: space-between; gap: 10px; background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 13.4px; }
.td-desc { margin: 0; color: var(--dim); font-size: 13.4px; white-space: pre-line; }
.td-tl { list-style: none; margin: 0; padding: 0; }
.td-tl li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.2px; }
.td-tl li > span:last-child { display: grid; gap: 1px; }
.td-w { color: var(--dim); font-size: 12px; }
.td-n { color: var(--dim); }
.td-dealv { font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.td-stg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.td-stg i { height: 8px; border-radius: 4px; background: var(--line); }
.td-stg i.on { background: var(--brand); }
.td-stgn { display: grid; grid-template-columns: repeat(5, 1fr); font-size: 10.5px; color: var(--dim); }
.td-dealf { display: grid; gap: 10px; margin-top: 8px; }
.td-ai { background: color-mix(in srgb, var(--brand) 10%, var(--card)); border-radius: 14px; padding: 14px; display: grid; gap: 8px; font-size: 13.6px; }
.td-ai ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.td-ai button { justify-self: start; }
.td-rbody textarea, .td-rbody input[type=text] { background: var(--soft); }
.td-rec-m .td-rtop { padding-top: 4px; }
@media (max-width: 1250px) { .td { grid-template-columns: minmax(0, 1fr) 360px; } .td-kpis { grid-template-columns: repeat(3, 1fr); } .td-kpis > div:nth-child(n+4) { border-top: 1px solid var(--line); } }
/* phone: one column, rows as cards, record opens full screen */
@media (max-width: 900px) {
  .td { grid-template-columns: minmax(0, 1fr); }
  .td-rec { display: none; }
  .td-actions { margin-left: 0; width: 100%; }
  .td-actions .btn { flex: 1; justify-content: center; }
  .td-kpis { grid-template-columns: repeat(2, 1fr); }
  .td-kpis > div { border-top: 1px solid var(--line); }
  .td-kpis > div:nth-child(-n+2) { border-top: 0; }
  .td-kpis > div:nth-child(2n) { border-right: 0; }
  .td-kpis > div:last-child { grid-column: 1 / -1; }
  .td-hours span:nth-child(even) { visibility: hidden; }
  .td-table thead { display: none; }
  .td-table, .td-table tbody { display: block; }
  .td-table tr.td-row { display: grid; grid-template-columns: 54px 1fr auto; grid-template-areas: "time what done" "time who done" "time meta meta"; column-gap: 10px; row-gap: 2px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
  .td-table tr.td-row td { border: 0 !important; height: auto; padding: 0; white-space: normal; background: none !important; }
  .td-table .td-rn { display: none; }
  .td-time { grid-area: time; font-size: 15px; padding-top: 1px !important; }
  .td-what { grid-area: what; min-width: 0; font-weight: 600; }
  .td-who { grid-area: who; max-width: none; font-size: 13px; }
  .td-row td:nth-child(5) { grid-area: meta; }
  .td-row td:nth-child(6) { display: none; }
  .td-row td:last-child { grid-area: done; align-self: center; }
  .td-row.sel { background: color-mix(in srgb, var(--brand) 10%, var(--card)); }
  .td-row.now { background: color-mix(in srgb, var(--td-now) 7%, var(--card)); }
  .td-queue tr.td-row { grid-template-columns: 1fr auto; grid-template-areas: "what done" "who done" "plan plan"; }
  .td-queue .td-what { grid-area: what; }
  .td-queue .td-who { grid-area: who; }
  .td-queue .td-plan { grid-area: plan; border: 0 !important; margin-top: 6px; }
  .td-queue .td-row td:last-child { grid-area: done; }
  .td-plan .td-tm { flex: 1; width: auto; }
  .td-chk { width: 22px; height: 22px; }
}

/* ---------- Knowledge base: Notion-style pages ---------- */
.nt-main.wide .nb, .nt-main.wide .nt-head { max-width: none; }
.nt-topbar { display: flex; align-items: center; gap: 10px; margin: -6px 0 10px; flex-wrap: wrap; }
.nt-topbar .nt-crumbs { margin: 0; flex: 1; min-width: 0; }
.nt-tb-actions { display: flex; gap: 6px; }
.nt-shared { margin-left: 4px; font-size: 11px; }
.nt-cover { height: 190px; margin: 0 -40px 0; background: center/cover no-repeat var(--soft); position: relative; }
.nt-cover-btns { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.nt-cover:hover .nt-cover-btns { opacity: 1; }
.nt-cover-btns .btn { background: var(--card); }
.nt-head { max-width: 760px; margin: 0 auto 0; position: relative; }
.nt-head.with-cover .nt-icon { margin-top: -38px; position: relative; }
.nt-addcover { opacity: 0; transition: opacity .15s; height: 26px; }
.nt-head:hover .nt-addcover { opacity: 1; }
.nt-covers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nt-cv { height: 70px; border-radius: 10px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.nb { max-width: 760px; margin: 6px auto 0; padding-bottom: 60px; font-size: 16px; line-height: 1.6; }
.nb-row { position: relative; display: flex; align-items: flex-start; margin: 1px 0; border-radius: 4px; }
.nb-handle { position: absolute; left: -50px; top: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.nb-row:hover .nb-handle, .nb-row:focus-within .nb-handle { opacity: 1; }
.nb-plus, .nb-drag { width: 22px; height: 24px; border: 0; border-radius: 4px; background: none; color: var(--dim); display: grid; place-items: center; font-size: 16px; cursor: pointer; line-height: 1; }
.nb-drag { cursor: grab; font-size: 13px; letter-spacing: -2px; }
.nb-plus:hover, .nb-drag:hover { background: var(--soft); color: var(--fg); }
.nb-row.dragging { opacity: .4; }
.nb-row.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.nb-row.drop-after { box-shadow: 0 3px 0 var(--brand); }
.nb-content { flex: 1; min-width: 0; }
.nb-b { outline: none; padding: 3px 2px; min-height: 1.6em; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-b:empty::before, .nb-tg-body:empty::before, .nb-cap:empty::before { content: attr(data-ph); color: var(--dim); opacity: .55; pointer-events: none; }
.nb-row:not(:focus-within) .nb-p:empty::before { content: ''; }
.nb-h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.25; margin-top: 18px; }
.nb-h2 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; margin-top: 14px; }
.nb-h3 { font-size: 19px; font-weight: 700; margin-top: 10px; }
.nb-bullet, .nb-number { padding-left: 26px; position: relative; }
.nb-bullet::after { content: ''; position: absolute; left: 9px; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.nb-number::after { content: attr(data-n); position: absolute; left: 2px; top: 3px; color: var(--fg); font-variant-numeric: tabular-nums; }
.nb-todo { display: flex; gap: 8px; align-items: flex-start; }
.nb-todo input { width: 17px; height: 17px; margin-top: 6px; accent-color: var(--brand); flex: none; }
.nb-todo .nb-b { flex: 1; }
.nb-todo.done .nb-b { color: var(--dim); text-decoration: line-through; }
.nb-quote { border-left: 3px solid var(--fg); padding-left: 14px; }
.nb-callout { display: flex; gap: 10px; background: var(--soft); border-radius: 8px; padding: 12px 14px; }
.nb-emoji { border: 0; background: none; font-size: 20px; line-height: 1.3; padding: 0; cursor: pointer; }
.nb-callout .nb-b { flex: 1; padding: 0; }
.nb-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; outline: none; }
.nb-hr:focus { border-top-color: var(--brand); }
.nb-code { background: var(--soft); border-radius: 8px; padding: 12px 14px; font: 13.5px/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; margin: 4px 0; }
.nb-tg { display: flex; gap: 4px; align-items: flex-start; }
.nb-tg-arrow { border: 0; background: none; width: 22px; height: 26px; border-radius: 4px; cursor: pointer; color: var(--fg); transition: transform .15s; font-size: 13px; }
.nb-tg.open .nb-tg-arrow { transform: rotate(90deg); }
.nb-tg .nb-b { flex: 1; font-weight: 600; }
.nb-tg-body { padding: 2px 2px 4px 26px; outline: none; white-space: pre-wrap; color: var(--fg); }
.nb-fig { margin: 8px 0; outline: none; }
.nb-fig:focus img { box-shadow: 0 0 0 3px var(--brand); }
.nb-fig img { max-width: 100%; border-radius: 6px; display: block; }
.nb-imgph { background: var(--soft); border-radius: 8px; padding: 26px; text-align: center; color: var(--dim); cursor: pointer; }
.nb-cap { font-size: 13.5px; color: var(--dim); margin-top: 6px; outline: none; }
.nb-pagelink { display: inline-flex; gap: 6px; padding: 3px 4px; border-radius: 4px; text-decoration: none; color: var(--fg); font-weight: 600; }
.nb-pagelink:hover { background: var(--soft); }
.nb-pagelink u { text-decoration-color: var(--line); text-underline-offset: 3px; }
.nb-table { margin: 6px 0; }
.nb-edit-table { border: 0; background: none; color: var(--dim); font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.nb-b code { background: var(--soft); border-radius: 4px; padding: 1px 5px; font-size: .88em; }
.nb-b a { color: var(--brand); }
.nb-tail { height: 80px; cursor: text; }
.nb-menu { position: fixed; z-index: 200; width: 290px; max-height: 330px; overflow: auto; border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.18); background: var(--card); }
.nb-menu-h { font-size: 11.5px; color: var(--dim); padding: 6px 8px; font-weight: 600; }
.nb-menu button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 8px; text-align: left; cursor: pointer; }
.nb-menu button.on, .nb-menu button:hover { background: var(--soft); }
.nb-menu small { display: block; color: var(--dim); font-size: 12px; }
.nb-mi { width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; background: var(--card); }
.nb-bar { position: fixed; z-index: 210; display: flex; gap: 2px; background: #121417; border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.nb-bar button { border: 0; background: none; color: #fff; min-width: 30px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.nb-bar button:hover { background: rgba(255,255,255,.14); }
.share-box { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px; display: grid; gap: 10px; }
.share-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; cursor: pointer; }
.share-row small { display: block; color: var(--dim); font-size: 12.5px; }
.share-row input { width: 40px; height: 22px; accent-color: var(--brand); }
@media (max-width: 820px) {
  .nb-handle { left: -6px; top: -22px; }
  .nb { padding-left: 4px; }
  .nt-cover { margin: 0 -16px; height: 140px; }
  .nt-cover-btns, .nt-addcover { opacity: 1; }
}

/* ---------- Workspaces, own menu items, security ---------- */
.ws-h { margin: 26px 0 10px; font-size: 18px; }
.lnk-row { display: grid; grid-template-columns: 52px 1fr 1.6fr 150px 32px; gap: 6px; margin-bottom: 6px; align-items: center; }
.lnk-row .l-ic { text-align: center; }
.nav-emoji { width: 20px; text-align: center; font-size: 16px; line-height: 1; flex: none; }
.custom-frame { border-radius: 16px; overflow: hidden; padding: 0; height: calc(100vh - 220px); min-height: 420px; }
.custom-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ws-switch { display: inline-flex; align-items: center; gap: 6px; }
.ws-switch select { border: 0; background: var(--soft); border-radius: 99px; padding: 5px 28px 5px 10px; font-weight: 700; font-size: 13px; width: auto; }
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.sec-wide { grid-column: 1 / -1; }
.sec-on, .sec-off { display: flex; gap: 10px; align-items: baseline; margin: 6px 0 10px; }
.sess-list { display: grid; gap: 6px; }
.sess { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.tf-setup ol { margin: 10px 0; padding-left: 18px; }
.tf-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tf-row img { border-radius: 10px; background: #fff; padding: 6px; }
.tf-key { display: inline-block; margin-top: 4px; font-size: 13px; letter-spacing: .06em; }
.rec-codes { margin-top: 12px; background: var(--soft); border-radius: 12px; padding: 14px; }
.rec-codes .codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.rec-codes code { background: var(--card); padding: 6px; border-radius: 6px; text-align: center; font-size: 13px; }
.sec-facts { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--dim); }
table.audit td { vertical-align: top; }
tr.au-bad td { color: #C4161C; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } .lnk-row { grid-template-columns: 46px 1fr; } .lnk-row .l-url, .lnk-row .l-mode { grid-column: span 1; } .rec-codes .codes { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Knowledge base: AI and history ---------- */
.sop-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--soft); font-weight: 600; font-size: 13px; cursor: pointer; }
.chip-radio input:checked + span { background: var(--ink); color: var(--on-ink); }
.ai-preview .nb { margin: 0; padding-bottom: 0; max-width: none; font-size: 14.5px; }
.ai-preview { max-height: 52vh; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 18px; margin: 8px 0 10px; }
.ver-list { display: grid; gap: 4px; max-height: 28vh; overflow: auto; margin-bottom: 10px; }
.ver { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 0; background: var(--soft); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 13.5px; }
.ver span { color: var(--dim); }
.ver.on { box-shadow: inset 0 0 0 2px var(--brand); }

/* ---------- WhatsApp ---------- */
.wa-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #25D366; color: #fff !important; text-decoration: none; vertical-align: -5px; margin-left: 4px; font-size: 14px; }
.wa-ic:hover { background: #1da851; }
.wa-btn { background: #25D366 !important; border-color: #25D366 !important; color: #fff !important; }
.wa-btn:hover { background: #1da851 !important; }
.wa-green { color: #25D366; }
.wa-box { display: grid; gap: 12px; }
.wa-ai { display: flex; gap: 6px; }
.wa-ai input { flex: 1; }
.wa-count { text-align: right; margin-top: -8px; }

/* ---------- Brands and white-label ---------- */
.br-ov { padding: 0; border-radius: 16px; overflow: auto; }
.br-ov table { min-width: 1000px; }
.br-ov .num { text-align: right; font-variant-numeric: tabular-nums; }
.br-ov tr.cur td { background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.br-ov tr.br-total td { border-top: 2px solid var(--fg); font-weight: 700; background: var(--soft); }
.brand-mark:has(.wl-logo) { width: auto !important; height: auto !important; max-width: 170px; }
.brand-mark .wl-logo { width: auto !important; height: auto !important; max-height: 38px; max-width: 170px; object-fit: contain; }
.auth-card .brand-mark:has(.wl-logo) { margin: 0 auto; }
.auth-card .brand-mark .wl-logo { max-height: 52px; max-width: 220px; }
.auth .wl-logo { max-height: 46px; margin: 0 auto; }
.wl-color { display: flex; gap: 8px; align-items: center; }
.wl-color input[type=color] { width: 44px; height: 40px; padding: 2px; border-radius: 10px; }
.wl-logo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wl-prev { min-width: 140px; min-height: 52px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; padding: 8px; }
.wl-prev img { max-height: 40px; max-width: 180px; }
.wl-dns { background: var(--soft); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }

/* ---------- KOLs and client approval ---------- */
.kol-table { padding: 0; border-radius: 16px; overflow: auto; }
.kol-table table { min-width: 1150px; }
.kol-table tbody tr { cursor: pointer; }
.kol-table tbody tr:hover td { background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.kol-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.kol-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.kol-facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.kol-sum { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); margin: 12px 0; }
.kol-sum > div { padding: 10px 12px; border-right: 1px solid var(--line); }
.kol-sum > div:last-child { border: 0; }
.kol-sum b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.kol-sum span { font-size: 11.5px; color: var(--dim); }
.kol-deals { display: grid; gap: 8px; }
.kol-deal { background: var(--soft); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: grid; gap: 4px; }
.kol-deal:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.kd-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kd-st { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--card); }
.kd-st.st-contracted { color: var(--brand); } .kd-st.st-posted { color: #b54708; } .kd-st.st-paid { color: #12803f; } .kd-st.st-cancelled { color: var(--dim); text-decoration: line-through; }
.kd-res { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.ap-badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); margin-top: 4px; }
.ap-badge.approved { background: #e3f6ea; color: #12803f; } .ap-badge.changes { background: #fdeee3; color: #b54708; }
@media (max-width: 820px) { .kol-sum { grid-template-columns: repeat(3, 1fr); } .kol-sum > div:nth-child(3) { border-right: 0; } .kol-sum > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); } }

/* ---------- Light colour for the black parts (e.g. white): keep them visible ---------- */
.ink-light .tabs button.active, .ink-light .nav a.active, .ink-light .count, .ink-light .chip.active, .ink-light .status-pill,
.ink-light .avatar, .ink-light .toast, .ink-light .ev.mine, .ink-light .kb-item.active, .ink-light .nt-item.active, .ink-light .type-card.active,
.ink-light .tchat-item.active, .ink-light .msg.user, .ink-light .soc, .ink-light .late, .ink-light .prio-hoog, .ink-light .media-count { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.16); }
.ink-light .toast { box-shadow: 0 8px 30px rgba(0,0,0,.18), inset 0 0 0 1.5px rgba(0,0,0,.12); }

/* ===================== Phone layout ===================== */
.menu-btn, .m-title { display: none; }
@media (max-width: 820px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 15px; }
  .app { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 0; }

  /* Top bar with logo, page title and menu button */
  .rail {
    position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; gap: 10px;
    border-radius: 0; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; overflow: visible;
    box-shadow: 0 1px 0 var(--line);
  }
  .rail .brand-mark { width: 34px; height: 34px; margin: 0; }
  .m-title { display: block; flex: 1; font-weight: 800; font-size: 18px; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--soft); padding: 0 11px; }
  .menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  /* Menu drawer */
  .rail .nav {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; top: calc(62px + env(safe-area-inset-top));
    flex-direction: column; overflow-y: auto; background: var(--card); padding: 10px 12px calc(80px + env(safe-area-inset-bottom)); gap: 2px; z-index: 39;
  }
  .nav-open .rail .nav { display: flex; }
  .rail .nav a { padding: 14px 14px; font-size: 16px; }
  .rail .nav-label { display: inline !important; }
  .rail-btn { display: none; }
  .nav-open .rail-btn { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 41; background: var(--soft); justify-content: center; padding: 14px; }
  .nav-open .rail-btn::after { content: "Log out"; }
  .nav-open { overflow: hidden; }

  .topbar { display: none; }
  .main-wrap { gap: 0; }
  .main { padding: 16px 14px calc(70px + env(safe-area-inset-bottom)); }

  /* Headings and actions */
  .page-head { margin-bottom: 16px; gap: 12px; }
  .page-head h1 { font-size: 34px; }
  .page-head p { font-size: 14.5px; }
  .page-head .actions { width: 100%; }
  .actions .btn { min-height: 40px; }
  .tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { white-space: nowrap; padding: 9px 14px; }

  /* Inputs: 16px stops iPhone from zooming in */
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=search], input[type=tel], input[type=url], input[type=number], select, textarea { font-size: 16px; }
  .toolbar { gap: 8px; }
  .toolbar input[type=search] { max-width: none; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 auto; }

  /* Cards and lists */
  .card { padding: 16px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-n { font-size: 32px; }
  .stat-n.money { font-size: 24px; }
  .dash, .dash-side { gap: 10px; }
  .follow-list li { grid-template-columns: 1fr; }
  .follow-name { font-size: 18px; }
  .task { grid-template-columns: 24px 1fr; padding: 14px; }
  .task-actions { grid-column: 2; justify-content: flex-start; }
  .dm-actions .btn { flex: 1 1 auto; justify-content: center; }
  .dm-actions .muted { flex-basis: 100%; }
  .table-wrap { border-radius: 16px; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 680px; }
  .nt-db table { min-width: 560px; }
  .bulk-bar { top: calc(64px + env(safe-area-inset-top)); border-radius: 14px; }
  .ai-box { border-radius: 18px; padding: 12px; }
  .ai-box .btn { flex: 1 1 auto; justify-content: center; }
  .ai-label { flex-basis: 100%; }

  /* Pop-ups become full-screen sheets */
  .overlay { padding: 0; align-items: end; }
  .panel, .panel.wide { width: 100%; max-height: 100%; height: 100%; border-radius: 0; padding: calc(14px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); animation: sheet .2s ease-out; }
  .panel-head { position: sticky; top: calc(-14px - env(safe-area-inset-top)); background: var(--card); z-index: 5; padding: 8px 0 10px; margin: -8px 0 12px; }
  .panel-head h2 { font-size: 22px; }
  .close { width: 40px; height: 40px; }
  .grid-2, .grid-3, .inline-form { grid-template-columns: 1fr !important; }
  .grid-3 > :first-child { grid-column: auto; }

  /* Boards, calendar, chat */
  .board, .board-5 { grid-template-columns: repeat(5, 86vw); scroll-snap-type: x mandatory; }
  .board { grid-template-columns: repeat(4, 86vw); }
  .col { scroll-snap-align: start; }
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .chat { height: calc(100dvh - 230px); padding: 12px; }
  .tchat { grid-template-columns: 1fr; height: auto; }
  .tchat-side { max-height: 30vh; }
  .tchat-main { height: calc(100dvh - 330px); min-height: 360px; }
  .msg { max-width: 94%; }

  /* Knowledge base, Brain, finance */
  .notion { grid-template-columns: 1fr; }
  .nt-side { position: static; max-height: 38vh; }
  .nt-main { padding: 18px 16px 32px; }
  .nt-title { font-size: 30px; }
  .nt-icon { font-size: 42px; }
  .nt-actions { margin-left: 0; width: 100%; }
  .brain { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .bars { height: 160px; gap: 4px; }
  .bar-label { font-size: 10px; }
  .ws-grid, .prov-grid, .roles, .content-grid { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: 1fr; }
  .toast { bottom: calc(18px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; text-align: center; border-radius: 16px; }
  .viewing-as { border-radius: 14px; }
  .auth { padding: 16px; }
  .auth-card { padding: 24px; }
}
@media (max-width: 340px) {
  .stats { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
}
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 820px) {
  html, body { overflow-x: hidden; }
  .brain, .notion, .dash { grid-template-columns: minmax(0, 1fr); }
  .brain > *, .notion > *, .card, .board { min-width: 0; max-width: 100%; }
  .board, .board-5 { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .type-card span { white-space: normal; }
}
@media (max-width: 820px) {
  .app { align-content: start; grid-template-rows: auto 1fr; }
  .board.board-5 { grid-template-columns: repeat(5, 86vw); }
}
