/* accounts.css - полный стиль для модуля аккаунтов */

/* === Основные настройки модуля === */
.module-accounts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #ccc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Заголовок модуля */
.module-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

/* Меню функций */
.module-functions-menu {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.module-functions-menu .func-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;

    transition: all 0.4s;
    background: #384173;
    border: none;
    border-bottom: 4px solid #1d2344;
    box-shadow: 0 0 8px rgb(72 66 113);
}

.module-functions-menu .func-tab.active,
.module-functions-menu .func-tab:hover {
    background: #5763a3; 
    border: none; 
    border-bottom: 4px solid #242946;
    box-shadow: 0 0 12px rgb(105 93 188);
    transform: translateY(-5px);
    scale: 1.04;
}

/* Контент функций */
.module-functions-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* === Функция обработки аккаунтов === */
.accounts-processing {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}


/* ==============================
   Processing Module CSS
   ============================== */

/* Контейнер функции */
.module-func-content {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    animation: fadeInContent 1s ease forwards;
    flex-direction: column;
    flex-wrap: wrap;

}

/* Заголовок внутри func-content */
.accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* обязательно, чтобы не вылазил */
    flex-shrink: 0;
    box-sizing: border-box;
    margin-bottom: 10px;
    padding: 15px;
}
.accounts-header h3 {
    margin: 0;
}



/* Левая панель: загрузка аккаунтов */
.accounts-sidebar {
    flex: 0 0 280px; /* фиксированная ширина */
    background: #1a1a2e;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(74,63,143,0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    min-width: 280px;
    max-width: 280px;
}

/* Основная панель: список аккаунтов */
.accounts-main {
    flex: 1; /* занимает оставшееся место */
    background: #2c2c44;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(74,63,143,0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
}

/* --- Кастомный инпут файлов --- */
.file-upload-label {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #2c2c44;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px dashed #4a3f8f;
    text-align: center;
    font-size: 14px;
}

.file-upload-label:hover {
    background: #3a3a5e;
    border-color: #6c5ab5;
}

.file-upload-label input[type=file] {
    display: none; /* прячем настоящий input */
}


/* Информация о выбранных файлах */
.file-info {
    font-size: 13px;
    color: #aaa;
    margin-top: 6px;
}


/* Файловый инпут */
#account-files {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background: #2c2c44;
    color: #fff;
    cursor: pointer;
    box-sizing: border-box; /* важно для ширины */
}
#account-files:hover {
    border-color: #6c5ab5;
}

/* Информация о выбранных файлах */
.file-info {
    margin-top: 8px;
    font-size: 13px;
    color: #aaa;
}

#upload-preview {
    margin-top: 10px;
    font-size: 14px;
    color: #ccc;
    max-height: 200px;
    overflow-y: auto;
}

#upload-preview .pair {
    color: #6c5ab5;
}
#upload-preview .unpaired {
    color: #ff6b6b;
}

/* Лейблы формы */
.accounts-sidebar label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #ccc;
}
.accounts-sidebar input[type=file] {
    margin-top: 5px;
}


/* Форма загрузки */
#upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}





/* ==== Контейнер всей секции аккаунтов ==== */

.accounts-processing-container-raw{
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}
.accounts-processing-container {
    width: 100%;
    margin-left: 20px;
    font-family: Arial, sans-serif;
}

/* Заголовки таблицы */
.accounts-list-header {
    display: grid;
    grid-template-columns:  1fr 2fr 1fr 2fr 0.2fr;
    padding: 8px;
    background-color: #384173;
    font-weight: bold;
    border-bottom: 4px solid #200d42;
    border-radius: 10px;
    margin-bottom: -2px;
    position: sticky;
    top: 0;
    z-index: 10;
    scale: 1.02;
    justify-items: center;
    align-items: center;
}

/* Список аккаунтов */
.accounts-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 360px;
    overflow-y: auto;
    border: 2px solid #3F51B5;
    border-top: none;
    border-radius: 0 0 10px 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE и Edge */

}

.accounts-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Один аккаунт */
.account-item {
    display: grid;
    grid-template-columns:  1fr 2fr 1fr 2fr 0.2fr;
    padding: 10px;
    border-bottom: 2px solid #3f51b5;
    align-items: center;

    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.account-item:hover {
    background-color: #364375; /* лёгкий светлый фон */
    transform: translateY(-5px) scale(1.02); /* немного поднять и чуть увеличить */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* мягкая тень */
}

/* Чекбокс Кастомные */
.account-checkbox-label {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.account-checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.account-checkbox-label input[type="checkbox"]:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.account-checkbox-label input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 15px;
    color: white;
}


/* Столбцы */
.account-number {
    font-weight: 500;
}
.account-status {
    text-align: center;
}

/* Кнопка удалить */
.accounts-actions {
    margin-top: 10px;
    text-align: right;
}

/* Пустой список */
.empty-list {
    padding: 20px;
    text-align: center;
    color: #6b7280;
}

.account-number {
    margin-left: 25%;
}

.account-index {
    margin-left: 30%;
}


/* ==============================
   warming Module CSS
   ============================== */


/* Кнопки действий */
.accounts-actions-warming {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}


/* === Кнопка Остановить ===*/
#stop-warmup {
    position: relative;
    display: inline-block;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #f8292c, #b91c1c);
    border: none;
    border-bottom: 4px solid #6b0c0c;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 4px 10px rgb(54 6 6);
}

/* Эффект при наведении */
#stop-warmup:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 5px 15px rgb(166 46 46);
}

/* Эффект при нажатии */
#stop-warmup:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Псевдо-анимация свечения при наведении */
#stop-warmup::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgb(255 255 255 / 14%);
    transform: rotate(45deg) scale(0);
    transition: all 0.5s ease;
    pointer-events: none;
}

#stop-warmup:hover::before {
    transform: rotate(45deg) scale(1);
}

.table-warming tr.stopping {
    background-color: #a0241c;
    color: #ffc156;
    font-weight: bold;
}

.table-warming tr.stopping:hover{
    background-color: #a0241c;
    color: #ffc156;
    font-weight: bold;
    cursor: not-allowed;
}

.table-warming tr.stopping input[type="checkbox"] {
    cursor: not-allowed;
}



/* ==============================
   processed Module CSS 
   ============================== */

/* === Панель действий для processed аккаунтов === */
.processed-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1c1c2c, #222241);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(74,63,143,0.4);
    animation: fadeInProcessed 0.8s ease;
    flex-wrap: wrap;
    gap: 10px;
}

.processed-actions-left,
.processed-actions-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Задний фон */
.loading-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

/* Центрированное окно */
.loading-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    color: #fff;
    padding: 25px 35px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    text-align: center;
    z-index: 9999;
}

/* Анимация спиннера */
.spinner {
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Уведомление */
.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    z-index: 10000;
    opacity: 0.95;
    font-size: 14px;
}