:root {
    --os-accent: #feb802;
    --os-accent-light: #fee502;
    --os-accent-bg: rgba(254, 184, 2, 0.08);
    --os-accent-bg-strong: rgba(254, 184, 2, 0.28);
    --os-accent-shape-bg: #fff8e0;
}

/* --- Общий контейнер сервиса --- */
.os-service-container {
    background-color: #f2f2f2;
    border: 0px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 2em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.os-service-container h3 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    color: #333;
}

/* --- Элементы формы --- */
.os-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    margin-bottom: 15px;
    background-color: #ffffff;
}

.os-textarea:focus {
    border-color: var(--os-accent);
    box-shadow: 0 0 0 1px var(--os-accent);
    outline: none;
}

.os-textarea[readonly] {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

/* --- Select: единый стиль, исправление Safari --- */
.os-service-container select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    padding: 8px 32px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    box-sizing: border-box;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 8px;
    cursor: pointer;
    color: inherit;
}

.os-service-container select:focus {
    border-color: var(--os-accent);
    box-shadow: 0 0 0 1px var(--os-accent);
    outline: none;
}

.os-service-container input {
    background-color: #fff !important;
}

label { font-size: 0.9em; 
    font-weight: 500;
    margin: 0 0 6px; }
hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #ccc;
}
/* --- Стили кнопок --- */
.os-btn {
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    padding: 12px 24px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

.os-btn-primary {
    position: relative;
    color: #222;
    border: none;
    font-weight: bold;
    overflow: hidden;
    background: transparent;
    isolation: isolate;
    transition: color 0.3s ease-in-out;
}

.os-btn-primary::before,
.os-btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
    pointer-events: none;
}

.os-btn-primary::before {
    background: linear-gradient(87.69deg, #feb802 -1.99%, #fee502 105.12%);
    background: -webkit-gradient(linear, right top, left top, from(#feb802), to(#fee502));
    opacity: 1;
}

.os-btn-primary::after {
    background-color: #fee502;
    opacity: 0;
}

.os-btn-primary:hover::after,
.os-btn-primary:focus-visible::after {
    opacity: 1;
}

.os-btn-primary:hover,
.os-btn-primary:focus-visible {
    color: #222;
    border: none;
}

.os-btn-primary:disabled::after,
.os-btn-primary[disabled]::after {
    opacity: 0;
}

.os-btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    border: 1px solid #ccc;
}
.os-btn-secondary:hover {
    background-color: #d0d0d0;
}


/* --- Блоки результатов и уведомлений --- */
.os-result-box {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.os-result-box h4 {
    margin-top: 0;
}
.os-result-box ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}
.os-result-box li {
    padding: 5px 0;
}
.os-result-box li strong {
    color: var(--os-accent);
}

.os-notification {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    display: none; /* Скрыт по умолчанию */
}
.os-notification.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    display: block;
}
.os-notification.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
    display: block;
}

/* --- Сетка для сервиса с двумя колонками --- */
.os-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}
.os-grid-col {
    flex: 1;
}

@media (max-width: 768px) {
    .os-grid {
        flex-direction: column;
    }
}





/* --- Стили для кнопки "Копировать" --- */

.os-copy-container {
    margin-bottom: 15px;
}

.os-copy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.os-copy-header label {
    margin: 0;
}

.os-copy-btn {
    flex-shrink: 0;
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.os-copy-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.os-copy-btn:active {
    background-color: #d0d0d0;
}

/* Состояние после успешного копирования */
.os-copy-btn.copied {
    background-color: #4caf50; /* Зеленый цвет */
    color: #fff;
    border-color: #45a049;
}

/* --- Модификатор для вертикальной сетки (1 колонка) --- */
.os-grid.os-grid-vertical {
    flex-direction: column; /* Располагаем колонки друг под другом */
    gap: 0; /* Убираем отступ между колонками, т.к. они теперь вертикальные */
}

/* Добавим отступ для всех колонок, кроме последней, чтобы они не слипались */
.os-grid.os-grid-vertical .os-grid-col:not(:last-child) {
    margin-bottom: 20px;
}

/* --- Очистка текста от ИИ --- */
.os-atc-preview-wrap {
    margin-top: 15px;
}

.os-atc-preview-wrap label {
    display: block;
}

#atc-stats .os-btn {
    margin-top: 10px;
}

.os-atc-preview {
    width: 100%;
    min-height: 280px;
    max-height: 280px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    margin-bottom: 15px;
    background-color: #ffffff;
    white-space: pre-wrap;
    word-break: break-word;
}

.os-atc-mark {
    background-color: #ffe08a;
    color: #333;
    border-radius: 2px;
    padding: 0 1px;
}

.os-atc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.os-atc-actions .os-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}



/* --- Стили для SEO Анализатора --- */
.os-stat-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
.os-stat-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}
.os-stat-list li:last-child {
    border-bottom: none;
}
.os-stat-list li span {
    color: #555;
}
.os-stat-list li strong {
    color: #000;
    font-weight: 600;
}
/* Цветовая индикация для метрик */
.os-stat-list li.success { background-color: #e8f5e9; } /* Зеленый */
.os-stat-list li.warning { background-color: #fff3e0; } /* Оранжевый */
.os-stat-list li.error   { background-color: #ffebee; } /* Красный */

.os-seo-freq-wrap {
    margin-top: 15px;
    overflow-x: auto;
}

.os-seo-freq-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.os-seo-freq-table th,
.os-seo-freq-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    word-break: break-word;
}

.os-seo-freq-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.os-seo-freq-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.os-seo-freq-table tbody tr:last-child td {
    border-bottom: none;
}

.os-seo-freq-table th:nth-child(1),
.os-seo-freq-table td:nth-child(1) { width: 50%; }
.os-seo-freq-table th:nth-child(2),
.os-seo-freq-table td:nth-child(2) { width: 25%; }
.os-seo-freq-table th:nth-child(3),
.os-seo-freq-table td:nth-child(3) { width: 25%; }

.os-seo-freq-empty {
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #fff3e0;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .os-seo-freq-wrap {
        overflow-x: visible;
        margin-top: 12px;
    }

    .os-seo-freq-table {
        table-layout: auto;
        border: none;
        background: transparent;
    }

    .os-seo-freq-table thead {
        display: none;
    }

    .os-seo-freq-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .os-seo-freq-table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .os-seo-freq-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .os-seo-freq-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid #f0f0f0;
        width: auto !important;
        font-size: 14px;
    }

    .os-seo-freq-table td:last-child {
        border-bottom: none;
    }

    .os-seo-freq-table td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-weight: 600;
        font-size: 13px;
        color: #777;
    }

    .os-seo-freq-table td:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 14px;
        background: #f5f5f5;
        font-weight: 600;
        font-size: 16px;
        color: #222;
        word-break: break-word;
    }

    .os-seo-freq-table td:first-child::before {
        font-size: 11px;
        font-weight: 500;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

/* --- Цепочка редиректов --- */
.os-redirect-chain {
    margin-top: 10px;
}

.os-redirect-step {
    display: flex;
    gap: 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
}

.os-redirect-step-final {
    border-color: #4caf50;
    background-color: #f1f8f2;
}

.os-redirect-step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: var(--os-accent);
    color: #222;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
}

.os-redirect-step-final .os-redirect-step-num {
    background-color: #4caf50;
}

.os-redirect-step-body {
    flex: 1;
    min-width: 0;
}

.os-redirect-url {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-all;
    margin-bottom: 6px;
}

.os-redirect-url a {
    color: var(--os-accent);
    text-decoration: none;
}

.os-redirect-url a:hover {
    text-decoration: underline;
}

.os-redirect-meta {
    margin: 8px 0;
}

.os-redirect-status {
    display: inline-block;
    padding: 3px 10px;
    background-color: #fff3e0;
    color: #e65100;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
}

.os-redirect-status-final {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.os-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.os-recaptcha {
    margin-bottom: 15px;
}

/* --- Таблица результатов проверки прокси --- */
.os-proxy-results {
    margin-top: 10px;
}

.os-proxy-stats {
    margin-bottom: 15px;
}

.os-proxy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.os-proxy-table th,
.os-proxy-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.os-proxy-table td.os-proxy-cell-error {
    overflow-wrap: anywhere;
}

.os-proxy-table th {
    background-color: #f7f7f7;
    font-weight: 600;
}

.os-proxy-table tr:last-child td {
    border-bottom: none;
}

.os-proxy-table tr.success td:nth-child(2) {
    color: #2e7d32;
    font-weight: 600;
}

.os-proxy-table tr.error td:nth-child(2) {
    color: #c62828;
    font-weight: 600;
}

.os-proxy-table tr.success {
    background-color: #f9fdf9;
}

.os-proxy-table tr.error {
    background-color: #fffafa;
}

@media (max-width: 768px) {
    .os-proxy-table {
        border: none;
        background: transparent;
        border-radius: 0;
    }

    .os-proxy-table thead {
        display: none;
    }

    .os-proxy-table tbody,
    .os-proxy-table tr {
        display: block;
    }

    .os-proxy-table tr {
        margin-bottom: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        overflow: hidden;
        background-color: #fff;
    }

    .os-proxy-table tr:last-child {
        margin-bottom: 0;
    }

    .os-proxy-table tr.success {
        background-color: #f9fdf9;
    }

    .os-proxy-table tr.error {
        background-color: #fffafa;
    }

    .os-proxy-table td {
        display: grid;
        grid-template-columns: minmax(88px, 34%) 1fr;
        gap: 4px 12px;
        align-items: start;
        border-bottom: 1px solid #e0e0e0;
    }

    .os-proxy-table tr td:last-child {
        border-bottom: none;
    }

    .os-proxy-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
    }

    .os-proxy-table tr:last-child td {
        border-bottom: 1px solid #e0e0e0;
    }

    .os-proxy-table tr:last-child td:last-child {
        border-bottom: none;
    }
}

.os-tts-result {
    margin-top: 15px;
}

.os-tts-result audio {
    width: 100%;
    margin-bottom: 10px;
}

/* --- Аудио в текст --- */
.os-speech-to-text .os-stt-step {
    margin-bottom: 20px;
}

.os-speech-to-text .os-stt-step-label {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 12px;
    color: #333;
}

.os-stt-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    color: #606770;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.os-stt-drop-zone:hover,
.os-stt-drop-zone.drag-over {
    border-color: var(--os-accent);
    background-color: var(--os-accent-bg);
}

.os-stt-drop-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606770' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

.os-stt-drop-zone:hover .os-stt-drop-icon,
.os-stt-drop-zone.drag-over .os-stt-drop-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feb802' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

.os-stt-drop-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.os-stt-file-info {
    margin-top: 12px;
}

.os-stt-file-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 40px 10px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.os-stt-file-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--os-accent-bg) no-repeat center / 28px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23feb802' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}

.os-stt-file-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.os-stt-file-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-stt-file-size {
    font-size: 11px;
    color: #888;
}

.os-stt-remove {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.os-stt-remove:hover {
    background: var(--os-accent);
}

.os-stt-process-btn {
    margin-bottom: 20px;
}

.os-stt-result {
    margin-top: 10px;
}

/* --- Сравнение текстов --- */
.os-diff-panel {
    width: 100%;
    height: 400px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    margin-bottom: 15px;
    padding: 0;
}

.os-diff-editor:focus {
    outline: 2px solid var(--os-accent);
    outline-offset: 0;
}

.os-diff-line {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #f0f0f1;
    padding: 2px 6px;
}

.os-diff-line-num {
    width: 52px;
    color: #50575e;
    user-select: none;
    text-align: right;
    flex: 0 0 auto;
}

.os-diff-line-text {
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1 1 auto;
}

.os-diff-line--same {
    background-color: #d4edda;
}

.os-diff-line--diff {
    background-color: #f8d7da;
}

/* --- Калькулятор ROI --- */
.os-roi-calculator {
    padding: 16px;
    background: #f5f5f5;
}

.os-roi-calculator .roi-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.os-roi-calculator .roi-fields-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 12px;
    align-items: end;
}

.os-roi-calculator .roi-fields-row + .roi-fields-row {
    margin-top: 10px;
}

.os-roi-calculator .roi-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.os-roi-calculator .roi-field label {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.os-roi-calculator .roi-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    box-sizing: border-box;
    background-color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.os-roi-calculator .roi-select {
    padding-right: 32px;
}

.os-roi-calculator .roi-input:focus,
.os-roi-calculator .roi-select:focus {
    border-color: var(--os-accent);
    box-shadow: 0 0 0 2px rgba(254, 184, 2, 0.12);
    outline: none;
}

.os-roi-calculator .roi-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 12px;
}

.os-roi-calculator .roi-btn-calc {
    position: relative;
    flex: 1;
    max-width: 280px;
    padding: 9px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    isolation: isolate;
    transition: color 0.3s ease-in-out;
}

.os-roi-calculator .roi-btn-calc::before,
.os-roi-calculator .roi-btn-calc::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
    pointer-events: none;
}

.os-roi-calculator .roi-btn-calc::before {
    background: linear-gradient(87.69deg, #feb802 -1.99%, #fee502 105.12%);
    background: -webkit-gradient(linear, right top, left top, from(#feb802), to(#fee502));
    opacity: 1;
}

.os-roi-calculator .roi-btn-calc::after {
    background-color: #fee502;
    opacity: 0;
}

.os-roi-calculator .roi-btn-calc:hover::after,
.os-roi-calculator .roi-btn-calc:focus-visible::after {
    opacity: 1;
}

.os-roi-calculator .roi-btn-calc:hover {
    opacity: 1;
}

.os-roi-calculator .roi-btn-calc:active {
    transform: scale(0.98);
}

.os-roi-calculator .roi-btn-reset {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f0f0f0;
    color: #666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.os-roi-calculator .roi-btn-reset:hover {
    background: #e4e4e4;
    color: #333;
}

.os-roi-calculator .roi-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.os-roi-calculator .roi-metric {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #efefef;
}

.os-roi-calculator .roi-metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}

.os-roi-calculator .roi-metric-icon--roi { background: var(--os-accent); }
.os-roi-calculator .roi-metric-icon--ctr { background: #9c27b0; }
.os-roi-calculator .roi-metric-icon--cr  { background: #2196f3; }
.os-roi-calculator .roi-metric-icon--ar  { background: #009688; }
.os-roi-calculator .roi-metric-icon--cpm { background: #4caf50; }
.os-roi-calculator .roi-metric-icon--cpc { background: #8bc34a; }
.os-roi-calculator .roi-metric-icon--cpa { background: #ffc107; color: #333; }
.os-roi-calculator .roi-metric-icon--cps { background: #ff9800; }
.os-roi-calculator .roi-metric-icon--apc { background: #03a9f4; }
.os-roi-calculator .roi-metric-icon--apa { background: #e91e63; }
.os-roi-calculator .roi-metric-icon--aps { background: #673ab7; }

.os-roi-calculator .roi-metric-label {
    flex: 1;
    font-size: 13px;
    color: #555;
    line-height: 1.3;
}

.os-roi-calculator .roi-metric-value {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
    text-align: right;
    min-width: 80px;
}

.os-roi-calculator .roi-metric-value--empty {
    color: #ccc;
    font-weight: 500;
}

@media (max-width: 768px) {
    .os-roi-calculator .roi-fields-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .os-roi-calculator .roi-btn-calc {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .os-roi-calculator .roi-fields-row {
        grid-template-columns: 1fr;
    }
}

/* --- Уникализатор креативов --- */
.os-creative-uniquifier .os-cu-step {
    margin-bottom: 20px;
}

.os-creative-uniquifier .os-cu-step-label {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 12px;
    color: #333;
}

.os-cu-mode-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.os-cu-mode-selection > div {
    flex: 1 1 0;
    min-width: 0;
}

.os-cu-mode-selection input[type="radio"] {
    display: none;
}

.os-cu-mode-selection label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}

.os-cu-mode-selection label:hover {
    border-color: #bbb;
}

.os-cu-mode-selection input[type="radio"]:checked + label {
    border-color: var(--os-accent);
    background: var(--os-accent-bg);
    color: var(--os-accent);
    box-shadow: 0 0 0 2px rgba(254, 184, 2, 0.15);
}

.os-cu-mode-hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 4px;
    line-height: 1.4;
}

.os-cu-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #606770;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background: #fff;
}

.os-cu-drop-zone:hover,
.os-cu-drop-zone.drag-over {
    border-color: var(--os-accent);
    background-color: var(--os-accent-bg);
}

.os-cu-file-items {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.os-cu-file-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.os-cu-file-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.os-cu-file-item span {
    font-size: 11px;
    word-break: break-all;
    text-align: center;
    color: #555;
}

.os-cu-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.os-cu-remove:hover {
    background: var(--os-accent);
}

.os-cu-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.os-cu-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.os-cu-option:has(input:checked) {
    border-color: var(--os-accent);
    background: var(--os-accent-bg);
}

.os-cu-option input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.os-cu-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.os-cu-option-body strong {
    font-size: 14px;
    color: #333;
}

.os-cu-option-body small {
    font-size: 12px;
    color: #888;
}

.os-cu-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.os-cu-slider-row input[type="range"] {
    flex: 1;
    cursor: pointer;
}

.os-cu-slider-row input[type="range"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.os-cu-slider-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--os-accent);
    min-width: 48px;
    text-align: right;
}

.os-cu-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.os-cu-setting label {
    display: block;
    margin-bottom: 4px;
}

.os-cu-setting input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    min-height: 40px;
}

.os-cu-setting input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.os-cu-randomize {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.os-cu-bg-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.os-cu-bg-color-row input[type="color"] {
    width: 48px;
    height: 36px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}

.os-cu-bg-hint {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.os-cu-generate-btn {
    width: 100%;
    margin-bottom: 10px;
}

.os-cu-status {
    text-align: center;
    min-height: 20px;
    font-size: 14px;
    margin-bottom: 10px;
    color: #606770;
}

.os-cu-status.processing {
    color: var(--os-accent);
    font-weight: 600;
}

.os-cu-status.success {
    color: #2e7d32;
    font-weight: 600;
}

.os-cu-status.error {
    color: #c62828;
    font-weight: 600;
}

.os-cu-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.os-cu-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.os-cu-result-card img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f0f0f0;
}

.os-cu-result-name {
    font-size: 11px;
    word-break: break-all;
    text-align: center;
    color: #555;
    margin-bottom: 8px;
}

.os-cu-result-card .os-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .os-cu-settings-grid {
        grid-template-columns: 1fr;
    }

    .os-cu-options {
        grid-template-columns: 1fr;
    }
}

/* --- Конвертер и сжатие изображений --- */
.os-image-converter .os-ic-step {
    margin-bottom: 20px;
}

.os-image-converter .os-ic-step-label {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 12px;
    color: #333;
}

.os-ic-seo-intro {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.os-ic-seo-intro p {
    margin: 0;
}

.os-ic-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #606770;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background: #fff;
}

.os-ic-drop-zone:hover,
.os-ic-drop-zone.drag-over {
    border-color: var(--os-accent);
    background-color: var(--os-accent-bg);
}

.os-ic-file-items {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.os-ic-file-item {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 40px 10px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.os-ic-file-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    background: #f0f0f0;
}

.os-ic-file-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.os-ic-file-name {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.os-ic-file-size {
    font-size: 11px;
    color: #888;
}

.os-ic-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.os-ic-remove:hover {
    background: var(--os-accent);
}

.os-ic-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.os-ic-setting label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.os-ic-setting input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    min-height: 40px;
}

.os-ic-setting input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.os-ic-bg-wrap {
    margin-top: 4px;
}

.os-ic-bg-wrap > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9em;
    font-weight: 500;
}

.os-ic-bg-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.os-ic-bg-color-row input[type="color"] {
    width: 48px;
    height: 36px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.os-ic-bg-hint {
    font-size: 13px;
    color: #666;
}

.os-ic-sub-label {
    font-weight: 600;
    font-size: 14px;
    margin: 16px 0 10px;
    color: #333;
}

.os-ic-naming-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.os-ic-naming-mode > div {
    flex: 1 1 0;
    min-width: 0;
}

.os-ic-naming-mode input[type="radio"] {
    display: none;
}

.os-ic-naming-mode label {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    background: #fff;
    transition: all 0.2s;
}

.os-ic-naming-mode label:hover {
    border-color: #bbb;
}

.os-ic-naming-mode input[type="radio"]:checked + label {
    border-color: var(--os-accent);
    background: var(--os-accent-bg);
    color: var(--os-accent);
}

.os-ic-group-wrap {
    margin-bottom: 8px;
}

.os-ic-group-wrap > label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.os-ic-text-input,
.os-ic-name-input {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

.os-ic-text-input {
    width: 100%;
}

.os-ic-name-preview {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--os-accent);
}

.os-ic-convert-btn {
    width: 100%;
    margin-bottom: 10px;
}

.os-ic-status {
    text-align: center;
    min-height: 20px;
    font-size: 14px;
    margin-bottom: 10px;
    color: #606770;
}

.os-ic-status.processing { color: var(--os-accent); font-weight: 600; }
.os-ic-status.success { color: #2e7d32; font-weight: 600; }
.os-ic-status.error { color: #c62828; font-weight: 600; }

.os-ic-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.os-ic-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.os-ic-result-card img {
    width: 100%;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f0f0f0;
}

.os-ic-result-name {
    font-size: 11px;
    word-break: break-all;
    text-align: center;
    color: #555;
}

.os-ic-result-size {
    font-size: 11px;
    color: #2e7d32;
    font-weight: 600;
    margin: 4px 0 8px;
    text-align: center;
}

.os-ic-result-card .os-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
}

.os-ic-download-all {
    width: 100%;
}

@media (max-width: 768px) {
    .os-ic-settings-grid {
        grid-template-columns: 1fr;
    }

    .os-ic-naming-mode > div {
        flex: 1 1 100%;
    }
}

/* --- Конвертер пропорций --- */
.os-aspect-ratio-converter .os-arc-step {
    margin-bottom: 20px;
}

.os-aspect-ratio-converter .os-arc-step-label {
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 12px;
    color: #333;
}

.os-arc-seo-intro {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.os-arc-seo-intro p { margin: 0; }

.os-arc-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #606770;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s, background-color 0.2s;
}

.os-arc-drop-zone:hover,
.os-arc-drop-zone.drag-over {
    border-color: var(--os-accent);
    background-color: var(--os-accent-bg);
}

.os-arc-file-info {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.os-arc-ratio-group {
    margin-bottom: 18px;
}

.os-arc-ratio-group:last-of-type {
    margin-bottom: 12px;
}

.os-arc-ratio-group-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.os-arc-ratio-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.os-arc-ratio-presets--misc {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    max-width: 280px;
}

.os-arc-ratio-presets input[type="radio"] { display: none; }

.os-arc-ratio-presets label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    min-height: 78px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}

.os-arc-ratio-text {
    line-height: 1.2;
}

.os-arc-ratio-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.os-arc-ratio-visual--horizontal {
    width: 54px;
    height: 34px;
}

.os-arc-ratio-visual--vertical {
    width: 34px;
    height: 54px;
}

.os-arc-ratio-visual--square {
    width: 40px;
    height: 40px;
}

.os-arc-ratio-visual--custom {
    width: 40px;
    height: 40px;
}

.os-arc-ratio-shape {
    display: block;
    border: 2px solid #aaa;
    border-radius: 3px;
    background: #ececec;
    box-sizing: border-box;
    aspect-ratio: var(--ratio);
}

.os-arc-ratio-visual--horizontal .os-arc-ratio-shape {
    width: 100%;
    max-height: 100%;
    height: auto;
}

.os-arc-ratio-visual--vertical .os-arc-ratio-shape {
    height: 100%;
    max-width: 100%;
    width: auto;
}

.os-arc-ratio-visual--square .os-arc-ratio-shape {
    width: 32px;
    height: 32px;
}

.os-arc-ratio-shape--custom {
    width: 28px;
    height: 22px;
    border-style: dashed;
    aspect-ratio: auto;
}

.os-arc-ratio-presets input:checked + label {
    border-color: var(--os-accent);
    background: var(--os-accent-bg);
    color: var(--os-accent);
}

.os-arc-ratio-presets input:checked + label .os-arc-ratio-shape {
    border-color: var(--os-accent);
    background: var(--os-accent-shape-bg);
}

.os-arc-custom-ratio-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
}

.os-arc-custom-ratio-row input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.os-arc-mode-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.os-arc-mode-selection > div {
    flex: 1 1 0;
    min-width: 0;
}

.os-arc-mode-selection input[type="radio"] { display: none; }

.os-arc-mode-selection label {
    width: 100%;
    box-sizing: border-box;
    display: block;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
}

.os-arc-mode-selection input:checked + label {
    border-color: var(--os-accent);
    background: var(--os-accent-bg);
    color: var(--os-accent);
}

.os-arc-mode-hint {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.os-arc-crop-stage {
    overflow: auto;
    padding: 4px;
    max-width: 100%;
}

.os-arc-crop-wrap {
    position: relative;
    display: block;
    line-height: 0;
    margin: 0 auto;
}

.os-arc-crop-img {
    display: block;
    user-select: none;
    pointer-events: none;
}

.os-arc-crop-box {
    position: absolute;
    top: 0;
    left: 0;
    border: 2px solid var(--os-accent);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: grab;
    box-sizing: border-box;
}

.os-arc-crop-box:active { cursor: grabbing; }

.os-arc-crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--os-accent);
    border-radius: 2px;
    z-index: 2;
    box-sizing: border-box;
}

.os-arc-crop-handle[data-handle="nw"] { top: -7px; left: -7px; cursor: nwse-resize; }
.os-arc-crop-handle[data-handle="ne"] { top: -7px; right: -7px; cursor: nesw-resize; }
.os-arc-crop-handle[data-handle="sw"] { bottom: -7px; left: -7px; cursor: nesw-resize; }
.os-arc-crop-handle[data-handle="se"] { bottom: -7px; right: -7px; cursor: nwse-resize; }

.os-arc-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.os-arc-setting label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.os-arc-setting input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    min-height: 40px;
}

.os-arc-setting input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.os-arc-blur-setting {
    margin-top: 4px;
}

.os-arc-blur-setting label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.os-arc-generate-btn {
    width: 100%;
    margin-bottom: 10px;
}

.os-arc-status {
    text-align: center;
    min-height: 20px;
    font-size: 14px;
    margin-bottom: 10px;
    color: #606770;
}

.os-arc-status.processing { color: var(--os-accent); font-weight: 600; }
.os-arc-status.success { color: #2e7d32; font-weight: 600; }
.os-arc-status.error { color: #c62828; font-weight: 600; }

.os-arc-results {
    display: flex;
    justify-content: center;
}

.os-arc-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.os-arc-result-card img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f0f0f0;
}

.os-arc-result-name {
    font-size: 12px;
    word-break: break-all;
    text-align: center;
    color: #555;
}

.os-arc-result-size {
    font-size: 12px;
    color: #2e7d32;
    font-weight: 600;
    margin: 6px 0 10px;
}

.os-arc-result-card .os-btn {
    width: 100%;
    min-width: 160px;
}

@media (max-width: 768px) {
    .os-arc-settings-grid {
        grid-template-columns: 1fr;
    }

    .os-arc-mode-selection {
        flex-direction: column;
    }
}