/* Кабинет TimeSaverBot — по мокапам mockup/cabinet-mobile.html и cabinet-desktop.html (D-0007).
   Цвета как на timesaverbot.com: оранжевый — одно главное действие экрана (и логотип); синий — выбор, ссылки, подписи;
   белые карточки с тонкой рамкой; тёмно-синие заголовки, серый текст. Свойства — логические (inline/block): иврит справа налево. */
:root {
  --ground: #FFF9F5; --ground2: #FFE7D6; --screen: #F8FAFC; --surface: #FFFFFF; --sunk: #F1F5F9;
  --ink: #0F172A; --body: #475569; --mute: #64748B; --faint: #94A3B8;
  --line: #E2E8F0; --line-soft: #EEF2F6;
  --accent: #3B82F6; --accent-ink: #1D4ED8; --accent-soft: #EFF6FF;
  --go: #F97316; --go-ink: #C2410C; --go-soft: #FFF7ED; --on-go: #FFFFFF;
  --found: #10B981; --found-ink: #047857; --found-soft: #ECFDF5; --found-line: #A7F3D0;
  --warn: #B45309; --warn-soft: #FFFBEB; --warn-line: #FCD34D; --warn-edge: #F59E0B; --warn-chip: #FEF3C7;
  --bad: #DC2626; --bad-soft: #FEF2F2; --bad-line: #FECACA;
  --side: #0F172A; --side-ink: #CBD5E1; --side-on: #FFFFFF; --side-hover: #1E293B;
  --wa: #16A34A;
  --scrim: rgba(15, 23, 42, .38);
  --shadow: 0 24px 60px rgba(15, 23, 42, .14);
  --f-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-logo: 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B1220; --ground2: #111a2e; --screen: #0F172A; --surface: #1E293B; --sunk: #162032;
    --ink: #F1F5F9; --body: #CBD5E1; --mute: #94A3B8; --faint: #64748B;
    --line: #334155; --line-soft: #243044;
    --accent: #60A5FA; --accent-ink: #93C5FD; --accent-soft: #172554;
    --go-ink: #FDBA74; --go-soft: #2A1A10;
    --found: #34D399; --found-ink: #6EE7B7; --found-soft: #0E2A22; --found-line: #1F5140;
    --warn: #FBBF24; --warn-soft: #2B2110; --warn-line: #78591A; --warn-edge: #D97706; --warn-chip: #3D2E12;
    --bad: #F87171; --bad-soft: #2A1215; --bad-line: #7F1D1D;
    --side: #020617; --side-hover: #0F172A;
    --scrim: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden], [x-cloak] { display: none !important; }
/* the cabinet stays hidden until the session is confirmed: a guest is sent away without seeing it (D-0032) */
html:not([data-auth="ok"]) .app { visibility: hidden; }
/* a page is shown only once it is known the visitor stays on it (app.js leave(): redirects are invisible) */
html:not([data-ready="ok"]) body[data-gate] { visibility: hidden; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--screen); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-size: 22px; line-height: 1.3; margin: 0; }
h2 { font-size: 17px; line-height: 1.35; margin: 0; }
p { margin: 0; }
.muted, .hint { color: var(--mute); font-size: 13.5px; }

/* ---------- логотип ---------- */
.logo { display: flex; align-items: center; gap: 7px; text-decoration: none; min-width: 0; }
.logo img { height: 30px; width: auto; }
.logo span { font-family: var(--f-logo); font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--go); }

/* ---------- раскладка кабинета: телефон ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.side { display: none; }
.appbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.appbar .ttl { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; }
.appbar .logo { flex: 1; }
.me-btn {
  width: 38px; height: 38px; border-radius: 99px; border: 1.5px solid var(--accent); background: var(--surface);
  color: var(--accent-ink); font-weight: 600; cursor: pointer; flex: 0 0 auto;
}
.main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); background: var(--surface); padding: 4px 6px max(10px, env(safe-area-inset-bottom));
}
.tabbar a {
  display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 500; color: var(--mute);
  text-decoration: none; padding: 8px 2px 4px; position: relative;
}
.tabbar a::before {
  content: ""; position: absolute; top: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: transparent;
}
.tabbar a[aria-current="page"] { color: var(--accent-ink); font-weight: 600; }
.tabbar a[aria-current="page"]::before { background: var(--accent); }
.ic { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.dot {
  position: absolute; top: 4px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 99px;
  background: var(--ink); color: var(--surface); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px;
  border: 2px solid var(--surface);
}

/* кнопка «Помощник» в шапке телефона: значок и короткая подпись */
.asst-btn {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px; border-radius: 99px; border: 1.5px solid var(--accent);
  background: var(--surface); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.asst-btn .ic { width: 16px; height: 16px; }
.asst-btn.on { background: var(--accent); color: #fff; }
/* узкий телефон: кнопка и кружок меньше, чтобы не наезжать на логотип */
@media (max-width: 420px) {
  .appbar { gap: 8px; padding-inline: 12px; }
  .asst-btn { height: 32px; padding: 0 9px; gap: 4px; font-size: 12px; }
  .asst-btn .ic { width: 14px; height: 14px; }
  .me-btn { width: 32px; height: 32px; font-size: 13px; }
}

/* шапка телефона: на всех страницах логотип, как на главной; какая страница — видно по нижнему меню */
@media (max-width: 899px) {
  .appbar .ttl { display: none; }
}

/* ---------- раскладка кабинета: компьютер (как cabinet-desktop): меню слева, шапка, содержимое по центру, помощник справа ---------- */
/* parts of a page only for the phone (.mob) or only for the computer (.desk) — over any display a component sets */
@media (max-width: 899px) { .desk { display: none !important; } }
@media (min-width: 900px) {
  .mob { display: none !important; }
  .app { flex-direction: row; }
  .side {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; width: 248px; flex: 0 0 248px;
    background: linear-gradient(180deg, #111827 0%, #0B1220 100%); color: #E2E8F0; transition: width .25s, flex-basis .25s;
  }
  .side .logo { padding: 16px 20px 18px; white-space: nowrap; overflow: hidden; }
  .side .logo span { color: var(--go); }
  .side nav { display: grid; gap: 3px; padding: 0 10px; align-content: start; }
  .side > nav { flex: 1; overflow-y: auto; }
  .side-bottom { padding: 10px; border-top: 1px solid rgba(148, 163, 184, .15); display: grid; gap: 3px; }
  .side-bottom nav { padding: 0; }
  .side a, .side .collapse {
    position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px;
    background: none; color: #E2E8F0; text-decoration: none; font: inherit; font-size: 14px; font-weight: 500; text-align: start;
    white-space: nowrap; cursor: pointer;
  }
  .side a:hover, .side .collapse:hover { background: rgba(148, 163, 184, .12); }
  .side a[aria-current="page"] { background: rgba(59, 130, 246, .18); color: #fff; }
  .side a[aria-current="page"]::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #60A5FA;
  }
  .side .collapse { color: #94A3B8; font-size: 13px; }
  .side .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .side .ic { width: 20px; height: 20px; }
  .side .cnt {
    min-width: 20px; height: 20px; border-radius: 99px; background: var(--go); color: #fff; font-size: 11px; font-weight: 700;
    display: grid; place-items: center; padding: 0 6px;
  }
  .side.mini { width: 64px; flex-basis: 64px; }
  .side.mini .logo span, .side.mini .lbl { display: none; }
  .side.mini .logo { padding-inline: 17px; }
  .side.mini .cnt { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 4px; }
  .side.mini .collapse svg { transform: scaleX(-1); }
  [dir="rtl"] .side .collapse svg { transform: scaleX(-1); }
  [dir="rtl"] .side.mini .collapse svg { transform: none; }
  .page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .appbar { height: 58px; padding: 0 20px; gap: 12px; }
  .appbar .logo { display: none; }
  .appbar .ttl { font-size: 19px; }
  .asst-btn {
    display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--accent);
    background: var(--surface); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  }
  .asst-btn .ic { width: 18px; height: 18px; }
  .asst-btn.on { background: var(--accent); color: #fff; }
  .plan-chip {
    display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); font-size: 12.5px; color: var(--body); text-decoration: none; white-space: nowrap;
  }
  .plan-chip b { color: var(--ink); font-weight: 600; }
  .plan-chip .bar { width: 70px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-inline-start: 4px; }
  .plan-chip .bar i { display: block; height: 100%; background: var(--accent); }
  .me-btn { width: 36px; height: 36px; border: 0; background: var(--accent); color: #fff; font-size: 13px; }
  main.main { max-width: none; margin: 0; padding: 20px 20px 40px; align-items: center; }
  main.main > * { width: 100%; max-width: 900px; }
  .tabbar { display: none; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .plan-chip, .asst-btn span { display: none; }
}

/* ---------- карточки, кнопки ---------- */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.card-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border-radius: 99px; font-weight: 600; font-size: 14px; padding: 8px 18px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn.main { border-color: var(--go); background: var(--go); color: var(--on-go); box-shadow: 0 4px 12px rgba(249, 115, 22, .25); }
.btn.sel { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.out { border-color: var(--accent); color: var(--accent-ink); }
.btn.red { border-color: var(--bad-line); color: var(--bad); }
.btn.wide { width: 100%; }
.linkish { background: none; border: 0; color: var(--accent-ink); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }

/* переключатель «Бот отвечает клиентам»: зелёный — работает, жёлтый — пауза или остановлен */
.switch { border-radius: 18px; padding: 15px 16px; display: grid; gap: 8px; border: 1.5px solid var(--found-line); background: var(--found-soft); }
.switch.off { border-color: var(--warn-line); background: var(--warn-soft); }
.sw-top { display: flex; align-items: center; gap: 12px; }
.sw-top div { flex: 1; min-width: 0; }
.sw-top b { display: block; font-size: 17px; line-height: 1.3; }
.sw-top span { display: block; font-size: 13px; color: var(--body); }
.tgl { flex: 0 0 auto; width: 60px; height: 34px; border-radius: 99px; border: none; background: var(--found); position: relative; cursor: pointer; }
.tgl::after {
  content: ""; position: absolute; top: 4px; inset-inline-start: 30px; width: 26px; height: 26px; border-radius: 99px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .2s;
}
.tgl[aria-pressed="false"] { background: var(--faint); }
.tgl[aria-pressed="false"]::after { inset-inline-start: 4px; }
.tgl:disabled { cursor: default; opacity: .6; }

/* пробный период и тариф */
.trial { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; font-size: 14px; }
.trial div { flex: 1; min-width: 0; }
.trial.urgent { border-color: var(--go); }
/* «Тариф» на главной: тариф или пробный в первой строке, цена и дата — во второй */
.plan-card b, .plan-card .hint { display: block; }
.plan-card b { font-weight: 600; }
.plan-card .hint { font-size: 13px; color: var(--body); }
.plan-card .btn { flex: none; width: auto; }
.plan-top { display: flex; align-items: flex-start; gap: 12px; }
.plan-top div { flex: 1; }
.plan-top b { display: block; font-size: 17px; }
.plan-price { font-size: 28px; font-weight: 700; line-height: 1; }
.plan-price small { display: block; font-size: 12px; font-weight: 500; color: var(--mute); text-align: end; }
.meter { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--go); border-radius: 99px; }

/* баннеры над содержимым */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--warn-line); background: var(--warn-soft); font-size: 14px; }
.banner div { flex: 1; min-width: 0; }
.banner.bad { border-color: var(--bad-line); background: var(--bad-soft); }
.banner .error { display: block; margin-top: 4px; }
/* phone: the text takes the whole width, the button goes under it at full width (owner, variant A) */
@media (max-width: 520px) {
  .banner:has(> .btn) { flex-direction: column; align-items: stretch; }
  .banner > .btn { width: 100%; justify-content: center; text-align: center; }
}

/* пустое состояние раздела */
.empty { text-align: center; padding: 28px 16px; color: var(--mute); display: grid; gap: 8px; justify-items: center; }
.empty .ic { width: 40px; height: 40px; color: var(--faint); }
.empty b { color: var(--ink); font-size: 16px; }

/* списки настроек (профиль) */
.list { padding: 0; gap: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.li:first-child { border-top: 0; }
.li > div { flex: 1; min-width: 0; }
.li span.sub { display: block; font-size: 13px; color: var(--mute); overflow-wrap: anywhere; }
.li.danger { color: var(--bad); }

/* формы */
.field { display: grid; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; color: var(--body); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input:has(+ .reveal) { grid-row: 2; grid-column: 1; padding-inline-end: 48px; }
.field .reveal {
  grid-row: 2; grid-column: 1; justify-self: end; align-self: center; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--mute); cursor: pointer;
}
/* a left-to-right value (e-mail, site, password) on a right-to-left page lines up with the other fields on the right; the eye
   stays on the left over the padding, not over the text */
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
[dir="rtl"] .field input[dir="ltr"]:has(+ .reveal) { padding-right: 12px; padding-left: 48px; }
.field .reveal:hover { color: var(--body); }
.field .reveal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.error { color: var(--bad); font-size: 14px; }
.ok { color: var(--found-ink); font-size: 14px; }

/* страницы входа и регистрации */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--ground) 0%, var(--ground2) 100%) fixed var(--ground); }
.auth-box { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.auth-box .logo { justify-content: center; }
.auth-box .logo img { height: 44px; }
.auth-box .logo span { font-size: 26px; }
.auth-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 22px 20px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.auth-card h1 { text-align: center; }
.auth-card .sub { text-align: center; color: var(--mute); font-size: 14px; }
.auth-links { text-align: center; font-size: 14px; color: var(--mute); display: grid; gap: 6px; }
.lang-pick { display: flex; justify-content: center; gap: 6px; }
.lang-pick a { font-size: 13px; color: var(--mute); text-decoration: none; padding: 4px 10px; border-radius: 99px; border: 1px solid transparent; }
.lang-pick a[aria-current="true"] { border-color: var(--line); color: var(--ink); background: var(--surface); }

/* меню «я» (шторка на телефоне, окно на компьютере) */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 21; background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 10px 16px max(18px, env(safe-area-inset-bottom)); display: grid; gap: 4px; max-height: 85vh; overflow: auto;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line); justify-self: center; margin-bottom: 6px; }
.sheet h3 { margin: 4px 0 8px; font-size: 16px; }
.menu-i {
  display: flex; flex-direction: column; align-items: flex-start; padding: 12px 6px; border: 0; border-top: 1px solid var(--line-soft);
  background: none; text-align: start; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500;
}
.menu-i small { color: var(--mute); font-size: 12.5px; font-weight: 400; }
@media (min-width: 900px) {
  .sheet { inset-inline: auto 24px; inset-block: 64px auto; bottom: auto; width: 320px; border-radius: 16px; box-shadow: var(--shadow); }
  .sheet .grab { display: none; }
}

/* всплывающее сообщение */
.toast {
  position: fixed; inset-inline: 0; bottom: 92px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); z-index: 30;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
}
@media (min-width: 900px) { .toast { bottom: 28px; } }

.offline { position: sticky; top: 0; z-index: 40; background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); color: var(--ink); text-align: center; font-size: 13.5px; padding: 6px 12px; }

/* страницы ошибок и простые страницы платформы (подтверждение, сброс пароля, безопасность) */
main.plain { max-width: 520px; margin: 40px auto; padding: 0 16px; display: grid; gap: 14px; }
pre.codes { background: var(--sunk); padding: 12px; border-radius: 12px; }
/* «Что знает бот» (мокап knows): группы с правкой на месте — текст как поле, рамка при наведении и фокусе */
.kgroup { overflow: hidden; padding: 0; gap: 0; }
.kgroup.kabout { overflow: visible; }
.cur-pick { position: relative; }
.cur-list {
  position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.cur-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.cur-list li:hover, .cur-list li.on { background: var(--sunk); }
.cur-list li.on { font-weight: 600; }
.cur-list .code { color: var(--mute); font-variant-numeric: tabular-nums; }
.cur-list li.none { color: var(--mute); cursor: default; }
.cur-list li.none:hover { background: none; }
.kh { display: flex; align-items: center; gap: 10px; padding: 13px 14px 11px; }
.kh h2 { flex: 1; margin: 0; font-size: 15.5px; font-weight: 700; }
.kh .cnt { font-size: 13px; color: #fff; font-weight: 700; min-width: 24px; height: 24px; }
/* «Команды из WhatsApp»: example of the «Написать себе» chat (cabinet-desktop) */
.self-b { display: grid; gap: 12px; padding: 0 14px 14px; }
.self-b > p { margin: 0; color: var(--body); }
.wamock { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); width: 100%; max-width: 360px; justify-self: center; }
.wa-h { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #075E54; color: #fff; font-size: 13px; }
.wa-h span:not(.me) { display: block; font-size: 12px; opacity: .85; }
.wa-h .me { width: 30px; height: 30px; flex: none; border-radius: 99px; background: #fff; color: #075E54; display: grid; place-items: center; font-weight: 700; }
.wa-b { background: #ECE5DD; padding: 10px; display: grid; gap: 6px; }
.wm { justify-self: end; max-width: 88%; background: #DCF8C6; color: #111B21; border-radius: 10px 10px 2px 10px; padding: 6px 10px; font-size: 12.5px; line-height: 1.45; }
.wm.bot { border-inline-start: 3px solid var(--go); }
.wm .by { display: block; font-size: 10.5px; font-weight: 700; color: var(--go-ink); }
.f-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: start; padding: 7px 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.f-row label { color: var(--mute); padding-top: 7px; }
.ed {
  width: 100%; min-width: 0; border: 1.5px solid transparent; border-radius: 10px; background: transparent; padding: 6px 8px;
  font-size: 13.5px; line-height: 1.45; resize: none; color: var(--ink); field-sizing: content; min-height: 34px;
}
.ed:hover { border-color: var(--line); }
.ed:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.ed.b { font-weight: 600; }
.svc { display: grid; grid-template-columns: 1fr 110px 30px; gap: 6px; align-items: center; padding: 5px 8px 5px 6px; border-top: 1px solid var(--line-soft); }
.svc .ed.p { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
.x { width: 30px; height: 30px; border-radius: 99px; border: none; background: none; color: var(--faint); font-size: 15px; cursor: pointer; }
.x:hover { background: var(--sunk); color: var(--body); }
.qa { display: grid; grid-template-columns: 1fr 30px; gap: 0 6px; padding: 6px 8px 6px 6px; border-top: 1px solid var(--line-soft); }
.qa .ed.a { color: var(--body); padding-top: 0; }
.qa .x { grid-row: 1 / 3; grid-column: 2; }
/* an empty field reads as a field: dashed frame and a hint (a new question has no answer yet) */
.qa .ed:placeholder-shown { border: 1.5px dashed var(--faint); background: var(--sunk); }
.qa .ed.a:placeholder-shown { margin-top: 6px; padding-top: 6px; }
.qa .ed::placeholder { color: var(--mute); font-weight: 400; }
.unans { border-color: var(--accent); }
.ua { padding: 12px 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.ua q { font-weight: 600; font-size: 14px; }
.ua small { color: var(--mute); font-size: 12px; }
.ua-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ua-row input { flex: 1 1 100%; min-width: 0; min-height: 44px; box-sizing: border-box; font-size: 14px; border: 1.5px solid var(--line); border-radius: 99px; padding: 8px 14px; background: var(--surface); }
.ua-row input:focus { border-color: var(--accent); outline: none; }
.ua-row .btn { flex: 1 1 0; width: auto; min-width: 0; } /* answer on its own line, Save and Remove side by side under it */
.adder { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line-soft); }
.add { min-height: 42px; border: 1.5px dashed var(--accent); background: var(--surface); color: var(--accent-ink); border-radius: 99px; font-size: 13.5px; font-weight: 600; padding: 0 16px; cursor: pointer; }
.nudge { display: flex; gap: 10px; align-items: center; padding: 12px 14px; font-size: 13.5px; text-decoration: none; color: var(--ink); border-color: var(--accent); }
.nudge div { flex: 1; }
.nudge b { display: block; }
.nudge .arr { color: var(--accent); font-weight: 700; font-size: 20px; }
@media (max-width: 520px) {
  .f-row { grid-template-columns: 1fr; gap: 0; }
  .f-row label { padding-top: 2px; }
  .svc { grid-template-columns: 1fr 88px 30px; }
}
/* проверочный чат (D-0015): реплики клиента — справа, бота — слева */
.chat { padding: 0; gap: 0; overflow: hidden; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 14px; min-height: 280px; max-height: 60vh; overflow-y: auto; background: var(--sunk); }
.msg { max-width: 82%; align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; display: grid; gap: 2px; font-size: 14px; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg .by { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .err { font-size: 12px; color: var(--bad); }
.typing { flex-direction: row; display: flex; gap: 4px; padding: 12px; }
.typing i { width: 7px; height: 7px; border-radius: 99px; background: var(--faint); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; } }
.compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface); }
.compose input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 99px; padding: 10px 16px; background: var(--surface); }
.compose input:focus { border-color: var(--accent); outline: none; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* lead card: WhatsApp and Call share the row equally, Close is a round ✕ at the end; labels never wrap,
   icons drop on very narrow phones so the row fits from 320 px up */
.lead-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; }
.lead-acts .btn { min-width: 0; min-height: 44px; padding: 8px 10px; white-space: nowrap; }
.lead-acts .btn span { overflow: hidden; text-overflow: ellipsis; }
.lead-acts .btn .ic { width: 18px; height: 18px; }
.lead-acts .btn.shut { width: 44px; padding: 0; }
@media (max-width: 359px) { .lead-acts .btn:not(.shut) .ic { display: none; } }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 99px; background: var(--sunk); justify-self: start; }
.seg button { border: 0; background: none; border-radius: 99px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--body); cursor: pointer; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.pair { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .pair { grid-template-columns: 220px 1fr; } }
.qr-box { width: 220px; height: 220px; border: 1.5px solid var(--line); border-radius: 14px; display: grid; place-items: center; background: #fff; }
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.paircode { font-size: 28px; font-weight: 700; letter-spacing: 3px; text-align: center; padding: 12px; border-radius: 14px; background: var(--sunk); }
.how { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--body); }
.metaopt { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--line); }
.conn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.conn-row > div { flex: 1; min-width: 160px; display: grid; }
.big-ok { width: 40px; height: 40px; border-radius: 99px; background: var(--found-soft); color: var(--found-ink); display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.opt > div { flex: 1; min-width: 0; display: grid; }
.opt.col { flex-direction: column; align-items: stretch; }
.search { width: 100%; border: 1.5px solid var(--line); border-radius: 99px; padding: 8px 14px; background: var(--surface); }
/* «Кому отвечает бот» on the computer (cabinet-desktop) */
.opt > .modes, .modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px; }
.modes button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--body); }
.modes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.pickd { display: grid; gap: 8px; }
.search.sq { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 8px 36px; font-size: 13.5px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 17px; }
[dir="rtl"] .search.sq { padding: 8px 36px 8px 12px; background-position: calc(100% - 11px) center; }
.pickd > p { margin: 0; }
.picktbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
/* a long list (the whole WhatsApp phone book, D-0035) scrolls inside its own window */
.mobscroll { max-height: 60vh; overflow-y: auto; }
.pickscroll { max-height: 360px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.picktbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.picktbl tr:last-child td { border-bottom: none; }
.picktbl tr { cursor: pointer; }
.picktbl tr:hover td { background: var(--sunk); }
.picktbl .ckc { width: 36px; }
.picktbl .kind { color: var(--mute); text-transform: lowercase; }
.picktbl .ck { width: 20px; height: 20px; padding: 0; border-radius: 6px; border: 2px solid var(--faint); background: var(--surface); display: inline-grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; cursor: pointer; }
.picktbl .ck[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.warnline { padding: 9px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 12.5px; }
.chatpick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--line-soft); background: none; text-align: start; cursor: pointer; }
.chatpick .av { width: 34px; height: 34px; border-radius: 99px; background: var(--sunk); display: grid; place-items: center; font-weight: 600; }
.chatpick .nm { flex: 1; min-width: 0; display: grid; }
.chatpick small { color: var(--mute); }
.chatpick .ck { width: 24px; height: 24px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; color: #fff; }
.chatpick[aria-pressed="true"] .ck { background: var(--accent); border-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .search { flex: 1; min-width: 180px; width: auto; }
.lead { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: start; cursor: pointer; width: 100%; font: inherit; color: inherit; text-decoration: none; }
.lead.new { border-color: var(--accent); }
.lead .av { width: 40px; height: 40px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.lead .who { flex: 1; min-width: 0; display: grid; }
.lead .who span { color: var(--body); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead .when { display: grid; justify-items: end; gap: 4px; font-size: 12px; color: var(--mute); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--sunk); color: var(--body); }
.tag.new { background: var(--accent); color: #fff; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.kv > span { color: var(--mute); }
.kv select { border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); }
.recap { background: var(--sunk); border-radius: 14px; padding: 10px 14px; display: grid; gap: 8px; font-size: 13.5px; margin: 8px 0; }
.recap .who-b { font-size: 11.5px; font-weight: 600; color: var(--mute); }
.btn.wa { border-color: var(--wa); background: var(--wa); color: #fff; }
@media (min-width: 900px) { .lead-sheet { width: 460px; max-height: calc(100vh - 100px); } }
.lead-p { font-size: 14.5px; color: var(--body); }
.pstep { display: grid; grid-template-columns: 34px 1fr; gap: 6px 12px; align-items: start; }
.pstep > div { display: grid; gap: 2px; }
.pstep .n { width: 30px; height: 30px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; grid-row: span 2; }
.pstep.ok .n { background: var(--found-soft); color: var(--found-ink); }
.pstep .okt { grid-column: 2; color: var(--found-ink); font-weight: 600; font-size: 13.5px; }
.pstep .btn { grid-column: 2; justify-self: start; }
.choice { display: grid; gap: 4px; text-align: start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.choice:hover { border-color: var(--accent); }
.choice span { color: var(--mute); font-size: 13.5px; }
.stack { display: grid; gap: 14px; }
.center { text-align: center; }

/* «Помощник» (часть 8): шапка чата, подсказки-кнопки, отметки инструментов, строка «Написать себе» */
.chathead { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chathead .ava { width: 36px; height: 36px; border-radius: 99px; background: var(--accent-soft); display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; }
.chathead div { display: grid; gap: 1px; }
.msg .note { font-size: 12px; color: var(--mute); }
.msg .typing { padding: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; background: var(--surface); border-top: 1px solid var(--line); }
.chips button { border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-ink); border-radius: 99px; font-size: 12.5px; font-weight: 500; padding: 5px 11px; cursor: pointer; }
.chips button:disabled { opacity: .5; cursor: default; }

/* главная, «Что сделал бот» (часть 10): число, столбики по дням / неделям, три плитки; полоса «Напишите помощнику» */
.hero-stat { padding: 16px; display: grid; gap: 12px; border-color: var(--accent); }
.hs-num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.hs-cap { font-size: 13px; color: var(--body); margin-top: 4px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.bars i { flex: 1; background: var(--accent-soft); border-radius: 5px 5px 2px 2px; }
.bars i.now { background: var(--accent); }
.bars-x { display: flex; gap: 5px; font-size: 10.5px; color: var(--faint); text-align: center; }
.bars-x span { flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { padding: 11px 10px; border-width: 1.5px; }
.tile b { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { display: block; font-size: 11.5px; color: var(--body); margin-top: 4px; line-height: 1.35; }
.tile.t1 { border-color: var(--go); }
.tile.t2 { border-color: var(--accent); }
.tile.t3 { border-color: var(--found); }
.ask { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 6px 6px 16px; border-radius: 99px; border: 1.5px solid var(--accent); background: var(--surface); color: var(--mute); font-size: 14px; text-decoration: none; }
.ask span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask i { width: 36px; height: 36px; border-radius: 99px; background: var(--accent); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 15px; }


/* профиль: строки-ссылки на WhatsApp, звонки, помощника и тариф (часть 10) */
a.li { color: inherit; text-decoration: none; }
a.li .arr { color: var(--faint); font-size: 20px; }

/* политика конфиденциальности (часть 10): текстовая страница в оболочке входа */
.auth-box.doc { max-width: 720px; }
.auth-box.doc article h2 { font-size: 16px; margin: 14px 0 4px; }
.auth-box.doc article ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.auth-box.doc article p, .auth-box.doc article li { line-height: 1.55; }

/* «Тариф и оплата» (D-0031): поле карты Stripe Elements — рамка как у полей ввода; просьба банка подтвердить платёж */
.stripe-card { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); min-height: 44px; }
.banner-card { border-color: var(--go); background: var(--go-soft); }
/* plan on the left, card / invoices / cancel on the right (cabinet-desktop pageBilling); one column on the phone */
.bl-grid, .bl-col { display: grid; gap: 14px; align-content: start; }
.bl-plan { align-content: start; gap: 14px; border-color: var(--go); background: var(--go-soft); padding: 18px; }
.bl-plan .plan-top { justify-content: space-between; }
.bl-plan .plan-top span.hint { display: block; font-size: 13px; color: var(--body); }
.bl-plan .plan-price { flex: none; font-size: 34px; color: var(--go); text-align: end; white-space: nowrap; }
.bl-plan .meter { background: var(--surface); border: 1px solid var(--line); }
.bl-plan .meter i { background: var(--ink); }
.bl-center { text-align: center; }
.bl-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.bl-tbl { overflow-x: auto; margin-inline: -16px; }
.bl-tbl table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bl-tbl th { text-align: start; font-weight: 600; font-size: 12px; color: var(--mute); padding: 8px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bl-tbl td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.bl-tbl tr:last-child td { border-bottom: 0; }
.bl-tbl td .sub { display: block; font-size: 12.5px; color: var(--mute); }
.bl-tbl .tag { white-space: nowrap; }
.bl-tbl .tag.ok { background: var(--found-soft); color: var(--found-ink); }
.bl-tbl .tag.bad { background: var(--bad-soft); color: var(--bad); }
.bl-tbl .bl-sum { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-tbl .bl-sum .tag { display: table; margin-top: 4px; font-weight: 600; }
@media (max-width: 899px) {
  .bl-tbl th, .bl-tbl td { padding-inline: 8px; }
  .bl-tbl th:first-child, .bl-tbl td:first-child { padding-inline-start: 16px; }
  .bl-tbl th:nth-child(3), .bl-tbl td:nth-child(3) { padding-inline-end: 16px; }
}
.bl-empty { text-align: center; padding: 12px 0; }
.bl-cancel { display: flex; align-items: center; gap: 12px; }
.bl-cancel > div { flex: 1; min-width: 0; }
.bl-cancel span.hint { display: block; }
.bl-cancel .btn { flex: none; }
.bl-cancel > .bl-actions { flex: none; flex-wrap: nowrap; }
@media (min-width: 900px) {
  .bl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .bl-col { gap: 16px; }
}

/* ---------- онбординг: экран на всю высоту, шапка «Назад · логотип · язык · Войти», действие внизу (D-0032) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.onb { min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: var(--surface); }
@media (min-width: 560px) {
  body:has(.onb) { background: var(--sunk); }
  .onb { min-height: calc(100dvh - 64px); margin: 32px auto; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
}
.onb-head { display: flex; align-items: center; gap: 6px; padding: 12px 20px; position: sticky; top: 0; z-index: 2; background: var(--surface); }
.onb-head .logo { flex: 1; }
.onb-head .logo img { height: 28px; }
.onb-head .logo span { font-size: 17px; }
.onb-back { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 36px; margin-inline-start: -4px; padding: 0; border: 0; border-radius: 99px; background: none; cursor: pointer; color: var(--ink); }
.onb-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .onb-back svg { transform: scaleX(-1); }
.onb-back.off { visibility: hidden; }
/* a long business name wraps to the next line instead of being cut */
.field textarea.grow { resize: none; field-sizing: content; min-height: 0; overflow: hidden; }
.lang-menu { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px 4px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 13px; }
.lang-btn img, .lang-pop img { width: 20px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
.lang-btn span { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-btn svg { width: 14px; height: 14px; fill: none; stroke: var(--mute); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lang-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); width: 220px; z-index: 10; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 6px; }
.lang-pop input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 14px; background: var(--surface); }
.lang-pop input:focus { border-color: var(--accent); outline: none; }
.lang-pop ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.lang-pop li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.lang-pop li:hover { background: var(--sunk); }
.lang-pop li span { flex: 1; }
.lang-pop li i { font-style: normal; color: var(--accent-ink); font-weight: 700; }
/* registration header: flag only, so the logo name always fits */
.onb-head .lang-btn span { display: none; }
.onb-signin { min-height: 34px; padding: 5px 14px; font-size: 13.5px; }
.onb-head .logo { min-width: 0; }
.onb-head .logo span { white-space: nowrap; }
.onb-body { flex: 1; display: flex; flex-direction: column; padding: 12px 28px 28px; }
.onb-step { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.onb-step h1 { font-size: 28px; line-height: 1.25; }
.onb-sub { color: var(--body); font-size: 16px; }
.onb-actions { padding-top: 8px; display: grid; gap: 10px; }
.onb-actions .btn { min-height: 52px; font-size: 16px; }
.onb-skip { border: 0; background: none; color: var(--mute); font-weight: 600; padding: 8px; cursor: pointer; }
.onb-foot { text-align: center; padding: 0 24px 20px; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { width: 22px; height: 5px; border-radius: 99px; background: var(--line); }
.onb-dots i.on { background: var(--accent); }
.onb-slide { display: flex; flex-direction: column; gap: 16px; }
.onb-point { display: flex; gap: 10px; color: var(--body); font-size: 16px; }
.onb-point::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 99px; border: 2px solid var(--found); background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%2310B981' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.chat { background: #EFEAE2; border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #0F172A; padding-bottom: 8px; border-bottom: 1px solid rgba(15, 23, 42, .08); }
.chat-who i { width: 28px; height: 28px; border-radius: 99px; background: var(--accent); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.chat-who small { display: block; font-weight: 400; color: #64748B; font-size: 11px; }
.chat-call { align-self: center; background: #fff; color: #0F172A; border-radius: 10px; padding: 5px 12px; font-size: 13.5px; }
.chat-b { max-width: 84%; padding: 9px 12px; border-radius: 12px; font-size: 15px; line-height: 1.45; color: #0F172A; box-shadow: 0 1px 1px rgba(15, 23, 42, .08); animation: chat-in .35s ease both; }
.chat-b b { display: block; font-size: 12.5px; color: var(--accent-ink); }
.chat-b.bot { align-self: flex-start; background: #fff; border-start-start-radius: 3px; }
.chat-b.client { align-self: flex-end; background: #D9FDD3; border-start-end-radius: 3px; }
.chat > :nth-child(3) { animation-delay: .25s; } .chat > :nth-child(4) { animation-delay: .9s; } .chat > :nth-child(5) { animation-delay: 1.6s; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat-b { animation: none; } }
.lead-card { width: 100%; align-self: stretch; background: #fff; color: #0F172A; border-radius: 16px; padding: 16px; display: grid; gap: 6px; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); animation: chat-in .4s .2s ease both; }
.lead-from { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lead-from img { width: 32px; height: 32px; object-fit: contain; }
.lead-from div { flex: 1; display: grid; font-size: 14px; line-height: 1.3; }
.lead-from span, .lead-from time { color: #64748B; font-size: 13px; }
.lead-card h4 { margin: 0; font-size: 18px; }
.lead-card p { color: #475569; font-size: 15px; }
.lead-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 6px 0 0; font-size: 15px; }
.lead-card dt { color: #64748B; }
.lead-card dd { margin: 0; }


/* phone number with its country (registration, like BotCraft #694) */
.phone-input { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.country-menu { position: relative; min-width: 0; }
.country-btn { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); text-align: start; }
.country-btn[aria-expanded="true"] { border-color: var(--accent); }
.country-btn span { flex: 1; min-width: 0; white-space: nowrap; }
.country-btn img, .country-pop li img { width: 22px; height: 16px; flex: none; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15, 23, 42, .1); }
.country-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--mute); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* the list reads in the page direction (Hebrew — right to left), only the number stays left to right; it opens under the button */
.country-pop { left: 0; right: auto; width: min(300px, calc(100vw - 48px)); }
.country-pop li b { min-width: 3.2em; font-weight: 600; color: var(--mute); direction: ltr; unicode-bidi: isolate; text-align: end; }

/* registration: the number or the e-mail already has a cabinet (D-0036) — amber field, notice with the way to sign in */
.field input.taken { border: 2px solid var(--warn-edge); background: var(--warn-soft); }
.taken { display: grid; gap: 12px; }
.taken > .hint { margin: 0 4px; line-height: 1.45; }
.taken-note { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--warn-line); border-radius: 16px; background: var(--warn-soft); }
.taken-head { display: flex; gap: 12px; align-items: flex-start; }
.taken-head > div { display: grid; gap: 4px; min-width: 0; }
.taken-head b { font-size: 16px; font-weight: 600; color: var(--ink); }
.taken-head span { font-size: 14px; line-height: 1.45; color: var(--body); }
.taken-icon { flex: 0 0 36px; height: 36px; border-radius: 99px; background: var(--warn-chip); color: var(--warn); display: grid; place-items: center; }
.taken-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.taken-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--faint); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; text-align: center; }
.taken-btn.go { border: 2px solid var(--go); color: var(--go-ink); }
.taken-btn:hover { text-decoration: none; background: var(--go-soft); }
.taken-arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .taken-arrow { transform: scaleX(-1); }
.taken-note.sm { gap: 12px; padding: 14px; margin-top: 4px; }
.taken-note.sm .taken-head { gap: 10px; }
.taken-note.sm .taken-head > div { gap: 2px; }
.taken-note.sm .taken-head b { font-size: 15px; }
.taken-note.sm .taken-head span { font-size: 13px; }
.taken-note.sm .taken-icon { flex-basis: 32px; height: 32px; }
.taken-note.sm .taken-icon svg { width: 18px; height: 18px; }
.taken-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.taken-pair .taken-btn { min-height: 44px; font-size: 14px; padding: 0 10px; }

/* onboarding assistant /start (like BotCraft /start/chat #694): header, thread, composer */
.onb.start { height: 100vh; height: 100dvh; min-height: 0; }
@media (min-width: 560px) { .onb.start { height: calc(100dvh - 64px); } }
.start-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.start-head .logo { min-width: 0; }
.start-head .logo img { height: 28px; }
.start-head .logo span { font-size: 17px; white-space: nowrap; }
.start-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.start-out { font: inherit; font-size: 13px; color: var(--mute); background: none; border: 0; padding: 5px 6px; cursor: pointer; }
.start-out:hover { color: var(--ink); }
.start-thread { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; }
.start-msg { max-width: 85%; padding: 8px 12px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.start-msg span { white-space: pre-line; }
.start-msg .start-ask { display: block; margin-top: 8px; font-weight: 700; white-space: pre-line; }
.start-msg .typing { padding: 6px 2px; }
.start-msg.bot { align-self: flex-start; background: var(--sunk); color: var(--ink); }
.start-msg.mine { align-self: flex-end; background: var(--accent); color: #fff; }
.start-composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.start-composer textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; resize: none; field-sizing: content; }
.start-composer textarea:focus { border-color: var(--accent); outline: none; }
.start-composer .btn { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; }
.start-composer svg { width: 20px; height: 20px; fill: currentColor; }
[dir="rtl"] .start-composer svg { transform: scaleX(-1); }
.start-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.start-chips .chip, .start-card > .chip { min-height: 40px; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 99px; background: var(--surface); color: var(--accent-ink); font: inherit; font-size: 15px; cursor: pointer; }
.start-chips .chip:hover, .start-card > .chip:hover { background: var(--accent-soft); }
.start-badge { align-self: flex-start; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; }
.start-row.fresh, .start-faq.fresh { padding: 6px 8px; margin-inline: -8px; border-radius: 10px; background: var(--accent-soft); }
.start-old { align-self: stretch; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--mute); font-size: 14px; }
.start-old-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.start-old-toggle { flex: none; font: inherit; font-size: 14px; color: var(--accent-ink); background: none; border: 0; padding: 4px 0; min-height: 32px; cursor: pointer; }
.start-old-body { display: grid; gap: 8px; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.start-old-body dt { font-size: 12.5px; }
.start-old-body dd { margin: 0; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.start-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.start-card dl { display: grid; gap: 10px; margin: 0; }
.start-card dt { font-size: 12.5px; color: var(--mute); }
.start-card dd { margin: 0; font-size: 15px; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.start-card > .chip { align-self: flex-start; }
.start-card dd.empty { color: var(--faint); }
.start-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; }
.start-row dt, .start-row dd, .start-row input, .start-row textarea { grid-column: 1; }
/* card values take their own direction (a site, a phone, a Russian description on a Hebrew page) but stay on the page's side */
[dir="rtl"] dd[dir="auto"] { text-align: right; }
.start-row input, .start-row textarea { width: 100%; font: inherit; font-size: 15px; padding: 6px 10px; border: 1.5px solid var(--accent); border-radius: 10px; background: var(--surface); outline: none; resize: vertical; }
.start-pencil { grid-column: 2; grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.start-pencil svg { width: 16px; height: 16px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.start-pencil:hover { background: var(--sunk); }
.start-row-hours { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 6px; }
.start-hours { display: grid; gap: 4px; }
.start-day { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.start-day label { display: flex; align-items: center; gap: 8px; width: 4.2em; flex: none; font-weight: 600; color: var(--ink); cursor: pointer; }
.start-day label input { width: 18px; height: 18px; accent-color: var(--accent); }
.start-times { display: flex; align-items: center; gap: 6px; }
.start-times i { font-style: normal; color: var(--mute); }
.start-times input { font: inherit; font-size: 15px; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.start-times input:focus { border-color: var(--accent); outline: none; }
.start-card-actions { display: grid; gap: 8px; }
.start-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.start-langs label { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; cursor: pointer; }
.start-langs input { width: 20px; height: 20px; accent-color: var(--accent); }
.start-faq { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.start-faq-q { display: flex; align-items: flex-start; gap: 8px; }
.start-faq-q b { flex: 1; font-size: 15px; color: var(--ink); }
.start-faq-x { width: 36px; height: 36px; margin: -6px -6px 0 0; border: 0; border-radius: 99px; background: none; color: var(--mute); font-size: 22px; line-height: 1; cursor: pointer; }
.start-faq-x:hover { background: var(--sunk); color: var(--ink); }
.start-faq textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-inline-start-width: 4px; border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; field-sizing: content; min-height: 44px; }
.start-faq textarea.set { border-inline-start-color: var(--found); background: var(--found-soft); }
.start-faq textarea.empty { border-inline-start-color: var(--go); }
.start-faq textarea:focus { border-color: var(--accent); outline: none; }
.start-faq-add { display: flex; gap: 8px; }
.start-faq-add input { flex: 1; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; }
.start-price { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-inline-start-width: 4px; border-radius: 10px; font: inherit; font-size: 15px; }
.start-price.set { border-inline-start-color: var(--found); background: var(--found-soft); }
.start-price.empty { border-inline-start-color: var(--go); }
.start-price:focus { border-color: var(--accent); outline: none; }
.start-done { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px; overflow-y: auto; }
.start-done-top { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 16px 10px; border-radius: 20px; background: var(--go-soft); }
/* the robot of timesaverbot.com (home page, «suit» frame) */
.start-robot { width: 140px; height: auto; display: block; }
.start-done h1 { margin: 0; font-size: 32px; line-height: 1.15; color: var(--ink); }
.start-done-sub { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.start-done h2 { margin: 6px 0 0; font-size: 16px; color: var(--ink); }
.start-done-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.start-done-list li { position: relative; padding-inline-start: 28px; font-size: 15px; color: var(--body); }
.start-done-list li::before { content: "→"; position: absolute; inset-inline-start: 4px; color: var(--faint); }
[dir="rtl"] .start-done-list li::before { content: "←"; }
.start-done-list.ok li::before { content: "✓"; color: var(--found); font-weight: 700; }
.start-done .btn { flex: none; margin-top: auto; }

/* ---------- главная на компьютере (cabinet-desktop): строки состояния, «Ответить», строка помощника, статистика и заявки карточками ---------- */
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.blue { border-color: var(--accent); background: var(--accent); color: #fff; }
.stats-card, .stats, .leads-card { display: contents; }
/* status rows and the «Ответить» / «Подключить» buttons: both widths; on the phone a button that does not fit wraps under the text */
.srows { display: grid; }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--found-line); font-size: 13.5px; min-height: 52px; }
.switch.off .srow { border-color: var(--warn-line); }
.srow > span:not(.sdot) { flex: 1 1 160px; min-width: 0; color: var(--body); }
.srow b { color: var(--ink); font-weight: 600; }
.sdot { width: 8px; height: 8px; border-radius: 99px; background: var(--found); flex: 0 0 auto; margin-inline: 4px 6px; }
.sdot.bad { background: var(--go); }
.mc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-row .btn, .srow .btn, .nudge .btn { flex: none; width: auto; }
/* телефон: текст строки и карточки «Тариф» всегда сверху, кнопка под ним — одинаково во всех строках */
@media (max-width: 899px) {
  .srow > span:not(.sdot) { flex: 1 1 calc(100% - 40px); }
  .srow .btn { margin-inline-start: 28px; }
  .plan-card { flex-direction: column; align-items: flex-start; }
  .plan-card > div { width: 100%; }
}
.askline {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 99px; border: 1.5px solid var(--accent);
  background: var(--surface); color: var(--mute); font: inherit; font-size: 14px; text-align: start; cursor: pointer;
}
.askline span { flex: 1; min-width: 0; }
.askline i { width: 36px; height: 36px; border-radius: 99px; background: var(--accent); color: #fff; display: grid; place-items: center; font-style: normal; flex: 0 0 auto; }
[dir="rtl"] .askline i { transform: scaleX(-1); }
.nudge { border-color: #6366F1; }
@media (min-width: 900px) {
  .switch { padding: 18px 20px; gap: 14px; }
  .srow > span:not(.sdot) { flex: 1; }
  /* the trial is in the header chip; a card only when it is about to end (cabinet-desktop banner) */
  .card.trial:not(.urgent) { display: none; }
  .nudge { padding: 14px 18px; gap: 12px; font-size: 14px; }
  .nudge .hint { font-size: 13px; }
  .stats-card, .leads-card { display: block; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
  .stats-card > .card-h, .leads-card > .card-h { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
  .stats { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: center; padding: 16px 18px; }
  .stats .hero-stat { border: 0; padding: 0; background: none; }
  .stats .hs-num { font-size: 46px; }
  .stats .bars { height: 64px; }
  .stats .tiles { grid-template-columns: 1fr; gap: 10px; }
  .stats .tile { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; }
  .stats .tile b { min-width: 40px; }
  .stats .tile span { margin-top: 0; font-size: 13px; }
  .leads-card .all {
    display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 99px; border: 1.5px solid var(--accent);
    color: var(--accent-ink); font-size: 12.5px; font-weight: 600; text-decoration: none;
  }
  .leads-card .lead { margin: 0; border-radius: 0; border-width: 0 0 1px; }
  .leads-card > .hint { padding: 14px 18px; margin: 0; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .stats { grid-template-columns: 1fr; }
}
/* «Проверить бота»: переписка как в WhatsApp на всю высоту, шапка чата с «Поправить» и «Заново», поле ввода внизу */
.main.tc { gap: 10px; }
.tc-box { display: flex; flex-direction: column; height: calc(100vh - 58px - 48px); height: calc(100dvh - 58px - 48px); min-height: 420px; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; background: #EFEAE2; }
.tc-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tc-head b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.tc-ava { width: 38px; height: 38px; border-radius: 99px; background: #E0E7FF; color: #4F46E5; display: grid; place-items: center; flex: 0 0 auto; }
.tc-ava .ic { width: 20px; height: 20px; }
.tc-pill { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; flex: 0 0 auto; }
.tc-pill .ic { width: 16px; height: 16px; }
.tc-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.tc-hello { margin: auto 0 0; align-self: center; max-width: 320px; background: #FFF8E1; color: #5B4A1F; font-size: 13.5px; line-height: 1.45; text-align: center; padding: 10px 14px; border-radius: 12px; }
.tc-hello p { margin: 0; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.tc-chips button { min-height: 36px; padding: 0 13px; border-radius: 99px; border: 1.5px solid var(--accent); background: #fff; color: var(--accent-ink); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.tc-item { display: flex; }
.tc-item.mine { justify-content: flex-end; }
.tc-b { max-width: 82%; padding: 8px 10px 5px; border-radius: 12px; background: #fff; color: #0F172A; font-size: 15px; line-height: 1.4; box-shadow: 0 1px 1px rgba(15, 23, 42, .08); display: grid; }
.tc-item.bot .tc-b { border-start-start-radius: 4px; }
.tc-item.mine .tc-b { background: #D9FDD3; border-start-end-radius: 4px; }
.tc-b .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.tc-b .err { font-size: 12.5px; color: var(--bad); }
.tc-b small { justify-self: end; font-size: 11px; color: #64748B; margin-top: 2px; }
.tc-typing { display: flex; gap: 4px; padding: 12px 14px; }
.tc-typing i { width: 7px; height: 7px; border-radius: 99px; background: #94A3B8; animation: tc-dot 1s infinite ease-in-out; }
.tc-typing i:nth-child(2) { animation-delay: .15s; } .tc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tc-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.tc-mark { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 99px; text-decoration: none; }
.tc-item.mark-q .tc-mark { background: #FEF3C7; color: #92400E; }
.tc-item.mark-l .tc-mark { background: #DCFCE7; color: #166534; }
.tc-comp { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 10px; }
.tc-comp textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 140px; box-sizing: border-box; border: 0; border-radius: 23px; padding: 12px 16px; font: inherit; font-size: 15px; line-height: 1.4; resize: none; background: #fff; color: #0F172A; field-sizing: content; box-shadow: 0 1px 1px rgba(15, 23, 42, .08); }
.tc-comp textarea:focus { outline: 2px solid var(--accent); }
.tc-send { width: 46px; height: 46px; border-radius: 99px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 auto; cursor: pointer; }
.tc-send:disabled { opacity: .6; }
[dir="rtl"] .tc-send .ic { transform: scaleX(-1); }
@media (max-width: 899px) {
  /* phone: the chat fills the screen between the header and the bottom menu */
  .main.tc { padding: 0; gap: 0; }
  .tc-box { height: calc(100vh - 58px - 68px); height: calc(100dvh - 58px - 68px - env(safe-area-inset-bottom, 0px)); min-height: 360px; border: 0; border-radius: 0; }
  .main.tc .error { margin: 8px 16px; }
}
/* «Новые заявки»: число новых у заголовка, пусто — карточка со значком; «Проверить бота» — значок и стрелка */
.cnt { min-width: 26px; height: 26px; padding: 0 8px; box-sizing: border-box; border-radius: 99px; background: var(--go); color: #fff; font-size: 14px; font-weight: 700; display: inline-grid; place-items: center; }
.all .ic { width: 16px; height: 16px; }
[dir="rtl"] .all .ic, [dir="rtl"] .testbot .arr .ic { transform: scaleX(-1); }
.leads-empty { display: flex; align-items: center; gap: 14px; }
.leads-empty b { display: block; font-size: 16px; font-weight: 600; }
.leads-empty .hint { display: block; font-size: 14px; margin-top: 2px; }
.le-ic, .tb-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--sunk); color: var(--mute); display: grid; place-items: center; flex: 0 0 auto; }
.testbot .tb-ic { background: var(--accent-soft); color: var(--accent-ink); }
.testbot .arr .ic { width: 20px; height: 20px; }
@media (min-width: 900px) {
  .leads-card .leads-empty { border: 0; border-radius: 0; margin: 0; padding: 14px 18px; }
  .leads-card .card-h h2 { display: flex; align-items: center; gap: 8px; }
  .leads-card .all { gap: 2px; padding: 0 6px 0 12px; }
}
/* «Что сделал бот»: значок слева от цифры, нули не показываются, пустой период — одна строка */
.hs-row { display: flex; align-items: center; gap: 14px; }
.hs-row .hs-cap { margin-top: 0; }
.tile .tn { display: flex; align-items: center; gap: 6px; }
.stats-empty { display: flex; align-items: center; gap: 14px; }
.stats-empty b { display: block; font-size: 16px; font-weight: 600; }
.stats-empty .hint { display: block; font-size: 14px; margin-top: 2px; }
.se-ic { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
@media (min-width: 900px) {
  .stats-card .stats-empty { border: 0; border-radius: 0; margin: 0; padding: 18px; }
}
/* телефон, макет «А»: синий блок с крупным числом, цветные плитки по центру */
@media (max-width: 899px) {
  .askline { display: none; } /* the assistant is the header button on the phone */
  /* «Новые заявки» и «Проверить бота» (макет «Будет: есть новые заявки») */
  .leads-card .card-h h2 { display: flex; align-items: center; gap: 8px; }
  .leads-card .all {
    display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 6px 0 14px; border-radius: 99px; border: 1.5px solid var(--accent);
    color: var(--accent-ink); font-size: 13.5px; font-weight: 600; text-decoration: none;
  }
  .leads-card .lead.new { border-color: #FED7AA; padding: 14px 16px; }
  .leads-card .lead .av { width: 44px; height: 44px; font-size: 17px; background: #FFEDD5; color: #9A3412; }
  .leads-card .lead .who b { font-size: 16px; font-weight: 600; }
  .leads-card .lead .who span { font-size: 14px; }
  .leads-card .tag.new { background: var(--go); font-weight: 700; }
  .testbot { margin-top: 4px; background: linear-gradient(135deg, #EEF2FF, #E0E7FF); border: 0; border-radius: 20px; padding: 16px; gap: 14px; color: #1E1B4B; }
  .testbot b { font-size: 17px; font-weight: 700; }
  .testbot .hint { font-size: 14px; color: #3730A3; margin-top: 2px; }
  .testbot .tb-ic { width: 48px; height: 48px; border-radius: 14px; background: #6366F1; color: #fff; }
  .testbot .arr { width: 40px; height: 40px; border-radius: 99px; background: #6366F1; color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
  .hero-stat { background: linear-gradient(135deg, #2563EB, #3B82F6); color: #fff; border: 0; border-radius: 20px; padding: 20px; gap: 14px; box-shadow: 0 10px 24px rgba(37, 99, 235, .25); }
  .hero-stat .hs-num { font-size: 64px; font-weight: 800; line-height: .95; color: #fff; }
  .hero-stat .hs-cap { font-size: 16px; font-weight: 500; line-height: 1.35; color: #fff; }
  .hero-stat .bars { height: 60px; gap: 6px; }
  .hero-stat .bars i { background: rgba(255, 255, 255, .3); border-radius: 6px 6px 2px 2px; }
  .hero-stat .bars i.now { background: #fff; }
  .hero-stat .bars-x { font-size: 12px; gap: 6px; color: rgba(255, 255, 255, .85); }
  .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .tiles .tile { border: 0; border-radius: 16px; padding: 14px 8px; gap: 6px; justify-items: center; align-content: start; text-align: center; }
  .tiles .tile .ic { width: 24px; height: 24px; }
  .tiles .tile b { font-size: 34px; font-weight: 800; line-height: 1; }
  .tiles .tile span { font-size: 13px; font-weight: 500; line-height: 1.3; margin-top: 0; color: inherit; }
  .tiles .tile.t1 { background: #FFEDD5; color: #9A3412; }
  .tiles .tile.t2 { background: #DBEAFE; color: #1E40AF; }
  .tiles .tile.t3 { background: #D1FAE5; color: #065F46; }
}

/* ---------- панель помощника справа (компьютер, cabinet-desktop) ---------- */
.asst-panel { display: none; }
@media (min-width: 900px) {
  .asst-panel.open {
    position: fixed; top: 58px; bottom: 0; inset-inline-end: 0; z-index: 4; width: 380px; display: flex; flex-direction: column;
    background: var(--surface); border-inline-start: 1px solid var(--line);
  }
  .app:has(.asst-panel.open) main.main { padding-inline-end: calc(380px + 20px); }
  .as-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .as-h .av { width: 36px; height: 36px; border-radius: 99px; border: 1px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
  .as-h .av img { width: 24px; height: auto; }
  .as-h div { flex: 1; min-width: 0; }
  .as-h b { display: block; font-size: 14.5px; color: var(--ink); }
  .as-h span { font-size: 11.5px; color: var(--found-ink); }
  .as-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--mute); cursor: pointer; display: grid; place-items: center; }
  .as-x:hover { background: var(--sunk); color: var(--ink); }
  .as-x svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
  .as-thread { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--sunk); }
  .as-msg {
    align-self: flex-start; max-width: 88%; background: var(--surface); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
    padding: 8px 12px; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere;
  }
  .as-msg > span { white-space: pre-line; }
  .as-msg.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 14px 14px 4px 14px; }
  .as-msg small { display: block; margin-top: 6px; font-size: 12px; color: var(--mute); }
  .as-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; border-top: 1px solid var(--line); }
  .as-chips button {
    border: 1.5px solid var(--accent); background: var(--surface); color: var(--accent-ink); border-radius: 99px; font: inherit;
    font-size: 12px; font-weight: 500; padding: 4px 10px; cursor: pointer;
  }
  .as-compose { display: flex; gap: 8px; padding: 10px 12px 12px; }
  .as-compose input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 99px; padding: 10px 14px; font: inherit; font-size: 13.5px; }
  .as-compose input:focus { border-color: var(--accent); outline: none; }
  .as-compose button { width: 42px; height: 42px; border-radius: 99px; border: 0; background: var(--go); color: #fff; font-size: 16px; cursor: pointer; flex: 0 0 auto; }
  .as-compose button:disabled { opacity: .55; cursor: default; }
  [dir="rtl"] .as-compose button { transform: scaleX(-1); }
}

/* «Пропущенные звонки» (cabinet-desktop pageApp, cabinet-mobile «разрешения»): status tag, permission rows, call outcomes */
.cl-p { margin: 0; color: var(--body); }
.cl-tag.on, .cl-recent .tag.on { background: var(--found-soft); color: var(--found-ink); }
.cl-tag.warn, .cl-recent .tag.warn { background: var(--warn-soft); color: var(--warn); }
.cl-recent .tag.bad { background: var(--bad-soft); color: var(--bad); }
.cl-recent .tag { white-space: nowrap; }
.big-ok.cl-warn { background: var(--warn-soft); color: var(--warn); }
.cl-perm { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; }
.pstep.ok { border-color: var(--found-line); background: var(--found-soft); }
.pstep.ok .n { background: var(--found); color: #fff; }
.pstep .cl-no { grid-column: 2; color: var(--warn); font-weight: 600; font-size: 13.5px; }
.cl-test { gap: 4px; }

/* intro slides on a phone: the slide sits in the middle of the screen; on a short screen it is tightened to fit without scrolling */
/* medium phones (≈780–860px visible): normal text, tighter spacing */
@media (max-width: 560px) and (max-height: 860px) {
  .onb-head { padding: 8px 16px; }
  .onb-body { padding: 4px 20px 8px; }
  .onb-step:has(.onb-slide) { gap: 12px; }
  .onb-slide { gap: 12px; }
  .onb-slide h1 { font-size: 26px; line-height: 1.2; }
  .onb-slide .onb-sub { font-size: 15.5px; line-height: 1.45; }
  .onb-slide .chat { padding: 10px; gap: 7px; }
  .onb-slide .chat-b { font-size: 14.5px; padding: 8px 11px; }
  .onb-slide .lead-card { padding: 14px; gap: 5px; }
  .onb-step:has(.onb-slide) .onb-actions { padding-top: 0; gap: 4px; }
  .onb-step:has(.onb-slide) .onb-actions .btn { min-height: 48px; }
  .onb-step:has(.onb-slide) .onb-skip { padding: 4px; }
  .onb-foot { padding: 0 16px 8px; font-size: 12.5px; }
}
@media (max-width: 560px) and (max-height: 780px) {
  .onb-head { padding: 8px 16px; }
  .onb-body { padding: 4px 20px 8px; }
  .onb-step:has(.onb-slide) { gap: 10px; }
  .onb-slide { gap: 10px; }
  .onb-slide h1 { font-size: 23px; line-height: 1.2; }
  .onb-slide .onb-sub { font-size: 14.5px; line-height: 1.45; }
  .onb-slide .onb-point { font-size: 14px; gap: 8px; }
  .onb-slide .onb-point::before { width: 18px; height: 18px; margin-top: 1px; }
  .onb-slide .chat { padding: 10px; gap: 6px; border-radius: 16px; }
  .onb-slide .chat-who { padding-bottom: 6px; font-size: 12.5px; }
  .onb-slide .chat-who i { width: 24px; height: 24px; font-size: 11px; }
  .onb-slide .chat-call { font-size: 12.5px; padding: 4px 10px; }
  .onb-slide .chat-b { font-size: 13.5px; line-height: 1.4; padding: 7px 10px; }
  .onb-slide .chat-b b { font-size: 11.5px; }
  .onb-slide .lead-card { padding: 12px; gap: 4px; }
  .onb-slide .lead-from { margin-bottom: 2px; }
  .onb-slide .lead-from img { width: 26px; height: 26px; }
  .onb-slide .lead-card h4 { font-size: 16px; }
  .onb-slide .lead-card p { font-size: 13.5px; }
  .onb-slide .lead-card dl { gap: 3px 14px; font-size: 13.5px; margin-top: 4px; }
  .onb-step:has(.onb-slide) .onb-actions { padding-top: 0; gap: 4px; }
  .onb-step:has(.onb-slide) .onb-actions .btn { min-height: 46px; }
  .onb-step:has(.onb-slide) .onb-skip { padding: 4px; }
  .onb-step:has(.onb-slide) .onb-actions .hint { margin: 0; }
  .onb-foot { padding: 0 16px 8px; font-size: 12.5px; }
}
/* short phones (≈640px visible): drop the secondary line, tighten the demo a bit more */
@media (max-width: 560px) and (max-height: 700px) {
  .onb-slide .onb-point { display: none; }
  .onb-slide h1 { font-size: 21px; }
  .onb-slide .onb-sub { font-size: 14px; }
  .onb-slide .chat-b { font-size: 13px; padding: 6px 9px; }
  .onb-slide .lead-card dl { font-size: 13px; }
}

/* start page before the slides: what is sold in one picture — the master at work while the bot answers a client in WhatsApp
   (Andrey's review 03.12), one line, three facts — one screen */
.onb-hero { align-items: center; justify-content: center; text-align: center; gap: 14px; }
.hero-scene { position: relative; align-self: stretch; height: 250px; flex: none; border-radius: 24px; background: #FFEDD5; overflow: hidden; }
.hero-scene > img { position: absolute; bottom: 6px; inset-inline-end: 8px; height: calc(100% - 14px); width: auto; }
.hero-wa { position: absolute; top: 14px; inset-inline-start: 12px; width: min(200px, 56%); display: grid; overflow: hidden; border-radius: 14px; background: #EFEAE2; box-shadow: 0 6px 18px rgba(15, 23, 42, .18); text-align: start; }
.hero-wa-top { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #075E54; color: #fff; font-size: 12px; font-weight: 600; }
.hero-wa-top i { width: 16px; height: 16px; border-radius: 99px; background: #25D366; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.hero-wa-body { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.hero-wa .chat-b { max-width: 92%; padding: 6px 9px; font-size: 12.5px; line-height: 1.35; }
.hero-wa .chat-b b { font-size: 11px; }
.hero-wa .chat-b.bot { animation-delay: .5s; }
.onb-hero h1 { font-size: 34px; line-height: 1.15; }
.onb-hero .onb-sub { max-width: 360px; font-size: 19px; line-height: 1.45; color: var(--ink); }
.hero-points { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 10px; text-align: start; font-size: 18px; font-weight: 500; color: var(--ink); }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; flex: none; width: 24px; height: 24px; background: no-repeat center / 24px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%2316A34A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.onb-hero .onb-actions { align-self: stretch; margin-top: 18px; }
.onb-hero .onb-actions .hint { margin: 0; }
@media (max-height: 700px) {
  .onb-hero { gap: 10px; }
  .hero-scene { height: 200px; }
  .onb-hero h1 { font-size: 29px; }
  .onb-hero .onb-sub { font-size: 17px; }
  .hero-points { font-size: 16.5px; gap: 7px; }
  .onb-hero .onb-actions { margin-top: 10px; }
}

/* phone and details steps: one phone screen without scrolling (≈390×680 and 360×640), found-note and amber plates included */
@media (max-width: 560px) {
  form.onb-step { gap: 10px; }
  form.onb-step h1 { font-size: 24px; line-height: 1.2; }
  form.onb-step .onb-sub { font-size: 14.5px; line-height: 1.4; }
  form.onb-step .ok { font-size: 13.5px; line-height: 1.4; padding: 8px 10px; border-radius: 12px; background: var(--found-soft); }
  form.onb-step .field { gap: 3px; }
  form.onb-step .field input, form.onb-step .field textarea, form.onb-step .country-btn { min-height: 44px; padding-block: 8px; font-size: 16px; }
  form.onb-step .field textarea.grow { line-height: 1.3; }
  form.onb-step .taken { gap: 8px; }
  form.onb-step .taken-note { gap: 10px; padding: 12px; }
  form.onb-step .taken-head { gap: 10px; }
  form.onb-step .taken-head > div { gap: 2px; }
  form.onb-step .taken-head b { font-size: 15px; }
  form.onb-step .taken-head span { font-size: 13px; line-height: 1.35; }
  form.onb-step .taken-icon { flex-basis: 32px; height: 32px; }
  form.onb-step .taken > .hint { font-size: 13px; line-height: 1.35; }
  form.onb-step .onb-actions { padding-top: 2px; gap: 6px; }
  form.onb-step .onb-actions .btn { min-height: 46px; }
  form.onb-step .onb-actions .hint { margin: 0; }
}
@media (max-width: 560px) and (max-height: 700px) {
  form.onb-step { gap: 8px; }
  form.onb-step h1 { font-size: 22px; }
  form.onb-step .onb-sub, form.onb-step .ok { font-size: 13.5px; }
  form.onb-step .field input, form.onb-step .field textarea, form.onb-step .country-btn { min-height: 42px; }
  form.onb-step .field label { font-size: 12.5px; }
}

/* intro pages on a phone (start + 3 slides): the main button stays in the same place on every page —
   actions pinned to the bottom, the line under the button has one height, the slide picture takes the free space */
@media (max-width: 560px) {
  .onb-slide { flex: 1; min-height: 0; }
  .onb-slide .chat { flex: 1; }
  .onb-step:has(.onb-slide) .onb-actions, .onb-hero .onb-actions { margin-top: auto; }
  .onb-step:has(.onb-slide) .onb-actions .onb-skip, .onb-step:has(.onb-slide) .onb-actions .hint, .onb-hero .onb-actions .hint {
    min-height: 30px; margin: 0; padding: 0 4px; display: grid; place-items: center;
  }
  .onb-hero { justify-content: flex-start; }
  .hero-scene { margin-top: auto; }
  .onb-slide .chat.lead { flex: none; }
}
/* «Заявки» → «Переписки»: все разговоры WhatsApp с метками; открытая переписка — как в WhatsApp (клиент слева, бот и вы справа) */
.chat-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; text-align: start; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.chat-row .av, .cv-head .av { width: 42px; height: 42px; border-radius: 99px; background: var(--sunk); color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.chat-row .who { flex: 1; min-width: 0; display: grid; }
.chat-row .who b { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .last { color: var(--body); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chat-row .tag { font-size: 11.5px; }
.chat-row .when { font-size: 12px; color: var(--mute); flex: 0 0 auto; }
.tag.t-lead { background: var(--found-soft); color: var(--found-ink); }
.tag.t-q { background: var(--warn-chip); color: var(--warn); }
.tag.t-you { background: var(--go-soft); color: var(--go-ink); }
.tag.t-err { background: var(--bad-soft); color: var(--bad); }
.you-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--go-soft); border: 1.5px solid color-mix(in srgb, var(--go) 35%, transparent); color: var(--go-ink); margin: 4px 0 6px; }
.you-bar > div { flex: 1; min-width: 0; display: grid; }
.you-bar b { font-size: 14px; }
.you-bar span { font-size: 12.5px; }
.you-bar .btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; flex: 0 0 auto; }
.chat-sheet { display: flex; flex-direction: column; gap: 0; padding: 0; height: calc(100vh - 70px); height: calc(100dvh - 70px); max-height: none; overflow: hidden; }
.chat-sheet .you-bar { margin: 0 16px 10px; }
.cv-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.cv-head .who { flex: 1; min-width: 0; display: grid; }
.cv-head b { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-head .who span { font-size: 13px; color: var(--mute); }
.cv-x { width: 40px; height: 40px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--body); display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.cv-x .ic { width: 18px; height: 18px; }
.cv-feed { flex: 1; min-height: 0; overflow-y: auto; background: #EFEAE2; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.cv-feed .tc-b { font-size: 14.5px; }
.cv-feed .tc-item.cl .tc-b { border-start-start-radius: 4px; }
.cv-feed .tc-item.own .tc-b { background: #DBEAFE; }
.cv-feed .tc-b .by { font-style: normal; font-size: 11px; font-weight: 700; margin-bottom: 1px; }
.cv-feed .cl .by { color: #0F766E; }
.cv-feed .botm .by { color: #15803D; }
.cv-feed .own .by { color: #1D4ED8; }
.cv-feed .tc-item.mark-q, .cv-feed .tc-item.mark-l { justify-content: center; }
.cv-feed .tc-mark { font-size: 12px; padding: 4px 10px; }
.chat-sheet .lead-acts { padding: 10px 16px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .chat-sheet { width: 460px; height: calc(100vh - 100px); } }

/* заявка из «Проверить бота»: фиолетовая метка «Тест», видна сутки */
.lead.test { border-color: #C7D2FE; }
.lead.test .av { background: #E0E7FF; color: #4338CA; }
.tag.test, .leads-card .tag.test { background: #6366F1; color: #fff; font-weight: 700; }

/* меню «я»: язык — три кнопки с флагами, текущий выделен */
.menu-lang { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px 0 12px; }
.menu-lang button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 8px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.menu-lang button img { width: 20px; height: 14px; border-radius: 2px; flex: 0 0 auto; }
.menu-lang button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* переписка группы WhatsApp — метка «Группа» (D-0040) */
.t-group { background: #E0E7FF; color: #3730A3; }

/* «Кому отвечает бот»: режимы карточками-переключателями стоят на месте, под ними — настройки выбранного режима */
.rset { display: flex; flex-direction: column; gap: 8px; padding: 6px 14px 4px; }
.rmode { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.rmode[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.rdot { width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--faint); flex: 0 0 auto; display: grid; place-items: center; box-sizing: border-box; }
.rmode[aria-pressed="true"] .rdot { border-color: var(--accent); }
.rmode[aria-pressed="true"] .rdot::after { content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--accent); }
.rtx { display: grid; gap: 1px; min-width: 0; }
.rtx b { font-size: 15px; font-weight: 600; }
.rtx small { font-size: 12.5px; color: var(--mute); }
.rbody { margin: 4px 0 0; border-top: 1px solid var(--line-soft); }
.rbody .opt:first-child { border-top: 0; }
.rlist-t { display: block; padding: 10px 14px 6px; font-size: 14px; }
.rbody .pickd { padding: 0 14px 8px; }
.who-now { padding: 8px 14px 14px; margin: 0; }

/* Лимит помощника (как в бухгалтерии): плашка вверху с 80 % (жёлтая, закрывается) и на 100 % (красная), строка расхода под полем */
.as-limit, .chat-limit { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 12px; font-size: 13px; line-height: 1.45;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); }
.as-limit.out, .chat-limit.out { background: var(--bad-soft); color: var(--bad); border-bottom-color: var(--bad-line); }
.as-limit span, .chat-limit span { flex: 1; min-width: 0; }
.as-msg a, .msg .txt a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.as-limit a, .chat-limit a { color: inherit; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.as-limit button, .chat-limit button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; }
.as-usage, .chat-usage { margin: 0; padding: 0 16px 10px; font-size: 12px; color: var(--mute); }
.chips, .as-chips { position: relative; padding-inline-end: 38px; }
.chips .chips-x, .as-chips .chips-x { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 99px;
  background: none; color: var(--mute); font-size: 20px; line-height: 1; cursor: pointer; }
.chips .chips-x:hover, .as-chips .chips-x:hover { background: var(--sunk); color: var(--ink); }
/* a section opened by a link (/billing#card) stops below the sticky header, not under it */
.main [id] { scroll-margin-top: 72px; }
/* assistant page: the chat fills the screen between the header and the bottom menu, an empty conversation included */
.main.asp .card.chat { height: calc(100vh - 58px - 16px - 96px); height: calc(100dvh - 58px - 16px - 96px); min-height: 420px; }
.main.asp .thread { flex: 1; min-height: 0; max-height: none; }
@media (min-width: 900px) { .main.asp .card.chat { height: calc(100vh - 58px - 60px); height: calc(100dvh - 58px - 60px); } }
.chat-usage { padding: 8px 12px; background: var(--surface); }
/* «Тариф и оплата»: лимит помощника в кабинете — под тарифом, в стиле карточки */
.bl-limit { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.bl-limit .btn.sm { align-self: flex-start; }
.bl-plans { margin-top: 14px; }
.bl-plan-list { display: grid; gap: 10px; }
.bl-plan-opt { display: flex; flex-direction: column; gap: 6px; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; }
.bl-plan-opt.on { border-color: var(--go); background: var(--go-soft); }
.bl-plan-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-plan-price { font-size: 18px; font-weight: 700; color: var(--ink); }
.bl-plan-opt .btn { margin-top: auto; }
.bl-plan-confirm { display: grid; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.bl-plan-confirm textarea { width: 100%; resize: vertical; }
@media (min-width: 900px) { .bl-plan-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bl-limit-top { display: flex; justify-content: space-between; gap: 12px; }
.bl-limit .meter { background: var(--surface); border: 1px solid var(--line); }
.bl-limit .meter i { background: var(--accent); }
.bl-limit .meter.warn i { background: var(--warn-edge); }
.bl-limit .meter.out i { background: var(--bad); }
.bl-limit p.hint { margin: 2px 0 0; }
/* «Как это работает» под лимитом — пояснение раскрывается по нажатию, одно за раз */
.bl-how { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 0; padding: 2px 0; border: 0; background: none;
  font: inherit; font-size: 13px; color: var(--accent-ink); cursor: pointer; }
.bl-how .ic { width: 16px; height: 16px; transition: transform .15s; }
.bl-how.open .ic { transform: rotate(180deg); }
.bl-limit p.bl-tip { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--sunk); }

/* кабинет поддержки (D-0047): своя шапка, бизнесы карточками, действия — кнопка и одна строка «что случится» */
.adm { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--screen); }
.adm-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: max(8px, env(safe-area-inset-top)) 16px 10px;
  background: var(--surface); border-bottom: 1px solid var(--line); }
.adm-bar .logo { flex: 0 0 auto; }
.adm-nav { flex: 1; display: flex; gap: 4px; }
.adm-nav a { padding: 7px 12px; border-radius: 99px; text-decoration: none; color: var(--body); font-size: 14px; font-weight: 600; }
.adm-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.adm-main { max-width: 860px; padding-bottom: 40px; }
.adm-col { display: grid; gap: 12px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-head h1 { margin: 0; }
.adm-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-filters input, .adm-filters select { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); }
.adm-search { flex: 1 1 240px; min-width: 0; }
.adm-row { text-decoration: none; color: var(--ink); gap: 4px; }
.adm-row:hover { border-color: var(--accent); }
.adm-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-row-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); flex-wrap: wrap; }
.adm-stage { font-size: 13px; color: var(--warn); font-weight: 600; min-height: 1.4em; }
.adm-stage.done { color: var(--mute); font-weight: 400; }
.adm-person:hover { border-color: var(--line); }
.tag.st-trial { background: var(--accent-soft); color: var(--accent-ink); }
.tag.st-active { background: var(--found-soft); color: var(--found-ink); }
.tag.st-past_due, .tag.st-canceled { background: var(--bad-soft); color: var(--bad); }
.tag.st-expired { background: var(--warn-chip); color: var(--warn); }
.adm-back { color: var(--accent-ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.adm-hero h1 { margin: 0 0 2px; font-size: 20px; }
.adm-hero .btn { justify-self: start; }
.adm-act { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.adm-act .btn { justify-self: start; }
.adm-act .hint { margin: 0; }
.adm-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.adm-num { width: 80px; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); }
.adm-custom { display: grid; gap: 10px; }
.adm-sub { font-size: 14px; }
.adm-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .adm-grid { grid-template-columns: 1fr 1fr; } }
.adm-log { display: grid; gap: 3px; font-size: 14px; }
section.card .adm-log { padding-top: 10px; border-top: 1px solid var(--line-soft); }
.adm-log a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.adm-dlg { gap: 10px; }
.adm-dlg p { margin: 0; }
@media (min-width: 900px) {
  .adm-dlg { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 460px; max-height: 85vh; }
  [dir="rtl"] .adm-dlg { transform: translate(50%, -50%); inset: 50% 50% auto auto; }
}
.adm-diff { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.adm-diff div { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.adm-diff s { color: var(--mute); }
.adm-diff b::before { content: "→ "; color: var(--mute); font-weight: 400; }
[dir="rtl"] .adm-diff b::before { content: "← "; }
/* поддержка в кабинете бизнеса */
.sup-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 12px; background: var(--side); color: var(--side-on); font-size: 13.5px; }
.sup-bar a { color: var(--side-on); font-weight: 600; }
.adm-bar .btn { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.adm-head .btn, .adm-hero .btn, .adm-act .btn { flex: 0 0 auto; width: auto; }
.adm-filters select { flex: 1 1 140px; }
@media (max-width: 560px) {
  .adm-bar { gap: 8px; padding-inline: 12px; }
  .adm-bar .logo span { display: none; }
  .adm-nav a { padding: 6px 9px; }
}
/* «Интеграции» (D-0048): вкладки, карточки ассистентов строками списка, ключи и подключения, окно инструкции */
.int-tabs { margin-bottom: 2px; }
.int-col { display: grid; gap: 12px; }
.int-col .hint { margin: 0; }
button.li.int-card { width: 100%; border: 0; border-top: 1px solid var(--line-soft); background: none; font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
button.li.int-card b { display: block; }
button.li.int-card .arr { color: var(--faint); font-size: 20px; }
.int-row { flex-wrap: wrap; }
.int-state { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.int-state.active { color: var(--go); }
.int-empty { padding: 14px 16px; margin: 0; }
.int-info { display: grid; gap: 0; padding: 4px 16px 12px; }
.int-info .kv:first-child { border-top: 0; }
.int-info code, .int-dlg code { overflow-wrap: anywhere; font-size: 13px; }
.int-docs { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--accent-ink); font-weight: 600; text-decoration: none; font-size: 14px; }
.int-docs small { color: var(--mute); font-weight: 400; font-size: 12.5px; }
.int-dlg { display: grid; gap: 10px; max-height: 88vh; overflow-y: auto; }
.int-dlg p { margin: 0; }
@media (min-width: 900px) { .int-dlg { width: 460px; } }
.int-copy { display: flex; gap: 8px; align-items: center; }
.int-copy input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; background: var(--sunk); color: var(--ink); }
.int-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 14px; color: var(--body); }
.int-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
