:root {
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --accent-green: #00ffa3;
    --accent-red: #ff3366;
    /* 🟡 Янтарный акцент приложения — тот же, что в модалках и кнопках */
    --accent-amber: #fbbf24;
    --accent-amber-soft: rgba(251, 191, 36, 0.08);
    --accent-amber-border: rgba(251, 191, 36, 0.22);
    --accent-amber-border-strong: rgba(251, 191, 36, 0.45);
    --font-stack: 'Segoe UI', -apple-system, system-ui, sans-serif;
}

body {
    font-family: var(--font-stack);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    background-size: cover;
    color: var(--text-muted);
    margin: 0;
    /* 🪟 Сверху минимум отступа: шапка = строка заголовка Windows */
    padding: 4px 20px 20px 20px;
    user-select: none;
    overflow: hidden;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 15px;
    position: relative;
    flex-shrink: 0;
    height: 40px;
    /* 🪟 Шапка работает как строка заголовка Windows: тащим окно, тыкаем контролы */
    -webkit-app-region: drag;
}

/* Зона перетаскивания окна — центрированный блок с заголовком.
   Отдельно no-drag только у кнопок: внутри drag-зоны клик по кнопке
   иначе бы «залипал» на перетаскивание. */
.app-titlebar-drag {
    -webkit-app-region: drag;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 🛡️ Эмблема бренда — щит с молнией в янтарном градиенте */
.brand-emblem {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

/* 🟡 Кнопки свернуть/развернуть/закрыть — в янтарном стиле, ненавязчиво */
.app-titlebar-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 2px;
    height: 32px;
    -webkit-app-region: no-drag;
}

.titlebar-btn {
    width: 40px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    -webkit-app-region: no-drag;
}

.titlebar-btn:hover {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.titlebar-btn-close:hover {
    background: rgba(255, 51, 102, 0.15);
    color: #ff3366;
}

.header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #a78bfa;
}

/* «Ferma» — янтарным: акцент слова в логотипе */
.header h1 em {
    font-style: normal;
    color: #fbbf24;
}

.app-ver {
    /* В самом левом краю строки заголовка (кнопки окна — справа) */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: #a0aec0;
}

/* 🌍 Селектор языка — в янтарном стиле шапки */
.lang-select {
    -webkit-app-region: no-drag;
    height: 24px;
    margin: 4px 6px 0 0;
    align-self: center;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 6px;
    color: #fbbf24;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-stack);
    padding: 0 6px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-select:hover {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.12);
}

.lang-select:focus {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12);
}

.lang-select option {
    background: #161925;
    color: #e2e8f0;
    font-weight: 500;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    flex-shrink: 0;
    height: 42px;
    box-sizing: border-box;
}

.tab-btn {
    padding: 0 24px;
    height: 32px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 7px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    /* Цвета как были — добавлена янтарная обводка */
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.1);
}

.tab-content {
    display: none;
    flex-grow: 1;
    /* −170px шапка/табы, +16px освободили сверху (отступ 4px вместо 20px) */
    height: calc(100vh - 154px);
    box-sizing: border-box;
    min-height: 450px;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
    box-sizing: border-box;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, 0.10);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    height: 100%;
    overflow: hidden;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    flex-shrink: 0;
    text-align: center;
}

/* ============================================================
   🍪 COOKIE МЕНЕДЖЕР
   ============================================================ */

.cookie-manager-wrapper {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.cookie-manager-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 3px;
}

.cookie-manager-title {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 🗑️ Маленькая кнопка «Удалить бекап» для всех пачек */
.btn-clear-cookie-backup {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fbbf24;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-clear-cookie-backup:hover {
    color: #fcd34d;
    border-color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
}

/* 🔄 GetCookie */
.btn-get-cookie {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-get-cookie:hover {
    color: #93c5fd;
    border-color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
}
.btn-get-cookie.busy {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}
.btn-get-cookie.busy:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

.cookie-packs-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 140px;
    overflow-y: auto;
    padding: 2px 0;
}

/* 🔑 Строка ввода ZeroPoint API-ключа */
.api-key-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.api-key-label {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
}

.api-key-row input {
    flex: 1;
    min-width: 0;
    height: 24px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    color: #e2e8f0;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    padding: 0 6px;
    outline: none;
}

.api-key-row input:focus {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
}

.btn-save-api-key {
    height: 24px;
    width: 30px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 5px;
    color: #38bdf8;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.btn-save-api-key:hover {
    background: rgba(56, 189, 248, 0.2);
}

.pack-check-badge {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    margin-left: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 1px 7px;
    border-radius: 5px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Нет отчёта чека — бейдж не рисуем вовсе (иначе висит пустой квадратик) */
.pack-check-badge:empty {
    display: none;
}

/* 📝 Заметка прямо на пачке: текст одной строкой с обрезкой */
.pack-note-icon {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 6px;
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    cursor: help;
}

.btn-check-pack {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 5px;
    color: #38bdf8;
    cursor: pointer;
    font-size: 11px;
    padding: 1px 5px;
}

.btn-check-pack:disabled {
    opacity: 0.6;
    cursor: default;
}

/* 🔎 Ховер как у остальных кнопок пачки — цветная обводка + подсветка */
.btn-check-pack:hover:not(:disabled) {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.7);
    background: rgba(56, 189, 248, 0.16);
}

/* 🔎 Модалка проверки пачки (ZeroPoint) */
.packcheck-progress-row { margin-bottom: 10px; }
.packcheck-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.packcheck-bar { height: 10px; background: rgba(255, 255, 255, 0.06); border-radius: 6px; overflow: hidden; }
.packcheck-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #38bdf8, #22d3ee); transition: width 0.3s ease; }
.packcheck-pct { text-align: right; font-size: 11px; color: #38bdf8; margin-top: 3px; }
.packcheck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.packcheck-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); }
.packcheck-cell .pc-num { font-size: 20px; font-weight: 700; }
.packcheck-cell .pc-label { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.packcheck-cell.alive .pc-num { color: #4ade80; }
.packcheck-cell.dead .pc-num { color: #f87171; }
.packcheck-cell.face .pc-num { color: #a78bfa; }
.packcheck-cell.captcha .pc-num { color: #fbbf24; }
.packcheck-cell.ban .pc-num { color: #fb923c; }
.packcheck-status { font-size: 11px; color: #94a3b8; text-align: center; min-height: 16px; }

/* Кнопки действий по результатам чека */
.packcheck-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pc-act {
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    transition: all 0.15s ease;
}
.pc-act:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); }
.pc-act-captcha { border-color: rgba(251, 191, 36, 0.35); color: #fbbf24; background: rgba(251, 191, 36, 0.07); }
.pc-act-captcha:hover:not(:disabled) { background: rgba(251, 191, 36, 0.16); }
.pc-act-face { border-color: rgba(168, 85, 247, 0.35); color: #c084fc; background: rgba(168, 85, 247, 0.07); }
.pc-act-face:hover:not(:disabled) { background: rgba(168, 85, 247, 0.16); }
.pc-act-dead { border-color: rgba(248, 113, 113, 0.35); color: #f87171; background: rgba(248, 113, 113, 0.07); }
.pc-act-dead:hover:not(:disabled) { background: rgba(248, 113, 113, 0.16); }
.pc-act:disabled { opacity: 0.4; cursor: default; }
.pc-act-copy { margin-top: 8px; border-color: rgba(34, 197, 94, 0.4); color: #4ade80; background: rgba(34, 197, 94, 0.08); }
.pc-act-copy:hover:not(:disabled) { background: rgba(34, 197, 94, 0.18); }
.packcheck-solve { font-size: 11px; color: #38bdf8; text-align: center; margin-top: 8px; min-height: 16px; white-space: pre-line; }

/* 🔑 Кнопка ZeroPoint API в Cookie-менеджере */
/* 🔑 ZeroPoint API — тот же стиль, что «+ Добавить Cookie»
   (раньше был фиолетовым блоком, который выделялся как светофор) */
.btn-zeropoint {
    width: 100%;
    height: 28px;
    margin: 2px 0 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}
.btn-zeropoint:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Модалка ZeroPoint: строки ключей */
.zp-key-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.zp-key-row label { font-size: 11px; color: #94a3b8; }
.zp-key-row input {
    height: 28px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 12px;
    font-family: 'Consolas', monospace;
    padding: 0 8px;
    outline: none;
}
.zp-key-row input:focus { border-color: #a855f7; background: rgba(168, 85, 247, 0.06); }
.zp-hint { font-size: 10px; color: #64748b; line-height: 1.4; margin-top: 4px; }

.cookie-pack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(251, 191, 36, 0.06);
    border-radius: 6px;
    cursor: pointer;
    min-height: 38px;
}

.cookie-pack-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.cookie-pack-item.active {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
}

.cookie-pack-item .pack-name {
    font-size: 13px;
    font-weight: 600;
    color: #a8b4c8;
}

.cookie-pack-item.active .pack-name {
    color: #a855f7;
}

.pack-count-badge {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-left: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px 7px;
    border-radius: 4px;
}

.btn-edit-pack-gear,
.btn-delete-pack-cross,
.btn-note-pack {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-delete-pack-cross {
    color: #ef4444;
    font-size: 17px;
}

.btn-delete-pack-cross:hover {
    color: #ff3366;
    border-color: #ff3366;
    background: rgba(255, 51, 102, 0.1);
}

.btn-note-pack:hover {
    color: #fbbf24;
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.btn-edit-pack-gear:hover {
    color: #4facfe;
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.btn-create-new-pack-short {
    width: 100%;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 3px;
}

.btn-create-new-pack-short:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ============================================================
   ✅ ГАЛОЧКА ПОДТВЕРЖДЕНИЯ ВЕРСИИ (реестр/пути)
   ============================================================ */
.version-check-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.version-check-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.version-check-btn.busy {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    animation: versionCheckSpin 0.8s ease-in-out infinite;
    cursor: wait;
}

.version-check-btn.done {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
    cursor: default;
}

.version-check-btn.error {
    border-color: rgba(248, 113, 113, 0.6);
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
    cursor: default;
}

@keyframes versionCheckSpin {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.5; }
}

/* ============================================================
   🎛️ ПАНЕЛЬ УПРАВЛЕНИЯ (ВСЕ КНОПКИ ОДИНАКОВЫЕ)
   ============================================================ */

.controls-panel-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.controls-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.controls-row:last-child {
    justify-content: center;
}

.mod-btn {
    flex: 1; /* ✅ ВСЕ КНОПКИ ОДИНАКОВОГО РАЗМЕРА */
    position: relative; /* ⚙ для абсолютной шестерёнки у правого края */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    min-height: 40px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mod-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.mod-btn:active {
    transform: scale(0.98);
}

/* ============================================================
   💬 КАСТОМНАЯ ПОДСКАЗКА — единый стиль вместо нативного title
   ============================================================ */
/* Нативный title — системное серое окно не в стиле приложения.
   Теперь подсказка объявляется атрибутом data-tooltip, а рисует
   её один элемент .app-tooltip (см. initAppTooltip в renderer.js). */
.app-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: 260px;
    padding: 7px 11px;
    font-family: var(--font-stack);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-muted);
    background: rgba(10, 14, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.app-tooltip-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* хвостик к элементу (по умолчанию — снизу подсказки) */
.app-tooltip::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(10, 14, 20, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-right-radius: 2px;
    transform: rotate(45deg);
    left: var(--arrow-left, 50%);
    margin-left: -4px;
    bottom: -5px;
}

/* подсказка снизу от элемента — хвостик вверх */
.app-tooltip-below::after {
    bottom: auto;
    top: -5px;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-right-radius: 0;
    border-top-left-radius: 2px;
}

.mod-btn .mod-label {
    font-weight: 600;
    color: #c8d0dc;
    font-size: 13px;
}

.mod-btn .mod-state {
    font-weight: 700;
    font-size: 12px;
    min-width: 30px;
    text-align: center;
    padding: 2px 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

.mod-btn .mod-gear {
    font-size: 14px;
    opacity: 0.25;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    /* ⚙ Шестерёнка прижата к правому краю кнопки, а текст остаётся
       по центру. Раньше она шла сразу за текстом и «плавала» из-за
       разной длины названий (у «🔐 VoltLogin» длиннее остальных) */
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.mod-btn:hover .mod-gear {
    opacity: 0.6;
}

.mod-btn .mod-gear:hover {
    opacity: 1;
    color: #4facfe;
    transform: translateY(-50%) rotate(30deg);
}

.mod-btn-no-gear .mod-gear {
    display: none !important;
}

.mod-btn-off {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.25);
    background: rgba(167, 139, 250, 0.06);
}

.mod-btn-off .mod-label {
    color: #94a3b8;
}

.mod-btn-off .mod-state {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.mod-btn-off:hover {
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.08);
}

.mod-btn-on {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.08);
}

.mod-btn-on .mod-label {
    color: #fbbf24;
}

.mod-btn-on .mod-state {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.mod-btn-on:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.12);
}

/* ⭐ TELEGRAM — ТОТ ЖЕ РАЗМЕР, ЧТО И ВСЕ КНОПКИ */
.mod-btn-telegram.mod-btn-off {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.25);
    background: rgba(167, 139, 250, 0.06);
}

.mod-btn-telegram.mod-btn-off .mod-state {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.mod-btn-telegram.mod-btn-on {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.08);
}

.mod-btn-telegram.mod-btn-on .mod-state {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* ============================================================
   🧬 SPOOFER — штатная кнопка; при удержании — янтарная
   ============================================================ */
.mod-btn-spoofer {
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.mod-btn-spoofer .mod-label,
.mod-btn-spoofer .mod-state { position: relative; z-index: 1; }

.mod-btn-spoofer .mod-state { min-width: 54px; }

/* Заливка прогресса удержания (0 → 100%) — янтарная */
.mod-btn-spoofer.holding::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--hold-progress, 0%);
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.35), rgba(251, 191, 36, 0.15));
    pointer-events: none;
    z-index: 0;
    transition: width 0.1s linear;
}

.mod-btn-spoofer.holding {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.08);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.25);
}

.mod-btn-spoofer.holding .mod-label { color: #fbbf24; }

.mod-btn-spoofer.holding .mod-state {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}

/* Идёт спуф — кнопка заблокирована от повторного нажатия */
.mod-btn-spoofer.running {
    pointer-events: none;
    opacity: 0.85;
    cursor: progress;
}

.mod-btn-spoofer.done {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.06);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.25);
}

.mod-btn-spoofer.done .mod-label { color: #4ade80; }

.mod-btn-spoofer.done .mod-state {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
}

/* 📐 VoltLogin + Spoofer — ровно по половине ряда, текст не вылезает */
#btn-toggle-voltauth,
#btn-spoofer {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    gap: 6px;
}

#btn-toggle-voltauth .mod-label,
#btn-spoofer .mod-label {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

#btn-toggle-voltauth .mod-state,
#btn-spoofer .mod-state {
    min-width: 0;
    padding: 2px 8px;
    font-size: 11px;
}

/* ❌ УДАЛЕН .mod-btn-wide — теперь все кнопки flex: 1 */

/* ============================================================
   📊 СТАТУС-БАР
   ============================================================ */

#console-sticky-timers,
.status-bar-start {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.03);
    padding: 6px 14px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
    color: #94a3b8;
    flex-shrink: 0;
    min-height: 36px;
    width: 100%;
    margin-bottom: 10px;
    box-sizing: border-box;
}

#console-sticky-timers .label-wrap,
.status-bar-start .label-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#console-sticky-timers .label,
.status-bar-start .label {
    color: #64748b;
    opacity: 0.7;
}

#console-sticky-timers .time-current,
.status-bar-start .time-current {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

#console-sticky-timers .time-separator,
.status-bar-start .time-separator {
    color: #334155;
    opacity: 0.4;
}

#console-sticky-timers .time-total,
.status-bar-start .time-total {
    color: #64748b;
    opacity: 0.6;
}

#console-sticky-timers .progress-track,
.status-bar-start .progress-track {
    flex: 1;
    height: 4px;
    min-width: 80px;
    max-width: 100%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

#console-sticky-timers .progress-fill,
.status-bar-start .progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
    transition: width 0.6s ease;
}

#console-sticky-timers .percent,
.status-bar-start .percent {
    color: #fbbf24;
    font-weight: 600;
    font-size: 12px;
    min-width: 32px;
    text-align: right;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
    flex-shrink: 0;
}

/* ============================================================
   💳 СТАТУС-КАРТОЧКА
   ============================================================ */

.status-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.status-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 3px;
}

.status-card-title {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-card-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
}

.status-card-label {
    color: #94a3b8;
    font-weight: 500;
}

.status-card-value {
    color: #e2e8f0;
    font-weight: 600;
}

.status-card-status {
    font-size: 14px;
    opacity: 0.7;
}

.status-card-status.status-online {
    color: #4ade80;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.status-card-status.status-offline {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

.status-card-status.status-sleeping {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

.status-card-row-instances {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    width: 100%;
}

.status-card-label-instances {
    color: #94a3b8;
    font-weight: 500;
}

.status-card-instances {
    display: flex;
    gap: 16px;
}

.status-card-instance {
    font-size: 13px;
    font-weight: 600;
}

.status-card-instance.total {
    color: #94a3b8;
}

.status-card-instance.online {
    opacity: 0.7;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.status-card-instance.online.online-active {
    color: #4ade80;
    opacity: 0.7;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.status-card-row-services {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    width: 100%;
}

.status-card-service {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-card-service-label {
    color: #94a3b8;
    font-weight: 500;
}

.status-card-service-value {
    opacity: 0.7;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-card-service-value.online {
    color: #4ade80;
    text-shadow: 0 0 15px rgba(74, 222, 128, 0.15);
}

.status-card-service-value.offline {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

/* ============================================================
   🥃 СТЕКЛЯННЫЕ КНОПКИ СТАРТ/СТОП
   ============================================================ */

.btn-actions-centered.glass-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-glass {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 44px;
    min-width: 130px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-glass:hover {
    transform: translateY(-2px);
}

.btn-glass:active {
    transform: scale(0.97);
}

.btn-glass .btn-glass-icon {
    display: none;
}

.btn-glass .btn-glass-label {
    font-weight: 700;
    font-size: 14px;
}

.btn-glass .btn-glass-sub {
    display: none;
}

.btn-glass-start,
.btn-glass-stop {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.15);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.03);
}

.btn-glass-start:hover,
.btn-glass-stop:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.1);
}

.btn-glass-start {
    color: #4ade80;
}

.btn-glass-start:hover {
    color: #4ade80;
}

.btn-glass-stop {
    color: #ef4444;
}

.btn-glass-stop:hover {
    color: #ef4444;
}

/* ============================================================
   🔴 ПОДСВЕТКА КНОПКИ СТОП: ПЛАВНОЕ ЗАКРЫТИЕ АКТИВНО
   ============================================================ */

.btn-glass-stop.smooth-closing-active {
    border-color: rgba(248, 113, 113, 0.75);
    background: rgba(248, 113, 113, 0.1);
    box-shadow:
        0 0 0 1px rgba(248, 113, 113, 0.28),
        0 0 18px rgba(248, 113, 113, 0.22),
        inset 0 0 14px rgba(248, 113, 113, 0.07);
    animation: smoothClosingPulse 2.4s ease-in-out infinite;
}

.btn-glass-stop.smooth-closing-active:hover {
    border-color: rgba(248, 113, 113, 0.95);
    background: rgba(248, 113, 113, 0.16);
}

@keyframes smoothClosingPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.28), 0 0 18px rgba(248, 113, 113, 0.22), inset 0 0 14px rgba(248, 113, 113, 0.07); }
    50% { box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.45), 0 0 24px rgba(248, 113, 113, 0.35), inset 0 0 14px rgba(248, 113, 113, 0.12); }
}

.btn-glass-start.join-session-on {
    border-color: rgba(251, 146, 60, 0.75);
    background: rgba(251, 146, 60, 0.1);
    box-shadow:
        0 0 0 1px rgba(251, 146, 60, 0.28),
        0 0 18px rgba(251, 146, 60, 0.22),
        inset 0 0 14px rgba(251, 146, 60, 0.07);
    animation: joinSessionPulse 2.4s ease-in-out infinite;
}

.btn-glass-start.join-session-on:hover {
    border-color: rgba(251, 146, 60, 0.95);
    background: rgba(251, 146, 60, 0.16);
    box-shadow:
        0 0 0 1px rgba(251, 146, 60, 0.4),
        0 0 26px rgba(251, 146, 60, 0.32),
        inset 0 0 16px rgba(251, 146, 60, 0.1);
}

@keyframes joinSessionPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(251, 146, 60, 0.28),
            0 0 18px rgba(251, 146, 60, 0.22),
            inset 0 0 14px rgba(251, 146, 60, 0.07);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(251, 146, 60, 0.45),
            0 0 26px rgba(251, 146, 60, 0.38),
            inset 0 0 18px rgba(251, 146, 60, 0.12);
    }
}

/* Кнопка заморожена — подсветка не мешает, но и не исчезает полностью */
.btn-glass.frozen.join-session-on {
    animation: none;
    border-color: rgba(251, 146, 60, 0.5);
}

/* ============================================================
   📋 ОЧЕРЕДЬ
   ============================================================ */

.queue-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    max-height: calc(100% - 30px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.08);
    border-radius: 10px;
    padding: 8px;
    box-sizing: border-box;
}

.queue-empty-msg {
    font-size: 11px;
    color: #4a5568;
    text-align: center;
    padding: 20px 0;
}

.queue-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    gap: 10px;
}

.queue-row .q-pack-name {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.queue-row .q-pack-total {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.queue-row .q-pack-status {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
    text-align: right;
    white-space: nowrap;
}

.queue-row.current-farming {
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
}

.queue-row.current-farming .q-pack-name {
    color: #94a3b8;
    font-weight: 500;
}

.queue-row.current-farming .q-pack-status {
    color: #94a3b8;
    font-weight: 600;
}

/* ============================================================
   💾 ВКЛАДКА SOFTWARE (ПУТИ)
   ============================================================ */

.path-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
}

.path-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.path-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.path-input-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 50px 10px 14px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 38px;
    box-sizing: border-box;
    min-width: 0;
}

.path-input-wrapper input[type="text"]:focus {
    border-color: #a855f7;
}

.path-input-wrapper input[type="text"].path-valid {
    border-color: rgba(0, 255, 163, 0.6) !important;
    box-shadow: 0 0 25px rgba(0, 255, 163, 0.15);
    background: rgba(0, 255, 163, 0.06);
    color: #ffffff !important;
}

.path-input-wrapper input[type="text"].path-invalid {
    border-color: rgba(255, 51, 102, 0.6) !important;
    box-shadow: 0 0 25px rgba(255, 51, 102, 0.15);
    background: rgba(255, 51, 102, 0.06);
    color: #ff6b6b !important;
}

.status-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    z-index: 10;
    border-radius: 50%;
    pointer-events: none;
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    transition: all 0.3s ease;
    animation: indicatorPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-indicator.valid {
    color: #00ffa3 !important;
    text-shadow: 0 0 15px rgba(0, 255, 163, 0.5);
    background: rgba(0, 255, 163, 0.15);
    border: 2px solid rgba(0, 255, 163, 0.4);
    opacity: 1 !important;
}

.status-indicator.invalid {
    color: #ff3366 !important;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.5);
    background: rgba(255, 51, 102, 0.15);
    border: 2px solid rgba(255, 51, 102, 0.4);
    opacity: 1 !important;
}

@keyframes indicatorPop {
    0% {
        transform: scale(0) translateY(-50%);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(-50%);
        opacity: 1;
    }
}

button.btn-browse {
    padding: 0 16px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.btn-browse:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   📝 КОНСОЛИ (LOG)
   ============================================================ */

.log-box {
    display: block;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(251, 191, 36, 0.14);
    border-radius: 14px;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    padding: 14px;
    font-size: 13.5px;
    color: #cbd5e1;
    box-sizing: border-box;
    flex-grow: 1;
}

.log-box-wrapper {
    width: 100%;
    height: calc(100% - 35px);
    min-height: calc(100% - 35px);
    max-height: calc(100% - 35px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border: 2px solid transparent;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 5px;
}

.log-entry {
    margin-bottom: 8px;
    line-height: 1.5;
    text-align: left;
    word-break: break-all;
}

.log-time {
    color: #64748b;
    margin-right: 8px;
}

/* Разделитель «потолок» в консоли YummyAuto — отделяет схлопнутые старые строки */
#yummy-log-box .log-sep {
    margin: 2px 0 10px 0;
    padding: 2px 0;
    color: #475569;
    font-family: var(--font-stack);
    font-size: 12px;
    letter-spacing: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    border-bottom: 1px dashed rgba(100, 116, 139, 0.35);
    user-select: none;
}

/* ===== Вкладка YummyAuto: шрифт как во всём приложении =====
   .log-box по умолчанию моноширинный (Consolas) — в выводе YummyAuto
   это выглядит растянутым. Переопределяем на общий стиль приложения.
   Заодно убираем word-break: break-all — из-за него длинные строки
   рвались посреди слов и раздвигали текст. */
#yummy-log-box {
    font-family: var(--font-stack);
    font-size: 13px;
    letter-spacing: 0;
    word-break: normal;
    overflow-wrap: break-word;
}

#yummy-log-box .log-entry {
    font-family: var(--font-stack);
    letter-spacing: 0;
    word-break: normal;
    overflow-wrap: break-word;
}

#yummy-log-box .log-time {
    font-family: var(--font-stack);
    letter-spacing: 0;
}

/* Статусы аккаунтов в консоли YummyAuto */
#yummy-log-box .yummy-online {
    color: #22c55e;
    font-weight: 600;
}

#yummy-log-box .yummy-offline {
    color: #ef4444;
    font-weight: 600;
}

.log-entry-captcha-wait {
    color: #ffcc00;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

.log-entry-captcha-success {
    color: #00ffa3;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 255, 163, 0.3);
}

.log-entry-captcha-fail {
    color: #ff3366;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 51, 102, 0.3);
}

.log-entry-captcha-lock {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.log-entry-panic-alert {
    color: #ff3366;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

/* ============================================================
   🪟 МОДАЛЬНЫЕ ОКНА
   ============================================================ */

.settings-modal-overlay,
.cookie-input-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 18, 0.88);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-modal-overlay.active,
.cookie-input-overlay.active {
    display: flex;
}

.settings-modal,
.cookie-modal-card {
    background: #161925;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 420px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: calc(100vh - 32px);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal-card {
    width: 480px;
}

/* 🍪 Режим ввода куки: шире + нумерация строк, без переноса */
.cookie-modal-card.cookie-mode {
    width: 720px;
}
.cookie-paste-zone {
    display: flex;
    height: 220px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.cookie-paste-zone:focus-within { border-color: rgba(251, 191, 36, 0.6); }
.cookie-line-numbers {
    flex: 0 0 40px;
    padding: 12px 8px 12px 0;
    text-align: right;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    background: rgba(0, 0, 0, 0.18);
    overflow: hidden;
    user-select: none;
    white-space: pre;
}
.cookie-modal-card .cookie-paste-zone textarea {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: #fff;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px;
    box-sizing: border-box;
    margin-bottom: 0;
    overflow: hidden;
    white-space: pre;
    scrollbar-width: none;
}
/* 📝 Режим заметки: без нумерации, с переносом строк */
.cookie-modal-card.note-mode .cookie-paste-zone#proxy-paste-zone { display: none; }
.cookie-modal-card.note-mode .cookie-paste-zone textarea { white-space: pre-wrap; word-break: break-word; }

/* ✨ Та же янтарная подсветка, что у модалок настроек (размер не меняем) */
.cookie-modal-card {
    border: 1px solid rgba(251, 191, 36, 0.45);
    animation:
        fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        amberGlow 2.8s ease-in-out 0.3s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.settings-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.settings-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-modal-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.settings-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px 4px 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.settings-modal-body::-webkit-scrollbar { width: 0; height: 0; display: none; }

.settings-modal-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-modal-row-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.settings-modal-label {
    font-size: 14px;
    color: #c8d0dc;
    font-weight: 500;
}

.settings-modal-input {
    width: 80px;
    height: 34px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
}

.settings-modal-input:focus {
    border-color: #a855f7;
}

.settings-modal-hint {
    font-size: 12px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-modal-hint-center {
    text-align: center;
}

.settings-modal-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin: 4px 0;
}

.settings-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.settings-modal-footer-center {
    justify-content: center;
}

.settings-modal-confirm {
    padding: 10px 36px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto;
    position: relative;
    z-index: 6;
}

.settings-modal-confirm:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* --- VoltAuth Control: янтарная обводка --- */
@keyframes amberGlow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(251, 191, 36, 0.10),
            0 0 18px rgba(251, 191, 36, 0.12),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(251, 191, 36, 0.24),
            0 0 36px rgba(251, 191, 36, 0.28),
            0 10px 40px rgba(0, 0, 0, 0.5);
    }
}

.settings-modal-amber {
    border: 1px solid rgba(251, 191, 36, 0.45);
    animation:
        fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        amberGlow 2.8s ease-in-out 0.3s infinite;
}

.settings-modal-header-amber {
    border-bottom: 1px solid rgba(251, 191, 36, 0.22);
}

.settings-modal-title-amber {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.settings-modal-header-amber .settings-modal-close:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
}

.settings-modal-input-wide {
    flex: 1;
    width: auto;
    min-width: 0;
    text-align: left;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.settings-modal-input-wide::placeholder {
    color: #475569;
    font-weight: 400;
}

.settings-modal-input-wide:focus {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12);
}

.settings-modal-hint-amber {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.18);
}

/* 👁 Показать/скрыть пароль */
.password-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.password-wrap .settings-modal-input-wide {
    width: 100%;
    padding-right: 40px;
}

.password-eye {
    position: absolute;
    right: 7px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #64748b;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-eye:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.password-eye.active {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
}

/* Кнопка сохранения — приглушённая, без кричащего градиента */
.settings-modal-confirm-amber {
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: none;
}

.settings-modal-confirm-amber:hover {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.18);
}

/* Приглушённая кнопка «Отмена» в модалках подтверждения */
.settings-modal-cancel {
    padding: 10px 36px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: none;
}

.settings-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}

/* Опасное действие (удаление пачки) — красный акцент приложения */
.settings-modal-confirm-danger {
    background: rgba(255, 51, 102, 0.08);
    color: #ff3366;
    border: 1px solid rgba(255, 51, 102, 0.35);
    box-shadow: none;
}

.settings-modal-confirm-danger:hover {
    background: rgba(255, 51, 102, 0.14);
    border-color: rgba(255, 51, 102, 0.55);
    box-shadow: 0 0 18px rgba(255, 51, 102, 0.18);
    transform: translateY(-1px);
}

.settings-modal-confirm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Cookie Modal --- */
.cookie-modal-card h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.cookie-modal-card textarea {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    outline: none;
    resize: none;
    box-sizing: border-box;
    margin-bottom: 20px;
    /* Полосу прокрутки убираем — колёсик и тачпад работают как прежде */
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* старые Edge */
}

.cookie-modal-card textarea::-webkit-scrollbar {
    display: none;                  /* Chromium / Electron */
}

.cookie-modal-card textarea:focus {
    border-color: rgba(251, 191, 36, 0.6);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions button {
    width: 110px;
    padding: 10px 0;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-modal-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 💾 «Сохранить» — янтарная, как кнопки подтверждения в модалках настроек */
.btn-modal-save {
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: none;
}

.btn-modal-save:hover {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.18);
}

/* ============================================================
   🎛️ RADIO И CHECKBOX
   ============================================================ */

.settings-modal-checkbox input[type="radio"] {
    display: none;
}

.settings-modal-checkbox input[type="radio"] + .settings-modal-checkmark {
    width: 18px;
    height: 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.settings-modal-checkbox input[type="radio"]:checked + .settings-modal-checkmark {
    background: #a855f7;
    border-color: #a855f7;
}

.settings-modal-checkbox input[type="radio"]:checked + .settings-modal-checkmark::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

.settings-modal-checkbox input[type="checkbox"] {
    display: none;
}

.settings-modal-checkbox input[type="checkbox"] + .settings-modal-checkmark {
    width: 20px;
    height: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.settings-modal-checkbox input[type="checkbox"]:checked + .settings-modal-checkmark {
    background: #a855f7;
    border-color: #a855f7;
}

.settings-modal-checkbox input[type="checkbox"]:checked + .settings-modal-checkmark::after {
    content: "✓";
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ============================================================
   🎚️ SLIDERS
   ============================================================ */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    outline: none;
    transition: background 0.2s ease;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* 🔢 У полей выбора числа убираем нативный спиннер (стрелки):
   в тёмной теме он рисуется светлой «белой полоской» */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.settings-modal-slider-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.settings-modal-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Подпись ползунка — как .slider-label в модалке FarmTimer */
.settings-modal-slider-header .settings-modal-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Значение — янтарный бейдж как .slider-value в FarmTimer */
.settings-modal-slider-value {
    font-size: 13px;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    background: rgba(251, 191, 36, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    min-width: 80px;
    text-align: center;
}

.settings-modal-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    padding: 0 2px;
}

/* Variant 2 modal (console launcher settings) */
#cl-settings-modal-overlay .settings-modal {
    background: #0b1220 !important;
    border: 1px solid rgba(99,102,241,0.4) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}
#cl-settings-modal-overlay .settings-modal-header {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1)) !important;
    justify-content: center !important;
    position: relative !important;
    margin-bottom: 0 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid rgba(99,102,241,0.2) !important;
    border-radius: 12px 12px 0 0 !important;
}
#cl-settings-modal-overlay .settings-modal-close {
    position: absolute !important;
    right: 18px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: #a5b4fc !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    line-height: 1 !important;
}
#cl-settings-modal-overlay .settings-modal-close:hover {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
}
#cl-settings-modal-overlay .settings-modal-title {
    color: #a5b4fc !important;
    font-size: 15px !important;
}
#cl-settings-modal-overlay .settings-modal-body {
    background: transparent !important;
}
#cl-settings-modal-overlay .settings-modal-row span,
#cl-settings-modal-overlay .settings-modal-row label {
    color: #a5b4fc !important;
}
#cl-settings-modal-overlay input[type="number"],
#cl-settings-modal-overlay input[type="text"],
#cl-settings-modal-overlay select {
    background: #111827 !important;
    border: 1px solid #6366f1 !important;
    color: #e2e8f0 !important;
}
#cl-settings-modal-overlay button {
    background: rgba(99,102,241,0.12) !important;
    border: 1px solid #6366f1 !important;
    color: #a5b4fc !important;
}
#cl-settings-modal-overlay input[type="checkbox"]#cl-save-placeid {
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border: 1px solid #6366f1;
    border-radius: 6px;
    background: #111827;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}
#cl-settings-modal-overlay input[type="checkbox"]#cl-save-placeid:checked::after {
    content: '✓';
    position: absolute;
    top: 2px;
    left: 6px;
    color: #a5b4fc;
    font-size: 16px;
    font-weight: 700;
}
.settings-modal input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
}

.settings-modal input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.settings-modal input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
}

.settings-modal input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.settings-modal-slider-warning {
    color: #fbbf24;
    font-size: 9px;
}

/* ============================================================
   🔘 КНОПКА MANUAL
   ============================================================ */

.toggle-switch-btn {
    width: 130px;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.6);
    background: rgba(15, 23, 42, 0.6);
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.toggle-switch-btn.state-off {
    color: #ff3366;
    border-color: rgba(255, 51, 102, 0.3);
    background: rgba(255, 51, 102, 0.08);
    box-shadow: inset 0 0 10px rgba(255, 51, 102, 0.1);
}

.toggle-switch-btn.state-on {
    color: #00ffa3;
    border-color: rgba(0, 255, 163, 0.4);
    background: rgba(0, 255, 163, 0.08);
    box-shadow: inset 0 0 10px rgba(0, 255, 163, 0.15);
}

.toggle-switch-btn:hover {
    transform: translateY(-1px);
}

.toggle-switch-btn:active {
    transform: scale(0.97);
}

/* Старое правило #btn-toggle-manual { width: 110px !important } убрано:
   элемент стал янтарным ползунком (.cleaner-toggle, 44×24), а правило
   растягивало его до 110px с !important */

.tab-btn.active#btn-manual-cookie {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================================
   📜 СКРОЛЛБАРЫ
   ============================================================ */

.cookie-packs-list::-webkit-scrollbar,
.log-box::-webkit-scrollbar,
.queue-container::-webkit-scrollbar {
    width: 4px;
}

.cookie-packs-list::-webkit-scrollbar-track,
.log-box::-webkit-scrollbar-track,
.queue-container::-webkit-scrollbar,
.accounts-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.queue-container,
.accounts-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.account-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    transition: color 0.3s, background 0.3s;
    position: relative;
}
.account-row .acc-name {
    flex: 1;
    color: #4a5568;
    cursor: pointer;
}

/* Всплывающая подсказка "Cookie скопирован" */
.account-row .acc-delete-btn {
    display: none;
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
    transform: scale(1);
}
.account-row:hover .acc-delete-btn {
    display: inline-block;
}
.account-row .acc-delete-btn:hover {
    opacity: 1;
    transform: scale(1.3);
    color: #ef4444;
}

/* 🚀 Кнопка лаунча в строке аккаунта — видна при hover, как крестик удаления */
.account-row .acc-launch-btn {
    display: none;
    background: none;
    border: none;
    color: #fbbf24;
    cursor: pointer;
    font-size: 12px;
    padding: 0 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
    transform: scale(1);
}
.account-row:hover .acc-launch-btn {
    display: inline-block;
}
.account-row .acc-launch-btn:hover {
    opacity: 1;
    transform: scale(1.3);
}

/* Модальное окно подтверждения удаления куки */
.cookie-delete-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.cookie-delete-modal {
    background: #1e293b;
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    padding: 20px 24px;
    min-width: 260px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.cookie-delete-modal .cdm-close {
    position: absolute;
    top: 8px; right: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}
.cookie-delete-modal .cdm-close:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    transform: scale(1.2);
}
.cookie-delete-modal .cdm-title {
    font-size: 13px;
    color: #e2e8f0;
    margin-bottom: 16px;
    text-align: center;
}
.cookie-delete-modal .cdm-btn-delete {
    width: 100%;
    padding: 8px;
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #f87171;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}
.cookie-delete-modal .cdm-btn-delete:hover {
    background: rgba(248, 113, 113, 0.3);
}
/* 🚀 Подтверждения лаунча: ряд кнопок (янтарная ОК + серая Отмена) */
.cookie-delete-modal .cdm-btn-row {
    display: flex;
    gap: 8px;
}
.cookie-delete-modal .cdm-btn-ok {
    flex: 1;
    padding: 8px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}
.cookie-delete-modal .cdm-btn-ok:hover {
    background: rgba(251, 191, 36, 0.3);
}
.cookie-delete-modal .cdm-btn-cancel {
    flex: 1;
    padding: 8px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}
.cookie-delete-modal .cdm-btn-cancel:hover {
    background: rgba(148, 163, 184, 0.25);
}
.cookie-copied-tooltip {
    position: absolute !important;
    background: rgba(0, 0, 0, 1);
    color: #fbbf24;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 99999 !important;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    animation: cookieCopiedFade 1.2s ease-out forwards;
}
@keyframes cookieCopiedFade {
    0% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(-6px); }
    100% { opacity: 0; transform: translateY(-12px); }
}
.account-row .acc-num {
    color: #64748b;
    font-weight: 600;
    min-width: 24px;
}
.account-row .acc-name {
    flex: 1;
    color: #4a5568;
}
.account-row.alive .acc-name {
    color: #e2e8f0;
}
.account-row .acc-status {
    font-size: 11px;
    color: #4a5568;
}
.account-row.alive .acc-status {
    color: #22c55e;
}
.account-row.alive {
    background: rgba(34, 197, 94, 0.06);
}

/* 🏷️ Бейдж состояния по центру строки аккаунта (banned / cookie dead) */
.account-row .acc-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0.9;
}
.account-row .acc-badge.banned {
    color: #ef4444;
}
.account-row .acc-badge.cookie-dead {
    color: #f87171;
}
.account-row .acc-badge.captcha {
    color: #fbbf24;
}
.account-row .acc-badge.locked {
    color: #fbbf24;
}

.cookie-packs-list::-webkit-scrollbar-thumb,
.log-box::-webkit-scrollbar-thumb,
.queue-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 700px) {
    .controls-row {
        flex-direction: column;
        gap: 8px;
    }
    .controls-row:last-child {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-glass {
        min-width: 100px;
        padding: 10px 18px;
        font-size: 13px;
        min-height: 38px;
    }
    #console-sticky-timers,
    .status-bar-start {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 12px;
        padding: 5px 12px;
    }
    #console-sticky-timers .progress-track,
    .status-bar-start .progress-track {
        min-width: 50px;
        flex: 1 1 100%;
        order: 10;
    }
    #console-sticky-timers .percent,
    .status-bar-start .percent {
        min-width: 26px;
        font-size: 11px;
    }
}

@media (max-width: 500px) {
    .btn-glass {
        min-width: 80px;
        padding: 8px 14px;
        font-size: 12px;
        min-height: 34px;
    }
    #console-sticky-timers,
    .status-bar-start {
        font-size: 11px;
        padding: 4px 10px;
    }
    #console-sticky-timers .progress-track,
    .status-bar-start .progress-track {
        min-width: 30px;
    }
    #console-sticky-timers .percent,
    .status-bar-start .percent {
        min-width: 20px;
        font-size: 10px;
    }
}

/* ============================================================
   📱 TELEGRAM — СТИЛИ
   ============================================================ */

/* Кнопка Telegram в панели */
.mod-btn-telegram.mod-btn-off {
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.25);
    background: rgba(167, 139, 250, 0.06);
}

.mod-btn-telegram.mod-btn-off .mod-state {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}

.mod-btn-telegram.mod-btn-on {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.08);
}

.mod-btn-telegram.mod-btn-on .mod-state {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

/* ============================================================
   МОДАЛКА TELEGRAM
   ============================================================ */
.telegram-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 18, 0.8);
    backdrop-filter: blur(12px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.telegram-modal-overlay.active {
    display: flex;
}

.telegram-modal {
    background: #161925;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 420px;
    max-width: 95%;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.telegram-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.telegram-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

.telegram-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.telegram-modal-close:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.telegram-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0;
}

.telegram-modal-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.telegram-modal-row label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.telegram-modal-row input {
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.telegram-modal-row input:focus {
    border-color: #a78bfa;
}

/* Статус */
.telegram-modal-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 4px;
}

.telegram-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.telegram-status-dot.online {
    background: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.telegram-status-dot.offline {
    background: #a78bfa;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.3);
}

.telegram-status-text {
    font-size: 13px;
    font-weight: 500;
    color: #c8d0dc;
}

.telegram-status-text.online {
    color: #fbbf24;
}

.telegram-status-text.offline {
    color: #94a3b8;
}

/* Чекбокс */
.telegram-modal-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.telegram-modal-checkbox-row label {
    font-size: 13px;
    font-weight: 500;
    color: #c8d0dc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-modal-checkbox-row input[type="checkbox"] {
    display: none;
}

.telegram-modal-checkbox-row .checkmark {
    width: 18px;
    height: 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.telegram-modal-checkbox-row input[type="checkbox"]:checked + .checkmark {
    background: #a78bfa;
    border-color: #a78bfa;
}

.telegram-modal-checkbox-row input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* Кнопка Сохранить */
.telegram-modal-footer {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.telegram-modal-btn {
    padding: 10px 48px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
    color: #fff;
}

.telegram-modal-btn:hover {
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
    transform: translateY(-1px);
}

.telegram-modal-btn:active {
    transform: scale(0.97);
}

/* ============================================================
   ✨ TELEGRAM-МОДАЛКА — янтарная подсветка, как у остальных настроек
   ============================================================ */
.telegram-modal-amber {
    border: 1px solid rgba(251, 191, 36, 0.45);
    animation:
        fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        amberGlow 2.8s ease-in-out 0.3s infinite;
}

.telegram-modal-header-amber {
    border-bottom-color: rgba(251, 191, 36, 0.22);
}

.telegram-modal-title-amber {
    color: #fbbf24;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
}

.telegram-modal-close-amber:hover {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
}

.telegram-modal-footer-amber {
    border-top-color: rgba(251, 191, 36, 0.22);
}

.telegram-modal-amber .telegram-modal-row input:focus {
    border-color: rgba(251, 191, 36, 0.6);
}

.telegram-modal-amber .telegram-modal-checkbox-row input[type="checkbox"]:checked + .checkmark {
    background: #fbbf24;
    border-color: #fbbf24;
}

.telegram-modal-btn-amber {
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    border: none;
    box-shadow: none;
}

.telegram-modal-btn-amber:hover {
    background: rgba(251, 191, 36, 0.14);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.18);
    transform: translateY(-1px);
}

/* Адаптив */
@media (max-width: 600px) {
    .telegram-modal {
        width: 95%;
        padding: 18px;
    }
    .telegram-modal-btn {
        padding: 10px 32px;
    }
}

/* ============================================================
   📱 TELEGRAM — СОСТОЯНИЕ ПОДКЛЮЧЕНИЯ
   ============================================================ */

.mod-btn-connecting {
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
    background: rgba(251, 191, 36, 0.08) !important;
    animation: pulseGlow 1s ease-in-out infinite;
}

.mod-btn-connecting .mod-state {
    color: #fbbf24 !important;
    background: rgba(251, 191, 36, 0.15) !important;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(251, 191, 36, 0.25);
    }
}

/* Статус-дот в модалке — connecting */
.telegram-status-dot.connecting {
    background: #fbbf24;
    animation: pulseDot 0.8s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

.telegram-status-text.connecting {
    color: #fbbf24;
}

/* ============================================================
   ⚙️ ШЕСТЕРЁНКА НА КНОПКЕ СТОП
   ============================================================ */

.btn-glass .btn-stop-gear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, color 0.2s;
    padding: 2px;
}

.btn-glass .btn-stop-gear:hover {
    opacity: 1;
    /* Красный кнопки СТОП (#ef4444) — как цвет самой кнопки */
    color: #ef4444;
    transform: translateY(-50%) rotate(30deg);
}

/* ============================================================
   ⚙️ ШЕСТЕРЁНКА НА КНОПКЕ СТАРТ
   ============================================================ */

.btn-glass .btn-start-gear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s, color 0.2s;
    padding: 2px;
}

.btn-glass .btn-start-gear:hover {
    opacity: 1;
    color: #4ade80;
    transform: translateY(-50%) rotate(30deg);
}

/* ============================================================
   🛠️ КОНСОЛЬ РАЗРАБОТЧИКА — терминальный вид
   ============================================================ */
.log-box.dev-log {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.55);
    word-break: break-all;
}

.dev-log .dev-time {
    color: #64748b;
    margin-right: 8px;
}

.dev-log .dev-lvl {
    white-space: pre-wrap;
}

.dev-log .dev-lvl-log { color: #94a3b8; }
.dev-log .dev-lvl-warn { color: #fbbf24; }
.dev-log .dev-lvl-err { color: #ff3366; }

/* ============================================================
   🔒 ЗАМОРОЖЕННЫЕ КНОПКИ (во время плавного закрытия)
   ============================================================ */

.btn-glass.frozen {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   🎚️ ПОЛЗУНОК НАСТРОЕК ОСТАНОВКИ
   ============================================================ */

.slider-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: opacity 0.25s ease, max-height 0.25s ease;
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
}

.slider-section.hidden {
    opacity: 0;
    max-height: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.slider-value {
    font-size: 13px;
    color: #fbbf24;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: rgba(251, 191, 36, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    min-width: 80px;
    text-align: center;
}

.slider-section input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    background: #334155;
    cursor: pointer;
}

.slider-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    transition: all 0.2s ease;
}

.slider-section input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
}

.slider-section input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    padding: 0 2px;
}

.slider-hint {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 2px solid rgba(168, 85, 247, 0.4);
}

/* ============================================================
   🌐 SMART-SWAP — стили блока умной смены IP+MAC
   ============================================================ */

.smart-swap-block {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transition: border-color 0.25s ease;
}

.smart-swap-block.active {
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.06);
}

.smart-swap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    user-select: none;
    transition: background 0.2s ease;
}

.smart-swap-block.active .smart-swap-header {
    cursor: pointer;
}

.smart-swap-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.smart-swap-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smart-swap-arrow {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.25s ease, opacity 0.25s ease;
    width: 12px;
    display: inline-block;
}

.smart-swap-block:not(.active) .smart-swap-arrow {
    opacity: 0;
}

.smart-swap-block.open .smart-swap-arrow {
    transform: rotate(90deg);
}

.smart-swap-title {
    font-size: 13px;
    font-weight: 700;
    color: #c8d0dc;
    letter-spacing: 0.3px;
}

.smart-swap-toggle {
    width: 52px;
    height: 26px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.smart-swap-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #64748b;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.smart-swap-toggle.on {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}

.smart-swap-toggle.on::after {
    left: 28px;
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.smart-swap-body {
    max-height: 0;
    overflow: hidden;
    flex-shrink: 0;
    transition: max-height 0.35s ease;
}

.smart-swap-block.open .smart-swap-body {
    max-height: 4000px;
    overflow: visible;
}

.smart-swap-inner {
    padding: 0 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smart-swap-inner .slider-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.smart-swap-inner .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.smart-swap-inner .slider-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.smart-swap-inner .slider-value {
    font-size: 13px;
    color: #fbbf24;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: rgba(251, 191, 36, 0.08);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    min-width: 50px;
    text-align: center;
}

.smart-swap-inner input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    background: #334155;
    cursor: pointer;
}

.smart-swap-inner input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.smart-swap-inner .slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    padding: 0 2px;
}

.slot-table-header {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 50px 86px;
    gap: 8px;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.slot-table-header .col-work { text-align: center; color: #4ade80; }
.slot-table-header .col-end  { text-align: center; color: #f87171; }
.slot-table-header .col-pack { text-align: center; color: #a855f7; }
.slot-table-header .col-sleep { text-align: center; color: #38bdf8; }

.slot-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: visible;
    padding-right: 4px;
    margin-top: 6px;
}

.slot-row {
    display: grid;
    grid-template-columns: 32px 1fr 1fr 50px 86px;
    gap: 8px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.slot-row:hover { background: rgba(255, 255, 255, 0.03); }
.slot-row.filled { background: rgba(251, 191, 36, 0.04); }

.slot-num {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.slot-row.filled .slot-num { color: #fbbf24; }

.time-input {
    width: 100%;
    height: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.2s ease;
    caret-color: #a855f7;
}

.time-input::placeholder {
    color: #334155;
    font-weight: 400;
}

.time-input:focus {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.06);
}

.time-input[data-type="work"].filled {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.05);
    color: #4ade80;
}

.time-input[data-type="end"].filled {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.05);
    color: #f87171;
}
.hidden { display: none !important; }

.time-input.readonly {
    background: rgba(0, 0, 0, 0.15);
    color: #64748b;
    border-color: rgba(255, 255, 255, 0.04);
    cursor: not-allowed;
}

.time-input.readonly:focus {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.time-input.readonly.filled {
    background: rgba(74, 222, 128, 0.03);
    color: #4ade80;
    opacity: 0.6;
}

/* 🎫 Выбор пачки в слоте Smart-Swap */
.pack-select {
    width: 100%;
    height: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.pack-select:focus {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.06);
}

.pack-select.filled {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.06);
    color: #c084fc;
}

.pack-select option {
    background: #0f172a;
    color: #e2e8f0;
}

/* 😴 Выбор сна по слоту (при Smart-Swap вместо общего «Отдых (мин)») */
.sleep-select {
    width: 100%;
    height: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Consolas', monospace;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.sleep-select:focus {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.06);
}

.sleep-select.filled {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.06);
    color: #7dd3fc;
}

.sleep-select option {
    background: #0f172a;
    color: #e2e8f0;
}

/* 🖱️ Anti-AFK: выбор интенсивности рядом с тумблером */
.antiafk-intensity {
    flex: 0 0 66px;
    width: 66px;
    height: 40px;
}

/* ============================================================ */
/* 🧹 CLEANER ROW — ЧИСТКА СЛЕДОВ СЕССИИ В SMART-SWAP            */
/* ============================================================ */

.cleaner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.07);
    border-radius: 8px;
    transition: border-color 0.25s ease, background 0.25s ease;
    margin-top: 4px;
}

.cleaner-row:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

.cleaner-row.running {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.03);
}

.cleaner-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cleaner-label {
    font-size: 13px;
    font-weight: 600;
    color: #c8d0dc;
    letter-spacing: 0.2px;
}

.cleaner-sub {
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

.cleaner-row.running .cleaner-label { color: #fbbf24; }

.cleaner-status {
    font-size: 10px;
    color: #fbbf24;
    font-weight: 600;
    margin-top: 2px;
    display: none;
}

.cleaner-row.running .cleaner-status { display: block; }

.cleaner-toggle {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.cleaner-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #64748b;
    border-radius: 50%;
    transition: all 0.25s ease;
}

/* 🧹 НОВОЕ: подсветка когда флаг включён */
.cleaner-toggle.on {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.5);
}

.cleaner-toggle.on::after {
    left: 22px;
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.cleaner-toggle:hover:not(.disabled):not(.busy) {
    border-color: rgba(255, 255, 255, 0.2);
}

.cleaner-toggle.busy {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    cursor: wait;
}

.cleaner-toggle.busy::after {
    left: 22px;
    background: #fbbf24;
    animation: cleanerSpin 1.2s ease-in-out infinite;
}

.cleaner-toggle.done {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
}

.cleaner-toggle.done::after {
    left: 22px;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

@keyframes cleanerSpin {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(0.7); opacity: 0.5; }
}

/* 🔌 Статус прокси-драйвера (WinDivert): зелёный = установлен, красный = нет */
.driver-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(100, 116, 139, 0.4);
}
.driver-status-dot.ok {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}
.driver-status-dot.fail {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
}
.driver-status-dot.checking {
    background: #fbbf24;
    animation: driverPulse 1s ease-in-out infinite;
}
@keyframes driverPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
}

/* Утилита скрытия (используется в updateSmartSwapToggleUI) */
.hidden { display: none !important; }
/* dual-range */
.dual-range { position: relative; width: 100%; height: 18px; }
.dual-range-track { position: absolute; top: 6px; left: 0; right: 0; height: 6px; background: #334155; border-radius: 3px; }
.dual-range-fill { position: absolute; top: 6px; height: 6px; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); border-radius: 3px; pointer-events: none; }
.dual-range input[type="range"] { position: absolute; top: 0; left: 0; width: 100%; height: 18px; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; margin: 0; }
.dual-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); cursor: pointer; border: 2px solid rgba(255,255,255,0.15); box-shadow: 0 0 15px rgba(168,85,247,0.3); pointer-events: auto; }
.dual-range input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); cursor: pointer; border: 2px solid rgba(255,255,255,0.15); pointer-events: auto; }

.tabs-gear-btn, .tab-gear {
    margin-left: auto;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 7px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
}
.tabs-gear-btn:hover, .tab-gear:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}
.tabs-gear-btn.open, .tab-gear.open {
    color: #fbbf24;
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.45);
}
.tabs-gear-menu {
    position: fixed;
    top: 60px;
    right: 20px;
    background: #0f172a;
    border: 1px solid rgba(251,191,36,0.35);
    border-radius: 8px;
    padding: 10px 12px;
    z-index: 10002;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.tabs-gear-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #fbbf24;
    padding: 4px 0;
    cursor: pointer;
}
.tabs-gear-menu .gear-title {
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 6px;
}

.tabs-gear-menu .gear-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.tabs-gear-menu .gear-close {
    background: transparent;
    border: none;
    color: #fbbf24;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.tabs-gear-menu .gear-close:hover {
    color: #fff;
}
.tabs-gear-menu input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(251,191,36,0.5);
    border-radius: 4px;
    background: rgba(15,23,42,0.8);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.tabs-gear-menu input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-color: #a855f7;
}
.tabs-gear-menu input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 2px;
    color: #fff;
    font-size: 13px;
font-weight: 700;
}

/* ============================================================
   🔑 LICENSE TAB
   ============================================================ */
.license-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
    height: 100%;
    box-sizing: border-box;
}
.license-card {
    flex: 1;
    min-width: 380px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(15,23,42,0.55) 0%, rgba(30,27,75,0.55) 50%, rgba(49,16,66,0.55) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid #2a2a5a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.license-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid #2a2a5a;
    font-weight: 700;
    font-size: 16px;
    color: #e0e0e0;
    letter-spacing: 0.3px;
}
.license-card-icon { font-size: 22px; }
.license-card-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; }
.license-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.license-row:last-of-type { border-bottom: none; }
.license-label { font-size: 13px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.license-value { font-size: 14px; color: #e0e0e0; font-weight: 500; }
.license-hwid { font-size: 11px; word-break: break-all; color: #999; max-width: 280px; text-align: right; }
.license-badge {
    padding: 4px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.license-badge.active { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid #4caf50; box-shadow: 0 0 8px rgba(76,175,80,0.2); }
.license-badge.expired { background: rgba(255,152,0,0.15); color: #ff9800; border: 1px solid #ff9800; box-shadow: 0 0 8px rgba(255,152,0,0.2); }
.license-badge.banned { background: rgba(244,67,54,0.15); color: #f44336; border: 1px solid #f44336; box-shadow: 0 0 8px rgba(244,67,54,0.2); }
.license-badge.unregistered { background: rgba(136,136,136,0.1); color: #888; border: 1px solid #444; }

.license-register { display: flex; flex-direction: column; gap: 12px; }
.license-divider { height: 1px; background: linear-gradient(90deg, transparent, #2a2a5a, transparent); margin: 4px 0; }
.license-input-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.license-input-group {
    display: flex;
    gap: 10px;
}
.license-input {
    flex: 1;
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 12px 16px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: 'Consolas', monospace;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    outline: none;
}
.license-input::placeholder { color: #555; font-family: inherit; font-size: 13px; letter-spacing: 0.3px; }
.license-input:focus { border-color: #f0c040; box-shadow: 0 0 12px rgba(240,192,64,0.1); background: #18182a; }
.license-activate-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f0c040, #e5a800);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.license-activate-btn:hover { background: linear-gradient(135deg, #ffd54f, #f0c040); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(240,192,64,0.3); }
.license-activate-btn:active { transform: translateY(0); }
.license-activate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.license-msg {
    margin-top: 4px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    display: none;
}
.license-msg.success { display: block; background: rgba(76,175,80,0.1); border: 1px solid #2e7d32; color: #81c784; }
.license-msg.error { display: block; background: rgba(244,67,54,0.1); border: 1px solid #c62828; color: #ef9a9a; }
.license-msg.info { display: block; background: rgba(33,150,243,0.1); border: 1px solid #1565c0; color: #90caf9; }

.license-buy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.license-buy-info { display: flex; flex-direction: column; gap: 2px; }
.license-buy-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.license-buy-discord { font-size: 14px; color: #e0e0e0; font-weight: 500; }
.license-buy-discord b { color: #5865f2; letter-spacing: 0.3px; }
.license-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #5865f2, #4752c4);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.license-buy-btn:hover { background: linear-gradient(135deg, #6a72f5, #5865f2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(88,101,242,0.35); }
.license-buy-btn:active { transform: translateY(0); }
.license-buy-btn svg { flex-shrink: 0; }

.license-price-section { display: flex; flex-direction: column; margin-top: auto; }
.license-price-title { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.license-price-value { font-size: 14px; color: #f0c040; font-weight: 700; letter-spacing: 0.5px; }

.license-messages-panel { margin-top: 4px; flex: 1; min-width: 300px; }
.license-msg-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #1e1e3a 100%);
    border: 1px solid #2a2a5a;
    border-radius: 16px;
    overflow: hidden;
}
.license-msg-card-header {
    padding: 14px 20px;
    background: rgba(240,192,64,0.06);
    border-bottom: 1px solid #2a2a5a;
    font-weight: 600;
    font-size: 14px;
    color: #f0c040;
}
.license-msg-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.license-message-item {
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 12px 16px;
}
.license-message-item .msg-title {
    font-weight: 600;
    font-size: 13px;
    color: #f0c040;
    margin-bottom: 4px;
}
.license-message-item .msg-text {
    font-size: 12px;
    color: #bbb;
    line-height: 1.5;
}

.license-reset-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.license-reset-hint { font-size: 10px; color: #666; letter-spacing: 0.3px; }
.license-reset-small {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
    max-width: 150px;
    margin-left: auto;
    margin-top: 2px;
    white-space: nowrap;
}
.license-reset-row { display: flex; align-items: flex-start; justify-content: space-between; padding: 8px 0; gap: 12px; }
.license-reset-info { display: flex; flex-direction: column; gap: 2px; }
.license-reset-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.license-reset-cooldown { font-size: 11px; color: #666; }
.license-reset-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid #f44336;
    border-radius: 8px;
    color: #f44336;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.license-reset-btn:hover:not(:disabled) { background: rgba(244,67,54,0.1); box-shadow: 0 0 8px rgba(244,67,54,0.2); }
.license-reset-btn:disabled { opacity: 0.3; cursor: not-allowed; border-color: #555; color: #555; }
