/* Экран «Дашборд». Классы db-…
   r9 (22.10, BRIEF-r9 §1.2): весь дашборд — в языке «тёмного ядра», как «Токены» (css/core.css, образец — «Баланс»).
   Шапка страницы (заголовок и вкладки-плашка) и подвал — светлые, это часть оболочки; всё с цифрами — ядро:
     .db-core   — ядро-герой вкладки (.core.is-hero): «Что сделать первым» / «Первый ответ»; в шапке — период, выгрузка, «Настроить»;
     .db-panel  — нижние панели (.core.is-panel): плитки, «Пришло и ждём» с «Продажником», путь клиента, команда, таблицы.
   Красного нет: просрочено — янтарь (глиф и кромка). Раскладка — по ширине самого экрана (container), а не окна. */

.screen-dashboard { max-width: 1560px; margin: 0 auto; padding-bottom: 8px; container-type: inline-size; }
.db-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.db-body { min-width: 0; }
/* зазор между панелями даёт .db-stack (gap), а не «.core + .core» набора */
.db-stack > .core + .core, .db-row > .core + .core { margin-top: 0; }

/* ── Шапка страницы: заголовок и вкладки-плашка в одну строку (как «Токены») ── */
.db-top { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; margin-bottom: 16px; }
.db-top h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 640; letter-spacing: -.018em; color: var(--ink); }
.db-tabs { flex: 0 0 auto; }
.db-tab:focus-visible { border-radius: 10px; }

/* ── Вкладки дашборда (r9 · §3.1): свои вкладки — «+», «⋯ Ещё N», перетаскивание; окна «Новая вкладка» и «Удалить» ── */
.db-top { flex-wrap: nowrap; min-width: 0; }
.db-top h1 { flex: 0 0 auto; white-space: nowrap; }
.db-tabs-w { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.db-tabs { flex-wrap: nowrap; min-width: 0; max-width: 100%; overflow: hidden; }
.db-tabs > [hidden] { display: none !important; }
.db-tab { white-space: nowrap; }
.db-tab > span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.db-tab[draggable="true"] { cursor: pointer; }
.db-tab.is-drag { opacity: .45; }
.db-tab.is-drop-b { box-shadow: inset 2px 0 0 var(--acc); }
.db-tab.is-drop-a { box-shadow: inset -2px 0 0 var(--acc); }
.db-tab-more { color: var(--mut); }
.db-tab-more > span { font-size: 13px; }
.db-tab-add { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px; border-style: dashed; color: var(--mut); }
.db-tab-add:hover { color: var(--acc); border-color: var(--acc-soft-brd); background: var(--acc-soft); }
.db-tab-add[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
/* окно «Новая вкладка» / «Вкладка …» — ядро: название, значки стеклом, начало — карточки-переключатели */
.db-tw { display: flex; flex-direction: column; gap: 16px; }
.db-tw .field { display: flex; flex-direction: column; gap: 7px; }
.db-tw-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.db-tw-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--k-line); background: rgba(var(--k-on), .05);
  color: var(--k-mut); cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .2s; }
.db-tw-ic:hover { color: var(--k-hi); border-color: rgba(var(--k-li), .42); background: rgba(var(--k-on), .09); }
.db-tw-ic[aria-checked="true"] { color: var(--k-hi); border-color: rgba(var(--k-li), .6); background: rgba(var(--k-li), .2); box-shadow: 0 0 0 1px rgba(var(--k-li), .3), 0 0 22px -6px rgba(167, 139, 250, .9); }
.db-tw-ic:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }
.db-tw-base { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.db-tw-base .check { padding: 10px 12px; }
.db-tw-base .check-t i { font-size: 11.5px; line-height: 15px; }
.db-tw-p { margin: 0; font-size: 12px; line-height: 17px; color: var(--k-mut2); }
@media (max-width: 760px) { .db-tw-base { grid-template-columns: minmax(0, 1fr); } }
@media (max-height: 620px) { .db-tw { gap: 12px; } .db-tw-ic { width: 36px; height: 36px; } }
@media (prefers-reduced-motion: reduce) { .db-tw-ic { transition: none !important; } }

/* ── Баннер «Каналы не подключены» (светлый, над ядром) ── */
.db-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px 14px 18px; border-radius: 14px; background: var(--l1); border: 1px solid var(--line-2); }
.db-banner-ic { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: var(--l2); border: 1px solid var(--line); color: var(--ryn); }
.db-banner-t { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.db-banner-t b { font-size: 14px; font-weight: 620; color: var(--ink); }
.db-banner-t span { font-size: 12.5px; line-height: 18px; color: var(--mut); }

/* ── Ядро-герой ── */
.db-core { display: flex; flex-direction: column; gap: 18px; }
.db-core.is-bar { gap: 0; }
.db-core-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; min-width: 0; }
.db-core-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-core-t .core-kick { display: inline-flex; align-items: center; }
.db-core-t .core-big b { font-size: 44px; }
.db-core-t .core-big small { font-size: 20px; }
/* период, выгрузка, «Настроить» — тёмные (правила .core .btn/.ib набора) */
.db-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.db-date { gap: 8px; font-weight: 520; white-space: nowrap; }
.db-date b { font-weight: 640; color: var(--k-hi); }
.db-date em { font-style: normal; color: var(--k-mut); }
.db-date > svg { color: var(--k-mut2); flex: 0 0 auto; }
.db-tip-i { display: inline-flex; margin-left: 7px; color: var(--k-mut2); cursor: help; border-radius: 50%; }
.db-tip-i:hover, .db-tip-i:focus-visible { color: var(--k-lilac); }
.db-tip-i:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }
.db-core .empty { padding: 18px 12px 6px; }

/* «Что сделать первым»: строки очереди стеклом слева, столбик «из чего очередь» справа */
.db-q { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); align-items: start; gap: 16px 18px; min-width: 0; }
.db-q.no-side { grid-template-columns: minmax(0, 1fr); }
.db-qmain { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.db-atts { display: flex; flex-direction: column; gap: 8px; }
.db-att { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 11px 12px 11px 14px;
  border-radius: 14px; border: 1px solid var(--k-line); background: linear-gradient(160deg, rgba(var(--k-on), .07), rgba(var(--k-on), .025)); cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.db-att:hover { border-color: rgba(var(--k-li), .42); background: linear-gradient(160deg, rgba(var(--k-on), .10), rgba(var(--k-on), .04)); transform: translateY(-1px); box-shadow: 0 14px 30px -18px rgba(139, 92, 246, .8); }
/* просрочено — янтарная кромка слева и тёплый отсвет (не красный) */
.db-att[data-tone="zav"] { background: linear-gradient(90deg, rgba(251, 191, 36, .075), rgba(var(--k-on), .03) 32%, rgba(var(--k-on), .025)); box-shadow: inset 2px 0 0 rgba(251, 191, 36, .8); }
.db-att[data-tone="zav"]:hover { border-color: rgba(251, 191, 36, .42); box-shadow: inset 2px 0 0 rgba(251, 191, 36, .95), 0 14px 30px -18px rgba(245, 158, 11, .6); }
.db-att-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; color: var(--k-mut);
  background: rgba(var(--k-on), .055); border: 1px solid var(--k-line); }
.db-att-ic > .core-dot { position: absolute; top: -3px; right: -3px; }
/* signals.css (r4, светлый дашборд) красит значок строки белым и ставит свою точку — в ядре глиф наш (.core-dot) */
.core .db-att[data-tone] .db-att-ic { background: rgba(var(--k-on), .055); border-color: var(--k-line); color: var(--k-mut); }
.core .db-att[data-tone] .db-att-ic::after { display: none; }
.db-att-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.db-att-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; font-weight: 620; line-height: 18px; color: var(--k-hi); overflow-wrap: anywhere; }
.db-att-t em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: 12px; line-height: 16px; color: var(--k-mut2); overflow-wrap: anywhere; }
.db-att-a { white-space: nowrap; }
.db-att:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }
.db-att-f { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.db-att-f .link-mut { color: var(--k-mut2); font-size: 12.5px; }
.db-att-f .link-mut:hover { color: var(--k-hi); }
.db-more { font-weight: 600; color: var(--k-lilac); }
.db-more > svg { color: currentColor !important; }
/* столбик чисел (как «За 30 дней Продажник» у «Баланса»): число справа, подпись словами; щелчок — список */
.db-qside { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; align-self: stretch; }
.db-qs { display: flex; flex-direction: column; }
.db-qs-un { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--k-line); }
.db-qs-r { display: grid; grid-template-columns: 44px minmax(0, 1fr) 14px; align-items: baseline; gap: 12px; width: calc(100% + 16px); margin: 0 -8px; padding: 6px 8px; border: 0; border-radius: 10px;
  background: none; font: inherit; text-align: left; color: var(--k-mut); cursor: pointer; transition: background .15s, color .15s; }
.db-qs-r > b { justify-self: end; font-size: 18px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; color: var(--k-hi); white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-qs-r > b small { font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--k-mut2); }
.db-qs-r > span { min-width: 0; font-size: 12.5px; line-height: 17px; }
.db-qs-r > svg { align-self: center; color: var(--k-mut2); opacity: 0; transition: opacity .15s, transform .15s; }
.db-qs-r:hover { background: rgba(var(--k-on), .06); color: var(--k-ink); }
.db-qs-r:hover > svg, .db-qs-r:focus-visible > svg { opacity: 1; transform: translateX(2px); }
.db-qs-r:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: -2px; }
.db-qs-r.is-amber > b { color: var(--k-amber-ink); text-shadow: 0 0 18px rgba(251, 191, 36, .35); }
.db-qs-r.is-lilac > b { color: var(--k-lilac); }
.db-qs-r.is-mint > b { color: var(--k-mint-ink); text-shadow: 0 0 18px rgba(94, 234, 212, .4); }

/* «Команда»: кольцо «в норму», крупно — первый ответ, столбик «сейчас», ниже луч по дням */
.db-tk { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px); align-items: center; gap: 16px 28px; min-width: 0; }
.db-tk.no-ring { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.db-tk-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.db-tk-main .core-sub { max-width: 46ch; margin: 0; }
.db-tk-main .core-big b { font-size: 52px; }
.db-tk-side { align-self: stretch; justify-content: center; }
.db-tk-beam { margin-top: -2px; }

/* ── Панели ── */
.db-panel { display: flex; flex-direction: column; padding: 18px 22px 20px; }
.db-panel-h { margin-bottom: 14px; }
.db-panel-h h2 { display: flex; align-items: center; }
.db-panel-h .core-h-r .link { font-size: 13px; }
.db-panel-b { min-width: 0; flex: 1 1 auto; }
.db-panel-b.is-flush { margin: 0 -22px -20px; }

/* ── Плитки: стекло ядра с рисунком (спарклайн или луч долей) ── */
.core.db-tiles { padding: 14px; border-radius: 18px; }
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.db-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 16px 14px; border-radius: 14px; }
/* подпись, цифра, метка, рисунок и подвал соседних плиток — на общих строках (subgrid): цифры на одной линии */
@supports (grid-template-rows: subgrid) {
  .db-tile { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 8px; align-content: start; }
  .db-tile-v { align-self: end; }
  .db-tile-b { align-self: start; }
  .db-tile-viz { align-self: center; }
  .db-tile-f { align-self: end; }
}
.db-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.db-tile-top .core-kick { min-width: 0; }
.db-tile-go { display: inline-flex; flex: 0 0 auto; color: var(--k-mut2); opacity: .55; transition: opacity .15s, color .15s; }
.db-tile:hover .db-tile-go, .db-tile:focus-visible .db-tile-go { opacity: 1; color: var(--k-hi); }
.db-tile-v { margin: 0; }
.db-tile-v b { overflow: hidden; text-overflow: clip; }
.db-tile-b { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-width: 0; font-size: 12.5px; line-height: 17px; color: var(--k-mut); }
.db-tile-b .core-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.db-tile-viz { display: flex; align-items: center; min-height: 34px; min-width: 0; }
.db-tile-viz .core-spark { width: 100%; height: 34px; }
.db-tile-viz > .core-meter { flex: 1 1 auto; }
.db-tile-viz .core-spark circle { display: none; }   /* тянется по ширине плитки — точка на конце стала бы овалом */
.db-tile-f { font-size: 12px; line-height: 16px; color: var(--k-mut2); }
.db-tile:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }
/* «Оплачено» — деньги пришли: мятный отсвет */
.db-tile.is-hl { border-color: rgba(94, 234, 212, .30); background: linear-gradient(160deg, rgba(94, 234, 212, .12), rgba(124, 58, 237, .06) 70%); box-shadow: 0 0 26px -12px rgba(94, 234, 212, .6); }
.db-tile.is-hl:hover { border-color: rgba(94, 234, 212, .5); }
.db-approx { margin-right: 4px; color: var(--k-mut2); font-weight: 600; }
.db-kpi-all { margin: 0 0 10px; color: var(--k-mut2); }   /* «Цифры всех наших компаний» у сотрудника одной компании (QA cross №11) */
/* луч долей: из каких сделок сумма, просроченное — янтарём, на паузе — пунктиром */
.db-seg { display: flex; gap: 2px; width: 100%; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(var(--k-on), .07); box-shadow: inset 0 0 0 1px rgba(var(--k-on), .05); }
.db-seg > i { flex: 0 0 var(--f); min-width: 3px; background: linear-gradient(90deg, #7c3aed, #a78bfa); box-shadow: 0 0 12px rgba(167, 139, 250, .45); }
.db-seg > i:nth-child(even):not(.is-amber):not(.is-mute) { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.db-seg > i.is-amber { background: linear-gradient(90deg, #b45309, #f59e0b 70%, #fde68a); box-shadow: 0 0 14px rgba(245, 158, 11, .5); }
.db-seg > i.is-mute { background: rgba(var(--k-mu), .2); box-shadow: none; }
.db-seg > i.is-dash { background: repeating-linear-gradient(90deg, rgba(var(--k-mu), .45) 0 6px, rgba(var(--k-mu), .12) 6px 9px); }
.db-seg > i:first-child { border-radius: 999px 0 0 999px; }
.db-seg > i:last-child { border-radius: 0 999px 999px 0; }
.db-seg > i:only-child { border-radius: 999px; }

/* ── Пришло и ждём + «Продажник» в одной панели ── */
.db-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 330px); align-items: stretch; gap: 18px 22px; }
.db-money.no-seller { grid-template-columns: minmax(0, 1fr); }
.db-beam { display: flex; flex-direction: column; min-width: 0; }
.db-beam .db-panel-h { margin-bottom: 8px; }
/* r33: заголовок графика и переключатель «Обращения · Деньги» рядом; под ними — среднее и пик */
.db-beam-t { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-width: 0; }
.db-beam-t .seg { flex: none; }
.db-inq-sum { margin: -2px 0 6px; font-size: 12.5px; }
.db-inq-sum .core-chip { margin-left: 4px; vertical-align: 1px; }
.db-legend { gap: 6px 16px; margin: 0; font-size: 12px; }
.db-legend i.is-dash { background: none; border: 1.4px dashed var(--c); box-sizing: border-box; box-shadow: none; }
.db-chart { position: relative; --db-h: 232px; min-height: var(--db-h); }
.db-chart.is-s { --db-h: 150px; }
/* «Продажник» — стекло: кольцо доли и две строки, ниже ссылки плашками */
.db-hero { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; min-width: 0; }
.db-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.db-hero-h { margin: 0; font-size: 15px; line-height: 20px; font-weight: 650; color: var(--k-hi); }
.db-hero-g { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.db-hero-ring .core-ring { --rs: 136px !important; }
.db-hero-ring .core-ring-c em { max-width: 54%; margin-top: 4px; }   /* «ведёт сам» — в две строки, внутри диска */
.db-hero-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.db-hero-t .core-sub { margin: 0; font-size: 12.5px; line-height: 18px; }
.db-hero-links { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.db-hero-links .core-pill { justify-content: flex-start; width: 100%; }
.db-hero-links .core-pill > span { flex: 1 1 auto; min-width: 0; }

/* ── Луч по дням (drawBeam): градиент, свечение, «сегодня», будущее, ось-луч — как rpBars «Отчётов» ── */
.db-bars .db-col rect { transition: filter .2s; }
.db-bars .db-col.is-hot rect { filter: drop-shadow(0 0 6px var(--c)) brightness(1.18); }
.db-bars rect.db-pale { fill-opacity: .16; stroke: var(--c); stroke-width: 1.3; stroke-dasharray: 3 2.5; }
.db-bars.is-grow .db-col { transform-box: fill-box; transform-origin: 50% 100%; animation: db-grow .8s var(--d, 0ms) cubic-bezier(.2, .8, .2, 1) both; }
@keyframes db-grow { from { transform: scaleY(0); } }
.db-bars .db-fut { fill: rgba(var(--k-on), .034); }
.db-bars .db-axb { filter: drop-shadow(0 0 5px rgba(167, 139, 250, .75)); }
.db-bars .db-axf { stroke: rgba(94, 234, 212, .7); stroke-width: 2; stroke-dasharray: 6 4; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(94, 234, 212, .55)); }
.db-bars .db-now { stroke-width: 1.5; filter: drop-shadow(0 0 4px rgba(var(--k-li), .9)); }
.db-bars .db-now-d { fill: #fff; filter: drop-shadow(0 0 5px rgba(var(--k-li), 1)); }
.db-bars .db-hover { fill: rgba(var(--k-on), .055); pointer-events: none; }
.core .db-bars .ch-ax.db-ax-now { fill: #fff; font-weight: 650; }
/* r33: на бледном ядре «сегодня» белым не видно (снимок Кирилла) — тёмно-лиловым */
[data-theme="light"] .core .db-bars .ch-ax.db-ax-now { fill: #4c1d95; }
/* r33 (Кирилл: «чтобы не было выхода цифр за пределы»): подсказка растёт по содержимому, суммы не переносятся и не
   вылезают — строка документа — сетка «текст | сумма», длинное название переносится, сумма всегда целиком справа */
.db-ctip { width: max-content; min-width: 200px; max-width: min(440px, calc(100% - 8px)); border-radius: 12px; padding: 10px 12px; }
.db-ctip span { min-width: 0; }
.db-ctip em { flex: none; white-space: nowrap; }
.chart-tip span.db-tip-doc { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline; }
.chart-tip span.db-tip-doc em { margin-left: 0; padding-left: 0; }
.chart-tip span.db-tip-tot { color: var(--k-hi, var(--ink)); font-weight: 560; padding-bottom: 2px; }
.db-ctip span i { box-shadow: 0 0 7px var(--c); }
.db-ctip i.is-pale { background: none; border: 1.4px dashed var(--c); box-sizing: border-box; box-shadow: none; }
.chart-tip span.db-tip-doc { padding-left: 15px; font-size: 11.5px; color: var(--k-mut2); }
.chart-tip span.db-tip-doc em { font-weight: 560; color: var(--k-mut); }
.chart-tip span.db-tip-none { color: var(--k-mut2); }
.core .chart-empty { color: var(--k-mut2); }

/* ── Путь клиента: этапы стеклом ── */
.db-lcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 12px; }
.db-lc { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--k-line);
  background: linear-gradient(160deg, rgba(var(--k-on), .07), rgba(var(--k-on), .025)); cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.db-lc:hover { border-color: rgba(var(--k-li), .42); background: linear-gradient(160deg, rgba(var(--k-on), .10), rgba(var(--k-on), .04)); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(139, 92, 246, .8); }
.db-lc:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: 2px; }
.db-lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.db-lc-go { display: inline-flex; color: var(--k-mut2); opacity: 0; transition: opacity .15s; }
.db-lc:hover .db-lc-go, .db-lc:focus-visible .db-lc-go { opacity: 1; color: var(--k-hi); }
.db-lc-n { display: flex; align-items: baseline; gap: 8px; font-size: 30px; font-weight: 650; line-height: 1.1; letter-spacing: -.03em; color: var(--k-hi); font-variant-numeric: tabular-nums; }
.db-lc-n small { font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--k-mut2); white-space: nowrap; }
.db-lc-rows { display: flex; flex-direction: column; gap: 7px; padding-top: 11px; margin-top: 2px; border-top: 1px solid var(--k-line); }
.db-lc-row { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--k-mut); }
.db-lc-row > svg { flex: 0 0 auto; margin-top: 1px; color: var(--k-mut2); }
.db-lc-row > span { min-width: 0; }
.db-lc-row b { color: var(--k-hi); font-weight: 640; }
.db-lc-row.is-warn { color: var(--k-ink); }
.db-lc-row.is-warn > svg { color: var(--k-amber); filter: drop-shadow(0 0 4px rgba(251, 191, 36, .6)); }
.db-lost { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--k-glass); border: 1px solid var(--k-line); font-size: 12.5px; line-height: 18px; color: var(--k-mut); }
.db-lost > span { flex: 1 1 260px; min-width: 0; }
.db-lost b { color: var(--k-hi); font-weight: 600; }
.db-lost > svg { color: var(--k-mut2); }

/* ── Команда сейчас (до 6 строк, без своей прокрутки) ── */
.db-people { display: flex; flex-direction: column; }
.db-prow { display: grid; grid-template-columns: minmax(0, 1.6fr) 120px 190px 120px; align-items: center; gap: 12px; padding: 9px 8px; margin: 0 -8px; border-top: 1px solid var(--k-line); border-radius: 10px; cursor: pointer; transition: background .12s; }
.db-prow:hover { background: rgba(var(--k-on), .06); }
.db-prow:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: -2px; }
.db-prow-h { cursor: default; padding-top: 0; padding-bottom: 8px; border-top: 0; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--k-mut2); }
.db-prow-h:hover { background: none; }
.db-prow-h > span { font-size: inherit; color: inherit; }
.db-prow-n, .db-prow-r { display: flex; align-items: center; justify-content: flex-end; gap: 6px; text-align: right; font-size: 13px; white-space: nowrap; }
.db-prow-n b { font-weight: 650; color: var(--k-hi); }
.db-prow-r { color: var(--k-mut); }
.db-prow .person { min-width: 0; }

/* ── Ряды из двух панелей ── */
.db-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: stretch; min-width: 0; }
.db-row > .core { min-width: 0; }

/* ── Вкладка «Команда»: таблица лидеров, нагрузка, причины передачи, команды ── */
.db-clip .tbl-scroll { border: 0; }
.db-clip .tbl th:first-child, .db-clip .tbl td:first-child { padding-left: 22px; }
.db-clip .tbl th:last-child, .db-clip .tbl td:last-child { padding-right: 22px; }
.db-clip .tbl th { background: none; font-size: 10.5px; letter-spacing: .08em; }
.db-clip .tbl tbody tr.is-click:hover td:first-child { box-shadow: inset 2px 0 0 var(--k-violet); }
.db-lead th, .db-lead td { white-space: nowrap; }
.db-lead-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 22px 16px; }
.db-lead-f .hint, .db-rows-f .hint { color: var(--k-mut2); }
.db-lead .person { min-width: 170px; }
.db-rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; background: rgba(var(--k-on), .06); border: 1px solid var(--k-line); font-size: 12px; font-weight: 650; color: var(--k-mut); font-variant-numeric: tabular-nums; }
.db-lead tbody tr:first-child .db-rank { color: var(--k-hi); border-color: rgba(var(--k-li), .45); background: rgba(var(--k-li), .16); box-shadow: 0 0 14px -4px rgba(167, 139, 250, .8); }
/* Продажник — отдельной строкой внизу, без места в рейтинге */
.db-lead tbody tr.db-lead-ai td { border-top: 1px dashed rgba(var(--k-on), .16); }
.db-th { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; margin: -2px -4px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; white-space: nowrap; }
.db-th:hover { color: var(--k-hi); background: rgba(var(--k-on), .07); }
.db-th.is-on { color: var(--k-lilac); }
.db-lds { display: flex; flex-direction: column; }
.db-ld { display: grid; grid-template-columns: minmax(0, 1.5fr) 112px minmax(0, 132px) 96px; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--k-line); }
.db-lds .db-ld:first-child { border-top: 0; }
.db-ld .person { min-width: 0; }
.db-ld-n { text-align: right; font-size: 13px; color: var(--k-mut); white-space: nowrap; }
.db-ld-n b { font-weight: 650; color: var(--k-hi); }
.db-ld-f, .db-ld-a { display: flex; justify-content: flex-end; min-width: 0; }
.db-ld-ai { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: linear-gradient(160deg, rgba(var(--k-li), .14), rgba(124, 58, 237, .05)); border: 1px solid rgba(var(--k-li), .3); }
.db-ld-ai span { display: flex; flex-direction: column; min-width: 0; }
.db-ld-ai b { font-size: 13px; font-weight: 620; color: var(--k-hi); }
.db-ld-ai em { font-style: normal; font-size: 12px; color: var(--k-mut); }
/* «Почему передаёт людям»: причина словами правила + луч передач за 30 дней + вопрос базы */
.db-wl { display: flex; flex-direction: column; }
.db-wl-r { display: grid; grid-template-columns: minmax(0, 1fr) 36px 112px; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 8px; margin: 0; border: 0; border-top: 1px solid var(--k-line);
  border-radius: 0; background: none; color: var(--k-ink); font: inherit; text-align: left; cursor: pointer; transition: background .12s; }
.db-wl-r:first-child { border-top: 0; }
.db-wl-r:hover { background: rgba(var(--k-on), .06); }
.db-wl-r > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.db-wl-r > b { text-align: right; font-size: 13px; font-weight: 650; color: var(--k-hi); }
.db-wl-r > em, .db-wl-r > .pill, .db-wl-r > .sig { justify-self: end; }
.db-wl-r > em { font-style: normal; font-size: 12px; color: var(--k-mut2); }
.db-wl-r:focus-visible { outline: 2px solid var(--k-lilac); outline-offset: -2px; }
.db-wl-h { display: grid; grid-template-columns: minmax(0, 1fr) 52px 112px; gap: 10px; padding: 0 8px 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--k-mut2); }
.db-wl-h > span { white-space: nowrap; }
.db-wl-h > span:nth-child(2) { text-align: right; }
.db-wl-h > span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.db-why-r { grid-template-columns: minmax(0, 1fr) 52px 112px; min-height: 46px; }
.db-why-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-why-r .db-why-l > span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 18px; text-align: left; }   /* правило — целиком, без многоточия */
.db-why-l .core-meter { height: 5px; }
.db-rows-f { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--k-line); }
.db-rows-f .hint { font-size: 12px; }
.db-tn { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.db-tn > i { width: 8px; height: 8px; border-radius: 2px; background: var(--t); transform: rotate(45deg); flex: 0 0 auto; box-shadow: 0 0 8px var(--t); }
.db-clip .avs .av + .av { margin-left: -4px; }
/* ассистент «кому передать» — стекло внутри панели */
.db-ai-wrap { position: relative; padding: 4px 22px 20px; }
.db-ai-wrap .ai-block { background: linear-gradient(160deg, rgba(var(--k-li), .12), rgba(var(--k-on), .03)); border-color: rgba(var(--k-li), .3); }
.db-ai-wrap .ai-answer { background: var(--k-glass); border-color: var(--k-line); color: var(--k-ink); }
.db-aq-x { position: absolute; top: 18px; right: 36px; font-size: 12px; color: var(--k-mut2); }
.db-aq-x:hover { color: var(--k-hi); }
.db-aq { display: flex; flex-direction: column; margin-top: 4px; }
.db-aq-r { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--k-line); font-size: 13px; line-height: 19px; color: var(--k-mut); }
.db-aq-r:first-child { border-top: 0; padding-top: 2px; }
.db-aq-r > span { flex: 1 1 auto; min-width: 0; }
.db-aq-r b { color: var(--k-hi); font-weight: 620; white-space: nowrap; }
.db-aq-r .btn { flex: 0 0 auto; }

/* ── Подвал (светлый, часть оболочки) ── */
.db-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mut2); }
.db-foot-l { display: inline-flex; align-items: center; gap: 8px; }
.db-foot-c { flex: 1 1 280px; text-align: center; }

/* ── Окна (справки по цифрам — .sheet.is-core, стили рамы — core.css «r9 · W») ── */
/* тело окна — колонка с прокруткой; без этого блок с overflow:hidden (таблица) сжимается и обрезает строки */
.db-sheet .sb > * { flex-shrink: 0; }
.db-sheet:focus-visible { outline: none; }
.db-sub-h { margin-top: 4px; font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mut2); }
.db-trs { display: flex; flex-direction: column; }
.db-trs-r { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.db-trs-r:first-child { border-top: 0; padding-top: 0; }
.db-trs-r b { font-size: 13.5px; font-weight: 620; color: var(--ink); }
.db-trs-r p { margin: 0; font-size: 13px; line-height: 19px; color: var(--mut); }
.db-hb .hbar-top { align-items: center; }
.db-kind { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 12.5px; color: var(--mut); }
.db-kind-0 { display: inline-block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--mut2); }
.db-tasks tbody tr.is-late > td:first-child { box-shadow: inset 2px 0 0 rgba(251, 191, 36, .85); }
.db-tlist { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.db-tlist .check-t i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch; }
.db-wsel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ── «Настроить» (r9): окно ядра — плитки сверху слева, блоки вкладки и «ещё» справа ── */
.db-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 26px; align-items: start; }
.db-set-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.db-set-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.db-set-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; min-height: 32px; }
.db-set-p { margin: -4px 0 0; font-size: 12.5px; line-height: 18px; color: var(--k-mut2); }
.db-set-p svg { vertical-align: -2px; }
.db-set-sub { margin-top: 6px; font-size: 10.5px; line-height: 14px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--k-mut2); }
.db-set-seg { flex-wrap: wrap; }
.db-set-f { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--k-line); background: linear-gradient(160deg, rgba(var(--k-on), .05), rgba(var(--k-on), .015)); }
.db-set-f > span { display: flex; flex-direction: column; gap: 2px; }
.db-set-f b { font-size: 13px; font-weight: 620; color: var(--k-hi); }
.db-set-f em { font-style: normal; font-size: 12px; line-height: 16px; color: var(--k-mut2); }
.db-sl { display: flex; flex-direction: column; gap: 6px; }
.db-sr { position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; border-radius: 12px; transition: opacity .15s, box-shadow .15s; }
.db-sr > .check { flex: 1 1 auto; min-width: 0; padding: 9px 12px; }
.db-sr .check-t b { font-size: 13px; }
.db-sr .check-t i { font-size: 11.5px; line-height: 15px; }
.db-sr-sp { display: inline-flex; align-items: center; justify-content: center; width: 22px; flex: 0 0 auto; color: var(--k-mut2); }
.db-sr-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: 0 0 auto; margin-right: 2px; border-radius: 7px; font-size: 11px; font-weight: 650;
  color: var(--k-lilac); background: rgba(var(--k-li), .14); font-variant-numeric: tabular-nums; }
.db-sr-n.is-0 { visibility: hidden; }
.db-sr[draggable="true"] { cursor: grab; }
.db-sr.is-dim { opacity: .55; }
.db-sr.is-drag { opacity: .4; }
.db-sr.is-drop-b { box-shadow: 0 -2px 0 0 var(--k-lilac), 0 -6px 14px -6px rgba(167, 139, 250, .9); }
.db-sr.is-drop-a { box-shadow: 0 2px 0 0 var(--k-lilac), 0 6px 14px -6px rgba(167, 139, 250, .9); }
.db-sl.is-rest .db-sr > .check { padding-top: 7px; padding-bottom: 7px; }
@media (max-width: 980px) { .db-set { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .db-sr { transition: none !important; } }

/* сколько плиток (3…6): столбцов — сколько плиток; 5 — плотнее, числа мельче; 6 — два ряда по три */
.db-kpis[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-kpis[data-n="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.db-kpis[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-kpis[data-n="5"] .db-tile { padding: 12px 13px; }
.db-kpis[data-n="5"] .db-tile-v b { font-size: 22px; }
.db-kpis[data-n="5"] .core-kick { letter-spacing: .08em; }
.db-tile-v.is-amber b { background: linear-gradient(180deg, #fff7e0 30%, #fbbf24 100%); -webkit-background-clip: text; background-clip: text; }

/* ── Узкая рабочая область (по ширине экрана, container) ── */
@container (max-width: 1060px) {
  .db-row { grid-template-columns: minmax(0, 1fr); }
  .db-kpis, .db-kpis[data-n] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-kpis:is([data-n="3"], [data-n="5"], [data-n="6"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-tile { grid-row: span 5; }
  .db-money { grid-template-columns: minmax(0, 1fr); }
  /* «Продажник» на всю ширину: кольцо и строки слева, ссылки справа */
  .db-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); grid-template-areas: "t t" "g l"; align-items: center; gap: 10px 22px; }
  .db-hero-top { grid-area: t; }
  .db-hero-g { grid-area: g; }
  .db-hero-links { grid-area: l; margin-top: 0; }
  .db-q { grid-template-columns: minmax(0, 1fr) minmax(210px, 240px); gap: 14px; }
  .db-tk { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px 22px; }
  .db-tk.no-ring { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .db-tk-ring .core-ring { --rs: 128px !important; }
  /* описание команды — в подсказке строки, иначе строки таблицы становятся высокими */
  .db-tt .db-tn em { display: none; }
}
@container (max-width: 900px) {
  /* строке очереди — вся ширина: вместо значка в стекле остаётся только глиф сигнала */
  .db-q { grid-template-columns: minmax(0, 1fr) minmax(196px, 214px); }
  .db-q .db-att { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; }
  .core .db-q .db-att .db-att-ic { width: 8px; height: auto; align-self: start; margin-top: 6px; border: 0; background: none; }
  .db-q .db-att-ic > svg { display: none; }
  .db-q .db-att-ic > .core-dot { position: static; }
  .db-qs-r { grid-template-columns: 26px minmax(0, 1fr) 12px; gap: 10px; }
  .db-clip .tbl th, .db-clip .tbl td { padding-left: 8px; padding-right: 8px; }
  .db-lead .person { min-width: 0; max-width: 170px; }
  .db-date em { display: none; }
}
@container (max-width: 760px) {
  .db-q { grid-template-columns: minmax(0, 1fr); }
  .db-qside { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .db-qside .db-qs { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
  .db-qs-un { margin: 0; padding: 0 0 0 10px; border-top: 0; border-left: 1px solid var(--k-line); }
  .db-qs-r { width: auto; margin: 0; grid-template-columns: auto auto; }
  .db-qs-r > svg { display: none; }
  .db-kpis, .db-kpis[data-n], .db-kpis:is([data-n="3"], [data-n="5"], [data-n="6"]) { grid-template-columns: minmax(0, 1fr); }
  .db-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "g" "l"; }
  .db-tk, .db-tk.no-ring { grid-template-columns: auto minmax(0, 1fr); }
  .db-tk-side { grid-column: 1 / -1; }
  .db-prow { grid-template-columns: minmax(0, 1fr) 96px 84px; }
  .db-prow-st { display: none; }
  .db-ld { grid-template-columns: minmax(0, 1fr) 96px; }
  .db-ld-f, .db-ld-a { display: none; }
  .db-wsel { grid-template-columns: minmax(0, 1fr); }
  .db-att { grid-template-columns: minmax(0, 1fr) auto; }
  .db-att-ic { display: none; }
  .db-ctl { margin-left: 0; }
}
/* на низком и узком окне плавающий помощник (64 px, справа внизу) ложится на кнопки — оставляем ему место у подвала */
@media (max-width: 720px) {
  .db-foot-c { text-align: left; }
}
/* ── Низкое окно (1100×560): главное — очередь (или число и кольцо) — в первом экране ── */
@media (max-height: 700px) {
  .db-top { margin-bottom: 12px; }
  .db-top h1 { font-size: 22px; }
  .core.db-core { gap: 12px; padding: 16px 20px 16px; }
  .db-core-t { gap: 2px; }
  .db-core-t .core-big b { font-size: 34px; }
  .db-core-t .core-big small { font-size: 17px; }
  .db-ctl .btn, .db-ctl .ib { height: 32px; }
  .db-ctl .ib { width: 32px; }
  .db-atts { gap: 6px; }
  .db-att { padding: 8px 10px 8px 12px; gap: 12px; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .db-att-ic { width: 34px; height: 34px; }
  .db-qmain { gap: 8px; }
  .db-qside { padding: 10px 14px; gap: 6px; }
  .db-qs-r { padding: 4px 8px; }
  .db-qs-r > b { font-size: 16px; }
  .db-tk-ring .core-ring { --rs: 118px !important; }
  .db-tk-main .core-big b { font-size: 42px; }
  .db-chart { --db-h: 196px; }
  .db-chart.is-s { --db-h: 120px; }
}

/* ── «Уменьшить движение»: без вступления, подъёма и бегущих бликов ── */
@media (prefers-reduced-motion: reduce) {
  .db-bars.is-grow .db-col { animation: none !important; }
  .db-att, .db-lc, .db-qs-r, .db-qs-r > svg, .db-bars .db-col rect, .db-tile-go, .db-lc-go { transition: none !important; }
  .db-att:hover, .db-lc:hover { transform: none; }
}
/* r16 (24.10): блок «ИИ-агенты» (вместо «Таблицы лидеров» и «Кто чем занят») — лицо агента, имя, состояние; строка ведёт
   в его статистику. Числа — столбцами справа, как было в рейтинге */
.db-ags th, .db-ags td { white-space: nowrap; }
.db-ags td:first-child { width: 100%; max-width: 0; min-width: 220px; }
.db-ag { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.db-ag > :first-child { flex: 0 0 auto; }
.db-ag .t-main { min-width: 0; }
.db-ag .t-main b, .db-ag .t-main em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-ags .db-amber { color: var(--k-amber-ink); font-weight: 600; }

/* ══ r31 (16.11), круг 4–5: «Что дал Продажник» (WIDGETS.value в screens/dashboard.js) ══
   Слева большая плитка «Сэкономил людям ≈ N ч» (круг 5, Кирилл: «более обширной такой вкладочкой, чтобы она выделялась на
   фоне остального»): крупное число с градиентом, мягкое лиловое и мятное свечение, разбивка полосой и списком «штуки × минуты
   на одно = время». Справа четыре плитки фактов 2 × 2: первый ответ · без человека · довёл до оплаты · цена результата;
   под ними — путь его сделок. Стекло ядра, без оранжевого. */
.db-val .db-panel-h h2 { display: flex; align-items: baseline; gap: 8px; }
.db-val-win { font-size: 13px; font-weight: 500; color: var(--k-mut2); letter-spacing: 0; }
.db-val .db-panel-h .link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.db-val-g { display: grid; grid-template-columns: minmax(0, 1.22fr) repeat(2, minmax(0, 1fr)); gap: 14px; padding: 4px 20px 14px; }
/* большая плитка — на две строки слева */
.db-val-hero { grid-row: span 2; position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 22px 24px 20px; overflow: hidden;
  border-color: rgba(var(--k-li), .34); background: linear-gradient(155deg, rgba(167, 139, 250, .22), rgba(var(--k-on), .03) 58%, rgba(94, 234, 212, .08));
  box-shadow: 0 22px 48px -30px rgba(124, 58, 237, .75), inset 0 1px 0 rgba(var(--k-on), .08); }
.db-val-hero::before, .db-val-hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(6px); }
.db-val-hero::before { right: -90px; top: -110px; width: 320px; height: 320px; background: radial-gradient(circle, rgba(167, 139, 250, .36), rgba(167, 139, 250, .08) 55%, transparent 70%); }
.db-val-hero::after { left: -90px; bottom: -130px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(94, 234, 212, .2), transparent 65%); }
.db-val-big { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 2px; }
.db-val-big b { font-size: 92px; line-height: .95; font-weight: 680; letter-spacing: -.055em; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: .04em;
  background: linear-gradient(180deg, var(--k-hi) 25%, var(--k-violet) 135%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.db-val-big small { font-size: 30px; font-weight: 620; color: var(--k-mut); }
.db-val-big .db-approx { margin-right: 0; font-size: 40px; font-weight: 500; color: var(--k-mut2); }
.db-val-sub { margin: 0; font-size: 14px; line-height: 21px; }
.db-val-sub b { color: var(--k-ink); font-weight: 640; font-variant-numeric: tabular-nums; }
.db-val-mlink { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }
.db-val-brk { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 18px; }
.db-val-bar { display: flex; gap: 3px; height: 10px; }
.db-val-bar i { min-width: 5px; border-radius: 999px; }
.db-val-leg { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 20px; color: var(--k-mut); }
.db-val-leg li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto minmax(72px, auto); align-items: center; column-gap: 10px; padding: 4px 0; border-top: 1px solid rgba(var(--k-on), .07); }
.db-val-leg li:first-child { border-top: 0; }
.db-val-lk { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--k-ink); }
.db-val-leg em { font-style: normal; font-size: 12px; color: var(--k-mut2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-val-leg b { text-align: right; color: var(--k-ink); font-weight: 640; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-val-leg i, .db-val-k i { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-violet { background: var(--k-deep); box-shadow: 0 0 10px rgba(124, 58, 237, .45); }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-lilac { background: var(--k-violet); }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-mint { background: var(--k-mint); box-shadow: 0 0 10px rgba(94, 234, 212, .45); }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-sky { background: var(--k-sky); }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-pink { background: var(--k-pink); }
:is(.db-val-bar, .db-val-leg, .db-val-k) .is-mute { background: rgba(var(--k-mu), .45); }
.db-val-hero.is-zero .db-val-big b { color: var(--k-mut2); background: none; -webkit-background-clip: border-box; background-clip: border-box; }
[data-theme="light"] .core .db-val-hero.core-glass { border-color: rgba(124, 77, 230, .24); background: linear-gradient(155deg, #f1eaff 0%, #fbf9ff 52%, #eefbf7 100%);
  box-shadow: 0 1px 2px rgba(91, 47, 191, .05), 0 26px 50px -34px rgba(91, 47, 191, .5); }
[data-theme="light"] .core .db-val-leg li { border-top-color: rgba(91, 47, 191, .08); }
[data-theme="light"] .core :is(.db-val-bar, .db-val-leg, .db-val-k) .is-mute { background: rgba(91, 47, 191, .22); }
/* плитки фактов */
.db-val-t { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px 18px; }
.db-val-n { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 0; }
.db-val-n b { font-size: 36px; line-height: 1.05; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--k-hi); white-space: nowrap; }
.db-val-n small { font-size: 16px; font-weight: 600; color: var(--k-mut); }
.db-val-t .core-sub { margin: 0; font-size: 13px; line-height: 18px; }
.db-val-t .core-sub b, .db-val-l b, .db-val-fast b { color: var(--k-ink); font-weight: 620; font-variant-numeric: tabular-nums; }
.db-val-l { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12.5px; line-height: 18px; color: var(--k-mut); }
.db-val-l > svg { flex: 0 0 auto; margin-top: 2px; color: var(--k-mut2); }
.db-val-fast { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; color: var(--k-mut); }
.db-val-why { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--k-mut); }
.db-val-why i { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-style: normal; background: rgba(var(--k-mu, 148, 140, 180), .1); color: var(--k-ink); }
.db-val-why i b { font-weight: 640; font-variant-numeric: tabular-nums; }
.db-val-pre { display: inline-flex; align-items: center; gap: 5px; margin: auto 0 0; font-size: 11.5px; color: var(--k-mut2); }
/* полоса под плитками: «Путь его сделок» — числа со словами и тонкие полосы по длине */
.db-val-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; padding: 0 22px 18px; }
.db-val-fun { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
.db-val-fun-k { align-self: center; margin-right: 4px; font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--k-mut2); }
.db-val-fa { display: inline-flex; align-self: center; color: var(--k-mut2); opacity: .7; }
.db-val-fs { display: inline-flex; flex-direction: column; gap: 4px; min-width: 64px; font-size: 13px; line-height: 18px; color: var(--k-mut); white-space: nowrap; }
.db-val-fs b { font-weight: 650; color: var(--k-hi); font-variant-numeric: tabular-nums; }
.db-val-fs i { display: block; height: 3px; width: calc(var(--f) * 100%); min-width: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--k-violet), var(--k-deep)); opacity: .55; }
.db-val-fs.is-last i { background: linear-gradient(90deg, var(--k-mint), #2dd4bf); opacity: 1; }
.db-val-none { margin: 0; padding: 4px 20px 20px; }
/* «Как считаем»: расчёт времени с нормами и ставкой, ниже — определения плиток */
.db-val-how { display: flex; flex-direction: column; gap: 22px; }
.db-val-sec { display: flex; flex-direction: column; gap: 12px; }
.db-val-sec-h { font-size: 15px; font-weight: 660; color: var(--k-ink); }
.db-val-how .core-sub { margin: 0; }
.db-val-k { display: inline-flex; align-items: center; gap: 8px; }
.db-val-cnt { display: none; color: var(--k-mut2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-val-w { display: block; margin-top: 2px; padding-left: 16px; font-style: normal; font-size: 12.5px; color: var(--k-mut2); }
.db-val-tbl td { vertical-align: middle; }
.db-val-tbl tr.is-none td { color: var(--k-mut2); }
.db-val-in { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.db-val-tot td { border-top: 1px solid var(--k-line); }
.db-val-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 13.5px; color: var(--k-ink); }
.db-val-rate .inp { width: 110px; }
.db-val-reset { margin-left: auto; font-size: 13px; }
.db-val-def b { font-size: 14px; font-weight: 640; color: var(--k-ink); }
.db-val-def .core-sub { margin: 3px 0 0; font-size: 13px; line-height: 19px; }
.db-val-src { font-size: 12px; color: var(--k-mut2); }
@media (max-width: 1320px) {
  .db-val-g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-val-hero { grid-column: 1 / -1; grid-row: auto; }
  .db-val-big b { font-size: 76px; }
  .db-val-leg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .db-val-leg li:nth-child(2) { border-top: 0; }
}
@media (max-width: 720px) {
  .db-val-g { grid-template-columns: minmax(0, 1fr); }
  .db-val-big b { font-size: 64px; }
  .db-val-leg { grid-template-columns: minmax(0, 1fr); }
  .db-val-leg li:nth-child(2) { border-top: 1px solid rgba(var(--k-on), .07); }
  /* узко: «штуки × минуты» — под названием, время — справа на обе строки */
  .db-val-leg li { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 0; }
  .db-val-leg li > i, .db-val-leg li > b { grid-row: 1 / span 2; }
  .db-val-leg em { grid-column: 2; grid-row: 2; }
  /* «Как считаем» на телефоне: таблица норм без прокрутки вбок — «Сколько» уходит под название («29 ×»), пояснение
     прячется, шапка в две строки, поле уже, время не рвётся */
  .db-val-tbl :is(th, td):nth-child(2) { display: none; }
  .db-val-k { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 2px 8px; }
  .db-val-k > i { align-self: start; margin-top: 5px; }
  .db-val-cnt { display: block; grid-column: 2; }
  .db-val-w { display: none; }
  .db-val-tbl th { height: auto; padding: 7px 6px; line-height: 16px; white-space: normal; }
  .db-val-tbl td { padding: 9px 6px; }
  .db-val-tbl :is(th, td):first-child { padding-left: 10px; }
  .db-val-tbl :is(th, td):last-child { padding-right: 10px; }
  .db-val-in { width: 58px; }
  .db-val-tbl [data-t], .db-val-tbl [data-tot] { white-space: nowrap; }
}
