/* ORGANIZER — one stylesheet, light + dark.
   Design: calm and precise. Cool off-white, black ink, hairline borders,
   one quiet color per workspace. Color means something (status, area); it is never decoration. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ── tokens ─────────────────────────────────────────── */
:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --surface-2: #f0f1f3;
  --border: #e3e5e8;
  --border-strong: #cfd2d7;
  --text: #15171a;
  --muted: #646a72;
  --faint: #9aa0a8;
  --accent: #15171a;          /* ink: primary buttons, focus, default rings */
  --on-accent: #ffffff;
  --accent-soft: #eceef1;
  --pos: #2f7a55;
  --neg: #b4432f;
  --warn: #a36a12;
  --a: #34557a;               /* partner 1 */
  --b: #8a4f63;               /* partner 2 */

  /* workspaces: muted, ink-friendly hues */
  --area-general: #5b6878;
  --area-content: #a14f62;
  --area-automation: #a36a1f;
  --area-cod: #3c7a5a;
  --ws-money: #2f7a55;
  --ws-review: #5a5a8a;
  --ws-calendar: #34557a;
  --ws: var(--text);          /* current workspace color (set per page below) */

  --plat-youtube: #b4432f;
  --plat-shorts: #b95c72;
  --plat-tiktok: #2c7480;
  --plat-instagram: #80558f;
  --plat-other: #858b93;

  --series-1: #2a78d6;        /* chart: income  (validated categorical slot 1) */
  --series-2: #eb6834;        /* chart: expenses (validated categorical slot 2) */
  --axis: #c3c2b7;
  --spark: #aab0b8;

  --shadow: none;
  --shadow-lift: 0 1px 2px rgba(27, 26, 23, .04), 0 8px 24px rgba(27, 26, 23, .07);
  --shadow-pop: 0 2px 6px rgba(27, 26, 23, .06), 0 24px 60px rgba(27, 26, 23, .16);
  --radius: 12px;
  --radius-sm: 8px;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: Geist, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012; --surface: #17181b; --surface-2: #1e2023; --border: #2a2c30; --border-strong: #383b40;
    --text: #eceef1; --muted: #989ea7; --faint: #686d75; --accent: #eceef1; --on-accent: #111214; --accent-soft: #25272b;
    --pos: #6cc093; --neg: #ea8270; --warn: #d9a557; --a: #86a8d4; --b: #d494aa;
    --area-general: #9aa6b5; --area-content: #dc8ea0; --area-automation: #d9a35c; --area-cod: #79bf98;
    --ws-money: #6cc093; --ws-review: #a6a6d8; --ws-calendar: #86a8d4;
    --plat-youtube: #ea8270; --plat-shorts: #e295a8; --plat-tiktok: #6fbcc7; --plat-instagram: #c19ad0; --plat-other: #a1a7af;
    --series-1: #3987e5; --series-2: #d95926; --axis: #383b40; --spark: #5a5f67;
    --shadow-lift: 0 10px 30px rgba(0, 0, 0, .35); --shadow-pop: 0 24px 70px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1012; --surface: #17181b; --surface-2: #1e2023; --border: #2a2c30; --border-strong: #383b40;
  --text: #eceef1; --muted: #989ea7; --faint: #686d75; --accent: #eceef1; --on-accent: #111214; --accent-soft: #25272b;
  --pos: #6cc093; --neg: #ea8270; --warn: #d9a557; --a: #86a8d4; --b: #d494aa;
  --area-general: #9aa6b5; --area-content: #dc8ea0; --area-automation: #d9a35c; --area-cod: #79bf98;
  --ws-money: #6cc093; --ws-review: #a6a6d8; --ws-calendar: #86a8d4;
  --plat-youtube: #ea8270; --plat-shorts: #e295a8; --plat-tiktok: #6fbcc7; --plat-instagram: #c19ad0; --plat-other: #a1a7af;
  --series-1: #3987e5; --series-2: #d95926; --axis: #383b40; --spark: #5a5f67;
  --shadow-lift: 0 10px 30px rgba(0, 0, 0, .35); --shadow-pop: 0 24px 70px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* each workspace has its own color (used sparingly: page mark, nav marker, rings) */
.main[data-page="tasks"], .main[data-page="goals"] { --ws: var(--area-general); }
.main[data-page="calendar"] { --ws: var(--ws-calendar); }
.main[data-page="content"] { --ws: var(--area-content); }
.main[data-page="automation"] { --ws: var(--area-automation); }
.main[data-page="money"] { --ws: var(--ws-money); }
.main[data-page="review"], .main[data-page="decisions"] { --ws: var(--ws-review); }

/* ── base ───────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.55 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: color-mix(in srgb, var(--text) 16%, transparent); }
a { color: var(--text); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
h2 { font-size: .95rem; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: .95rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icon { flex-shrink: 0; vertical-align: -2px; stroke-width: 1.7; }
.boot { padding: 2rem; color: var(--muted); }
.num, .kpi-val, .hero-num, .stat strong, .stage-cell strong, .ring-label, .count, .seg-count, .lead-value, .hbar-value, .big-num {
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
.center { text-align: center; }

/* ── layout ─────────────────────────────────────────── */
#app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.side {
  background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px; gap: 16px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .16em; padding: 0 6px; font-size: .78rem; }
.brand.big { font-size: 1rem; justify-content: center; }
.brand .theme-btn { margin-left: auto; }
.logo {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  color: var(--on-accent); background: var(--accent);
}
.logo .icon { stroke-width: 2.4; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 6px; }
.nav a {
  --c: var(--text);
  position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: .9rem; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.nav a.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 2px; border-radius: 0 2px 2px 0; background: var(--c);
}
.nav-icon { display: inline-grid; place-items: center; width: 18px; color: inherit; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 6px 0; border-top: 1px solid var(--border); }
.side-foot label { display: flex; align-items: center; gap: 8px; }
.side-foot select { flex: 1; }
.badge { font-size: .76rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.badge.ok { color: var(--pos); }
.badge.warn { color: var(--warn); }

.main { overflow-y: auto; }
.main:focus { outline: none; }
.view { padding: 40px 48px 80px; max-width: 1280px; margin: 0 auto; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view.no-anim { animation: none; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.page-head > div:first-child { position: relative; }
.page-head > div:first-child::before {
  content: ''; display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--ws); margin-bottom: 14px;
}
.page-head p { margin: 8px 0 0; font-size: .92rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar select { width: auto; }
.section-title { margin: 36px 0 14px; font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.footnote { margin-top: 18px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ── controls ───────────────────────────────────────── */
.btn {
  appearance: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: var(--radius-sm); font: inherit; font-weight: 500; font-size: .87rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { opacity: .88; background: var(--accent); }
.btn.danger { color: var(--neg); }
.btn.small { padding: 4px 10px; font-size: .78rem; border-radius: 7px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--muted);
  border-radius: 7px; width: 30px; height: 30px; cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.mini-btn {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1;
}
.mini-btn:hover { color: var(--text); border-color: var(--border-strong); }
input, select, textarea {
  font: inherit; font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 11px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
.page-actions input, .page-actions select { width: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent); }
.btn:focus-visible, .card:focus-visible, .check:focus-visible, .segmented button:focus-visible, .icon-btn:focus-visible,
.nav a:focus-visible, .filter-chip:focus-visible, .light:focus-visible, .search-btn:focus-visible {
  outline: 2px solid var(--text); outline-offset: 2px;
}
kbd {
  font: 500 .7rem/1 var(--sans); color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 5px; padding: 3px 5px; white-space: nowrap;
}

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); }
.segmented button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .83rem; font-weight: 500;
  padding: 5px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--border); }
.seg-count { font-size: .72rem; color: var(--faint); }
.segmented button.on .seg-count { color: var(--muted); }

/* ── cards, tags, avatars ───────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.card[tabindex] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.card[tabindex]:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift); }

/* tags: neutral pill, the color is only a small dot */
.tag {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 500; padding: 2px 8px 2px 7px;
  border-radius: 999px; color: var(--muted); background: transparent; border: 1px solid var(--border); white-space: nowrap;
}
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.tag .icon { display: none; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 450; color: var(--muted);
  background: transparent; padding: 1px 2px; border-radius: 4px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis;
}
.meta-pill .icon { color: var(--faint); }
.meta-pill.late, .meta-pill.late .icon { color: var(--neg); }
.meta-pill.today, .meta-pill.today .icon { color: var(--warn); }
.meta-pill.soon { color: var(--warn); }
.meta-pill.hi, .meta-pill.hi .icon { color: var(--neg); }
.meta-pill.pos { color: var(--pos); }
.meta-pill.goal { color: var(--muted); }
.pill-btn { border: 0; cursor: pointer; font: inherit; font-size: .74rem; }
.pill-btn:hover { color: var(--text); }

.avatar {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: .6rem; font-weight: 600; letter-spacing: .02em; color: #fff; background: var(--muted); flex-shrink: 0;
  border: 2px solid var(--surface);
}
.avatar.av-a { background: var(--a); }
.avatar.av-b { background: var(--b); }
:root[data-theme="dark"] .avatar.av-a, :root[data-theme="dark"] .avatar.av-b { color: #111214; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar.av-a, :root:not([data-theme="light"]) .avatar.av-b { color: #111214; } }
.avatar.none { background: var(--surface-2); color: var(--muted); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -7px; }

/* ── KPIs ───────────────────────────────────────────── */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin-bottom: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.kpis .kpi { border: 0; border-radius: 0; box-shadow: none; border-left: 1px solid var(--border); margin-left: -1px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 20px 22px; }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-top .muted.small { font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
.kpi-icon { display: none; }
.kpi-val { font-size: 1.9rem; font-weight: 500; letter-spacing: -.03em; margin-top: 10px; line-height: 1.1; }
.kpi-val.pos { color: var(--text); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 500; margin-top: 6px; }
.delta.good { color: var(--pos); }
.delta.bad { color: var(--neg); }
.delta.flat { color: var(--muted); }

/* ── boards (tasks + content pipeline + leads) ──────── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board.pipeline { grid-template-columns: repeat(6, minmax(220px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
.column {
  --c: var(--faint);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px;
  transition: border-color .15s, background .15s;
}
.column.drop-over { border-color: var(--c); border-style: dashed; background: color-mix(in srgb, var(--c) 6%, var(--surface-2)); }
.col-todo { --c: var(--faint); }
.col-doing { --c: var(--warn); }
.col-done { --c: var(--pos); }
.stage-idea { --c: #9d998f; } .stage-script { --c: #7f8a97; } .stage-voice { --c: #5f7f8a; }
.stage-edit { --c: var(--warn); } .stage-scheduled { --c: var(--area-content); } .stage-posted { --c: var(--pos); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; }
.col-head h2 { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.count { margin-left: auto; font-size: .76rem; font-weight: 500; color: var(--faint); }
.col-list { display: flex; flex-direction: column; gap: 8px; }
.col-empty { text-align: center; color: var(--faint); font-size: .8rem; padding: 20px 0; margin: 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.quick-add { background: transparent; border: 1px dashed var(--border-strong); font-size: .85rem; padding: 7px 10px; }
.quick-add:focus { border-style: solid; background: var(--surface); }
.dragging { opacity: .45; }

.task { padding: 12px 14px; position: relative; }
.task::before { content: ''; position: absolute; left: -1px; top: 14px; width: 2px; height: 14px; border-radius: 0 2px 2px 0; background: transparent; }
.task.pri-high::before { background: var(--neg); }
.task.pri-medium::before { background: var(--warn); }
.task.pri-low::before { background: transparent; }
.task-row { display: flex; gap: 10px; align-items: flex-start; }
.task-body { min-width: 0; flex: 1; }
.task-title { font-weight: 500; font-size: .9rem; overflow-wrap: anywhere; line-height: 1.4; }
.task-notes { margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task.done { opacity: .7; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; }
.task .task-meta .btn.small { padding: 2px 8px; }
.task-move { margin-left: auto; display: inline-flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.task:hover .task-move, .task:focus-within .task-move { opacity: 1; }
@media (hover: none) { .task-move { opacity: 1; } }
.check {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: transparent; cursor: pointer; margin-top: 1px; padding: 0; transition: all .15s;
}
.check:hover { border-color: var(--text); color: var(--muted); }
.check.on { background: var(--text); border-color: var(--text); color: var(--on-accent); }
.cl-mini { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; cursor: default; }
.cl-mini li { display: flex; align-items: center; gap: 8px; font-size: .84rem; }
.cl-mini input { width: auto; accent-color: var(--text); }
.cl-mini label.done { text-decoration: line-through; color: var(--muted); }
.cl-editor { display: flex; flex-direction: column; gap: 6px; }
.cl-list { display: flex; flex-direction: column; gap: 6px; }
.cl-row { display: flex; align-items: center; gap: 8px; }
.cl-row input[type=checkbox] { width: auto; accent-color: var(--text); }
.cl-row .cl-text { padding: 6px 9px; }
.cl-add { border-style: dashed; padding: 6px 9px; }
.search-input { width: 220px; }

/* ── goals ──────────────────────────────────────────── */
.ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.ring svg { position: absolute; inset: 0; }
.ring-fill { transition: stroke-dashoffset .6s ease; }
.ring-label { position: relative; font-weight: 500; font-size: .88rem; letter-spacing: -.01em; }
.goal-hero { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; padding: 22px 26px; }
.goal-hero .ring-label { font-size: 1.05rem; }
.hero-num { font-size: 2rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.hero-num.small-hero { font-size: 1.3rem; }
.hero-text { display: flex; flex-direction: column; gap: 6px; }
.hero-pace { display: flex; flex-wrap: wrap; gap: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.goal-card { --c: var(--accent); display: flex; flex-direction: column; gap: 14px; }
.goal-card.status-paused { opacity: .65; }
.goal-main { display: flex; gap: 16px; align-items: center; }
.goal-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.goal-info h3 { overflow-wrap: anywhere; font-size: 1rem; }
.goal-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.goal-num strong { font-size: 1.05rem; font-weight: 500; }
.goal-tasks { display: flex; flex-direction: column; gap: 5px; }
.goal-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.goal-trend { display: flex; align-items: center; gap: 12px; }
.goal-note { margin: 0; color: var(--muted); font-size: .88rem; padding-left: 10px; border-left: 2px solid var(--border); }
.clamp { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress { position: relative; height: 4px; background: var(--surface-2); border-radius: 999px; overflow: visible; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s ease; overflow: hidden; }
.progress-marker { position: absolute; top: -4px; bottom: -4px; width: 1.5px; margin-left: -.75px; background: var(--text); opacity: .45; }
.spark { overflow: visible; }
.spark-line { stroke: var(--spark); }
.spark-dot { stroke: var(--surface); }
.spark-hit { cursor: default; }

/* ── faceless content ───────────────────────────────── */
.content-card { --c: var(--plat-other); padding: 12px 14px; }
.content-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.plat { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.stars { margin-left: auto; color: var(--warn); font-size: .7rem; letter-spacing: 1px; }
.channel-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.channel-card { display: flex; flex-direction: column; gap: 12px; }
.channel-stats, .auto-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.channel-stats .stat + .stat, .auto-metrics .stat + .stat { border-left: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; background: transparent; border-radius: 0; padding: 9px 12px; min-width: 0; }
.stat strong { font-size: .95rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.big { gap: 2px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.stat.big strong { font-size: 1.25rem; white-space: normal; letter-spacing: -.02em; }

/* ── automation ─────────────────────────────────────── */
.auto-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.auto-card { display: flex; flex-direction: column; gap: 10px; }
.auto-card h3 { font-size: 1rem; overflow-wrap: anywhere; }
.auto-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.status-pill {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 500; padding: 2px 9px 2px 8px;
  border-radius: 999px; color: var(--muted); border: 1px solid var(--border);
}
.status-pill.st-idea { --c: var(--faint); }
.status-pill.st-building { --c: var(--ws-calendar); }
.status-pill.st-testing { --c: var(--warn); }
.status-pill.st-live { --c: var(--pos); color: var(--pos); border-color: color-mix(in srgb, var(--pos) 35%, var(--border)); }
.status-pill.st-paused { --c: var(--faint); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.st-live .pulse { animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 50%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.auto-card.st-paused { opacity: .65; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tool { font-size: .72rem; font-weight: 500; padding: 1px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.auto-summary { display: flex; align-items: center; gap: 14px; }

/* leads pipeline */
.lead-new { --c: #9d998f; } .lead-contacted { --c: #7f8a97; } .lead-call { --c: #5f7f8a; }
.lead-proposal { --c: var(--warn); } .lead-won { --c: var(--pos); } .lead-lost { --c: var(--faint); }
.lead-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.lead-card .task-meta { margin-top: 6px; }
.lead-value { font-size: .8rem; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.lead-next { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.lead-lost .lead-card { opacity: .65; }

/* ── money ──────────────────────────────────────────── */
.settle { margin-bottom: 20px; }
.settle h2 { margin-bottom: 6px; }
.settle p { margin: 4px 0; }
.big-num { font-size: 1.2rem; font-weight: 500; letter-spacing: -.02em; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-weight: 500; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.money-charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 20px; align-items: start; }
.chart-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chart-wrap { position: relative; }
.chart { display: block; max-width: 100%; overflow: visible; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.axis-line { stroke: var(--axis); stroke-width: 1; }
.tick { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.tick.strong { fill: var(--text); font-weight: 600; }
.bar.s1 { fill: var(--series-1); }
.bar.s2 { fill: var(--series-2); }
.hit { fill: transparent; transition: fill .12s; }
.hit.on { fill: var(--surface-2); }
.focus-target { cursor: crosshair; outline: none; }
.focus-target:focus-visible { stroke: var(--text); stroke-width: 2; }
.chart-tip {
  position: absolute; z-index: 5; min-width: 160px; pointer-events: none; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lift); font-size: .82rem;
}
.tip-title { font-weight: 600; margin-bottom: 6px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row strong { font-variant-numeric: tabular-nums; font-weight: 500; }
.tip-row.total { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.line-key { width: 12px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.line-key.s1 { background: var(--series-1); }
.line-key.s2 { background: var(--series-2); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 9px; height: 9px; border-radius: 2px; }
.swatch.s1 { background: var(--series-1); }
.swatch.s2 { background: var(--series-2); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: .84rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; display: block; }
.hbar-fill { display: block; height: 100%; border-radius: 0 3px 3px 0; }
.hbar-fill.s2 { background: var(--series-2); }
.hbar-value { font-weight: 500; color: var(--text); }
.partner-balance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.pb { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.pb-name { font-weight: 500; }

/* ── decisions ──────────────────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.decision h3 { margin: 4px 0 6px; font-weight: 600; font-size: 1.05rem; letter-spacing: -.015em; }
.decision p { margin: 0; white-space: pre-wrap; }

/* ── dashboard ──────────────────────────────────────── */
.dash { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head h2 { font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.section-head a { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: .8rem; color: var(--muted); }
.section-head a:hover { color: var(--text); }
.section .task, .section .card { box-shadow: none; }
.mini-goal { display: flex; flex-direction: column; gap: 7px; color: var(--text); }
.mini-goal-head { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.mini-goal-head > span:last-child { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row-between > span:last-child { white-space: nowrap; }
.row-end { display: flex; justify-content: flex-end; margin-top: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settle-line { margin: 0; }
.stage-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.stage-cell {
  display: flex; flex-direction: column; align-items: flex-start; padding: 9px 8px 8px; gap: 2px; min-width: 0;
  background: transparent; color: var(--text); border-left: 1px solid var(--border); margin-left: -1px;
}
.stage-cell strong { font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; }
.stage-cell span { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.stage-cell span { font-size: .64rem; gap: 4px; }
.stage-cell span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.today-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 20px; padding: 12px 18px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.today-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: 4px; }
.today-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: .85rem; font-weight: 450;
  color: var(--muted); background: transparent; border: 0;
}
.today-chip .icon { color: var(--faint); }
.today-chip.late, .today-chip.late .icon { color: var(--neg); }
.today-cal { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--muted); }
.today-cal:hover { color: var(--text); }
.focus-show { margin: 0; padding-left: 0; list-style: none; counter-reset: f; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.focus-show li { counter-increment: f; display: flex; gap: 12px; align-items: baseline; }
.focus-show li::before { content: counter(f, decimal-leading-zero); font-family: var(--mono); font-size: .72rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.nudge { align-self: flex-start; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; }
.feed-body { min-width: 0; font-size: .86rem; }
.feed-body a { color: var(--text); overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.feed-body a:hover { text-decoration-color: var(--text); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.mini-stats .stat { border-left: 1px solid var(--border); margin-left: -1px; }
.mini-stats .stat strong { white-space: normal; }

/* ── empty / error ──────────────────────────────────── */
.empty { text-align: center; padding: 48px 16px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); margin-top: 14px; }
.empty p { margin: 0 0 14px; }
.empty.error { color: var(--neg); }

/* ── modal ──────────────────────────────────────────── */
.modal {
  border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
.modal[open] { animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.modal::backdrop { background: rgba(18, 18, 16, .38); backdrop-filter: blur(3px); }
.modal form { padding: 26px; display: flex; flex-wrap: wrap; gap: 14px; }
.modal h2 { width: 100%; font-size: 1.25rem; font-weight: 600; letter-spacing: -.025em; margin-bottom: 4px; }
.field { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.field.half { width: calc(50% - 7px); }
.field label { font-size: .76rem; font-weight: 500; color: var(--muted); }
.modal-actions { width: 100%; display: flex; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── login ──────────────────────────────────────────── */
.login { grid-column: 1 / -1; display: grid; place-items: center; padding: 16px; min-height: 100vh; }
.login-card {
  width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; display: flex; flex-direction: column; gap: 14px; text-align: center; box-shadow: var(--shadow-lift);
}

/* ── toasts ─────────────────────────────────────────── */
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: .86rem; max-width: 340px;
  box-shadow: var(--shadow-pop); animation: pop .16s ease;
}
.toast.ok::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); flex-shrink: 0; }
.toast.error { background: var(--neg); color: #fff; }
.toast-action {
  border: 0; background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; font: inherit; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
}
.toast-action:hover { background: color-mix(in srgb, currentColor 26%, transparent); }

/* ── sidebar search ─────────────────────────────────── */
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--faint); font: inherit; font-size: .86rem;
}
.search-btn:hover { color: var(--muted); border-color: var(--border-strong); }
.search-btn kbd { margin-left: auto; }
.side-foot a.badge { text-decoration: none; }

/* ── calendar ───────────────────────────────────────── */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-month { min-width: 150px; text-align: center; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 500;
}
.filter-chip:hover { color: var(--text); }
.filter-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.cal-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.cal-card { padding: 0; overflow: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
.cal-wd { font-size: .68rem; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; padding: 10px 10px 8px; border-bottom: 1px solid var(--border); }
.cal-cell {
  min-height: 104px; padding: 8px; background: var(--surface); cursor: pointer; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; transition: background .12s; position: relative;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: var(--bg); }
.cal-cell.other .cal-day { color: var(--faint); }
.cal-cell.selected { box-shadow: inset 0 0 0 1.5px var(--text); }
.cal-cell.today .cal-day { background: var(--text); color: var(--bg); }
.cal-day { align-self: flex-start; font-size: .76rem; font-weight: 500; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-chip {
  --c: var(--accent); display: flex; align-items: center; gap: 5px; min-width: 0; text-align: left; font: inherit; font-size: .72rem; font-weight: 450; cursor: pointer;
  border: 0; border-radius: 4px; padding: 1px 4px; color: var(--text); background: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.cal-chip:hover { background: var(--surface-2); }
.cal-chip.done { opacity: .5; text-decoration: line-through; }
.cal-more { font-size: .7rem; color: var(--muted); padding-left: 4px; }
.cal-dots { display: none; gap: 3px; }
.cal-dots span { width: 5px; height: 5px; border-radius: 50%; }
.agenda { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.agenda-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.agenda-item { --c: var(--accent); display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: var(--radius-sm); }
.agenda-item + .agenda-item { border-top: 1px solid var(--border); }
.agenda-item.done .agenda-title { text-decoration: line-through; color: var(--muted); }
.agenda-icon { color: var(--c); display: inline-grid; }
.agenda-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.agenda-main.static { cursor: default; }
.agenda-title { font-weight: 500; font-size: .88rem; overflow-wrap: anywhere; }

/* ── weekly review ──────────────────────────────────── */
.review { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.review-step { display: flex; flex-direction: column; gap: 14px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-head p { margin: 2px 0 0; }
.step-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; font-size: .8rem;
  color: var(--muted); background: transparent; border: 1px solid var(--border-strong); font-variant-numeric: tabular-nums;
}
.checkins { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkin { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.checkin-who { display: flex; align-items: center; gap: 8px; }
.lights { display: flex; gap: 6px; flex-wrap: wrap; }
.light {
  --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: inherit; font-size: .8rem; font-weight: 500;
}
.light::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.light .icon { display: none; }
.light:hover { color: var(--text); }
.light.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.week-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.review-texts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.review-texts .field label { font-size: .8rem; font-weight: 600; color: var(--text); }
.focus-list { display: flex; flex-direction: column; gap: 8px; }
.focus-item { display: flex; align-items: center; gap: 10px; }
.focus-num { flex-shrink: 0; width: 24px; font-weight: 500; font-size: .78rem; color: var(--faint); font-variant-numeric: tabular-nums; text-align: center; }
.sub-title { font-size: .9rem; margin: 6px 0 0; }
.action-add { display: grid; grid-template-columns: 1fr 150px 150px auto; gap: 8px; }

/* ── settings ───────────────────────────────────────── */
.settings-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; max-width: 900px; }
.settings-section p { margin: 0; }
.settings-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.steps { margin: 4px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.install-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.shortcuts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; align-items: center; }
.shortcuts dd { margin: 0; color: var(--muted); font-size: .88rem; }

/* ── command palette ────────────────────────────────── */
.palette {
  width: min(620px, calc(100vw - 24px)); max-height: min(540px, calc(100vh - 80px)); margin: 14vh auto auto; padding: 0;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column;
}
.palette:not([open]) { display: none; }
.palette::backdrop { background: rgba(18, 18, 16, .32); backdrop-filter: blur(3px); }
.palette[open] { animation: pop .14s ease; }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--faint); }
.pal-input { border: 0; padding: 4px 0; font-size: 1rem; background: transparent; box-shadow: none !important; }
.pal-input:focus { outline: none; }
.pal-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.pal-list ul { list-style: none; margin: 0; padding: 0; }
.pal-group + .pal-group { margin-top: 6px; }
.pal-group-name { font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 8px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.pal-item[aria-selected="true"] { background: var(--surface-2); }
.pal-item[aria-selected="true"] .pal-icon { color: var(--text); }
.pal-icon { display: inline-grid; color: var(--faint); }
.pal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pal-title { font-weight: 500; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sub { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-type { font-size: .7rem; color: var(--faint); font-weight: 500; }
.pal-empty { padding: 16px; text-align: center; }
.pal-foot { display: flex; gap: 16px; padding: 9px 18px; border-top: 1px solid var(--border); background: var(--bg); }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
  .agenda { position: static; }
  .money-charts { grid-template-columns: 1fr; }
  .view { padding: 32px 28px 72px; }
}
@media (max-width: 900px) {
  #app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100vh; }
  .side {
    flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 8px;
    border-right: 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  }
  .side .side-foot { display: none; }   /* moved to Settings → This device on phones */
  .brand { flex: 0 0 auto; }
  .search-btn { order: 2; width: auto; flex: 1; min-width: 120px; }
  .search-btn kbd { display: none; }
  .nav { flex-direction: row; overflow-x: auto; width: 100%; order: 3; scrollbar-width: none; gap: 2px; margin: 0 -14px; padding: 0 14px; width: calc(100% + 28px); }
  .nav::-webkit-scrollbar { display: none; }
  .nav-group { display: none; }
  .nav a { padding: 6px 10px; white-space: nowrap; }
  .nav a.active::before { left: 10px; right: 10px; top: auto; bottom: -1px; width: auto; height: 2px; border-radius: 2px; }
  .main { overflow: visible; }
  .view { padding: 24px 16px 56px; }
  .page-head { margin-bottom: 20px; padding-bottom: 16px; }
  .board, .dash { grid-template-columns: 1fr; }
  .board.pipeline { grid-template-columns: repeat(6, 78vw); scroll-snap-type: x mandatory; }
  .board.pipeline .column { scroll-snap-align: start; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi { border-top: 1px solid var(--border); margin-top: -1px; }
  .kpi { padding: 14px 16px; }
  .kpi-val { font-size: 1.3rem; }
  .field.half { width: 100%; }
  .grid, .auto-grid, .channel-grid { grid-template-columns: 1fr; }
  .goal-hero { padding: 16px; gap: 14px; }
  .hero-num { font-size: 1.5rem; }
  h1 { font-size: 1.75rem; }
  .review-texts, .checkins { grid-template-columns: 1fr; }
  .action-add { grid-template-columns: 1fr 1fr; }
  .action-add input[type=text] { grid-column: 1 / -1; }
  .search-input { width: 100%; }
  .cal-cell { min-height: 54px; padding: 4px; }
  .cal-items { display: none; }
  .cal-dots { display: flex; flex-wrap: wrap; }
  .cal-wd { padding: 6px 2px; font-size: .6rem; text-align: center; }
  .cal-day { align-self: center; }
  .cal-month { min-width: 0; }
  .today-cal { margin-left: 0; }
  .partner-balance { grid-template-columns: 1fr; }
  .stage-strip { grid-template-columns: repeat(3, 1fr); }
  .stage-cell { border-top: 1px solid var(--border); margin-top: -1px; }
  .palette { margin-top: 8vh; }
  .pal-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
