/* IngoRadar — общая дизайн-система (бренд IngoRadar). Подключается всеми фронтами. */
:root {
  --blue-900:#0a1b45; --blue-800:#12308a; --blue-700:#2350c8;
  --accent:#2f6bff; --accent-2:#19d3da; --rating:#f5a623;
  --ink:#0f1a30; --ink-2:#606b82; --faint:#93a0b6; --danger:#e0483d;
  --bg:#f5f7fb; --surface:#fff; --border:#eaedf5;
  --radius:16px; --radius-sm:12px;
  --shadow:0 12px 34px rgba(15,28,74,.10); --shadow-sm:0 2px 10px rgba(15,28,74,.055);
  --ring:0 0 0 3px rgba(47,107,255,.16);
}
* { box-sizing:border-box; }
html,body { margin:0; }
/* Страница — flex-колонка: шапка фикс. высоты, контент занимает остаток окна.
   Высота чата считается браузером сама (без магических чисел), при любой шапке/разрешении. */
body { font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif; color:var(--ink); background:var(--bg); -webkit-font-smoothing:antialiased; min-height:100vh; display:flex; flex-direction:column; }
#view { flex:1 1 auto; min-height:0; }
a { color:var(--accent); text-decoration:none; }

/* Шапка */
.nav { flex:0 0 auto; position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  padding:14px 26px; backdrop-filter:saturate(1.4) blur(14px); background:rgba(255,255,255,.78); border-bottom:1px solid var(--border); }
.brand { font-weight:800; font-size:20px; color:var(--blue-800); letter-spacing:-.02em; display:inline-flex; align-items:center; gap:2px; }
.brand-mark { width:26px; height:26px; flex:0 0 auto; margin-right:5px; }
.brand small { font-weight:600; color:var(--ink-2); font-size:13px; margin-left:6px; }
.nav-links { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
/* :where() = нулевая специфичность: это дефолт для простых ссылок, любой .btn/.nav-tab его перекрывает. */
:where(.nav-links a, .nav-links button) { color:var(--ink-2); font-weight:600; font-size:15px; background:none; border:none; cursor:pointer; font-family:inherit; }

/* Баланс в шапке кабинета (плашка с быстрым пополнением) */
.bal { display:inline-flex; align-items:stretch; border-radius:12px; overflow:hidden; box-shadow:0 4px 12px rgba(47,107,255,.22); }
.bal button { border:none; cursor:pointer; font-family:inherit; font-weight:700; transition:.15s; }
.bal__amt { background:linear-gradient(135deg,var(--accent),var(--blue-700)); color:#fff; padding:9px 15px; font-size:15px; letter-spacing:.01em; }
.bal__amt:hover { filter:brightness(1.06); }
.bal__plus { background:linear-gradient(135deg,var(--accent-2),#10b9c0); color:#053038; padding:0 13px; font-size:18px; line-height:1; }
.bal__plus:hover { filter:brightness(1.05); }
.bal--on { box-shadow:0 0 0 2px var(--accent), 0 4px 12px rgba(47,107,255,.22); }
.topup-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }

/* Кнопки */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; border:1px solid transparent; border-radius:12px;
  font-weight:600; font-size:15px; padding:12px 20px; font-family:inherit; transition:transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn-sm { padding:8px 14px; font-size:14px; border-radius:10px; }
.btn-primary { background:linear-gradient(135deg,var(--accent),var(--blue-700)); color:#fff; box-shadow:0 6px 16px rgba(47,107,255,.26); }
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 10px 22px rgba(47,107,255,.32); }
.btn-ghost { background:#fff; border-color:var(--border); color:var(--blue-800); }
.btn-ghost:hover { background:#f5f8ff; border-color:#d5ddf2; }
.btn-light { background:rgba(255,255,255,.16); color:#fff; border-color:rgba(255,255,255,.4); }
.btn-light:hover { background:rgba(255,255,255,.28); }
.btn-block { width:100%; }
.btn-icon { padding:0; width:40px; height:40px; border-radius:12px; font-size:18px; }
.btn-danger { background:var(--danger); color:#fff; box-shadow:0 6px 16px rgba(224,72,61,.24); }
.btn-danger:hover { transform:translateY(-1px); box-shadow:0 10px 22px rgba(224,72,61,.30); }
.btn:disabled, .btn[disabled] { background:#cbd2e2; color:#fff; box-shadow:none; cursor:not-allowed; transform:none; }
.btn:disabled:hover, .btn[disabled]:hover { transform:none; box-shadow:none; }
/* Пилюли-вкладки в шапке кабинета */
.nav-tab { padding:9px 16px; border-radius:11px; font-size:14.5px; font-weight:600; color:var(--ink-2); background:none; border:none; cursor:pointer; font-family:inherit; transition:.15s; }
.nav-tab:hover { background:#eef2fb; color:var(--ink); }
.nav-tab--on { background:var(--accent); color:#fff; }
.nav-tab--on:hover { background:var(--accent); color:#fff; }

/* Hero / секции */
.hero { position:relative; overflow:hidden; color:#fff; padding:84px 28px 96px; text-align:center;
  background:radial-gradient(1200px 500px at 80% -10%,rgba(25,211,218,.35),transparent 60%),linear-gradient(135deg,var(--blue-900),var(--blue-700)); }
.hero h1 { font-size:clamp(34px,6vw,60px); line-height:1.05; margin:0 0 18px; letter-spacing:-.03em; font-weight:800; }
.hero p { font-size:clamp(16px,2.4vw,21px); opacity:.9; max-width:720px; margin:0 auto 32px; }
.hero .cta { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.hero .amount { font-size:38px; font-weight:800; }
.orbs span { position:absolute; border-radius:50%; filter:blur(8px); opacity:.5; background:radial-gradient(circle at 30% 30%,var(--accent-2),transparent 70%); animation:float 7s ease-in-out infinite; }
.orbs span:nth-child(1){ width:160px;height:160px;left:6%;top:20%; }
.orbs span:nth-child(2){ width:120px;height:120px;right:10%;bottom:12%; animation-delay:-3s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-22px)} }
.stats { display:flex; gap:40px; justify-content:center; margin-top:44px; flex-wrap:wrap; }
.stat b { display:block; font-size:30px; font-weight:800; } .stat span { opacity:.8; font-size:14px; }
.section { width:100%; max-width:1080px; margin:0 auto; padding:40px 24px; }
.section--wide { max-width:1200px; }
.section--narrow { max-width:640px; }

/* Админка: сайдбар + контент */
.admin-shell { display:flex; align-items:flex-start; }
.admin-side { width:224px; flex:0 0 auto; padding:20px 12px; position:sticky; top:60px; align-self:flex-start; }
.admin-main { flex:1; min-width:0; padding:22px 26px; max-width:1180px; }
.side-group { margin-bottom:16px; }
.side-group__t { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-2); padding:0 12px 6px; }
.side-item { display:block; width:100%; text-align:left; border:none; background:none; font:inherit; font-size:14px; font-weight:600; color:var(--ink); padding:9px 12px; border-radius:10px; cursor:pointer; transition:.15s; }
.side-item:hover { background:#eef2fb; }
.side-item--on { background:#dfe8ff; color:var(--accent); font-weight:700; }
.side-badge { float:right; background:#ffe0e0; color:#c0392b; border-radius:999px; font-size:11px; line-height:18px; min-width:18px; text-align:center; padding:0 6px; font-weight:700; }
.side-item--on .side-badge { background:#ffe0e0; color:#c0392b; }
@media (max-width:860px) {
  .admin-shell { flex-direction:column; }
  .admin-side { width:100%; position:static; display:flex; flex-wrap:wrap; gap:4px; padding:10px 14px; }
  .side-group { margin:0; }
  .side-group__t { display:none; }
  .admin-main { padding:14px; }
}
/* Админка: модалка переписки */
.ltable--rows tbody tr:hover { background:#f4f6fc; }
.acm-scroll { max-height:60vh; overflow-y:auto; display:flex; flex-direction:column; gap:10px; padding:4px; }
.acm-row { display:flex; flex-direction:column; max-width:82%; }
.acm-row--user { align-self:flex-end; align-items:flex-end; }
.acm-row--agent { align-self:flex-start; align-items:flex-start; }
.acm-bubble { padding:9px 13px; border-radius:14px; font-size:14px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.acm-row--user .acm-bubble { background:var(--accent); color:#fff; border-bottom-right-radius:5px; }
.acm-row--agent .acm-bubble { background:#f1f4fb; color:var(--ink); border-bottom-left-radius:5px; }
.acm-time { font-size:11px; color:var(--ink-2); margin-top:3px; }
.acm-sys { align-self:center; text-align:center; font-size:12px; color:var(--ink-2); background:#eef2fb; border-radius:999px; padding:5px 12px; }
.acm-err { max-width:100%; margin-top:5px; padding:8px 11px; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:11.5px; line-height:1.45; color:#8a1f1f; background:#fff3f3; border:1px solid #f3c0c0; border-radius:8px; white-space:pre-wrap; word-break:break-word; }
/* Плашка статуса пуш-уведомлений в колокольчике. */
.push-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 14px; margin-bottom:12px; border-radius:12px; font-size:13px; line-height:1.45; }
.push-bar--ok { background:#eaf7ee; color:#1e7a3a; border:1px solid #bfe6cb; }
.push-bar--off { background:#fff4e0; color:#8a5a12; border:1px solid #f0d19a; }
.acm-pay { margin-top:5px; font-size:12px; opacity:.9; }
/* Админка: карточки каталога (выше, чище) */
.cat-card { padding:0; overflow:hidden; }
.cat-head { cursor:pointer; list-style:none; display:flex; align-items:flex-start; gap:14px; padding:16px 18px; }
.cat-head::-webkit-details-marker { display:none; }
.cat-head__av { width:48px; height:48px; font-size:20px; border-radius:14px; flex:0 0 auto; }
.cat-head__main { flex:1; min-width:0; }
.cat-head__title { font-size:16px; font-weight:700; color:var(--ink); }
.cat-head__badges { margin-top:6px; display:flex; gap:6px; flex-wrap:wrap; }
.cat-head__desc { margin-top:7px; font-size:13px; color:var(--ink-2); line-height:1.45; }
.cat-head__meta { margin-top:7px; font-size:12px; color:var(--ink-2); }
.cat-head__chev { flex:0 0 auto; font-size:13px; font-weight:600; color:var(--accent); white-space:nowrap; }
.cat-card[open] .cat-head { border-bottom:1px solid var(--border); }
.cat-body { padding:16px 18px; }
.cat-pill { display:inline-flex; align-items:center; font-size:12px; font-weight:600; border-radius:999px; padding:3px 11px; }
.cat-pill--ok { background:#dff4e5; color:#249c45; }
.cat-pill--wait { background:#eef2fb; color:#3358cc; }
.cat-pill--warn { background:#fff0dc; color:#d56f00; }
.cat-pill--muted { background:#f0f0f3; color:var(--ink-2); }
.cat-pill--bad { background:#ffe0e0; color:#c0392b; }
.card--flash { animation:cardFlash 1.6s ease-out; }
@keyframes cardFlash { 0%,35% { box-shadow:0 0 0 3px rgba(47,107,255,.55); } 100% { box-shadow:0 0 0 3px rgba(47,107,255,0); } }
.cat-sub { font-size:13px; font-weight:700; color:var(--ink); margin:18px 0 8px; }
.cat-sub:first-child { margin-top:0; }
/* Дашборд: KPI-плитки + секции */
.dash-sec { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-2); margin:22px 2px 10px; }
.dash-sec:first-of-type { margin-top:6px; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
/* Финансовые тайлы: гибкие, но с потолком ширины — не растягиваются в «один кубик на всю строку». */
.fin-kpi { display:flex; flex-wrap:wrap; gap:12px; }
.fin-kpi > .kpi { flex:1 1 160px; max-width:280px; }
.fin-grp { font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--ink-2); margin:0 0 8px; }
.kpi { background:#fff; border:1px solid var(--border); border-radius:14px; padding:15px 17px; }
.kpi__v { font-size:26px; font-weight:800; color:var(--ink); line-height:1.05; }
.kpi__l { font-size:13px; color:var(--ink); margin-top:5px; font-weight:600; }
.kpi__sub { font-size:12.5px; color:var(--ink-2); margin-top:3px; line-height:1.4; }
.kpi--warn { border-color:#f0c78a; background:#fff8ee; }
.kpi--warn .kpi__v { color:#d56f00; }
.section h2 { font-size:clamp(24px,3.4vw,32px); letter-spacing:-.02em; margin:0 0 8px; }
.section .sub { color:var(--ink-2); margin:0 0 28px; font-size:16px; }

/* Карточки агентов / сетка */
.grid { display:grid; gap:20px; grid-template-columns:1fr; }
@media (min-width:680px){ .grid { grid-template-columns:repeat(2,1fr); } }
@media (min-width:1000px){ .grid { grid-template-columns:repeat(3,1fr); } }
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm); transition:.2s; display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
/* Ряд-карточка: горизонтальная раскладка (иначе .card диктует flex-direction:column) */
.card--row { flex-direction:row; align-items:center; justify-content:space-between; gap:12px; }
/* Карточки-ссылки в каталоге/сетках приподнимаются; карточки-формы — нет */
.grid .card:hover, .features .card:hover, .card--hover:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.card-top { display:flex; align-items:center; gap:14px; }
.avatar { width:54px; height:54px; border-radius:16px; flex:0 0 auto; display:grid; place-items:center; color:#fff; font-weight:800; font-size:22px; overflow:hidden; background:linear-gradient(135deg,var(--accent),var(--accent-2)); }
.avatar img,.avatar svg { width:100%; height:100%; object-fit:cover; }
.card h3 { margin:0; font-size:19px; }
.company { font-size:13.5px; color:var(--ink-2); font-weight:500; line-height:1.45; }
.card p { color:var(--ink-2); font-size:14.5px; margin:0; flex:1; line-height:1.5; }
.tags { display:flex; gap:6px; flex-wrap:wrap; } .tag { font-size:12px; font-weight:600; color:var(--ink-2); background:#eef1fb; border-radius:999px; padding:4px 10px; }

/* Клик по аватарке вызывает выбор файла */
.avatar--btn { cursor:pointer; }
.avatar--btn:hover { filter:brightness(1.05); }

/* Профиль клиента */
.prof-hero__top { display:flex; align-items:center; gap:16px; }
.prof-hero__av { width:64px; height:64px; font-size:26px; border-radius:18px; }
.prof-hero__id { flex:1; min-width:0; }
.prof-hero__name { font-size:19px; font-weight:800; color:var(--ink); line-height:1.2; }
.prof-badge { display:inline-flex; align-items:center; gap:5px; margin-top:7px; font-size:12px; font-weight:600; color:#1d7a3a; background:#e7f6ec; border:1px solid #bfe6cb; border-radius:999px; padding:3px 10px; }
.prof-hero__upload { flex:0 0 auto; margin:0; cursor:pointer; }
.prof-progress { display:flex; align-items:center; gap:12px; margin-top:18px; }
.prof-progress__bar { flex:1; height:8px; background:#eef1fb; border-radius:999px; overflow:hidden; }
.prof-progress__bar > div { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); border-radius:999px; transition:width .35s ease; }
.prof-progress__pct { font-size:13px; font-weight:700; color:var(--accent); white-space:nowrap; }
.prof-sect { font-size:12px; font-weight:700; color:var(--ink-2); text-transform:uppercase; letter-spacing:.04em; margin-bottom:12px; }
.prof-ro { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.prof-ro__item { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 14px; background:#f7f9ff; }
.prof-ro__item + .prof-ro__item { border-top:1px solid var(--border); }
.prof-ro__label { font-size:13px; color:var(--ink-2); }
.prof-ro__val { font-weight:600; color:var(--ink); }
.prof-hint { font-size:12px; color:var(--ink-2); margin:10px 0 0; }
.prof-logout { margin-top:2px; }

/* Поле тем: чипсы + автодополнение */
.chips-box { display:flex; flex-wrap:wrap; gap:6px; align-items:center; border:1px solid var(--border); border-radius:12px; padding:8px; min-height:46px; background:#fff; }
.chips-box:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px rgba(47,107,255,.15); }
.chip-tag { display:inline-flex; align-items:center; gap:6px; background:#e8efff; color:var(--blue-700); border-radius:999px; padding:4px 6px 4px 11px; font-size:13px; font-weight:600; }
.chip-tag button { border:none; background:none; cursor:pointer; color:var(--blue-700); font-size:16px; line-height:1; padding:0 2px; }
.chips-input { border:none; outline:none; flex:1; min-width:140px; font-family:inherit; font-size:14px; padding:4px; background:transparent; }
.chips-drop { border:1px solid var(--border); border-radius:12px; margin-top:4px; background:#fff; box-shadow:var(--shadow-sm); max-height:220px; overflow-y:auto; }
.chips-drop button { display:block; width:100%; text-align:left; border:none; background:none; padding:9px 12px; cursor:pointer; font-family:inherit; font-size:14px; color:var(--ink); }
.chips-drop button:hover { background:#f4f6fc; }
.chips-drop .chips-new { color:var(--accent); font-weight:700; }
.empty { text-align:center; color:var(--ink-2); padding:50px 0; }
.partner-cta { background:linear-gradient(135deg,#0b1f5e,#14306f); color:#fff; border-radius:26px; padding:52px; display:grid; gap:18px; text-align:center; box-shadow:var(--shadow); }
.partner-cta p { opacity:.88; max-width:640px; margin:0 auto; }

/* Формы / списки */
.inp { width:100%; font-family:inherit; font-size:15px; padding:12px 14px; margin:0 0 14px; border:1px solid var(--border); border-radius:12px; background:#fff; color:var(--ink); transition:border-color .15s, box-shadow .15s; }
.inp::placeholder { color:var(--faint); }
.inp:focus { outline:none; border-color:var(--accent); box-shadow:var(--ring); }
.inp--err { border-color:#e0483d; }
.inp--err:focus { border-color:#e0483d; box-shadow:0 0 0 3px rgba(224,72,61,.18); }
.field-err { color:#e0483d; font-size:13px; font-weight:600; margin:-8px 0 12px; }
.form-msg { font-size:13.5px; font-weight:600; margin-top:10px; }
.form-msg--err { color:var(--danger); }
.form-msg--ok { color:#1d7a3a; }
.card label:not(.chk):not(.btn) { display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin:2px 0 7px; }
.entry { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--border); }
.entry:last-child { border-bottom:none; }
.ltable { width:100%; border-collapse:collapse; font-size:13px; }
.ltable th { text-align:left; font-weight:600; color:var(--ink-2); padding:6px 10px; border-bottom:1px solid var(--border); white-space:nowrap; }
.ltable td { padding:8px 10px; border-bottom:1px solid var(--border); vertical-align:top; }
.ltable tr:last-child td { border-bottom:none; }
.tabset { display:flex; gap:8px; flex-wrap:wrap; }
/* Подзаголовок секции внутри карточки (партнёр: монетизация / верификация / реквизиты) */
.psect { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-2); margin:18px 0 8px; }
.psect:first-child { margin-top:2px; }
.cab-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:20px; }

/* Чат-воркспейс */
.chatws { display:grid; grid-template-columns:1fr; gap:16px; }
@media (min-width:860px){ .chatws { grid-template-columns:300px 1fr; } }
/* Колонки воркспейса одной высоты (grid stretch): список тянется до высоты области чата. */
.chatws { align-items:stretch; }
.chatws__list { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; display:flex; flex-direction:column; gap:10px; }
.chatws__new { width:100%; justify-content:center; }
.chatws__empty { color:var(--ink-2); font-size:14px; text-align:center; padding:24px 8px; line-height:1.5; }
.chatws__area { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); min-height:560px; display:flex; flex-direction:column; overflow:hidden; }

.chatws__scroll { display:flex; flex-direction:column; gap:10px; }

/* Чат-воркспейс по высоте экрана (десктоп): внутренний скролл, страница не прокручивается */
@media (min-width:860px){
  .chats-screen { padding-top:18px; padding-bottom:18px; }
  /* Высота виджета задаётся из JS (от верха области до низа окна). Контейнеры — по контенту,
     сайдбар растягивается до высоты области чата за счёт grid align-items:stretch. */
  .chats-screen .chatws__list { overflow:hidden; }
  .chats-screen .chatws__scroll { flex:1; overflow-y:auto; min-height:0; }
  .chats-screen .chat-body { min-height:0; overflow:hidden; }
}
/* Собственный чат-UI (модель B) */
.chat-body { display:flex; flex-direction:column; min-height:420px; }
.chat-scroll { flex:1; min-height:0; overflow-y:auto; padding:18px; display:flex; flex-direction:column; gap:12px; }
.chat-empty { margin:auto; text-align:center; color:var(--ink-2); }
.msg { display:flex; flex-direction:column; max-width:78%; }
.msg--user { align-self:flex-end; align-items:flex-end; }
.msg--agent { align-self:flex-start; align-items:flex-start; }
.msg__bubble { padding:10px 14px; border-radius:16px; font-size:15px; line-height:1.5; word-wrap:break-word; }
.msg--user .msg__bubble { background:var(--accent); color:#fff; border-bottom-right-radius:5px; }
.msg--agent .msg__bubble { background:#f1f4fb; color:var(--ink); border-bottom-left-radius:5px; }
.msg__time { font-size:11px; color:var(--faint); margin-top:3px; padding:0 5px; }
.msg__wait { max-width:min(520px,82%); margin-top:6px; padding:9px 12px; font-size:12.5px; line-height:1.45;
  color:#5a4a1f; background:#fff8e6; border:1px solid #f2e2b3; border-radius:12px; }
.lbadge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap; }
.msg__bubble--error { background:#ffe9e9; color:#b42318; border:1px solid #f3c0c0; font-weight:500; }
.msg__bubble--typing { display:inline-flex; gap:4px; }
.msg__bubble--typing span { width:7px; height:7px; border-radius:50%; background:var(--ink-2); opacity:.5; animation:chatdot 1s infinite; }
.msg__bubble--typing span:nth-child(2){ animation-delay:.2s } .msg__bubble--typing span:nth-child(3){ animation-delay:.4s }
@keyframes chatdot { 0%,60%,100%{ transform:translateY(0); opacity:.4 } 30%{ transform:translateY(-4px); opacity:.9 } }
.chat-actions__q { font-size:13px; color:var(--ink-2); margin:8px 0 4px; }
.chat-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.chat-action { padding:8px 14px; border-radius:999px; border:1px solid var(--accent); background:#fff; color:var(--accent); font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.chat-action:hover { background:#eef3ff; }
.chat-action--primary { background:var(--accent); color:#fff; }
.chat-action--danger { border-color:#e0584f; color:#c0392b; }
.chat-action--agent { border-color:var(--accent); background:#eef3ff; color:var(--accent); font-weight:600; }
.chat-action[disabled] { opacity:.5; cursor:default; }
/* Карточки выбора агента (меню оркестратора) */
.agent-picks { display:flex; flex-direction:column; gap:8px; margin-top:8px; max-width:440px; }
.agent-pick { display:flex; gap:12px; align-items:flex-start; text-align:left; padding:12px; border:1px solid var(--border); border-radius:14px; background:#fff; cursor:pointer; transition:.15s; font:inherit; width:100%; }
.agent-pick:hover { border-color:var(--accent); box-shadow:var(--shadow-sm); }
.agent-pick__av { width:44px; height:44px; flex:0 0 auto; font-size:18px; border-radius:12px; }
.agent-pick__body { display:flex; flex-direction:column; gap:2px; min-width:0; }
.agent-pick__name { font-weight:700; color:var(--ink); }
.agent-pick__meta { font-size:12px; color:var(--ink-2); }
.agent-pick__desc { font-size:13px; color:var(--ink-2); line-height:1.4; }
.agent-pick--plain { display:inline-flex; width:auto; padding:8px 14px; border-radius:999px; border:1px solid var(--accent); color:var(--accent); background:#fff; font-weight:600; }
.msg-system { align-self:center; text-align:center; font-size:13px; color:var(--ink-2); background:#eef2fb; border-radius:999px; padding:6px 14px; margin:6px auto; max-width:85%; }
.pay-card { margin-top:8px; padding:12px 14px; border:1px solid #d6e4ff; background:#f0f5ff; border-radius:12px; }
.pay-card__sum { font-weight:700; color:var(--blue-900,#1b3a8f); }
.pay-card--ok { background:#e7f6ec; border-color:#bfe6cb; color:#1d7a3a; }
.pay-card--no { background:#f3f3f4; border-color:#e0e0e3; color:var(--ink-2); }
.seg { display:flex; gap:6px; background:#eef1fb; border-radius:12px; padding:4px; margin:4px 0 0; }
.seg__btn { flex:1; border:none; background:none; padding:9px; border-radius:9px; font:inherit; font-size:14px; font-weight:600; color:var(--ink-2); cursor:pointer; }
.seg__btn--on { background:#fff; color:var(--accent); box-shadow:var(--shadow-sm); }
.qr-box { background:#fff; border:1px solid var(--border); border-radius:16px; padding:14px; }
.chat-compose { flex:0 0 auto; display:flex; gap:8px; align-items:flex-end; padding:12px; border-top:1px solid var(--border); background:var(--surface); }
.chat-input { flex:1; resize:none; border:1px solid var(--border); border-radius:14px; padding:11px 14px; font:inherit; font-size:15px; line-height:1.4; max-height:140px; outline:none; }
.chat-input:focus { border-color:var(--accent); }
.chat-attach { flex:0 0 auto; width:44px; height:44px; border-radius:50%; display:grid; place-items:center; cursor:pointer; color:var(--ink-2); font-size:20px; transition:.15s; }
.chat-attach:hover { background:#eef2fb; color:var(--accent); }
.chat-chips { display:flex; flex-wrap:wrap; gap:8px; padding:10px 12px 0; }
.chat-chip { display:inline-flex; align-items:center; gap:8px; background:#eef3ff; border:1px solid #d6e1fb; border-radius:10px; padding:6px 8px 6px 10px; font-size:13px; color:var(--blue-800); max-width:260px; }
.chat-chip__name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600; }
.chat-chip__sz { color:var(--ink-2); font-size:12px; flex:0 0 auto; }
.chat-chip__x { border:none; background:none; cursor:pointer; color:var(--ink-2); font-size:15px; line-height:1; padding:0 2px; flex:0 0 auto; }
.chat-chip__x:hover { color:var(--danger); }
.chat-send { flex:0 0 auto; width:44px; height:44px; border-radius:50%; border:none; background:var(--accent); color:#fff; font-size:17px; cursor:pointer; }
.chat-send:hover { filter:brightness(1.05); }
.chat-pay-bar { flex:0 0 auto; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-top:1px solid var(--border); background:#f0f5ff; }
.chat-pay-bar__info { font-size:15px; color:var(--ink); }
.chat-pay-bar__btns { display:flex; gap:8px; }
.paydoc { background:#f6f8fc; border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.paydoc > summary { cursor:pointer; font-weight:600; }
.paydoc__body { margin-top:10px; font-size:14px; line-height:1.55; }
.paydoc__body p { margin:8px 0; }
.doc-code { background:#0f1b33; color:#cfe0ff; padding:9px 12px; border-radius:8px; font-family:'SF Mono',Consolas,monospace; font-size:13px; overflow-x:auto; white-space:pre-wrap; margin:6px 0; }
/* Замок высоты чата на десктопе: страница не скроллится, скролл только внутри ленты.
   height (а не только min-height:100vh с body) обязателен: даёт ОПРЕДЕЛЁННУЮ высоту, иначе
   flex:1/min-height:0 не к чему прижиматься — лента разрастается и композер/панель оплаты
   уезжают под нижнюю кромку без возможности доскроллить. */
@media (min-width:860px){
  body.on-chats { overflow:hidden; height:100vh; }
  body.on-chats #view { display:flex; flex-direction:column; }
  /* width:100% обязателен: в flex-колонке margin:0 auto отменяет stretch и секция
     схлопывается до ширины контента (узкий чат). Явная ширина возвращает max-width. */
  body.on-chats .chats-screen { flex:1; min-height:0; display:flex; flex-direction:column; width:100%; }
  body.on-chats .chats-screen .chatws { flex:1; min-height:0; grid-template-rows:minmax(0,1fr); }
  body.on-chats .chatws__area { min-height:0; }
  body.on-chats .chat-body { flex:1; min-height:0; height:auto; overflow:hidden; }
}
/* Кнопки сумм в модалке пополнения */
.amt-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.amt-btn { padding:14px; border:1.5px solid var(--border); border-radius:14px; background:#fff; font:inherit; font-size:16px; font-weight:700; color:var(--ink); cursor:pointer; }
.amt-btn:hover { border-color:var(--accent); }
.amt-btn--on { border-color:var(--accent); background:#eef3ff; color:var(--accent); }
.chk { display:flex; align-items:flex-start; gap:8px; margin:12px 0 0; font-size:14px; line-height:1.45; color:var(--ink); cursor:pointer; }
.chk input { margin-top:3px; flex:0 0 auto; }
.acct { font-size:13px; color:var(--ink-2); padding:6px 8px; white-space:nowrap; }
.chatws__placeholder { margin:auto; color:var(--ink-2); padding:40px; text-align:center; }
.chatitem { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:#fff; border:1px solid var(--border); border-radius:14px; padding:10px; cursor:pointer; font-family:inherit; }
.chatitem:hover { background:#f7f9ff; } .chatitem--on { border-color:var(--accent); background:#e8efff; }
.chatitem__av,.chat-head2__av { width:40px; height:40px; border-radius:12px; flex:0 0 auto; display:grid; place-items:center; color:#fff; font-weight:800; font-size:18px; overflow:hidden; background:linear-gradient(135deg,var(--accent),var(--accent-2)); }
.chatitem__av img,.chat-head2__av img { width:100%; height:100%; object-fit:cover; }
.chatitem__txt { display:flex; flex-direction:column; min-width:0; }
.chatitem__txt b { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chatitem__txt small { color:var(--ink-2); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-head2 { display:flex; align-items:center; gap:12px; padding:14px 16px; color:#fff; background:linear-gradient(135deg,var(--blue-800),var(--blue-700)); }
.chat-head2__name { font-weight:700; } .chat-head2__company { font-size:12px; opacity:.85; }
.chat-body { flex:1; min-height:520px; background:#f7f9ff; overflow:auto; }
.chat-fallback { padding:20px; color:var(--ink-2); font-size:14px; line-height:1.5; }
.picker { padding:20px; } .picker h3 { margin:0 0 14px; }
.picker__grid { display:grid; grid-template-columns:1fr; gap:10px; }
@media (min-width:560px){ .picker__grid { grid-template-columns:1fr 1fr; } }
.picker__item { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--border); border-radius:14px; padding:12px; cursor:pointer; text-align:left; font-family:inherit; }
.picker__item:hover { border-color:var(--accent); background:#f7f9ff; }

/* Плашка агента над чатом + действия */
.chat-head2 { justify-content:space-between; }
.plashka { display:flex; align-items:center; gap:12px; background:none; border:none; cursor:pointer; color:#fff; text-align:left; font-family:inherit; padding:0; min-width:0; }
.plashka__meta { display:flex; flex-direction:column; min-width:0; }
.chat-head2__actions { display:flex; gap:8px; }
.iconbtn { width:34px; height:34px; border-radius:10px; border:none; background:#ffffff22; color:#fff; cursor:pointer; font-size:17px; line-height:1; display:grid; place-items:center; }
.iconbtn:hover { background:#ffffff38; }
.stars { color:var(--rating); }

/* Выпадающее меню ⋮ */
.dropdown { position:absolute; z-index:90; background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); padding:6px; min-width:200px; display:flex; flex-direction:column; }
.dropdown button { background:none; border:none; text-align:left; padding:10px 12px; border-radius:10px; cursor:pointer; font-family:inherit; font-size:14px; color:var(--ink); }
.dropdown button:hover { background:#f4f6fc; }
.dropdown button.danger { color:var(--danger); }

/* Модалки */
.modal-back { position:fixed; inset:0; z-index:100; background:rgba(8,16,40,.5); backdrop-filter:blur(3px); display:grid; place-items:center; padding:20px; }
.modal { background:#fff; border-radius:18px; padding:24px; width:min(440px,100%); box-shadow:var(--shadow); }
.modal h3 { margin:0 0 10px; font-size:19px; }
.modal__text { color:var(--ink-2); line-height:1.55; font-size:14.5px; margin:0; }
.modal label:not(.chk):not(.btn):not(.chat-attach) { display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin:2px 0 7px; }
/* Ряд кнопок/элементов (используется в модалках). Был не определён — кнопки не выравнивались. */
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.row--end { justify-content:flex-end; }
.modal .row { margin-top:20px; }
.rate-stars { font-size:34px; margin:8px 0 14px; }
.rstar { cursor:pointer; color:#d7defa; } .rstar.on { color:var(--rating); }

/* Карточка агента (в области чата) */
.agent-card { display:flex; flex-direction:column; height:100%; }
.agent-card__head { display:flex; align-items:center; gap:14px; padding:18px 20px; background:linear-gradient(135deg,var(--blue-800),var(--blue-700)); color:#fff; }
.agent-card__head .chat-head2__av { width:52px; height:52px; font-size:22px; box-shadow:0 6px 16px rgba(0,0,0,.25); }
.agent-card__title { min-width:0; }
.agent-card__name { font-weight:800; font-size:20px; color:#fff; line-height:1.15; }       /* белый, как в чате */
.agent-card__sub { font-size:13px; color:rgba(255,255,255,.85); margin-top:3px; }
.agent-card__body { padding:22px; overflow:auto; }
.agent-card__body h4 { margin:20px 0 8px; font-size:15px; color:var(--ink); }
.agent-card__body h4:first-child { margin-top:0; }
.agent-card__lead { font-size:16px; font-weight:600; color:var(--ink); margin:0 0 6px; line-height:1.5; }
.agent-card__contact { margin:10px 0 0; font-size:14px; color:var(--ink-2); }
.agent-card__contact a { font-weight:600; }
.agent-card__body p { color:var(--ink-2); line-height:1.6; margin:0; }
.tag--accent { background:#e8efff; color:var(--blue-700); }
.review { padding:12px 0; border-bottom:1px solid var(--border); display:flex; flex-direction:column; gap:4px; }
.review:last-child { border-bottom:none; }
.review__reply { margin-top:4px; padding:8px 11px; background:#f0f4ff; border-radius:9px; font-size:13.5px; line-height:1.45; color:var(--ink); }

/* Лендинг: блоки-преимущества, шаги, направления, CTA-полоса */
.section--alt { background:linear-gradient(180deg, rgba(47,107,255,.05), transparent 70%); border-radius:28px; }
.features { display:grid; gap:18px; grid-template-columns:1fr; }
@media (min-width:680px){ .features { grid-template-columns:repeat(2,1fr); } }
@media (min-width:1000px){ .features { grid-template-columns:repeat(4,1fr); } }
.feature { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px; box-shadow:var(--shadow-sm); transition:.2s; }
.feature:hover { transform:translateY(-4px); box-shadow:var(--shadow); }
.feature__ic { font-size:30px; margin-bottom:10px; }
.feature h3 { margin:0 0 8px; font-size:18px; }
.feature p { margin:0; color:var(--ink-2); font-size:14.5px; line-height:1.55; }

.steps { display:grid; gap:14px; grid-template-columns:1fr; max-width:760px; margin:0 auto; }
.step { display:flex; gap:16px; align-items:flex-start; background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:18px 20px; box-shadow:var(--shadow-sm); }
.step__n { flex:0 0 auto; width:40px; height:40px; border-radius:12px; display:grid; place-items:center; font-weight:800; font-size:18px; color:#fff; background:linear-gradient(135deg,var(--accent),var(--blue-700)); }
.step h4 { margin:0 0 4px; font-size:17px; }
.step p { margin:0; color:var(--ink-2); font-size:14.5px; line-height:1.5; }

.usecases { display:grid; gap:18px; grid-template-columns:1fr; }
@media (min-width:680px){ .usecases { grid-template-columns:1fr 1fr; } }
.usecase { background:var(--surface); border:1px solid var(--border); border-radius:18px; padding:24px 26px; box-shadow:var(--shadow-sm); }
.usecase h4 { margin:0 0 12px; font-size:19px; }
.usecase ul { margin:0; padding-left:18px; color:var(--ink-2); line-height:1.95; font-size:15px; }

.cta-band { background:linear-gradient(135deg,var(--blue-900),var(--blue-700)); color:#fff; border-radius:26px; padding:clamp(32px,5vw,52px); text-align:center; box-shadow:var(--shadow); }
.cta-band h2 { margin:0 0 10px; color:#fff; }
.cta-band p { opacity:.9; max-width:640px; margin:0 auto 22px; font-size:17px; }

/* Подвал лендинга */
.footer { background:var(--blue-900); color:#fff; text-align:left; padding:52px 24px 28px; }
.foot { max-width:1140px; margin:0 auto; display:grid; gap:30px; grid-template-columns:1fr; }
@media (min-width:760px){ .foot { grid-template-columns:2fr 1fr 1.5fr 1.1fr; } }
.foot__brand .brand { color:#fff; font-size:22px; }
.foot__brand p { color:rgba(255,255,255,.7); font-size:14px; line-height:1.55; margin:10px 0 0; max-width:320px; }
.foot__col h5 { margin:0 0 12px; font-size:13px; color:#fff; text-transform:uppercase; letter-spacing:.04em; opacity:.8; }
.foot__col a { display:block; color:rgba(255,255,255,.78); font-size:14px; padding:4px 0; }
.foot__col a:hover { color:#fff; }
.foot__muted { display:block; color:rgba(255,255,255,.5); font-size:13px; margin-top:10px; }
.foot__bottom { max-width:1140px; margin:28px auto 0; padding-top:18px; border-top:1px solid rgba(255,255,255,.14); color:rgba(255,255,255,.6); font-size:13px; }

/* Правовые страницы */
.legal { max-width:820px; }
.legal__back { display:inline-block; margin-bottom:14px; font-weight:600; }
.legal h1 { font-size:clamp(26px,4vw,36px); margin:0 0 16px; letter-spacing:-.02em; }
.legal h3 { margin:22px 0 8px; font-size:18px; color:var(--ink); }
.legal > p { color:var(--ink-2); line-height:1.7; margin:0 0 8px; }
.legal__note { margin-top:26px; padding-top:16px; border-top:1px solid var(--border); font-size:14px; color:var(--ink-2); }
/* Тосты — только для кратких подтверждений действий, снизу по центру (ошибки форм — инлайн у поля). */
.toast-wrap { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); z-index:80; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none; }
.toast { background:var(--ink); color:#fff; padding:11px 18px; border-radius:12px; font-size:14px; box-shadow:var(--shadow); max-width:min(92vw,460px); text-align:center; }

/* Уведомления: колокол с бейджем + центр уведомлений */
.bell { position:relative; }
.bell__badge { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 5px; border-radius:999px;
  background:#e0483d; color:#fff; font-size:11px; font-weight:700; line-height:18px; text-align:center; box-shadow:0 0 0 2px #fff; }
.notif { display:flex; align-items:flex-start; gap:12px; width:100%; text-align:left; border:none; background:none;
  padding:14px 12px; border-radius:12px; cursor:pointer; font-family:inherit; border-bottom:1px solid var(--border); }
.notif:last-child { border-bottom:none; }
.notif:hover { background:#f4f6fc; }
.notif--unread { background:#f0f5ff; }
.notif--unread:hover { background:#e8f0ff; }
.notif__ic { font-size:20px; line-height:1.2; flex:0 0 auto; }
.notif__main { display:flex; flex-direction:column; gap:3px; flex:1; min-width:0; }
.notif__title { font-weight:700; color:var(--ink); font-size:15px; }
.notif--unread .notif__title { color:var(--blue-800); }
.notif__text { font-size:13px; color:var(--ink-2); line-height:1.45; }
.notif__time { font-size:12px; color:var(--faint,#8a97ad); margin-top:2px; }
.notif__dot { flex:0 0 auto; width:9px; height:9px; border-radius:50%; background:var(--accent); margin-top:6px; }
