/* v2-b2c.css — дизайн-система v2 (docs/37), слайс «b2c»: стили поверх app.css.
 * Макеты: docs/design-v2/B2C_*.dc.html. Только токены tokens.css (без хардкода hex).
 * Переиспользуем общие паттерны: lv-* (карточки/шторка/кнопки лидов), v2s-* (сегмент,
 * чипы-фильтры, строки). Здесь — только своё: колокольчик, строки диалогов/событий,
 * карточка клиента, каналы, аналитика бота. Все :hover — в @media (hover:hover). */

/* ═══════════════════════════ экран ═══════════════════════════ */
.v2b-screen { display: flex; flex-direction: column; gap: 14px; }
.v2b-head { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.v2b-h1.page-head__title { margin: 0; font-size: 28px; line-height: 34px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.v2b-sub { margin: 0; font-size: 15px; line-height: 21px; color: var(--text-muted); }
.v2b-grow { flex: 1 1 auto; min-width: 0; }
.v2b-empty-note { margin: 0; padding: 20px 4px; text-align: center; font-size: 14px; line-height: 20px; color: var(--text-faint); }
.v2b-foot { margin: 0; padding: 0 4px; font-size: 13px; color: var(--text-faint); }

/* группа строк: белая карточка, hairline между строками */
.v2b-grp {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}

/* непрочитанное — синяя точка (--col-new), как «новый» */
.v2b-udot { width: 8px; height: 8px; border-radius: 50%; background: var(--col-new); flex: none; }

/* аватар-инициал */
.v2b-av {
  flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-sunken); color: var(--text-muted); font-weight: var(--weight-semibold); line-height: 1;
}
.v2b-av--40 { width: 40px; height: 40px; font-size: 16px; }
.v2b-av--44 { width: 44px; height: 44px; font-size: var(--text-headline); }
.v2b-av--48 { width: 48px; height: 48px; font-size: var(--text-headline); }

/* чип интереса «🔥 78%» — зелёный ≥70, иначе нейтральный */
.v2b-ichip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; flex: none;
  border-radius: var(--radius-pill); background: var(--surface-sunken); color: var(--text-muted);
  font-size: 12px; font-weight: var(--weight-semibold); white-space: nowrap;
}
.v2b-ichip .icon { width: 12px; height: 12px; stroke-width: 2.2; color: var(--text-faint); }
.v2b-ichip.is-hot { background: var(--st-won-bg); color: var(--st-won-fg); }
.v2b-ichip.is-hot .icon { color: var(--col-won); }

/* «нужен человек» — янтарный контур (повод, не тревога) */
.v2b-hchip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; flex: none; box-sizing: border-box;
  border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--why-border);
  color: var(--st-work-fg); font-size: 13px; font-weight: var(--weight-medium); white-space: nowrap;
}
.v2b-hchip .icon { width: 13px; height: 13px; stroke-width: 2.2; color: var(--why-icon); }
.v2b-hchip--sm { height: 22px; padding: 0 8px; font-size: 12px; background: var(--why-bg); border: 0; }
.v2b-hchip--sm .icon { width: 12px; height: 12px; }

/* кружок интереса 34px (карточка в списке) */
.v2b-score {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-muted); font-size: 13px; font-weight: var(--weight-semibold);
}
.v2b-score.is-hot { background: var(--st-won-bg); color: var(--st-won-fg); }

/* кольцо интереса (шторка/карточка) */
.v2b-ring { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.v2b-ring svg { display: block; }
.v2b-ring__track { fill: none; stroke: var(--surface-sunken); stroke-width: 5; }
.v2b-ring__bar { fill: none; stroke: var(--text-muted); stroke-width: 5; stroke-linecap: round; }
.v2b-ring__bar.is-hot { stroke: var(--col-won); }
.v2b-ring__num { font-family: var(--font-sans); font-size: 15px; font-weight: var(--weight-bold); fill: var(--text); }
.v2b-ring__cap { font-size: 11px; color: var(--text-faint); }

/* ═══════════════════════════ колокольчик в шапке ═══════════════════════════ */
.v2b-bell {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: none; color: var(--text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; font: inherit;
}
.v2b-bell .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.v2b-bell:active { background: var(--surface-sunken); }
.v2b-bell:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-bell__badge {
  position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; border: 2px solid var(--bg); background: var(--accent); color: var(--accent-text);
  font-family: inherit; font-size: 11px; font-weight: var(--weight-semibold); line-height: 14px; text-align: center;
}
.v2b-bell__badge[hidden] { display: none; }
.v2b-bell[hidden] { display: none; }
/* docs/50 S7: компактный колокольчик — только под мышь (десктоп); в мобильном браузере остаётся 44 */
@media (min-width: 1024px) { body.is-browser .v2b-bell { width: 38px; height: 38px; } }

/* ═══════════════════════════ Клиенты ═══════════════════════════ */
.v2b-stagebar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-stagebar .v2s-chips { flex: 1 1 auto; min-width: 0; }
.v2b-segnote {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 12px;
  border-radius: var(--radius-md); background: var(--surface-sunken); font-size: 14px; color: var(--text-muted);
}
.v2b-segnote span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-segnote__x {
  flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--text-muted);
  display: grid; place-items: center; cursor: pointer; border-radius: var(--radius-sm);
}
.v2b-segnote__x .icon { width: 16px; height: 16px; }
.v2b-segs { display: flex; flex-wrap: wrap; gap: 8px; }
.v2b-filters__note { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.v2b-export { width: 100%; border-radius: var(--radius-md); }

/* общие кирпичи карточки клиента (docs/47) */
.v2b-chiprow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.v2b-factcheck {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--text-muted); font-size: 12px;
}
.v2b-factcheck .icon { width: 12px; height: 12px; stroke-width: 2; }

.v2b-step__ic {
  flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--surface-sunken);
  display: grid; place-items: center; color: var(--text-muted);
}
.v2b-step__ic .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.v2b-step__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2b-step__title { font-size: 15px; line-height: 21px; font-weight: var(--weight-semibold); color: var(--text); }
.v2b-step__hint { font-size: 14px; line-height: 20px; color: var(--text-muted); }
.v2b-step__hint:empty { display: none; }


/* ═══════════════════════════ шторки выбора статуса / причины ═══════════════════════════ */
.v2b-pick-wrap {
  display: flex; flex-direction: column; gap: 16px;
  padding: 4px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
}
.v2b-pick__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.v2b-pick__head .lv-sheet-title { flex: 1 1 auto; }
.v2b-pick__head--col { flex-direction: column; align-items: stretch; gap: 4px; }
.v2b-pick__now { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-faint); }
.v2b-pick__desc { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.v2b-pick {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.v2b-pick__opt {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; width: 100%;
  border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2b-pick__opt + .v2b-pick__opt { border-top: 1px solid var(--surface-sunken); }
.v2b-pick__opt:active { background: var(--surface-hover); }
.v2b-pick__opt:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.v2b-pick__opt .lv-chip { height: 30px; font-size: 14px; }
.v2b-pick__chev { width: 16px; height: 16px; margin-left: auto; color: var(--col-lost); }
.v2b-pick__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2b-pick__title { font-size: 15px; font-weight: var(--weight-medium); }
.v2b-pick__hint { font-size: 13px; color: var(--text-faint); }
.v2b-pick__none { margin: 0; padding: 16px; font-size: 14px; color: var(--text-faint); text-align: center; }
.v2b-pick__skip { width: 100%; border-radius: var(--radius-md); }
@media (hover: hover) and (pointer: fine) { .v2b-pick__opt:hover { background: var(--surface-2); } }

/* ═══════════════════════════ События (шторка + экран) ═══════════════════════════ */
.v2b-events-overlay .v2-sheet { background: var(--bg); }
.v2b-events {
  display: flex; flex-direction: column; gap: 12px;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto;
}
.v2b-events__skel { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.v2b-events__head { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.v2b-events__title { margin: 0; flex: 1 1 auto; font-size: var(--text-title-2); line-height: 26px; font-weight: var(--weight-semibold); }
.v2b-events__title--page { font-size: 28px; line-height: 34px; }
.v2b-events__head--page { margin-top: 4px; }
.v2b-events__sub { margin: -8px 0 0; font-size: 15px; line-height: 21px; color: var(--text-muted); }
.v2b-events__head--page + .v2b-events__sub { margin-top: -10px; }
.v2b-textbtn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px;
  border: 0; background: none; font: inherit; font-size: 15px; font-weight: var(--weight-medium); color: var(--text-muted);
  cursor: pointer; border-radius: var(--radius-sm); -webkit-tap-highlight-color: transparent;
}
.v2b-textbtn .icon { width: 16px; height: 16px; stroke-width: 2; }
.v2b-textbtn:active { opacity: 0.6; }
.v2b-textbtn:disabled { opacity: 0.45; }
.v2b-textbtn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-allbtn {
  align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 12px;
  border: 0; background: none; font: inherit; font-size: 15px; font-weight: var(--weight-medium); color: var(--text-muted); cursor: pointer;
}
.v2b-allbtn .icon { width: 16px; height: 16px; stroke-width: 2; }

.v2b-ev {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 44px; padding: 12px 14px; margin: 0;
  border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2b-ev + .v2b-ev { border-top: 1px solid var(--surface-sunken); }
.v2b-ev:active { background: var(--surface-hover); }
.v2b-ev:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.v2b-ev__tile { flex: none; width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; }
.v2b-ev__tile .icon { width: 18px; height: 18px; stroke-width: 2; }
.v2b-ev__tile--hot { background: var(--st-won-bg); color: var(--col-won); }
.v2b-ev__tile--human { background: var(--st-work-bg); color: var(--why-icon); }
.v2b-ev__tile--sla { background: var(--danger-soft); color: var(--danger); }
.v2b-ev__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2b-ev__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-ev__title { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 21px; font-weight: var(--weight-semibold); }
.v2b-ev__time { flex: none; font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.v2b-ev__sub { font-size: 14px; line-height: 20px; color: var(--text-muted); }
.v2b-ev.is-read .v2b-ev__title { font-weight: var(--weight-medium); color: var(--text-muted); }
.v2b-ev.is-read .v2b-ev__sub { color: var(--text-faint); }
@media (hover: hover) and (pointer: fine) {
  .v2b-ev:hover, .v2b-textbtn:hover, .v2b-allbtn:hover { background: var(--surface-2); }
}
.v2b-alerts .alert-list, .v2b-alert-groups { display: flex; flex-direction: column; gap: 8px; }
.v2b-grouplabel.v2s-label { padding: 4px 4px 0; }

/* ═══════════════════════════ Каналы ═══════════════════════════ */
.v2b-channels { gap: 16px; padding-bottom: 8px; }
.v2b-channels .channels-form.v2b-form { margin: 0; gap: 16px; }
.v2b-form__label { font-size: 14px; color: var(--text-muted); margin-bottom: -8px; }
.v2b-channels .channels-input {
  width: 100%; box-sizing: border-box; min-height: 104px; padding: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
  font: inherit; font-size: var(--text-input, 16px); line-height: 24px; color: var(--text); resize: none;
}
.v2b-channels .channels-input:focus { outline: none; border-color: var(--text-muted); box-shadow: var(--shadow-focus); }
.v2b-form__ex { display: flex; flex-direction: column; gap: 10px; }
.v2b-examples { display: flex; flex-wrap: wrap; gap: 8px; }
.v2b-examples .v2s-ind { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-channels .channels-submit.v2b-primary { width: 100%; min-height: 50px; border-radius: var(--radius-md); font-size: 16px; font-weight: var(--weight-semibold); }
.v2b-channels .channels-results { display: flex; flex-direction: column; gap: 8px; }
.v2b-channels .channels-results:empty { display: none; }
.v2b-note {
  display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--why-bg); border: 1px solid var(--why-border); font-size: 14px; line-height: 20px; color: var(--text-muted);
}
.v2b-note .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--why-icon); }
.v2b-reshead { display: flex; align-items: baseline; gap: 8px; padding: 4px 4px 0; }
.v2b-reshead__cap { font-size: 13px; color: var(--text-faint); }
.v2b-channels .v2b-chrow, .v2b-chrow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; margin: 0; box-sizing: border-box;
  border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; color: var(--text); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2b-chrow + .v2b-chrow { border-top: 1px solid var(--surface-sunken); }
.v2b-chrow:active { background: var(--surface-hover); }
.v2b-chrow:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.v2b-chrow__ic {
  flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--surface-sunken);
  display: grid; place-items: center; color: var(--text-muted);
}
.v2b-chrow__ic .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.v2b-chrow__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.v2b-chrow__title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.v2b-chrow__badge {
  font-size: 11px; font-weight: var(--weight-medium); padding: 2px 6px; border-radius: var(--radius-sm);
  background: var(--surface-sunken); color: var(--text-muted);
}
.v2b-chrow__sub { font-size: 13px; color: var(--text-faint); overflow-wrap: anywhere; }
.v2b-chrow__reason { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.v2b-chrow__val { flex: none; font-size: 14px; color: var(--text-faint); white-space: nowrap; }
.v2b-chrow__ext { flex: none; width: 16px; height: 16px; color: var(--col-lost); stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .v2b-chrow:hover { background: var(--surface-2); } }

/* ═══════════════════════════ Аналитика бота ═══════════════════════════ */
.v2b-analytics { display: flex; flex-direction: column; gap: 16px; }
.v2b-kpi.is-bad .an-kpi__val { color: var(--danger); }
.v2b-frs { display: flex; flex-direction: column; gap: 12px; }
.v2b-fr { display: grid; grid-template-columns: 100px 1fr 24px 40px; align-items: center; gap: 10px; font-size: 14px; }
.v2b-fr__name { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-fr__bar { height: 10px; border-radius: 5px; background: var(--surface-sunken); overflow: hidden; }
.v2b-fr__fill { display: block; height: 100%; border-radius: 5px; }
.v2b-fr__val { text-align: right; font-weight: var(--weight-semibold); }
.v2b-fr__pct { text-align: right; font-size: 13px; color: var(--text-faint); }
.v2b-split { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-sunken); }
.v2b-split__bot { background: var(--text); }
.v2b-split__human { background: var(--col-lost); }
.v2b-legend { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 14px; }
.v2b-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.v2b-legend__sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.v2b-legend__sw--bot { background: var(--text); }
.v2b-legend__sw--human { background: var(--col-lost); }
.v2b-legend__pct { color: var(--text-faint); }
.v2b-analytics .an-pane[hidden] { display: none !important; }

/* шторка-половина: статус + «нужен человек» помещаются в одну строку на 360–390px */
.v2b-peek__head { flex-wrap: wrap; row-gap: 8px; }
.v2b-peek__chips { flex: 1 0 100%; padding-left: 56px; box-sizing: border-box; }
/* экран «События» — полноэкранная задача без шапки: отступ сверху под safe-area */
.v2b-alerts { padding-top: max(8px, env(safe-area-inset-top, 0px)); }

/* ── Календарь броней (docs/40 срез B) — только токены v2 ── */
.calendar__day { margin: var(--space-4, 16px) 0 var(--space-2, 8px); color: var(--text-muted); font-size: var(--text-sm); text-transform: none; }
.calendar__row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2, 8px) var(--space-3, 12px); padding: var(--space-3, 12px) var(--space-4, 16px); align-items: start; }
.calendar__row + .calendar__row { border-top: 1px solid var(--border-subtle, var(--border)); }
.calendar__title { font-weight: 600; font-size: var(--text-md); }
.calendar__who { color: var(--text-secondary, var(--text-muted)); font-size: var(--text-sm); margin-top: 2px; }
.calendar__extra { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }
.calendar__status.is-new { background: var(--accent-soft, rgba(232, 90, 79, .12)); color: var(--accent, #E85A4F); }
.calendar__status.is-confirmed { background: var(--ok-soft, rgba(52, 199, 89, .12)); color: var(--ok, #2f9e5b); }
.calendar__status.is-cancelled, .calendar__status.is-done { background: var(--surface-2, var(--surface)); color: var(--text-muted); }
.calendar__actions { grid-column: 1 / -1; display: flex; gap: var(--space-2, 8px); flex-wrap: wrap; }
.calendar__groups.is-muted { opacity: .72; }
.calendar__toggle { margin-top: var(--space-4, 16px); }
.calendar__empty .icon--xl { width: 40px; height: 40px; opacity: .6; margin-bottom: var(--space-3, 12px); }

/* ── Календарь v2 (docs/42 срез F): день по ресурсам, неделя, шторка записи — только токены v2 ── */
/* docs/50 K1: .v2b-head — колонка, и align-items:flex-end прижимал заголовок вправо; строка: заголовок слева, месяц справа */
.cal-head { display: flex; flex-direction: row; align-items: baseline; gap: var(--space-3, 12px); }
.cal-head .v2b-h1 { flex: 1 1 auto; }
.cal-head__month { color: var(--text-muted); font-size: var(--text-md); padding-bottom: 6px; }
.cal-day__sub { margin: 0; }
.cal-week__nav { display: flex; align-items: center; gap: var(--space-1, 4px); }
.cal-week__arrow { flex: none; }
.cal-week__arrow.is-flip .icon { transform: scaleX(-1); }
.cal-week { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-1, 4px); }
.cal-week__d { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--text-faint); font: inherit; font-size: var(--text-caption); min-height: 44px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cal-week__n { font-size: var(--text-body); font-weight: 600; color: var(--text); }
.cal-week__dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; display: block; }
.cal-week__dot.is-busy { background: var(--border-strong); }
.cal-week__d.is-today .cal-week__n { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.cal-week__d.is-on { background: var(--accent-strong, #1C1917); color: var(--text-on-accent, #fff); }
.cal-week__d.is-on .cal-week__n { color: var(--text-on-accent, #fff); }
.cal-week__d.is-on .cal-week__dot.is-busy { background: var(--accent-500, #E98074); }
.cal-grid { display: grid; grid-template-columns: 38px repeat(var(--cal-cols, 1), minmax(0, 1fr)); gap: 6px; }
.cal-grid__corner { }
.cal-grid__rh { height: 34px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--text-caption); font-weight: 600; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 6px; }
.cal-grid__rname { overflow: hidden; text-overflow: ellipsis; }
.cal-grid__av { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-sunken); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-muted); flex: none; }
.cal-grid__body { grid-column: 1 / -1; display: grid; grid-template-columns: 38px repeat(var(--cal-cols, 1), minmax(0, 1fr)); gap: 6px; position: relative; }
.cal-grid__times { display: flex; flex-direction: column; }
.cal-grid__tm { height: 56px; font-size: var(--text-micro); color: var(--text-faint); display: flex; align-items: flex-start; justify-content: flex-end; padding: 2px 4px 0 0; box-sizing: border-box; }
.cal-grid__col { position: relative; display: flex; flex-direction: column; min-width: 0; }
.cal-grid__slot { height: 56px; border-top: 1px solid var(--border-subtle, var(--border)); box-sizing: border-box; }
.cal-grid__slot.is-off { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--bg) 6px 12px); border-radius: 6px; }
.cal-ev { position: absolute; left: 0; right: 0; border-radius: var(--radius-sm); padding: 5px 8px; font: inherit; font-size: var(--text-caption); line-height: 1.25; text-align: left; overflow: hidden; box-sizing: border-box; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 1px; -webkit-tap-highlight-color: transparent; transition: transform var(--dur-fast) var(--ease-standard); }
.cal-ev:active { transform: scale(.98); }
.cal-ev b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.cal-ev.is-confirmed { background: var(--success-soft, #E9F6EE); border-color: #BFE3CB; color: #14532D; }
.cal-ev.is-confirmed span { color: #166534; }
.cal-ev.is-new { background: var(--warn-soft, #FEF3E2); border-color: #F3D9A4; color: #7C2D12; }
.cal-ev.is-new span { color: #9A3412; }
.cal-legend { display: flex; gap: var(--space-3, 12px); font-size: var(--text-caption); color: var(--text-muted); margin-top: var(--space-2, 8px); }
.cal-legend__i { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend__i::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--border); display: inline-block; }
.cal-legend__i.is-confirmed::before { background: var(--success-soft, #E9F6EE); border-color: #BFE3CB; }
.cal-legend__i.is-new::before { background: var(--warn-soft, #FEF3E2); border-color: #F3D9A4; }
.cal-legend-note { margin: 0; }
.cal-wk { flex: 1 1 auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wk__d { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface); font: inherit; min-height: 118px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cal-wk__d.is-on { border-color: var(--accent-strong, #1C1917); }
.cal-wk__wd { font-size: var(--text-micro); color: var(--text-faint); }
.cal-wk__n { font-size: var(--text-body); font-weight: 600; }
.cal-wk__bar { width: 100%; flex: 1 1 auto; border-radius: 6px; background: var(--surface-sunken); position: relative; overflow: hidden; min-height: 40px; }
.cal-wk__bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; display: block; }
.cal-wk__conf { background: var(--accent-strong, #1C1917); }
.cal-wk__new { background: var(--accent-500, #E98074); }
.cal-wk__c { font-size: var(--text-caption); font-weight: 500; }
.cal-wk__title { margin: var(--space-2, 8px) 0 0; }
.calendar__main { all: unset; display: block; cursor: pointer; min-width: 0; }
.calendar__main:focus-visible { outline: 2px solid var(--accent-ring); border-radius: 6px; }
.cal-sheet { display: flex; flex-direction: column; gap: var(--space-3, 12px); padding: 0 var(--space-4, 16px) var(--space-6, 24px); }
.cal-sheet__head { display: flex; align-items: flex-start; gap: var(--space-3, 12px); }
.cal-sheet__titles { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-sheet__title { margin: 0; }
.cal-sheet__kv { display: flex; flex-direction: column; }
.cal-sheet__row { display: flex; justify-content: space-between; gap: var(--space-3, 12px); font-size: var(--text-body); padding: 10px 0; border-top: 1px solid var(--border-subtle, var(--border)); }
.cal-sheet__row > span { color: var(--text-muted); flex: none; }
.cal-sheet__row > b { font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cal-sheet__tel { color: var(--text); text-decoration: none; }
.cal-sheet__actions { display: flex; gap: var(--space-2, 8px); }
.cal-sheet__actions[hidden] { display: none; }
.cal-sheet__btn { flex: 1 1 0; }
.cal-move { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.cal-move[hidden] { display: none; }
.cal-move__row { display: flex; gap: var(--space-2, 8px); }
.cal-move__in { flex: 1 1 0; min-width: 0; }
@media (min-width: 900px) { .cal-grid__rh { font-size: var(--text-footnote); } }

/* docs/42 срез G: заявки с квалификацией */
.cal-reqs { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.cal-reqs.is-muted { opacity: .72; margin-top: var(--space-3, 12px); }
.cal-req { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4, 16px); display: flex; flex-direction: column; gap: var(--space-2, 8px); }
.cal-req.is-hot { border-color: var(--accent-500, #E98074); }
.cal-req__head { display: flex; align-items: center; gap: var(--space-3, 12px); }
.cal-req__title { flex: 1 1 auto; font-size: var(--text-headline); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-req__heat { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--text-caption); font-weight: 600; flex: none; }
.cal-req__heat.is-hot { background: var(--coral-soft, #FBEDEA); color: var(--accent-hover, #B23A29); }
.cal-req__heat.is-warm { background: var(--warn-soft, #FEF3E2); color: var(--warn, #B45309); }
.cal-req__heat.is-cold { background: var(--surface-sunken); color: var(--text-muted); }
.cal-req__qa { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: var(--text-footnote); }
.cal-req__qa dt { color: var(--text-faint); }
.cal-req__qa dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.cal-req__meta { font-size: var(--text-footnote); color: var(--text-muted); }
/* docs/45 R3: сводка клиента для менеджера — одной строкой */
.cal-req__profile { font-size: var(--text-footnote); color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
/* docs/42 срез H: заказы с корзиной */
.cal-orders { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.cal-orders.is-muted { opacity: .72; margin-top: var(--space-3, 12px); }
.cal-order { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4, 16px); display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.cal-order__head { display: flex; align-items: center; gap: var(--space-3, 12px); }
.cal-order__title { flex: 1 1 auto; font-size: var(--text-headline); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cal-order__status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--text-caption); font-weight: 500; flex: none; background: var(--surface-sunken); color: var(--text-muted); }
.cal-order__status.is-new { background: var(--warn-soft); color: var(--warn); }
.cal-order__status.is-confirmed { background: var(--info-soft); color: var(--info); }
.cal-order__status.is-done { background: var(--success-soft); color: var(--success); }
.cal-order__items { display: flex; flex-direction: column; gap: 6px; }
.cal-order__it { display: flex; justify-content: space-between; gap: var(--space-3, 12px); font-size: var(--text-body); color: var(--text-muted); }
.cal-order__it > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.cal-order__num { font-variant-numeric: tabular-nums; flex: none; white-space: nowrap; }
.cal-order__sum { display: flex; justify-content: space-between; gap: var(--space-3, 12px); font-size: var(--text-headline); font-weight: 600; border-top: 1px solid var(--border-subtle, var(--border)); padding-top: var(--space-2, 8px); }
.cal-order__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--text-footnote); color: var(--text-muted); overflow-wrap: anywhere; }
.cal-order__steps { display: flex; gap: 4px; }
.cal-order__step { flex: 1 1 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-caption); color: var(--text-faint); min-width: 0; }
.cal-order__step > i { display: block; height: 3px; border-radius: 2px; background: var(--border); }
.cal-order__step.is-on { color: var(--text); }
.cal-order__step.is-on > i { background: var(--text); }
.cal-order__actions .btn { flex: 1 1 auto; white-space: nowrap; }
/* docs/42 хвосты: этапы заказа, примечание, ручная запись, весь день */
.cal-order__status.is-on_way, .cal-order__status.is-ready { background: var(--success-soft); color: var(--success); }
.cal-order__note { font-size: var(--text-footnote); color: var(--text); overflow-wrap: anywhere; }
.cal-order__hint { margin: 0; font-size: var(--text-caption); color: var(--text-faint); }
.cal-fab { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30; height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-text); font: inherit; font-size: var(--text-body); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cal-fab:active { transform: scale(.97); }
.cal-fab .icon { width: 20px; height: 20px; }
.cal-allday { display: flex; flex-direction: column; gap: 6px; }
.cal-allday__i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 12px; border-radius: var(--radius-md, 10px); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--text-footnote); cursor: pointer; }
.cal-allday__i.is-new { border-color: var(--accent); }
.cal-allday__i > span { color: var(--text-muted); }
.cal-new__f { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; }
.cal-new__l { font-size: var(--text-footnote); color: var(--text-muted); }
.cal-new .text-input { font-size: 16px; width: 100%; box-sizing: border-box; }
/* docs/42 срез H: редактор зон доставки в мастере бота */
.bw-zones { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.bw-zone { display: flex; flex-direction: column; gap: var(--space-2, 8px); padding: var(--space-3, 12px); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--surface); }
.bw-zone__head { display: flex; gap: var(--space-2, 8px); align-items: center; }
.bw-zone__head input { flex: 1 1 auto; min-width: 0; }
.bw-zone__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2, 8px); }
.bw-zone__row input { min-width: 0; }
@media (max-width: 380px) { .bw-zone__row { grid-template-columns: 1fr 1fr; } }
/* docs/42 срез G: редактор вопросов заявки + доп. поля позиции */
.bw-qlist { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.bw-q { display: flex; flex-direction: column; gap: var(--space-2, 8px); padding: var(--space-3, 12px); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--surface); }
.bw-q.is-off { opacity: .6; }
.bw-q__head { display: flex; gap: var(--space-2, 8px); align-items: center; }
.bw-q__head input { flex: 1 1 auto; min-width: 0; }
.bw-item__row--extra { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-2, 8px); }
.bw-item__row--extra input { min-width: 0; }
/* docs/42 срез I: таблица расчёта в шаге «Каталог» (макет Wiz_Quote) */
.bw-quote { display: flex; flex-direction: column; gap: var(--space-3, 12px); }
.bw-qt { display: flex; flex-direction: column; gap: var(--space-2, 8px); padding: var(--space-3, 12px); border: 1px solid var(--border); border-radius: var(--radius-lg, 14px); background: var(--surface); min-width: 0; }
.bw-qt__head { display: flex; gap: var(--space-2, 8px); align-items: center; }
.bw-qt__ic { display: inline-flex; color: var(--text-muted); }
.bw-qt__title { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.bw-qt__name { font-weight: 600; font-size: var(--text-callout, 14px); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bw-qt__meta { font-size: var(--text-caption, 12px); color: var(--text-faint); }
.bw-qt__cols { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bw-qt__colslbl { font-size: var(--text-caption, 12px); color: var(--text-muted); }
.bw-qt__tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-pill, 999px); font-size: var(--text-caption, 12px); font-weight: 500; }
.bw-qt__tag--p { background: var(--info-050); color: var(--info-600); }
.bw-qt__tag--i { background: var(--surface-sunken); color: var(--text-muted); }
.bw-qt__tag--v { background: var(--pos-050); color: var(--pos-600); }
.bw-qt__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-subtle); border-radius: var(--radius-md, 10px); }
.bw-qt__table { border-collapse: collapse; width: 100%; font-size: var(--text-caption, 12px); font-variant-numeric: tabular-nums; }
.bw-qt__table th { text-align: left; font-weight: 600; color: var(--text-muted); background: var(--surface-2); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.bw-qt__table th.is-param { color: var(--info-600); }
.bw-qt__table th.is-price, .bw-qt__table td.is-price { color: var(--pos-600); text-align: right; }
.bw-qt__table td { padding: 7px 8px; border-bottom: 1px solid var(--border-subtle); color: var(--text); white-space: nowrap; }
.bw-qt__table tr:last-child td { border-bottom: 0; }
.bw-qt__try { display: flex; flex-direction: column; gap: var(--space-2, 8px); }
.bw-qt__tryrow { display: flex; gap: var(--space-2, 8px); align-items: stretch; }
.bw-qt__tryrow input { flex: 1 1 auto; min-width: 0; }
.bw-qt__go { flex: 0 0 auto; font: inherit; }
.bw-qt__chat { display: flex; flex-direction: column; gap: var(--space-2, 8px); }
.bw-qt__chat:empty { display: none; }
.bw-qt__me, .bw-qt__bot { max-width: 88%; padding: 8px 10px; font-size: var(--text-footnote, 13px); line-height: 1.4; white-space: pre-line; }
.bw-qt__me { align-self: flex-end; background: var(--text); color: var(--surface); border-radius: 12px 12px 4px 12px; }
.bw-qt__bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 12px 12px 12px 4px; }
.bw-qt__bot.is-err { color: var(--neg-600); }
/* «Аналитика бота» — полноэкранная задача без шапки: отступ сверху под safe-area (заголовок резался на проде) */
.bot-analytics { padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.bot-analytics .page-head { margin-top: 0; }

/* ═══════════════════════════ docs/47 «Клиенты»: десктоп 3 колонки + телефон ═══════════════════════════
 * Макеты docs/design-v2/workspace47 (Main / MobileList / MobileClient). Только токены. Канал различается
 * иконкой и светлотой: Telegram — синий (--info), сайт — графит (--text), форма — янтарь (--warn). */
.v2b-caps {
  margin: 0; font-size: var(--text-micro); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--text-faint);
}

/* значок канала на аватаре (20px, белая обводка) и точка канала (14px, телефон) */
.v2b-cav { position: relative; flex: none; display: inline-grid; }
.v2b-chb {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid var(--surface); display: grid; place-items: center; color: var(--text-on-accent);
}
.v2b-chb .icon { width: 11px; height: 11px; stroke-width: 2.4; fill: none; }
.v2b-chb--telegram { background: var(--info); }
.v2b-chb--widget { background: var(--text); }
.v2b-chb--form { background: var(--warn); }
.v2b-chdot {
  position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; box-sizing: border-box; border-radius: 50%;
  border: 2px solid var(--surface);
}
.v2b-chdot--telegram, .v2b-chdot-inline.v2b-chdot--telegram { background: var(--info); }
.v2b-chdot--widget, .v2b-chdot-inline.v2b-chdot--widget { background: var(--text); }
.v2b-chdot--form, .v2b-chdot-inline.v2b-chdot--form { background: var(--warn); }
.v2b-chdot-inline { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.v2s-fchip.is-active .v2b-chdot-inline { box-shadow: 0 0 0 1.5px var(--surface); }

/* пилюли: канал, этап, температура */
.v2b-chpill, .v2b-stage, .v2b-heat {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; box-sizing: border-box; flex: none;
  border-radius: var(--radius-pill); font-size: var(--text-caption); font-weight: var(--weight-semibold); white-space: nowrap;
}
.v2b-chpill .icon, .v2b-heat .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.v2b-chpill--telegram { background: var(--info-soft); color: var(--info); }
.v2b-chpill--widget { background: var(--surface-sunken); color: var(--text); }
.v2b-chpill--form { background: var(--warn-soft); color: var(--warn); }
.v2b-stage--sm { height: 20px; padding: 0 8px; font-size: var(--text-micro); }
.v2b-stage--new { background: var(--st-new-bg); color: var(--st-new-fg); }
.v2b-stage--neutral { background: var(--surface-sunken); color: var(--text-muted); }
.v2b-stage--won { background: var(--success-soft); color: var(--success); }
.v2b-stage--work { background: var(--warn-soft); color: var(--warn); }
.v2b-stage--gap { background: var(--danger-soft); color: var(--danger); }
.v2b-stage--done { background: var(--surface-sunken); color: var(--text-faint); }
.v2b-heat--hot { background: var(--coral-soft); color: var(--link); }
.v2b-heat--warm { background: var(--warn-soft); color: var(--warn); }
.v2b-heat--cold { background: var(--surface-sunken); color: var(--text-muted); }
.v2b-heat--hot .icon { fill: currentColor; stroke: none; }
.v2b-flame { display: inline-flex; flex: none; color: var(--link); }
.v2b-flame .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }


/* ─────────── сводка клиента (общая для десктопа и вкладки «Сводка») ─────────── */
.v2b-facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: var(--text-callout); line-height: 20px; }
.v2b-facts dt { color: var(--text-faint); }
.v2b-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.v2b-cw-muted { margin: 0; font-size: var(--text-footnote); color: var(--text-faint); }
.v2b-cw-ai { display: flex; flex-direction: column; gap: 6px; }
.v2b-cw-ai__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2b-cw-ai__text { margin: 0; font-size: var(--text-callout); line-height: 20px; color: var(--text-muted); }
.v2b-cw-step { display: flex; gap: 12px; align-items: flex-start; }
.v2b-cw-used { display: flex; flex-direction: column; gap: 8px; }
.v2b-cw-kn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  font: inherit; color: var(--text); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-cw-kn__ic { width: 16px; height: 16px; flex: none; color: var(--text-muted); }
.v2b-cw-kn__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.v2b-cw-kn__kind { font-size: var(--text-caption); color: var(--text-faint); }
.v2b-cw-kn__title { font-size: var(--text-callout); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-cw-kn__go { flex: none; font-size: var(--text-footnote); color: var(--link); }
.v2b-cw-kn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-cw-used.is-compact { gap: 0; }
.v2b-cw-used.is-compact .v2b-cw-kn { border: 0; border-radius: 0; padding: 0; border-bottom: 1px solid var(--border-subtle); }
.v2b-cw-used.is-compact .v2b-cw-kn:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { .v2b-cw-kn:hover { border-color: var(--border-strong); } .v2b-cw-kn:hover .v2b-cw-kn__go { color: var(--accent-hover); } }
.v2b-cw-consent { display: flex; align-items: center; gap: 6px; font-size: var(--text-caption); color: var(--text-faint); }
.v2b-cw-consent .icon { width: 14px; height: 14px; stroke-width: 2.2; color: var(--success); flex: none; }
.v2b-cw-consent.is-warn .icon { color: var(--warn); }

/* ─────────── диалог ─────────── */
.v2b-dlg { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 16px 24px 16px; box-sizing: border-box; }
.v2b-dlg-stream { flex: 1 1 auto; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.v2b-dlg-empty { margin: auto; font-size: var(--text-callout); color: var(--text-faint); }
.v2b-dlg-day {
  align-self: center; font-size: var(--text-caption); color: var(--text-faint); padding: 3px 10px;
  border-radius: var(--radius-pill); background: var(--surface-sunken);
}
.v2b-msg { display: flex; flex-direction: column; gap: 4px; max-width: 78%; }
.v2b-msg--in { align-self: flex-start; }
.v2b-msg--out { align-self: flex-end; align-items: flex-end; }
.v2b-msg__text {
  margin: 0; padding: 10px 14px; font-size: var(--text-body); line-height: 21px; overflow-wrap: anywhere; white-space: pre-wrap;
  border-radius: var(--radius-lg);
}
.v2b-msg--in .v2b-msg__text { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 6px; }
.v2b-msg--out .v2b-msg__text { background: var(--text); color: var(--surface); border-bottom-right-radius: 6px; }
.v2b-msg__link { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.v2b-msg--human .v2b-msg__text { background: var(--st-new-bg); color: var(--text); }
.v2b-msg.is-pending { opacity: 0.6; }
.v2b-msg.is-failed .v2b-msg__text { box-shadow: inset 0 0 0 1px var(--danger); }
.v2b-msg__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--text-micro); color: var(--text-faint); }
.v2b-src {
  border: 0; padding: 0; background: none; font: inherit; font-size: var(--text-micro); color: var(--link);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; position: relative;
}
.v2b-src::after { content: ""; position: absolute; inset: -12px -4px; }
.v2b-src:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }

.v2b-gap {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-lg);
  background: var(--warn-soft); border: 1px solid var(--why-border);
}
.v2b-gap__ic { width: 20px; height: 20px; flex: none; color: var(--warn); stroke-width: 2; }
.v2b-gap__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.v2b-gap__title { font-size: var(--text-callout); font-weight: var(--weight-semibold); color: var(--text); }
.v2b-gap__sub { font-size: var(--text-footnote); color: var(--text-muted); }
.v2b-gap__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.v2b-gap__add, .v2b-gap__self {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--radius-md);
  font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-semibold); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-gap__add { border: 0; background: var(--text); color: var(--surface); }
.v2b-gap__self { border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: var(--weight-medium); }
.v2b-gap__add:focus-visible, .v2b-gap__self:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.v2b-dlg-foot { display: flex; flex-direction: column; gap: 6px; }
.v2b-dlg-foot__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-dlg-hint { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-caption); color: var(--text-faint); }
.v2b-dlg-hint .icon { width: 12px; height: 12px; flex: none; stroke-width: 2.2; }
.v2b-dlg-hint span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-dlg-draft {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-sm);
  background: none; font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-medium); color: var(--text-muted); cursor: pointer;
}
.v2b-dlg-draft .icon { width: 14px; height: 14px; }
.v2b-dlg-draft:disabled { opacity: 0.45; }
.v2b-dlg-draft:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-dlg-composer {
  display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.v2b-dlg-composer:focus-within { border-color: var(--border-strong); box-shadow: var(--shadow-focus); }
.v2b-dlg-input {
  flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 9px 8px; box-sizing: border-box; border: 0; background: transparent;
  font: inherit; font-size: var(--text-input); line-height: 22px; color: var(--text); resize: none; outline: none;
}
.v2b-dlg-send {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius-md); border: 0; background: var(--text); color: var(--surface);
  display: grid; place-items: center; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.v2b-dlg-send .icon { width: 18px; height: 18px; stroke-width: 2; }
.v2b-dlg-send:disabled { opacity: 0.45; cursor: default; }
.v2b-dlg-send:active { transform: scale(0.95); }
.v2b-dlg-send:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-dlg-formnote { margin: 0; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); font-size: var(--text-footnote); color: var(--text-muted); }
@media (hover: hover) and (pointer: fine) {
  .v2b-dlg-draft:hover { background: var(--surface-hover); color: var(--text); }
  .v2b-gap__self:hover { background: var(--surface-hover); }
  .v2b-src:hover { color: var(--accent-hover); }
}

.v2b-cl-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.v2b-cl-kn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-md);
  background: var(--surface-sunken); color: var(--text-muted); font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-semibold);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-cl-kn.has-gaps { background: var(--warn-soft); color: var(--warn); }
.v2b-cl-kn .icon { width: 16px; height: 16px; }
.v2b-cl-kn[hidden] { display: none; }
.v2b-cl-kn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-cl-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ═══════════════════════════ docs/49: «Диалоги» = входящие, «Клиенты» = база, профиль ═══════════════════════════
 * Макеты docs/design-v2/workspace49 (DialogsDesktop/Mobile/MobileChat, ClientsDesktop/Mobile,
 * ClientProfileDesktop/Mobile). Только токены; телефон — 16px поля, тап-зоны ≥40px. */
.v2b-av--34 { width: 34px; height: 34px; font-size: var(--text-footnote); }
.v2b-av--36 { width: 36px; height: 36px; font-size: var(--text-callout); }
.v2b-av--56 { width: 56px; height: 56px; font-size: 20px; }
.v2b-av--64 { width: 64px; height: 64px; font-size: 24px; }
.v2b-stage--info { background: var(--info-soft); color: var(--info); }
.v2b-cw-ident { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-footnote); color: var(--text-muted); min-width: 0; }
.v2b-cw-ident__txt { min-width: 0; }

/* поиск (общий: очередь, база) */
.v2b-cw-search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: var(--radius-md);
  background: var(--surface-sunken); color: var(--text-faint); box-sizing: border-box;
}
.v2b-cw-search .icon { width: 16px; height: 16px; flex: none; }
.v2b-cw-search__input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: inherit; font-size: var(--text-body); color: var(--text); outline: none;
}
.v2b-cw-search:focus-within { box-shadow: var(--shadow-focus); }
.v2b-cw-nosel, .v2b-cw-skel { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.v2b-cw-nosel { align-items: center; justify-content: center; text-align: center; color: var(--text-faint); font-size: var(--text-callout); }
.v2b-cw-nosel p { margin: 0; max-width: 320px; }
.v2b-cw-nosel__ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunken); }
.v2b-cw-nosel__ic .icon { width: 22px; height: 22px; }
.v2b-cw-skel__head { display: flex; gap: 12px; align-items: center; }

/* кнопки: графитовая (главное в профиле — «Открыть диалог»), тихая обводка */
.v2b-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; box-sizing: border-box;
  border-radius: var(--radius-md); font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-medium);
  text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.v2b-btn .icon { width: 16px; height: 16px; }
.v2b-btn--dark { border: 0; background: var(--text); color: var(--surface); font-weight: var(--weight-semibold); }
.v2b-btn--ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.v2b-btn--lg { height: 44px; font-size: var(--text-body); }
.v2b-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-btn:disabled { opacity: 0.45; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .v2b-btn--ghost:hover { background: var(--surface-hover); }
  .v2b-btn--dark:hover { opacity: 0.88; }
}
.v2b-select {
  height: 36px; padding: 0 10px; border-radius: var(--radius-md); border: 1px solid var(--border); background-color: var(--surface);
  font: inherit; font-size: var(--text-callout); color: var(--text); cursor: pointer;
}
.v2b-select--sm { height: 34px; font-size: var(--text-footnote); }
.v2b-select:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* флаг «ждёт ответа» */
.v2b-flag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-pill);
  font-size: var(--text-micro); font-weight: var(--weight-semibold); white-space: nowrap;
}
.v2b-flag--gap { background: var(--danger-soft); color: var(--danger); }
.v2b-flag--work { background: var(--warn-soft); color: var(--warn); }

/* строка очереди (десктоп — список с hairline, телефон — карточки) */
.v2b-th {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; margin: 0; padding: 12px 18px; box-sizing: border-box;
  border: 0; border-bottom: 1px solid var(--border-subtle); background: var(--surface); font: inherit; color: var(--text);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-th.is-current { background: var(--surface-sunken); box-shadow: inset 3px 0 0 var(--accent); }
.v2b-th:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.v2b-th--skel { cursor: default; }
.v2b-th__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2b-th__head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.v2b-th__name { flex: 0 1 auto; min-width: 0; font-size: var(--text-body); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-th__bot { flex: 0 1 auto; min-width: 0; font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-th__when { margin-left: auto; flex: none; padding-left: 6px; font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; }
.v2b-th__last { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-th__msg { flex: 1 1 auto; min-width: 0; font-size: var(--text-callout); line-height: 20px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-th.is-unread .v2b-th__msg { color: var(--text); }
.v2b-th__flag { display: flex; padding-top: 2px; }
@media (hover: hover) and (pointer: fine) { .v2b-th:not(.is-current):hover { background: var(--surface-hover); } }

/* ─────────── «Диалоги» десктоп: очередь · переписка · кратко ─────────── */
.v2b-ib.b2c-tab {
  display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(240px, 280px); gap: 0;
  height: calc(100dvh - var(--v2b-ib-offset, 190px)); min-height: 560px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.v2b-ib-queue { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); }
.v2b-ib-queue__head { padding: 22px 18px 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--border-subtle); }
.v2b-ib-queue__head .v2b-h1 { margin: 0; }
.v2b-ib-seg .v2s-seg { padding: 3px; gap: 2px; }
.v2b-ib-seg .v2s-seg__btn { min-height: 32px; font-size: var(--text-footnote); padding: 0 6px; white-space: nowrap; }
.v2b-ib-seg .v2s-seg__btn.is-active { font-weight: var(--weight-semibold); }
.v2b-ib-rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.v2b-ib-rows .v2b-empty-note { padding: 32px 18px; }
.v2b-ib-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.v2b-ib-chat > .v2b-dlg { padding: 20px 24px; }
.v2b-ib-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.v2b-ib-head__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.v2b-ib-head .v2b-btn { flex: none; }
/* docs/50 D3: канал · бот · язык не обрезаются («бот Кофе…») — мета переносится второй строкой */
.v2b-ib-head .v2b-cw-ident { flex-wrap: wrap; row-gap: 2px; }
.v2b-ib-head .v2b-cw-ident__txt { overflow-wrap: anywhere; }
.v2b-ib-head__name { font-size: var(--text-headline); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-mode { flex: none; padding: 3px; gap: 2px; }
.v2b-mode .v2s-seg__btn { min-height: 32px; padding: 0 12px; font-size: var(--text-footnote); white-space: nowrap; }
.v2b-mode .v2s-seg__btn.is-active { font-weight: var(--weight-semibold); }
.v2b-mode.is-full { width: 100%; box-sizing: border-box; }
.v2b-ib-side { min-width: 0; min-height: 0; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--border); }
.v2b-ib-brief { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.v2b-ib-brief__link { font-size: var(--text-callout); font-weight: var(--weight-semibold); color: var(--link); text-decoration: none; }
.v2b-ib-brief__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .v2b-ib-brief__link:hover { color: var(--accent-hover); } }
/* 1024–1279 с сайдбаром: «Кратко» уходит, остаются очередь и переписка */
@media (max-width: 1279px) {
  .v2b-ib.b2c-tab { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  .v2b-ib-side { display: none; }
}

/* экран во всю ширину справа от сайдбара (инбокс и база на десктопе) */
@media (min-width: 1024px) {
  body.is-browser.v2b-wide:not(.is-focus) #app.app { max-width: none; margin: 0 0 0 240px; padding: 0; }
  body.is-browser.v2b-wide .v2b-ib { --v2b-ib-offset: 0px; border: 0; border-radius: 0; }
  body.is-browser.v2b-wide .v2b-base { padding: 28px 32px 40px; }
}

/* ─────────── «Диалоги» телефон: карточки очереди + полноэкранная переписка ─────────── */
.v2b-ibm { gap: 12px; }
.v2b-ibm .v2s-seg__btn { min-height: 34px; font-size: var(--text-footnote); }
.v2b-ibm .v2s-seg__btn.is-active { font-weight: var(--weight-semibold); }
.v2b-ibm-list { display: flex; flex-direction: column; gap: 8px; }
.v2b-ibm-list .v2b-th { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.v2b-ibm-list .v2b-th:active { background: var(--surface-hover); }
.v2b-ibc {
  display: flex; flex-direction: column; min-height: 100dvh; background: var(--bg);
  margin: 0 -16px calc(-24px - env(safe-area-inset-bottom, 0px)); /* поле ответа — вплотную к низу экрана */
}
.v2b-ibc-head {
  position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: var(--surface); border-bottom: 1px solid var(--border);
}
.v2b-ibc-head__row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.v2b-ibc-back {
  flex: none; width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.v2b-ibc-back .icon { width: 20px; height: 20px; stroke-width: 2; }
.v2b-ibc-who { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.v2b-ibc-who__txt { min-width: 0; display: flex; flex-direction: column; }
.v2b-ibc-who__name { font-size: var(--text-headline); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-ibc-who__sub { font-size: var(--text-caption); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-ibc-back:focus-visible, .v2b-ibc-who:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-ibc .v2b-dlg { flex: 1 1 auto; padding: 14px 12px 0; gap: 10px; }
.v2b-ibc .v2b-dlg-stream { overflow: visible; min-height: 0; gap: 10px; }
.v2b-ibc .v2b-msg { max-width: 82%; }
.v2b-ibc .v2b-dlg-foot {
  position: sticky; bottom: 0; z-index: 2; margin: auto -12px 0; padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--border);
}
.v2b-ibc .v2b-dlg-composer { border-radius: 22px; padding: 4px 4px 4px 12px; background: var(--bg); }
.v2b-ibc .v2b-dlg-send { width: 40px; height: 40px; border-radius: 50%; position: relative; }
.v2b-ibc .v2b-dlg-send::after { content: ""; position: absolute; inset: -4px; } /* зона нажатия 48 */
/* docs/50 D4: «Черновик ИИ» иконкой в композере телефона */
.v2b-dlg-draft--icon { width: 40px; min-height: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; color: var(--text-muted); }
.v2b-dlg-draft--icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v2b-dlg-draft--icon .icon { width: 20px; height: 20px; }
.v2b-ibc .v2b-dlg-composer:has(.v2b-dlg-draft--icon) { padding-left: 4px; }
.v2b-gap.is-compact { padding: 12px; }
.v2b-gap.is-compact .v2b-gap__actions { display: grid; grid-template-columns: 1fr 1fr; }
.v2b-gap.is-compact .v2b-gap__add, .v2b-gap.is-compact .v2b-gap__self { height: 40px; justify-content: center; font-size: var(--text-callout); }

/* ─────────── «Клиенты» десктоп: стат-карты + таблица ─────────── */
.v2b-base { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v2b-base__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.v2b-base__title { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2b-base__title .v2b-h1 { margin: 0; }
.v2b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.v2b-stat { padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.v2b-stat__label { font-size: var(--text-footnote); color: var(--text-muted); }
.v2b-stat__value { font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.v2b-stat__hint { font-size: var(--text-caption); color: var(--text-faint); }
.v2b-bt-card { min-width: 0; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.v2b-bt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.v2b-bt-segs { flex: 1 1 auto; min-width: 0; }
.v2b-segchips { display: flex; flex-wrap: wrap; gap: 6px; }
.v2s-chips.v2b-segchips { flex-wrap: nowrap; }
.v2b-segchip.v2s-fchip { min-height: 32px; padding: 0 12px; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--text); }
.v2b-segchip.v2s-fchip.is-active { color: var(--surface); }
.v2b-segchip .v2s-fchip__n { font-weight: var(--weight-regular); }
.v2b-bt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.v2b-bt-search { width: 200px; height: 34px; }
.v2b-bt-search .v2b-cw-search__input { font-size: var(--text-callout); }
.v2b-bt-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2b-bt-filters .lv-filter-btn { width: 34px; height: 34px; }
.v2b-bt-filters .lv-filter-btn .icon { width: 16px; height: 16px; }
.v2b-bt-scroll { overflow-x: auto; }
.v2b-bt { width: 100%; min-width: 900px; border-collapse: collapse; font-size: var(--text-callout); }
.v2b-bt th { padding: 10px 10px; text-align: left; font-size: var(--text-caption); font-weight: var(--weight-medium); color: var(--text-faint); white-space: nowrap; }
.v2b-bt td { padding: 12px 10px; vertical-align: middle; border-top: 1px solid var(--border-subtle); }
.v2b-bt th:first-child, .v2b-bt td:first-child { padding-left: 16px; }
.v2b-bt th:last-child, .v2b-bt td:last-child { padding-right: 16px; }
.v2b-bt .is-num { text-align: right; white-space: nowrap; }
.v2b-bt .is-muted { color: var(--text-muted); }
.v2b-bt .is-faint { color: var(--text-faint); white-space: nowrap; }
.v2b-bt-row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v2b-bt-row:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) { .v2b-bt-row:hover td { background: var(--surface-hover); } }
.v2b-bt-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2b-bt-who__txt { min-width: 0; display: flex; flex-direction: column; }
.v2b-bt-who__name { display: flex; align-items: center; gap: 4px; font-weight: var(--weight-semibold); white-space: nowrap; }
.v2b-bt-who__phone { font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; }
.v2b-bt__interest { max-width: 220px; }
.v2b-bt-int { display: flex; align-items: center; gap: 6px; min-width: 0; }
.v2b-bt-int__txt { min-width: 0; max-width: 96px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* docs/50b C5: «что ищет» — основной текст и шире; последнее сообщение (фолбэк) — приглушённо. */
.v2b-bt-int__txt.is-summary {
  max-width: 170px; color: var(--text); white-space: normal; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.v2b-bt-int__txt.is-last-msg { color: var(--text-faint); }
.v2b-bt__next { min-width: 120px; }
.v2b-bt-next__at { display: block; white-space: nowrap; }
.v2b-bt-next__what { display: block; max-width: 180px; font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-bt__bot { max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-bt td .v2b-cl-empty { padding: 24px 0; }
.v2b-bt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border-subtle); font-size: var(--text-footnote); color: var(--text-faint); }
.v2b-bt-more { border: 0; background: none; padding: 0 4px; min-height: 32px; font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--text); cursor: pointer; border-radius: var(--radius-sm); }
.v2b-bt-more:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ─────────── «Клиенты» телефон: поиск + чипы сегментов + карточки ─────────── */
.v2b-cbm { gap: 12px; }
.v2b-cbm-search { height: 42px; }
.v2b-cbm-search .v2b-cw-search__input { font-size: var(--text-input); }
.v2b-cc-slot { display: flex; flex-direction: column; gap: 8px; }
.v2b-cc-list { display: flex; flex-direction: column; gap: 8px; }
.v2b-cc-holder { border-radius: var(--radius-lg); overflow: hidden; }
.v2b-cc-holder .lv-swipe-bg { border-radius: var(--radius-lg); }
.v2b-cc {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform var(--dur-base) var(--ease-out);
}
.v2b-cc:active { background: var(--surface-hover); }
.v2b-cc:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-cc-holder.is-swiping .v2b-cc { transition: none; }
.v2b-cc__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2b-cc__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.v2b-cc__name { display: flex; align-items: center; gap: 4px; font-size: var(--text-body); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; }
.v2b-cc__int { font-size: var(--text-footnote); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-cc.is-unread .v2b-cc__int { color: var(--text); }
.v2b-cc__int.is-summary { color: var(--text); }
.v2b-cc__int.is-last-msg { color: var(--text-faint); }
.v2b-cc.is-unread .v2b-cc__int.is-last-msg { color: var(--text-muted); }
.v2b-cc__bottom { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--text-caption); color: var(--text-faint); }
.v2b-cc__bottom .v2b-chpill { height: 20px; padding: 0 8px; font-size: var(--text-micro); }
.v2b-cc__bot { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-cc__meta { margin-left: auto; flex: none; white-space: nowrap; }
.v2b-cc-more { width: 100%; }

/* ─────────── профиль клиента: десктоп (две колонки) ─────────── */
.v2b-pf { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.v2b-pf-back, .v2b-pfm-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 8px 0 2px;
  font-size: var(--text-callout); color: var(--text-muted); text-decoration: none; border-radius: var(--radius-sm);
}
.v2b-pf-back .icon, .v2b-pfm-back .icon { width: 18px; height: 18px; stroke-width: 2; }
.v2b-pf-back:focus-visible, .v2b-pfm-back:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-pf-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.v2b-pf-head__main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2b-pf-namerow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.v2b-pf-name { margin: 0; font-size: 24px; line-height: 30px; font-weight: var(--weight-semibold); letter-spacing: -0.02em; }
.v2b-pf-stage { display: flex; flex-direction: column; gap: 4px; font-size: var(--text-caption); color: var(--text-faint); }
.v2b-pf-stage .is-static { font-size: var(--text-callout); color: var(--text); }
.v2b-pf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.v2b-pf-actions .v2b-btn { height: 38px; padding: 0 14px; font-size: var(--text-callout); }
.v2b-pf-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.v2b-pf-col { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.v2b-pf-card {
  display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); min-width: 0;
}
.v2b-pf-hist { flex: 1.3 1 420px; }
.v2b-pf-col > .v2b-pf-hist, .v2b-pfm > .v2b-pf-hist { flex: none; } /* docs/51 Э2: моменты — в колонке (иначе flex-basis растягивает по высоте) */
.v2b-pf-h2 { margin: 0; font-size: var(--text-headline); font-weight: var(--weight-semibold); }
.v2b-pf-h2--sm { font-size: var(--text-body); }
.v2b-pf-card .v2b-facts { grid-template-columns: 140px minmax(0, 1fr); gap: 10px 12px; }
.v2b-pf-note { margin: 0; font-size: var(--text-caption); color: var(--text-faint); }
/* 49b: «Заметка» владельца — поле с автосохранением */
.v2b-note { gap: 10px; }
.v2b-note__ta {
  width: 100%; box-sizing: border-box; min-height: 84px; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--text-input); line-height: 1.45; resize: vertical;
}
.v2b-note__ta::placeholder { color: var(--text-faint); }
.v2b-note__ta:focus-visible { outline: none; border-color: var(--border-strong); box-shadow: var(--shadow-focus); }
.v2b-note__ta:disabled { background: var(--surface-2); color: var(--text-muted); cursor: not-allowed; resize: none; }
.v2b-note__status { margin: 0; min-height: 16px; font-size: var(--text-caption); line-height: 16px; color: var(--text-faint); }
.v2b-note__status:empty { display: none; }
.v2b-note__status.is-err { color: var(--danger); }
/* просмотр админом: поле выключено, но текст заметки читается (не общее приглушение 0.45) */
body.is-readonly .v2b-note__ta[data-ro-action] { opacity: 1; }
.v2b-note__retry {
  padding: 0; border: 0; background: none; font: inherit; color: var(--link); font-weight: var(--weight-semibold);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.v2b-note__retry:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-xs); }
.v2b-facts dd.v2b-facts__clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.v2b-pf-hist__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2b-pf-count { font-size: var(--text-footnote); color: var(--text-faint); }
.v2b-bk-list { display: flex; flex-direction: column; gap: 8px; }
.v2b-bk { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-lg); background: var(--surface-2); }
.v2b-bk.is-upcoming { background: var(--info-soft); }
.v2b-bk__date { flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; color: var(--text-muted); }
.v2b-bk.is-upcoming .v2b-bk__date { color: var(--info); }
.v2b-bk__date .icon { width: 20px; height: 20px; }
.v2b-bk__wd { font-size: var(--text-micro); font-weight: var(--weight-semibold); text-transform: uppercase; }
.v2b-bk__day { font-size: 20px; line-height: 24px; font-weight: var(--weight-semibold); }
.v2b-bk__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2b-bk__title { font-size: var(--text-callout); font-weight: var(--weight-semibold); }
.v2b-bk__sub { font-size: var(--text-footnote); color: var(--text-muted); }
/* история — лента с точками */
.v2b-tl { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.v2b-tl__row { position: relative; display: flex; gap: 12px; align-items: baseline; padding: 9px 0 9px 22px; }
.v2b-tl__row::before { content: ""; position: absolute; left: 4px; top: 24px; bottom: -14px; width: 2px; background: var(--border-subtle); }
.v2b-tl__row:last-child::before { display: none; }
.v2b-tl__dot { position: absolute; left: 0; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.v2b-tl__dot--info { background: var(--info); }
.v2b-tl__dot--warn { background: var(--warn); }
.v2b-tl__dot--danger { background: var(--danger); }
.v2b-tl__dot--success { background: var(--success); }
.v2b-tl__dot--neutral { background: var(--text-muted); }
.v2b-tl__dot--faint { background: var(--border-strong); }
.v2b-tl__e { flex: 1 1 auto; min-width: 0; font-size: var(--text-callout); font-weight: var(--weight-semibold); }
.v2b-tl__t { flex: none; font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; }

/* ─────────── профиль клиента: телефон (одна колонка) ─────────── */
.v2b-pfm { display: flex; flex-direction: column; gap: 12px; padding-top: env(safe-area-inset-top, 0px); }
.v2b-pfm-top { display: flex; align-items: center; margin: 4px 0 0 -8px; }
.v2b-pfm-back { font-size: var(--text-body); color: var(--text); min-height: 44px; }
.v2b-pfm-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; text-align: center; }
.v2b-pfm-name { margin: 0; font-size: 20px; line-height: 26px; font-weight: var(--weight-semibold); }
.v2b-pfm-hero .v2b-cw-ident { justify-content: center; }
.v2b-pfm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2b-pfm-actions.is-single { grid-template-columns: 1fr; }
.v2b-pfm-stage {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); font-size: var(--text-body);
}
.v2b-pfm-stage__k { flex: 1 1 auto; color: var(--text-muted); }
.v2b-pfm-stage__sel {
  min-height: 40px; border: 0; background: transparent; font: inherit; font-size: var(--text-input); font-weight: var(--weight-semibold);
  color: var(--info); text-align: right; cursor: pointer;
}
.v2b-pfm-stage__sel.is-static { min-height: 0; color: var(--text); }
.v2b-pfm-stage__sel:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-sm); }
.v2b-pfm .v2b-pf-card { padding: 14px; gap: 10px; }
.v2b-pfm .v2b-pf-card .v2b-facts { grid-template-columns: 96px minmax(0, 1fr); gap: 8px 10px; }
.v2b-pfm > .v2b-bk { padding: 12px 14px; }

/* docs/50: экран ошибки карточки/переписки — путь назад (на телефоне таббар скрыт) */
.error .v2b-err-back { align-self: flex-start; margin-bottom: var(--space-2); }
/* docs/50 C2: плашка активного сохранённого сегмента в таблице десктопа */
.v2b-bt-note { padding: 0 16px 12px; }
.v2b-bt-note[hidden] { display: none; }
/* docs/50: пробел уже закрыт ответом в знания — спокойная зелёная плашка, одно действие «Ответить клиенту» */
.v2b-gap.is-done { background: var(--success-soft); border-color: var(--border); }
.v2b-gap.is-done .v2b-gap__ic { color: var(--success); }
.v2b-gap.is-done.is-compact .v2b-gap__actions { grid-template-columns: 1fr; }

/* ═══════════ docs/51 Э1: «Сегодня» (макеты workspace51/TodayDesktop, TodayMobile) ═══════════ */
.v2b-today { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v2b-tk-head { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px; }
.v2b-tk-head.page-head { margin-bottom: 0; }
.v2b-tk-sum { font-size: var(--text-callout); line-height: 20px; }
.v2b-tk-list { display: flex; flex-direction: column; gap: 10px; }
.v2b-tk {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px; box-sizing: border-box;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
}
.v2b-tk.is-late { border-color: color-mix(in srgb, var(--danger) 26%, var(--surface)); }
.v2b-tk.is-skel { min-height: 120px; }
.v2b-tk__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.v2b-tk__head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.v2b-tk__name { font-size: 15px; font-weight: var(--weight-semibold); color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-tk__meta { font-size: var(--text-caption); color: var(--text-faint); }
.v2b-tk__age { margin-left: auto; font-size: var(--text-caption); color: var(--text-faint); white-space: nowrap; }
.v2b-tk__age.is-late { color: var(--danger); font-weight: var(--weight-semibold); }
.v2b-tk__what { font-size: var(--text-callout); line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
.v2b-tk__more { font-size: var(--text-caption); color: var(--text-faint); }
.v2b-tk-why {
  display: inline-flex; align-items: flex-start; gap: 2px; align-self: flex-start; max-width: 100%; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--text-footnote); line-height: 19px; color: var(--text-muted); text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.v2b-tk-why__k { font-weight: var(--weight-semibold); color: var(--text); white-space: nowrap; }
.v2b-tk-why .icon { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--text-faint); }
.v2b-tk-why:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 6px; }
.v2b-tk-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; box-sizing: border-box; flex: none;
  border: 0; border-radius: var(--radius-pill); font: inherit; font-size: var(--text-micro); font-weight: var(--weight-semibold); white-space: nowrap;
}
.v2b-tk-pill .icon { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.v2b-tk-pill--hot { background: var(--danger-soft); color: var(--danger); }
.v2b-tk-pill--warn { background: var(--warn-soft); color: var(--warn); }
.v2b-tk-pill--info { background: var(--info-soft); color: var(--info); }
.v2b-tk-pill--cool { background: var(--surface-sunken); color: var(--text-muted); }
.v2b-tk-pill.is-btn { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v2b-tk-pill.is-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-tk__actions { display: flex; gap: 8px; align-items: center; }
.v2b-tk-main { flex: 1; height: 44px; border-radius: var(--radius-md); font-size: var(--text-body); }
.v2b-tk-icon {
  flex: none; width: 44px; height: 44px; box-sizing: border-box; display: grid; place-items: center; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.v2b-tk-icon .icon { width: 20px; height: 20px; }
.v2b-tk-icon:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-tk-done {
  height: 36px; padding: 0 12px; border: 0; border-radius: var(--radius-md); background: transparent; font: inherit;
  font-size: var(--text-callout); color: var(--text-muted); cursor: pointer;
}
.v2b-tk-done:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) {
  .v2b-tk-done:hover, .v2b-tk-icon:hover { background: var(--surface-hover); }
  .v2b-tk-why:hover .v2b-tk-why__k { text-decoration: underline; }
}
.v2b-tk-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; text-align: center;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
}
.v2b-tk-empty__ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.v2b-tk-empty__ic .icon { width: 24px; height: 24px; }
.v2b-tk-empty__title { margin: 4px 0 0; font-size: var(--text-headline); font-weight: var(--weight-semibold); color: var(--text); }
.v2b-tk-empty__hint { margin: 0 0 8px; max-width: 420px; font-size: var(--text-callout); line-height: 20px; color: var(--text-muted); }
.v2b-tk-donebox { margin-top: 6px; font-size: var(--text-callout); color: var(--text-muted); }
.v2b-tk-donebox > summary { cursor: pointer; padding: 10px 2px; font-weight: var(--weight-semibold); color: var(--text); }
.v2b-tk-donelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.v2b-tk-doneitem {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md);
  font-size: var(--text-callout); line-height: 20px; color: var(--text-muted);
}
.v2b-tk-doneitem .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--success); }
.v2b-tk-doneitem__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2b-tk-doneitem__body b { color: var(--text); font-weight: var(--weight-semibold); }
.v2b-tk-doneitem__at { font-size: var(--text-caption); color: var(--text-faint); }
.v2b-tk-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.v2b-tk-tab {
  height: 34px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface);
  font: inherit; font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--text); cursor: pointer;
}
.v2b-tk-tab.is-on { background: var(--text); border-color: var(--text); color: var(--surface); }
.v2b-tk-tab:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* десктоп ≥1024 (экран во всю ширину справа от сайдбара) */
.v2b-today.is-wide { gap: 22px; max-width: 1080px; padding: 28px 40px 48px; box-sizing: border-box; }
.v2b-today.is-wide .v2b-tk-head { padding: 0; }
.v2b-today.is-wide .v2b-tk-sum { font-size: var(--text-body); line-height: 22px; }
.v2b-today.is-wide .v2b-tk-list { gap: 12px; }
.v2b-today.is-wide .v2b-tk { padding: 18px 20px; }
.v2b-today.is-wide .v2b-tk__main { gap: 6px; }
.v2b-today.is-wide .v2b-tk__name { font-size: var(--text-headline); }
.v2b-today.is-wide .v2b-tk__meta { font-size: var(--text-footnote); }
.v2b-today.is-wide .v2b-tk-pill { font-size: var(--text-caption); }
.v2b-today.is-wide .v2b-tk__what { font-size: var(--text-body); line-height: 22px; }
.v2b-today.is-wide .v2b-tk__actions { margin-top: 4px; flex-wrap: wrap; }
.v2b-today.is-wide .v2b-tk-main { flex: none; height: 36px; padding: 0 14px; border-radius: var(--radius-md); font-size: var(--text-callout); }
.v2b-today.is-wide .v2b-tk__actions .v2b-btn--ghost { font-size: var(--text-callout); padding: 0 14px; }
.v2b-today.is-wide .v2b-tk .v2b-cav { flex: none; }

/* «Почему» по плашке температуры (docs/51, макет WhyHotMobile): кнопка-плашка, шторка, поповер */
.v2b-heat--btn { border: 0; font: inherit; font-size: var(--text-caption); font-weight: var(--weight-semibold); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v2b-heat--btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.v2b-flame--btn { position: relative; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v2b-flame--btn::after { content: ""; position: absolute; inset: -12px; }
.v2b-flame--btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 6px; }
@media (hover: hover) and (pointer: fine) {
  .v2b-heat--btn:hover { filter: brightness(0.97); text-decoration: underline; text-underline-offset: 2px; }
}
.v2b-pfm-chips { justify-content: center; }
.v2b-why { display: flex; flex-direction: column; gap: 18px; padding: 4px 4px 8px; }
.v2b-why__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2b-why__heat { height: 26px; padding: 0 11px; font-size: var(--text-footnote); font-weight: 700; }
.v2b-why__name { font-size: var(--text-headline); font-weight: var(--weight-semibold); color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2b-why__sec { display: flex; flex-direction: column; gap: 10px; }
.v2b-why__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.v2b-why__item { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-body); line-height: 21px; color: var(--text); }
.v2b-why__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--text-faint); }
.v2b-why__item.is-up.is-hot .v2b-why__dot { background: var(--danger); }
.v2b-why__item.is-up.is-warm .v2b-why__dot { background: var(--warn); }
.v2b-why__item.is-down .v2b-why__dot { background: var(--border-strong); }
.v2b-why__item.is-down .v2b-why__text { color: var(--text-muted); }
.v2b-why__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2b-why__when { flex: none; font-size: var(--text-caption); line-height: 21px; color: var(--text-faint); white-space: nowrap; }
.v2b-why__todo { margin: 0; padding: 14px; border-radius: var(--radius-lg); background: var(--surface-2); font-size: var(--text-callout); line-height: 20px; color: var(--text); }
.v2b-why__how { font-size: var(--text-callout); color: var(--text-muted); }
.v2b-why__how > summary { cursor: pointer; font-weight: var(--weight-semibold); color: var(--text); padding: 4px 0; }
.v2b-why__how > p { margin: 8px 0 0; line-height: 20px; }
.v2b-why__cta { width: 100%; height: 48px; border-radius: var(--radius-md); font-size: var(--text-headline); }
.v2b-why-sheet .v2b-why-wrap { padding: 0 20px calc(20px + env(safe-area-inset-bottom)); }
.v2b-why-pop {
  position: fixed; z-index: 1000; box-sizing: border-box; padding: 18px; max-height: calc(100vh - 32px); overflow: auto;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-overlay);
}
.v2b-why-pop:focus { outline: none; }
.v2b-why-pop .v2b-why { padding: 0; gap: 14px; }
.v2b-why-pop .v2b-why__cta { height: 40px; font-size: var(--text-callout); }
/* docs/51: плашки-кнопки «Почему» невысокие (22 px) — зона касания ≥44 px без смены вида */
.v2b-tk-pill.is-btn, .v2b-heat--btn { position: relative; }
.v2b-tk-pill.is-btn::after, .v2b-heat--btn::after { content: ""; position: absolute; inset: -11px -4px; }
.v2b-tk-why { padding: 6px 0; margin: -6px 0; }

/* ─────────── docs/51 Э2: ступень готовности (одно слово на всех экранах), путь клиента, «Коротко» ─────────── */
.v2b-rd {
  display: inline-flex; align-items: center; gap: 4px; flex: none; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: var(--text-caption); font-weight: var(--weight-semibold); white-space: nowrap;
}
.v2b-rd .icon { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.v2b-rd--sm { height: 20px; padding: 0 8px; font-size: var(--text-micro); }
.v2b-rd--ready { background: var(--danger-soft); color: var(--danger); }
.v2b-rd--choosing { background: var(--warn-soft); color: var(--warn); }
.v2b-rd--interest { background: var(--surface-sunken); color: var(--text-muted); }
.v2b-rd--booked { background: var(--info-soft); color: var(--info); }
.v2b-rd--bought { background: var(--success-soft); color: var(--success); }
.v2b-rd--lost { background: var(--surface-sunken); color: var(--text-faint); font-weight: var(--weight-medium, 500); }
.v2b-rd--btn { position: relative; border: 0; font: inherit; font-size: var(--text-caption); font-weight: var(--weight-semibold); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v2b-rd--btn.v2b-rd--sm { font-size: var(--text-micro); }
.v2b-rd--btn::after { content: ""; position: absolute; inset: -11px -4px; }
.v2b-rd--btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (hover: hover) and (pointer: fine) {
  .v2b-rd--btn:hover { filter: brightness(0.97); text-decoration: underline; text-underline-offset: 2px; }
}
.v2b-why__head .v2b-rd { height: 26px; padding: 0 11px; font-size: var(--text-footnote); font-weight: 700; }
.v2b-why__item.is-up.is-ready .v2b-why__dot { background: var(--danger); }
.v2b-why__item.is-up.is-choosing .v2b-why__dot { background: var(--warn); }
.v2b-why__item.is-up.is-booked .v2b-why__dot { background: var(--info); }
.v2b-why__item.is-up.is-bought .v2b-why__dot { background: var(--success); }

/* лестница: 5 ступеней — пройденные тёмные, текущая цветом ступени, дальше — светлые */
.v2b-ladder { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.v2b-ladder__step { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.v2b-ladder__bar { height: 6px; border-radius: 3px; background: var(--border); }
.v2b-ladder__lab { font-size: var(--text-micro); line-height: 13px; text-align: center; color: var(--text-faint); overflow-wrap: anywhere; hyphens: auto; }
.v2b-ladder__step.is-done .v2b-ladder__bar { background: var(--text); }
.v2b-ladder__step.is-current .v2b-ladder__bar { background: var(--text); }
.v2b-ladder__step.is-current .v2b-ladder__lab { color: var(--text); font-weight: 700; }
.v2b-ladder__step--ready.is-current .v2b-ladder__bar { background: var(--danger); }
.v2b-ladder__step--ready.is-current .v2b-ladder__lab { color: var(--danger); }
.v2b-ladder__step--booked.is-current .v2b-ladder__bar { background: var(--info); }
.v2b-ladder__step--booked.is-current .v2b-ladder__lab { color: var(--info); }
.v2b-ladder__step--bought.is-current .v2b-ladder__bar { background: var(--success); }
.v2b-ladder__step--bought.is-current .v2b-ladder__lab { color: var(--success); }
.v2b-ladder-wrap { display: flex; flex-direction: column; gap: 6px; }
.v2b-ladder.is-lost .v2b-ladder__bar { background: var(--surface-sunken); }
.v2b-ladder__lost { font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--text-faint); }
@media (min-width: 1024px) { .v2b-ladder__lab { line-height: 14px; } }
.v2b-path__why {
  position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--text-footnote); color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-path__why .icon { width: 14px; height: 14px; }
.v2b-path__why::after { content: ""; position: absolute; inset: -12px -8px; }
.v2b-path__why:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-xs); }
@media (hover: hover) and (pointer: fine) { .v2b-path__why:hover { color: var(--text); } }

/* «Коротко»: тёмная карточка (макет ClientPathMobile) — только поля сводки + следующий шаг */
.v2b-short {
  display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius-lg);
  background: var(--text); color: var(--surface);
}
.v2b-short__caps { font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--border-strong); }
.v2b-short__facts { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; font-size: var(--text-callout); line-height: 21px; }
.v2b-short__facts dt { color: var(--border-strong); }
.v2b-short__facts dd { margin: 0; overflow-wrap: anywhere; }
.v2b-short__step { margin: 0; font-size: var(--text-callout); line-height: 20px; color: var(--border); }
.v2b-short__step b { color: var(--surface); }
.v2b-pfm .v2b-short { padding: 14px 16px; }

/* ─── docs/51 Э3: тур первого входа (3 шага) ─── */
/* Фон ниже шапки/навигации (z-header): подсвеченный пункт таб-бара/сайдбара виден и нажимается. */
.v2b-tour-overlay { position: fixed; inset: 0; z-index: calc(var(--z-header) - 1); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
.v2b-tour-overlay.is-wide { align-items: center; padding: 24px; }
body.is-browser .v2b-tour-overlay.is-wide { padding-left: 264px; } /* справа от сайдбара */
.v2b-tour-scrim { position: absolute; inset: 0; background: rgba(28, 25, 23, 0.36); }
.v2b-tour {
  position: relative; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 8px;
  padding: 20px 20px 16px; border-radius: var(--radius-xl); background: var(--surface);
  box-shadow: var(--shadow-overlay); outline: none;
  animation: v2b-tour-in var(--dur-base) var(--ease-emphasized);
}
@keyframes v2b-tour-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2b-tour { animation: none; } }
.v2b-tour__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2b-tour__ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-sunken); color: var(--text); }
.v2b-tour__ic .icon { width: 22px; height: 22px; }
.v2b-tour__count { margin: 0; font-size: var(--text-footnote); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.v2b-tour__title { margin: 6px 0 0; font-size: var(--text-title-2); line-height: var(--leading-title); font-weight: var(--weight-semibold); color: var(--text); letter-spacing: var(--tracking-title); }
.v2b-tour__text { margin: 0; font-size: var(--text-body); line-height: 22px; color: var(--text); }
.v2b-tour__note { margin: 0; padding: 10px 12px; border-radius: var(--radius-md); background: var(--surface-sunken); font-size: var(--text-callout); line-height: 20px; color: var(--text-muted); }
.v2b-tour__dots { display: flex; gap: 6px; margin: 6px 0 2px; }
.v2b-tour__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: width var(--dur-base) var(--ease-standard), background var(--dur-base); }
.v2b-tour__dot.is-on { width: 18px; border-radius: 3px; background: var(--text); }
.v2b-tour__actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.v2b-tour__grow { flex: 1; }
.v2b-tour__actions .v2b-btn { min-height: 44px; }
.nav-link.is-tour-focus { position: relative; color: var(--text); }
.nav-link.is-tour-focus .icon { color: var(--text); }
.nav-link.is-tour-focus::after {
  content: ""; position: absolute; inset: 2px; border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px var(--accent); pointer-events: none;
}

/* ─── docs/51 Э3: обучающие пустые состояния (что появится + как туда попасть) ─── */
.v2b-learn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 20px; text-align: center; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.v2b-learn__ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-sunken); color: var(--text); }
.v2b-learn__ic .icon { width: 24px; height: 24px; }
.v2b-learn__title { margin: 4px 0 0; font-size: var(--text-headline); font-weight: var(--weight-semibold); color: var(--text); }
.v2b-learn__hint { margin: 0; max-width: 440px; font-size: var(--text-callout); line-height: 20px; color: var(--text-muted); }
.v2b-learn__steps { list-style: none; counter-reset: lrn; margin: 8px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 400px; text-align: left; }
.v2b-learn__steps li { counter-increment: lrn; display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-callout); line-height: 20px; color: var(--text); }
.v2b-learn__steps li::before { content: counter(lrn); flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-sunken); font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--text-muted); }
.v2b-learn__steps li.is-done { color: var(--text-muted); }
.v2b-learn__steps li.is-done::before { content: "✓"; background: var(--success-soft); color: var(--success); }
.v2b-learn__cta { margin-top: 4px; }
