/* Стили для страницы статистики */
.stats-container {
    background-color: #242644;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
}

/* Стиль для контейнера кнопки добавления пользователя */
.add-user-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.add-user-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-user-btn:hover {
    background-color: #3a5ce4;
    transform: translateY(-2px);
}

/* Переопределение стилей для вкладок и контента */
.tabs {
    display: flex !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #3a3a55 !important;
    background-color: #242644 !important;
    border-radius: 8px 8px 0 0 !important;
    overflow: hidden !important;
}

.tab-btn {
    padding: 12px 20px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #a0a0a0 !important;
    transition: all 0.3s ease !important;
    border-bottom: 3px solid transparent !important;
    flex: 1 !important;
    text-align: center !important;
    background-color: #1a1a2e !important;
}

.tab-btn:hover {
    color: #4a6cf7 !important;
    background-color: #242644 !important;
}

.tab-btn.active {
    color: #4a6cf7 !important;
    border-bottom-color: #4a6cf7 !important;
    background-color: #242644 !important;
    font-weight: bold !important;
}

.tab-content {
    display: none !important;
}

.tab-content.active {
    display: block !important;
}

/* Остальные стили для статистики */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #3a3a55;
    padding-bottom: 15px;
}

.stats-header h2 {
    margin: 0;
    color: #4a6cf7;
    font-size: 22px;
    font-weight: bold;
}

/* Стили для вкладки статистики */

/* Общие стили для секции статистики */
.stats-section {
    background-color: #242644;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stats-section h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #3a3a55;
    padding-bottom: 10px;
}

.stats-section h3 i {
    margin-right: 10px;
    color: #4a6cf7;
}

/* Стили для подсекции статистики */
.stats-subsection {
    margin-top: 25px;
    padding: 15px;
    background-color: #1e1e38;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-subsection h4 {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #3a3a55;
    padding-bottom: 8px;
}

.stats-subsection h4 i {
    margin-right: 8px;
    color: #4a6cf7;
}

/* Стили для сводки статистики */
.stats-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    flex: 1;
    min-width: 250px;
    background-color: #1e1e38;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.stats-icon {
    background-color: #4a6cf7;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    font-size: 20px;
}

.stats-data {
    flex: 1;
}

.stats-data h4 {
    color: #e0e0e0;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.stats-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.stats-label {
    color: #a0a0a0;
}

.stats-value {
    color: #4a6cf7;
    font-weight: bold;
}

/* Стили для времени обновления */
.update-time {
    text-align: right;
    color: #a0a0a0;
    font-size: 12px;
    margin-top: 20px;
    font-style: italic;
}

.update-time i {
    margin-right: 5px;
}

/* Стили для сообщения об ошибке */
.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #f44336;
    text-align: center;
    margin: 20px 0;
}

.error-message i {
    font-size: 24px;
    margin-bottom: 10px;
}

.retry-button {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background-color: #3a5ce4;
}

/* Стили для таблицы статистики */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #a0a0a0;
    border-bottom: 2px solid #3a3a55;
    background-color: #1a1a2e;
}

.stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #3a3a55;
    font-size: 14px;
}

.stats-table tbody tr:hover {
    background-color: #2d2d57;
}

.stats-table td:last-child {
    text-align: right;
}

/* Стили для уровней использования */
.usage-normal {
    color: #4caf50;
}

.usage-warning {
    color: #ffc107;
}

.usage-critical {
    color: #f44336;
}

/* Стили для статуса аккаунта */
.account-status {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    font-weight: bold;
}

.status-active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-inactive {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.status-error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

.status-warning {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid #ff9800;
}

.status-pending {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid #2196f3;
}

.account-status i {
    margin-right: 5px;
}

/* Стили для кнопки переключения статуса */
.toggle-status-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
    color: #a0a0a0;
}

.toggle-status-btn:hover {
    transform: scale(1.2);
}

.toggle-status-btn i.fa-toggle-on {
    color: #4caf50;
}

.toggle-status-btn i.fa-toggle-off {
    color: #f44336;
}

/* Стили для таблицы статистики в мобильном виде */
@media screen and (max-width: 768px) {
    .stats-table {
        display: block;
        overflow-x: auto;
    }
    
    .stats-table th,
    .stats-table td {
        min-width: 120px;
    }
}

/* Стили для карточек аккаунтов */
.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.account-card {
    background-color: #242644;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    border-bottom: 1px solid #363663;
    padding-bottom: 10px;
}

.account-card-header h3 {
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.account-card-header h3 i {
    margin-right: 10px;
    color: #4a6cf7;
}

.account-metric {
    margin-bottom: 15px;
}

.account-metric-label {
    color: #a0a0a0;
    font-size: 12px;
    margin-bottom: 5px;
}

.account-metric-value {
    color: #ffffff;
    font-size: 16px;
}

.account-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.refresh-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.refresh-btn:hover {
    background-color: #3a5ce4;
}

.no-data {
    padding: 30px;
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    background-color: #30304d;
    border-radius: 6px;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: normal;
}

.status-banned {
    background-color: #c0392b;
    color: white;
}

.status-rate_limited {
    background-color: #e67e22;
    color: #242644;
}

.status-validation_required {
    background-color: #9b59b6;
    color: white;
}

.status-invalid {
    background-color: #d35400;
    color: white;
}

.last-update {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 20px;
    text-align: right;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .stats-card {
        min-width: 120px;
    }
    
    .stats-table {
        font-size: 14px;
    }
    
    .stats-table th, .stats-table td {
        padding: 8px 5px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-bottom: none;
        border-left: 3px solid #4a6cf7;
    }
}

/* Стили для кнопки обновления статистики */
.refresh-stats-btn {
    background-color: #4a6cf7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.refresh-stats-btn:hover {
    background-color: #3a5ce4;
    transform: translateY(-2px);
}

.refresh-stats-btn:disabled {
    background-color: #30304d;
    cursor: not-allowed;
    transform: none;
}

.refresh-stats-btn:disabled:hover {
    background-color: #30304d;
    transform: none;
}

.refresh-stats-btn i {
    margin-right: 5px;
} 