/* «Пульс» — в грамматике приложений Apple («Почта», «Файлы» на Mac и iPad):
   панель разделов → список → карточка выбранного в одном окне. Системный
   шрифт Apple, системные серые, один системный синий, вставные
   сгруппированные списки с тонкими разделителями; светлая и тёмная тема
   по настройке устройства. На не-Apple устройствах шрифт — Inter
   (самохостинг, fonts/, SIL OFL). Решение владельца 2026-10-11. */

@font-face { font-family: "Onest"; src: url("fonts/onest-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("fonts/onest-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Inter"; src: url("fonts/inter-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  /* семья RUBYKZ TASK: Onest для текста, Unbounded для заголовков и цифр */
  --font: "Onest", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Onest", -apple-system, system-ui, sans-serif;

  --bg: #F4F4F1;
  --surface: #FFFFFF;
  --surface-2: #F8F8F6;
  --side: #F4F4F1;
  --bar: rgb(244 244 241 / 0.82);
  --text: #0D0F13;
  --muted: #6B6E76;
  --faint: #A3A5AB;
  --line: rgb(14 17 22 / 0.08);
  --line-strong: rgb(14 17 22 / 0.14);
  --fill: rgb(14 17 22 / 0.05);
  --fill-2: rgb(14 17 22 / 0.09);
  --accent: #2F54EB;
  --accent-press: #2443C9;
  --accent-tint: rgb(47 84 235 / 0.1);
  --on-accent: #FFFFFF;
  --select: #FFFFFF;
  --ink-btn: #0D0F13;
  --ok: #12A150;      --ok-bg: rgb(18 161 80 / 0.1);
  --warn: #C27A00;    --warn-bg: rgb(194 122 0 / 0.1);
  --danger: #E5484D;  --danger-bg: rgb(229 72 77 / 0.1);
  --info: #7C4DDB;    --info-bg: rgb(124 77 219 / 0.1);
  --violet: #7C4DDB;  --sky: #2B8AC6;
  --seg-on: #FFFFFF;
  --chart-b: #A3A5AB;
  --glow: rgb(47 84 235 / 0.08);
  --shadow-card: 0 1px 0 rgb(14 17 22 / 0.04), 0 8px 24px -12px rgb(14 17 22 / 0.18);
  --shadow-pop: 0 18px 50px -12px rgb(0 0 0 / 0.25), 0 2px 8px rgb(0 0 0 / 0.06);
  --shadow-seg: 0 1px 3px rgb(0 0 0 / 0.1);
  --scrim: rgb(0 0 0 / 0.25);

  --r: 12px;
  --r-lg: 20px;
  --r-sheet: 22px;
  --side-w: 272px;
  --insp-w: 420px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080A;
    --surface: #111114;
    --surface-2: #16161A;
    --side: #08080A;
    --bar: rgb(8 8 10 / 0.82);
    --text: #F3F3F4;
    --muted: #8A8A93;
    --faint: #55555D;
    --line: rgb(255 255 255 / 0.07);
    --line-strong: rgb(255 255 255 / 0.13);
    --fill: rgb(255 255 255 / 0.06);
    --fill-2: rgb(255 255 255 / 0.1);
    --accent: #7B96FF;
    --accent-press: #95AAFF;
    --accent-tint: rgb(123 150 255 / 0.12);
    --on-accent: #0A0B10;
    --select: #16161A;
    --ink-btn: #F3F3F4;
    --ok: #3DD68C;      --ok-bg: rgb(61 214 140 / 0.12);
    --warn: #F5B041;    --warn-bg: rgb(245 176 65 / 0.12);
    --danger: #FF6369;  --danger-bg: rgb(255 99 105 / 0.13);
    --info: #B394FF;    --info-bg: rgb(179 148 255 / 0.13);
    --violet: #B394FF;  --sky: #5CC2F2;
    --seg-on: #26262C;
    --chart-b: #55555D;
    --glow: rgb(123 150 255 / 0.07);
    --shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px -16px rgb(0 0 0 / 0.7);
    --shadow-pop: 0 18px 50px -12px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.08);
    --shadow-seg: 0 1px 3px rgb(0 0 0 / 0.5);
    --scrim: rgb(0 0 0 / 0.55);
  }
}
/* Выбор темы в профиле (pulse:theme): data-theme на <html> перекрывает системную */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark;
    --bg: #08080A;
    --surface: #111114;
    --surface-2: #16161A;
    --side: #08080A;
    --bar: rgb(8 8 10 / 0.82);
    --text: #F3F3F4;
    --muted: #8A8A93;
    --faint: #55555D;
    --line: rgb(255 255 255 / 0.07);
    --line-strong: rgb(255 255 255 / 0.13);
    --fill: rgb(255 255 255 / 0.06);
    --fill-2: rgb(255 255 255 / 0.1);
    --accent: #7B96FF;
    --accent-press: #95AAFF;
    --accent-tint: rgb(123 150 255 / 0.12);
    --on-accent: #0A0B10;
    --select: #16161A;
    --ink-btn: #F3F3F4;
    --ok: #3DD68C;      --ok-bg: rgb(61 214 140 / 0.12);
    --warn: #F5B041;    --warn-bg: rgb(245 176 65 / 0.12);
    --danger: #FF6369;  --danger-bg: rgb(255 99 105 / 0.13);
    --info: #B394FF;    --info-bg: rgb(179 148 255 / 0.13);
    --violet: #B394FF;  --sky: #5CC2F2;
    --seg-on: #26262C;
    --chart-b: #55555D;
    --glow: rgb(123 150 255 / 0.07);
    --shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 32px -16px rgb(0 0 0 / 0.7);
    --shadow-pop: 0 18px 50px -12px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.08);
    --shadow-seg: 0 1px 3px rgb(0 0 0 / 0.5);
    --scrim: rgb(0 0 0 / 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) transparent; }
body {
  margin: 0;
  font: 400 15px/1.45 var(--font);
  letter-spacing: -0.006em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}
::selection { background: var(--accent-tint); color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { caret-color: var(--accent); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-radius: 8px; }
.i { flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r); background: var(--text); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
.num, .kpi-val, .figs b, time, .tick, .totals, .sum-row b { font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; }
.t-warn { color: var(--warn); font-weight: 600; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ───────── окно: панель разделов | содержимое | карточка ───────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
body.has-inspector .shell { padding-right: var(--insp-w); }

.side {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 10px 12px;
  background: var(--side);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
  border-right: 0.5px solid var(--line);
  overflow-y: auto;
}
.side-head { display: flex; align-items: center; gap: 10px; padding: 2px 8px 6px; }
.app-icon { display: grid; place-items: center; width: 30px; height: 30px; }
.side-title { display: grid; line-height: 1.15; }
.side-title b { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.side-title small { font-size: 12px; color: var(--muted); }

.side-search { display: flex; align-items: center; gap: 6px; height: 30px; margin: 0 2px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--fill); color: var(--muted); font-size: 13px; }
.side-search .search-txt { flex: 1; text-align: left; }
kbd { font: 500 11px/1 var(--font); color: var(--faint); }

.source { display: grid; gap: 1px; }
.src-h { padding: 14px 10px 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.src-item { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font-size: 13.5px; text-align: left; }
.src-item .i { color: var(--accent); }
.src-item:hover { background: var(--fill); }
.src-item.is-active { background: var(--select); color: #fff; font-weight: 500; }
.src-item.is-active .i { color: #fff; }
.src-count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-item.is-active .src-count { color: rgb(255 255 255 / 0.85); }
.src-count:empty { display: none; }

.side-foot { margin-top: auto; display: grid; gap: 4px; }
.conn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.conn i { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--faint); }
.conn span { display: grid; gap: 1px; line-height: 1.35; }
.conn b { font-weight: 600; color: var(--text); }
.conn-demo i { background: #FF9F0A; } .conn-ok i { background: #34C759; } .conn-err i { background: var(--danger); }
.profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; color: var(--muted); }
.profile:hover { background: var(--fill); }
.profile.is-active { background: var(--fill-2); }
.profile-tx { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.profile-tx b { font-size: 13px; font-weight: 600; color: var(--text); }
.profile-tx small { font-size: 12px; }
.avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: linear-gradient(180deg, #A1A1A6, #7C7C80); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.avatar-lg { width: 60px; height: 60px; font-size: 21px; }

.col { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30;
  display: none; align-items: center; gap: 8px; height: 52px; padding: 0 16px;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 0.5px solid var(--line);
}
.crumb { flex: 1; min-width: 0; opacity: 0; transition: opacity 200ms ease; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* как в iOS: пока виден крупный заголовок, панель прозрачна и без названия */
.top { background: var(--bg); border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background 200ms ease, border-color 200ms ease; }
body.scrolled .top { background: var(--bar); border-bottom-color: var(--line); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
body.scrolled .crumb { opacity: 1; }
.top-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--accent); }
.top-avatar { width: 32px; height: 32px; }

main { flex: 1; width: 100%; max-width: 1240px; padding: 26px 36px 80px; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font: 700 30px/1.12 var(--font-display); letter-spacing: -0.022em; }
.page-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.page-sub span + span::before { content: "·"; margin-right: 12px; }
.head-tools { display: flex; align-items: center; gap: 8px; }

/* ───────── кнопки, поля, метки ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background 120ms ease, transform 100ms ease, opacity 120ms ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { background: var(--fill); color: var(--accent); }
.btn-ghost:hover { background: var(--fill-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--fill-2); border-top-color: var(--accent); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--fill); color: var(--accent); }
.icon-btn:hover { background: var(--fill-2); }
.btn-link { padding: 0; margin-left: 8px; border: 0; background: none; color: var(--accent); font-size: 13px; font-weight: 500; }

.select { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--fill); color: var(--accent); }
.select select { appearance: none; border: 0; background: none; padding: 0 20px 0 0; font-size: 14px; font-weight: 500; color: var(--text); outline: none; cursor: pointer; }
.select select option { color: initial; }
.select > .i:last-child { position: absolute; right: 8px; pointer-events: none; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-neutral { background: var(--fill); color: var(--muted); }
.badge-accent { background: var(--accent-tint); color: var(--accent); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--fill); color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.count:empty { display: none; }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg button { white-space: nowrap; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--text); font-size: 13px; font-weight: 500; transition: background 180ms var(--ease), box-shadow 180ms var(--ease); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: var(--shadow-seg); font-weight: 600; }

/* сгруппированные секции — главный контейнер, как в «Настройках» */
.card { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 16px 20px 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card h2, .card-head h2 { font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.card-head p { margin-top: 1px; font-size: 13px; color: var(--muted); }
.card-note { display: flex; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.card-note .i { margin-top: 1px; color: var(--faint); }
.card-flush + .card-note, #dt-body > .card-note { padding: 0 16px; }
.group-h { margin: 22px 16px 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.group-h:first-child { margin-top: 0; }

.skeleton { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); }
.skeleton::after { content: ""; position: absolute; inset: 0; translate: -100% 0; background: linear-gradient(90deg, transparent, var(--fill), transparent); animation: sweep 1.4s ease-in-out infinite; }
@keyframes sweep { to { translate: 100% 0; } }
.table-skel { display: grid; padding: 4px 20px; } .table-skel i { display: block; height: 22px; margin: 11px 0; border-radius: 6px; }

.state { display: grid; justify-items: center; gap: 4px; padding: 48px 24px; border-radius: var(--r-lg); background: var(--surface); text-align: center; }
.card .state { padding: 28px 12px; background: none; }
.state-ic { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; color: var(--faint); }
.state-forbidden .state-ic { color: var(--warn); }
.state-error .state-ic { color: var(--danger); }
.state h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.state p { max-width: 46ch; font-size: 14px; color: var(--muted); }
.state .btn { margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; translate: -50% 16px; padding: 11px 18px; border-radius: 22px; background: var(--bar); color: var(--text); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity 220ms ease, translate 380ms var(--ease); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; translate: -50% 0; }

/* ───────── обзор: сводка строками, как в «Настройках» ───────── */
.summary { display: grid; border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.sum-item { position: relative; }
.sum-item + .sum-item::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 0.5px; background: var(--line); }
.sum-line { display: flex; align-items: center; padding-right: 10px; }
.sum-line:hover { background: var(--fill); }
.sum-row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 64px; padding: 10px 6px 10px 16px; border: 0; background: none; text-align: left; }
.sum-row:active { opacity: 0.7; }
.sum-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; color: #fff; }
.sum-ic.c-blue { background: #0A84FF; } .sum-ic.c-green { background: #30B45A; } .sum-ic.c-orange { background: #FF9500; } .sum-ic.c-red { background: #FF3B30; } .sum-ic.c-indigo { background: #5856D6; } .sum-ic.c-gray { background: #8E8E93; }
.sum-tx { display: grid; flex: 1; min-width: 0; gap: 1px; }
.sum-tx span { font-size: 15px; }
.sum-tx small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-row b { font: 600 20px/1.1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.sum-row b small { margin-left: 3px; font-size: 14px; font-weight: 500; color: var(--muted); }
.sum-row.is-danger b { color: var(--danger); }
.sum-row > .i { color: var(--faint); }
.sum-info { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--faint); }
.sum-info:hover, .sum-info[aria-expanded="true"] { color: var(--accent); background: var(--accent-tint); }
.sum-warn { display: inline-flex; align-items: center; gap: 4px; font-size: 12px !important; font-weight: 500; color: var(--warn) !important; }
.sum-warn-text { padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }
.sum-cmp { font-size: 12px !important; color: var(--muted); }
.sum-pop p + p { margin-top: 6px; }
.sum-pop { padding: 0 16px 14px 60px; font-size: 13px; line-height: 1.45; color: var(--muted); }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 8px; }
.ov-grid > * { min-width: 0; }

.ask { padding: 18px 20px; margin-bottom: 8px; border-radius: var(--r-lg); background: var(--surface); }
.ask h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 10px; }
.ask > p { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: var(--fill); color: var(--accent); font-size: 13px; font-weight: 500; }
.chip:hover { background: var(--fill-2); }

/* композер ассистента */
.composer { position: relative; display: block; padding: 6px; border-radius: 22px; background: var(--fill); transition: box-shadow 160ms ease, background 160ms ease; }
.composer:focus-within { background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong), 0 6px 20px -10px rgb(0 0 0 / 0.25); }
.composer-row { display: flex; align-items: flex-end; gap: 4px; }
.attach { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); cursor: pointer; }
.attach:hover { color: var(--accent); }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 13px; background: var(--accent-tint); color: var(--accent); font-size: 12px; font-weight: 500; }
.att-chip button { display: grid; place-items: center; width: 18px; height: 18px; border: 0; border-radius: 50%; background: none; color: inherit; }
.bubble-att { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.composer textarea { flex: 1; min-height: 34px; max-height: 180px; padding: 7px 4px; border: 0; outline: 0; resize: none; background: none; font-size: 16px; line-height: 1.35; }
.composer textarea::placeholder { color: var(--muted); }
.send { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; transition: transform 100ms ease, background 120ms ease; }
.send:active { transform: scale(0.92); }

/* ───────── график ───────── */
.legend { display: flex; gap: 16px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.sw-a { background: var(--accent); } .sw-p { background: var(--chart-b); }
.chart { position: relative; min-height: 240px; }
.chart-svg { display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--line); }
.chart-svg .axis { stroke: var(--line-strong); }
.chart-svg .tick { fill: var(--muted); font-size: 11px; }
.chart-svg .line-a { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .line-p { fill: none; stroke: var(--chart-b); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-svg .bar-a { fill: var(--accent); } .chart-svg .bar-p { fill: var(--chart-b); }
.chart-svg .cross { stroke: var(--text); stroke-opacity: 0.25; }
.chart-svg .dot-a { fill: var(--surface); stroke: var(--accent); stroke-width: 2.25; }
.chart-svg .dot-p { fill: var(--surface); stroke: var(--chart-b); stroke-width: 2.25; }
.chart-hit { cursor: crosshair; outline: none; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 5; display: grid; gap: 3px; min-width: 180px; padding: 10px 12px; border-radius: 10px; background: var(--bar); color: var(--text); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); font-size: 13px; pointer-events: none; box-shadow: var(--shadow-pop); }
.chart-tip b { font-weight: 600; margin-bottom: 2px; }
.chart-tip span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chart-tip em { margin-left: auto; padding-left: 14px; font-style: normal; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip .gap { margin-top: 4px; padding-top: 6px; border-top: 0.5px solid var(--line); }

/* ───────── «Требует внимания» — строки списка ───────── */
.attn { display: grid; margin: 0 -20px -18px; }
.attn li { position: relative; }
.attn li + li::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 0.5px; background: var(--line); }
.attn button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 16px 10px 20px; border: 0; background: none; text-align: left; }
.attn button:hover { background: var(--fill); }
.attn button > .i { color: var(--faint); }
.attn-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; color: #fff; }
.tone-danger { background: #FF3B30; } .tone-warning { background: #FF9500; } .tone-info { background: #0A84FF; } .tone-ok { background: #30B45A; }
.attn-tx { display: grid; flex: 1; min-width: 0; gap: 1px; }
.attn-tx b { font-weight: 500; font-size: 15px; }
.attn-tx small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack { display: flex; gap: 2px; height: 10px; margin: 4px 0 10px; border-radius: 5px; overflow: hidden; }
.stack i { min-width: 4px; }
.st-neutral { background: #8E8E93; } .st-accent { background: var(--accent); } .st-info { background: #AF52DE; } .st-ok { background: #34C759; }
.stack-legend li + li { border-top: 0.5px solid var(--line); }
.stack-legend button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 0; border: 0; background: none; text-align: left; font-size: 14px; }
.stack-legend .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.stack-legend span { flex: 1; } .stack-legend b { font-weight: 600; } .stack-legend small { width: 40px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ───────── списки (таблицы) ───────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { position: sticky; top: 0; padding: 8px 12px; background: var(--surface); border-bottom: 0.5px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.table td { height: 44px; padding: 6px 12px; border-bottom: 0.5px solid var(--line); white-space: nowrap; }
.table.is-compact td { height: 36px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 20px; } .table th:last-child, .table td:last-child { padding-right: 20px; }
.table td.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.table td.clip-sm { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.table .num { text-align: right; } .table .strong { font-weight: 600; }
.table tr[data-order], .table tr[data-pick] { cursor: default; }
.table tbody tr:hover { background: var(--fill); }
.table tr.is-sel, .table tr.is-picked { background: var(--select) !important; color: #fff; }
.table tr.is-picked .badge, .table tr.is-sel .badge { background: rgb(255 255 255 / 0.22); color: #fff; }
.table tr.is-picked .t-warn, .table tr.is-picked td { color: #fff; }
.c-check { width: 40px; padding-right: 0 !important; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); vertical-align: middle; cursor: pointer; }
.table-mini { font-size: 13px; } .table-mini th { position: static; padding: 6px 10px; background: none; } .table-mini td { height: auto; padding: 8px 10px; white-space: normal; }
.table-mini th:first-child, .table-mini td:first-child { padding-left: 0; } .table-mini th:last-child, .table-mini td:last-child { padding-right: 0; }
.prog { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.prog i { display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.prog b { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.prog-lg { display: flex; margin: 14px 0 0; } .prog-lg i { flex: 1; height: 6px; }
.table td.actions { white-space: nowrap; text-align: right; } .table td.actions .btn { margin-left: 6px; }
.table td.actions-stack .btn { display: flex; width: 100%; margin: 3px 0; }

/* ───────── панель инструментов списка ───────── */
.tabs { display: none; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.toolbar:empty { display: none; }
.search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; max-width: 320px; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--fill); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }
.dates { display: inline-flex; align-items: center; gap: 4px; }
.dates input { height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--fill); font-size: 14px; color: var(--text); }
.dates i { font-style: normal; color: var(--muted); }
.tool-gap { flex: 1; } .tool-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.totals { margin: 0 0 10px; padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; display: grid; min-width: 260px; padding: 5px; border-radius: 12px; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-pop); transform-origin: top right; animation: pop-in 220ms var(--ease); }
@keyframes pop-in { from { opacity: 0; scale: 0.96; } }
.menu-pop button { padding: 7px 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: 14px; } .menu-pop button:hover { background: var(--select); color: #fff; }
.selbar { position: fixed; left: calc(50% + var(--side-w) / 2); bottom: 24px; z-index: 40; translate: -50% 0; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 14px; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-pop); animation: rise 320ms var(--ease); }
.selbar b { margin-right: 4px; font-weight: 600; font-size: 14px; white-space: nowrap; }
@keyframes rise { from { opacity: 0; translate: -50% 12px; } }

/* ───────── ассистент ───────── */
.hero { max-width: 720px; margin: 6vh auto 0; text-align: center; }
.hero-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 14px; background: linear-gradient(180deg, #2E8BFF, #0062D6); color: #fff; }
.hero h1 { font: 700 30px/1.12 var(--font-display); letter-spacing: -0.022em; }
.hero > p { max-width: 52ch; margin: 10px auto 22px; color: var(--muted); }
.hero .composer { text-align: left; }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; text-align: left; }
.ex { display: flex; gap: 12px; padding: 14px; border: 0; border-radius: var(--r-lg); background: var(--surface); text-align: left; }
.ex:hover { background: var(--fill); }
.ex-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: #0A84FF; color: #fff; }
.ex span:last-child { display: grid; gap: 2px; } .ex b { font-weight: 600; font-size: 15px; } .ex small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.thread-wrap { max-width: 820px; margin: 0 auto; padding-bottom: 120px; }
.thread { display: grid; gap: 20px; }
.msg { display: flex; gap: 10px; animation: msg-in 380ms var(--ease); }
@keyframes msg-in { from { opacity: 0; translate: 0 8px; } }
.msg.user { justify-content: flex-end; align-items: center; }
.bubble { max-width: min(76%, 600px); padding: 8px 14px; border-radius: 18px; background: var(--accent); color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .att-chip { background: rgb(255 255 255 / 0.2); color: #fff; }
.msg-pin { order: -1; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--faint); opacity: 0; }
.msg.user:hover .msg-pin, .msg-pin:focus-visible { opacity: 1; }
.bot-mark { display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-top: 2px; border-radius: 50%; background: linear-gradient(180deg, #2E8BFF, #0062D6); color: #fff; }
.bot-mark-err { background: var(--danger); }
.answer { flex: 1; min-width: 0; display: grid; gap: 10px; }
.answer-err { padding: 12px 14px; border-radius: var(--r-lg); background: var(--danger-bg); justify-items: start; }
.md { display: grid; gap: 8px; max-width: 70ch; overflow-wrap: anywhere; }
.md h4 { font-size: 16px; font-weight: 600; margin-top: 4px; }
.md ul, .md ol { display: grid; gap: 4px; padding-left: 20px; } .md ul { list-style: disc; } .md ol { list-style: decimal; }
.md li::marker { color: var(--muted); }
.md code { padding: 1px 5px; border-radius: 5px; background: var(--fill); font: 500 13px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.answer > .table-wrap { border-radius: var(--r-lg); background: var(--surface); }
.demo-line { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 5px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 500; }
.answer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.foot-l { font-size: 13px; color: var(--muted); margin-right: 2px; }
.src { font-size: 13px; color: var(--muted); margin-left: auto; }
.src summary { cursor: pointer; padding: 6px 4px; list-style: none; color: var(--accent); }
.src summary::-webkit-details-marker { display: none; }
.src ul { display: grid; gap: 4px; padding: 6px 0 0; } .src li { display: flex; align-items: center; gap: 6px; }
.wait { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.wait svg { width: 44px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; animation: wave 1.2s linear infinite; }
@keyframes wave { from { stroke-dashoffset: 90; } to { stroke-dashoffset: -90; } }
.dock { position: fixed; left: var(--side-w); right: 0; bottom: 0; z-index: 35; padding: 10px 36px 20px; background: linear-gradient(180deg, transparent, var(--bg) 40%); }
.dock .composer { max-width: 820px; margin: 0 auto; background: var(--surface); box-shadow: 0 0 0 0.5px var(--line-strong), 0 8px 24px -12px rgb(0 0 0 / 0.3); }
.jump { position: fixed; left: calc(50% + var(--side-w) / 2); bottom: 96px; z-index: 36; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--bar); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--accent); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-pop); }
.prop { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); }
.prop-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .prop-head b { flex: 1; font-size: 15px; } .prop .card-note { margin: 0; }
.prop-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.prop-done { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--ok-bg); color: var(--ok); font-size: 14px; }

/* ───────── профиль — как «Настройки» ───────── */
.settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 760px; }
.settings .card h2 { margin-bottom: 12px; } .settings .card-head h2 { margin: 0; }
.me { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .me > div { flex: 1; min-width: 200px; } .me h2 { margin: 0 !important; font-size: 20px !important; } .me p { font-size: 14px; color: var(--muted); }
.more-nav { display: none; }
.dl { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 0; font-size: 15px; }
.dl dt, .dl dd { padding: 11px 0; border-bottom: 0.5px solid var(--line); }
.dl dt { color: var(--text); } .dl dd { color: var(--muted); text-align: right; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.steps { display: grid; gap: 8px; padding-left: 20px; list-style: decimal; font-size: 14px; } .steps b { font-weight: 600; }
.audit { display: grid; max-height: 340px; overflow-y: auto; font-size: 13px; } .audit li { display: grid; grid-template-columns: 96px 120px 1fr; gap: 10px; padding: 9px 0; border-bottom: 0.5px solid var(--line); } .audit time { color: var(--muted); } .audit b { font-weight: 500; } .audit span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-form { display: grid; gap: 12px; max-width: 420px; }
.pw-form .fld { display: block; } .pw-form .fld > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.pw-form input[type="password"], .pw-form input[name], .pw-form select { width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--fill); font-size: 16px; outline: none; }
.pw-form input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.pw-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; } .pw-foot .card-note { margin: 0; }
.sub-h { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.pk-list { display: grid; margin-bottom: 12px; } .pk-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--line); } .pk-list li > span { flex: 1; display: grid; } .pk-list b { font-size: 15px; font-weight: 500; } .pk-list small { font-size: 12px; color: var(--muted); }
.fld-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.role-sel { height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: var(--fill); font-size: 13px; }
.invite-text { white-space: pre-wrap; font: 13px/1.5 var(--font); padding: 12px 14px; margin: 10px 0; border-radius: var(--r); background: var(--fill); }
.table-narrow thead { display: none; }
.table-narrow, .table-narrow tbody { display: block; }
.table-narrow tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 14px 20px; border-bottom: 0.5px solid var(--line); }
.table-narrow tr:last-child { border-bottom: 0; }
.table-narrow td { display: grid; gap: 2px; height: auto; padding: 0 !important; border: 0; white-space: normal; text-align: left !important; }
.table-narrow td::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
.table-narrow td.strong { grid-column: 1 / -1; font-size: 16px; }
.table-narrow td.actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.table-narrow td.actions::before { content: none; }
.table-narrow td.actions .btn { margin: 0; }

/* ───────── карточка выбранного: справа на широком экране, лист снизу на телефоне ───────── */
dialog { border: 0; padding: 0; color: inherit; }
dialog::backdrop { background: var(--scrim); }
.drawer { position: fixed; z-index: 45; inset: 0 0 0 auto; margin: 0; width: var(--insp-w); max-width: 100vw; height: 100dvh; max-height: none; background: var(--surface); border-left: 0.5px solid var(--line); }
.drawer.is-modal { box-shadow: var(--shadow-pop); }
.drawer[open] { animation: insp-in 420ms var(--ease); } .drawer[open]::backdrop { animation: fade 260ms ease; }
/* без opacity: застрявшая анимация делала панель полупрозрачной (сквозь неё были видны кнопки страницы) */
@keyframes insp-in { from { translate: 24px 0; } } @keyframes fade { from { opacity: 0; } }
.drawer-wide { width: var(--insp-w); }
.drawer-in { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; }
.drawer-head h2 { font: 600 18px/1.25 var(--font-display); letter-spacing: -0.02em; } .drawer-head p { margin-top: 3px; color: var(--muted); font-size: 14px; }
.drawer-head .icon-btn { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
.drawer-body h3 { margin: 22px 0 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.drawer-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 0.5px solid var(--line); }
.figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: var(--r-lg); background: var(--line); overflow: hidden; }
.figs > div { padding: 12px; background: var(--surface-2); }
.figs span { display: block; font-size: 12px; color: var(--muted); } .figs b { font: 600 15px/1.2 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.issues { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--danger-bg); color: var(--danger); font-size: 14px; } .issues ul { display: grid; gap: 4px; }
.drawer .dl { margin-top: 14px; }
.docs { display: grid; } .docs .doc-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: var(--faint); cursor: pointer; font: inherit; } .docs .doc-link:hover b { color: var(--accent); } .docs .doc-link > span { flex: 1; } .docs .doc-link > .i:last-child { color: var(--muted); } .docs li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--line); color: var(--faint); } .docs span { display: grid; } .docs b { font-weight: 500; font-size: 15px; color: var(--text); } .docs small { font-size: 13px; color: var(--muted); }
.attn-list { display: grid; gap: 8px; margin: 6px 0 16px; font-size: 14px; } .attn-list li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; } .attn-list li .i { margin-top: 2px; flex: none; }
.attn-list .tone-danger { background: var(--danger-bg); color: var(--danger); } .attn-list .tone-warning { background: var(--warn-bg); color: var(--warn); } .attn-list .tone-ok { background: var(--ok-bg); color: var(--ok); }
.checks { display: grid; } .checks li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 0.5px solid var(--line); font-size: 14px; } .checks li span { display: grid; } .checks small { font-size: 12px; color: var(--muted); }
.recon-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.recon-period .dates input { width: 132px; }
.export-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ───────── поиск — как Spotlight ───────── */
.palette { width: min(640px, calc(100vw - 32px)); margin-top: 14vh; border-radius: var(--r-sheet); background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px); box-shadow: var(--shadow-pop); overflow: hidden; }
.palette::backdrop { background: rgb(0 0 0 / 0.12); }
.palette[open] { animation: pal-in 260ms var(--ease); } @keyframes pal-in { from { opacity: 0; scale: 0.97; } }
.pal-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 54px; color: var(--muted); }
.pal-input input { flex: 1; border: 0; outline: 0; background: none; font-size: 20px; font-weight: 300; color: var(--text); }
.pal-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 0 6px 6px; border-top: 0.5px solid var(--line); }
.pal-g { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pal-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; text-align: left; color: var(--accent); }
.pal-list button span { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pal-list small { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pal-list button[aria-selected="true"] { background: var(--select); color: #fff; } .pal-list button[aria-selected="true"] span, .pal-list button[aria-selected="true"] small { color: #fff; }
.pal-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.pal-foot { display: none; }

/* ───────── задачи, платёжный календарь ───────── */
.ops-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; } .ops-toolbar .card-note { margin: 0; }
.tasks { display: grid; border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.task { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.task + .task::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 0.5px; background: var(--line); }
.task.done { opacity: 0.55; } .task > div { flex: 1; min-width: 0; display: grid; gap: 1px; } .task b { font-weight: 500; font-size: 15px; } .task small { font-size: 13px; color: var(--muted); }
.task-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: #FF9500; color: #fff; }
.section { margin: 22px 16px 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
.pay-cal { display: grid; border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.pay-day { position: relative; padding: 0 16px; }
.pay-day + .pay-day::before { content: ""; position: absolute; top: 0; left: 46px; right: 0; height: 0.5px; background: var(--line); }
.pay-day summary { display: flex; align-items: center; gap: 12px; min-height: 52px; cursor: pointer; list-style: none; } .pay-day summary::-webkit-details-marker { display: none; }
.pay-day summary .i { color: var(--accent); }
.pay-date { display: flex; align-items: center; gap: 12px; flex: 1; font-size: 15px; }
.pay-count { font-size: 13px; color: var(--muted); }
.pay-sum { font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-day.is-overdue .pay-date, .pay-day.is-overdue .pay-sum, .pay-day.is-overdue summary .i { color: var(--danger); }
.pay-day table { margin: 0 0 12px 30px; width: calc(100% - 30px); }
.kpis-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; border-radius: var(--r-lg); background: var(--line); overflow: hidden; }
.kpis-3 .kpi { background: var(--surface); }
.kpis-3 .kpi-main { display: grid; gap: 4px; padding: 14px 16px; }
.kpis-3 .kpi-top { font-size: 13px; color: var(--muted); }
.kpis-3 .kpi-val { font: 600 24px/1.1 var(--font-display); letter-spacing: -0.02em; white-space: nowrap; }
.kpis-3 .kpi-danger .kpi-val { color: var(--danger); }
.letter { padding: 0 16px; border-bottom: 0.5px solid var(--line); }
.letter summary { display: flex; gap: 10px; align-items: center; min-height: 48px; cursor: pointer; list-style: none; } .letter summary::-webkit-details-marker { display: none; }
.letter summary span { flex: 1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .letter summary em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.letter-subj { font-weight: 600; font-size: 14px; margin: 4px 0 8px; } .letter pre { white-space: pre-wrap; font: 13px/1.5 var(--font); margin: 0 0 14px; }

/* база 1С давно не обновлялась */
.stale { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--r-lg); background: var(--warn-bg); color: var(--warn); }
.stale .i { flex: none; margin-top: 1px; }
.stale b { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 600; }
.stale span { display: block; font-size: 13px; line-height: 1.45; color: var(--text); }

/* ───────── нижняя навигация телефона ───────── */
.tabbar { display: none; }

/* ───────── адаптация ───────── */
@media (max-width: 1280px) { :root { --insp-w: 360px; } }
body.has-inspector .prog i { display: none; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } body.has-inspector .shell { padding-right: 0; } }
@media (max-width: 900px) {
  :root { --side-w: 0px; }
  body { font-size: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { display: flex; }
  main { padding: 6px 16px calc(100px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 14px; }
  .page-head h1 { font-size: 32px; letter-spacing: -0.025em; }
  .btn { height: 40px; } .btn-sm { height: 32px; }
  .search { max-width: none; flex-basis: 100%; height: 38px; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; }
  .dates { flex: 1; } .dates input { flex: 1; min-width: 0; }
  .menu-pop { left: 0; right: auto; transform-origin: top left; }
  .card { padding: 16px; } .card-flush { padding: 0; } .card-flush > .card-head { padding: 14px 16px 8px; }
  .attn { margin: 0 -16px -16px; } .attn button { padding-left: 16px; } .attn li + li::before { left: 60px; }
  .hero h1 { font-size: 28px; } .examples { grid-template-columns: 1fr; }
  .bubble { max-width: 86%; } .msg-pin { opacity: 1; }
  .dock { left: 0; padding: 8px 12px; bottom: calc(56px + env(safe-area-inset-bottom)); }
  .jump, .selbar { left: 50%; } .jump { bottom: calc(126px + env(safe-area-inset-bottom)); }
  .selbar { bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 4px 4px calc(2px + env(safe-area-inset-bottom));
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border-top: 0.5px solid var(--line);
  }
  .tabbar button { display: grid; justify-items: center; gap: 2px; min-height: 50px; padding: 4px 0 2px; border: 0; background: none; color: var(--faint); font-size: 10px; font-weight: 500; }
  .tabbar button.is-active { color: var(--accent); }
  .more-nav { display: block; }
  .drawer, .drawer-wide { inset: auto 0 0 0; width: 100vw; height: calc(100dvh - 44px); border-left: 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; }
  .drawer[open] { animation: sheet-up 460ms var(--ease); }
  @keyframes sheet-up { from { translate: 0 100%; } }
  .drawer-head { position: relative; padding-top: 22px; }
  .drawer-head::before { content: ""; position: absolute; top: 7px; left: 50%; translate: -50% 0; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); }
  .audit li { grid-template-columns: 84px 1fr; } .audit span { grid-column: 1 / -1; }
  .kpis-3 { grid-template-columns: 1fr; }
  .sum-row b { font-size: 18px; }

  /* строки списков на телефоне — двухстрочные, как в «Почте» */
  .table:not(.table-mini) thead { display: none; }
  .table:not(.table-mini), .table:not(.table-mini) tbody { display: block; }
  .table:not(.table-mini) tr { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 16px; border-bottom: 0.5px solid var(--line); }
  .table:not(.table-mini) tr:last-child { border-bottom: 0; }
  .table:not(.table-mini) td { display: grid; gap: 1px; height: auto; padding: 0 !important; border: 0; white-space: normal; text-align: left !important; }
  .table:not(.table-mini) td::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .table:not(.table-mini) td.c-check { position: absolute; right: 16px; top: 14px; width: auto; } .table:not(.table-mini) td.c-check::before { content: none; }
  .table:not(.table-mini) td.strong { grid-column: 1 / -1; font-size: 16px; padding-right: 36px !important; }
  .table:not(.table-mini) td.strong::before { content: none; }
  .table:not(.table-mini) td.clip, .table:not(.table-mini) td.clip-sm { max-width: none; }
  .table:not(.table-mini) td.actions { grid-column: 1 / -1; display: flex; gap: 6px; } .table:not(.table-mini) td.actions::before { content: none; }
  .table td.actions .btn, .table td.actions-stack .btn { margin: 0; flex: 1; width: auto; }
}
@media (max-width: 420px) { .figs b { font-size: 15px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .wait svg { stroke-dasharray: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .side, .top, .tabbar, .palette, .menu-pop, .toast, .chart-tip, .selbar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root { --side: #ECECF1; --bar: #F9F9FB; }
}
@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --side: #1E1E20; --bar: #161618; }
}
@media (prefers-reduced-transparency: reduce) { :root[data-theme="dark"] { --side: #1E1E20; --bar: #161618; } }
@media (prefers-contrast: more) {
  :root { --line: rgb(60 60 67 / 0.45); --muted: #4A4A4F; }
}


/* ═════════ Стиль RUBYKZ TASK (решение владельца 2026-10-11) ═════════
   Широкий Unbounded для заголовков и цифр, Onest для текста, тёплый
   светлый фон с голубым свечением, белые карточки с мягкой тенью,
   чёрная главная кнопка, плитки с крупными цветными числами. */
body { font-feature-settings: "ss01", "cv11"; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 15% -10%, var(--glow), transparent 60%), radial-gradient(700px 420px at 100% 0%, var(--glow), transparent 55%); }

.side { background: var(--side); -webkit-backdrop-filter: none; backdrop-filter: none; border-right: 1px solid var(--line); padding: 26px 18px 16px; gap: 10px; }
.side-head { padding: 0 6px 10px; gap: 10px; }
.side-head .app-icon { display: block; width: 26px; height: 26px; border-radius: 0; background: none; box-shadow: none; }
.side-title { align-items: baseline; }
.side-title { display: flex; align-items: baseline; gap: 10px; }
.side-title b { font: 700 20px/1 var(--font-display); letter-spacing: -0.02em; }
.side-title small { font: 500 11px/1 var(--font-display); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.side-search { flex: none; height: 44px; margin: 0; padding: 0 10px 0 16px; gap: 10px; border-radius: 13px; background: var(--ink-btn); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.6); transition: transform 120ms var(--ease); }
.side-search:active { transform: scale(0.98); }
.side-search kbd { display: grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border-radius: 7px; background: rgb(255 255 255 / 0.14); color: inherit; font-size: 12px; }
.source { gap: 4px; margin-top: 6px; }
.src-item { flex: none; height: 38px; padding: 0 12px; gap: 12px; border-radius: 11px; font-size: 14px; white-space: nowrap; color: var(--text); }
.src-item .i { color: var(--muted); }
.src-item:hover { background: var(--fill); }
.src-item.is-active { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--shadow-card); border: 1px solid var(--line); }
.src-item.is-active .i { color: var(--text); }
.src-item.is-active .src-count { color: var(--muted); }
.src-h { padding: 16px 12px 6px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.conn { padding: 8px 14px; }
.profile { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.profile:hover { background: var(--surface); }
.profile .avatar { width: 34px; height: 34px; font-size: 13px; }
.avatar { background: linear-gradient(160deg, #B5652F, #7A3B12); }
.profile-tx b { font-size: 14px; font-weight: 500; }

main { padding: 36px 44px 80px; max-width: 1320px; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font: 600 26px/1.15 var(--font-display); letter-spacing: -0.02em; }
.page-sub { margin-top: 6px; font-size: 14px; }

/* приветствие обзора */
.eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.hello { font: 600 clamp(26px, 2.8vw, 36px)/1.1 var(--font-display) !important; letter-spacing: -0.025em !important; }
.lead { margin-top: 8px; font-size: 15px; color: var(--muted); }
.lead b { color: var(--text); font-weight: 500; }

.card, .ask, .summary, .tasks, .pay-cal, .kpis-3, .state, .prop { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.card h2, .card-head h2 { font: 600 15px/1.3 var(--font-display); letter-spacing: -0.01em; }
.btn { border-radius: 11px; height: 36px; padding: 0 14px; font-weight: 500; }
.btn-sm { height: 32px; border-radius: 10px; }
.btn-primary { background: var(--ink-btn); color: var(--bg); }
.btn-primary:hover { background: var(--ink-btn); opacity: 0.88; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--fill); }
.icon-btn { border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); width: 40px; height: 40px; }
.select { height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); }
.search { height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); }
.dates input { height: 40px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); }
.seg { border-radius: 12px; padding: 3px; }
.seg button { border-radius: 9px; height: 32px; }
.table th { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.table tr.is-sel, .table tr.is-picked { background: var(--accent-tint) !important; color: inherit; }
.badge { border-radius: 8px; }

/* заголовок секции — как «ЖДУТ ВАШЕЙ ПРИЁМКИ 4» */
.sect-h { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sect-h .i { color: var(--accent); }
.sect-h .count { background: var(--surface); border: 1px solid var(--line); color: var(--text); }

/* плитки показателей */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tile { position: relative; display: flex; flex-direction: column; min-height: 150px; padding: 18px 20px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); text-align: left; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgb(14 17 22 / 0.04), 0 16px 32px -14px rgb(14 17 22 / 0.24); }
.tile-go { position: absolute; inset: 0; border: 0; background: none; border-radius: inherit; }
.tile-lbl { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding-right: 30px; }
.tile-val { margin-top: 12px; font: 600 28px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-val small { margin-left: 4px; font: 500 13px/1 var(--font-display); letter-spacing: 0; color: var(--muted); }
.tile.t-ok .tile-val { color: var(--ok); } .tile.t-accent .tile-val { color: var(--accent); } .tile.t-violet .tile-val { color: var(--violet); } .tile.t-bad .tile-val { color: var(--danger); } .tile.t-mute .tile-val { color: var(--text); }
.tile-hint { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.tile-cmp { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); }
.tile-cmp .up { color: var(--ok); font-weight: 500; } .tile-cmp .down { color: var(--danger); font-weight: 500; }
.tile-warn { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--warn); }
.tile-info { position: absolute; top: 16px; right: 16px; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none; color: var(--faint); }
.tile-info:hover { background: var(--fill); color: var(--text); }

/* баннер «Найти в 1С» */
.finder { position: relative; overflow: hidden; margin-top: 20px; padding: 24px 28px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.finder::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 300px at 100% 0%, rgb(47 84 235 / 0.14), transparent 70%), radial-gradient(400px 260px at 85% 120%, rgb(124 77 219 / 0.12), transparent 70%); }
.finder > * { position: relative; }
.finder-eye { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.finder h2 { margin-top: 8px; font: 600 clamp(19px, 1.8vw, 22px)/1.2 var(--font-display); letter-spacing: -0.02em; }
.finder-sub { margin-top: 6px; max-width: 70ch; font-size: 14px; color: var(--muted); }
.finder-form { display: flex; gap: 10px; margin-top: 16px; }
.finder-field { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 13px; background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted); transition: border-color 140ms, box-shadow 140ms; }
.finder-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.finder-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--text); }
.finder-go { height: 46px; padding: 0 22px; border: 0; border-radius: 13px; background: var(--ink-btn); color: var(--bg); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 10px; }
.finder-go:active { transform: scale(0.98); }
.finder-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.finder-chips span { font-size: 14px; color: var(--muted); margin-right: 4px; }
.finder-chips button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px dashed var(--line-strong); background: none; color: var(--text); font-size: 13px; }
.finder-chips button:hover { border-style: solid; background: var(--fill); }
.finder-res { margin-top: 20px; }
.fr-group + .fr-group { margin-top: 16px; }
.fr-h { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.fr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.fr-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); text-align: left; }
.fr-item:hover { border-color: var(--accent); background: var(--surface); }
.fr-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; color: #fff; }
.fr-ic.k-counterparties { background: var(--accent); } .fr-ic.k-orders { background: var(--violet); } .fr-ic.k-invoices { background: var(--sky); }
.fr-tx { display: grid; min-width: 0; } .fr-tx b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fr-tx small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-note { font-size: 14px; color: var(--muted); }

/* сотрудники — карточки людей */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.person { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.person.is-off { opacity: 0.6; }
.person-top { display: flex; align-items: center; gap: 14px; }
.person-av { width: 48px; height: 48px; font-size: 16px; }
.person-tx { display: grid; min-width: 0; } .person-tx b { font: 600 14px/1.3 var(--font-display); letter-spacing: -0.02em; } .person-tx small { font-size: 14px; color: var(--muted); }
.person-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; } .person-dl dt { color: var(--muted); } .person-dl dd { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.person-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

/* пульт заказов */
.bd-stages { display: grid; gap: 12px; }
.bd-table td, .bd-table th { padding-left: 10px !important; padding-right: 10px !important; }
.bd-table td:first-child { white-space: normal; }
.bd-tot { display: block; font-size: 11px; color: var(--faint); }
.bd-done td { opacity: 0.55; }
.bd-n { padding: 2px 8px; border: 0; border-radius: 7px; background: var(--fill); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.bd-n:hover { background: var(--accent-tint); color: var(--accent); }
.bd-n.bad, b.bad, small.bad { color: var(--danger); } b.warn { color: var(--warn); }
.bd-z { color: var(--faint); }
.bd-list td small { color: var(--muted); }
.bd-list tr { cursor: pointer; }
.sect-h .tool-gap { flex: 1; }
.sect-h .btn { letter-spacing: 0; text-transform: none; }

/* выбор нескольких статусов */
.st-pop { min-width: 300px; max-height: 60vh; overflow-y: auto; left: 0; right: auto; transform-origin: top left; }
.st-quick { display: flex; gap: 6px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.st-quick button { flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; }
.st-opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.st-opt:hover { background: var(--fill); } .st-opt span { flex: 1; } .st-opt small { color: var(--muted); font-variant-numeric: tabular-nums; }

/* плашка «смените временный пароль» */
.temp-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: #FFF4E5; color: #8A4B00; border-bottom: 1px solid rgb(194 122 0 / 0.25); font-size: 14px; }
.temp-banner .i { flex: none; } .temp-banner span { flex: 1; } .temp-banner .btn { flex: none; }
.temp-banner.onec-banner { background: #FDECEC; color: #8A1F1F; border-bottom-color: rgb(229 72 77 / 0.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .temp-banner.onec-banner { background: #3A1618; color: #FFC9CB; border-bottom-color: rgb(229 72 77 / 0.45); } }
:root[data-theme="dark"] .temp-banner.onec-banner { background: #3A1618; color: #FFC9CB; border-bottom-color: rgb(229 72 77 / 0.45); }
@media (max-width: 900px) { .temp-banner { flex-wrap: wrap; } .temp-banner .btn { width: 100%; } }

/* уведомления */
.sched { display: grid; gap: 14px; }
.sched-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.sched-tx { display: grid; flex: 1; gap: 2px; } .sched-tx b { font-weight: 600; } .sched-tx small { font-size: 13px; color: var(--muted); }
.sched-grid { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: end; }
.sched-grid .fld > span:first-child { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.sched-grid .select, .sched-grid .dates input { height: 40px; }
.nt-input { width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; color: var(--text); }
.nt-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.nt-table td { white-space: normal; vertical-align: middle; }
.nt-table .nt-mail { height: 34px; min-width: 200px; font-size: 13px; }
.nt-name { display: inline-flex; align-items: center; gap: 10px; } .nt-av { width: 30px; height: 30px; font-size: 11px; }
.nt-n { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.nt-other td { color: var(--muted); } .nt-other .nt-av { background: var(--faint); }
.nt-table td.actions { white-space: nowrap; }
@media (max-width: 900px) { .sched-grid { grid-template-columns: 1fr 1fr; } .sched-copy, .sched-grid .btn { grid-column: 1 / -1; } .nt-table td.actions { display: flex; gap: 6px; } }
.letter-preview { padding: 16px; border-radius: 14px; background: #fff; color: #0d0f13; border: 1px solid var(--line); overflow-x: auto; }

/* права сотрудника */
.perms { display: grid; gap: 8px; }
.perm-all { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.perm-all > span { display: grid; flex: 1; } .perm-all b { font-weight: 600; } .perm-all small { font-size: 12px; color: var(--muted); }
.perm-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perm-list li + li { border-top: 1px solid var(--line); }
.perm-list label { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; cursor: pointer; }
.perm-list input:disabled + span { color: var(--faint); }
input[type="checkbox"].switch { appearance: none; position: relative; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: var(--fill-2); cursor: pointer; transition: background 160ms; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: translate 200ms var(--ease); }
input[type="checkbox"].switch:checked { background: var(--ok); } input[type="checkbox"].switch:checked::after { translate: 18px 0; }
.sched-grid-3 { grid-template-columns: auto auto auto; justify-content: start; }
.switch:disabled { opacity: 0.5; cursor: default; }
body.no-export #dt-export, body.no-export .menu, body.no-export [data-mexport], body.no-export [data-recon-export], body.no-export .foot-l { display: none !important; }

/* разделы настроек — раскрывающиеся */
.acc { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.acc summary { display: flex; align-items: center; gap: 12px; padding: 20px 22px; cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary > span { display: grid; flex: 1; gap: 2px; }
.acc summary b { font: 600 15px/1.3 var(--font-display); letter-spacing: -0.02em; }
.acc summary small { font-size: 14px; color: var(--muted); }
.acc summary > .i { color: var(--muted); transition: rotate 200ms var(--ease); }
.acc[open] summary > .i { rotate: 180deg; }
.acc-body { padding: 0 22px 22px; }

.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) { .tiles, .tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles, .tiles-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1600px) { body.has-inspector .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.has-inspector .tile { min-height: 0; } }
@media (max-width: 900px) {
  main { padding: 8px 16px calc(100px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 22px; }
  .tiles { gap: 12px; } .tile { min-height: 0; padding: 16px; } .tile-val { font-size: 24px; }
  .finder { padding: 24px 20px; border-radius: 22px; } .finder-form { flex-direction: column; } .finder-go { justify-content: center; }
  .src-item { height: 44px; }
}
@media (max-width: 420px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* ───────── печать PDF ───────── */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #1D1D1F; }
  #print-area h1 { font-size: 18px; margin-bottom: 4px; } #print-area p { font-size: 11px; color: #6E6E73; margin-bottom: 16px; }
  #print-area table { width: 100%; border-collapse: collapse; font-size: 10px; } #print-area th, #print-area td { border: 1px solid #D1D1D6; padding: 5px 7px; text-align: left; } #print-area th { background: #F2F2F7; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ───────── Задачник (tasks.js) ───────── */
.tk { display: grid; gap: 12px; }
.tk-views { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-view { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--fill); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; }
.tk-view b { font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.tk-view.is-on { background: var(--accent); color: var(--on-accent, #fff); } .tk-view.is-on b { background: rgb(255 255 255 / 0.22); color: inherit; }
.tk-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tk-search { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 200px; padding: 0 12px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tk-search input { flex: 1; border: 0; background: none; font: inherit; color: inherit; min-width: 0; } .tk-search input:focus { outline: none; }
.tk-sel select { max-width: 180px; }
.tk-note { margin: 0; }
.tk-list { display: grid; gap: 8px; }
.tk-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color 120ms; }
.tk-row:hover, .tk-row:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tk-row.is-overdue { border-left: 3px solid var(--danger); }
.tk-row.st-done, .tk-row.st-cancelled { opacity: 0.6; }
.tk-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--fill); color: var(--muted); margin-top: 2px; }
.tk-ic.k-bug { background: var(--danger-bg); color: var(--danger); } .tk-ic.k-feature { background: var(--accent-tint); color: var(--accent); } .tk-ic.k-report { background: var(--ok-bg); color: var(--ok); } .tk-ic.k-access { background: var(--warn-bg); color: var(--warn); }
.tk-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tk-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .tk-title b { font-weight: 600; font-size: 15px; }
.tk-id { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.tk-desc { margin: 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.tk-tag { padding: 2px 8px; border-radius: 999px; background: var(--fill); }
.tk-people { display: inline-flex; align-items: center; gap: 4px; } .tk-next { color: var(--text); }
.tk-side { flex: none; display: grid; gap: 6px; justify-items: end; text-align: right; }
.tk-dates { display: grid; font-size: 13px; } .tk-dates small { color: var(--muted); } .t-danger { color: var(--danger); font-weight: 600; }
.tk-quick { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tk-card h3 { margin: 18px 0 6px; font-size: 14px; } .tk-text { white-space: pre-wrap; margin: 0; line-height: 1.5; }
.tk-dl dd small { color: var(--muted); }
.tk-actbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 16px; }
.tk-act { display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: var(--fill); font-size: 12.5px; color: var(--muted); }
.tk-act input, .tk-act select { font: inherit; color: var(--text); padding: 7px 9px; border: 0; border-radius: 8px; background: var(--surface); }
.tk-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tk-ask { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-top: 12px; }
.tk-ask textarea { width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: var(--fill); font: inherit; resize: vertical; }
.tk-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-msg { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; background: var(--fill); font-size: 13.5px; }
.tk-msg time { color: var(--muted); font-size: 12px; } .tk-msg b { font-weight: 600; } .tk-msg p { grid-column: 1 / -1; margin: 0; white-space: pre-wrap; } .tk-msg small { grid-column: 1 / -1; color: var(--muted); }
.tk-msg.is-note { background: var(--accent-tint); }
.tk-hist { margin-top: 16px; }
@media (max-width: 720px) {
  .tk-row { flex-wrap: wrap; } .tk-side { width: 100%; justify-items: start; text-align: left; grid-template-columns: 1fr auto; align-items: center; } .tk-quick { justify-content: flex-start; }
  .tk-ask { grid-template-columns: 1fr; } .tk-sel select { max-width: 140px; }
}
/* Монтажи и замеры */
.mt-wrap { padding: 0 16px 10px; }
.mt-table td, .mt-table th { vertical-align: top; }
.mt-table tr.is-late td:first-child { border-left: 3px solid var(--danger); padding-left: 10px !important; margin-left: -13px; }
.mt-table td:first-child { padding-left: 13px !important; }
.mt-table tr[data-order] { cursor: pointer; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
/* Задачи 1С */
.tk-seg { margin-bottom: 4px; }
.t1-table tr.is-late td:first-child { border-left: 3px solid var(--danger); padding-left: 10px !important; margin-left: -13px; }
.t1-table td:first-child { padding-left: 13px !important; }
.t1-table td { vertical-align: top; } .t1-title { font-weight: 500; } .t1-basis { color: var(--muted); display: block; margin-top: 2px; } .t1-desc { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--fill); white-space: pre-wrap; font-size: 13px; }
.t1-row { cursor: pointer; }
/* Push и лента уведомлений */
#top-bell { position: relative; }
#top-bell .bell-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
#side-bell .bell-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.push-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; } .push-row small { display: block; color: var(--muted); margin-top: 2px; } .push-btns { display: flex; gap: 8px; }
.feed { display: grid; gap: 6px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--fill); color: inherit; font: inherit; cursor: pointer; }
.feed-item.is-new { background: var(--accent-tint); } .feed-item > span:last-child { display: grid; gap: 2px; min-width: 0; } .feed-item b { font-weight: 600; } .feed-item small { color: var(--muted); } .feed-item time { font-size: 12px; color: var(--muted); }
.feed-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--surface); color: var(--accent); }
/* Задачи 1С — карточки */
.t1-group { margin-top: 14px; } .t1-group .sect-h.t-danger { color: var(--danger); } .t1-group .sect-h.t-accent { color: var(--accent); } .t1-group .sect-h.t-ok { color: var(--ok); }
.t1-list { display: grid; gap: 8px; }
.t1-card { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.t1-card.is-late { border-left: 3px solid var(--danger); } .t1-card.is-done { opacity: 0.65; }
.t1-main { flex: 1; min-width: 0; display: grid; gap: 4px; } .t1-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.t1-basis { font-size: 13px; color: var(--muted); } .t1-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.t1-more { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--fill); } .t1-more p { margin: 0 0 6px; white-space: pre-wrap; font-size: 13.5px; } .t1-more small { color: var(--muted); }
.t1-side { flex: none; display: grid; gap: 4px; justify-items: end; text-align: right; min-width: 150px; }
.t1-who { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; } .avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.t1-due { font-size: 13px; } .t1-due.bad { color: var(--danger); font-weight: 600; } .t1-author { color: var(--muted); font-size: 12px; }
@media (max-width: 720px) { .t1-card { flex-wrap: wrap; } .t1-side { width: 100%; justify-items: start; text-align: left; grid-template-columns: 1fr auto; align-items: center; min-width: 0; } }
.push-banner { background: var(--accent-tint); color: var(--text); border-bottom-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.push-banner .btn-link { margin: 0; font-size: 14px; } .push-banner .icon-btn { flex: none; width: 32px; height: 32px; }
.t1-people { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.t1-people-h { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.t1-person { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.t1-person.is-on { border-color: var(--accent); background: var(--accent-tint); }
.t1-person b { font-weight: 600; } .t1-person i { font-style: normal; font-weight: 700; color: var(--danger); }
.upd-banner { background: var(--ok-bg); color: var(--text); border-bottom-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.ptr { height: 0; overflow: hidden; display: grid; place-items: center; font-size: 13px; color: var(--muted); background: var(--fill); transition: height 120ms ease; }
.ptr.is-ready { color: var(--accent); font-weight: 600; }
.t1-person.is-off { cursor: default; opacity: 0.75; } .t1-person.is-off.is-on { opacity: 1; border-color: var(--accent); }
/* Мой день */
.myday { margin-top: 4px; } .myday-side { display: grid; gap: 16px; align-content: start; }
.attn-tx { display: grid; gap: 2px; min-width: 0; } .attn-tx small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wk-day { display: grid; gap: 3px; justify-items: center; padding: 8px 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; position: relative; }
.wk-day.is-today { border-color: var(--accent); background: var(--accent-tint); } .wk-day.is-sel { box-shadow: 0 0 0 2px var(--accent); }
.wk-wd { font-size: 11px; color: var(--muted); text-transform: uppercase; } .wk-n { font-weight: 600; font-size: 15px; }
.wk-dots { display: flex; gap: 3px; min-height: 6px; } .wk-dots i, .wk-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot-money { background: var(--ok); } .dot-montage { background: #FF9500; } .dot-task { background: var(--accent); } .dot-order { background: var(--danger); }
.wk-tot { position: absolute; top: 4px; right: 5px; font-size: 10px; color: var(--muted); }
.wk-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); } .wk-legend span { display: inline-flex; align-items: center; gap: 5px; }
.qa { display: grid; gap: 8px; } .qa .btn { justify-content: flex-start; }
.company-acc { margin-top: 18px; } .company-acc .acc-body { padding-top: 12px; }
@media (max-width: 720px) { .myday { grid-template-columns: 1fr; } }
/* Мой день: блоки, настройка, полоса менеджеров */
.myday-main { display: grid; gap: 16px; align-content: start; } .myday-tools { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.fp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; } .fp-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 0.5px solid var(--line); font-size: 14px; } .fp-list li:last-child { border-bottom: 0; } .fp-act { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
/* почта: карточки менеджеров и полоса исходов */
.mgr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; } .mgr-card { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; } .mgr-card header { display: grid; gap: 1px; } .mgr-card header small { color: var(--muted); font-size: 12px; }
.ob { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--fill); gap: 2px; } .ob i { display: block; height: 100%; min-width: 3px; } .ob-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); } .ob-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.mc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; } .mc-stats div { display: grid; gap: 2px; } .mc-stats dt { font-size: 11px; color: var(--muted); } .mc-stats dd { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; } .mc-stats dd.bad { color: var(--danger); }
/* производство: этапы */
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 18px 0 14px; } .stage { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; font: inherit; color: var(--text); cursor: pointer; } .stage b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; } .stage span { font-size: 12px; color: var(--muted); } .stage small { font-size: 11px; color: var(--muted); } .stage small.bad { color: var(--danger); } .stage.is-on { border-color: var(--accent); background: var(--accent-tint); } .stage.has-late { border-color: rgb(229 72 77 / 0.4); }
.pr-table td { vertical-align: top; } .pr-table tr.is-late td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
/* почта команды (демо-каркас) */
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } @media (max-width: 1100px) { .tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.funnel { display: grid; gap: 8px; } .fn-row { display: grid; grid-template-columns: 110px 1fr 44px 44px; align-items: center; gap: 10px; font-size: 14px; } .fn-l { color: var(--muted); font-size: 13px; } .fn-bar { height: 14px; border-radius: 7px; background: var(--fill); overflow: hidden; } .fn-bar i { display: block; height: 100%; border-radius: 7px; background: var(--accent); } .fn-lost .fn-bar i { background: var(--danger); } .fn-row b { text-align: right; } .fn-row small { color: var(--muted); font-size: 12px; text-align: right; }
.demo-note { margin: 0 0 10px; } .t-accent { color: var(--accent); } tr.is-main td { background: var(--danger-bg); }
/* планы продаж */
.pbar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin: 6px 0 2px; } .pbar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 400ms var(--ease); } .pbar.is-done i { background: var(--ok); } .pbar-lg { height: 10px; border-radius: 5px; margin: 12px 0 4px; }
.plan-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } .plan-top > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--fill); } .plan-top span { font-size: 12px; color: var(--muted); } .plan-top b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; } .plan-top b.ok { color: var(--ok); } .plan-top small { font-size: 12px; color: var(--muted); }
.plan-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; } .plan-m { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: 2px; } .plan-m.is-cur { border-color: var(--accent); } .plan-m.is-future { opacity: 0.7; } .plan-m b { font-size: 13px; text-transform: capitalize; } .plan-m > span { font-size: 15px; font-weight: 600; } .plan-m > span small { font-weight: 400; color: var(--muted); } .plan-m > small { font-size: 12px; color: var(--muted); }
.rv-months { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; } .rv-m { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--fill); font-size: 12px; text-transform: capitalize; } .rv-m.ok { background: var(--ok-bg); color: var(--ok); } .rv-m i { font-style: normal; color: var(--warn); } .rv-compact { margin: 0; gap: 4px; } .rv-compact .rv-m { padding: 2px 7px; }
.plan-table td.is-cur { background: var(--accent-tint); } .plan-table tr.total td { border-top: 2px solid var(--line); } .plan-table .ok { color: var(--ok); } .plan-table .bad { color: var(--danger); } .count.is-ok { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 900px) { .plan-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plan-months { grid-template-columns: 1fr; } }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .mini-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 0.5px solid var(--line); font-size: 14px; } .mini-list li:last-child { border-bottom: 0; }
.mini-list .num { text-align: right; display: grid; } .mini-list .num small { color: var(--muted); font-size: 12px; } .mini-list .btn-link { margin: 0; text-align: left; }
.kpis-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; } .kpis-4 .kpi { padding: 12px; border-radius: 12px; background: var(--fill); display: grid; gap: 2px; } .kpis-4 .kpi-top { font-size: 12px; color: var(--muted); } .kpis-4 .kpi-val { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; } .kpis-4 small.ok { color: var(--ok); } .kpis-4 small.bad { color: var(--danger); }
.cfg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .cfg-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--fill); } .cfg-list .chk { color: var(--text); font-size: 14px; }
.mgr-strip { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
/* Экран директора */
.sect-sub { font-weight: 400; font-size: 12.5px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tm-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color 120ms; }
.tm-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); } .tm-card.is-ok { opacity: 0.85; }
.tm-head { display: flex; align-items: center; gap: 10px; } .tm-head > div { flex: 1; min-width: 0; display: grid; } .tm-head b { font-weight: 600; } .tm-head small { color: var(--muted); font-size: 12.5px; }
.tm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tm-stat { display: grid; gap: 1px; padding: 8px 9px; border-radius: 10px; background: var(--fill); } .tm-stat b { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; } .tm-stat b i { font-style: normal; font-weight: 500; color: var(--muted); font-size: 13px; } .tm-stat span { font-size: 11.5px; color: var(--muted); } .tm-stat small { font-size: 11px; color: var(--muted); } .tm-stat.is-bad b { color: var(--danger); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 150px; margin: 6px 0 4px; }
.bar { display: grid; grid-template-rows: 1fr auto auto auto; justify-items: center; height: 100%; } .bar i { display: block; width: 70%; align-self: end; border-radius: 6px 6px 2px 2px; background: var(--accent); opacity: 0.85; }
.bar b { font-size: 11px; margin-top: 4px; white-space: nowrap; } .bar span { font-size: 11px; color: var(--muted); } .bar small { font-size: 10px; color: var(--muted); }
.is-mgr-day .finder, .is-mgr-day #ov-body, .is-mgr-day .ask, .is-mgr-day #company-acc { display: none; }
@media (max-width: 720px) { .tm-stats { grid-template-columns: repeat(2, 1fr); } .bars { height: 120px; } .bar b { display: none; } }
.ans-btns { display: flex; gap: 6px; flex-wrap: wrap; } .ans-btns .btn { flex: 1; justify-content: center; }

/* Таблицы-mini внутри карточек без отступов: текст не прилипает к краю; короткие ячейки (номера, менеджер, даты, суммы) не переносятся */
.card-flush .table-mini th:first-child, .card-flush .table-mini td:first-child { padding-left: 20px; }
.card-flush .table-mini th:last-child, .card-flush .table-mini td:last-child { padding-right: 20px; }
.table-mini td.num, .table-mini td.nw { white-space: nowrap; }
.bd-list td:first-child b, .bd-list td:nth-child(3) { white-space: nowrap; } .bd-list td:first-child small { display: block; max-width: 260px; }
.pr-table td:first-child b, .pr-table td:nth-child(6), .pr-table td:nth-child(7), .pr-table td:nth-child(8), .pr-table td:nth-child(9) { white-space: nowrap; }
.rp-table td:first-child, .rp-table td:nth-child(4), .rp-table td:nth-child(5), .rp-table td:nth-child(6) { white-space: nowrap; }
@media (max-width: 1600px) { .bd-grid { grid-template-columns: minmax(0, 1fr); } } /* «Скоро просрочатся» и «Дольше всех» — друг под другом, иначе 5 колонок в 420px */
/* «Почта»: список «Ждут счёта» — фиксированная раскладка, перенос только в длинных колонках */
.table.mail-aw { table-layout: fixed; }
.table.mail-aw th { white-space: nowrap; }
.table.mail-aw td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; height: auto; padding-top: 10px; padding-bottom: 10px; line-height: 1.4; }
.table.mail-aw td.num { text-align: left; }
.table.mail-aw .badge { white-space: nowrap; }
.aw-mark { height: 28px; max-width: 100%; padding: 0 8px; border: 0; border-radius: 7px; background: var(--fill); color: var(--muted); font: inherit; font-size: 12px; }
.table.mail-aw tbody tr { cursor: pointer; } .table.mail-aw tbody tr:hover td { background: var(--fill); }
.aw-dl { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 9px 12px; margin: 0; font-size: 14px; line-height: 1.4; } .aw-dl dt { color: var(--muted); } .aw-dl dd { margin: 0; overflow-wrap: anywhere; }
.pr-table th { white-space: normal; } /* «Заказы на производство» в две строки — остальным колонкам хватает места */
.rp-table td:nth-child(7) small, .rp-table td:nth-child(2) small { white-space: normal; display: block; max-width: 220px; }
/* Пространства «Продажи» / «Производство» */
.space-off { display: none !important; }
.space-list { display: grid; gap: 2px; margin: 0 0 10px; }
.space-item { display: grid; gap: 1px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.space-item b { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; } .space-item small { font-size: 11px; color: var(--muted); }
.space-item:hover { background: var(--fill); } .space-item[aria-pressed="true"] { background: var(--fill); box-shadow: inset 2px 0 0 var(--accent); }
a.src-item { text-decoration: none; color: inherit; }
/* Вторая система под заголовком: тот же шрифт, кликабельно */
.side-head-link { text-decoration: none; color: inherit; margin-top: -4px; border-radius: 9px; }
.side-head-link:hover { background: var(--fill); } .side-head-link .side-title small { color: var(--muted); }
