:root {
    --ink: #152033;
    --ink-2: #354158;
    --muted: #6f7b91;
    --line: #e5eaf2;
    --line-strong: #d8dfeb;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --canvas: #f1f4f9;
    --navy: #111b2e;
    --navy-2: #192640;
    --blue: #3767f0;
    --blue-dark: #2853cf;
    --blue-soft: #edf2ff;
    --purple: #7d55e7;
    --purple-soft: #f2edff;
    --brand-coral: #ff5964;
    --brand-orange: #ff9d23;
    --brand-soft: #fff3ed;
    --green: #199c68;
    --green-soft: #e9f8f1;
    --amber: #c67a14;
    --amber-soft: #fff5df;
    --danger: #d3424b;
    --danger-soft: #fff0f1;
    --shadow-sm: 0 1px 2px rgba(20, 32, 54, .04), 0 7px 22px rgba(20, 32, 54, .05);
    --shadow-md: 0 18px 48px rgba(20, 32, 54, .12);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sidebar: 276px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: Manrope, Arial, sans-serif; font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.modal-open, body.sidebar-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, .brand__copy strong { font-family: Onest, Manrope, sans-serif; letter-spacing: -.035em; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 3vw, 43px); line-height: 1.08; font-weight: 800; }
h2 { margin-bottom: 9px; font-size: 24px; line-height: 1.18; font-weight: 750; }
h3 { margin-bottom: 7px; font-size: 18px; line-height: 1.25; }
p { margin-bottom: 0; color: var(--muted); }
svg.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.icon-sprite { position: fixed; width: 0; height: 0; overflow: hidden; pointer-events: none; }
[hidden] { display: none !important; }

.marketing-body { min-width: 320px; background: #fff; }
.app-body { min-width: 320px; background: var(--canvas); }
.auth-body { min-width: 320px; min-height: 100vh; background: #f4f7fb; }
.landing-container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand__mark { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; overflow: hidden; border-radius: 13px; box-shadow: 0 8px 22px rgba(255, 103, 67, .25); }
.brand__mark img { width: 100%; height: 100%; }
.brand__copy { display: grid; line-height: 1.12; }
.brand__copy strong { font-size: 20px; font-weight: 800; }
.brand__copy small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.brand--light { color: #fff; }
.brand--light .brand__copy small { color: #9eabc2; }
.brand--compact .brand__mark { width: 38px; height: 38px; flex-basis: 38px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 10px 17px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; line-height: 1.2; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(55, 103, 240, .22); outline-offset: 2px; }
.button--primary { color: #fff; background: linear-gradient(135deg, #4775f5, #315fdf); box-shadow: 0 9px 22px rgba(49, 95, 223, .22); }
.button--primary:hover { background: linear-gradient(135deg, #3e6bec, #2853cf); }
.button--secondary { border-color: var(--line-strong); background: #fff; box-shadow: 0 1px 2px rgba(20, 32, 54, .03); }
.button--secondary:hover { border-color: #bfc9d9; background: #fbfcfe; }
.button--ghost { border-color: transparent; color: var(--ink-2); background: transparent; }
.button--ghost:hover { background: #edf1f7; }
.button--dark { color: #fff; background: var(--navy); }
.button--dark:hover { background: #1b2a46; }
.button--warning { color: #8b580c; border-color: #f0d19a; background: var(--amber-soft); }
.button--danger { color: #fff; background: var(--danger); }
.button--danger-ghost { color: var(--danger); border-color: #f0c5c8; background: #fff; }
.button--vk { color: #fff; background: #087bf0; box-shadow: 0 9px 22px rgba(8, 123, 240, .2); }
.button--sidebar { width: 100%; justify-content: flex-start; color: #b9c5d9; background: transparent; }
.button--sidebar:hover { color: #fff; background: rgba(255,255,255,.07); }
.button--small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button--large { min-height: 52px; padding: 14px 22px; border-radius: 13px; font-size: 16px; }
.button--block { width: 100%; }
.button--disabled { color: #8792a5; border-color: #dfe4ec; background: #edf1f6; box-shadow: none; cursor: not-allowed; pointer-events: none; }
.icon-button { display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 10px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); border-color: var(--line); background: var(--surface-soft); }

.badge { display: inline-flex; width: fit-content; min-height: 27px; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; color: #4c5870; background: #edf1f6; font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(128, 139, 158, .13); }
.badge--success { color: #167953; background: var(--green-soft); }
.badge--warning { color: #9a610c; background: var(--amber-soft); }
.badge--danger { color: #b9353e; background: var(--danger-soft); }
.badge--blue, .badge--primary { color: #315dce; background: var(--blue-soft); }
.badge--purple { color: #6b47ce; background: var(--purple-soft); }
.badge--neutral { color: #677388; background: #eff2f6; }
.count-badge { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 800; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-heading h2 { margin-bottom: 0; }
.card-heading a { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-size: 13px; font-weight: 800; }
.card-icon, .usage-card__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.page-stack { display: grid; gap: 22px; }
.page-header { display: flex; min-height: 72px; align-items: flex-end; justify-content: space-between; gap: 28px; }
.page-header p { max-width: 720px; font-size: 15px; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 13px; color: var(--muted); font-size: 13px; font-weight: 750; }
.back-link:hover { color: var(--blue); }
.title-with-status, .heading-with-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.title-with-status h1, .heading-with-status h2 { margin-bottom: 0; }

.field { display: grid; gap: 7px; min-width: 0; }
.field__label { color: var(--ink-2); font-size: 13px; font-weight: 800; }
.field__label small { color: #8b95a8; font-weight: 600; }
.field input, .field textarea, .field select, .search-field input, .compact-field select, .chat-compose textarea, .operator-compose textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--ink); background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.field input, .field select { height: 46px; padding: 0 13px; }
.field textarea, .chat-compose textarea, .operator-compose textarea { min-height: 96px; padding: 12px 13px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .search-field input::placeholder { color: #a0a9b8; }
.field input:focus, .field textarea:focus, .field select:focus, .search-field input:focus, .compact-field select:focus, .chat-compose textarea:focus, .operator-compose textarea:focus { border-color: #7998f4; outline: none; box-shadow: 0 0 0 4px rgba(55, 103, 240, .1); }
.field__control { position: relative; display: flex; align-items: center; }
.field__control > .icon { position: absolute; left: 13px; z-index: 1; color: #8b96a9; }
.field__control input { padding-left: 42px; padding-right: 44px; }
.field__hint, .field__counter { color: #8490a4; font-size: 11px; }
.field__counter { justify-self: end; margin-top: -4px; }
.field__error, .message-error, .document-row__error { color: var(--danger); font-size: 12px; font-weight: 700; }
.password-toggle { position: absolute; right: 5px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; color: #8490a4; background: transparent; }
.form-stack { display: grid; gap: 17px; }
.form-grid { display: grid; gap: 15px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--key { grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); }
.form-actions, .form-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 3px; }
.form-between { justify-content: space-between; }
.form-help { color: var(--muted); font-size: 12px; }
.check-control { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.check-control input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.check-control span { display: grid; gap: 2px; }
.check-control small { color: var(--muted); font-size: 11px; }
.check-control a { color: var(--blue); font-weight: 750; }
.switch-row { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switch-row > span { display: grid; gap: 2px; }
.switch-row strong { font-size: 13px; }
.switch-row small { color: var(--muted); font-size: 11px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; width: 43px; height: 24px; flex: 0 0 43px; border-radius: 999px; background: #cdd4df; transition: .2s; }
.switch-row i b { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .2s; }
.switch-row input:checked + i { background: var(--blue); }
.switch-row input:checked + i b { transform: translateX(19px); }
.readonly-control { display: grid; min-height: 67px; align-content: center; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.readonly-control strong { font-size: 13px; }
.readonly-control small { color: var(--muted); font-size: 11px; }

.alert { display: flex; position: relative; z-index: 2; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid; border-radius: 13px; font-size: 13px; box-shadow: var(--shadow-sm); }
.alert > .icon { margin-top: 2px; }
.alert > div { flex: 1; }
.alert strong { display: block; margin-bottom: 2px; }
.alert p, .alert li { color: inherit; }
.alert ul { margin: 5px 0 0; padding-left: 18px; }
.alert .icon-button { width: 30px; height: 30px; flex-basis: 30px; }
.alert--success { color: #126d4b; border-color: #bde7d5; background: #eefaf5; }
.alert--danger { color: #a92f38; border-color: #f0c6c9; background: #fff4f4; }
.alert--warning { color: #87550b; border-color: #f0d39e; background: #fff9eb; }
.security-note { display: flex; gap: 11px; padding: 12px 14px; border: 1px solid #dbe4fa; border-radius: 11px; color: #4562a7; background: #f4f7ff; }
.security-note .icon { margin-top: 1px; }
.security-note p { display: grid; color: inherit; font-size: 11px; }
.security-note strong { font-size: 12px; }

.empty-state { display: grid; min-height: 250px; place-items: center; align-content: center; padding: 36px 20px; text-align: center; }
.empty-state__icon { display: grid; width: 58px; height: 58px; margin-bottom: 14px; place-items: center; border-radius: 17px; color: var(--blue); background: var(--blue-soft); }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { max-width: 500px; font-size: 13px; }
.empty-state__action, .empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-top: 18px; }

/* Marketing */
.landing-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(224,229,238,.7); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); }
.landing-header__inner { display: flex; height: 76px; align-items: center; justify-content: space-between; gap: 28px; }
.landing-header__nav { display: flex; align-items: center; gap: 27px; color: #4f5b70; font-size: 13px; font-weight: 700; }
.landing-header__nav a:hover { color: var(--blue); }
.landing-header__actions { display: flex; gap: 8px; }
.landing-menu-button { display: none; }
.landing-mobile-menu { display: none; }
.hero { position: relative; overflow: hidden; padding: 88px 0 92px; background: radial-gradient(circle at 78% 25%, #eef0ff 0, transparent 32%), linear-gradient(180deg, #fff, #f8faff); }
.hero::before { position: absolute; inset: auto -10% -150px; height: 270px; border-radius: 50%; background: #eef3fb; content: ''; filter: blur(10px); }
.hero__grid { display: grid; position: relative; grid-template-columns: minmax(0, 1fr) minmax(480px, .92fr); align-items: center; gap: 72px; }
.hero__copy h1 { max-width: 660px; margin: 18px 0; font-size: clamp(44px, 5.2vw, 72px); line-height: .99; }
.hero__copy > p { max-width: 610px; font-size: 18px; line-height: 1.65; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #dfe6fb; border-radius: 999px; color: #395cb4; background: #f6f8ff; font-size: 12px; font-weight: 800; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero__checks { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 24px 0 0; padding: 0; color: #5a667a; font-size: 12px; font-weight: 650; list-style: none; }
.hero__checks li, .hero__checks > span { display: flex; align-items: center; gap: 7px; }
.hero__checks .icon { color: var(--green); }
.hero-preview { position: relative; min-height: 510px; }
.hero-preview__glow { position: absolute; inset: 10% 6%; border-radius: 50%; background: rgba(101, 96, 232, .22); filter: blur(60px); }
.preview-window { position: relative; z-index: 2; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 22px; background: #fff; box-shadow: 0 32px 70px rgba(32, 46, 79, .18); transform: rotate(1.2deg); }
.preview-window__bar { display: flex; height: 48px; align-items: center; gap: 6px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.preview-window__bar i { width: 8px; height: 8px; border-radius: 50%; background: #d2d8e2; }
.preview-layout { display: grid; min-height: 405px; grid-template-columns: 126px 1fr; }
.preview-layout > aside { display: flex; flex-direction: column; gap: 11px; padding: 22px 13px; color: #8995a9; background: #16223a; }
.preview-layout > aside strong, .preview-layout > aside span { display: flex; align-items: center; gap: 6px; line-height: 1.2; }
.preview-layout > aside strong { margin-bottom: 4px; color: #fff; }
.preview-layout > aside span { font-size: 13px; }
.preview-layout > aside .is-active { color: #fff; }
.preview-layout > aside div { height: 10px; margin-bottom: 14px; border-radius: 5px; background: rgba(255,255,255,.1); }
.preview-chat { display: grid; min-width: 0; padding: 22px; background: #f4f7fb; grid-template-rows: auto 1fr auto; }
.preview-chat > header { display: grid; align-items: center; gap: 10px; margin-bottom: 22px; grid-template-columns: auto minmax(0, 1fr) auto; }
.preview-chat > header > div { display: grid; min-width: 0; gap: 2px; }
.preview-chat > header strong, .preview-chat > header small { display: block; overflow: hidden; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.preview-chat > header strong { color: var(--ink); font-size: 13px; }
.preview-chat > header small { color: var(--muted); font-size: 10px; }
.preview-chat > header .badge { padding: 6px 8px; font-size: 9px; white-space: nowrap; }
.preview-chat__body { display: grid; gap: 12px; align-content: start; }
.preview-message { max-width: 82%; padding: 11px 13px; border-radius: 14px; font-size: 12px; line-height: 1.55; box-shadow: 0 5px 15px rgba(29, 43, 71, .06); }
.preview-message small { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; font-weight: 800; }
.preview-message--customer { justify-self: end; color: #fff; background: var(--blue); border-bottom-right-radius: 4px; }
.preview-message--ai { justify-self: start; border: 1px solid var(--line); background: #fff; border-bottom-left-radius: 4px; }
.preview-message--ai small { color: var(--purple); }
.preview-chat > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #fff; font-size: 11px; }
.preview-float { position: absolute; z-index: 4; display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-md); font-size: 11px; font-weight: 800; }
.preview-float--top { top: 52px; right: -26px; }
.preview-float--bottom { bottom: 28px; left: -30px; }
.preview-float .icon { color: var(--green); }
.preview-float > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; background: var(--green-soft); place-items: center; }
.preview-float > div { display: grid; gap: 2px; }
.preview-float strong, .preview-float small { display: block; line-height: 1.2; white-space: nowrap; }
.preview-float small { color: var(--muted); font-size: 9px; font-weight: 650; }
.business-strip { position: relative; padding: 22px 0; border-block: 1px solid var(--line); color: #7a8597; background: #fff; font-size: 12px; font-weight: 750; }
.business-strip .landing-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 42px; }
.business-strip p { margin: 0; }
.business-strip .landing-container > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 26px; }
.business-strip .landing-container > div span { position: relative; white-space: nowrap; }
.business-strip .landing-container > div span + span::before { position: absolute; top: 50%; left: -15px; width: 4px; height: 4px; border-radius: 50%; background: #c2cad7; content: ''; transform: translateY(-50%); }
.landing-section { padding: 88px 0; }
.landing-section--soft { background: #f6f8fb; }
.section-heading { max-width: 670px; margin-bottom: 38px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 46px); }
.section-heading p { font-size: 16px; }
.section-heading--center { margin-inline: auto; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { position: relative; min-height: 260px; padding: 25px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-sm); }
.feature-card--wide { grid-column: span 2; }
.feature-card--dark { color: #fff; border-color: #263753; background: linear-gradient(145deg, #17243c, #101a2d); }
.feature-card--dark p { color: #acb8ca; }
.feature-card__icon { display: grid; width: 48px; height: 48px; margin-bottom: 35px; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.feature-card__icon--purple { color: var(--purple); background: var(--purple-soft); }
.feature-card__icon--green { color: var(--green); background: var(--green-soft); }
.feature-card__number { position: absolute; top: 22px; right: 24px; color: #d9dfeb; font-family: Onest, sans-serif; font-size: 42px; font-weight: 800; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps-grid article { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.step-number { display: grid; width: 34px; height: 34px; margin-bottom: 25px; place-items: center; border-radius: 10px; color: #fff; background: var(--navy); font-weight: 800; }
.channels-section { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; }
.channel-cards { display: grid; gap: 13px; }
.channel-card { display: flex; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; opacity: .7; }
.channel-card--vk { opacity: 1; border-color: #bedafb; box-shadow: var(--shadow-sm); }
.channel-card > div { flex: 1; }
.channel-logo { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; color: #fff; background: #087bf0; font-weight: 900; }
.channel-logo--tg { background: #2aabee; }
.channel-logo--max { background: #6a4cf2; }
.landing-cta { padding: 0 0 80px; }
.landing-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 35px; padding: 45px 48px; border-radius: 25px; color: #fff; background: radial-gradient(circle at 80% 10%, rgba(109,93,238,.45), transparent 35%), var(--navy); box-shadow: var(--shadow-md); }
.landing-cta__inner p { color: #abb7ca; }
.landing-footer { padding: 42px 0; color: #dce3ef; background: #0f1829; }
.landing-footer .landing-container { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 30px; }
.landing-footer p, .landing-footer small { color: #8f9cb1; font-size: 12px; }
.landing-footer nav { display: flex; gap: 20px; color: #b8c2d1; font-size: 12px; }
.landing-footer small { grid-column: 1 / -1; }

/* Auth */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .82fr) minmax(520px, 1.18fr); }
.auth-aside { position: relative; display: grid; overflow: hidden; min-height: 100vh; align-content: space-between; padding: 42px clamp(32px, 5vw, 74px); color: #fff; background: radial-gradient(circle at 18% 18%, rgba(255,100,73,.28), transparent 31%), radial-gradient(circle at 90% 75%, rgba(255,157,35,.13), transparent 35%), linear-gradient(150deg, #172641, #0f1829); }
.auth-aside__orbs::before, .auth-aside__orbs::after { position: absolute; border-radius: 50%; content: ''; filter: blur(2px); }
.auth-aside__orbs::before { right: -100px; bottom: 10%; width: 300px; height: 300px; background: rgba(255,139,42,.12); }
.auth-aside__orbs::after { top: 26%; left: -90px; width: 220px; height: 220px; background: rgba(255,85,100,.1); }
.auth-aside__content { position: relative; z-index: 1; max-width: 480px; }
.auth-aside__content h1 { font-size: clamp(38px, 4.5vw, 61px); }
.auth-aside__content p { color: #afbbce; font-size: 16px; }
.auth-aside__mark { display: grid; width: 60px; height: 60px; margin-bottom: 28px; place-items: center; overflow: hidden; border-radius: 18px; box-shadow: 0 18px 35px rgba(255,104,57,.22); }
.auth-aside__mark img { width: 100%; height: 100%; }
.auth-aside__security { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #93a1b7; font-size: 12px; }
.auth-main { display: grid; position: relative; padding: 35px; place-items: center; }
.auth-shell__brand { position: absolute; top: 30px; left: 34px; display: none; }
.auth-card { width: min(480px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 22px 60px rgba(29, 45, 75, .1); }
.auth-card--wide { width: min(540px, 100%); }
.auth-card > .alert { margin-bottom: 18px; }
.auth-card__heading { margin: 20px 0 25px; }
.auth-card__heading h1 { font-size: 35px; }
.auth-card__switch { margin-top: 22px; text-align: center; font-size: 13px; }
.auth-card__switch a { color: var(--blue); font-weight: 800; }
.auth-divider { display: flex; align-items: center; gap: 13px; margin: 24px 0 15px; color: #8b96a8; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ''; }
.social-auth__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.social-button { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-size: 12px; font-weight: 800; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.social-button:hover { transform: translateY(-1px); border-color: #bdc8d8; box-shadow: 0 8px 18px rgba(21,32,51,.07); }
.social-button__icon { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 8px; color: #fff; font-size: 10px; font-style: normal; line-height: 1; }
.social-button--vk .social-button__icon { background: #087bf0; }
.social-button--yandex .social-button__icon { color: #fff; background: #fc3f1d; font-size: 15px; }
.social-button--max .social-button__icon { background: linear-gradient(145deg, #645cff, #22b9f4); }
.social-button.is-disabled { color: #929caf; background: #f7f8fb; cursor: not-allowed; opacity: .72; }
.social-button.is-disabled:hover { transform: none; box-shadow: none; }
.social-auth__note { display: block; margin-top: 10px; color: #8a95a8; text-align: center; font-size: 10px; line-height: 1.45; }
.social-auth__error { display: block; margin-top: 12px; text-align: center; }
.verification-card { width: min(500px, 100%); text-align: center; }
.verification-card .back-link { display: flex; width: fit-content; }
.verification-card__icon { display: grid; width: 58px; height: 58px; margin: 5px auto 16px; place-items: center; border-radius: 17px; color: #f35e49; background: var(--brand-soft); }
.verification-card .auth-card__heading { margin-top: 0; }
.verification-card .auth-card__heading p { max-width: 390px; margin-inline: auto; }
.verification-code-field { text-align: left; }
.verification-code-field input { height: 68px; border-color: #f2c6b4; background: #fffaf7; color: #df533e; font-family: Onest, monospace; font-size: 30px; font-weight: 800; letter-spacing: .34em; text-align: center; }
.verification-code-field input::placeholder { color: #e9b6a4; }
.verification-resend { display: grid; gap: 4px; margin-top: 12px; }
.verification-resend small { color: #909aac; font-size: 10px; }
.social-profile-preview { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 4px 0 20px; padding: 13px; border: 1px solid #cdebdc; border-radius: 14px; color: #13714e; background: #effaf5; }
.social-profile-preview__avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--brand-coral), var(--brand-orange)); font-weight: 850; }
.social-profile-preview > span:nth-child(2) { display: grid; min-width: 0; }
.social-profile-preview small, .social-profile-preview em { overflow: hidden; color: #5d806f; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.social-profile-preview strong { overflow: hidden; color: #153d2e; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; width: var(--sidebar); flex-direction: column; padding: 22px 16px 16px; color: #dbe3ef; background: linear-gradient(180deg, #16233b, #101a2d 72%); box-shadow: 8px 0 30px rgba(16,26,45,.08); }
.sidebar__head { display: flex; min-height: 56px; align-items: center; justify-content: space-between; padding: 0 8px; }
.sidebar__close { display: none; color: #bac5d5; }
.sidebar__nav { display: grid; gap: 5px; margin-top: 25px; }
.sidebar__eyebrow { margin: 0 10px 8px; color: #738199; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.sidebar__eyebrow--section { margin-top: 23px; }
.sidebar-link { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #aeb9ca; font-size: 13px; font-weight: 700; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.sidebar-link.is-active { color: #fff; background: linear-gradient(135deg, rgba(74,111,235,.28), rgba(88,78,213,.18)); box-shadow: inset 3px 0 0 #6d8fff; }
.sidebar__foot { display: grid; gap: 8px; margin-top: auto; }
.viewer-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 13px; background: rgba(255,255,255,.035); }
.viewer-card > span:nth-child(2) { display: grid; min-width: 0; }
.viewer-card strong, .viewer-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-card strong { font-size: 12px; }
.viewer-card small { color: #8190a8; font-size: 10px; }
.avatar { display: inline-grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; overflow: hidden; border-radius: 12px; color: #3159c5; background: #e8eeff; font-size: 12px; font-weight: 850; }
.avatar--viewer { width: 38px; height: 38px; flex-basis: 38px; color: #fff; background: linear-gradient(145deg, #4a72e6, #7453d4); }
.avatar--large { width: 56px; height: 56px; border-radius: 16px; font-size: 16px; }
.avatar--bot { color: #fff; background: linear-gradient(145deg, #4e75ed, #7554df); }
.sidebar-overlay { display: none; }
.app-shell__main { min-height: 100vh; margin-left: var(--sidebar); }
.app-content { width: min(1450px, 100%); margin: 0 auto; padding: 36px clamp(25px, 3.5vw, 54px) 70px; }
.app-content > .alert { margin-bottom: 18px; }
.mobile-header, .mobile-nav { display: none; }

/* Dashboard */
.welcome-card { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 28px; overflow: hidden; padding: 28px; }
.welcome-card__visual { position: relative; display: grid; width: 130px; height: 130px; place-items: center; border-radius: 25px; background: linear-gradient(145deg, #eef3ff, #f2edff); }
.welcome-card__visual > span { display: grid; z-index: 2; width: 68px; height: 68px; place-items: center; border-radius: 20px; color: #fff; background: linear-gradient(145deg, #5279ee, #7654dd); box-shadow: 0 16px 28px rgba(78,92,208,.26); }
.welcome-card__visual i { position: absolute; width: 18px; height: 18px; border-radius: 6px; background: rgba(67,105,230,.15); transform: rotate(20deg); }
.welcome-card__visual i:nth-child(2) { top: 16px; right: 18px; }
.welcome-card__visual i:nth-child(3) { bottom: 18px; left: 18px; }
.welcome-card__copy p { max-width: 700px; margin-bottom: 18px; }
.welcome-card > ul { margin: 0; padding: 18px 20px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; list-style: none; }
.welcome-card > ul li { display: flex; align-items: center; gap: 7px; margin: 8px 0; }
.welcome-card > ul .icon { color: var(--green); }
.bot-health { display: flex; align-items: center; gap: 18px; padding: 21px 23px; border-left: 4px solid #efb657; }
.bot-health--active { border-left-color: var(--green); }
.bot-health__icon { display: grid; width: 57px; height: 57px; flex: 0 0 57px; place-items: center; border-radius: 17px; color: #b37417; background: var(--amber-soft); }
.bot-health--active .bot-health__icon { color: var(--green); background: var(--green-soft); }
.bot-health__copy { flex: 1; }
.bot-health__copy > div { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.bot-health__copy h2 { margin-bottom: 3px; font-size: 19px; }
.bot-health__copy p { font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stats-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats-grid--admin { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat-card { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-card__icon { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 13px; color: var(--blue); background: var(--blue-soft); }
.stat-card__icon--purple { color: var(--purple); background: var(--purple-soft); }
.stat-card__icon--green { color: var(--green); background: var(--green-soft); }
.stat-card__icon--amber { color: var(--amber); background: var(--amber-soft); }
.stat-card__icon--danger { color: var(--danger); background: var(--danger-soft); }
.stat-card__copy { display: grid; min-width: 0; }
.stat-card__copy span, .stat-card__copy small { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.stat-card__copy strong { font-family: Onest, sans-serif; font-size: 24px; line-height: 1.2; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; }
.readiness-card, .usage-card, .issues-card, .recent-card { padding: 22px; }
.readiness-card .card-heading > strong { font-family: Onest, sans-serif; font-size: 22px; }
.progress { overflow: hidden; height: 8px; margin: 18px 0; border-radius: 999px; background: #edf1f6; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3d6eeb, #7055de); transition: width .5s ease; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check-list a { display: grid; min-height: 45px; grid-template-columns: 23px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; }
.check-list a > span { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid #cfd7e3; border-radius: 7px; }
.check-list a.is-done > span { color: #fff; border-color: var(--green); background: var(--green); }
.check-list a > .icon { color: #a0a9b8; }
.usage-card { display: grid; align-content: start; }
.usage-card__value { margin: 30px 0 5px; font-family: Onest, sans-serif; font-size: 29px; }
.usage-card p { margin-bottom: 18px; font-size: 11px; }
.usage-card > a { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 12px; font-weight: 800; }
.issues-card { display: grid; gap: 12px; }
.issue-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.issue-row > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: var(--danger); background: var(--danger-soft); }
.issue-row strong { font-size: 13px; }
.issue-row p { font-size: 11px; }
.issue-row > a { display: flex; align-items: center; gap: 4px; color: var(--blue); font-size: 12px; font-weight: 800; }
.conversation-list { display: grid; }
.conversation-list > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.conversation-list > a > div:nth-child(2) { min-width: 0; }
.conversation-list strong, .conversation-list p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list strong { font-size: 13px; }
.conversation-list p { font-size: 11px; }
.conversation-list > a > div:last-child { display: grid; justify-items: end; gap: 5px; }
.conversation-list time { color: #8d98aa; font-size: 10px; }

/* Bots and wizard */
.bots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.bot-card { display: grid; gap: 18px; padding: 20px; }
.bot-card > header { display: flex; align-items: center; justify-content: space-between; }
.bot-card__mark { display: grid; width: 49px; height: 49px; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #4e76ec, #7455dd); box-shadow: 0 10px 22px rgba(65,86,202,.2); }
.bot-card__copy h2 { margin-bottom: 3px; font-size: 19px; }
.bot-card__copy p { font-size: 12px; }
.bot-card__stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 13px 0; border-block: 1px solid var(--line); }
.bot-card__stats div { display: grid; }
.bot-card__stats div + div { padding-left: 15px; border-left: 1px solid var(--line); }
.bot-card__stats dt { color: var(--muted); font-size: 10px; }
.bot-card__stats dd { margin: 2px 0 0; font-family: Onest, sans-serif; font-size: 19px; font-weight: 750; }
.bot-card__channel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.bot-card__channel > div { display: grid; min-width: 0; }
.bot-card__channel strong, .bot-card__channel small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-card__channel strong { font-size: 12px; }
.bot-card__channel small { color: var(--muted); font-size: 10px; }
.vk-mini, .vk-button-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: #087bf0; font-size: 11px; font-weight: 900; }
.vk-button-mark { width: 25px; height: 25px; border-radius: 7px; background: rgba(255,255,255,.17); }
.new-bot-card { display: grid; min-height: 310px; place-items: center; align-content: center; padding: 25px; border: 2px dashed #cfd7e4; border-radius: var(--radius); text-align: center; transition: .18s; }
.new-bot-card:hover { border-color: #88a3ed; background: #f7f9ff; transform: translateY(-2px); }
.new-bot-card > span { display: grid; width: 51px; height: 51px; margin-bottom: 12px; place-items: center; border-radius: 15px; color: var(--blue); background: var(--blue-soft); }
.new-bot-card p { font-size: 11px; }
.wizard-layout { display: grid; grid-template-columns: 230px minmax(0, 820px); justify-content: center; gap: 24px; }
.wizard-steps { display: grid; align-content: start; gap: 0; padding-top: 8px; }
.wizard-steps button { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; padding: 9px; border: 0; border-radius: 11px; text-align: left; background: transparent; }
.wizard-steps button > span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #cfd7e3; border-radius: 10px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 800; }
.wizard-steps button > div { display: grid; }
.wizard-steps strong { font-size: 12px; }
.wizard-steps small { color: var(--muted); font-size: 10px; }
.wizard-steps button.is-active { background: #eaf0ff; }
.wizard-steps button.is-active > span { color: #fff; border-color: var(--blue); background: var(--blue); }
.wizard-steps > i { width: 1px; height: 25px; margin-left: 25px; background: #d9dfe9; }
.wizard-card { overflow: hidden; }
.wizard-card > section { padding: 28px; }
.wizard-card__heading { display: flex; gap: 14px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.wizard-card__heading p { font-size: 12px; }
.wizard-card__icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.wizard-card__icon--purple { color: var(--purple); background: var(--purple-soft); }
.wizard-card__icon--green { color: var(--green); background: var(--green-soft); }
.wizard-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 27px -28px -28px; padding: 17px 28px; border-top: 1px solid var(--line); background: #fafbfd; }
.choice-fieldset { margin: 0 0 17px; padding: 0; border: 0; }
.choice-fieldset legend { margin-bottom: 9px; font-size: 13px; font-weight: 800; }
.choice-cards { display: grid; gap: 10px; }
.choice-cards--three { grid-template-columns: repeat(3, 1fr); }
.choice-cards label { cursor: pointer; }
.choice-cards input { position: absolute; opacity: 0; }
.choice-cards label > span { display: grid; min-height: 87px; align-content: center; padding: 13px; border: 1px solid var(--line-strong); border-radius: 12px; transition: .15s; }
.choice-cards label > span small { color: var(--muted); font-size: 10px; }
.choice-cards input:checked + span { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 3px rgba(55,103,240,.1); }
.review-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fafbfd; }
.review-card > div { display: grid; }
.review-card small, .review-card p { font-size: 10px; }
.next-steps { display: grid; gap: 10px; margin-top: 22px; }
.next-steps > div { display: grid; grid-template-columns: 29px 1fr; gap: 10px; }
.next-steps > div > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.next-steps p { display: grid; font-size: 11px; }

/* Bot detail */
.section-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); scrollbar-width: none; }
.section-tabs a { flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
.section-tabs a:hover, .section-tabs a.is-active { color: var(--blue); background: var(--blue-soft); }
.anchor-section { scroll-margin-top: 20px; }
.bot-overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 18px; }
.bot-summary-card, .setup-list, .integration-panel, .settings-panel, .danger-zone { padding: 22px; }
.readiness-card--large .progress { margin: 16px 0; }
.setup-list { display: grid; gap: 7px; }
.setup-list a { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.setup-list a > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #7d899d; background: #edf1f6; font-size: 11px; font-weight: 800; }
.setup-list a.is-ready > span { color: #fff; background: var(--green); }
.setup-list a > div { display: grid; }
.setup-list strong { font-size: 12px; }
.setup-list small { color: var(--muted); font-size: 10px; }
.test-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.test-panel__intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 21px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #fff 0%, #faf9ff 58%, #f3f1ff 100%); box-shadow: var(--shadow-sm); }
.test-panel__copy { min-width: 0; }
.test-panel__copy .eyebrow { margin-bottom: 4px; }
.test-panel__copy h2 { margin-bottom: 5px; font-size: clamp(23px, 2.6vw, 30px); font-weight: 800; }
.test-panel__copy p { max-width: 780px; font-size: 14px; line-height: 1.55; }
.test-tips { display: flex; max-width: 340px; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin: 0; }
.test-tips span { width: 100%; color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; }
.test-tips button { min-height: 35px; padding: 7px 11px; border: 1px solid #d9d1f7; border-radius: 999px; color: #6549bd; background: rgba(255, 255, 255, .9); font-size: 12px; font-weight: 700; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.test-tips button:hover { border-color: #bcaef0; background: #fff; transform: translateY(-1px); }
.test-tips button:focus-visible { outline: 3px solid rgba(107, 71, 206, .18); outline-offset: 2px; }
.test-chat { display: grid; overflow: hidden; min-height: 560px; height: clamp(560px, calc(100vh - 310px), 720px); grid-template-rows: auto minmax(0, 1fr) auto auto; border: 1px solid #dbe2ee; border-radius: 19px; background: #fff; box-shadow: 0 18px 48px rgba(27, 45, 83, .1); }
.test-chat__header { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.test-chat__header > div { display: grid; min-width: 0; flex: 1; gap: 2px; }
.test-chat__header strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.test-chat__header small { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.test-chat__online { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(25, 159, 111, .12); }
.test-chat__clear { flex: 0 0 auto; }
.test-chat__messages { display: grid; overflow-y: auto; min-height: 0; max-height: none; align-content: start; gap: 12px; padding: 24px; overscroll-behavior: contain; scroll-behavior: smooth; background: radial-gradient(circle at 50% 0%, #fafbff 0%, #f4f7fb 52%, #f2f5fa 100%); }
.test-chat__messages:focus-visible { outline: 3px solid rgba(55, 103, 240, .16); outline-offset: -3px; }
.test-chat__empty { display: grid; min-height: 100%; max-width: 510px; justify-self: center; place-content: center; justify-items: center; gap: 7px; color: #758198; text-align: center; }
.test-chat__empty[hidden] { display: none; }
.test-chat__empty-icon { display: grid; width: 56px; height: 56px; margin-bottom: 5px; place-items: center; border: 1px solid #dce4f2; border-radius: 18px; color: var(--blue); background: #fff; box-shadow: var(--shadow-sm); }
.test-chat__empty strong { color: var(--ink); font-size: 17px; }
.test-chat__empty p { max-width: 430px; font-size: 13px; line-height: 1.5; }
.chat-bubble { display: grid; width: fit-content; max-width: min(78%, 760px); gap: 6px; padding: 12px 15px; border-radius: 16px; font-size: 14px; line-height: 1.55; box-shadow: 0 4px 15px rgba(28, 46, 81, .05); animation: chat-message-in .18s ease-out; }
.chat-bubble > span { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 800; }
.chat-bubble p { color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble small { display: block; margin: 0; opacity: .72; font-size: 11px; }
.chat-bubble--in { justify-self: start; border: 1px solid #dfe5ef; background: #fff; border-bottom-left-radius: 5px; }
.chat-bubble--out { justify-self: end; color: #fff; background: linear-gradient(135deg, #3767f0, #315be0); border-bottom-right-radius: 5px; box-shadow: 0 8px 22px rgba(55, 103, 240, .2); }
.chat-bubble--failed { opacity: .65; }
.chat-bubble__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.chat-bubble__meta .badge { min-height: 23px; padding: 4px 8px; font-size: 10px; }
.chat-bubble__sources { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.chat-bubble__sources strong { color: var(--ink-2); }
.chat-bubble__sources span { padding: 3px 7px; border-radius: 7px; background: #f0f3f8; }
.chat-bubble--typing { min-width: 114px; }
.chat-typing { display: flex; align-items: center; gap: 5px; min-height: 23px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8190aa; animation: chat-typing 1.1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .14s; }
.chat-typing i:nth-child(3) { animation-delay: .28s; }
.test-chat__error { margin: 10px 14px 0; padding: 10px 13px; border: 1px solid #f3c4c7; border-radius: 11px; color: #a92f39; background: #fff1f2; font-size: 13px; line-height: 1.45; }
.test-chat__error[hidden] { display: none; }
.chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px 10px; padding: 13px 14px 11px; border-top: 1px solid var(--line); background: #fff; }
.chat-compose textarea { min-height: 52px; max-height: 132px; padding: 14px 15px; resize: none; overflow-y: auto; font-size: 15px; line-height: 1.45; }
.chat-compose__send { min-width: 136px; min-height: 52px; }
.chat-compose__hint { grid-column: 1 / -1; padding-left: 3px; color: var(--muted); font-size: 11px; }
.chat-compose[aria-busy="true"] { background: #fbfcfe; }
.chat-compose button:disabled, .chat-compose textarea:disabled { opacity: .62; cursor: wait; }
@keyframes chat-message-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes chat-typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.connect-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 18px; }
.connect-steps { padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #fff, #f7faff); }
.connect-steps ol { display: grid; gap: 14px; margin: 22px 0; padding: 0; list-style: none; }
.connect-steps li { display: grid; grid-template-columns: 31px 1fr; gap: 10px; }
.connect-steps li > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; color: #fff; background: #087bf0; font-size: 11px; font-weight: 800; }
.connect-steps li > div { display: grid; }
.connect-steps li strong { font-size: 12px; }
.connect-steps li small { color: var(--muted); font-size: 10px; }
.connect-steps > a { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 11px; font-weight: 800; }
.connect-form { display: grid; align-content: start; gap: 15px; padding: 22px; border: 1px solid #cde1fa; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.connect-form > header { display: flex; gap: 11px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.connect-form > header > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; color: #087bf0; background: #eaf5ff; }
.connect-form > header p { font-size: 10px; }
.connection-card { overflow: hidden; padding: 22px; }
.connection-card__avatar { display: flex; align-items: center; gap: 13px; }
.connection-card__avatar img { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; }
.connection-card__avatar > div { display: grid; }
.connection-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.connection-checks > div { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.connection-checks > div > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #7d899d; background: #edf1f6; }
.connection-checks > div.is-ready > span { color: #fff; background: var(--green); }
.connection-checks p { display: grid; }
.connection-checks strong { font-size: 10px; }
.connection-checks small { font-size: 9px; }
.callback-details { margin-top: 17px; border-top: 1px solid var(--line); }
.callback-details summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 0 4px; color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; list-style: none; }
.callback-details > div { display: grid; grid-template-columns: 1fr 180px; gap: 10px; margin-top: 10px; }
.callback-details label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.copy-field { display: flex; align-items: center; }
.copy-field input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); font-size: 10px; }
.copy-field .icon-button { margin-left: -42px; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.vk-oauth-progress { display: grid; grid-template-columns: 1fr 56px 1fr 56px 1fr; align-items: center; gap: 10px; padding: 18px 22px; }
.vk-oauth-progress > div { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.vk-oauth-progress > div > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: #758197; background: #edf1f6; font-size: 12px; font-weight: 800; }
.vk-oauth-progress > div.is-done > span { color: #fff; background: var(--green); }
.vk-oauth-progress > div.is-current > span { color: #fff; background: #087bf0; box-shadow: 0 7px 16px rgba(8, 123, 240, .22); }
.vk-oauth-progress p { display: grid; }
.vk-oauth-progress strong { font-size: 12px; }
.vk-oauth-progress small { color: var(--muted); font-size: 9px; }
.vk-oauth-progress > i { height: 2px; border-radius: 2px; background: #dfe5ed; }
.vk-groups-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vk-group-card { display: grid; min-width: 0; gap: 18px; padding: 20px; }
.vk-group-card > header { display: flex; align-items: flex-start; justify-content: space-between; }
.vk-group-card__avatar { display: grid; overflow: hidden; width: 64px; height: 64px; place-items: center; border-radius: 18px; color: #fff; background: #087bf0; font-weight: 850; }
.vk-group-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.vk-group-card h2 { overflow: hidden; margin: 0; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.vk-group-card p { color: var(--muted); font-size: 10px; }
.vk-group-card.is-unavailable { opacity: .72; }
.vk-groups-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; }
.settings-panel { display: grid; gap: 18px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #f1d0d2; background: #fffafa; }
.danger-zone p { font-size: 12px; }

/* Knowledge */
.knowledge-summary { display: grid; grid-template-columns: repeat(3, minmax(150px, .65fr)) minmax(260px, 1.05fr); gap: 12px; }
.knowledge-summary > article, .knowledge-summary__hint { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.knowledge-summary article > span { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.knowledge-summary article > span.is-green { color: var(--green); background: var(--green-soft); }
.knowledge-summary article > span.is-purple { color: var(--purple); background: var(--purple-soft); }
.knowledge-summary article > div { display: grid; }
.knowledge-summary small { color: var(--muted); font-size: 9px; }
.knowledge-summary strong { font-family: Onest, sans-serif; font-size: 20px; }
.knowledge-summary__hint { color: #5870a8; border-color: #d8e3fa; background: #f5f8ff; }
.knowledge-summary__hint p { color: inherit; font-size: 10px; }
.knowledge-summary__hint a { color: var(--blue); font-weight: 800; }
.knowledge-card { overflow: visible; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; width: min(390px, 100%); height: 42px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.search-field .icon { color: #8b96a8; }
.search-field input { height: 38px; padding: 0; border: 0; background: transparent; font-size: 12px; }
.search-field input:focus { box-shadow: none; }
.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: #f0f3f7; }
.segmented button, .segmented a { display: inline-flex; align-items: center; padding: 7px 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; white-space: nowrap; }
.segmented button.is-active, .segmented a.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(24,38,64,.08); }
.documents-list { padding: 0 17px; }
.document-row { display: grid; position: relative; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.document-row__icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
.document-row__icon.is-faq { color: var(--purple); background: var(--purple-soft); }
.document-row__icon.is-text { color: var(--green); background: var(--green-soft); }
.document-row__copy { min-width: 0; }
.document-row__copy > div { display: flex; align-items: center; gap: 8px; }
.document-row__copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.document-row__copy p { font-size: 10px; }
.document-row time { color: var(--muted); font-size: 10px; }
.dropdown-menu { position: absolute; z-index: 8; top: 58px; right: 0; min-width: 150px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-md); }
.dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 7px; padding: 8px 9px; border: 0; border-radius: 7px; color: var(--danger); background: transparent; font-size: 11px; }
.dropdown-menu button:hover { background: var(--danger-soft); }
.dropzone { display: grid; min-height: 190px; place-items: center; align-content: center; padding: 25px; border: 2px dashed #cbd5e3; border-radius: 14px; text-align: center; background: #fafbfd; cursor: pointer; transition: .15s; }
.dropzone:hover, .dropzone.is-dragging { border-color: #7593eb; background: #f5f8ff; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone > span { display: grid; width: 49px; height: 49px; margin-bottom: 10px; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.dropzone p, .dropzone small { font-size: 10px; }
.pagination-wrap { padding: 14px; border-top: 1px solid var(--line); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.pagination__meta { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.pagination__controls, .pagination__pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.pagination__link { display: inline-flex; min-width: 38px; min-height: 38px; align-items: center; justify-content: center; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink-2); background: #fff; font-size: 13px; font-weight: 800; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.pagination__link:hover { color: var(--blue); border-color: #9db2ee; background: var(--blue-soft); }
.pagination__link:focus-visible { outline: 3px solid rgba(55, 103, 240, .22); outline-offset: 2px; }
.pagination__link.is-active { color: #fff; border-color: var(--blue); background: var(--blue); }
.pagination__link.is-disabled { color: #a0a9b8; border-color: var(--line); background: var(--surface-soft); cursor: not-allowed; }
.pagination__link--wide { min-width: 88px; }
.pagination__ellipsis { display: inline-grid; min-width: 28px; min-height: 38px; place-items: center; color: var(--muted); font-size: 13px; }

/* Conversations */
.dialogs-toolbar { display: flex; align-items: end; gap: 10px; }
.dialogs-toolbar .search-field { flex: 1; }
.compact-field { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; }
.compact-field select { height: 42px; min-width: 145px; padding: 0 28px 0 10px; font-size: 11px; }
.dialogs-card { overflow: hidden; }
.dialogs-list__head { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(230px, 1.4fr) minmax(130px, .7fr) minmax(190px, .85fr) 90px; gap: 14px; padding: 10px 17px; color: #8a95a7; background: #f7f9fc; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dialogs-list { display: grid; }
.dialog-row { display: grid; grid-template-columns: minmax(230px, 1.2fr) minmax(230px, 1.4fr) minmax(130px, .7fr) minmax(190px, .85fr) 90px; align-items: center; gap: 14px; padding: 13px 17px; border-top: 1px solid var(--line); transition: .15s; }
.dialog-row:hover { background: #fafcff; }
.dialog-row.has-unread { box-shadow: inset 3px 0 0 var(--blue); background: #fbfcff; }
.dialog-person { display: flex; min-width: 0; align-items: center; gap: 10px; }
.dialog-person > div, .dialog-person > span:last-child { display: grid; min-width: 0; }
.dialog-person strong, .dialog-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-person strong { font-size: 12px; }
.dialog-person small { color: var(--muted); font-size: 9px; }
.dialog-person > b { display: grid; min-width: 20px; height: 20px; margin-left: auto; place-items: center; border-radius: 999px; color: #fff; background: var(--blue); font-size: 9px; }
.dialog-preview { min-width: 0; }
.dialog-preview p { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-bot { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--ink-2); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-status { display: flex; flex-wrap: wrap; gap: 5px; }
.dialog-row > time { color: var(--muted); font-size: 9px; text-align: right; }
.conversation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.chat-panel { display: grid; overflow: hidden; min-height: calc(100vh - 190px); grid-template-rows: auto 1fr auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.chat-panel__top:empty { display: none; }
.chat-panel__top > .takeover-banner { margin: 12px 12px 0; }
.chat-pagination { padding: 12px; border-bottom: 1px solid var(--line); }
.conversation-header { display: flex; align-items: center; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.conversation-header > div:not(.conversation-header__actions) { display: grid; flex: 1; }
.conversation-header p { font-size: 10px; }
.conversation-header__actions { display: flex; align-items: center; gap: 7px; }
.message-thread { display: grid; overflow-y: auto; max-height: calc(100vh - 340px); align-content: end; gap: 11px; padding: 24px; background: #f4f6fa; }
.message-bubble { max-width: min(76%, 720px); padding: 10px 13px; border-radius: 14px; border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 3px 12px rgba(21,32,51,.06); }
.message-bubble.is-outbound { justify-self: end; color: #fff; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; background: var(--blue); }
.message-bubble p { color: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble > span { display: block; margin-bottom: 3px; font-size: 9px; font-weight: 800; opacity: .75; }
.message-bubble footer { display: flex; justify-content: flex-end; gap: 4px; margin-top: 5px; font-size: 8px; opacity: .7; }
.system-message { justify-self: center; padding: 5px 10px; border-radius: 999px; color: var(--muted); background: #e7ebf1; font-size: 9px; }
.operator-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.operator-compose textarea { min-height: 46px; max-height: 120px; resize: none; }
.conversation-aside { display: grid; align-content: start; gap: 13px; }
.contact-card, .dialog-info-card { padding: 18px; }
.contact-card { display: grid; justify-items: center; text-align: center; }
.contact-card h2 { margin: 10px 0 2px; font-size: 17px; }
.contact-card p { font-size: 10px; }
.dialog-info-card header { margin-bottom: 12px; }
.dialog-info-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 10px; }
.takeover-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #cbdcfb; border-radius: 12px; color: #3e5da5; background: #f1f6ff; }
.takeover-banner--warning { color: #8f5d12; border-color: #edd3a5; background: var(--amber-soft); }
.takeover-banner p { color: inherit; font-size: 10px; }

/* Settings and admin */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 900px); gap: 22px; }
.settings-nav { display: grid; position: sticky; top: 22px; align-self: start; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.settings-nav a { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 750; }
.settings-nav a:hover, .settings-nav a.is-active { color: var(--blue); background: var(--blue-soft); }
.settings-sections { display: grid; min-width: 0; gap: 17px; }
.settings-section { display: block; min-width: 0; padding: 24px; }
.settings-section > header { display: flex; align-items: flex-start; gap: 15px; }
.settings-section > header > div { min-width: 0; flex: 1; }
.settings-section > header p { margin-top: 4px; font-size: 13px; }
.settings-section > * + * { margin-top: 18px; }
.settings-section__icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.settings-section__icon--purple { color: var(--purple); background: var(--purple-soft); }
.settings-section__icon--green { color: var(--green); background: var(--green-soft); }
.settings-section__icon--amber { color: var(--amber); background: var(--amber-soft); }
.settings-section--ai { border-color: #ddd4fa; }
.api-key-state { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(190px, auto); align-items: center; gap: 14px; padding: 15px; border: 1px solid #cce9dc; border-radius: 13px; background: #f1fbf6; }
.api-key-state > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--green); background: var(--green-soft); }
.api-key-state > div { display: grid; }
.api-key-state small, .api-key-state p { font-size: 12px; }
.api-key-state p { color: #6c887b; }
.ai-info, .ai-diagnostic { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border: 1px solid #d7e3f7; border-radius: 13px; color: #345783; background: #f4f8ff; }
.ai-info > svg, .ai-diagnostic > svg { flex: 0 0 auto; margin-top: 2px; }
.ai-info p, .ai-diagnostic p { margin: 0; font-size: 13px; line-height: 1.55; }
.ai-info strong, .ai-diagnostic strong { display: block; margin-bottom: 3px; color: var(--ink); }
.ai-diagnostic--error { color: #a92f38; border-color: #efc7ca; background: #fff5f5; }
.remove-key-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; }
.admin-hero > div { display: flex; align-items: center; gap: 14px; }
.admin-hero__icon { display: grid; width: 55px; height: 55px; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #3e68d9, #7250d0); }
.admin-hero h2 { margin-bottom: 2px; font-size: 19px; }
.admin-hero p { font-size: 11px; }
.admin-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; font-size: 12px; }
.admin-hero__meta span { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.admin-table-card { overflow: hidden; padding: 20px; }
.admin-list { display: grid; margin-top: 12px; }
.admin-list > a, .admin-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-list__icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--amber); background: var(--amber-soft); }
.admin-list__icon.is-danger { color: var(--danger); background: var(--danger-soft); }
.admin-list > * > div { min-width: 0; }
.admin-list strong, .admin-list p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list strong { font-size: 11px; }
.admin-list p, .admin-list time { font-size: 11px; }
.admin-list small { display: block; margin-top: 5px; color: var(--danger); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.admin-list time { align-self: start; padding-top: 2px; color: var(--muted); white-space: nowrap; }
.provider-pill { display: inline-flex; margin-right: 5px; padding: 2px 7px; border-radius: 999px; color: #3e5f91; background: #edf3fc; font-size: 10px; font-weight: 800; }
.ai-diagnostics-card .card-heading p { margin-top: 4px; font-size: 12px; }
.admin-list--diagnostics > div { align-items: start; }
.users-table { display: grid; margin-top: 12px; }
.users-table > div { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(130px, .7fr) minmax(130px, .7fr) 100px; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.users-table__head { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.users-table time { color: var(--muted); font-size: 10px; }

/* Modal and legal */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; overflow-y: auto; padding: 24px; place-items: center; background: rgba(12,20,35,.62); backdrop-filter: blur(5px); }
.modal { width: min(480px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.25); border-radius: 18px; background: #fff; box-shadow: 0 32px 80px rgba(8,15,28,.32); animation: modal-in .18s ease-out; }
.modal--wide { width: min(650px, 100%); }
.modal--vk-groups { width: min(860px, 100%); }
.modal > header { display: flex; align-items: flex-start; gap: 12px; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.modal > header > div { flex: 1; }
.modal > header h2 { margin-bottom: 3px; font-size: 19px; }
.modal > header p { font-size: 11px; }
.modal__icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border-radius: 13px; color: var(--blue); background: var(--blue-soft); }
.modal__icon--purple { color: var(--purple); background: var(--purple-soft); }
.modal__icon--danger { color: var(--danger); background: var(--danger-soft); }
.modal__icon--vk { color: #fff; background: #087bf0; }
.modal__body { display: grid; gap: 15px; padding: 20px; }
.vk-connect-note { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 12px; }
.vk-connect-note svg { flex: 0 0 auto; margin-top: 1px; color: var(--blue); }
.vk-groups-modal__body { display: grid; gap: 14px; padding: 18px 20px 22px; }
.vk-groups-search { display: flex; height: 48px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); background: var(--surface-soft); }
.vk-groups-search:focus-within { border-color: #8bbcf7; box-shadow: 0 0 0 3px rgba(8,123,240,.1); }
.vk-groups-search input { height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font-size: 14px; box-shadow: none; }
.vk-groups-modal__list { display: grid; max-height: min(52vh, 490px); gap: 9px; overflow-y: auto; padding-right: 4px; }
.vk-group-option { display: grid; grid-template-columns: 54px minmax(0, 1fr) 38px auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.vk-group-option:hover { border-color: #bbd8fa; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.vk-group-option.is-unavailable { opacity: .66; }
.vk-group-option__avatar { display: grid; overflow: hidden; width: 54px; height: 54px; place-items: center; border-radius: 15px; color: #fff; background: #087bf0; font-size: 13px; font-weight: 850; }
.vk-group-option__avatar img { width: 100%; height: 100%; object-fit: cover; }
.vk-group-option__copy { min-width: 0; }
.vk-group-option__copy strong, .vk-group-option__copy p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vk-group-option__copy strong { font-size: 14px; }
.vk-group-option__copy p { color: var(--muted); font-size: 12px; }
.vk-group-option form { margin: 0; }
.vk-group-option .button { min-width: 130px; }
.vk-groups-modal__empty { display: grid; justify-items: center; gap: 7px; padding: 38px 20px; text-align: center; }
.vk-groups-modal__empty h3 { margin: 0; font-size: 18px; }
.vk-groups-modal__empty p { max-width: 480px; color: var(--muted); font-size: 13px; }
.modal > footer, .modal__body > footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); background: #fafbfd; }
.modal__body > footer { margin: 4px -20px -20px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.legal-header { border-bottom: 1px solid var(--line); background: #fff; }
.legal-header .landing-container { display: flex; height: 76px; align-items: center; justify-content: space-between; }
.legal-content { width: min(850px, calc(100% - 48px)); margin: 60px auto 90px; }
.legal-lead { margin-bottom: 35px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.legal-content article { margin-bottom: 28px; }
.legal-content article h2 { font-size: 20px; }
.legal-content article p, .legal-content article li { color: var(--ink-2); font-size: 13px; }
.legal-content article li { margin-bottom: 7px; }

@media (max-width: 1240px) {
    .stats-grid--six { grid-template-columns: repeat(3, 1fr); }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; }
    .settings-nav a { flex: 0 0 auto; }
    .bots-grid { grid-template-columns: repeat(2, 1fr); }
    .knowledge-summary { grid-template-columns: repeat(3, 1fr); }
    .knowledge-summary__hint { grid-column: 1 / -1; }
    .vk-groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dialogs-list__head, .dialog-row { grid-template-columns: minmax(210px, 1.2fr) minmax(220px, 1.4fr) minmax(150px, .8fr) 85px; }
    .dialogs-list__head > :nth-child(3), .dialog-row > :nth-child(3) { display: none; }
}

@media (max-width: 1020px) {
    :root { --sidebar: 250px; }
    .hero__grid { grid-template-columns: 1fr; gap: 50px; }
    .hero__copy { text-align: center; }
    .hero__copy > p, .hero__copy h1 { margin-inline: auto; }
    .hero__actions, .hero__checks { justify-content: center; }
    .hero-preview { width: min(600px, 100%); min-height: auto; margin: 0 auto; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .channels-section { grid-template-columns: 1fr; gap: 34px; }
    .auth-shell { grid-template-columns: minmax(320px, .72fr) 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .bot-overview-grid, .test-panel, .connect-layout { grid-template-columns: 1fr; }
    .welcome-card { grid-template-columns: 120px 1fr; }
    .welcome-card > ul { display: none; }
    .connection-checks { grid-template-columns: 1fr; }
    .conversation-layout { grid-template-columns: 1fr; }
    .conversation-aside { grid-template-columns: repeat(2, 1fr); }
    .chat-panel { min-height: 650px; }
    .message-thread { max-height: 500px; }
    .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .landing-container { width: min(100% - 32px, 1180px); }
    .landing-header__nav, .landing-header__actions { display: none; }
    .landing-menu-button { display: grid; }
    .landing-mobile-menu { position: absolute; top: 68px; right: 16px; left: 16px; z-index: 35; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); }
    .landing-mobile-menu.is-open { display: grid; gap: 5px; }
    .landing-mobile-menu a { padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 750; }
    .hero { padding: 65px 0; }
    .feature-grid, .steps-grid { grid-template-columns: 1fr; }
    .feature-card--wide { grid-column: auto; }
    .landing-cta__inner { align-items: flex-start; flex-direction: column; padding: 35px 28px; }
    .auth-shell { display: block; }
    .auth-aside { display: none; }
    .auth-main { min-height: 100vh; padding: 90px 20px 30px; }
    .auth-shell__brand { display: inline-flex; }
    .sidebar { width: min(300px, 88vw); transform: translateX(-105%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar__close { display: grid; }
    .sidebar-overlay { position: fixed; z-index: 35; inset: 0; border: 0; background: rgba(12,19,32,.55); opacity: 0; pointer-events: none; transition: opacity .2s; }
    body.sidebar-open .sidebar-overlay { display: block; opacity: 1; pointer-events: auto; }
    .app-shell__main { margin-left: 0; }
    .mobile-header { display: flex; position: sticky; z-index: 25; top: 0; height: 66px; align-items: center; justify-content: space-between; padding: 0 17px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
    .mobile-header .brand__copy { display: none; }
    .mobile-header .brand__mark { width: 38px; height: 38px; }
    .mobile-nav { display: grid; position: fixed; z-index: 25; right: 12px; bottom: 10px; left: 12px; height: 63px; grid-template-columns: repeat(4, 1fr); padding: 5px; border: 1px solid rgba(222,227,236,.9); border-radius: 17px; background: rgba(255,255,255,.95); box-shadow: 0 12px 35px rgba(17,27,46,.18); backdrop-filter: blur(14px); }
    .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 12px; color: #7a869a; font-size: 9px; font-weight: 750; }
    .mobile-nav a.is-active { color: var(--blue); background: var(--blue-soft); }
    .app-content { padding: 25px 17px 100px; }
    .wizard-layout { grid-template-columns: 1fr; }
    .wizard-steps { grid-template-columns: repeat(5, auto); justify-content: center; align-items: center; padding: 0; }
    .wizard-steps button { grid-template-columns: auto; }
    .wizard-steps button > div { display: none; }
    .wizard-steps > i { width: 32px; height: 1px; margin: 0; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; }
    .settings-nav a { flex: 0 0 auto; }
    .dialogs-list__head { display: none; }
    .dialog-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 13px; }
    .dialog-row > :nth-child(2), .dialog-row > :nth-child(3), .dialog-row > :nth-child(4) { display: none; }
    .dialog-row > time { display: block; }
    .users-table > div { grid-template-columns: minmax(0, 1fr) auto; }
    .users-table > div > :nth-child(3), .users-table > div > :nth-child(4) { display: none; }
}

@media (max-width: 620px) {
    body { font-size: 15px; }
    h1 { font-size: 31px; }
    .landing-container { width: min(100% - 24px, 1180px); }
    .hero__copy h1 { font-size: 42px; }
    .hero__copy > p { font-size: 16px; }
    .preview-float { display: none; }
    .preview-layout { grid-template-columns: 78px 1fr; }
    .landing-section { padding: 62px 0; }
    .landing-footer .landing-container { grid-template-columns: 1fr; }
    .landing-footer nav { flex-wrap: wrap; }
    .auth-card { padding: 25px 19px; }
    .pagination { align-items: stretch; flex-direction: column; }
    .pagination__meta { text-align: center; }
    .pagination__controls { width: 100%; }
    .page-header { align-items: flex-start; flex-direction: column; gap: 15px; }
    .page-header__actions, .page-header__actions .button { width: 100%; }
    .page-header > .button { width: 100%; }
    .form-grid--two, .form-grid--three, .form-grid--key { grid-template-columns: 1fr; }
    .stats-grid, .stats-grid--six { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 14px; }
    .stat-card__copy strong { font-size: 20px; }
    .welcome-card { grid-template-columns: 1fr; padding: 21px; }
    .welcome-card__visual { width: 100%; height: 100px; }
    .bot-health { align-items: flex-start; flex-wrap: wrap; }
    .bot-health .button { width: 100%; }
    .check-list { grid-template-columns: 1fr; }
    .bots-grid { grid-template-columns: 1fr; }
    .vk-groups-grid { grid-template-columns: 1fr; }
    .vk-oauth-progress { grid-template-columns: 1fr; }
    .vk-oauth-progress > i { width: 2px; height: 18px; margin-left: 16px; }
    .wizard-card > section { padding: 20px; }
    .wizard-card__footer { margin: 24px -20px -20px; padding: 14px 20px; }
    .choice-cards--three { grid-template-columns: 1fr; }
    .review-card { grid-template-columns: auto 1fr; }
    .review-card .button { grid-column: 1 / -1; }
    .section-tabs { margin-inline: -3px; }
    .test-chat { min-height: 360px; }
    .chat-compose { align-items: stretch; flex-direction: column; }
    .chat-compose .button { width: 100%; }
    .connection-checks { grid-template-columns: 1fr; }
    .callback-details > div { grid-template-columns: 1fr; }
    .danger-zone { align-items: stretch; flex-direction: column; }
    .knowledge-summary { grid-template-columns: 1fr; }
    .knowledge-summary__hint { grid-column: auto; }
    .list-toolbar, .dialogs-toolbar { align-items: stretch; flex-direction: column; }
    .search-field { width: 100%; }
    .segmented { overflow-x: auto; }
    .compact-field select { width: 100%; }
    .document-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .document-row time { display: none; }
    .conversation-header { align-items: flex-start; flex-wrap: wrap; }
    .conversation-header__actions { width: 100%; overflow-x: auto; }
    .conversation-header__actions form { flex: 0 0 auto; }
    .message-thread { padding: 14px; }
    .message-bubble { max-width: 90%; }
    .operator-compose { align-items: stretch; flex-direction: column; }
    .conversation-aside { grid-template-columns: 1fr; }
    .settings-section { padding: 18px; }
    .api-key-state { grid-template-columns: auto 1fr; }
    .api-key-state > div:last-child { grid-column: 1 / -1; }
    .admin-hero { align-items: flex-start; flex-direction: column; }
    .admin-hero > div { align-items: flex-start; }
    .admin-list > a, .admin-list > div { grid-template-columns: auto minmax(0, 1fr); }
    .admin-list time { grid-column: 2; grid-row: 2; padding-top: 0; }
    .modal-backdrop { padding: 10px; place-items: end center; }
    .modal { max-height: calc(100vh - 20px); overflow-y: auto; border-radius: 18px 18px 12px 12px; }
    .vk-groups-modal__list { max-height: none; overflow: visible; }
    .vk-group-option { grid-template-columns: 48px minmax(0, 1fr) 36px; }
    .vk-group-option__avatar { width: 48px; height: 48px; }
    .vk-group-option form, .vk-group-option > .button { grid-column: 1 / -1; }
    .vk-group-option .button { width: 100%; }
    .legal-content { width: min(100% - 28px, 850px); margin-top: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Рабочие подписи остаются читаемыми и на плотных экранах панели. */
body small,
body time,
body .eyebrow,
body .sidebar__eyebrow,
body .stat-card__copy span,
body .check-list a,
body .usage-card p,
body .issue-row p,
body .conversation-list p,
body .bot-card__stats dt,
body .new-bot-card p,
body .next-steps p,
body .test-tips span,
body .test-tips button,
body .chat-bubble span,
body .connect-steps > a,
body .connect-form > header p,
body .callback-details summary,
body .callback-details label,
body .copy-field input,
body .vk-group-card p,
body .vk-groups-note,
body .knowledge-summary__hint p,
body .segmented button,
body .segmented a,
body .document-row__copy p,
body .dropdown-menu button,
body .dropzone p,
body .compact-field,
body .dialogs-list__head,
body .dialog-preview p,
body .dialog-bot,
body .conversation-header p,
body .message-bubble > span,
body .message-bubble footer,
body .system-message,
body .contact-card p,
body .dialog-info-card > div,
body .takeover-banner p,
body .settings-nav a,
body .settings-section > header p,
body .api-key-state p,
body .admin-hero p,
body .admin-list p,
body .users-table__head,
body .modal > header p,
body .mobile-nav a {
    font-size: 12px;
}

body .security-note p,
body .preview-chat > header .badge,
body .preview-chat > footer,
body .preview-float,
body .review-card p,
body .test-chat__empty p,
body .compact-field select,
body .next-steps > div > span,
body .setup-list a > span,
body .connect-steps li > span,
body .dialog-person > b {
    font-size: 12px;
}

body .connection-checks strong,
body .admin-list strong,
body .connect-steps li strong,
body .document-row__copy strong,
body .dialog-person strong {
    font-size: 13px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Bot workspace: real tabs and multi-platform connection screens. */
.bot-page-header { align-items: center; }
.bot-tabs { position: sticky; z-index: 15; top: 14px; gap: 7px; padding: 7px; border-radius: 16px; box-shadow: 0 10px 35px rgba(20, 32, 54, .08); }
.bot-tabs a { min-height: 48px; align-items: center; gap: 8px; padding: 11px 17px; border-radius: 11px; font-size: 14px; font-weight: 800; }
.bot-tabs a span { display: inline-grid; min-width: 23px; height: 23px; padding: 0 6px; place-items: center; border-radius: 8px; color: var(--muted); background: #edf1f6; font-size: 11px; }
.bot-tabs a.is-active span { color: #fff; background: var(--blue); }
.bot-tabs a:focus-visible, .platform-switcher a:focus-visible { outline: 3px solid rgba(55, 103, 240, .22); outline-offset: 2px; }
[data-bot-panel] { display: grid; gap: 22px; animation: tab-in .2s ease; }
.bot-tab-content { display: grid; gap: 22px; }
@keyframes tab-in { from { opacity: .45; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.tab-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 4px 2px 0; }
.tab-page-header h2 { margin-bottom: 6px; font-size: clamp(27px, 3vw, 35px); font-weight: 800; }
.tab-page-header p { max-width: 760px; font-size: 15px; }
.platform-count { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 750; white-space: nowrap; }
.platform-count strong { color: var(--ink); font: 800 28px/1 Onest, sans-serif; }

.overview-platforms { display: grid; gap: 20px; padding: 22px; }
.platform-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.platform-status-grid > a { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.platform-status-grid > a:hover { border-color: #b9c8f4; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.platform-status-grid > a > div { display: grid; min-width: 0; flex: 1; }
.platform-status-grid strong { font-size: 14px; }
.platform-status-grid small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.platform-mark { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 13px; color: #fff; font: 800 14px/1 Onest, sans-serif; box-shadow: 0 8px 20px rgba(30, 55, 98, .15); }
.platform-mark--telegram, .channel-logo--telegram { color: #fff; background: linear-gradient(145deg, #31a9e6, #1688d4); }
.platform-mark--vk { background: linear-gradient(145deg, #1688f4, #086ad4); }
.platform-mark--max { background: linear-gradient(145deg, #735cff, #4b37da); }

.platform-switcher { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-sm); }
.platform-switcher > a { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid transparent; border-radius: 14px; color: var(--ink-2); }
.platform-switcher > a:hover { background: #f7f9fd; }
.platform-switcher > a.is-active { border-color: #ccdafd; color: var(--ink); background: #fff; box-shadow: 0 8px 24px rgba(48, 82, 160, .1); }
.platform-switcher > a > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.platform-switcher > a strong { font-size: 15px; }
.platform-switcher > a small { color: var(--muted); font-size: 12px; font-weight: 650; }
[data-platform-panel] { margin-top: 18px; animation: tab-in .18s ease; }

.integration-panel--telegram { border-color: #d4eaf6; }
.channel-logo--telegram { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; font: 800 14px/1 Onest, sans-serif; box-shadow: 0 9px 22px rgba(21, 141, 209, .22); }
.button--telegram { color: #fff; background: linear-gradient(135deg, #2da8e6, #1686d2); box-shadow: 0 9px 22px rgba(22, 134, 210, .22); }
.button--telegram:hover { background: linear-gradient(135deg, #239ddc, #0c79c3); }
.telegram-button-mark { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: rgba(255,255,255,.18); font-size: 10px; font-weight: 900; }
.telegram-connect-form { align-self: stretch; border-color: #cce6f5; }
.connect-steps--telegram > a { width: fit-content; margin-top: 4px; }
.connection-card--telegram { border-color: #d5eaf6; background: linear-gradient(135deg, #f9fdff, #f1f9fe); }
.telegram-health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.telegram-health-grid > div { display: grid; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.telegram-health-grid small { color: var(--muted); font-size: 12px; font-weight: 650; }
.telegram-health-grid strong { font-size: 14px; }

.integration-paused { display: grid; grid-template-columns: auto 1fr; gap: 17px; align-items: start; padding: 24px; border: 1px solid #dbe3f2; border-radius: 16px; background: linear-gradient(135deg, #f8faff, #f2f5fb); }
.integration-paused__icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; color: #55709f; background: #e8eef9; }
.integration-paused h3 { margin-bottom: 7px; font-size: 22px; font-weight: 800; }
.integration-paused p { max-width: 760px; font-size: 14px; }
.vk-connect-legacy { margin-top: 16px; }

.platform-coming-soon { display: grid; min-height: 370px; justify-items: center; align-content: center; gap: 13px; padding: 45px; text-align: center; background: radial-gradient(circle at 50% 0%, #f0edff, #fff 55%); }
.platform-coming-soon__mark { width: 66px; height: 66px; border-radius: 20px; font-size: 21px; }
.platform-coming-soon h2 { margin: 2px 0 0; font-size: 30px; }
.platform-coming-soon > p { max-width: 660px; font-size: 15px; }
.coming-soon-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.coming-soon-checks span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 999px; color: #526078; background: #f1f4f9; font-size: 12px; font-weight: 750; }
.coming-soon-checks svg { color: var(--green); }

.knowledge-tab .knowledge-summary { margin-top: 0; }
.knowledge-tab .knowledge-card { min-height: 360px; }

@media (max-width: 900px) {
    .bot-tabs { position: static; }
    .platform-status-grid, .platform-switcher { grid-template-columns: 1fr; }
    .platform-switcher { gap: 6px; }
    .telegram-health-grid { grid-template-columns: 1fr; }
    .tab-page-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
    .social-auth__grid { grid-template-columns: 1fr; }
    .social-button { justify-content: flex-start; padding-inline: 16px; }
    .verification-code-field input { font-size: 27px; letter-spacing: .25em; }
    .bot-tabs a { min-height: 44px; padding: 9px 13px; font-size: 13px; }
    .bot-tabs a svg { display: none; }
    .platform-status-grid { grid-template-columns: 1fr; }
    .platform-coming-soon { min-height: 320px; padding: 30px 18px; }
    .integration-paused { grid-template-columns: 1fr; padding: 19px; }
    .connection-card--telegram { align-items: flex-start; }
}

@media (max-width: 760px) {
    .test-panel__intro { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 18px; }
    .test-tips { max-width: none; grid-column: 1 / -1; justify-content: flex-start; }
    .test-tips span { text-align: left; }
    .test-chat { min-height: 500px; height: clamp(500px, calc(100dvh - 185px), 650px); border-radius: 16px; }
    .test-chat__header { padding: 12px 13px; }
    .test-chat__header > .badge { display: none; }
    .test-chat__clear { width: 42px; min-width: 42px; height: 42px; padding: 0; justify-content: center; }
    .test-chat__clear span { display: none; }
    .test-chat__messages { gap: 10px; padding: 15px; }
    .chat-bubble { max-width: 92%; padding: 11px 13px; font-size: 14px; }
    .chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) 50px; align-items: end; padding: 10px; }
    .chat-compose .button.chat-compose__send { width: 50px; min-width: 50px; height: 50px; min-height: 50px; padding: 0; justify-content: center; }
    .chat-compose__send span { display: none; }
    .chat-compose textarea { min-height: 50px; padding: 13px; font-size: 16px; }
    .chat-compose__hint { font-size: 10px; }
}

@media (max-width: 430px) {
    .test-panel__intro { grid-template-columns: 1fr; }
    .test-panel__intro > .feature-card__icon { display: none; }
    .test-tips { grid-column: auto; }
    .test-tips button { flex: 1; }
    .test-chat__header small { max-width: 190px; }
    .test-chat__messages { padding: 12px; }
    .chat-bubble { max-width: 95%; }
}
