/* слой app: все стили интерфейса. Архив потока (arch.css и стили дашборда) — вне слоя и поэтому сильнее; внутри архива стили интерфейса сброшены */
@layer app {
@font-face { font-family: 'Roboto Mono'; font-weight: 100 700; font-display: swap; src: url(fonts/roboto-mono-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: 'Roboto Mono'; font-weight: 100 700; font-display: swap; src: url(fonts/roboto-mono-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: Advent; font-weight: 700; font-display: swap; src: url(fonts/advent-pro-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Advent; font-weight: 700; font-display: swap; src: url(fonts/advent-pro-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 500; font-display: swap; src: url(fonts/golos-text-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Golos; font-weight: 500; font-display: swap; src: url(fonts/golos-text-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format('woff2'); }

:root {
  --bg: #e6e0d9;
  --frame: #f3efec;
  --card: #ffffff;
  --card-solid: #ffffff;
  --sunk-solid: #f4f0ec;
  --sunk: #f1ece6;
  --chip: #ebe5df;
  --ink: #211f20;
  --ink-2: #3d393a;
  --muted: #7a7472;
  --line: #e4ded8;
  --on-ink: #f3efec;
  --accent: #6a5ac7;
  --accent-2: #8577de;
  --accent-deep: #5a49bd;
  --accent-soft: #ece9fb;
  --acc-txt: #5a49bd;
  --logo-body: #5a49bd;
  --hi: #dafe04;
  --hi-ink: #1b1d05;
  --pos: #2f8f5b;
  --neg: #d4473a;
  --shadow: 0 1px 2px rgb(33 31 32 / .04), 0 8px 24px -12px rgb(33 31 32 / .12);
  --glow: 0 14px 30px -16px rgb(106 90 199 / .75);
  --r-frame: 28px;
  --r-card: 20px;
  --r-in: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gap: 16px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1a181a;
  --frame: #211f20;
  --card: #2a282a;
  --card-solid: #2a282a;
  --sunk-solid: #312e31;
  --sunk: #312e31;
  --chip: #383538;
  --ink: #f3efec;
  --ink-2: #d6d0cd;
  --muted: #9d979a;
  --line: #3a373a;
  --on-ink: #211f20;
  --accent: #7767fc;
  --accent-2: #8577de;
  --accent-deep: #6a5ac7;
  --accent-soft: #34304a;
  --acc-txt: #b3a8ff;
  --logo-body: #8577de;
  --pos: #5fd39a;
  --neg: #ff7d6e;
  --shadow: 0 1px 0 rgb(243 239 236 / .04) inset, 0 10px 26px -14px rgb(0 0 0 / .55);
  --glow: 0 14px 30px -16px rgb(119 103 252 / .7);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 14px/1.45 Golos, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { display: block; flex: none; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- каркас ---------- */
.app {
  max-width: 1480px;
  margin: 0 auto;
  background: var(--frame);
  border-radius: var(--r-frame);
  padding: 18px 22px 26px 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 22px;
  row-gap: 22px;
  min-height: calc(100dvh - 40px);
}
.top { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.pill { background: var(--card); border-radius: 999px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 9px; height: 48px; padding: 0 14px 0 12px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 30px; height: 28px; flex: none; overflow: visible; }
.brand__body { fill: var(--logo-body); transition: fill .3s; }
.brand__star { fill: #f5b700; filter: drop-shadow(0 0 3px rgb(245 183 0 / .75)); }
.brand__word { font: 700 22px/1 Advent, 'Advent Pro', Golos, sans-serif; letter-spacing: .01em; transform: translateY(-1px); transition: color .2s; }
.brand:hover .brand__word { color: var(--acc-txt); }
.brand__crm { display: inline-grid; place-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--chip); color: var(--muted); font: 600 10.5px/1 Golos, system-ui, sans-serif; letter-spacing: .08em; }

.nav { justify-self: center; position: relative; display: flex; gap: 2px; padding: 5px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__ind { position: absolute; top: 5px; left: 0; height: calc(100% - 10px); border-radius: 999px; background: var(--ink); transition: transform .45s var(--ease), width .45s var(--ease); will-change: transform; }
.nav a { position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; transition: color .3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--on-ink); }

.actions { display: flex; align-items: center; gap: 10px; }
.icons { display: flex; padding: 4px; gap: 2px; }
.ibtn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); position: relative; transition: background .2s, color .2s; }
.ibtn:hover { background: var(--chip); color: var(--ink); }
.ibtn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card-solid); }
.me { display: flex; align-items: center; gap: 10px; padding: 5px 18px 5px 5px; min-width: 0; }
.me__ava { width: 34px; height: 34px; border-radius: 50%; background: var(--hi); display: grid; place-items: center; color: var(--hi-ink); font-weight: 600; font-size: 13px; }
.me b { display: block; font-weight: 600; font-size: 13px; line-height: 1.2; }
.me div span { display: block; line-height: 1.2; }
.me__role { display: inline-block !important; margin-top: 3px; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--acc-txt); font: 600 10.5px/1.3 Golos, system-ui, sans-serif; letter-spacing: .02em; }
.me b { white-space: nowrap; }

.rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; align-self: start; }
.rail__group { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); position: relative; }
.rail__group .ibtn { width: 40px; height: 40px; }
.rail__group .ibtn[aria-current="page"] { color: var(--on-ink); }
.rail__ind { position: absolute; left: 6px; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); transition: transform .45s var(--ease), opacity .3s; pointer-events: none; }
.rail__group .ibtn { z-index: 1; }
[data-set-theme][aria-pressed="true"] { color: var(--on-ink); }
[data-set-theme][aria-pressed="true"]:hover { background: none; color: var(--on-ink); }

main { min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.head p { color: var(--muted); margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag--acc { background: var(--accent-soft); color: var(--acc-txt); }

/* ---------- сетка и карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: 1 / -1; }
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow); min-width: 0; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card--lift:hover { transform: translateY(-3px); }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 28px; }
.card__h { flex-wrap: wrap; }
.card__h h3 { text-wrap: balance; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card__sub { color: var(--muted); font-size: 12.5px; margin-top: -10px; margin-bottom: 14px; }
.lbl { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.big { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.mid { font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.delta em { font-style: normal; }
.delta i { font-style: normal; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.delta .up { color: var(--pos); background: color-mix(in srgb, var(--pos) 12%, transparent); }
.delta .dn { color: var(--neg); background: color-mix(in srgb, var(--neg) 12%, transparent); }

a.btn, a.tag { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: transform .2s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ghost { background: var(--chip); color: var(--ink); }
.btn--ghost:hover { background: var(--line); }
.btn--white { background: var(--hi); color: var(--hi-ink); }
.btn--white:hover { filter: brightness(1.05); }
.btn--sm { height: 28px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn .ico { width: 16px; height: 16px; }
.btn--sm .ico { width: 14px; height: 14px; }

/* выручка */
.rev__row { display: flex; gap: 8px; margin: 16px 0; }
.rev__row .btn { flex: 1; }
.mini { background: var(--sunk); border-radius: var(--r-in); padding: 12px; }
.mini__h { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mini__h b { color: var(--ink); font-weight: 600; }
.fmts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fmt { container-type: inline-size; background: var(--card); border-radius: 12px; padding: 10px; min-width: 0; }
.fmt__n { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.fmt__n i { width: 8px; height: 8px; border-radius: 50%; }
.fmt__v { font-weight: 600; margin-top: 8px; font-size: clamp(11px, 15cqi, 14px); white-space: nowrap; }
.fmt__s { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* kpi 2x2 */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; }
.kpi { container-type: inline-size; background: var(--sunk); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; transition: transform .35s var(--ease); }
.kpi:hover { transform: translateY(-3px); }
.kpi__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi__ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--ink-2); }
.kpi__ico .ico { width: 15px; height: 15px; }
.kpi--acc { background: var(--hi); color: var(--hi-ink); box-shadow: 0 14px 30px -18px rgb(160 190 0 / .7); }
.kpi--acc .lbl, .kpi--acc .delta { color: rgb(27 29 5 / .7); }
.kpi--acc .kpi__ico { background: rgb(27 29 5 / .1); color: var(--hi-ink); }
.kpi--acc .delta .up { color: #fff; background: rgb(255 255 255 / .2); }

/* график */
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.chart { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 6px; height: 210px; }
.chart__y { display: flex; flex-direction: column; justify-content: space-between; font-size: 10.5px; color: var(--muted); text-align: right; padding-bottom: 20px; }
.chart__plot { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; padding-bottom: 20px; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 100%) 0 0 / 100% 25%; background-size: 100% calc((100% - 20px) / 4); background-repeat: repeat-y; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.bar__x { position: absolute; bottom: -20px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.seg { width: min(100%, 26px); border-radius: 8px; transform-origin: bottom; }
.seg--paid { background: var(--ink); }
.seg--lead { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, color-mix(in srgb, var(--accent) 45%, transparent) 3px 6px); }
.bar:hover .seg { filter: brightness(1.08); }
.tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--on-ink); font-size: 12px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; opacity: 0; transform: translate(-50%, -6px); transition: opacity .15s; }
.tip b { font-weight: 600; }

/* план */
.plan__bar { position: relative; height: 12px; border-radius: 99px; overflow: hidden; margin: 16px 0 10px; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.plan__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); transform-origin: left; }
.plan__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.plan__meta b { color: var(--ink); font-weight: 600; }

/* источники */
.src__bar { display: flex; height: 36px; gap: 4px; margin: 4px 0 16px; }
.src__bar i { border-radius: 8px; transform-origin: left; min-width: 6px; }
.src__list { display: grid; gap: 10px; }
.src__row { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; }
.src__row i { width: 10px; height: 10px; border-radius: 3px; }
.src__row b { font-weight: 600; }
.src__row span:last-child { color: var(--muted); width: 38px; text-align: right; }

/* воронка */
.funnel-wrap { container-type: inline-size; }
.funnel__r em { font-style: normal; }
.funnel { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) minmax(96px, 120px); row-gap: 0; align-items: stretch; }
.funnel__l, .funnel__r { display: flex; flex-direction: column; justify-content: center; height: 54px; }
.funnel__l b { font-weight: 600; font-size: 13.5px; }
.funnel__l span, .funnel__r span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.funnel__l, .funnel__r { min-width: 0; }
.funnel__r { align-items: flex-end; }
.funnel__r b { font-weight: 600; font-size: 16px; }
.funnel__m { height: 54px; display: flex; justify-content: center; }
.funnel__seg { height: 100%; transform-origin: center; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 12.5px; transition: filter .2s; }
.funnel__m:hover .funnel__seg { filter: brightness(1.07); }
.funnel--big .funnel__l, .funnel--big .funnel__r, .funnel--big .funnel__m { height: 68px; }
.funnel__drop { grid-column: 1 / -1; }

.conv { display: grid; gap: 14px; }
.conv__row { display: grid; grid-template-columns: 64px 1fr 48px; gap: 12px; align-items: center; }
.conv__row b { font-weight: 600; }
.conv__track { height: 10px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.conv__track i { display: block; height: 100%; border-radius: 99px; transform-origin: left; }
.conv__row span { text-align: right; font-weight: 600; }

.stat3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat3 > div { background: var(--sunk); border-radius: var(--r-in); padding: 14px; min-width: 0; }
.stat3 .mid { font-size: 22px; margin-top: 8px; }

/* таблица */
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--sunk); color: var(--muted); min-width: 0; }
.search input { border: 0; outline: 0; background: none; width: 160px; min-width: 0; color: var(--ink); }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.tbl-wrap { overflow-x: auto; padding: 0 0 8px; scrollbar-width: thin; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; background: var(--sunk); white-space: nowrap; }
th:first-child { border-radius: 12px 0 0 12px; } th:last-child { border-radius: 0 12px 12px 0; }
td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13px; }
tbody tr { transition: background .15s; }
tbody tr.clickable { cursor: pointer; }
tbody tr:hover td { background: var(--sunk); }
tbody tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.ava { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; flex: none; }
.st { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; color: var(--ink); background: color-mix(in srgb, var(--c) 16%, transparent); }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.fmt-chip { padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-bottom: 14px; }
.chips button { display: inline-flex; gap: 6px; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--sunk); font-weight: 500; font-size: 12.5px; white-space: nowrap; transition: background .2s, color .2s; }
.chips button span { color: var(--muted); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.chips button[aria-pressed="true"] span { color: inherit; opacity: .6; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* мероприятия */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 85% 0%, #a99dff 0%, transparent 55%), linear-gradient(135deg, #8577de 0%, #6a5ac7 50%, #4c3da8 100%); box-shadow: var(--glow); }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 80% at 10% 120%, rgb(0 0 0 / .18), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero .tag { background: rgb(255 255 255 / .18); color: #fff; }
.hero__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: rgb(255 255 255 / .82); }
.hero__num { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 14px; }
.hero__num .big { font-size: clamp(44px, 5vw, 64px); }
.hero__num span { color: rgb(255 255 255 / .82); font-weight: 500; }
.hero__track { height: 10px; border-radius: 99px; background: repeating-linear-gradient(135deg, rgb(255 255 255 / .35) 0 2px, transparent 2px 6px); overflow: hidden; }
.hero__track i { display: block; height: 100%; background: var(--hi); border-radius: 99px; transform-origin: left; }
.hero__meta { display: flex; justify-content: space-between; font-size: 12px; color: rgb(255 255 255 / .82); margin: 8px 0 20px; gap: 12px; }
.hero__cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: rgb(255 255 255 / .82); }
.seg-ctl { display: inline-flex; padding: 3px; background: var(--sunk); border-radius: 999px; gap: 2px; margin-bottom: 14px; }
.seg-ctl button { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: background .2s, color .2s; }
.seg-ctl button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.checks { display: grid; gap: 12px; }
.checks li { display: flex; gap: 10px; align-items: center; list-style: none; font-size: 13px; }
.checks li i { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--acc-txt); display: grid; place-items: center; flex: none; }
.checks li i .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.checks { padding: 0; }
.ev-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ev { background: var(--sunk); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: transform .35s var(--ease), background .2s; border: 1px solid transparent; }
.ev:hover { transform: translateY(-3px); }
.ev.is-on { border-color: var(--accent); background: var(--accent-soft); }
.ev__ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--acc-txt); }
.ev b { font-weight: 600; }
.ev p { font-size: 12px; color: var(--muted); flex: 1; }
.ev__f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.hist { display: grid; gap: 4px; }
.hist__row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist__row:last-child { border-bottom: 0; }
.hist__row .ev__ico { width: 32px; height: 32px; background: var(--accent-soft); }
.hist__row b { font-weight: 500; font-size: 13px; display: block; }
.hist__row small { color: var(--muted); font-size: 11.5px; }
.hist__row > span { font-weight: 600; font-size: 13px; }

/* панель заявки */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer__bg { position: absolute; inset: 0; background: rgb(0 0 0 / .25); opacity: 0; transition: opacity .35s var(--ease); }
.drawer__p { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100% - 24px)); background: var(--card); border-radius: 24px; padding: 22px; transform: translateX(calc(100% + 24px)); transition: transform .5s var(--ease); overflow-y: auto; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .35); }
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer.is-open .drawer__p { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.drawer:not(.is-open) .drawer__p { visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; box-shadow: none; }
.drawer__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.drawer__h h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 13px; margin-bottom: 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.steps { display: grid; gap: 0; padding: 0; }
.steps li { list-style: none; display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding-bottom: 14px; position: relative; font-size: 13px; }
.steps li::before { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps i { width: 20px; height: 20px; border-radius: 50%; background: var(--chip); border: 5px solid var(--card); box-shadow: 0 0 0 1px var(--line); position: relative; z-index: 1; }
.steps li.done i { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.steps small { color: var(--muted); }

/* ---------- движение ---------- */
.rise { opacity: 0; transform: translateY(14px) scale(.985); }
.is-in .rise { animation: rise .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.grow { transform: scaleY(0); }
.is-in .grow { animation: growY .9s var(--ease) forwards; animation-delay: calc(250ms + var(--i, 0) * 45ms); }
@keyframes growY { to { transform: none; } }
.growx { transform: scaleX(0); }
.is-in .growx { animation: growX 1s var(--ease) forwards; animation-delay: calc(250ms + var(--i, 0) * 70ms); }
@keyframes growX { to { transform: none; } }
.view.is-out { opacity: 0; transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1279px) {
  .t6 { grid-column: span 6; } .t12 { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .top { grid-template-columns: auto 1fr; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .actions { justify-self: end; }
  .ev-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  body { padding: 10px; }
  .app { grid-template-columns: minmax(0, 1fr); padding: 14px; border-radius: 22px; min-height: calc(100dvh - 20px); }
  .rail { position: static; flex-direction: row; justify-content: space-between; grid-row: 3; display: none; }
  .grid > * { grid-column: 1 / -1; }
  .me div { display: none; }
  .me { padding: 5px; }
  .funnel { grid-template-columns: minmax(96px, 120px) minmax(0, 1fr) minmax(70px, 84px); }
}
@media (max-width: 560px) {
  .icons .ibtn:not(.theme-m) { display: none; }
  .brand__crm { display: none; }
  .ev-list, .stat3 { grid-template-columns: 1fr; }
  .fmts { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .fmt { padding: 8px; }
  .funnel__seg { font-size: 11px; }
  .funnel__l b { font-size: 12.5px; }
  .kv { grid-template-columns: 100px 1fr; }
}
.theme-m { display: none !important; }
@media (max-width: 860px) { .theme-m { display: grid !important; } }

@container (max-width: 170px) { .delta em { display: none; } }
@container (max-width: 680px) {
  .funnel { grid-template-columns: minmax(104px, 128px) minmax(0, 1fr) 52px; }
  .funnel__l span, .funnel__r em { display: none; }
  .funnel__l { padding-right: 8px; }
}

/* =========================================================
   CRM: общие элементы
   ========================================================= */
.dim { color: var(--muted); }
.small { font-size: 12.5px; }
.fw5 { font-weight: 500; }
.danger { color: var(--neg) !important; }
.late { color: var(--neg); font-weight: 600; }
.mid-of { font-size: 15px; font-weight: 500; letter-spacing: 0; }
.ico--xs { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.ico--lg { width: 24px; height: 24px; }
.ico--xl { width: 30px; height: 30px; stroke-width: 1.4; }
.stack { display: grid; gap: var(--gap); align-content: start; }
.view.no-anim .rise, .view.no-anim .grow, .view.no-anim .growx { opacity: 1; transform: none; animation: none; }
.view.is-out { opacity: 0; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease; }

.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--hi); color: var(--hi-ink); font-size: 10.5px; font-weight: 600; font-style: normal; line-height: 1; vertical-align: 1px; }
.nav a { display: inline-flex; align-items: center; }
.rail__group .ibtn .dot { top: 7px; right: 7px; background: var(--hi); box-shadow: 0 0 0 2px var(--card-solid); }
.rail__group .ibtn[aria-current] { color: var(--on-ink); }
.me[aria-current] { box-shadow: 0 0 0 2px var(--accent); }
.me { text-decoration: none; color: inherit; transition: box-shadow .2s; }
img.me__ava { object-fit: cover; }
.ava { width: var(--s, 28px); height: var(--s, 28px); font-size: calc(var(--s, 28px) * .38); border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; flex: none; object-fit: cover; }
.ava--none { background: var(--chip); color: var(--muted); }
.avas { display: inline-flex; }
.avas .ava + .ava { margin-left: -8px; box-shadow: 0 0 0 2px var(--card-solid); }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.btn--text { background: none; color: var(--acc-txt); padding: 0 8px; height: 32px; }
.btn--text:hover { background: var(--sunk); }
.btn--danger { background: var(--neg); color: #fff; }
.btn--block { width: 100%; margin-top: 14px; }
.btn--lg { height: 38px; font-size: 13.5px; margin-top: 6px; }
.btn--glass { background: rgb(255 255 255 / .16); color: #fff; }
.btn--glass:hover { background: rgb(255 255 255 / .24); }
.btn[disabled], .ibtn[disabled] { opacity: .35; pointer-events: none; }
.ibtn--sm { width: 30px; height: 30px; }
.ibtn--sm .ico { width: 16px; height: 16px; }
a.ibtn { text-decoration: none; }

.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); background: var(--sunk); border-radius: 12px; padding: 10px 12px; margin: 12px 0 14px; }
.hint .ico { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--acc-txt); }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 16px; color: var(--muted); }
.empty b { color: var(--ink); font-weight: 600; font-size: 15px; }
.empty .ico { color: var(--accent); margin-bottom: 6px; }
.empty .btn { margin-top: 8px; }
.empty--sm { padding: 28px 12px; }

/* выпадающие списки */
.sel { position: relative; display: inline-flex; align-items: center; }
.sel select { appearance: none; -webkit-appearance: none; height: 32px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 500 12.5px/1 Golos, system-ui, sans-serif; cursor: pointer; max-width: 100%; transition: border-color .2s, background .2s; }
.sel::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sel select:hover { border-color: var(--muted); }
.sel select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sel--st select { --c: var(--muted); border-color: transparent; background: color-mix(in srgb, var(--c) 16%, transparent); padding-left: 24px; }
.sel--st::before { content: ''; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--c); pointer-events: none; }
.sel--full, .sel--full select { width: 100%; }
.sel--full select { height: 40px; border-radius: 12px; font-size: 14px; }
.sel--f { gap: 0; }
.sel--f { flex-direction: column; align-items: stretch; }
.sel--f span { font-size: 11px; color: var(--muted); margin: 0 0 4px 12px; pointer-events: none; }
.sel--f::after { top: auto; bottom: 15px; transform: rotate(45deg); }
.fbar { align-items: flex-end; }
.sel--f select { height: 38px; min-width: 150px; font-size: 13px; }

/* =========================================================
   Заявки
   ========================================================= */
.fbar { display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center; margin-top: 4px; }
.fbar__n { font-size: 12.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.search--wide { flex: 1 1 260px; height: 38px; }
.search--wide input { width: 100%; }
.search--big { height: 46px; font-size: 15px; margin-bottom: 8px; }
.chips button span { margin-left: 2px; }
.ltable { min-width: 1280px; }
.ltable--mini { min-width: 640px; }
.ltable td { vertical-align: middle; }
.ltable td.wrap { white-space: normal; min-width: 180px; max-width: 260px; font-size: 12.5px; line-height: 1.35; }
.ltable td.end, .ltable th.end { position: sticky; right: 0; z-index: 2; background: var(--card-solid); width: 48px; padding: 0 8px; text-align: center; }
.ltable th.end { background: var(--sunk-solid); }
.tbl-wrap.can-r .ltable td.end, .tbl-wrap.can-r .ltable th.end { box-shadow: -10px 0 14px -10px rgb(33 31 32 / .25); }
.tbl-wrap.can-l .ltable .sticky { box-shadow: 10px 0 14px -10px rgb(33 31 32 / .25); }
:root[data-theme="dark"] .tbl-wrap.can-r .ltable td.end, :root[data-theme="dark"] .tbl-wrap.can-r .ltable th.end { box-shadow: -10px 0 14px -10px rgb(0 0 0 / .7); }
:root[data-theme="dark"] .tbl-wrap.can-l .ltable .sticky { box-shadow: 10px 0 14px -10px rgb(0 0 0 / .7); }
.ltable .sticky { position: sticky; left: 0; z-index: 2; background: var(--card-solid); transition: box-shadow .2s; }
.ltable thead .sticky { background: var(--sunk-solid); }
.ltable tr:hover td.sticky, .ltable tr:hover td.end { background: var(--sunk-solid); }
.ltable tr.is-new td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ltable tr.is-new td.sticky, .ltable tr.is-new td.end { background-color: color-mix(in srgb, var(--accent) 6%, var(--card-solid)); }
.ltable tr.is-new td.sticky { background-image: linear-gradient(90deg, var(--accent) 3px, transparent 3px); }
.ltable .clickable { cursor: pointer; }
.th-sort { display: inline-flex; gap: 4px; align-items: center; color: inherit; font: inherit; padding: 0; }
.th-sort:hover, .th-sort.is-on { color: var(--ink); }
.th-sort i { font-style: normal; color: var(--acc-txt); }
.no-btn { font-weight: 600; color: var(--acc-txt); padding: 4px 6px; margin: -4px -6px; border-radius: 8px; }
.no-btn:hover { background: var(--accent-soft); }
.cell-edit { display: block; min-height: 28px; line-height: 28px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; cursor: text; border: 1px dashed transparent; transition: border-color .15s, background .15s; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.cell-edit:hover { border-color: var(--line); background: var(--card); }
.cell-edit:focus-visible { outline: 2px solid var(--accent); }
.cell-in { height: 32px; width: 100%; min-width: 120px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--accent); background: var(--card); color: var(--ink); outline: none; font: 400 13px Golos, system-ui, sans-serif; }
.cbx { width: 18px; height: 18px; accent-color: var(--accent); }
.note-cell { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more { display: flex; justify-content: center; padding-top: 14px; }
.lcards { display: none; }
.lcard { background: var(--sunk); border-radius: 16px; padding: 14px; display: grid; gap: 6px; cursor: pointer; transition: transform .25s var(--ease); }
.lcard:active { transform: scale(.99); }
.lcard.is-new { box-shadow: inset 3px 0 0 var(--accent); }
.lcard__h { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.lcard__h .dim { margin-left: auto; }
.lcard__no { font-weight: 600; color: var(--acc-txt); }
.lcard__n { font-size: 15px; font-weight: 600; }
.lcard__m { font-size: 12.5px; color: var(--muted); }
.lcard__f { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; }

/* =========================================================
   Боковая панель (карточки)
   ========================================================= */
.drawer__p { padding: 24px; }
.drawer__x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.drawer__p > * + * { margin-top: 0; }
.ph { padding-right: 40px; margin-bottom: 16px; }
.ph h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 8px; overflow-wrap: anywhere; }
.ph__tags, .ph__st { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.ptitle { font-size: 13px; font-weight: 600; margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ptitle small { font-weight: 400; font-size: 12px; }
.pbox { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--sunk); }
.pbox > div { flex: 1; min-width: 0; display: grid; }
.pbox span.dim { font-size: 12px; }
.pbox--warn { background: var(--accent-soft); }
.pbox--warn .ico { color: var(--acc-txt); }
.prow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.prow--end { justify-content: flex-end; margin-top: 24px; }
.prow--center { justify-content: center; }
.prow .btn { flex: 0 1 auto; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; background: var(--sunk); border: 1px solid transparent; font-size: 12.5px; font-weight: 500; color: var(--ink); transition: background .2s, color .2s, border-color .2s, transform .15s; }
.chip:hover { border-color: var(--line); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.chip--st { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chip--st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip--warn { color: var(--neg); }
.chip--date { padding: 0 10px; font: 500 12.5px Golos, system-ui, sans-serif; color: var(--ink); }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 5px; border-radius: 999px; background: var(--sunk); font-size: 13px; font-weight: 500; border: 1.5px solid transparent; transition: border-color .2s, background .2s; }
.pchip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pchip--free { padding-left: 12px; }
.note-form { display: grid; gap: 8px; }
.note-form textarea, .fld input, .fld textarea { width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; font: 400 14px/1.45 Golos, system-ui, sans-serif; resize: vertical; outline: none; transition: border-color .2s, box-shadow .2s; }
.note-form textarea:focus, .fld input:focus, .fld textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.note-form .btn { justify-self: end; }
.note-form + .pform { margin-top: 18px; }
.notes { display: grid; gap: 12px; margin-top: 14px; }
.note { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.note__h { display: flex; gap: 8px; font-size: 12.5px; align-items: baseline; }
.note p { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.pform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pform--1 { grid-template-columns: 1fr; }
.fld { display: grid; gap: 6px; min-width: 0; }
.fld > span:first-child { font-size: 12px; color: var(--muted); }
.fld input { height: 40px; padding: 0 12px; }
.fld input:disabled { opacity: .6; }
.kv { grid-template-columns: minmax(110px, 40%) 1fr; }
.kv dd { overflow-wrap: anywhere; }
.hist { padding: 0; display: grid; gap: 0; }
.hist li { list-style: none; position: relative; padding: 0 0 16px 30px; }
.hist li::before { content: ''; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.hist li:last-child::before { display: none; }
.hist__h { display: flex; gap: 8px; align-items: center; font-size: 12.5px; margin-left: -30px; }
.hist__i { font-size: 13px; margin-top: 4px; }
.hist__i s { color: var(--muted); }
.hist .btn--text { margin: 4px 0 0 -8px; height: 28px; }
.dot-src { width: 22px; height: 22px; border-radius: 50%; background: var(--hi); flex: none; }
.cols { display: grid; gap: 10px; }
.colrow { background: var(--sunk); border-radius: 14px; padding: 10px; display: grid; gap: 8px; }
.colrow__h { display: flex; align-items: center; gap: 6px; }
.colrow__h .cell-in { flex: 1; border-color: var(--line); }
.colrow .btn--text { justify-self: start; }
.tgl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tgl input { width: 16px; height: 16px; accent-color: var(--accent); }

/* модальное подтверждение и тост */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgb(20 18 19 / .35); opacity: 0; transition: opacity .2s; }
.modal.is-open { opacity: 1; }
.modal__box { width: min(420px, 100%); background: var(--card); border-radius: 22px; padding: 22px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .4); transform: translateY(10px) scale(.98); transition: transform .3s var(--ease); }
.modal.is-open .modal__box { transform: none; }
.modal__box p { font-size: 15px; line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: var(--on-ink); padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 30px -12px rgb(0 0 0 / .35); transition: opacity .25s, transform .35s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-err { background: var(--neg); color: #fff; }

/* =========================================================
   Задачи
   ========================================================= */
.tabs-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.seg-ctl button span { color: var(--muted); margin-left: 2px; }
.tgroup, .tfree { margin-top: 18px; }
.tfree { background: var(--accent-soft); border-radius: 18px; padding: 12px 14px 4px; }
.tgroup__h { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.tgroup.is-late .tgroup__h b { color: var(--neg); }
.tlist { display: grid; }
.trow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); transition: opacity .35s, transform .35s var(--ease); }
.tlist .trow:last-child { border-bottom: 0; }
.trow.is-leaving { opacity: 0; transform: translateX(16px); }
.trow.is-done .trow__t { color: var(--muted); text-decoration: line-through; }
.tcheck { width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid color-mix(in srgb, var(--muted) 45%, transparent); background: var(--card); display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.tcheck .ico { width: 14px; height: 14px; stroke-width: 2.4; }
.tcheck:hover { border-color: var(--accent); color: var(--accent); }
.tcheck:active { transform: scale(.9); }
.tcheck[aria-pressed="true"], .trow.is-leaving .tcheck { background: var(--accent); border-color: var(--accent); color: #fff; }
.trow__main { text-align: left; display: grid; gap: 3px; min-width: 0; padding: 2px 0; }
.trow__t { font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: baseline; }
.trow__m { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; }
.trow__who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; justify-content: flex-end; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neg); flex: none; transform: translateY(-1px); }
.due { color: var(--muted); }
.due.is-late { color: var(--neg); font-weight: 500; }
.due.is-today { color: var(--acc-txt); font-weight: 500; }
.tlist--mini .trow { grid-template-columns: 28px minmax(0, 1fr); }

/* =========================================================
   Контент-план
   ========================================================= */
.wk { display: flex; align-items: center; gap: 4px; background: var(--card); border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.wk > div { display: grid; text-align: center; min-width: 120px; line-height: 1.2; font-size: 13px; }
.wk .dim { font-size: 11.5px; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.net i { width: 8px; height: 8px; border-radius: 50%; }
.pdots { display: inline-flex; gap: 3px; }
.pdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.pdots i.on { background: var(--accent); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--sunk); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; min-width: 0; }
.day.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.day.is-today .day__h b { color: var(--acc-txt); }
.day__h { flex-wrap: nowrap !important; }
.day__h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.day__h .btn { margin-left: auto; height: 26px; padding: 0 6px; }
.day__h .btn .ico { width: 14px; height: 14px; }
.day__empty { margin: auto 0; text-align: center; }
.post { text-align: left; background: var(--card); border-radius: 12px; padding: 10px; display: grid; gap: 6px; box-shadow: var(--shadow); transition: transform .25s var(--ease); min-width: 0; }
.post:hover { transform: translateY(-2px); }
.post__t { font-weight: 500; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.post__m { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 11.5px; }
.post__m .net { font-size: 11.5px; }
.post__w { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.stepper { display: flex; flex-wrap: wrap; gap: 6px; }
.stepper button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--sunk); font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: background .2s; }
.stepper i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-style: normal; font-size: 11.5px; font-weight: 600; transition: background .2s, color .2s; }
.stepper .is-past i { background: var(--accent); color: #fff; }
.stepper [aria-pressed="true"] { background: var(--accent-soft); color: var(--acc-txt); }

/* =========================================================
   Главная, направления, доступы, профиль
   ========================================================= */
.hero--link { text-decoration: none; display: flex; flex-direction: column; transition: transform .35s var(--ease); }
.hero--link:hover { transform: translateY(-3px); }
.hero__go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 18px; font-weight: 500; }
.hero__go .ico { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.hero--link:hover .hero__go .ico { transform: translateX(3px); }
.hero__title { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; margin: 22px 0 18px; line-height: 1.05; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.hero__stats > div { background: rgb(22 12 70 / .32); border: 1px solid rgb(255 255 255 / .18); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.hero__stats b { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: #fff; }
.hero__stats > div:first-child b { color: var(--hi); }
.hero__stats span { font-size: 12.5px; color: rgb(255 255 255 / .9); font-weight: 500; }
.hero__num .big { color: #fff; }
.fmts--on-hero .fmt { background: rgb(22 12 70 / .32) !important; border: 1px solid rgb(255 255 255 / .18); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2) !important; color: #fff; }
.fmts--on-hero .fmt__s { color: rgb(255 255 255 / .85); }
a.kpi { text-decoration: none; color: inherit; }
.card--row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.card--row > div { display: grid; flex: 1; }
.card--row .ico { color: var(--acc-txt); }
.card--row:hover { transform: translateY(-2px); }
.conv__row--wide { grid-template-columns: minmax(0, 130px) 1fr 32px; }
.conv__n { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people { display: grid; gap: 4px; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.person:last-child { border-bottom: 0; }
.person > div { display: grid; min-width: 0; }
.person > div > b { font-weight: 600; font-size: 14px; }
.person > div > .dim { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__v { justify-items: end; text-align: right; }
.person__act { display: flex !important; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
button.person:hover { background: var(--sunk); border-radius: 12px; }
.legend--roles { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.legend--roles b { color: var(--ink); font-weight: 600; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.back .ico { width: 16px; height: 16px; }
.back:hover { color: var(--ink); }
.chips--tabs { margin-bottom: 18px; }
.flist { display: grid; gap: 6px; }
.frow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--sunk); text-align: left; text-decoration: none; color: inherit; transition: background .2s, transform .25s var(--ease); }
button.frow:hover { transform: translateX(2px); }
.frow > span:not(.tag):not(.ext):not(.frow__ico):not(.dim):not(.st) { display: grid; min-width: 0; flex: 1; }
.frow > .tag, .frow > .st, .frow > .btn, .frow > .ibtn, .frow > .ext, .frow > .frow__ico { flex: none; }
.frow b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.frow .dim { font-size: 12px; }
.frow__ico { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; color: var(--acc-txt); }
.ext { width: 40px; height: 40px; border-radius: 10px; background: var(--card); display: grid; place-items: center; font-size: 10.5px; font-weight: 600; text-transform: uppercase; color: var(--acc-txt); }
.drop { display: grid; justify-items: center; gap: 4px; padding: 22px; border: 1.5px dashed var(--line); border-radius: 16px; cursor: pointer; margin-bottom: 12px; transition: border-color .2s, background .2s; text-align: center; }
.drop .ico { color: var(--acc-txt); }
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.mphoto { display: grid; place-items: center; padding: 10px 0; }
.mphoto img, .mphoto .ava { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.mrow { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.mrow b { font-weight: 500; }
.mfix { display: flex; gap: 8px; padding: 10px 0; flex-wrap: wrap; }
.mfix input { flex: 1 1 200px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px; }

@media (max-width: 1100px) {
  .days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tbl-wrap:has(.ltable) { display: none; }
  .lcards { display: grid; gap: 8px; }
  .fbar .sel--f { flex: 1 1 140px; }
  .fbar .sel--f select { width: 100%; min-width: 0; }
  .fbar__n { margin-left: 0; }
}
@media (max-width: 760px) {
  .days { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .pform { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 28px minmax(0, 1fr); }
  .trow__who { grid-column: 2; justify-content: flex-start; }
  .mrow { grid-template-columns: 1fr auto; }
  .mrow .dim { grid-column: 1 / -1; font-size: 12px; }
  .person--row { grid-template-columns: auto minmax(0, 1fr); }
  .person__act { grid-column: 1 / -1; justify-content: flex-start; }
  .hero__stats b { font-size: 22px; }
  .drawer__p { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 88dvh; border-radius: 22px; transform: translateY(calc(100% + 24px)); }
}

.only-narrow { display: none; }
@media (max-width: 900px) { .only-wide { display: none; } .only-narrow { display: inline; } }

.seg-ctl { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-ctl::-webkit-scrollbar { display: none; }
.seg-ctl button { white-space: nowrap; flex: none; }
@media (max-width: 860px) {
  .grid > .netc { grid-column: span 4; padding: 14px; }
  .netc .card__h { margin-bottom: 8px; }
  .netc .card__h .tag, .netc .plan__meta span:first-child { display: none; }
  .netc .mid { font-size: 22px; }
  .netc .net { font-size: 12px; }
}
@media (max-width: 400px) { .netc .net { font-size: 11px; gap: 4px; } }

@media (max-width: 1100px) {
  .nav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .nav.is-end { -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 560px) {
  .stat3--short { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat3--short > div { padding: 12px; }
  .stat3--short .mid { font-size: 20px; }
}


/* =========================================================
   Liquid glass
   Настоящее размытие фона — только у плавающих слоёв (шапка, меню, панель, окна).
   Карточки — прозрачная подложка, светлая кромка и блик над мягким фоном: выглядит как стекло и не грузит прокрутку.
   ========================================================= */
:root {
  --card: rgb(255 255 255 / .58);
  --sunk: rgb(33 31 32 / .045);
  --chip: rgb(33 31 32 / .07);
  --line: rgb(33 31 32 / .09);
  --frame: rgb(255 255 255 / .28);
  --glass: linear-gradient(145deg, rgb(255 255 255 / .74), rgb(255 255 255 / .46));
  --glass-float: rgb(255 255 255 / .62);
  --edge: rgb(255 255 255 / .85);
  --edge-2: rgb(255 255 255 / .25);
  --sheen: rgb(255 255 255 / .55);
  --glass-shadow: 0 1px 1px rgb(33 31 32 / .03), 0 12px 32px -16px rgb(60 45 140 / .28);
  --blur: blur(22px) saturate(1.7);
  --amb-1: #b9aeff; --amb-2: #e4ff6b; --amb-3: #d9d0ff; --amb-bg: #ece6e0;
}
:root[data-theme="dark"] {
  --card: rgb(255 255 255 / .055);
  --sunk: rgb(255 255 255 / .05);
  --chip: rgb(255 255 255 / .08);
  --line: rgb(255 255 255 / .08);
  --frame: rgb(20 18 20 / .35);
  --glass: linear-gradient(145deg, rgb(255 255 255 / .09), rgb(255 255 255 / .035));
  --glass-float: rgb(38 35 38 / .62);
  --edge: rgb(255 255 255 / .16);
  --edge-2: rgb(255 255 255 / .04);
  --sheen: rgb(255 255 255 / .1);
  --glass-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 14px 34px -16px rgb(0 0 0 / .7);
  --amb-1: #4b3c9e; --amb-2: #4a5a08; --amb-3: #2c2350; --amb-bg: #151315;
}

/* фон: три пятна бренда, один неподвижный слой — рисуется один раз */
body { background: var(--amb-bg); }
body::before {
  content: ''; position: fixed; inset: -10vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 34vmax at 12% 8%, var(--amb-1), transparent 70%),
    radial-gradient(30vmax 26vmax at 92% 22%, var(--amb-2), transparent 70%),
    radial-gradient(44vmax 40vmax at 70% 96%, var(--amb-3), transparent 70%);
  opacity: .9;
}
:root[data-theme="dark"] body::before { opacity: .75; }

.app { background: var(--frame); border: 1px solid var(--edge-2); box-shadow: inset 0 1px 0 var(--edge-2); }

/* карточки */
.card, .modal__box, .lcard, .post, .fmt, .kpi:not(.kpi--acc), .day, .wk, .colrow, .mini, .ev {
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow);
}
.card { position: relative; isolation: isolate; }
.kpi:not(.kpi--acc), .day, .fmt, .lcard, .mini { box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2); }
.post { box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), 0 6px 16px -10px rgb(33 31 32 / .25); }
/* блик за курсором */
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 30%) var(--my, -20%), var(--sheen), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.card.is-lit::after { opacity: 1; }
.hero::after { z-index: 0; }
.card.hero, .kpi--acc { box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), inset 0 0 0 1px rgb(255 255 255 / .14), var(--glow); }
.kpi--acc { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), inset 0 0 0 1px rgb(255 255 255 / .3), 0 14px 30px -18px rgb(160 190 0 / .7); }

/* плавающие слои: настоящее стекло */
.pill, .rail__group, .drawer__p, .toast, .tip, .modal__box {
  background: var(--glass-float);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow);
}
.toast { color: var(--ink); }
.toast.is-err { background: color-mix(in srgb, var(--neg) 88%, transparent); color: #fff; }
.tip { color: var(--ink); }
.drawer__bg { background: rgb(20 18 20 / .18); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal { background: rgb(20 18 20 / .2); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* шапка прилипает: контент уходит под стеклянные таблетки */
.top { position: sticky; top: 10px; z-index: 30; }
.rail { top: 96px; }
@media (max-width: 1100px) { .rail { top: 150px; } }

/* поля и кнопки на стекле */
.sel select, .note-form textarea, .fld input, .fld textarea, .cell-in, .mfix input, .chip--date { background: rgb(255 255 255 / .55); }
:root[data-theme="dark"] :is(.sel select, .note-form textarea, .fld input, .fld textarea, .cell-in, .mfix input, .chip--date) { background: rgb(255 255 255 / .05); }
.sel select option { background: var(--card-solid); color: var(--ink); }
.seg-ctl button[aria-pressed="true"] { background: var(--card-solid); }
.btn--ghost { background: var(--chip); }
.btn--ink { box-shadow: inset 0 1px 0 rgb(255 255 255 / .18); }
.chip[aria-pressed="true"] { box-shadow: inset 0 1px 0 rgb(255 255 255 / .18); }
.tcheck { background: var(--card-solid); }

/* кому прозрачность мешает — сплошные поверхности */
@media (prefers-reduced-transparency: reduce) {
  :root { --card: #fff; --glass: #fff; --glass-float: #fff; --frame: #f3efec; }
  :root[data-theme="dark"] { --card: #2a282a; --glass: #2a282a; --glass-float: #2a282a; --frame: #211f20; }
  body::before { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-float: rgb(255 255 255 / .94); }
  :root[data-theme="dark"] { --glass-float: rgb(42 40 42 / .96); }
}
.card.hero { background: radial-gradient(120% 140% at 85% 0%, #a99dff 0%, transparent 55%), linear-gradient(135deg, #8577de 0%, #6a5ac7 50%, #4c3da8 100%); }
.card.hero::after { background: radial-gradient(420px circle at var(--mx, 30%) var(--my, -20%), rgb(255 255 255 / .28), transparent 60%); }


/* ---------- логотип без рамки ---------- */
.brand { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; padding: 0 8px 0 4px; gap: 6px; }
.brand__mark { width: 32px; height: 30px; }
.brand__word { font-size: 24px; transform: translateY(3px); }
.brand__crm { font: 600 10.5px/1 'Roboto Mono', ui-monospace, monospace; letter-spacing: .06em; height: 20px; padding: 0 6px; transform: translateY(3px); margin-left: 2px; background: var(--chip); }

/* ---------- плашки под приветствием ---------- */
.hmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.hchip .ico { width: 14px; height: 14px; color: var(--acc-txt); }
.hchip--time b { font: 600 12.5px 'Roboto Mono', ui-monospace, monospace; color: var(--ink); }
.hchip--time small { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; position: relative; top: 1px; }
.hchip--time b { line-height: 1; }
.hchip__sep { width: 1px; height: 12px; margin: 0 3px; background: var(--line); }

/* ---------- заголовки инфографики ---------- */
.ihead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.ihead__ico { --t: var(--accent); width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--t); background: color-mix(in srgb, var(--t) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 22%, transparent); }
.ihead__ico .ico { width: 19px; height: 19px; }
.ihead__t { flex: 1; min-width: 0; }
.ihead h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.ihead p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ihead p .late { color: var(--neg); }
.ihead > .btn, .ihead > .tag { flex: none; }

/* сводка над графиком */
.csum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.csum > div { background: var(--sunk); border-radius: 12px; padding: 8px 10px; display: grid; min-width: 0; }
.csum b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.csum span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__v { position: absolute; left: 50%; transform: translate(-50%, -4px); font-size: 10.5px; font-weight: 600; color: var(--muted); opacity: 0; transition: opacity .2s; pointer-events: none; }
.bar:hover .bar__v, .bar.is-now .bar__v { opacity: 1; }
.bar.is-now .bar__v { color: var(--acc-txt); }
.bar.is-now .bar__x { color: var(--acc-txt); font-weight: 600; }
.bar:not(.is-now) .seg--lead { opacity: .72; }
.bar.is-now .seg--lead { box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.chart { margin-top: 4px; }
.legend--chips { margin-top: 12px; flex-wrap: wrap; }
.legend--chips span { padding: 4px 9px; border-radius: 999px; background: var(--sunk); }
.legend--chips i { border-radius: 3px; }
.lg-lead { background: repeating-linear-gradient(135deg, var(--accent) 0 2px, color-mix(in srgb, var(--accent) 45%, transparent) 2px 4px); }

/* главная цифра воронки */
.flead { display: flex; align-items: baseline; gap: 10px; margin: -4px 0 14px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--hi) 30%, transparent), transparent); }
.flead b { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.flead span { font-size: 12.5px; color: var(--muted); }
.funnel__l b { font-size: 13.5px; }
.funnel__r b { font-size: 17px; }

/* карточки показателей как кнопки */
.kpi { position: relative; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s; }
.kpi__f { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }
.kpi__go { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--card-solid); color: var(--ink); flex: none; transition: transform .35s var(--ease), background .2s, color .2s; box-shadow: var(--glass-shadow); }
.kpi__go .ico { width: 14px; height: 14px; }
.kpi:hover { transform: translateY(-3px); }
.kpi:hover .kpi__go { transform: translateX(2px); background: var(--ink); color: var(--on-ink); }
.kpi:active { transform: translateY(-1px) scale(.98); }
.kpi--acc .kpi__go { background: var(--hi-ink); color: var(--hi); }
.kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- боковое меню: отклик и подпись при наведении ---------- */
.rail__group .ibtn { transition: color .25s, background .25s, transform .35s var(--ease); }
.rail__group .ibtn:not([aria-current]):hover { transform: scale(1.08); background: var(--chip); color: var(--ink); }
.rail__group .ibtn:active { transform: scale(.94); }
.rail__group .ibtn .ico { transition: transform .35s var(--ease); }
.rail__group .ibtn:hover .ico { transform: rotate(-6deg); }
.rail__group a.ibtn::after { content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 40; padding: 6px 11px; border-radius: 10px; white-space: nowrap; font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow); opacity: 0; transform: translate(-6px, -50%); pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
.rail__group a.ibtn:hover::after, .rail__group a.ibtn:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* ---------- воздух между отдельными карточками раздела ---------- */
#view > .card + .card, #view > .grid + .card, #view > .card + .grid { margin-top: var(--gap); }

/* ---------- стекло сильнее ---------- */
:root { --amb-1: #a99bff; --amb-2: #e2ff4a; --amb-3: #cfc4ff; }
:root[data-theme="dark"] { --amb-1: #5a47c9; --amb-2: #5c7206; --amb-3: #3a2c75; }
body::before { opacity: 1; }
:root[data-theme="dark"] body::before { opacity: .85; }
/* кромка-преломление: светлая сверху-слева, тень снизу-справа */
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; padding: 1px;
  background: linear-gradient(150deg, rgb(255 255 255 / .95), rgb(255 255 255 / .1) 35%, rgb(255 255 255 / 0) 60%, rgb(255 255 255 / .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
:root[data-theme="dark"] .card::before { background: linear-gradient(150deg, rgb(255 255 255 / .28), rgb(255 255 255 / .04) 35%, rgb(255 255 255 / 0) 60%, rgb(255 255 255 / .1)); }
/* на устройствах с мышью карточки тоже размывают фон по-настоящему */
@media (hover: hover) and (pointer: fine) {
  .card:not(.hero) { -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5); }
}
@media (prefers-reduced-transparency: reduce) { .card::before { display: none; } .card:not(.hero) { backdrop-filter: none; -webkit-backdrop-filter: none; } }

@media (max-width: 860px) { .top { position: static; } .rail { top: 20px; } }

/* =========================================================
   Графики: линия с ползунком, радар, тримап (по мотивам Analytics Bento)
   ========================================================= */
.lc { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: var(--h, 168px) auto; gap: 6px 8px; background: var(--sunk); border-radius: 14px; padding: 12px 10px 8px 12px; box-shadow: inset 0 0 0 1px var(--edge-2); }
.lc__plot { position: relative; min-width: 0; touch-action: pan-y; cursor: crosshair; }
.lc__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.lc__line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lcDraw 1.4s var(--ease) forwards; animation-delay: calc(200ms + var(--d, 0ms)); }
.lc__line.is-faint { opacity: .5; }
.view.no-anim .lc__line { animation: none; stroke-dashoffset: 0; }
.lc__line[stroke-dasharray="4 4"] { stroke-dasharray: 4 4; stroke-dashoffset: 0; animation: lcFade .8s .4s both; }
.lc__area { animation: lcFade .9s .5s both; }
.view.no-anim .lc__area { animation: none; }
@keyframes lcDraw { to { stroke-dashoffset: 0; } }
@keyframes lcFade { from { opacity: 0; } }
.lc__end { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent), 0 0 14px var(--c); animation: lcPulse 2.4s ease-in-out infinite; transition: opacity .2s; }
@keyframes lcPulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--c) 10%, transparent), 0 0 18px var(--c); } }
.lc__y { display: flex; flex-direction: column; justify-content: space-between; font: 500 10.5px/1 'Roboto Mono', ui-monospace, monospace; color: var(--muted); text-align: right; padding: 0 0 0 2px; }
.lc__x { grid-column: 1; display: flex; justify-content: space-between; font: 500 10.5px/1 'Roboto Mono', ui-monospace, monospace; color: var(--muted); }
.lc__scrub { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s; }
.lc__dots i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--card-solid); border: 2.5px solid var(--c); opacity: 0; pointer-events: none; transition: opacity .15s, top .12s ease-out, left .12s ease-out; }
.lc__tip { position: absolute; top: -6px; transform: translate(-50%, -100%); z-index: 3; display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; font-size: 12px; white-space: nowrap; background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow); opacity: 0; pointer-events: none; transition: opacity .15s, left .12s ease-out; }
.lc__tip b { font-weight: 600; }
.lc__tip span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.lc__tip i { width: 8px; height: 8px; border-radius: 50%; }
.lc__tip em { font: 600 12px 'Roboto Mono', ui-monospace, monospace; color: var(--ink); margin-left: auto; padding-left: 10px; }
.lc.is-scrub .lc__scrub { opacity: .35; }
.lc.is-scrub .lc__dots i, .lc.is-scrub .lc__tip { opacity: 1; }
.lc.is-scrub .lc__end { opacity: 0; }
.lg-dash { background: repeating-linear-gradient(90deg, #9d979a 0 3px, transparent 3px 5px) !important; height: 2px !important; width: 12px !important; border-radius: 0 !important; }
.lg-ghost { background: none !important; box-shadow: inset 0 0 0 1.5px var(--muted); }

.rd { display: block; width: 100%; max-width: 300px; margin: 4px auto 0; overflow: visible; }
.rd__ring { fill: none; stroke: var(--line); stroke-dasharray: 2 4; }
.rd__spoke { stroke: var(--line); }
.rd__lbl { font: 500 11px 'Roboto Mono', ui-monospace, monospace; fill: var(--muted); }
.rd__ghost { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .7; }
.rd__fill { fill: color-mix(in srgb, var(--c) 16%, transparent); stroke: none; animation: lcFade 1s .5s both; }
.rd__line { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lcDraw 1.6s var(--ease) .25s forwards; filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--c) 45%, transparent)); }
.view.no-anim .rd__line { animation: none; stroke-dashoffset: 0; }
.view.no-anim .rd__fill { animation: none; }
.rd__pt { fill: var(--card-solid); stroke: var(--c); stroke-width: 2; }

.tm__periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tm__p { text-align: left; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; padding: 10px 12px; border-radius: 14px; background: var(--sunk); border: 1.5px solid transparent; transition: background .2s, border-color .2s, transform .2s var(--ease); min-width: 0; }
.tm__p:hover { transform: translateY(-2px); }
.tm__p[aria-pressed="true"] { background: var(--card-solid); border-color: var(--accent); box-shadow: var(--glass-shadow); }
.tm__pl { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.tm__pl i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tm__p[aria-pressed="true"] .tm__pl i { background: var(--accent); }
.tm__p b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.tm__p em { font-style: normal; font-size: 12px; font-weight: 600; }
.tm__p em.up { color: var(--pos); } .tm__p em.dn { color: var(--neg); }
.tm__p small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm__box { position: relative; height: 290px; }
.tm__tile { position: absolute; padding: 3px; opacity: 0; container-type: size; transition: left .7s var(--ease), top .7s var(--ease), width .7s var(--ease), height .7s var(--ease), opacity .4s; }
.tm__in { width: 100%; height: 100%; border-radius: 14px; background: var(--bg); color: var(--ink); display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 1fr auto; padding: 9px 10px; overflow: hidden; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 0 0 1px rgb(0 0 0 / .04); transition: filter .2s, transform .3s var(--ease); }
.tm__tile:hover .tm__in { filter: brightness(1.06) saturate(1.05); transform: scale(.985); }
.tm__in { color: var(--ink); }
.tm__tile[style*="--ink:#ffffff"] .tm__in, .tm__tile[style*="--ink: #ffffff"] .tm__in { color: #fff; }
.tm__n { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tm__n i { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: rgb(0 0 0 / .14); flex: none; }
.tm__n .ico { width: 11px; height: 11px; stroke-width: 2; }
.tm__v { grid-row: 3; align-self: end; font: 600 24px/1 'Roboto Mono', ui-monospace, monospace; letter-spacing: -.03em; }
.tm__s { grid-row: 3; grid-column: 2; align-self: end; font: 600 10.5px/1 'Roboto Mono', ui-monospace, monospace; padding: 4px 6px; border-radius: 6px; background: #151315; color: #fff; }
@container (max-width: 110px) { .tm__s { display: none; } .tm__v { font-size: 18px; } }
@container (max-width: 70px) { .tm__n span, .tm__n { font-size: 0; } .tm__v { font-size: 14px; } }
.tm__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.tm__legend span { display: inline-flex; align-items: center; gap: 6px; }
.tm__legend i { width: 9px; height: 9px; border-radius: 3px; }
@media (max-width: 560px) {
  .tm__periods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tm__p { padding: 8px; } .tm__p b { font-size: 17px; } .tm__p small { display: none; }
  .tm__box { height: 240px; }
  .csum b { font-size: 16px; }
}

/* ---------- главные кнопки с заливкой при наведении ---------- */
.hb { position: relative; overflow: hidden; isolation: isolate; }
.hb__a { display: inline-flex; align-items: center; gap: inherit; transition: transform .35s var(--ease), opacity .3s; }
.hb__b { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; opacity: 0; transform: translateX(46px); transition: transform .35s var(--ease), opacity .3s; pointer-events: none; }
.hb__b .ico { width: 15px; height: 15px; }
.hb__dot { position: absolute; z-index: 1; left: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); transform: scale(1); transition: transform .45s var(--ease); pointer-events: none; }
.btn--white .hb__dot { background: #211f20; }
.btn--white .hb__b { color: var(--hi); }
.hb:hover .hb__a { transform: translateX(46px); opacity: 0; }
.hb:hover .hb__b { transform: none; opacity: 1; }
.hb:hover .hb__dot { transform: scale(90); }
.hb:focus-visible .hb__dot { transform: scale(90); }
.hb:focus-visible .hb__a { opacity: 0; }
.hb:focus-visible .hb__b { opacity: 1; transform: none; }
.hb .hb__a > .ico:first-child { margin-left: 8px; }
@media (prefers-reduced-motion: reduce) { .hb__dot { transition: none; } }

/* лаймовая карточка-ссылка: цвет текста не наследуем от ссылки */
a.kpi.kpi--acc, .kpi.kpi--acc .mid { color: var(--hi-ink); }
::view-transition-group(root) { animation-duration: .46s; }
/* фон: лаймовое пятно ушло от аватарки вниз-влево, на телефоне пятна мягче */
body::before {
  background:
    radial-gradient(38vmax 34vmax at 8% 6%, var(--amb-1), transparent 70%),
    radial-gradient(34vmax 30vmax at 4% 78%, var(--amb-2), transparent 70%),
    radial-gradient(44vmax 40vmax at 88% 60%, var(--amb-3), transparent 70%);
}
@media (max-width: 860px) { body::before { opacity: .6; } :root[data-theme="dark"] body::before { opacity: .5; } }

.top::before { content: ''; position: absolute; inset: -10px -14px -8px; z-index: -1; border-radius: 0 0 24px 24px; background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 -1px 0 var(--edge-2), 0 12px 28px -18px rgb(33 31 32 / .35); opacity: 0; transition: opacity .25s; pointer-events: none; }
html.is-stuck .top::before { opacity: 1; }
@media (max-width: 860px) { .top::before { display: none; } }
/* низкие плитки тримапа: название и число в одну строку */
@container (max-height: 74px) {
  .tm__in { grid-template-rows: 1fr; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
  .tm__n { display: flex; grid-row: 1; grid-column: 1; }
  .tm__v { grid-row: 1; grid-column: 2; align-self: center; font-size: 18px; }
  .tm__s { display: none; }
}
@container (max-width: 120px) and (max-height: 74px) { .tm__n { display: none; } .tm__v { grid-column: 1 / -1; } }
.tm__box { height: 320px; }

.lc--noy { grid-template-columns: minmax(0, 1fr); padding-right: 12px; }
@container (max-width: 44px) { .tm__v { display: none; } }


/* =========================================================
   Серия правок 29.10 (вечер): шапка, меню, кнопки liquid glass
   ========================================================= */
/* блик за курсором убран */
.card::after { display: none !important; }

/* логотип в углу: левый край — по боковому меню, центр — по меню и профилю */
.top { grid-template-columns: auto 1fr auto; }
.brand { height: 46px; padding: 0; margin-left: 0; gap: 3px; align-items: center; }
.brand__mark { width: 34px; height: 32px; margin-right: 1px; }
.brand__word { font-size: 25px; line-height: 1; transform: translateY(1px); }
.brand__crm { transform: translateY(2px); margin-left: 5px; }

/* полоса под шапкой при прокрутке: скруглена со всех сторон, внутри рамки */
.top::before { inset: -6px -8px; border-radius: 26px; box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), 0 14px 30px -18px rgb(33 31 32 / .35); }

/* боковое меню: подписи над интерфейсом, иконки неподвижны */
.rail { z-index: 25; }
.rail__group .ibtn:not([aria-current]):hover { transform: none; }
.rail__group .ibtn:active { transform: none; }
.rail__group .ibtn:hover .ico { transform: none; }
.rail__group a.ibtn::after { z-index: 60; }

/* ---------- кнопки liquid glass ---------- */
.btn { --lg-tint: rgb(255 255 255 / .55); position: relative; isolation: isolate; border: 0;
  background: linear-gradient(180deg, rgb(255 255 255 / .75), rgb(255 255 255 / .38));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .95), inset 0 -1px 0 rgb(255 255 255 / .25), inset 0 0 0 1px rgb(255 255 255 / .45), 0 1px 2px rgb(33 31 32 / .06), 0 6px 16px -8px rgb(60 45 140 / .28);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .2s; }
.btn::before { content: ''; position: absolute; inset: 1px 1px 50% 1px; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(255 255 255 / .6), rgb(255 255 255 / 0)); opacity: .7; }
.btn:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgb(255 255 255 / .3), inset 0 0 0 1px rgb(255 255 255 / .6), 0 2px 4px rgb(33 31 32 / .06), 0 10px 22px -10px rgb(60 45 140 / .38); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
:root[data-theme="dark"] .btn { background: linear-gradient(180deg, rgb(255 255 255 / .14), rgb(255 255 255 / .05)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 0 0 1px rgb(255 255 255 / .08), 0 8px 18px -10px rgb(0 0 0 / .7); }
:root[data-theme="dark"] .btn::before { background: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / 0)); }
/* главная кнопка: фиолетовое стекло */
.btn--ink { color: #fff; background: linear-gradient(180deg, rgb(143 130 255 / .95), rgb(106 90 199 / .92)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), inset 0 -2px 6px rgb(40 25 120 / .35), inset 0 0 0 1px rgb(255 255 255 / .18), 0 10px 22px -10px rgb(106 90 199 / .75); }
.btn--ink::before { background: linear-gradient(180deg, rgb(255 255 255 / .45), rgb(255 255 255 / 0)); }
.btn--ink:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), inset 0 -2px 6px rgb(40 25 120 / .35), inset 0 0 0 1px rgb(255 255 255 / .25), 0 14px 28px -12px rgb(106 90 199 / .9); }
:root[data-theme="dark"] .btn--ink { color: #fff; background: linear-gradient(180deg, rgb(143 130 255 / .9), rgb(106 90 199 / .85)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 0 0 1px rgb(255 255 255 / .12), 0 10px 24px -10px rgb(119 103 252 / .6); }
.btn--ghost { background: linear-gradient(180deg, rgb(255 255 255 / .55), rgb(255 255 255 / .25)); }
.btn--white { color: var(--hi-ink); background: linear-gradient(180deg, #ecff6a, var(--hi)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .8), inset 0 -2px 6px rgb(100 120 0 / .25), 0 10px 22px -12px rgb(160 190 0 / .8); }
.btn--glass { color: #fff; background: linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / .1)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), inset 0 0 0 1px rgb(255 255 255 / .2); }
.btn--text { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn--text::before { display: none; }
.btn--text:hover { background: var(--sunk); box-shadow: none; transform: none; }
.btn--danger { color: #fff; background: linear-gradient(180deg, #ef6a5e, var(--neg)); }
/* кнопка с заливкой при наведении: точка поверх стекла */
.hb__dot { background: #5a49bd; }
.hb::before { z-index: 0; }

/* =========================================================
   Меню «Ещё»
   ========================================================= */
.nav__more { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: color .3s var(--ease); }
.nav__more[aria-current] { color: var(--on-ink); }
.nav__more:hover { color: var(--ink); }
.nav__more[aria-current]:hover { color: var(--on-ink); }
.nav__more .ico--xs { transition: transform .25s var(--ease); }
.nav__more[aria-expanded="true"] .ico--xs { transform: rotate(180deg); }
.navmore { position: fixed; z-index: 70; min-width: 250px; padding: 6px; border-radius: 18px; display: grid; gap: 2px; background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), 0 24px 48px -20px rgb(33 31 32 / .45); animation: pop .22s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.navmore a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; transition: background .2s; }
.navmore a:hover { background: var(--sunk); }
.navmore a[aria-current] { background: var(--accent-soft); color: var(--acc-txt); }
.navmore a span { flex: 1; }
.navmore .ico { color: var(--acc-txt); }

/* =========================================================
   Холодная база
   ========================================================= */
.cbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.cbar .seg-ctl { margin: 0; }
.cbar .search--wide { flex: 1 1 240px; }
.cbar .sel select { height: 38px; }
.cgroup { margin-top: 18px; }
.cgroup__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 13.5px; }
.cgroup__empty { padding: 10px 0; }
.cgroup--late .cgroup__h b { color: var(--neg); }
.cgroup--today .cgroup__h b { color: var(--acc-txt); }
.cgroup--fresh { background: var(--accent-soft); border-radius: 18px; padding: 12px 14px 4px; }
.crows { display: grid; }
.crow { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .15s; }
.crow:hover { background: var(--sunk); }
.crows .crow:last-child { border-bottom: 0; }
.crow__main { display: grid; gap: 4px; min-width: 0; }
.crow__main b { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.crow__sub { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12px; }
.crow__next { font-size: 12.5px; min-width: 0; }
.crow__qa { display: flex; gap: 4px; }
.qa { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: var(--sunk); transition: background .2s, color .2s; }
.qa:hover { background: var(--accent); color: #fff; }
.qa .ico { width: 15px; height: 15px; }
.ochip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ochip--cold { background: color-mix(in srgb, #3fa7c9 16%, transparent); color: #1f7896; }
.ochip--past { background: color-mix(in srgb, #e2a03d 18%, transparent); color: #9a6410; }
.ochip--warm { background: var(--accent-soft); color: var(--acc-txt); }
:root[data-theme="dark"] .ochip--cold { color: #7fd0ea; } :root[data-theme="dark"] .ochip--past { color: #f0c47e; }
.goes { font-size: 12px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.goes--none { color: var(--neg); }
.nx { font-weight: 500; color: var(--ink-2); }
.nx--late { color: var(--neg); }
.nx--today { color: var(--acc-txt); }
.nx--none { color: #c07a12; }
.dupi { display: inline-grid; place-items: center; color: #c07a12; }
.dupi .ico { width: 14px; height: 14px; }
.mstages { display: none; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 8px 0 10px; }
.mstages .chip span { opacity: .6; margin-left: 2px; }
.kanban { display: grid; grid-template-columns: repeat(7, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding: 8px 2px 10px; scrollbar-width: thin; }
.kcol { background: var(--sunk); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; transition: box-shadow .2s, background .2s; }
.kcol.is-over { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.kcol__h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.kcol__h i { width: 9px; height: 9px; border-radius: 50%; }
.kcol__h .tag { margin-left: auto; }
.kcol__list { display: grid; gap: 8px; align-content: start; }
.kcol__empty { text-align: center; padding: 18px 0; }
.kcard { background: var(--glass); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), 0 6px 14px -10px rgb(33 31 32 / .3); border-radius: 12px; padding: 10px; display: grid; gap: 6px; cursor: grab; transition: transform .2s var(--ease), opacity .2s; }
.kcard:hover { transform: translateY(-2px); }
.kcard.is-drag { opacity: .45; cursor: grabbing; }
.kcard b { font-size: 13px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.kcard__o { display: flex; flex-wrap: wrap; gap: 4px; }
.kcard__f { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin: 10px 0; border-radius: 16px; background: var(--accent-soft); }
.fld--inline { display: flex; } .fld--inline input { height: 32px; border-radius: 10px; min-width: 200px; }
.ctable-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 8px; flex-wrap: wrap; }
.ctable { min-width: 1150px; }
.obox { border-radius: 16px; padding: 12px 14px; margin-top: 4px; background: var(--sunk); }
.obox .ptitle { margin-top: 0; }
.obox--cold { background: color-mix(in srgb, #3fa7c9 10%, transparent); }
.obox--past { background: color-mix(in srgb, #e2a03d 12%, transparent); }
.obox__main { font-weight: 600; font-size: 14px; }
.callhint { display: flex; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; background: var(--card-solid); }
.callhint .ico { flex: none; width: 17px; height: 17px; color: var(--acc-txt); margin-top: 1px; }
.callhint--warn { background: color-mix(in srgb, var(--neg) 10%, transparent); } .callhint--warn .ico { color: var(--neg); }
.callhint--cold .ico { color: #3fa7c9; }
.oedit { margin-top: 10px; } .oedit summary { cursor: pointer; font-size: 12.5px; color: var(--acc-txt); font-weight: 500; } .oedit .pform { margin-top: 10px; }
.contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.touch { display: grid; gap: 10px; }
.touch textarea { width: 100%; border: 1px solid var(--line); background: rgb(255 255 255 / .55); color: var(--ink); border-radius: 12px; padding: 10px 12px; font: 400 14px/1.45 Golos, system-ui, sans-serif; resize: vertical; outline: none; }
:root[data-theme="dark"] .touch textarea { background: rgb(255 255 255 / .05); }
.touch textarea:focus { border-color: var(--accent); }
.chip .ico { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.fld--wide { grid-column: 1 / -1; }
.chist { padding: 0; display: grid; gap: 0; }
.chist li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chist li:last-child { border-bottom: 0; }
.chist__i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--acc-txt); }
.chist__i .ico { width: 14px; height: 14px; }
.chist p { font-size: 13.5px; margin-top: 2px; }
.linkish { color: var(--acc-txt); text-decoration: underline; font-weight: 500; }
@media (max-width: 900px) {
  .mstages { display: flex; }
  .kanban { grid-template-columns: 1fr; overflow: visible; }
  .kcol:not(.is-current) { display: none; }
  .crow { grid-template-columns: minmax(0, 1fr) auto; }
  .crow__next { grid-column: 1; }
  .crow__qa { grid-column: 2; grid-row: 2; }
}

/* =========================================================
   Журнал действий
   ========================================================= */
.jpeople { display: grid; gap: 4px; }
.jperson { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 14px; transition: background .2s; }
.jperson:hover { background: var(--sunk); }
.jperson.is-on { background: var(--accent-soft); }
.jperson > div { display: grid; gap: 2px; min-width: 0; }
.jperson b { font-weight: 600; font-size: 14px; }
.jperson .dim { font-size: 12px; }
.jperson__n { font: 600 16px 'Roboto Mono', ui-monospace, monospace; }
.jbar { display: block; height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; }
.jbar u { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.jday { margin-top: 18px; }
.jday__h { display: flex; gap: 8px; align-items: baseline; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; text-transform: capitalize; }
.jfeed { padding: 0; display: grid; }
.jfeed li { list-style: none; display: grid; grid-template-columns: 44px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.jfeed li:last-child { border-bottom: 0; }
.jfeed__t { font: 500 12px 'Roboto Mono', ui-monospace, monospace; color: var(--muted); }
.jfeed__b { min-width: 0; } .jfeed__b p { font-size: 13.5px; overflow-wrap: anywhere; } .jfeed__b .dim { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jtag { --t: var(--accent); display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--t); background: color-mix(in srgb, var(--t) 12%, transparent); }
.jtag .ico { width: 13px; height: 13px; }
@media (max-width: 760px) { .jfeed li { grid-template-columns: auto minmax(0, 1fr); } .jfeed__t { grid-column: 1 / -1; } .jtag { grid-column: 2; justify-self: start; } }

/* =========================================================
   Материалы
   ========================================================= */
.sales { padding: 0; display: grid; gap: 10px; }
.sales li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: var(--sunk); }
.sales i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: 13px; background: var(--accent); color: #fff; }
.sales b { font-weight: 600; } .sales p { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.brandgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bcard { margin: 0; border-radius: 16px; overflow: hidden; background: var(--sunk); display: grid; }
.bcard__img { aspect-ratio: 4 / 3; display: grid; place-items: center; background: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 18px 18px; padding: 16px; }
.bcard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bcard figcaption { display: grid; gap: 4px; padding: 12px; }
.bcard .btn { justify-self: start; margin-top: 6px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sw { display: grid; gap: 4px; text-align: left; padding: 8px; border-radius: 14px; background: var(--sunk); transition: transform .2s var(--ease); }
.sw:hover { transform: translateY(-2px); }
.sw i { height: 56px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); }
.sw b { font-size: 13px; font-weight: 600; }
.fonts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fontcard { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--sunk); }

/* =========================================================
   Финансы
   ========================================================= */
.fin__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.fin__main { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, #2f8f5b 14%, transparent), transparent); }
.fin__sum { font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.fin__sum small { font-size: .55em; margin-left: 4px; color: var(--muted); }
.fin__bar { position: relative; height: 12px; border-radius: 99px; background: repeating-linear-gradient(135deg, var(--line) 0 2px, transparent 2px 6px); }
.fin__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #3fbf7f, #2f8f5b); box-shadow: 0 4px 12px -4px rgb(47 143 91 / .6); }
.fin__bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.fin__meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.fin__meta .pos { color: var(--pos); font-weight: 600; } .fin__meta .neg { color: var(--neg); font-weight: 600; }
.fin__kpis { display: grid; gap: 8px; }
.fin__kpis > div { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 14px; background: var(--sunk); }
.fin__kpis b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; grid-row: 1 / span 2; grid-column: 2; align-self: center; white-space: nowrap; }
.fin__kpis .dim { grid-column: 1; }
.fin__chart { margin-top: 14px; }
.fin__by { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fin__src { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--sunk); font-size: 12.5px; }
.fin__src i { width: 8px; height: 8px; border-radius: 50%; }
.fin__src b { font-weight: 600; margin-left: 2px; }
.fin__note { margin-top: 10px; }
@media (max-width: 760px) { .fin__top { grid-template-columns: 1fr; } }

/* ---------- потоки ---------- */
.seg-ctl button .ico { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; margin-right: 2px; }
.fstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr); gap: 10px; margin: 6px 0 20px; }
.fstat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: rgb(22 12 70 / .32); border: 1px solid rgb(255 255 255 / .18); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); color: #fff; }
.fstat b { font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.fstat span { font-size: 14px; font-weight: 600; }
.fstat small { font-size: 12px; color: rgb(255 255 255 / .75); }
.fstat--hi b { color: var(--hi); }
.fstats--light .fstat { background: var(--sunk); border-color: var(--edge-2); color: var(--ink); box-shadow: inset 0 1px 0 var(--edge); }
.fstats--light .fstat small { color: var(--muted); }
.fstats--light .fstat:first-child b { color: var(--acc-txt); }
.fcards { display: grid; gap: 8px; }
.fcard { display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 16px; background: var(--sunk); border: 1.5px solid transparent; transition: transform .25s var(--ease), border-color .2s; }
.fcard:hover { transform: translateY(-2px); border-color: var(--line); }
.fcard.is-open { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.fcard__t { font-size: 16px; font-weight: 600; }
.fcard__f { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; }
.fsearch { margin: 0 0 14px; max-width: 420px; }
.ages { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 4px 0; }
.age { flex: 1; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; height: 100%; gap: 4px; }
.age i { align-self: end; width: min(100%, 48px); border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, #8f82ff, #6a5ac7); }
.age b { font-weight: 600; } .age span { font-size: 11.5px; color: var(--muted); }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pcard { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 16px 12px; border-radius: 16px; background: var(--sunk); transition: transform .25s var(--ease); }
.pcard:hover { transform: translateY(-2px); }
.pcard b { font-weight: 600; }
.sched { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sday { padding: 12px; border-radius: 16px; background: var(--sunk); display: grid; gap: 6px; }
.sday__h { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.sday__h i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-style: normal; font-weight: 600; }
.sslot { display: flex; gap: 10px; font-size: 13px; } .sslot span { font: 500 12px 'Roboto Mono', monospace; color: var(--muted); width: 44px; }
.projs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.proj { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--sunk); }
.proj b { font-size: 15px; font-weight: 600; }
.proj__place { justify-self: start; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--hi); color: var(--hi-ink); }
@media (max-width: 760px) { .fstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fstat--wide { grid-column: 1 / -1; } .fstat { padding: 10px 12px; } .fstat b { font-size: 26px; } .fstat span { font-size: 12.5px; } .fstat small { display: none; } }
.progs { display: grid; gap: 6px; }
.prog { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--sunk); }
.prog__n { display: grid; min-width: 0; } .prog__n b { font-weight: 600; }
.fld--price { gap: 2px; } .fld--price input { height: 34px; }
.admgrid .ihead + .dim { margin-bottom: 18px; }
@media (max-width: 760px) { .prog { grid-template-columns: 1fr auto; } .prog__n { grid-column: 1 / -1; } }

/* =========================================================
   Раскладка с боковым меню: в шапке только логотип, поиск и профиль
   ========================================================= */
.app { grid-template-columns: 236px minmax(0, 1fr); column-gap: 24px; padding: 16px 22px 26px 16px; }
.top { grid-column: 1 / -1; grid-template-columns: 236px minmax(0, 1fr) auto; gap: 24px; }
.burger { display: none; }
.brand { padding-left: 10px; }
.gsearch { justify-self: start; display: flex; align-items: center; gap: 10px; width: min(560px, 100%); height: 46px; padding: 0 8px 0 16px; border-radius: 999px; color: var(--muted); font-size: 14px; text-align: left;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow); transition: box-shadow .2s, color .2s; }
.gsearch:hover { color: var(--ink); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), var(--glass-shadow); }
.gsearch span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsearch kbd { font: 600 12px 'Roboto Mono', monospace; padding: 4px 9px; border-radius: 8px; background: var(--chip); color: var(--ink-2); }

.side { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 12px; max-height: calc(100dvh - 108px); }
.side__nav { display: grid; gap: 14px; padding: 10px; border-radius: 24px; overflow-y: auto; scrollbar-width: none;
  background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2), var(--glass-shadow); }
.side__nav::-webkit-scrollbar { display: none; }
.side__g { display: grid; gap: 2px; }
.side__h { padding: 4px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side__i { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14px; transition: background .2s, color .2s; }
.side__i .ico { width: 19px; height: 19px; flex: none; color: var(--muted); transition: color .2s; }
.side__i span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__i:hover { background: var(--sunk); color: var(--ink); }
.side__i:hover .ico { color: var(--ink); }
.side__i[aria-current] { background: var(--ink); color: var(--on-ink); box-shadow: 0 8px 18px -10px rgb(33 31 32 / .5); }
.side__i[aria-current] .ico { color: var(--on-ink); }
.side__i .badge { margin: 0; }
.side__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hi) 30%, transparent); flex: none; }
.side__sub { display: grid; gap: 1px; margin: 2px 0 6px 20px; padding-left: 12px; border-left: 1.5px solid var(--line); }
.side__sub a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 13px; transition: background .2s; }
.side__sub a span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__sub a:hover { background: var(--sunk); }
.side__sub a[aria-current] { background: var(--accent-soft); color: var(--acc-txt); font-weight: 600; }
.side__sub em { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: var(--hi); color: var(--hi-ink); }
.side__sub em.is-arch { background: var(--chip); color: var(--muted); }
.side__foot { padding: 0 2px; }

/* переключатель темы: бегунок плавно едет под выбранной кнопкой */
.tswitch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2); }
.tswitch button { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: color .35s var(--ease); }
.tswitch button .ico { width: 15px; height: 15px; }
.tswitch button[aria-pressed="true"] { color: var(--on-ink); }
.tswitch__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--ink); box-shadow: 0 6px 14px -8px rgb(33 31 32 / .6); transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.tswitch[data-on="dark"] .tswitch__thumb { transform: translateX(100%); }

@media (max-width: 1100px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .top { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; }
  .burger { display: grid; width: 44px; height: 44px; background: var(--glass-float); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2); }
  .brand { padding-left: 0; }
  .gsearch { justify-self: stretch; width: auto; }
  .side { position: fixed; z-index: 80; top: 10px; left: 10px; bottom: 10px; width: min(300px, calc(100% - 40px)); max-height: none; transform: translateX(calc(-100% - 20px)); transition: transform .45s var(--ease); }
  .side__nav { flex: 1; background: var(--card-solid); }
  body.side-open .side { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 79; background: rgb(20 18 20 / .3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
}
@media (max-width: 640px) {
  .gsearch span { display: none; } .gsearch kbd { display: none; } .gsearch { width: 44px; padding: 0; justify-content: center; justify-self: end; }
  .top { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .me div { display: none; }
}
/* цифры внутри плашек: правила подписи не должны задевать сам счётчик */
.fstat span { font-size: inherit; font-weight: inherit; }
.fstat > span { font-size: 14px; font-weight: 600; }
.hero__stats span { font-size: inherit; color: inherit; font-weight: inherit; }
.hero__stats > div > span { font-size: 12.5px; color: rgb(255 255 255 / .9); font-weight: 500; }
/* пункты меню: подпись сжимается, бейдж и метки остаются видны целиком */
.side__i span, .side__sub a span { min-width: 0; }
.side__i, .side__sub a { min-width: 0; overflow: hidden; }
.side__i .badge, .side__sub em { flex: none; }

/* ---------- заметки 29.10: цифры в шапках разделов, теги, профиль, графики ---------- */
.hstats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.hstat { display: inline-flex; align-items: baseline; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--glass); box-shadow: inset 0 1px 0 var(--edge), inset 0 0 0 1px var(--edge-2); align-items: center; }
.hstat b { font: 600 15px 'Roboto Mono', ui-monospace, monospace; color: var(--ink); }
.hstat .ico { width: 15px; height: 15px; color: var(--acc-txt); }
.hstat--acc { background: var(--accent-soft); color: var(--acc-txt); } .hstat--acc b { color: var(--acc-txt); }
.hstat--pos b { color: var(--pos); }
.hstat--mute { color: var(--muted); }
.tag--open { background: var(--hi); color: var(--hi-ink); }
.tag--arch { background: color-mix(in srgb, #e2a03d 20%, transparent); color: #9a6410; }
:root[data-theme="dark"] .tag--arch { color: #f0c47e; }
.tag--pos { background: color-mix(in srgb, var(--pos) 16%, transparent); color: var(--pos); }
.hero__chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.hero__chips span { padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / .18); color: #fff; font-weight: 600; font-size: 12.5px; }
.netbig { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.netbig i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.netbig .ico { width: 16px; height: 16px; }
.mid--xl { font-size: 34px; margin: 6px 0 2px; }
.flead { display: flex; align-items: center; gap: 14px; margin: -2px 0 16px; padding: 12px 16px; }
.flead > div { display: grid; gap: 2px; }
.flead__t { font-size: 14px; font-weight: 600; color: var(--ink); }
.flead b { font-size: 30px; }
.mcard { display: grid; justify-items: center; text-align: center; gap: 6px; align-content: start; }
.mcard__n { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.mcard__r { margin-top: 0 !important; }
.mstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 12px 0 6px; }
.mstats > div { display: grid; padding: 10px 6px; border-radius: 14px; background: var(--sunk); }
.mstats b { font: 600 20px 'Roboto Mono', monospace; } .mstats span { font-size: 11.5px; color: var(--muted); }
.mcard__h { margin-top: 4px; }
.lc__line.is-dash { stroke-dasharray: 5 5; stroke-dashoffset: 0; animation: lcFade .8s .4s both; opacity: .9; }
.cbar .sel { flex: none; }
/* шапка таблицы: закреплённый столбец без тени и в цвет строки заголовка */
.ltable thead th.end { box-shadow: none !important; background: var(--sunk-solid); border-radius: 0 12px 12px 0; }
.ltable thead th.sticky { border-radius: 12px 0 0 12px; }

.mid-of em { font-style: normal; }
@media (max-width: 860px) {
  .netc .mid-of em, .netc .card__h .tag { display: none; }
  .netc .mid--xl { font-size: 26px; }
  .netbig { font-size: 12.5px; gap: 6px; } .netbig i { width: 24px; height: 24px; border-radius: 8px; } .netbig .ico { width: 13px; height: 13px; }
}
/* логотип: знак, слово и CRM на одной оси — центр строчных букв совпадает с центром знака и шапки */
.brand { gap: 7px; align-items: center; }
.brand__mark { width: 34px; height: 32px; margin: 0; }
.brand__word { font-size: 26px; line-height: 1; transform: translateY(-3px); }
.brand__crm { height: 18px; padding: 0 6px; margin-left: 1px; transform: none; font-size: 10px; letter-spacing: .1em; border-radius: 5px; }

/* правило: подписи не сокращаем многоточием — переносим на следующую строку */
.fmt__s, .funnel__l span, .funnel__r span, .conv__n, .person > div > .dim, .frow b, .csum span, .tm__p small, .jfeed__b .dim, .side__i span, .side__sub a span, .crow__sub .dim, .lcard__m {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word;
}
.csum span { line-height: 1.3; margin-top: 2px; }
.csum > div { align-content: start; }
.side__i { height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; }
.side__sub a { height: auto; min-height: 34px; padding-top: 7px; padding-bottom: 7px; line-height: 1.25; }
.funnel__l, .funnel__r { height: auto; min-height: 54px; padding: 4px 0; }
/* главная цифра воронки: процент и пояснение по одной средней линии */
.flead { align-items: center; }
.flead b { line-height: 1; display: inline-flex; align-items: center; min-width: 64px; }
.flead > div { align-self: center; }

/* счётчики всегда наследуют размер и цвет числа, в котором стоят */
span[data-count] { font: inherit !important; color: inherit !important; letter-spacing: inherit !important; margin: 0 !important; display: inline !important; white-space: nowrap; }

/* Таблицы: карточка с таблицей непрозрачная, иначе закреплённые столбцы выглядят заплатками
   на стекле. Шапка, наведение и новые заявки — один цвет во всех ячейках строки */
.card:has(.ltable) { background: var(--card-solid); }
.ltable { --row-h: color-mix(in srgb, var(--ink) 4.5%, var(--card-solid)); --row-new: color-mix(in srgb, var(--accent) 6%, var(--card-solid)); }
.ltable thead th, .ltable thead th.sticky, .ltable thead th.end { background: var(--row-h); }
.ltable tbody tr:hover td, .ltable tbody tr:hover td.sticky, .ltable tbody tr:hover td.end { background-color: var(--row-h); }
.ltable tr.is-new td, .ltable tr.is-new td.sticky, .ltable tr.is-new td.end { background-color: var(--row-new); }
.ltable tr.is-new:hover td { background-color: color-mix(in srgb, var(--accent) 10%, var(--card-solid)); }

/* Сегодняшний день в контент-плане — метка без разделителя */
.day__h b { display: grid; gap: 1px; min-width: 0; line-height: 1.2; }
.day__now { font-size: 11px; font-weight: 600; color: var(--acc-txt); }

/* Каскад во всех разделах: списки, карточки, цифры появляются по очереди.
   При первом показе раздела — вслед за своей карточкой, при смене вкладки или фильтра — сразу */
 .stag > *,  .jpeople > *,  .jfeed > *,  .flist > *,  .brandgrid > *,  .swatches > *,  .fonts > *,  .crows > *,  .kanban > *,  .lcards > *,  .days > *,  .tlist > *,  .kpis > *,  .people > *,  .progs > *,  .fcards > *,  .pcards > *,  .sched > *,  .projs > *,  .ages > *,  .fstats > * { --j: 0; }
 .stag > :nth-child(2),  .jpeople > :nth-child(2),  .jfeed > :nth-child(2),  .flist > :nth-child(2),  .brandgrid > :nth-child(2),  .swatches > :nth-child(2),  .fonts > :nth-child(2),  .crows > :nth-child(2),  .kanban > :nth-child(2),  .lcards > :nth-child(2),  .days > :nth-child(2),  .tlist > :nth-child(2),  .kpis > :nth-child(2),  .people > :nth-child(2),  .progs > :nth-child(2),  .fcards > :nth-child(2),  .pcards > :nth-child(2),  .sched > :nth-child(2),  .projs > :nth-child(2),  .ages > :nth-child(2),  .fstats > :nth-child(2) { --j: 1; }
 .stag > :nth-child(3),  .jpeople > :nth-child(3),  .jfeed > :nth-child(3),  .flist > :nth-child(3),  .brandgrid > :nth-child(3),  .swatches > :nth-child(3),  .fonts > :nth-child(3),  .crows > :nth-child(3),  .kanban > :nth-child(3),  .lcards > :nth-child(3),  .days > :nth-child(3),  .tlist > :nth-child(3),  .kpis > :nth-child(3),  .people > :nth-child(3),  .progs > :nth-child(3),  .fcards > :nth-child(3),  .pcards > :nth-child(3),  .sched > :nth-child(3),  .projs > :nth-child(3),  .ages > :nth-child(3),  .fstats > :nth-child(3) { --j: 2; }
 .stag > :nth-child(4),  .jpeople > :nth-child(4),  .jfeed > :nth-child(4),  .flist > :nth-child(4),  .brandgrid > :nth-child(4),  .swatches > :nth-child(4),  .fonts > :nth-child(4),  .crows > :nth-child(4),  .kanban > :nth-child(4),  .lcards > :nth-child(4),  .days > :nth-child(4),  .tlist > :nth-child(4),  .kpis > :nth-child(4),  .people > :nth-child(4),  .progs > :nth-child(4),  .fcards > :nth-child(4),  .pcards > :nth-child(4),  .sched > :nth-child(4),  .projs > :nth-child(4),  .ages > :nth-child(4),  .fstats > :nth-child(4) { --j: 3; }
 .stag > :nth-child(5),  .jpeople > :nth-child(5),  .jfeed > :nth-child(5),  .flist > :nth-child(5),  .brandgrid > :nth-child(5),  .swatches > :nth-child(5),  .fonts > :nth-child(5),  .crows > :nth-child(5),  .kanban > :nth-child(5),  .lcards > :nth-child(5),  .days > :nth-child(5),  .tlist > :nth-child(5),  .kpis > :nth-child(5),  .people > :nth-child(5),  .progs > :nth-child(5),  .fcards > :nth-child(5),  .pcards > :nth-child(5),  .sched > :nth-child(5),  .projs > :nth-child(5),  .ages > :nth-child(5),  .fstats > :nth-child(5) { --j: 4; }
 .stag > :nth-child(6),  .jpeople > :nth-child(6),  .jfeed > :nth-child(6),  .flist > :nth-child(6),  .brandgrid > :nth-child(6),  .swatches > :nth-child(6),  .fonts > :nth-child(6),  .crows > :nth-child(6),  .kanban > :nth-child(6),  .lcards > :nth-child(6),  .days > :nth-child(6),  .tlist > :nth-child(6),  .kpis > :nth-child(6),  .people > :nth-child(6),  .progs > :nth-child(6),  .fcards > :nth-child(6),  .pcards > :nth-child(6),  .sched > :nth-child(6),  .projs > :nth-child(6),  .ages > :nth-child(6),  .fstats > :nth-child(6) { --j: 5; }
 .stag > :nth-child(n+7),  .jpeople > :nth-child(n+7),  .jfeed > :nth-child(n+7),  .flist > :nth-child(n+7),  .brandgrid > :nth-child(n+7),  .swatches > :nth-child(n+7),  .fonts > :nth-child(n+7),  .crows > :nth-child(n+7),  .kanban > :nth-child(n+7),  .lcards > :nth-child(n+7),  .days > :nth-child(n+7),  .tlist > :nth-child(n+7),  .kpis > :nth-child(n+7),  .people > :nth-child(n+7),  .progs > :nth-child(n+7),  .fcards > :nth-child(n+7),  .pcards > :nth-child(n+7),  .sched > :nth-child(n+7),  .projs > :nth-child(n+7),  .ages > :nth-child(n+7),  .fstats > :nth-child(n+7) { --j: 6; }
@keyframes riseAnim { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.view.is-in:not(.no-anim) .stag > *, .view.is-in:not(.no-anim) .jpeople > *, .view.is-in:not(.no-anim) .jfeed > *, .view.is-in:not(.no-anim) .flist > *, .view.is-in:not(.no-anim) .brandgrid > *, .view.is-in:not(.no-anim) .swatches > *, .view.is-in:not(.no-anim) .fonts > *, .view.is-in:not(.no-anim) .crows > *, .view.is-in:not(.no-anim) .kanban > *, .view.is-in:not(.no-anim) .lcards > *, .view.is-in:not(.no-anim) .days > *, .view.is-in:not(.no-anim) .tlist > *, .view.is-in:not(.no-anim) .kpis > *, .view.is-in:not(.no-anim) .people > *, .view.is-in:not(.no-anim) .progs > *, .view.is-in:not(.no-anim) .fcards > *, .view.is-in:not(.no-anim) .pcards > *, .view.is-in:not(.no-anim) .sched > *, .view.is-in:not(.no-anim) .projs > *, .view.is-in:not(.no-anim) .ages > *, .view.is-in:not(.no-anim) .fstats > * { animation: riseAnim .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 140ms + var(--j) * 45ms); }
.view.is-swap .stag > *, .view.is-swap .jpeople > *, .view.is-swap .jfeed > *, .view.is-swap .flist > *, .view.is-swap .brandgrid > *, .view.is-swap .swatches > *, .view.is-swap .fonts > *, .view.is-swap .crows > *, .view.is-swap .kanban > *, .view.is-swap .lcards > *, .view.is-swap .days > *, .view.is-swap .tlist > *, .view.is-swap .kpis > *, .view.is-swap .people > *, .view.is-swap .progs > *, .view.is-swap .fcards > *, .view.is-swap .pcards > *, .view.is-swap .sched > *, .view.is-swap .projs > *, .view.is-swap .ages > *, .view.is-swap .fstats > * { animation: riseAnim .5s var(--ease) both; animation-delay: calc(var(--j) * 35ms); }
/* при смене вкладки обновляется содержимое карточки, сами вкладки остаются на месте */
.view.is-swap .card:not(:has(.seg-ctl, .chips)), .view.is-swap .card:has(.seg-ctl, .chips) > :not(:has(.seg-ctl, .chips)):not(.seg-ctl):not(.chips):not(.ihead):not(.search) { animation: riseAnim .45s var(--ease) both; }
.view.is-in:not(.no-anim) .ages .age i, .view.is-swap .ages .age i { transform-origin: bottom; animation: ageGrow .7s var(--ease) both; animation-delay: calc(var(--j) * 50ms + 200ms); }
@keyframes ageGrow { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .view.is-in *, .view.is-swap * { animation: none !important; } }

/* Кнопки в шапке разделов: переключатель и кнопка одной высоты, на одной линии */
.head .tools .seg-ctl { margin: 0; height: 36px; align-items: stretch; }
.head .tools .seg-ctl button { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; }
.head .tools .seg-ctl button .ico { width: 15px; height: 15px; }
.day__add { margin-left: auto; width: 26px; height: 26px; flex: none; }
.day__h { min-height: 26px; }
/* сумма в плашке потока не переносится: «98 тыс. ₽» уменьшается под ширину плашки */
.fstat { container-type: inline-size; }
.fstat > b { white-space: nowrap; }
.fstat--wide > b { font-size: min(clamp(30px, 3.2vw, 44px), 19cqi); }
@media (max-width: 760px) { .fstat--wide > b { font-size: min(26px, 12cqi); } }
/* переключатель недели — в одну строку и той же высоты, что кнопки рядом */
.head .tools .wk { height: 36px; padding: 3px; }
.head .tools .wk > div { display: flex; align-items: baseline; justify-content: center; gap: 6px; white-space: nowrap; padding: 0 6px; }
.head .tools .wk .ibtn { width: 30px; height: 30px; }
/* телефон: плашки потока ровные, подписи с одной линии, кнопки во всю ширину */
@media (max-width: 760px) {
  .fstat { align-content: start; }
  .fstat > span { font-size: 12px; line-height: 1.25; }
  .hero:has(.fstats) .hero__cta { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .hero:has(.fstats) .hero__cta .btn { width: 100%; }
}

/* ===== боевая CRM: вход, клуб в разработке, загрузка файлов, бренд, мелочи ===== */
.boot { padding: 40px 0; text-align: center; color: var(--hi); background: none; font: 500 13px/1 var(--f-mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: lowercase; }
:root:not([data-theme="dark"]) .boot { color: var(--accent); }
html.is-busy { cursor: progress; }
.mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; }
.warn-t { color: var(--neg); font-weight: 500; }
.prow--between { justify-content: space-between; align-items: center; }
.sel--wide { display: flex; width: 100%; } .sel--wide select { width: 100%; }
.seg-ctl--sub { margin: 4px 0 12px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-ctl--sub::-webkit-scrollbar { display: none; }

/* экран входа и «нет доступа» */
body.is-gate .app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-content: center; min-height: 100dvh; place-items: center; padding: 16px; }
.gate { width: 100%; display: grid; place-items: center; }
.gate__box { width: min(440px, 100%); background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 32px 28px; display: grid; gap: 12px; justify-items: start; }
.gate__box h1 { font-size: clamp(22px, 5vw, 28px); line-height: 1.15; text-wrap: balance; margin: 0; }
.gate__box p { margin: 0; text-wrap: pretty; }
.gate__mark { width: 44px; height: 41px; color: var(--accent); }
.gate__warn { color: var(--neg); font-weight: 500; }

/* клуб: виден, но закрыт до запуска */
.side__i.is-locked > span { color: var(--muted); }
.side__soon { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font: 500 10.5px/1 inherit; font-style: normal; color: var(--ink-2); background: var(--chip); padding: 4px 7px; border-radius: 999px; }
.locked { position: relative; min-height: 340px; overflow: hidden; display: grid; place-items: center; }
.locked__blur { position: absolute; inset: 20px; display: grid; gap: 14px; filter: blur(9px); opacity: .55; pointer-events: none; }
.locked__row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.locked__row i { height: 84px; border-radius: var(--r-in); background: linear-gradient(135deg, var(--accent-soft), var(--chip)); }
.locked__msg { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 360px; padding: 24px; background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: var(--r-card); box-shadow: var(--shadow); }
.locked__msg .ico { color: var(--accent); }
.locked__msg b { font-size: 18px; }
.locked__msg span { color: var(--muted); text-wrap: pretty; }

/* загрузка файла: полоска прогресса */
.upl { position: relative; height: 34px; border-radius: var(--r-in); background: var(--sunk); overflow: hidden; margin: 10px 0; }
.upl i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-soft); transition: width .2s var(--ease); }
.upl span { position: relative; display: block; padding: 0 12px; line-height: 34px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* соцсети в контент-плане — настоящие значки */
.net .ico--net { width: 15px; height: 15px; color: var(--c); flex: none; }
.netbig i .ico { width: 20px; height: 20px; }

/* бренд: Figma и кнопки скачивания */
.figma { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 4px 0 12px; border-radius: var(--r-in); background: var(--sunk); color: inherit; text-decoration: none; }
.figma > span:not(.figma__go) { display: grid; gap: 2px; min-width: 0; }
.figma__go { margin-left: auto; color: var(--acc-txt); white-space: nowrap; font-weight: 500; }
.bcard__img { border: 0; padding: 0; width: 100%; cursor: zoom-in; }
.bcard__img.is-light { background: #f3efec; }
.bcard__dl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bcard__dl .chip { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.bcard__dl small { color: var(--muted); }

/* скрипт звонка в карточке заявки */
.scriptbox { margin-top: 10px; max-height: 60vh; overflow: auto; border-radius: var(--r-in); }


/* телефон и Telegram: кнопки под палец — не меньше 36 px; галочки и «+» остаются маленькими на вид, но с зоной нажатия побольше */
@media (pointer: coarse) {
  .btn--sm { height: 36px; padding: 0 13px; font-size: 13px; }
  .ibtn--sm { width: 36px; height: 36px; }
  .tcheck, .day__add { position: relative; }
  .tcheck::before, .day__add::before { content: ''; position: absolute; inset: -9px; }
  .head .tools .wk { height: 44px; } .wk .ibtn, .head .tools .wk .ibtn { width: 38px; height: 38px; }
  .btn.btn--text.btn--sm { height: 36px; }
}
/* списки не шире экрана: длинные варианты («Стартрек Лабс: Брендинг и маркетинг · 31 октября 2026») обрезаются многоточием */
.sel { max-width: 100%; min-width: 0; }
.sel select { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 760px) { .cbar .sel, .fbar .sel { flex: 1 1 100%; } .cbar .sel select, .fbar .sel select { width: 100%; } }
/* действия в карточке заявки: ровная сетка, а не кнопки друг на друге */
.lacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.lacts .btn { width: 100%; justify-content: center; }
.lacts .lacts__link { grid-column: 1 / -1; justify-self: start; }
/* наборы чипов (статусы, люди, сроки, роли): воздух между кнопками и строками */
.chipset, .pchips { gap: 10px 8px; }

/* ===== телефон и Telegram: шапка всегда под рукой, меню в пределах экрана, карточка не уезжает вбок ===== */
@media (max-width: 860px) {
  /* шапка закреплена сверху: меню, поиск и профиль доступны при любой прокрутке */
  .top { position: sticky; top: 0; z-index: 40; padding: 8px 0; }
  .top::before { display: block; inset: -12px -14px 0; border-radius: 0 0 22px 22px; opacity: 0; transition: opacity .25s; background: color-mix(in srgb, var(--frame) 88%, transparent); }
  html.is-stuck .top::before { opacity: 1; }
}
@media (max-width: 1100px) {
  /* меню не выше экрана и прокручивается само, страница под ним стоит */
  .side { height: auto; max-height: calc(100dvh - 20px - var(--tg-safe-area-inset-bottom, 0px)); }
  .side__nav { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body.side-open { overflow: hidden; }
}
/* карточка: только вертикальная прокрутка; длинные адреса, ссылки и почта переносятся */
.drawer__p { overflow-x: hidden; overscroll-behavior: contain; }
.drawer__p :is(dd, p, a, b, span, .note, .hist__i) { overflow-wrap: anywhere; }
/* логотип в шапке телефона: знак и слово на одной линии, как на компьютере */
@media (max-width: 640px) {
  .brand { gap: 6px; height: 44px; align-items: center; }
  .brand__mark { width: 30px; height: 28px; }
  .brand__word { font-size: 24px; line-height: 1; transform: translateY(-2px); }
}
/* карточка задачи: текст правится на месте, настройки — отдельным блоком */
.ttl-btn { margin-top: 10px; }
.ttl-form { margin-top: 6px; }
.ttl-form textarea { width: 100%; font: 600 19px/1.3 inherit; padding: 12px 14px; border-radius: var(--r-in); border: 1px solid var(--accent); background: var(--card-solid); color: var(--ink); resize: vertical; }
.ptitle--sec { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  /* как на компьютере: знак, «стартрек» и метка CRM */
  .brand__crm { display: inline-grid; height: 17px; padding: 0 5px; font-size: 9.5px; margin-left: 2px; transform: translateY(-1px); }
}
@media (max-width: 350px) { .brand__crm { display: none; } }
/* логотип на телефоне — точно как на компьютере: знак 34×32, «стартрек» 26 px, метка CRM 18 px, те же зазоры и смещения */
@media (max-width: 1100px) {
  .brand { gap: 7px; height: 46px; padding: 0; align-items: center; }
  .brand__mark { width: 34px; height: 32px; margin: 0; }
  .brand__word { font-size: 26px; line-height: 1; transform: translateY(-3px); }
  .brand__crm { display: inline-grid; height: 18px; padding: 0 6px; margin-left: 1px; font-size: 10px; letter-spacing: .1em; border-radius: 5px; transform: none; }
}
@media (max-width: 359px) { .brand__crm { display: none; } }
/* iOS (Safari и Telegram): у меню должна быть точная высота, иначе список пунктов схлопывается в полоску */
@media (max-width: 1100px) {
  .side { bottom: auto; max-height: none; height: calc(100vh - 20px); height: calc(100dvh - 20px - var(--tg-safe-area-inset-bottom, 0px)); }
  .side__nav { flex: 1 1 auto; min-height: 0; }
}


/* iOS: у выпадающих списков высота строки 1 обрезает низ букв — даём строке воздух */
.sel select { line-height: 1.35; padding-top: 0; padding-bottom: 0; }
@media (pointer: coarse) { .sel select { height: 40px; font-size: 14px; } }
/* этапы холодных заявок и другие чипы-переключатели — всегда в одну строку */
.mstages .chip, .chips button, .seg-ctl button { white-space: nowrap; }
/* обычные чипы переносятся внутри себя, если текст длиннее экрана («Стартрек Лабс: Брендинг и маркетинг · 31 октября») */
.chipset .chip, .pchips .pchip { max-width: 100%; white-space: normal; text-align: left; height: auto; min-height: 32px; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
.contacts { display: flex; flex-wrap: wrap; gap: 10px; }
/* «Добавить участника» и счётчик — отдельной строкой с отступом от карточек */
.tabbody > .prow--between { margin: 4px 0 16px; }

/* iOS: у полей даты своя минимальная ширина — в форме карточки они расширяли её на пару пикселей */
.drawer__p :is(input, select, textarea) { max-width: 100%; min-width: 0; box-sizing: border-box; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.pform > * { min-width: 0; }

/* iOS (Safari и Telegram): поле со шрифтом меньше 16 px при нажатии приближает всю страницу — после этого она ездит вбок и края обрезаны */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea, .sel select { font-size: 16px; }
  /* переключатели разделов и быстрые фильтры — под палец */
  .seg-ctl button { min-height: 34px; }
  .chips button { height: 36px; }
}
.bulk input[type="date"] { min-width: 150px; height: 36px; }

/* действия в карточке: одна кнопка на всю ширину, две — поровну; ссылка на чат — по левому краю, как весь текст карточки */
.lacts { display: flex; flex-wrap: wrap; }
.lacts .btn { flex: 1 1 150px; width: auto; }
.lacts .lacts__link { flex: 0 1 auto; width: auto; padding-left: 0; padding-right: 0; justify-content: flex-start; background: none; border: 0; box-shadow: none; }
/* дата среди чипов — вровень с ними */
.chipset input[type="date"] { height: 36px; padding: 0 12px; font-weight: 400; color: var(--muted); }

/* ПК: на экранах пониже меню становится плотнее и помещается целиком, последний пункт не обрезается */
@media (min-width: 1101px) and (max-height: 960px) {
  .side__nav { gap: 8px; padding: 8px; }
  .side__g { gap: 0; }
  .side__h { padding: 3px 10px 3px; }
  .side__i { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
  .side__sub a { min-height: 30px; padding-top: 4px; padding-bottom: 4px; }
  .side__sub { margin-bottom: 2px; }
}
@media (min-width: 1101px) { .side__nav { scrollbar-width: thin; } }

/* карточка задачи: ссылка на чат под кнопкой удаления — с отступом */
.prow--end + p { margin-top: 12px; }

/* главная: заявки, которые менеджер сам поставил на сегодня */
.hplan { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.hplan .ptitle { margin: 0 0 8px; }
.hplan__i { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 6px 0; text-align: left; border-bottom: 1px solid var(--line); }
.hplan__i:last-of-type { border-bottom: 0; }
.hplan__i b { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.hplan__i .st { flex: none; }
.hplan .linkish { display: inline-block; margin-top: 8px; }

/* тёмная тема: текстовые кнопки без плашки, как в светлой */
:root[data-theme="dark"] .btn--text { background: none; box-shadow: none; }
:root[data-theme="dark"] .btn--text:hover { background: var(--sunk); }

/* главная на ноутбуке: подпись «21 в работе» помещается в плашке направления */
.fmt__v { font-size: clamp(10px, 15cqi, 14px); }
@media (max-width: 1400px) { .fmts--on-hero .fmt { padding-left: 7px; padding-right: 7px; } }
/* узкий телефон: кнопка в заголовке карточки уходит на новую строку, заголовок не сжимается */
@media (max-width: 400px) { .ihead { flex-wrap: wrap; } .ihead__t { flex: 1 1 60%; min-width: 0; } }

/* планшет и телефон: поиск на всю строку, подсказка в поле не обрезается */
@media (max-width: 900px) { .fbar .search, .cbar .search { flex: 1 1 100%; width: 100%; } }
.search input { flex: 1; text-overflow: ellipsis; }

/* самые узкие телефоны (320–340 px): карточки и подписи укладываются в экран */
@media (max-width: 400px) {
  .lcards { grid-template-columns: minmax(0, 1fr); }
  .lcard, .kcard, .kcol, .kanban { min-width: 0; max-width: 100%; }
  .lcard > *, .kcard > * { min-width: 0; max-width: 100%; }
  .lcard .tag, .kcard .tag, .kcard__o > * { white-space: normal; max-width: 100%; }
  .kcard__o, .lcard__f, .lcard__h { flex-wrap: wrap; }
}
@media (max-width: 340px) {
  .fmt__v { white-space: normal; line-height: 1.25; }
  .kpi .mid { font-size: 19px; }
}

/* контент-план на самых узких телефонах: карточки сетей друг под другом */
@media (max-width: 340px) { .grid > .netc { grid-column: 1 / -1; } .netc .mid { white-space: normal; } }

/* ПК: при прокрутке текст страницы не просвечивает над шапкой */
@media (min-width: 861px) {
  .top::before { display: block; inset: -14px -14px 0; border-radius: 0 0 22px 22px; opacity: 0; transition: opacity .25s; background: color-mix(in srgb, var(--frame) 92%, transparent); }
  html.is-stuck .top::before { opacity: 1; }
}
/* телефоны уже 360 px: логотип меньше, чтобы не наезжал на кнопку поиска */
@media (max-width: 359px) {
  .top { gap: 6px; }
  .brand { gap: 4px; min-width: 0; }
  .brand__mark { width: 26px; height: 24px; }
  .brand__word { font-size: 21px; transform: translateY(-2px); }
}

/* смена темы: круг идёт один, без отдельных анимаций цвета у сотен элементов */
html.is-theming *:not(.tswitch__thumb), html.is-theming *::before, html.is-theming *::after { transition: none !important; }

/* контент-план на 320: подпись недели не раздвигает экран */
@media (max-width: 340px) { .head .tools .wk { max-width: 100%; } .head .tools .wk > div .dim { display: none; } }

/* холодные заявки: цифры сверху — фильтры */
.hstats--btn .hstat { cursor: pointer; transition: background .2s, box-shadow .2s, color .2s; }
.hstats--btn .hstat[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.hstats--btn .hstat[aria-pressed="true"] b { color: inherit; }
@media (pointer: coarse) { .hstats--btn .hstat { height: 36px; align-items: center; } }
/* красная подсказка и чипы под ней не слипаются */
.callhint + .chipset, .callhint + .pchips, .callhint + .contacts { margin-top: 12px; }
/* телефон: настоящая таблица с прокруткой вбок, имя всегда на виду */
@media (max-width: 900px) {
  .tbl-wrap:has(.ctable) { display: block; margin-inline: -4px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .ctable th:nth-child(2), .ctable td:nth-child(2) { position: sticky; left: 40px; z-index: 2; background: var(--card-solid); min-width: 132px; max-width: 150px; white-space: normal; }
  .ctable th.sticky, .ctable td.sticky { min-width: 40px; width: 40px; }
  /* воронка как на компьютере: колонки этапов, листаются пальцем */
  .mstages { display: none; }
  .kanban { grid-template-columns: repeat(7, minmax(232px, 78vw)); overflow-x: auto; max-width: 100%; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .kcol, .kcol:not(.is-current) { display: flex; scroll-snap-align: start; }
  /* фильтры по две в ряд */
  .cbar .sel { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .cbar .sel select { width: 100%; }
  .cbar .sel:first-of-type { flex-basis: 100%; }
}

/* холодные на телефоне: фильтры в один ряд, строка над таблицей короче, шапка таблицы одного цвета */
@media (max-width: 900px) {
  .cbar .sel, .cbar .sel:first-of-type { flex: 1 1 calc(50% - 4px); }
  .ctable-hint { display: none; }
  .ctable-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .ctable th:nth-child(2) { background: var(--sunk-solid); }
}

/* карточка человека без Telegram: подсказка и формы не слипаются */
.drawer__p .hint + form, .drawer__p .pbox + form, .drawer__p form + form, .drawer__p form + .pform, .drawer__p .pform + form { margin-top: 14px; }

/* меню и кнопки в столбик: между пунктами заметный зазор */
.side__g { gap: 6px; }
.side__sub { gap: 6px; }
.navmore { gap: 6px; }
.people, .jpeople { gap: 8px; }
@media (min-width: 1101px) and (max-height: 960px) {
  .side__g, .side__sub { gap: 4px; }
}

/* отметка «выполнено»: крупная, с галочкой, большая зона нажатия */
.trow { grid-template-columns: 36px minmax(0, 1fr) auto; }
.tlist--mini .trow { grid-template-columns: 36px minmax(0, 1fr); }
.tcheck { position: relative; width: 34px; height: 34px; border-radius: 11px; border: 2px solid var(--accent); background: transparent; color: var(--accent); display: inline-grid; place-items: center; transition: background .2s, color .2s, transform .15s var(--ease); }
.tcheck::after { content: ""; position: absolute; inset: -8px; }
.tcheck .ico { width: 18px; height: 18px; opacity: .45; transition: opacity .2s; }
.tcheck:hover:not(:disabled) { background: var(--accent-soft); }
.tcheck:hover:not(:disabled) .ico { opacity: 1; }
.tcheck:active:not(:disabled) { transform: scale(.92); }
.tcheck[aria-pressed="true"] .ico, .trow.is-leaving .tcheck .ico { opacity: 1; }
.tcheck:disabled { border-color: var(--line); color: var(--muted); }
@media (max-width: 760px) {
  .trow { grid-template-columns: 36px minmax(0, 1fr); }
}

/* кто отвечает за задачу: заметная плашка, своя выделена цветом */
.towner { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--sunk); max-width: 100%; min-width: 0; }
.towner.is-me { background: var(--accent-soft); }
.towner__t { display: grid; min-width: 0; line-height: 1.2; }
.towner__t small { font-size: 10.5px; color: var(--muted); }
.towner__t b { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.towner.is-me .towner__t b { color: var(--acc-txt); }

/* экран входа: только карточка на фоне страницы, логотип как в шапке */
body.is-gate { padding: 0; }
body.is-gate .app { max-width: none; width: 100%; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.gate__box { gap: 14px; }
.gate__brand { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--ink); }
.gate__brand .brand__crm { display: inline-grid; }
@media (max-width: 480px) {
  .gate__box { padding: 26px 22px; }
  .gate__box .btn { width: 100%; justify-content: center; }
}

/* экран входа: логотип крупнее, текст в две строки, кнопка во всю ширину */
body.is-gate .app { box-sizing: border-box; margin: 0; }
.gate__box { width: min(600px, 100%); padding: 36px; gap: 16px; }
.gate__box p { line-height: 1.6; text-wrap: wrap; }
.gate__box h1 { font-size: clamp(26px, 5vw, 32px); }
.gate__brand { gap: 8px; margin-bottom: 10px; }
.gate__brand .brand__mark { width: 46px; height: 43px; margin: 0; }
.gate__brand .brand__word { font-size: 34px; transform: translateY(4px); }
.gate__brand .brand__crm { height: 24px; padding: 0 8px; font-size: 12px; transform: translateY(4px); }
.gate__box .btn { width: 100%; height: 54px; justify-content: center; margin-top: 6px; font-size: 16px; font-weight: 600; }
@media (max-width: 480px) {
  .gate__box { padding: 26px 22px; }
  .gate__box p br { display: block; content: ""; margin-bottom: 6px; }
}

/* правки по заметкам: поиск, ссылки, строки, кнопки */
@media (hover: hover) and (pointer: fine) {
  .search input, .search--big input, .gsearch span { font-size: 13px; }
  .search--big { height: 38px; font-size: 13px; }
}
.btn--white::before, .btn--glass::before { display: none; }
#view > .pbox { margin-bottom: 18px; }
.hero--link .hero__num .big { display: inline-grid; place-items: center; min-width: 1.5em; padding: 2px 16px; border-radius: 18px; background: rgb(255 255 255 / .16); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .3); }
.me__role { white-space: nowrap; }
.top .pill.me, .top .me { width: max-content; flex: none; }
.me > div { min-width: max-content; }
@media (min-width: 901px) {
  .crow { grid-template-columns: minmax(0, 1.6fr) 158px minmax(0, 1fr) 118px; }
  .crow > .st { justify-self: start; }
  .crow__qa { justify-content: flex-end; }
}

/* шапка: панель при прокрутке не прижимает поиск к нижнему краю, знак по центру текста */
@media (min-width: 861px) {
  .top::before { bottom: -10px; }
  .brand__mark { transform: translateY(-3px); }
  .top > .brand, .top .me { translate: 0 -3px; }
}
/* вход по коду */
.gate__or { width: 100%; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.gate__or::before, .gate__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gate__form { width: 100%; display: grid; gap: 10px; }
.gate__form[hidden] { display: none; }
.gate__fld { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.gate__fld input { width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--sunk); color: var(--ink); outline: 0; }
.gate__fld input:focus { box-shadow: 0 0 0 2px var(--accent); }
.gate__fld input[name="code"] { letter-spacing: .3em; font-size: 20px; font-weight: 600; }
.gate__form small { font-size: 12px; }
.gate__form .btn { width: 100%; height: 50px; margin: 0; }
.gate__form .linkish { justify-self: center; font-size: 13px; }
.gate__theme { position: fixed; top: 16px; right: 16px; width: 200px; z-index: 2; }
@media (max-width: 760px) { .gate__theme { position: static; width: min(200px, 100%); margin: 0 auto 14px; } .gate { align-content: start; } }
.gate__form .linkish { border: 0; background: none; padding: 6px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gate__form .linkish:hover { color: var(--ink); }
.gate__box.is-code > p.dim, .gate__box.is-code > .btn, .gate__box.is-code > .gate__or { display: none; }
.gate__remember { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px; border-radius: 14px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); cursor: pointer; }
.gate__remember input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.gate__remember b { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.gate__remember small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink); opacity: .78; }
.brand .brand__crm { transform: translateY(3px); }
.gate__brand .brand__crm { transform: translateY(7px); }
}
