    :root {
        --ar-bg: #ffffff;
        --ar-surface: #ffffff;
        --ar-soft: #fef5f2;
        --ar-text: #333333;
        --ar-muted: #999999;
        --ar-line: #cccccc;
        --ar-line-soft: #e6e6e6;
        --ar-orange: #ff8357;
        --ar-orange-start: #ff1d25;
        --ar-orange-end: #ff840b;
        --ar-orange-bg: #fff4e8;
        --ar-orange-border: #ffd9b3;
        --ar-green-bg: #f3f8eb;
        --ar-green-border: #d6ebc8;
        --ar-green-text: #3f6212;
        --ar-red-bg: #fef2f2;
        --ar-red-border: #fecaca;
        --ar-red-text: #b91c1c;
        --ar-yellow-bg: #fffbe8;
        --ar-yellow-border: #fff3ce;
        --ar-yellow-text: #854d0e;
        --ar-success: #3f6212;
        --ar-danger: #b91c1c;
        --ar-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }

    .ozon-products-content {
        min-width: 0;
    }

    :root {
        --notification-rail-width: 335px;
    }

    .ozon-right-rail {
        flex: 0 0 335px !important;
        width: 335px !important;
        max-width: 335px !important;
        padding-top: 26px;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
        position: sticky;
        top: calc(var(--header-height, 70px) + 16px);
        align-self: flex-start;
    }

    .ozon-right-rail .notification-shell {
        max-width: 335px !important;
        width: 100% !important;
    }

    .demo-sidebar-shell,
    .ar-tg-sidebar-shell {
        width: 100%;
        max-width: var(--notification-rail-width, 335px);
        margin: 0;
    }
    .demo-card {
        width: 100%;
        background: #ffffff;
        border: 1px solid #e6e6e6;
        border-radius: 30px;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
        box-sizing: border-box;
    }
    .demo-card-prefill-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 38px;
        padding: 8px 14px;
        background: #f8fafc;
        color: #334155;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        font-family: "Onest", system-ui, sans-serif;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
        box-sizing: border-box;
    }
    .demo-card-prefill-btn:hover {
        background: #f1f5f9;
        border-color: #94a3b8;
        color: #0f172a;
        transform: translateY(-1px);
    }
    .demo-card-connect-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 40px;
        padding: 10px 18px;
        background: #27272a;
        color: #ffffff;
        border: 1px solid #3f3f46;
        border-radius: 12px;
        font-family: "Onest", system-ui, sans-serif;
        font-size: 13.5px;
        font-weight: 600;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
        box-sizing: border-box;
    }
    .demo-card-connect-btn:hover {
        background: #18181b;
        border-color: #18181b;
        color: #ffffff;
        transform: translateY(-1px);
    }

    @media (max-width: 1024px) {
        .ozon-right-rail {
            flex: 1 1 auto !important;
            width: 100% !important;
            max-width: 100% !important;
            padding-top: 0;
            position: static !important;
        }
        .ozon-right-rail .notification-shell {
            max-width: 100% !important;
        }
        .demo-sidebar-shell,
        .ar-tg-sidebar-shell {
            max-width: 100% !important;
        }
    }

    .ar-board-wrap {
        position: relative;
        max-width: 100%;
        width: 100%;
        min-width: 0;
        margin: 0 auto;
        padding-top: 26px;
        box-sizing: border-box;
    }

    .ar-board-title {
        position: absolute;
        top: 0px;
        left: 50%;
        z-index: 0;
        margin: 0;
        transform: translate(-50%, -35%);
        font-family: "Onest", system-ui, -apple-system, sans-serif;
        font-size: 75px;
        font-weight: 500;
        line-height: 0.94;
        letter-spacing: -0.04em;
        color: #666666;
        white-space: nowrap;
        pointer-events: none;
        text-align: center;
    }

    .ar-shell {
        position: relative;
        z-index: 1;
        padding: 24px 24px 12px 24px;
        background: #ffffff;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
        border-radius: 30px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .ar-wrap {
        max-width: 100%;
        width: 100%;
        min-width: 0;
        margin: 0 auto;
        font-family: "Onest", system-ui, sans-serif;
        color: var(--ar-text);
        box-sizing: border-box;
    }

    .ar-page-head {
        margin-bottom: 24px;
    }

    .ar-page-subtitle {
        margin: 0;
        font-size: 16px;
        color: var(--ar-muted);
    }

    @media (max-width: 1400px) {
        .ar-board-title {
            font-size: 62px;
        }
    }

    @media (max-width: 1024px) {
        .ar-board-title {
            font-size: 48px;
            transform: translate(-50%, -30%);
        }
        .ozon-right-rail {
            padding-top: 0;
        }
    }

    @media (max-width: 640px) {
        .ar-board-title {
            font-size: 36px;
        }
    }

    .ar-stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        gap: 14px;
        margin-bottom: 24px;
    }

    @media (min-width: 992px) {
        .ar-stats-grid {
            grid-template-columns: repeat(4, 1fr);
            gap: 14px;
        }
    }

    .ar-stat-card {
        background: linear-gradient(135deg, #fff 0%, #fef5f2 100%);
        border: 1px solid var(--ar-line-soft);
        border-radius: 14px;
        padding: 16px 18px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 86px;
        box-sizing: border-box;
    }

    .ar-stat-label {
        font-size: 13px;
        color: var(--ar-muted);
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        line-height: 1.25;
    }

    .ar-stat-value {
        font-size: 26px;
        font-weight: 600;
        color: var(--ar-text);
        line-height: 1.2;
    }

    .ar-stat-status-text {
        font-size: 18px;
        font-weight: 600;
        color: var(--ar-text);
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ar-status-dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        display: inline-block;
        flex-shrink: 0;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

    .ar-status-dot.ar-dot-active {
        background-color: #22c55e;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    }

    .ar-status-dot.ar-dot-inactive {
        background-color: #ef4444;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    }

    @keyframes arPulseTrial {
        0% { transform: scale(1); color: var(--ar-orange); }
        50% { transform: scale(1.15); color: #ea580c; }
        100% { transform: scale(1); color: var(--ar-text); }
    }

    .ar-stat-highlight {
        animation: arPulseTrial 0.8s ease;
    }

    .ar-section {
        background: white;
        border: 1px solid var(--ar-line-soft);
        border-radius: 16px;
        padding: 24px;
        margin-bottom: 24px;
    }

    .ar-section-title {
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 16px;
        color: var(--ar-text);
    }

    .ar-setting-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        border-bottom: 1px solid var(--ar-line-soft);
    }

    .ar-setting-row:last-child {
        border-bottom: none;
    }

    .ar-setting-info {
        flex: 1;
    }

    .ar-setting-label {
        font-size: 16px;
        font-weight: 500;
        color: var(--ar-text);
        margin-bottom: 4px;
    }

    .ar-setting-desc {
        font-size: 14px;
        color: var(--ar-muted);
    }

    .ar-setting-control {
        margin-left: 24px;
    }

    /* Toggle Switch */
    .ar-toggle {
        position: relative;
        display: inline-block;
        width: 52px;
        height: 28px;
    }

    .ar-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .ar-toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: 0.3s;
        border-radius: 28px;
    }

    .ar-toggle-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
    }

    .ar-toggle input:checked + .ar-toggle-slider {
        background: linear-gradient(135deg, var(--ar-orange-start) 0%, var(--ar-orange-end) 100%);
    }

    .ar-toggle input:checked + .ar-toggle-slider:before {
        transform: translateX(24px);
    }

    /* Slider для порога уверенности */
    .ar-threshold-control {
        width: 300px;
    }

    .ar-threshold-display {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }

    .ar-threshold-value {
        font-size: 24px;
        font-weight: 600;
        color: var(--ar-orange);
    }

    .ar-threshold-slider {
        width: 100%;
        height: 6px;
        border-radius: 3px;
        background: var(--ar-line-soft);
        outline: none;
        -webkit-appearance: none;
        appearance: none;
    }

    .ar-threshold-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--ar-orange-start) 0%, var(--ar-orange-end) 100%);
        cursor: pointer;
    }

    .ar-threshold-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--ar-orange-start) 0%, var(--ar-orange-end) 100%);
        cursor: pointer;
        border: none;
    }

    .ar-threshold-labels {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        color: var(--ar-muted);
        margin-top: 4px;
    }

    /* Alert */
    .ar-alert {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 24px;
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .ar-alert-warning {
        background: var(--ar-yellow-bg);
        border: 1px solid var(--ar-yellow-border);
        color: var(--ar-yellow-text);
    }

    .ar-alert-success {
        background: var(--ar-green-bg);
        border: 1px solid var(--ar-green-border);
        color: var(--ar-green-text);
    }

    .ar-alert-icon {
        font-size: 20px;
    }

    /* Button */
    .ar-btn {
        padding: 12px 24px;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 500;
        cursor: pointer;
        border: none;
        transition: all 0.2s;
        text-decoration: none;
        display: inline-block;
    }

    .ar-btn-primary {
        background: linear-gradient(135deg, var(--ar-orange-start) 0%, var(--ar-orange-end) 100%);
        color: white;
    }

    .ar-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(255, 99, 71, 0.3);
    }

    .ar-btn-secondary {
        background: white;
        color: var(--ar-text);
        border: 1px solid var(--ar-line);
    }

    .ar-btn-secondary:hover {
        background: var(--ar-soft);
    }

    .ar-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Status Badge */
    .ar-status {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
    }

    .ar-status-active {
        background: var(--ar-green-bg);
        border: 1px solid var(--ar-green-border);
        color: var(--ar-green-text);
    }

    .ar-status-inactive {
        background: var(--ar-red-bg);
        border: 1px solid var(--ar-red-border);
        color: var(--ar-red-text);
    }

    /* Save notification */
    .ar-save-notification {
        position: fixed;
        bottom: 28px;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 18px;
        background: rgba(28, 28, 30, 0.82);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        color: #ffffff;
        font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.2;
        letter-spacing: 0.01em;
        border-radius: 9999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
        z-index: 99999;
        pointer-events: none;
        user-select: none;
        opacity: 0;
        transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ar-save-notification.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .ar-save-notification--green {
        background: rgba(20, 83, 45, 0.85);
        border: 1px solid rgba(74, 222, 128, 0.28);
        box-shadow: 0 8px 24px rgba(20, 83, 45, 0.35), 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    #ar-products-table-container,
    #ar-questions-table-container {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    #ar-questions-section {
        padding: 24px 0 0 0;
        overflow: hidden;
    }

    #ar-questions-section > div:first-child,
    #ar-questions-section .ar-filter-tabs {
        padding-left: 20px;
        padding-right: 20px;
    }

    #ar-questions-section #poll-result-alert {
        margin-left: 20px;
        margin-right: 20px;
    }

    #ar-questions-table-container {
        margin: 0;
        width: 100%;
    }

    #ar-questions-table-container .ar-table {
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 0;
        margin-top: 14px;
        margin-bottom: 0;
    }

    /* Table styles */
    .ar-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: separate;
        border-spacing: 0;
        margin-top: 14px;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        overflow: hidden;
        background: #ffffff;
    }

    .ar-table th {
        text-align: left;
        padding: 12px 14px;
        background: #f8fafc;
        font-weight: 700;
        font-size: 11.5px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
        border-bottom: 1px solid #e2e8f0;
        border-top: none;
        box-sizing: border-box;
    }

    .ar-table td {
        padding: 14px;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13.5px;
        vertical-align: top;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ar-table tbody tr:last-child td {
        border-bottom: none;
    }

    .ar-table tr:hover {
        background: #fbfcfe;
    }

    .ar-badge {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 500;
    }

    .ar-badge-global {
        background: #f0f6ff;
        border: 1px solid #dbeafe;
        color: #1d4ed8;
        border-radius: 9999px;
        font-weight: 600;
        padding: 4px 12px;
    }

    .ar-badge-product {
        background: #fbf0f8;
        border: 1px solid #f3d4ed;
        color: #89287a;
        border-radius: 9999px;
        font-weight: 600;
        padding: 4px 12px;
    }

    /* Expandable elements */
    details.ar-expandable summary::-webkit-details-marker,
    details.ar-text-expandable summary::-webkit-details-marker,
    details.ar-questions-expandable summary::-webkit-details-marker {
        display: none;
    }
    details.ar-expandable summary,
    details.ar-text-expandable summary,
    details.ar-questions-expandable summary {
        list-style: none;
    }

    .ar-expand-trigger {
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        color: #64748b;
        font-weight: 500;
        padding: 4px 9px;
        border-radius: 6px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
        user-select: none;
    }

    .ar-expand-trigger:hover {
        background: #e2e8f0;
        color: #1e293b;
        border-color: #cbd5e1;
    }

    details[open] > .ar-expand-trigger {
        background: #e2e8f0;
        color: #1e293b;
        border-color: #cbd5e1;
    }

    .ar-expand-arrow {
        display: inline-block;
        transition: transform 0.2s ease;
        font-size: 11px;
        color: inherit;
    }

    details[open] .ar-expand-arrow {
        transform: rotate(180deg);
    }

    .ar-expanded-content {
        margin-top: 10px;
        padding: 12px 14px;
        background: #fafafa;
        border: 1px solid var(--ar-line-soft);
        border-radius: 10px;
        font-size: 13px;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ar-desc-block {
        margin-bottom: 10px;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ar-desc-title {
        display: block;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--ar-muted);
        margin-bottom: 4px;
    }

    .ar-desc-text {
        margin: 0;
        color: var(--ar-text);
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: pre-wrap;
    }

    .ar-attrs-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 4px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ar-attr-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 9px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        font-size: 12px;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .ar-attr-key {
        color: #6b7280;
    }

    .ar-attr-val {
        color: #111827;
        font-weight: 500;
    }

    .ar-count-badge {
        display: inline-block;
        min-width: 24px;
        padding: 2px 8px;
        border-radius: 12px;
        background: var(--ar-soft);
        color: var(--ar-orange);
        font-weight: 600;
        font-size: 13px;
    }

    .ar-text-summary,
    .ar-questions-summary {
        cursor: pointer;
        user-select: none;
    }

    .ar-expand-link {
        display: inline-block;
        margin-top: 4px;
        font-size: 12px;
        font-weight: 500;
        color: var(--ar-orange);
    }

    details[open].ar-text-expandable .ar-text-preview,
    details[open].ar-text-expandable .ar-expand-link,
    details[open].ar-questions-expandable .ar-questions-preview,
    details[open].ar-questions-expandable .ar-expand-link {
        display: none;
    }

    .ar-text-full {
        line-height: 1.45;
        color: var(--ar-text);
        margin-top: 6px;
        padding: 8px 10px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }

    .ar-collapse-link {
        display: none;
        margin-top: 6px;
        font-size: 12px;
        font-weight: 500;
        color: var(--ar-orange);
        cursor: pointer;
    }

    details[open].ar-text-expandable .ar-collapse-link,
    details[open].ar-questions-expandable .ar-collapse-link {
        display: inline-block;
    }

    .ar-questions-expanded {
        margin-top: 6px;
        padding: 8px 10px;
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 12px;
        color: #374151;
        line-height: 1.45;
    }

    /* Upload Card */
    .ar-upload-card {
        border: 2px dashed #cbd5e1;
        border-radius: 14px;
        background: #f8fafc;
        padding: 24px;
        text-align: center;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .ar-upload-card:hover,
    .ar-upload-card.ar-drop-active {
        border-color: var(--ar-orange);
        background: rgba(255, 131, 87, 0.04);
        box-shadow: 0 4px 16px rgba(255, 131, 87, 0.08);
    }

    .ar-upload-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .ar-upload-title {
        font-size: 15px;
        font-weight: 600;
        color: var(--ar-text);
        margin-bottom: 4px;
    }

    .ar-upload-subtitle {
        font-size: 13px;
        color: var(--ar-muted);
        margin-bottom: 16px;
    }

    .ar-upload-actions {
        display: flex;
        gap: 12px;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    .ar-file-status {
        margin-top: 14px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 14px;
        background: #eef2ff;
        color: #3730a3;
        border: 1px solid #c7d2fe;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 500;
    }

    /* Simulator */
    .ar-simulator {
        display: grid;
        gap: 16px;
    }

    .ar-form-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .ar-form-label {
        font-size: 14px;
        font-weight: 500;
        color: var(--ar-text);
    }

    .ar-form-input,
    .ar-form-select,
    .ar-form-textarea {
        padding: 12px;
        border: 1px solid var(--ar-line);
        border-radius: 8px;
        font-size: 14px;
        font-family: inherit;
        outline: none;
        transition: border-color 0.45s ease-out, box-shadow 0.45s ease-out;
    }

    .ar-form-input:focus,
    .ar-form-select:focus,
    .ar-form-textarea:focus {
        border-color: var(--ar-orange);
        outline: none;
        box-shadow: 0 0 12px 2px rgba(255, 131, 87, 0.22), 0 0 0 1px rgba(255, 131, 87, 0.35);
    }

    .ar-form-textarea {
        resize: vertical;
        min-height: 100px;
    }

    .ar-result-box {
        background: var(--ar-soft);
        border: 1px solid var(--ar-line);
        border-radius: 12px;
        padding: 16px;
        margin-top: 16px;
    }

    .ar-confidence-bar {
        width: 100%;
        height: 8px;
        background: var(--ar-line-soft);
        border-radius: 4px;
        overflow: hidden;
        margin: 8px 0;
    }

    .ar-confidence-fill {
        height: 100%;
        background: linear-gradient(135deg, var(--ar-orange-start) 0%, var(--ar-orange-end) 100%);
        transition: width 0.3s;
    }

    .ar-answer-box {
        background: white;
        border: 2px solid var(--ar-success);
        border-radius: 12px;
        padding: 16px;
        margin-top: 12px;
        white-space: pre-wrap;
        line-height: 1.6;
    }

    .ar-empty-state {
        text-align: center;
        padding: 48px 24px;
        color: var(--ar-muted);
    }

    .ar-empty-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    /* Stop Topics Section */
    .ar-stop-topics-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 12px;
        margin-top: 14px;
    }

    .ar-stop-topic-card {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 14px;
        background: #ffffff;
        border: 1.5px solid var(--ar-line-soft);
        border-radius: 10px;
        transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.2s ease, background 0.15s ease;
        cursor: pointer;
        user-select: none;
    }

    .ar-stop-topic-card-active {
        border-color: var(--ar-orange);
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(255, 131, 87, 0.08);
        opacity: 1;
    }

    /* Приятный легкий ховер - карточка НЕ тухнет */
    .ar-stop-topic-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    }

    .ar-stop-topic-card-active:hover {
        border-color: #ff6a33;
        background: #fffafa;
        box-shadow: 0 3px 8px rgba(255, 131, 87, 0.12);
    }

    /* Тухнет только тогда, когда нажали и сняли выбор */
    .ar-stop-topic-card:not(.ar-stop-topic-card-active) {
        background: #f8fafc;
        border-color: #e2e8f0;
        opacity: 0.55;
    }

    .ar-stop-topic-card:not(.ar-stop-topic-card-active):hover {
        opacity: 0.78;
        border-color: #cbd5e1;
    }

    .ar-stop-topic-checkbox {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        accent-color: var(--ar-orange);
        cursor: pointer;
        flex-shrink: 0;
    }

    .ar-stop-topic-content {
        flex: 1;
    }

    .ar-stop-topic-title {
        font-size: 13.5px;
        font-weight: 600;
        color: var(--ar-text);
        margin-bottom: 2px;
    }

    .ar-stop-topic-desc {
        font-size: 12px;
        color: var(--ar-muted);
        line-height: 1.35;
    }

    .ar-disclaimer-box {
        margin-top: 14px;
        padding: 10px 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-left: 3px solid var(--ar-orange);
        border-radius: 8px;
        font-size: 12.5px;
        line-height: 1.45;
        color: #475569;
    }

    /* Pulse Badge */
    .ar-pulse-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--ar-green-bg);
        border: 1px solid var(--ar-green-border);
        color: var(--ar-green-text);
        font-size: 12px;
        font-weight: 600;
        padding: 3px 10px;
        border-radius: 9999px;
    }

    .ar-pulse-dot {
        width: 8px;
        height: 8px;
        background: var(--ar-green-text);
        border-radius: 50%;
        animation: ar-pulse 2s infinite;
    }

    @keyframes ar-pulse {
        0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(63, 98, 18, 0.4); }
        70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(63, 98, 18, 0); }
        100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(63, 98, 18, 0); }
    }

    /* Filter Tabs (Modern Segmented Control) */
    .ar-filter-tabs {
        display: inline-flex;
        background: #f1f5f9;
        padding: 4px;
        border-radius: 12px;
        gap: 4px;
        flex-wrap: wrap;
        margin-bottom: 18px;
        border: 1px solid #e2e8f0;
    }
    .ar-filter-tab {
        padding: 7px 14px;
        border-radius: 9px;
        font-size: 13px;
        font-weight: 600;
        background: transparent;
        color: #64748b;
        border: none;
        cursor: pointer;
        transition: all 0.15s ease;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        user-select: none;
    }
    .ar-filter-tab:hover {
        background: rgba(255, 255, 255, 0.6);
        color: #1e293b;
    }
    .ar-filter-tab.active {
        background: #ffffff;
        color: #0f172a;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .ar-tab-counter {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 700;
        background: #e2e8f0;
        color: #475569;
        transition: all 0.15s ease;
    }
    .ar-filter-tab.active .ar-tab-counter {
        background: var(--ar-orange-bg);
        border: 1px solid var(--ar-orange-border);
        color: var(--ar-orange);
    }

    /* Sandbox Toggle Pill */
    .ar-sandbox-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        font-weight: 600;
        color: #475569;
        padding: 7px 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 9px;
        cursor: pointer;
        user-select: none;
        transition: all 0.15s ease;
        height: 36px;
        box-sizing: border-box;
    }
    .ar-sandbox-toggle:hover {
        border-color: #cbd5e1;
        background: #f1f5f9;
    }
    .ar-sandbox-toggle input[type="checkbox"] {
        accent-color: var(--ar-orange);
        cursor: pointer;
        width: 15px;
        height: 15px;
        margin: 0;
    }

    /* Small action buttons */
    .ar-btn-sm {
        padding: 6px 12px;
        font-size: 12.5px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.15s ease;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
    }
    .ar-btn-xs {
        padding: 4px 9px;
        font-size: 11.5px;
        border-radius: 6px;
        font-weight: 600;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.15s ease;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        text-decoration: none;
    }
    .ar-btn-outline-primary {
        background: #fff;
        border: 1px solid var(--ar-orange-border);
        color: var(--ar-orange);
    }
    .ar-btn-outline-primary:hover {
        background: var(--ar-orange-bg);
        color: var(--ar-orange);
    }
    .ar-btn-outline-success {
        background: #fff;
        border: 1px solid var(--ar-green-border);
        color: var(--ar-green-text);
    }
    .ar-btn-outline-success:hover {
        background: var(--ar-green-bg);
        color: var(--ar-green-text);
    }
    .ar-btn-outline-secondary {
        background: #fff;
        border: 1px solid #d1d5db;
        color: #4b5563;
    }
    .ar-btn-outline-secondary:hover {
        background: #f9fafb;
        color: #1f2937;
    }

    /* Monospace ID chip */
    .ar-id-chip {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: 11px;
        font-weight: 600;
        color: #334155;
        background: #f1f5f9;
        padding: 3px 6px;
        border-radius: 5px;
        border: 1px solid #cbd5e1;
        display: inline-block;
        letter-spacing: 0.02em;
        user-select: all;
        word-break: break-all;
        white-space: normal;
        cursor: pointer;
        line-height: 1.35;
        vertical-align: middle;
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
    }
    .ar-id-chip:hover {
        background: #e2e8f0;
        color: #0f172a;
        border-color: #94a3b8;
    }
    .ar-id-chip:active {
        transform: scale(0.96);
    }

    /* Modal Backdrop & Studio Dialog */
    .ar-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        display: none;
        align-items: center;
        justify-content: center;
        z-index: 2147483600;
        padding: 20px 16px;
    }
    .ar-modal-dialog {
        background: #ffffff;
        border-radius: 20px;
        max-width: 780px;
        width: 100%;
        max-height: 92vh;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
        display: flex;
        flex-direction: column;
        animation: ar-modal-fade 0.22s ease-out;
        border: 1px solid rgba(226, 232, 240, 0.8);
        overflow: hidden;
    }
    @keyframes ar-modal-fade {
        from { opacity: 0; transform: translateY(14px) scale(0.985); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes ar-spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }
    .ar-modal-header {
        padding: 18px 24px;
        border-bottom: 1px solid var(--ar-line-soft);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #fafbfc;
    }
    .ar-modal-title-group {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }
    .ar-modal-title {
        font-size: 17.5px;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .ar-modal-close {
        background: transparent;
        border: none;
        font-size: 24px;
        color: #94a3b8;
        cursor: pointer;
        padding: 4px 8px;
        line-height: 1;
        border-radius: 8px;
        transition: all 0.15s ease;
    }
    .ar-modal-close:hover {
        color: #0f172a;
        background: #e2e8f0;
    }
    .ar-modal-body {
        padding: 22px 24px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .ar-modal-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        align-items: start;
    }
    @media (max-width: 900px) {
        .ar-modal-grid {
            grid-template-columns: 1fr;
            gap: 18px;
        }
    }
    .ar-modal-col {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .ar-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 16px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
        transition: border-color 0.15s ease;
    }
    .ar-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }
    .ar-card-title {
        font-size: 13px;
        font-weight: 700;
        color: #1e293b;
        display: flex;
        align-items: center;
        gap: 6px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    .ar-quote-box {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-left: 4px solid var(--ar-orange);
        border-radius: 10px;
        padding: 14px 16px;
        font-size: 14px;
        line-height: 1.5;
        color: #0f172a;
        font-weight: 500;
    }
    .ar-existing-answer-box {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        border-left: 4px solid #10b981;
        border-radius: 10px;
        padding: 12px 14px;
        font-size: 13.5px;
        line-height: 1.45;
        color: #166534;
    }
    .ar-gauge-score {
        font-size: 26px;
        font-weight: 800;
        letter-spacing: -0.02em;
    }
    .ar-reason-callout {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 13px;
        line-height: 1.45;
        color: #334155;
        margin-top: 10px;
    }
    .ar-reason-label {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        margin-bottom: 3px;
    }
    .ar-ai-draft-box {
        background: #fdfaf6;
        border: 1px solid #fed7aa;
        border-radius: 12px;
        padding: 14px 16px;
        position: relative;
    }
    .ar-ai-draft-text {
        font-size: 13.5px;
        line-height: 1.55;
        color: #1e293b;
        white-space: pre-wrap;
        font-weight: 500;
    }
    .ar-modal-footer {
        padding: 16px 24px;
        border-top: 1px solid var(--ar-line-soft);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        background: #fafafa;
    }
    /* Confirmation & Action Dialogs (Signature RAMSTAT Modal Style) */
    .ar-modal-dialog--confirm {
        position: relative;
        max-width: 440px;
        width: 100%;
        background: #ffffff;
        border-radius: 24px;
        padding: 32px 28px 26px;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
        border: 1px solid rgba(226, 232, 240, 0.85);
        text-align: center;
        overflow: visible;
        animation: ar-modal-slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes ar-modal-slide-up {
        from { opacity: 0; transform: translateY(16px) scale(0.97); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .ar-confirm-close-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 50%;
        background: #f8fafc;
        color: #94a3b8;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .ar-confirm-close-btn:hover {
        background: #f1f5f9;
        color: #0f172a;
    }
    .ar-confirm-badge {
        width: 56px;
        height: 56px;
        margin: 0 auto 16px;
        border-radius: 18px;
        background: #fff1f2;
        color: #e11d48;
        border: 1px solid #ffe4e6;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .ar-confirm-badge svg {
        width: 24px;
        height: 24px;
    }
    .ar-confirm-title {
        margin: 0 0 6px;
        font-size: 20px;
        font-weight: 700;
        color: #0f172a;
        letter-spacing: -0.3px;
        line-height: 1.3;
        font-family: "Onest", system-ui, sans-serif;
    }
    .ar-confirm-subtitle {
        margin: 0 0 18px;
        font-size: 14px;
        font-weight: 500;
        color: #64748b;
        line-height: 1.45;
        font-family: "Onest", system-ui, sans-serif;
    }
    .ar-confirm-item-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 14px 16px;
        margin-bottom: 12px;
        text-align: left;
    }
    .ar-confirm-item-title {
        font-weight: 700;
        font-size: 14px;
        color: #1e293b;
        margin-bottom: 6px;
        line-height: 1.4;
        word-break: break-word;
    }
    .ar-confirm-item-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12.5px;
        color: #64748b;
        font-weight: 500;
    }
    .ar-confirm-nmid-badge {
        font-family: ui-monospace, "SF Mono", Menlo, monospace;
        font-size: 12px;
        font-weight: 700;
        color: #ff840b;
        background: rgba(255, 132, 11, 0.08);
        padding: 2px 8px;
        border-radius: 6px;
    }
    .ar-confirm-warning-box {
        background: #fff7ed;
        border: 1px solid #ffedd5;
        border-radius: 12px;
        padding: 10px 14px;
        font-size: 12.5px;
        color: #9a3412;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        line-height: 1.45;
        margin-bottom: 22px;
    }
    .ar-confirm-warning-box svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        stroke: #ea580c;
    }
    .ar-confirm-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .ar-confirm-btn-cancel {
        height: 44px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        color: #4b5563;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        cursor: pointer;
        transition: all 0.18s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .ar-confirm-btn-cancel:hover {
        background: #e5e7eb;
        color: #111827;
    }
    .ar-confirm-btn-danger {
        height: 44px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        color: #ffffff;
        background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28);
        transition: all 0.18s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    .ar-confirm-btn-danger:hover {
        background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
        box-shadow: 0 6px 18px rgba(225, 29, 72, 0.38);
        transform: translateY(-1px);
    }
    .ar-confirm-btn-danger:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }
    /* Simulator Quick Chips */
    .ar-chip-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 8px;
    }
    .ar-chip-btn {
        background: #f1f5f9;
        border: 1px solid #cbd5e1;
        color: #334155;
        padding: 5px 12px;
        border-radius: 16px;
        font-size: 12px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s ease;
        user-select: none;
        outline: none;
    }
    .ar-chip-btn:hover {
        background: rgba(255, 131, 87, 0.12);
        border-color: var(--ar-orange);
        color: var(--ar-orange-end);
    }

    /* Main Tabs Navigation (Header Level Tabs) */
    .ar-nav-tabs {
        display: flex;
        align-items: center;
        gap: 6px;
        background: #f1f5f9;
        padding: 6px;
        border-radius: 14px;
        border: 1px solid #e2e8f0;
        margin-top: 18px;
        margin-bottom: 24px;
        overflow-x: auto;
    }
    .ar-nav-tab {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 600;
        color: #475569;
        background: transparent;
        border: none;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.18s ease;
        white-space: nowrap;
        user-select: none;
    }
    .ar-nav-tab:hover {
        color: #0f172a;
        background: rgba(255, 255, 255, 0.7);
    }
    .ar-nav-tab.active {
        color: var(--ar-orange);
        background: #ffffff;
        font-weight: 700;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .ar-tab-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 11.5px;
        font-weight: 700;
        min-width: 22px;
        height: 20px;
        padding: 0 7px;
        border-radius: 10px;
        background: var(--ar-orange-bg);
        border: 1px solid var(--ar-orange-border);
        color: var(--ar-orange);
        transition: all 0.15s ease;
    }
    .ar-tab-pill-alert {
        background: var(--ar-red-bg);
        border: 1px solid var(--ar-red-border);
        color: var(--ar-red-text);
    }
    .ar-tab-pane {
        display: none;
        animation: arFadeIn 0.18s ease;
    }
    .ar-tab-pane.active {
        display: block;
    }
    @keyframes arFadeIn {
        from { opacity: 0; transform: translateY(3px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Segmented Mode Control */
    .ar-segmented {
        display: inline-flex;
        align-items: center;
        background: #f1f5f9;
        padding: 4px;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
        gap: 4px;
    }
    .ar-segmented-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 8px 16px;
        font-family: "Onest", system-ui, sans-serif;
        font-size: 13px;
        font-weight: 500;
        color: #64748b;
        background: transparent;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        user-select: none;
        white-space: nowrap;
    }
    .ar-segmented-btn:hover:not(.active) {
        color: #0f172a;
        background: rgba(255, 255, 255, 0.6);
    }
    .ar-segmented-btn.active {
        color: var(--ar-orange);
        background: #ffffff;
        font-weight: 700;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .ar-ai-only.is-hidden,
    .ar-template-only.is-hidden {
        display: none !important;
    }

    /* Template Cards & Accordion */
    .ar-tpl-item {
        background: #ffffff;
        border: 1px solid var(--ar-border, #e2e8f0);
        border-radius: 16px;
        margin-bottom: 12px;
        transition: all 0.2s ease;
        overflow: hidden;
    }
    .ar-tpl-item:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }
    .ar-tpl-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        cursor: pointer;
        user-select: none;
        gap: 12px;
    }
    .ar-tpl-header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }
    .ar-tpl-title {
        font-size: 15px;
        font-weight: 600;
        color: #0f172a;
    }
    .ar-tpl-badges {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .ar-tpl-badge {
        font-size: 11.5px;
        font-weight: 500;
        padding: 2px 8px;
        border-radius: 6px;
        background: #f1f5f9;
        color: #475569;
    }
    .ar-tpl-chevron {
        width: 18px;
        height: 18px;
        color: #94a3b8;
        transition: transform 0.2s ease;
        flex-shrink: 0;
    }
    .ar-tpl-item.is-open .ar-tpl-chevron {
        transform: rotate(180deg);
    }
    .ar-tpl-body {
        display: none;
        padding: 0 20px 20px;
        border-top: 1px solid #f1f5f9;
        background: #fafafa;
    }
    .ar-tpl-item.is-open .ar-tpl-body {
        display: block;
    }
    .ar-tpl-text-box {
        margin-top: 16px;
        padding: 14px 16px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        font-size: 13.5px;
        color: #334155;
        line-height: 1.55;
        white-space: pre-wrap;
    }
    .ar-tpl-section-title {
        font-size: 13px;
        font-weight: 600;
        color: #475569;
        margin: 18px 0 8px;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .ar-tpl-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 10px;
    }
    .ar-tpl-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12.5px;
        font-weight: 500;
        color: #0f172a;
    }
    .ar-tpl-chip button {
        border: none;
        background: none;
        cursor: pointer;
        padding: 0;
        color: #94a3b8;
        font-size: 14px;
        line-height: 1;
        display: flex;
        align-items: center;
    }
    .ar-tpl-chip button:hover {
        color: #ef4444;
    }
    .ar-pattern-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 12px 14px;
        margin-bottom: 8px;
    }
    .ar-pattern-card-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    .ar-pattern-card-name {
        font-size: 13px;
        font-weight: 600;
        color: #0f172a;
    }
    .ar-pattern-card-text {
        font-size: 12.5px;
        color: #64748b;
        font-style: italic;
    }
    .ar-tpl-actions {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-top: 14px;
        margin-bottom: 4px;
    }
    .ar-tpl-inline-form {
        display: flex;
        gap: 8px;
        align-items: center;
        margin-top: 8px;
    }
    .ar-tpl-pattern-form {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
        background: #ffffff;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        padding: 14px;
    }

    /* Template Question History Table, Badges & Pagination */
    .ar-tpl-history-wrap {
        width: 100%;
        overflow-x: auto;
        border-radius: 14px;
        border: 1px solid var(--ar-line, #e2e8f0);
        background: #ffffff;
    }
    .ar-tpl-history-table {
        width: 100%;
        min-width: 900px;
        border-collapse: collapse;
        font-size: 13.5px;
    }
    .ar-tpl-history-table th {
        background: #f8fafc;
        color: #475569;
        font-weight: 600;
        font-size: 12.5px;
        padding: 12px 16px;
        border-bottom: 1px solid #e2e8f0;
        text-align: left;
        white-space: nowrap;
    }
    .ar-tpl-history-table td {
        padding: 16px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: top;
        color: var(--ar-text, #1e293b);
        line-height: 1.45;
    }
    .ar-tpl-history-table tr:last-child td {
        border-bottom: none;
    }
    .ar-tpl-history-table tr:hover td {
        background: #fafafa;
    }
    .aq-status {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        border-radius: 999px;
        font-size: 11.5px;
        font-weight: 600;
        line-height: 1.1;
        white-space: nowrap;
    }
    .aq-status--sent {
        background: #dcfce7;
        color: #15803d;
    }
    .aq-status--held {
        background: #ffedd5;
        color: #c2410c;
    }
    .aq-status--other {
        background: #f1f5f9;
        color: #475569;
    }
    .aq-confidence {
        display: inline-flex;
        align-items: center;
        padding: 3px 8px;
        border-radius: 6px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #64748b;
        font-size: 11.5px;
        font-weight: 500;
        white-space: nowrap;
        margin-top: 6px;
    }
    .aq-history-date {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 5px;
        color: #94a3b8;
        font-size: 12px;
    }
    .aq-history-text {
        max-height: 85px;
        overflow-y: auto;
        color: #334155;
        line-height: 1.5;
        word-break: break-word;
    }
    .aq-pagination {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 20px;
    }
    .aq-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        color: #0f172a;
        font-size: 13.5px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .aq-page-btn:hover:not(:disabled):not(.is-active) {
        border-color: var(--ar-orange);
        color: var(--ar-orange);
    }
    .aq-page-btn.is-active {
        border-color: var(--ar-orange);
        background: var(--ar-orange);
        color: #ffffff;
        cursor: default;
    }
    .aq-page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }
    .aq-page-ellipsis {
        min-width: 24px;
        text-align: center;
        color: #94a3b8;
    }

    /* Token Promo Banner */
    .ar-token-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 20px 24px;
        background: linear-gradient(135deg, #fffaf5 0%, #fff1e6 100%);
        border: 1px solid #ffd8be;
        border-radius: 18px;
        margin-bottom: 24px;
        box-shadow: 0 2px 10px rgba(255, 132, 11, 0.08);
    }
    .ar-token-banner-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: linear-gradient(135deg, #ff840b 0%, #ea580c 100%);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
    }
    .ar-token-banner-content {
        flex: 1;
    }
    .ar-token-banner-title {
        font-size: 16.5px;
        font-weight: 700;
        color: #9a3412;
        margin-bottom: 6px;
    }
    .ar-token-banner-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 6px 16px;
        margin-bottom: 6px;
    }
    .ar-token-banner-item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 13px;
        color: #7c2d12;
        line-height: 1.4;
    }
    .ar-banner-check {
        color: #ea580c;
        font-weight: 800;
        font-size: 14px;
    }
    .ar-token-banner-note {
        font-size: 12px;
        color: #9a3412;
        opacity: 0.85;
    }
    .ar-token-connected-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 20px;
        background: var(--ar-green-bg);
        border: 1px solid var(--ar-green-border);
        border-radius: 14px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }
    .ar-badge-demo {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #fff1f2;
        border: 1px solid #fda4af;
        color: #be123c;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
    }
    .ar-badge-connected {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--ar-green-bg);
        border: 1px solid var(--ar-green-border);
        color: var(--ar-green-text);
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 600;
    }
    .ar-btn-icon-danger {
        background: transparent;
        border: 1px solid transparent;
        color: #94a3b8;
        cursor: pointer;
        padding: 6px 8px;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.15s ease;
    }
    .ar-btn-icon-danger:hover {
        background: #fee2e2;
        border-color: #fecaca;
        color: #dc2626;
    }
    .ar-search-input {
        height: 36px;
        padding: 0 12px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-size: 13px;
        outline: none;
        transition: border-color 0.15s;
    }
    .ar-search-input:focus {
        border-color: #ff840b;
    }
    /* ---- Выбор режима загрузки базы знаний (Дополнить vs Заменить) ---- */
    .ar-kb-mode-section {
        margin: 14px auto 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        user-select: none;
        max-width: 520px;
        width: 100%;
    }
    .ar-kb-mode-label {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ar-muted, #64748b);
        text-align: center;
        letter-spacing: -0.1px;
    }
    .ar-kb-mode-segmented {
        display: inline-flex;
        align-items: center;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 3px;
        gap: 4px;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    .ar-kb-mode-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 16px;
        border-radius: 9px;
        border: 1px solid transparent;
        background: transparent;
        font-family: "Onest", system-ui, sans-serif;
        font-size: 13px;
        font-weight: 600;
        color: #64748b;
        cursor: pointer;
        transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
        outline: none;
    }
    .ar-kb-mode-btn:hover {
        color: #1e293b;
        background: rgba(255, 255, 255, 0.6);
    }
    .ar-kb-mode-btn.is-active {
        background: #ffffff;
        color: #0f172a;
        border-color: rgba(226, 232, 240, 0.9);
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    }
    .ar-kb-mode-radio {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 1.5px solid #cbd5e1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.18s ease;
    }
    .ar-kb-mode-btn.is-active .ar-kb-mode-radio {
        border-color: var(--ar-orange, #ff840b);
    }
    .ar-kb-mode-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: transparent;
        transition: background 0.18s ease;
    }
    .ar-kb-mode-btn.is-active .ar-kb-mode-dot {
        background: var(--ar-orange, #ff840b);
    }
    .ar-kb-mode-hint {
        font-size: 12px;
        color: #64748b;
        text-align: center;
        line-height: 1.4;
        transition: all 0.2s ease;
        padding: 2px 8px;
    }
    .ar-kb-mode-hint.is-replace {
        color: #dc2626;
        font-weight: 500;
    }
    @media (max-width: 480px) {
        .ar-kb-mode-segmented {
            flex-direction: column;
            width: 100%;
        }
        .ar-kb-mode-btn {
            width: 100%;
            justify-content: center;
        }
    }

    /* ---- Кастомный выпадающий список товаров симулятора (.fcn-select с поиском в верхней плашке) ---- */
    .ar-product-fcn-select {
        position: relative;
        font-family: "Onest", "Segoe UI", sans-serif;
        width: 100%;
    }
    .ar-product-fcn-select .fcn-select-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        border-radius: 14px;
        border: 1.5px solid var(--ar-line-soft);
        background: #ffffff;
        padding: 0 14px;
        font-family: inherit;
        font-size: 14px;
        color: #292827;
        cursor: text;
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    }
    .ar-product-fcn-select .fcn-select-trigger:hover,
    .ar-product-fcn-select.is-open .fcn-select-trigger,
    .ar-product-fcn-select:focus-within .fcn-select-trigger {
        border-color: var(--ar-orange);
        box-shadow: 0 6px 20px rgba(255, 131, 87, 0.12);
    }
    .ar-product-fcn-select.is-open .fcn-select-trigger {
        transform: translateY(-1px);
    }
    .ar-product-fcn-select .ar-search-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--ar-muted);
        flex-shrink: 0;
        pointer-events: none;
    }
    .ar-product-fcn-select .ar-search-input {
        flex: 1;
        min-width: 0;
        border: none;
        outline: none;
        background: transparent;
        font-size: 14px;
        font-family: inherit;
        font-weight: 500;
        color: #292827;
        padding: 12px 0;
        text-overflow: ellipsis;
    }
    .ar-product-fcn-select .ar-search-input::placeholder {
        color: var(--ar-muted);
        font-weight: 400;
    }
    .ar-product-fcn-select .ar-search-clear {
        background: none;
        border: none;
        color: #999;
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        padding: 2px 6px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: background 0.15s, color 0.15s;
    }
    .ar-product-fcn-select .ar-search-clear:hover {
        color: #1f2937;
        background: #f1f5f9;
    }
    .ar-product-fcn-select .fcn-select-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        height: 20px;
        color: #94a3b8;
        cursor: pointer;
        flex-shrink: 0;
        margin-left: 2px;
        transition: transform 180ms ease, color 180ms ease;
    }
    .ar-product-fcn-select .fcn-select-arrow:hover {
        color: #475569;
    }
    .ar-product-fcn-select.is-open .fcn-select-arrow {
        transform: rotate(180deg);
        color: var(--ar-orange);
    }
    .ar-product-fcn-select .fcn-select-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 8px;
        border-radius: 14px;
        border: 1px solid rgba(204, 204, 204, 0.92);
        background: #ffffff;
        box-shadow: 0 16px 36px rgba(18, 18, 18, 0.14);
        box-sizing: border-box;
    }
    .ar-product-fcn-select .fcn-select-menu.hidden {
        display: none !important;
    }
    .ar-product-fcn-select .ar-options-scroll {
        max-height: 250px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding-right: 2px;
    }
    .ar-product-fcn-select .fcn-select-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 12px;
        border-radius: 10px;
        font-size: 14px;
        color: #292827;
        cursor: pointer;
        transition: background-color 140ms ease;
    }
    .ar-product-fcn-select .fcn-select-option:hover,
    .ar-product-fcn-select .fcn-select-option.is-highlighted {
        background: rgba(23, 22, 21, 0.05);
    }
    .ar-product-fcn-select .fcn-select-option.is-selected {
        background: rgba(255, 132, 11, 0.1);
        font-weight: 600;
        color: var(--ar-orange-end);
    }
    .ar-product-fcn-select .ar-opt-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
    }
    .ar-product-fcn-select .ar-opt-nmid {
        font-size: 11.5px;
        color: var(--ar-muted);
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 6px;
        flex-shrink: 0;
        font-family: monospace;
        font-weight: 500;
    }
    .ar-product-fcn-select .fcn-select-option.is-selected .ar-opt-nmid {
        background: rgba(255, 132, 11, 0.18);
        color: var(--ar-orange-end);
        font-weight: 700;
    }
    .ar-product-fcn-select .ar-opt-empty {
        padding: 20px 12px;
        text-align: center;
        color: var(--ar-muted);
        font-size: 13.5px;
    }

    /* ============================================
       MOBILE RESPONSIVE (Phone & Tablet)
       ============================================ */

    /* Tablet: 1024px and below */
    @media (max-width: 1024px) {
        .ar-board-wrap {
            padding-top: 20px;
        }

        .ar-shell {
            padding: 20px 16px 16px;
            border-radius: 24px;
        }

        .ar-section {
            padding: 20px 16px;
        }
    }

    /* Phone: 768px and below */
    @media (max-width: 768px) {
        .ar-board-wrap {
            padding-top: 16px;
        }

        .ar-board-title {
            font-size: clamp(30px, 9vw, 38px);
        }

        .ar-shell {
            padding: 16px 12px 12px;
            border-radius: 20px;
        }

        /* Page header - stack vertically */
        .ar-page-head {
            flex-wrap: wrap !important;
        }

        .ar-page-subtitle {
            font-size: 14px;
            order: 10;
            width: 100%;
        }

        /* Segmented control */
        .ar-segmented {
            flex: 1 1 auto;
            min-width: 200px;
        }

        .ar-segmented-btn {
            font-size: 13px;
            padding: 9px 14px;
        }

        /* Stats grid - 2 columns */
        .ar-stats-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 10px;
        }

        .ar-stat-card {
            padding: 14px;
            min-height: 78px;
        }

        .ar-stat-label {
            font-size: 12px;
        }

        .ar-stat-value {
            font-size: 22px;
        }

        /* Sections */
        .ar-section {
            padding: 16px 12px;
            margin-bottom: 16px;
            border-radius: 16px;
        }

        .ar-section-title {
            font-size: 17px;
        }

        /* Navigation tabs - horizontal scroll */
        .ar-nav-tabs {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            gap: 6px;
        }

        .ar-nav-tab {
            font-size: 13px;
            padding: 10px 14px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* Filter tabs */
        .ar-filter-tabs {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .ar-filter-tab {
            font-size: 12px;
            padding: 6px 12px;
            white-space: nowrap;
        }

        /* Tables */
        .ar-table {
            font-size: 12px;
        }

        .ar-table th {
            padding: 10px 8px;
            font-size: 10px;
        }

        .ar-table td {
            padding: 10px 8px;
            font-size: 12px;
        }

        /* Setting rows - stack */
        .ar-setting-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .ar-setting-control {
            margin-left: 0;
        }

        /* Buttons */
        .ar-btn {
            font-size: 14px;
            padding: 10px 20px;
        }

        /* Modal */
        .ar-modal-window {
            max-width: calc(100vw - 20px);
            max-height: calc(100dvh - 20px);
            border-radius: 20px;
        }

        .ar-modal-header {
            padding: 16px;
        }

        .ar-modal-body {
            padding: 16px;
        }

        .ar-modal-grid {
            grid-template-columns: 1fr !important;
        }

        /* Stop topics grid */
        .ar-stop-topics-grid {
            grid-template-columns: 1fr;
        }

        /* Upload card */
        .ar-upload-card {
            padding: 20px 16px;
        }

        .ar-upload-actions {
            flex-direction: column;
            width: 100%;
        }

        .ar-upload-actions .ar-btn {
            width: 100%;
        }
    }

    /* Small phone: 480px and below */
    @media (max-width: 480px) {
        .ar-shell {
            padding: 14px 10px 10px;
            border-radius: 18px;
        }

        .ar-board-title {
            font-size: clamp(26px, 10vw, 32px);
        }

        .ar-stats-grid {
            gap: 8px;
        }

        .ar-stat-card {
            padding: 12px;
        }

        .ar-section {
            padding: 14px 10px;
        }

        .ar-segmented-btn {
            font-size: 12px;
            padding: 8px 10px;
        }
    }

    /* FAQ Section Styles (SEO & GEO) */
    .ar-faq-section {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 30px;
        padding: 36px 32px;
        margin-top: 108px;
        margin-bottom: 32px;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
        font-family: "Onest", system-ui, sans-serif;
        color: var(--ar-text);
        box-sizing: border-box;
    }
    .ar-faq-header {
        margin-bottom: 24px;
    }
    .ar-faq-title {
        font-size: 22px;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 6px 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .ar-faq-subtitle {
        font-size: 13.5px;
        color: var(--ar-muted);
        margin: 0;
        line-height: 1.5;
    }
    .ar-faq-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
        gap: 20px;
    }
    @media (max-width: 900px) {
        .ar-faq-grid {
            grid-template-columns: 1fr;
        }
        .ar-faq-section {
            padding: 20px 16px;
            margin-top: 72px;
            margin-bottom: 24px;
            border-radius: 20px;
        }
    }
    .ar-faq-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .ar-faq-group-title {
        font-size: 13.5px;
        font-weight: 700;
        color: #475569;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 2px;
    }
    .ar-faq-item {
        border: 1px solid #f1f5f9;
        border-radius: 12px;
        background: #f8fafc;
        overflow: hidden;
        transition: all 0.2s ease;
    }
    .ar-faq-item[open] {
        border-color: #ffd9b3;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(255, 131, 87, 0.08);
    }
    .ar-faq-summary {
        list-style: none;
        cursor: pointer;
        padding: 14px 16px;
        font-size: 14px;
        font-weight: 600;
        color: #1e293b;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        user-select: none;
        line-height: 1.4;
    }
    .ar-faq-summary::-webkit-details-marker {
        display: none;
    }
    .ar-faq-summary:hover {
        color: #ea580c;
    }
    .ar-faq-chevron {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        color: #94a3b8;
        transition: transform 0.2s ease, color 0.2s ease;
    }
    .ar-faq-item[open] .ar-faq-chevron {
        transform: rotate(180deg);
        color: #ea580c;
    }
    .ar-faq-answer {
        padding: 0 16px 14px 16px;
        font-size: 13px;
        color: #475569;
        line-height: 1.6;
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
    }
    .ar-faq-answer strong {
        color: #0f172a;
    }
    .ar-faq-answer ul, .ar-faq-answer ol {
        margin: 8px 0 8px 18px;
        padding: 0;
    }
    .ar-faq-answer li {
        margin-bottom: 4px;
    }

