/* 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-udot--card { margin-top: 13px; }

/* аватар-инициал */
.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; }
body.is-browser .v2b-bell { width: 38px; height: 38px; }

/* ═══════════════════════════ Диалоги ═══════════════════════════ */
.v2b-conv {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px; margin: 0;
  border: 0; background: none; font: inherit; color: var(--text); text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v2b-conv + .v2b-conv { border-top: 1px solid var(--surface-sunken); }
.v2b-conv:active { background: var(--surface-hover); }
.v2b-conv:focus-visible { outline: none; box-shadow: inset var(--shadow-focus); }
.v2b-conv--skel { cursor: default; }
.v2b-conv__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v2b-conv__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-conv__name {
  flex: 1 1 auto; min-width: 0; font-size: 16px; line-height: 22px; font-weight: var(--weight-medium);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v2b-conv__time { flex: none; font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.v2b-conv__msg { font-size: 14px; line-height: 20px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2b-conv.is-unread .v2b-conv__name { font-weight: var(--weight-semibold); }
.v2b-conv.is-unread .v2b-conv__msg { color: var(--text); }
.v2b-conv__chips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media (hover: hover) and (pointer: fine) { .v2b-conv:hover { background: var(--surface-2); } }

/* ═══════════════════════════ Клиенты ═══════════════════════════ */
.v2b-stagebar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2b-stagebar .v2s-chips { flex: 1 1 auto; min-width: 0; }
.v2b-crow { gap: 10px; }
.v2b-crow.is-nh { border-color: var(--why-border); }
.v2b-why {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-md);
  background: var(--why-bg); font-size: 14px; line-height: 20px; color: var(--text-muted);
}
.v2b-why .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--why-icon); stroke-width: 2; }
.v2b-why span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v2b-why span::first-letter { text-transform: uppercase; }
.v2b-last { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.v2b-last .icon { width: 16px; height: 16px; flex: none; color: var(--col-lost); stroke-width: 1.8; }
.v2b-last span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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); }

/* ═══════════════════════════ шторка/карточка клиента ═══════════════════════════ */
.v2b-peek__head { align-items: flex-start; }
.v2b-peek__head .lv-peek__title { gap: 6px; }
.v2b-peek__head .lv-meta { margin-top: -4px; }
.v2b-chiprow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.v2b-why-card .lv-why__text::first-letter { text-transform: uppercase; }
.v2b-why-cap {
  font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: 0.04em; text-transform: uppercase; color: var(--st-work-fg);
}
.v2b-peek__sum { display: flex; flex-direction: column; gap: 6px; }
.v2b-peek__sumtext {
  margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.v2b-csheet .lv-peek__body { overflow-y: auto; }

.v2b-card__bar { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.v2b-hero.lv-hero { align-items: flex-start; }
.v2b-hero .lv-hero__main { padding-top: 2px; }
.lv-card--sheet .v2b-hero .lv-hero__name.lead__name { font-size: var(--text-title-2); line-height: 26px; }
.v2b-card .lv-chiprow .v2b-hchip { height: 32px; padding: 0 12px; }

.v2b-overview { display: flex; flex-direction: column; gap: 12px; }
.v2b-why-card.lv-why--titled { gap: 8px; }
.v2b-why-more { padding-top: 4px; }
.v2b-card .lv-sec__head { display: flex; align-items: center; gap: 8px; }
.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-sec__text { margin: 0; font-size: 15px; line-height: 22px; color: var(--text); }
.v2b-sec__note { margin: 0; font-size: 12px; line-height: 17px; color: var(--text-faint); }
.v2b-sec__time { flex: none; font-size: 13px; color: var(--text-faint); }

.v2b-card .v2b-step.lv-sec { flex-direction: row; align-items: flex-start; gap: 12px; }
.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-card .v2b-last-sec.lv-sec { gap: 8px; }
.v2b-bubble {
  align-self: flex-start; max-width: 85%; margin: 0; padding: 10px 12px;
  background: var(--surface-sunken); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  font-size: 15px; line-height: 21px; color: var(--text); overflow-wrap: anywhere;
}
.v2b-linkbtn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: var(--weight-medium); color: var(--text-muted); cursor: pointer;
}
.v2b-linkbtn .icon { width: 14px; height: 14px; stroke-width: 2; }

/* согласие — спокойная строка-карточка (зелёная иконка = «получено») */
.v2b-card .b2c-consent {
  gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.v2b-card .b2c-consent__icon {
  flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--st-won-bg); color: var(--col-won);
}
.v2b-card .b2c-consent__icon .icon { width: 16px; height: 16px; stroke-width: 2.2; color: inherit; }
.v2b-card .b2c-consent__title { font-size: 15px; font-weight: var(--weight-medium); color: var(--text); }
.v2b-card .b2c-consent--ok .b2c-consent__title { color: var(--text); }
.v2b-card .b2c-consent__sub { font-size: 13px; color: var(--text-faint); }
.v2b-card .b2c-consent--warn { background: var(--why-bg); border-color: var(--why-border); }
.v2b-card .b2c-consent--warn .b2c-consent__icon { background: var(--st-work-bg); color: var(--why-icon); }
.v2b-card .b2c-consent--warn .b2c-consent__title { color: var(--st-work-fg); }

/* ответ: «Обновить черновик» — компактная вторичная, не на всю ширину */
.v2b-card .v2b-regen { align-self: flex-start; }
.v2b-card .lv-draft.block { display: flex; flex-direction: column; }

/* нижняя панель: в «Переписке» скрыта (внизу — поле ввода) */
.v2b-card .lead__statusbar.lv-bar[hidden] { display: none; }

/* живой чат в карточке */
.v2b-card .b2c-chat--live { gap: 12px; }
.v2b-card .b2c-mode { gap: 8px; }
.v2b-card .b2c-mode__chip {
  background: var(--surface-sunken); border: 0; color: var(--text-muted); font-size: 13px; min-height: 30px; padding: 0 12px;
}
.v2b-card .b2c-mode__chip--human { background: var(--st-work-bg); color: var(--st-work-fg); }
.v2b-card .b2c-mode__dot { background: var(--text-faint); }
.v2b-card .b2c-mode__dot.is-human { background: var(--why-icon); }
.v2b-card .b2c-mode__btn.lv-btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.v2b-card .b2c-mode__btn.lv-btn .icon { width: 16px; height: 16px; }
.v2b-card .b2c-mode__btn[hidden] { display: none; }
.v2b-card .b2c-chat__stream {
  gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  max-height: 52vh;
}
.v2b-card .b2c-msg { border: 0; padding: 10px 12px; max-width: 85%; }
.v2b-card .b2c-msg--in { background: var(--surface-sunken); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px; }
.v2b-card .b2c-msg--out { background: var(--st-new-bg); border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg); }
.v2b-card .b2c-msg__text { font-size: 15px; line-height: 21px; }
.v2b-card .b2c-msg__meta { font-size: 11px; }
.v2b-card .b2c-msg__author--human { color: var(--st-new-fg); }
.v2b-card .b2c-msg.is-failed { box-shadow: inset 0 0 0 1px var(--danger); }
.v2b-card .b2c-chat__empty { padding: 20px 0; }
.v2b-card .b2c-chat__note { font-size: 12px; padding: 0 4px; }
.v2b-card .b2c-chat__composer {
  position: sticky; bottom: 0; z-index: 2; gap: 8px; align-items: flex-end;
  margin: 0 -16px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg-strong); border-top: 1px solid var(--border);
}
.lv-card--page.v2b-card .b2c-chat__composer { margin: 0; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.v2b-card .b2c-chat__input {
  flex: 1 1 auto; min-height: 44px; padding: 10px 14px; box-sizing: border-box;
  border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface);
  font: inherit; font-size: var(--text-input, 16px); line-height: 22px; resize: none;
}
.v2b-card .b2c-chat__input:focus { outline: none; border-color: var(--text-muted); box-shadow: var(--shadow-focus); }
.v2b-send {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--text); color: var(--surface); display: grid; place-items: center; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.v2b-send .icon { width: 20px; height: 20px; stroke-width: 2; }
.v2b-send:disabled { opacity: 0.45; cursor: default; }
.v2b-send:active { transform: scale(0.95); }
.v2b-send:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ═══════════════════════════ шторки выбора статуса / причины ═══════════════════════════ */
.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)); }
