:root {
    --bg: #F7F8FB;
    --card: #FFFFFF;
    --text: #111827;
    --muted: #6B7280;
    --border: #E5E7EB;
    --accent: #18C58F;
    --accent-hover: #12A874;
    --sidebar-width: 110px;
    --dashboard-width: 1040px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.app-shell {
    display: block;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    padding-left: var(--sidebar-width);
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: #F1F3F7;
    border-right: 1px solid var(--border);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow: visible;
    z-index: 30;
}

.sidebar-brand {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.6px;
}

.bot-switcher {
    position: relative;
}

.brand-type-icon {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.bot-switcher-menu {
    position: absolute;
    left: 68px;
    top: 0;
    width: 290px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.12);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: 0.16s ease;
    z-index: 120;
}

.bot-switcher:hover .bot-switcher-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.switcher-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.switcher-list {
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow: auto;
}

.switcher-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 10px;
    display: grid;
    gap: 2px;
}

.switcher-item:hover {
    border-color: var(--accent);
    background: #F8FFFC;
}

.switcher-item.active {
    border-color: var(--accent);
    background: #F1FFF9;
}

.switcher-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.switcher-item-meta {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2;
}

.switcher-empty {
    color: var(--muted);
    font-size: 12px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}

.switcher-add {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}

.switcher-add:hover {
    background: #F1FFF9;
}

.sidebar-tariff-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: -2px;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.sidebar-tariff-chip.tariff-start {
    color: #155e75;
    background: #ecfeff;
    border-color: #a5f3fc;
}

.sidebar-tariff-chip.tariff-creator {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.sidebar-tariff-chip.tariff-growth {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.sidebar-tariff-chip.tariff-pro {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fed7aa;
}

.sidebar-tariff-chip.tariff-default {
    color: #374151;
    background: #f3f4f6;
    border-color: #d1d5db;
}

.sidebar-tariff-link {
    width: 100%;
    text-decoration: none;
}

.sidebar-tariff-link:hover .sidebar-tariff-chip {
    filter: brightness(0.97);
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.subscriptions-intro {
    border-color: #dbe4ee;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.subscriptions-intro-grid-item {
    margin: 0;
}

.subscriptions-coupon-form {
    display: grid;
    gap: 8px;
}

.subscriptions-coupon-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

@media (min-width: 980px) {
    .subscriptions-intro-grid-item {
        grid-column: 2 / -1;
    }
}

.subscription-card {
    display: grid;
    grid-template-rows: 44px 52px auto auto;
    gap: 6px;
    border: 1px solid #dde3eb;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.subscription-card-head {
    display: grid;
    gap: 6px;
    min-height: 44px;
}

.subscription-card-head-row {
    min-height: 44px;
    align-items: center;
}

.subscription-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.subscription-title-emoji {
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.subscription-head-chips {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.subscription-card.is-current {
    border-color: var(--accent);
    background: #F8FFFC;
}

.subscription-card.is-popular {
    border-color: #cfd6ff;
}

.subscription-current-chip {
    font-size: 10px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    padding: 2px 8px;
}

.subscription-popular-chip {
    font-size: 10px;
    font-weight: 700;
    color: #4338ca;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 2px 8px;
}

.subscription-badge {
    font-size: 11px;
    color: #4338ca;
    font-weight: 700;
}

.subscription-price {
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    min-height: 52px;
    display: flex;
    align-items: flex-end;
}

.subscription-features {
    margin: 12px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
}

.subscription-cta-form {
    margin-top: auto;
}

.subscription-cta-form .btn {
    width: 100%;
}

.sidebar-nav {
    width: 100%;
    display: grid;
    gap: 6px;
}

.s-item {
    border-radius: 14px;
    padding: 8px 6px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    border: 1px solid transparent;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.bot-action {
    padding: 7px 5px;
    gap: 4px;
}

.bot-action span:last-child {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}

.s-item:hover {
    border-color: var(--accent);
    background: #fff;
    color: var(--text);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

.s-item:hover .s-icon {
    border-color: var(--accent);
    color: var(--accent);
    background: #F8FFFC;
}

.s-item.active {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

.s-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13px;
}

.s-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-bottom {
    margin-top: auto;
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 100%;
}

.sidebar-balance-block {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 8px 10px;
    text-align: center;
}

.sidebar-balance-link {
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.sidebar-balance-link:hover .sidebar-balance-block {
    border-color: var(--accent);
    background: #F8FFFC;
}

.sidebar-balance-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.sidebar-balance-coverage {
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.2;
}

.sidebar-submenu {
    display: grid;
    gap: 4px;
    margin: -2px 0 6px;
    width: 100%;
    padding-left: 8px;
}

.sidebar-subitem {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
    padding: 6px 8px;
}

.sidebar-subitem:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sidebar-subitem.active {
    border-color: var(--accent);
    color: var(--accent);
    background: #F1FFF9;
}

.btn-mini {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #A3C640;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.avatar.avatar-has-image img {
    display: block;
}

.avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.avatar.avatar-has-image .avatar-fallback {
    display: none;
}

.avatar-link {
    text-decoration: none;
}

.avatar-link:hover {
    filter: brightness(0.96);
}

.s-link {
    font-size: 12px;
    color: var(--muted);
}

.sidebar-preferences {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.sidebar-pref-popover {
    position: relative;
}

.sidebar-pref-trigger {
    list-style: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.sidebar-pref-trigger::-webkit-details-marker {
    display: none;
}

.sidebar-pref-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 150px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
    padding: 6px;
    display: grid;
    gap: 4px;
    z-index: 140;
}

.sidebar-pref-form {
    margin: 0;
}

.sidebar-pref-option {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    padding: 6px 8px;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
}

.finance-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.finance-method-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.finance-method-option {
    display: block;
    cursor: pointer;
}

.finance-method-option input[type='radio'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.finance-method-option .finance-method-card {
    transition: border-color .15s ease, background-color .15s ease;
}

.finance-method-option:hover .finance-method-card {
    border-color: var(--accent);
}

.finance-method-option input[type='radio']:checked + .finance-method-card {
    border-color: var(--accent);
    background: #F1FFF9;
}

.finance-topup-form {
    display: grid;
    gap: 6px;
}

.finance-topup-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.finance-topup-row input {
    width: 100%;
}

.sidebar-pref-option:hover {
    border-color: var(--accent);
    background: #F8FFFC;
}

.sidebar-pref-option.active {
    border-color: var(--accent);
    background: #F1FFF9;
    color: var(--accent);
}

.telegram-status-card {
    border: 1px solid var(--border);
    border-radius: 14px;
}

.account-settings-card {
    max-width: 720px;
}

.account-field-row {
    display: grid;
    gap: 8px;
}

.account-balance-block {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 12px 14px;
    display: grid;
    gap: 6px;
}

.account-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-balance-row span {
    color: var(--muted);
    font-size: 14px;
}

.account-balance-row strong {
    font-size: 24px;
    line-height: 1;
}

.account-balance-hint {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.account-divider {
    border-top: 1px solid var(--border);
    margin: 4px 0 2px;
}

.account-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
}

.ios-switch {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 30px;
    flex: 0 0 auto;
    cursor: pointer;
}

.ios-switch input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.ios-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
    transition: transform 0.2s ease;
}

.ios-switch input:checked + .ios-slider {
    background: var(--accent);
}

.ios-switch input:checked + .ios-slider::before {
    transform: translateX(22px);
}

.telegram-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.telegram-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: #fff;
}

.telegram-status-url {
    word-break: break-word;
}

.telegram-last-error {
    border-radius: 10px;
    padding: 10px;
    border: 1px solid #F3CFCF;
    background: #FFF6F6;
}

.telegram-status-success {
    border-color: #BEE8D8;
    background: #F4FFF9;
}

.telegram-status-warning {
    border-color: #EEDBA8;
    background: #FFFDF3;
}

.telegram-status-danger {
    border-color: #F3CFCF;
    background: #FFF6F6;
}

.telegram-status-neutral {
    border-color: var(--border);
    background: #FAFBFD;
}
}

.content-wrap {
    margin-left: 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.page { padding-top: 32px; padding-bottom: 48px; }

.dashboard-main {
    width: 100%;
    max-width: var(--dashboard-width);
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-main > * {
    width: 100%;
}

.content-wrap > .container.page {
    width: 100%;
    max-width: var(--dashboard-width);
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}

.content-wrap > .container.page.dashboard-main {
    align-self: flex-start;
}
.row { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-sm { gap: 10px; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 20px; }
.mt-lg { margin-top: 32px; }
.mb-sm { margin-bottom: 12px; }
.mb-md { margin-bottom: 20px; }
.full { grid-column: 1 / -1; }
.stack { display: grid; gap: 10px; }

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}

.topbar .container { min-height: 72px; }
.nav { gap: 12px; }
.brand { font-weight: 800; font-size: 22px; }
.brand span { color: var(--accent); }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.04);
}

.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

h1 { font-size: 48px; margin: 8px 0 12px; line-height: 1.1; }
.h2 { font-size: 30px; margin: 0; }
h2 { margin: 0; }
.subtext { color: var(--muted); max-width: 680px; }
.tiny { color: var(--muted); font-size: 13px; }
.kicker { color: var(--accent); font-weight: 600; margin: 0; }

.btn {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 16px;
    font-weight: 600;
    background: var(--card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-accent {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-selected { border-color: var(--accent); color: var(--accent); background: #F1FFF9; }

.bot-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    align-items: center;
}

.bot-tab {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    background: #fff;
    color: var(--text);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.bot-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.bot-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    background: #F1FFF9;
}

.bot-profile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
}

.profile-col {
    display: grid;
    gap: 10px;
}

.profile-item {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-size: 18px;
}

.profile-item span:first-child {
    color: var(--muted);
    font-size: 14px;
    min-width: 92px;
}

.type-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

.status-chip.on {
    color: #fff;
    background: #34c48a;
}

.status-chip.off {
    color: #fff;
    background: #9ca3af;
}

.profile-link {
    color: #2563eb;
    text-decoration: underline;
    font-size: 14px;
}

.bot-danger-zone {
    display: flex;
    justify-content: flex-end;
}

.bot-delete-btn {
    border-color: #ef4444;
    color: #ef4444;
    background: #fff;
}

.bot-delete-btn:hover {
    background: #fff5f5;
}

.delete-bot-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.delete-bot-backdrop.is-open {
    display: flex;
}

.delete-bot-modal {
    width: min(560px, 100%);
}

.delete-bot-name-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature h3 { margin-top: 0; }
.hero-panel { display: grid; gap: 12px; }
.stat {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
}

.tab {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
}

.tab.active {
    border-color: var(--accent);
    color: var(--accent);
}

.form-stack {
    display: grid;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.type-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 14px;
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-areas:
        "icon title"
        "icon desc";
    gap: 4px 10px;
    cursor: pointer;
}

.type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-card.active,
.type-card:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(24, 197, 143, 0.14);
}

.type-card.disabled {
    opacity: 0.48;
    cursor: not-allowed;
    background: #F8FAFC;
}

.type-card.disabled .type-icon {
    background: #F3F4F6;
}

.type-icon {
    grid-area: icon;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    font-size: 18px;
}

.type-title {
    grid-area: title;
    font-weight: 600;
}

.type-desc {
    grid-area: desc;
    color: var(--muted);
    font-size: 13px;
}

.field-error {
    color: #dc2626;
    font-size: 13px;
    margin: 8px 0 0;
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 12px;
    background: #fff;
    font: inherit;
}

textarea { min-height: 110px; }
label { color: var(--muted); font-size: 14px; }

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6B7280 50%), linear-gradient(135deg, #6B7280 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.badge {
    border-radius: 999px;
    background: #F3F4F6;
    color: var(--muted);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ok { background: #E8FBF4; color: #0F9B6B; }

.builder-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 300px;
    gap: 16px;
}

.mini-card, .flow-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.flow-card p { color: var(--muted); margin: 8px 0 0; }

.stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.step {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    color: var(--muted);
}

.step.active {
    border-color: var(--accent);
    color: var(--accent);
    background: #F1FFF9;
}

.wizard-card {
    width: 100%;
    max-width: none;
}

.alert {
    margin-bottom: 12px;
    background: #E8FBF4;
    border: 1px solid #BBF0DE;
    color: #0F9B6B;
    border-radius: 14px;
    padding: 10px 12px;
}

.note {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.wrap { flex-wrap: wrap; }

.table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.stats-table th,
.stats-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.stats-table th {
    color: var(--muted);
    font-weight: 600;
    background: #FAFBFC;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

.table-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.table-status.ok {
    background: #E8FBF4;
    color: #0F9B6B;
}

.table-status.warn {
    background: #FEF3C7;
    color: #92400E;
}

.stats-split-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(210px, 1fr));
    gap: 16px;
}

.stat-block strong {
    display: block;
    font-size: 34px;
    margin-bottom: 8px;
}

.stats-action-row {
    display: flex;
    justify-content: flex-end;
}

.stats-icon-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stats-icon-btn:hover {
    border-color: var(--accent);
    background: #F1FFF9;
}

.bot-preview-stack {
    display: grid;
    gap: 10px;
}

.bot-preview-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bot-preview-item .stack {
    flex: 1;
}

.bot-preview-child {
    margin-left: 24px;
}

.bot-preview-child-2 {
    margin-left: 48px;
}

.bot-preview-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payment-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #F1FFF9;
    border: 1px solid #BBF0DE;
    color: #0F9B6B;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.inline-action-form {
    margin: 0;
}

.product-unlimited-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-unlimited-wrap input[type='checkbox'] {
    width: auto;
}

.price-old {
    text-decoration: line-through;
    color: var(--muted);
    margin-right: 6px;
}

.price-new {
    color: #dc2626;
    font-weight: 600;
}

.file-upload-wrap {
    display: grid;
    gap: 6px;
}

.file-preview {
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFBFC;
    color: var(--muted);
    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 104px;
    object-fit: cover;
}

.styled-file-input {
    border-radius: 12px;
    padding: 8px;
}

.styled-file-input::file-selector-button {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    margin-right: 10px;
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.styled-file-input::file-selector-button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.popup-lock {
    overflow: hidden;
}

.popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 80;
}

.popup-backdrop.is-open {
    display: flex;
}

.popup-card {
    width: min(860px, 100%);
    padding: 18px;
    max-height: calc(100vh - 44px);
    overflow: auto;
}

.users-actions {
    align-items: center;
}

.issue-inline-form {
    margin: 0;
}

.users-issue-select {
    min-width: 180px;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 10px;
}

.icon-btn {
    min-width: 42px;
    width: 42px;
    height: 38px;
    padding: 0;
    font-size: 18px;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.disabled-icon {
    opacity: 0.45;
    pointer-events: none;
}

.compact-popup-form {
    gap: 10px;
}

.compact-popup-form label {
    font-size: 13px;
}

.compact-popup-form input,
.compact-popup-form textarea,
.compact-popup-form select {
    padding: 9px 11px;
}

.compact-popup-form textarea {
    min-height: 90px;
}

.compact-popup-form textarea[name='units_text'] {
    min-height: 100px;
}

.edit-accordion-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    width: 100%;
}

.edit-accordion-item summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 18px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.edit-accordion-item summary::-webkit-details-marker {
    display: none;
}

.edit-accordion-item summary::after {
    content: '▾';
    color: var(--muted);
    font-size: 14px;
    transition: transform 0.15s ease;
}

.edit-accordion-item[open] summary::after {
    transform: rotate(180deg);
}

.edit-accordion-content {
    border-top: 1px solid var(--border);
    padding: 12px 16px 14px;
}

.edit-link-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    padding: 14px 16px;
    font-size: 18px;
    line-height: 1.25;
    display: block;
    width: 100%;
}

.edit-link-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.keyboard-button-title {
    flex: 1;
    font-size: 16px;
}

.keyboard-designer {
    display: grid;
    gap: 10px;
}

.keyboard-top-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}

.keyboard-rows-wrap {
    display: grid;
    gap: 8px;
}

.keyboard-row-group {
    display: grid;
    gap: 6px;
}

.keyboard-top-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kb-button-title {
    flex: 1;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    min-height: 44px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    color: #fff;
}

.kb-button-title:hover {
    filter: brightness(0.98);
}

.kb-button-title.kb-color-blue {
    background: #4f77cc;
}

.kb-button-title.kb-color-green {
    background: #18c58f;
}

.kb-button-title.kb-color-orange {
    background: #f59e0b;
}

.kb-button-title.kb-color-gray {
    background: #6b7280;
}

.kb-icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4f77cc;
}

.kb-delete,
.kb-row-add {
    opacity: 1;
    pointer-events: auto;
}

.kb-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kb-move-controls {
    display: none;
    align-items: center;
    gap: 6px;
}

.keyboard-designer.is-reorder .kb-move-controls {
    display: inline-flex;
}

.keyboard-designer.is-reorder .kb-button-title {
    border-color: #98adcb;
}

.kb-action-btn {
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    min-height: 42px;
    padding: 8px 12px;
    cursor: pointer;
}

.kb-action-btn:hover {
    background: var(--accent-hover);
}

.keyboard-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.keyboard-empty {
    border: 1px dashed var(--border);
    border-radius: 12px;
    min-height: 44px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    color: var(--muted);
    flex: 1;
}

.keyboard-row-empty {
    flex-wrap: nowrap;
}

.product-shortcut-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-shortcut-item {
    flex: 1;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #374151;
}

.products-editor-wrap {
    display: grid;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.products-editor-title {
    padding: 12px 16px;
    font-size: 32px;
    color: #8b5cf6;
    border-bottom: 1px solid var(--border);
}

.products-editor-media {
    padding: 12px 16px;
    background: #F8FFFC;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.products-editor-media-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #E8FCF5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.products-editor-media-head {
    font-size: 18px;
    font-weight: 700;
}

.products-editor-toolbar {
    min-height: 44px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 8px;
}

.products-editor-toolbar button {
    border: none;
    background: transparent;
    color: #fff;
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.products-editor-toolbar button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.products-editor-toolbar button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.products-editor-toolbar button.is-active {
    background: rgba(255, 255, 255, 0.28);
}

.editor-language-toolbar {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.editor-language-label {
    font-size: 13px;
    color: #fff;
    opacity: 0.95;
}

.editor-language-select {
    width: 122px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.editor-language-select:disabled {
    opacity: 0.6;
}

.editor-language-select option {
    color: #111827;
}

.products-editor-textarea {
    border: none;
    border-radius: 0;
    min-height: 220px;
    padding: 16px;
    outline: none;
}

.products-editor-textarea:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.products-editor-textarea a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.products-editor-textarea a:hover {
    color: var(--accent-hover);
}

.products-editor-textarea:focus {
    outline: none;
}

.products-editor-footer {
    min-height: 56px;
    border-top: 1px solid var(--border);
    background: #F1FFF9;
    color: #64748b;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.products-editor-footer-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.products-attach-trigger {
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    padding: 6px 8px;
    cursor: pointer;
    color: inherit;
}

.products-attach-trigger:hover {
    background: #E8FCF5;
    border-color: var(--border);
}

.products-attach-trigger.is-error {
    border-color: #ef4444;
}

.products-attach-input {
    display: none;
}

.products-editor-footer-media {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.products-editor-footer-media .products-editor-media-head {
    font-size: 16px;
    line-height: 1;
}

.products-editor-footer-media .subtext {
    font-size: 16px;
    line-height: 1;
}

.products-editor-footer-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.products-editor-add {
    margin-top: 12px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #94a3b8;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.products-editor-add:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.products-buttons-wrap {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.products-action-row {
    margin-top: 10px;
}

.products-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.builder-branding-note {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: #F8FFFC;
}

.builder-branding-note-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.builder-branding-note-text {
    margin: 6px 0 0;
}

.standard-message-separator {
    width: auto;
    height: auto;
    margin: 4px auto 8px;
    color: var(--accent);
    display: block;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.mailings-stack {
    display: grid;
    gap: 14px;
}

.mailings-main-block {
    display: grid;
    gap: 14px;
}

.mailings-upgrade-alert {
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    background: #F1FFF9;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(24, 197, 143, 0.14);
}

.mailings-upgrade-alert p {
    margin: 4px 0 0;
}

.mailings-limit-info {
    border: 1px solid rgba(24, 197, 143, 0.4);
    border-radius: 10px;
    background: #F8FFFC;
    padding: 10px 12px;
}

.mailings-limit-progress-wrap {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.mailings-limit-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(24, 197, 143, 0.2);
    overflow: hidden;
}

.mailings-limit-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.mailings-limit-progress-fill.tone-safe {
    background: var(--accent);
}

.mailings-limit-progress-fill.tone-medium {
    background: #EAB308;
}

.mailings-limit-progress-fill.tone-high {
    background: #F97316;
}

.mailings-limit-progress-fill.tone-danger {
    background: #EF4444;
}

.mailings-limit-progress-label {
    font-size: 12px;
    color: var(--muted);
}

.mailings-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mailings-filter-item {
    display: grid;
    gap: 6px;
}

.mailings-filter-item label {
    font-size: 13px;
    color: var(--muted);
}

.mailings-recipients-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #F8FFFC;
    min-height: 50px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mailings-users-wrap {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.mailings-users-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mailings-users-head h3 {
    margin: 0;
}

.mailings-users-search-wrap {
    display: grid;
}

.mailings-users-search-wrap .form-input {
    width: 100%;
}

.mailings-users-actions {
    display: inline-flex;
    gap: 8px;
}

.mailings-users-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
}

.mailings-user-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    cursor: pointer;
}

.mailings-user-row:hover {
    border-color: var(--accent);
    background: #F8FFFC;
}

.mailings-user-row input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.mailings-user-row span,
.mailings-user-row small {
    grid-column: 2;
}

.mailings-user-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    padding: 10px;
    text-align: center;
    grid-column: 1 / -1;
}

.mailings-constants-bottom {
    width: 100%;
}

.mailings-history-block {
    display: grid;
    gap: 12px;
}

.mailings-history-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mailings-history-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.mailings-history-head h3 {
    margin: 0;
}

.mailings-history-list {
    display: grid;
    gap: 8px;
}

.mailings-history-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    display: grid;
    gap: 6px;
    background: #fff;
}

.mailings-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mailings-history-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mailings-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

.mailings-status-badge.tone-scheduled {
    color: #0E7490;
    background: #ECFEFF;
}

.mailings-status-badge.tone-sent {
    color: #166534;
    background: #DCFCE7;
}

.mailings-status-badge.tone-partial {
    color: #92400E;
    background: #FEF3C7;
}

.mailings-status-badge.tone-failed {
    color: #991B1B;
    background: #FEE2E2;
}

.mailings-status-badge.tone-skipped {
    color: #475569;
    background: #E2E8F0;
}

.mailings-history-meta {
    display: grid;
    gap: 2px;
    color: var(--muted);
    font-size: 12px;
}

.mailings-history-counters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    font-size: 12px;
}

.mailings-history-details {
    border-top: 1px dashed var(--border);
    padding-top: 6px;
}

.mailings-history-details summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 12px;
    user-select: none;
}

.mailings-history-details[open] summary {
    margin-bottom: 6px;
}

.mailings-history-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--muted);
    padding: 10px;
    text-align: center;
}

.section-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.products-constants-side {
    position: static;
    max-height: none;
    overflow: visible;
}

.constants-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.edit-section-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
    gap: 14px;
    align-items: start;
}

.edit-section-main {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
}

.standard-messages-forms {
    display: grid;
    gap: 12px;
}

.standard-message-form {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.constants-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    font-weight: 700;
}

.constants-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) 1.6fr;
}

.constants-code,
.constants-description {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
}

.constants-code {
    color: var(--accent);
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.constants-code-btn {
    width: 100%;
    border: none;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.constants-code-btn:hover {
    background: #F1FFF9;
}

.constants-code-btn.is-copied {
    background: #E8FCF5;
}

.constants-description {
    color: #374151;
}

.constants-grid > :nth-last-child(-n + 2) {
    border-bottom: none;
}

.payment-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.payment-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.payment-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.landing-block {
    position: relative;
    isolation: isolate;
}

.landing-block > * {
    position: relative;
    z-index: 1;
}

.landing-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.landing-shapes span {
    position: absolute;
    display: block;
    border: 1px solid var(--border);
    opacity: 0.56;
    animation: landingFloat 8s ease-in-out infinite;
}

.landing-shapes span:nth-child(1) {
    width: 64px;
    height: 64px;
    border-radius: 22px;
}

.landing-shapes span:nth-child(2) {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    animation-duration: 11s;
}

.landing-shapes span:nth-child(3) {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    animation-duration: 9s;
}

.landing-shapes--hero span:nth-child(1) {
    top: 14px;
    right: 32px;
    background: #ecfdf5;
    transform: rotate(14deg);
}

.landing-shapes--hero span:nth-child(2) {
    bottom: 28px;
    right: 46%;
    background: #eff6ff;
    animation-name: landingPulse;
}

.landing-shapes--hero span:nth-child(3) {
    bottom: 16px;
    right: 10px;
    background: #f5f3ff;
    animation-name: landingSpin;
}

.landing-shapes--metrics span:nth-child(1) {
    top: 8px;
    left: 4%;
    background: #f0fdfa;
}

.landing-shapes--metrics span:nth-child(2) {
    top: 18px;
    right: 8%;
    background: #fffbeb;
    animation-name: landingPulse;
}

.landing-shapes--metrics span:nth-child(3) {
    bottom: 8px;
    left: 48%;
    background: #ecfeff;
    animation-name: landingSpin;
}

.landing-shapes--steps span:nth-child(1) {
    top: 0;
    right: 5%;
    background: #f1fff9;
    border-radius: 999px;
    width: 120px;
    height: 30px;
}

.landing-shapes--steps span:nth-child(2) {
    bottom: 4px;
    left: 2%;
    background: #eff6ff;
    animation-name: landingSpin;
}

.landing-shapes--steps span:nth-child(3) {
    top: 48px;
    left: 41%;
    background: #f0fdf4;
    animation-name: landingPulse;
}

.landing-shapes--pains span:nth-child(1) {
    top: 8px;
    left: 10%;
    background: #fff7ed;
    animation-name: landingPulse;
}

.landing-shapes--pains span:nth-child(2) {
    bottom: 10px;
    right: 8%;
    background: #fef2f2;
    transform: rotate(12deg);
}

.landing-shapes--pains span:nth-child(3) {
    top: 34px;
    right: 35%;
    background: #fdf4ff;
    animation-name: landingSpin;
}

.landing-shapes--benefits span:nth-child(1) {
    top: 12px;
    right: 9%;
    background: #ecfeff;
}

.landing-shapes--benefits span:nth-child(2) {
    bottom: 16px;
    left: 4%;
    background: #ecfdf5;
    animation-name: landingSpin;
}

.landing-shapes--benefits span:nth-child(3) {
    top: 34px;
    left: 46%;
    background: #f8fafc;
    animation-name: landingPulse;
}

.landing-shapes--usecases span:nth-child(1) {
    top: 6px;
    left: 6%;
    background: #eff6ff;
}

.landing-shapes--usecases span:nth-child(2) {
    bottom: 8px;
    right: 7%;
    background: #f0fdfa;
    animation-name: landingPulse;
}

.landing-shapes--usecases span:nth-child(3) {
    top: 42px;
    right: 34%;
    background: #f5f3ff;
    animation-name: landingSpin;
}

.landing-shapes--flow span:nth-child(1) {
    top: 2px;
    left: 8%;
    width: 110px;
    height: 28px;
    border-radius: 999px;
    background: #ecfdf5;
}

.landing-shapes--flow span:nth-child(2) {
    top: 20px;
    right: 9%;
    background: #ecfeff;
    animation-name: landingSpin;
}

.landing-shapes--flow span:nth-child(3) {
    bottom: 8px;
    right: 46%;
    background: #f8fafc;
    animation-name: landingPulse;
}

.landing-shapes--testimonials span:nth-child(1) {
    top: 12px;
    right: 12%;
    background: #fefce8;
}

.landing-shapes--testimonials span:nth-child(2) {
    bottom: 12px;
    left: 8%;
    background: #f0fdf4;
    animation-name: landingPulse;
}

.landing-shapes--testimonials span:nth-child(3) {
    top: 52px;
    left: 50%;
    background: #f1f5f9;
    animation-name: landingSpin;
}

.landing-shapes--offer span:nth-child(1) {
    top: 8px;
    left: 3%;
    background: #ecfdf5;
}

.landing-shapes--offer span:nth-child(2) {
    top: 18px;
    right: 3%;
    background: #ecfeff;
    animation-name: landingPulse;
}

.landing-shapes--offer span:nth-child(3) {
    bottom: 8px;
    left: 49%;
    background: #fffbeb;
    animation-name: landingSpin;
}

.landing-shapes--faq span:nth-child(1) {
    top: 8px;
    right: 10%;
    background: #eef2ff;
}

.landing-shapes--faq span:nth-child(2) {
    top: 38px;
    left: 10%;
    background: #f0fdfa;
    animation-name: landingSpin;
}

.landing-shapes--faq span:nth-child(3) {
    bottom: 10px;
    right: 44%;
    background: #fef2f2;
    animation-name: landingPulse;
}

.landing-shapes--cta span:nth-child(1) {
    top: 10px;
    right: 6%;
    background: #ecfdf5;
}

.landing-shapes--cta span:nth-child(2) {
    bottom: 10px;
    left: 6%;
    background: #ecfeff;
    animation-name: landingSpin;
}

.landing-shapes--cta span:nth-child(3) {
    top: 46px;
    left: 44%;
    background: #f5f3ff;
    animation-name: landingPulse;
}

.landing-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    overflow: hidden;
}

.landing-hero-content {
    display: grid;
    gap: 14px;
    align-content: center;
}

.landing-mini-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.landing-mini-proof span {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #374151;
}

.landing-chat-preview {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fffc 0%, #eefbf5 100%);
    padding: 14px;
    display: grid;
    gap: 10px;
    align-content: center;
}

.chat-bubble {
    max-width: 85%;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.35;
    opacity: 0;
    animation: landingFadeUp 0.5s ease forwards;
}

.chat-bubble.in {
    justify-self: start;
    background: #fff;
    border: 1px solid var(--border);
}

.chat-bubble.out {
    justify-self: end;
    background: #dff7ec;
    border: 1px solid #b8ecd3;
}

.chat-bubble:nth-child(1) { animation-delay: 0.05s; }
.chat-bubble:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble:nth-child(3) { animation-delay: 0.35s; }
.chat-bubble:nth-child(4) { animation-delay: 0.5s; }

.landing-section {
    display: grid;
    gap: 14px;
}

.landing-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.landing-metric-card {
    display: grid;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.landing-metric-card::before {
    content: '';
    position: absolute;
    top: -24px;
    right: -24px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(24, 197, 143, 0.11);
    animation: landingPulse 4.6s ease-in-out infinite;
}

.landing-metric-card:nth-child(2)::before {
    background: rgba(37, 99, 235, 0.12);
}

.landing-metric-card:nth-child(3)::before {
    background: rgba(14, 116, 144, 0.12);
}

.landing-metric-card:nth-child(4)::before {
    background: rgba(124, 58, 237, 0.11);
}

.landing-metric-card strong {
    font-size: 22px;
    line-height: 1.2;
}

.landing-metric-card p {
    margin: 0;
    color: var(--muted);
}

.landing-section-head {
    max-width: 760px;
}

.landing-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.landing-step-card {
    display: grid;
    gap: 8px;
    border-top: 2px solid transparent;
    transform: translateY(10px);
    opacity: 0;
    animation: landingFadeUp 0.55s ease forwards;
}

.landing-step-card:nth-child(1) { border-top-color: #18C58F; }
.landing-step-card:nth-child(2) { border-top-color: #0284c7; }
.landing-step-card:nth-child(3) { border-top-color: #7c3aed; }

.landing-step-card:nth-child(1) { animation-delay: 0.08s; }
.landing-step-card:nth-child(2) { animation-delay: 0.18s; }
.landing-step-card:nth-child(3) { animation-delay: 0.28s; }

.landing-step-index {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid #bbf0de;
    background: #f1fff9;
}

.landing-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.landing-benefit-card {
    display: grid;
    gap: 8px;
    align-content: start;
    position: relative;
    overflow: hidden;
    border-color: #d8efe7;
    background: linear-gradient(180deg, #ffffff 0%, #f9fffc 100%);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-benefit-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.landing-benefit-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #bbf0de;
    background: #f1fff9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    animation: landingFloat 5.2s ease-in-out infinite;
}

.landing-benefit-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #bbf0de;
    color: #0f766e;
    background: #ecfeff;
}

.landing-benefit-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px dashed #cdeee2;
    padding-top: 8px;
}

.landing-benefit-card:nth-child(2) {
    border-color: #d7e8fa;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.landing-benefit-card:nth-child(2) .landing-benefit-chip {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.landing-benefit-card:nth-child(2) .landing-benefit-icon {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.landing-benefit-card:nth-child(3) {
    border-color: #edd9fb;
    background: linear-gradient(180deg, #ffffff 0%, #fcf8ff 100%);
}

.landing-benefit-card:nth-child(3) .landing-benefit-chip {
    border-color: #ddd6fe;
    color: #6d28d9;
    background: #f5f3ff;
}

.landing-benefit-card:nth-child(3) .landing-benefit-icon {
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.landing-benefit-card:nth-child(4) {
    border-color: #fae7cd;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.landing-benefit-card:nth-child(4) .landing-benefit-chip {
    border-color: #fed7aa;
    color: #b45309;
    background: #fff7ed;
}

.landing-benefit-card:nth-child(4) .landing-benefit-icon {
    border-color: #fed7aa;
    background: #fff7ed;
}

.landing-benefit-card::after {
    content: '';
    position: absolute;
    left: -20px;
    bottom: -20px;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    border: 1px solid #bbf0de;
    background: rgba(24, 197, 143, 0.08);
    transform: rotate(14deg);
    animation: landingFloat 6.2s ease-in-out infinite;
}

.landing-benefit-card:nth-child(even)::after {
    left: auto;
    right: -20px;
    border-radius: 50%;
    transform: none;
}

.landing-benefit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.landing-pains-grid,
.landing-usecases-grid,
.landing-testimonials-grid,
.landing-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.landing-pain-card,
.landing-usecase-card,
.landing-testimonial-card,
.landing-faq-item {
    display: grid;
    gap: 8px;
}

.landing-pain-card {
    border-left: 3px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.landing-pain-card:nth-child(odd) {
    border-left-color: #fb923c;
}

.landing-pain-card:nth-child(even) {
    border-left-color: #f43f5e;
}

.landing-pain-card:hover {
    transform: translateY(-2px);
}

.landing-usecase-card {
    position: relative;
    align-content: start;
    border-color: #d7e8fa;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-usecase-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.landing-usecase-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    font-size: 16px;
    animation: landingFloat 5.6s ease-in-out infinite;
}

.landing-usecase-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.landing-usecase-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px dashed #d7e8fa;
    padding-top: 8px;
}

.landing-usecase-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid #bfdbfe;
    background: rgba(59, 130, 246, 0.08);
    animation: landingPulse 5.8s ease-in-out infinite;
}

.landing-usecase-card:nth-child(2) {
    border-color: #d6efe5;
    background: linear-gradient(180deg, #ffffff 0%, #f8fffc 100%);
}

.landing-usecase-card:nth-child(2) .landing-usecase-chip,
.landing-usecase-card:nth-child(2) .landing-usecase-icon {
    border-color: #bbf0de;
    background: #f1fff9;
    color: #0f766e;
}

.landing-usecase-card:nth-child(2) .landing-usecase-meta {
    border-top-color: #d6efe5;
}

.landing-usecase-card:nth-child(2)::after {
    background: rgba(16, 185, 129, 0.09);
    border-color: #bbf0de;
}

.landing-usecase-card:nth-child(3) {
    border-color: #edd9fb;
    background: linear-gradient(180deg, #ffffff 0%, #fcf8ff 100%);
}

.landing-usecase-card:nth-child(3) .landing-usecase-chip,
.landing-usecase-card:nth-child(3) .landing-usecase-icon {
    border-color: #ddd6fe;
    background: #f5f3ff;
    color: #6d28d9;
}

.landing-usecase-card:nth-child(3) .landing-usecase-meta {
    border-top-color: #edd9fb;
}

.landing-usecase-card:nth-child(3)::after {
    background: rgba(139, 92, 246, 0.09);
    border-color: #ddd6fe;
}

.landing-usecase-card:nth-child(4) {
    border-color: #fae7cd;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf4 100%);
}

.landing-usecase-card:nth-child(4) .landing-usecase-chip,
.landing-usecase-card:nth-child(4) .landing-usecase-icon {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #b45309;
}

.landing-usecase-card:nth-child(4) .landing-usecase-meta {
    border-top-color: #fae7cd;
}

.landing-usecase-card:nth-child(4)::after {
    background: rgba(249, 115, 22, 0.09);
    border-color: #fed7aa;
}

.landing-usecase-card:nth-child(odd):hover {
    transform: translateY(-3px) rotate(-0.3deg);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.landing-usecase-card:nth-child(even):hover {
    transform: translateY(-3px) rotate(0.3deg);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.landing-testimonial-card p,
.landing-faq-item p,
.landing-pain-card p,
.landing-usecase-card p {
    margin: 0;
}

.landing-testimonial-card span {
    color: var(--muted);
    font-size: 13px;
}

.landing-testimonial-card {
    position: relative;
}

.landing-testimonial-card::before {
    content: '“';
    position: absolute;
    top: 2px;
    right: 12px;
    font-size: 38px;
    line-height: 1;
    color: #bbf0de;
    animation: landingPulse 5.4s ease-in-out infinite;
}

.landing-faq-item {
    position: relative;
    overflow: hidden;
}

.landing-faq-item::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -22px;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 1px dashed #bbf0de;
    opacity: 0.55;
    animation: landingSpin 13s linear infinite;
}

.landing-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    border-color: #cfeee1;
    background: linear-gradient(180deg, #fcfffd 0%, #f2fcf7 100%);
}

.landing-flow-step {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.landing-flow-step:hover {
    transform: translateY(-2px);
    border-color: #bbf0de;
}

.landing-flow-step span {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f1fff9;
    border: 1px solid #bbf0de;
    color: var(--accent);
    font-weight: 700;
    font-size: 11px;
}

.landing-flow-step p {
    margin: 0;
    color: #374151;
}

.landing-offer {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    align-items: center;
    border-color: #cfeee1;
    background: linear-gradient(140deg, #fcfffd 0%, #f3fcf7 100%);
}

.landing-offer-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.landing-offer-list li {
    border: 1px solid #d6efe5;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-offer-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    border-color: #bbf0de;
}

.landing-offer-list li strong {
    display: block;
    line-height: 1.3;
}

.landing-offer-list li small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.landing-offer-badge {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid #bbf0de;
    background: #f1fff9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: landingFloat 5.2s ease-in-out infinite;
}

.landing-offer-list li:nth-child(2) .landing-offer-badge {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.landing-offer-list li:nth-child(3) .landing-offer-badge {
    border-color: #ddd6fe;
    background: #f5f3ff;
}

.landing-offer-note {
    border: 1px solid #cfeee1;
    background: linear-gradient(180deg, #f8fffc 0%, #eef9f4 100%);
    border-radius: 12px;
    padding: 14px;
    display: grid;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.landing-offer-note::after {
    content: '';
    position: absolute;
    right: -24px;
    top: -24px;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid #bbf0de;
    background: rgba(24, 197, 143, 0.1);
    animation: landingPulse 6s ease-in-out infinite;
}

.landing-offer-note-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid #bbf0de;
    background: #f1fff9;
    color: #0f766e;
    font-size: 11px;
    font-weight: 700;
}

.landing-offer-note p {
    margin: 0;
    color: #374151;
}

.landing-cta {
    display: grid;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #f8fffc 0%, #eafaf3 100%);
    border-color: #cfeee1;
}

@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes landingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes landingPulse {
    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.08);
    }
}

@media (max-width: 1000px) {
    .app-shell {
        --sidebar-width: 84px;
    }
    .hero, .auth-grid, .builder-grid, .grid-3 { grid-template-columns: 1fr; }
    .bot-profile { grid-template-columns: 1fr; }
    .stats-split-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
    }
    .stats-split-grid .stat-block {
        min-width: 240px;
    }
    .type-grid { grid-template-columns: 1fr; }
    h1 { font-size: 36px; }
    .products-editor-title {
        font-size: 24px;
    }
    .edit-section-layout {
        grid-template-columns: 1fr;
    }
    .constants-grid {
        grid-template-columns: 1fr;
    }
    .products-editor-footer {
        flex-wrap: wrap;
    }
    .products-editor-footer-right {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
    .products-editor-footer-media {
        white-space: normal;
        flex-wrap: wrap;
    }
    .constants-description {
        padding-top: 0;
        margin-top: -2px;
    }
    .mailings-filters-grid {
        grid-template-columns: 1fr;
    }
    .mailings-users-head {
        flex-direction: column;
        align-items: stretch;
    }
    .mailings-users-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .mailings-users-list {
        grid-template-columns: 1fr;
    }
    .mailings-history-grid {
        grid-template-columns: 1fr;
    }
    .mailings-history-counters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .keyboard-action-row {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: var(--sidebar-width);
        padding: 12px 8px;
    }

    .content-wrap {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
    .s-item { font-size: 11px; padding: 8px 6px; }

    .landing-hero,
    .landing-steps-grid,
    .landing-benefits-grid,
    .landing-metrics-grid,
    .landing-flow,
    .landing-offer,
    .landing-pains-grid,
    .landing-usecases-grid,
    .landing-testimonials-grid,
    .landing-faq-grid {
        grid-template-columns: 1fr;
    }

    .landing-shapes span {
        opacity: 0.34;
    }
}
