/* Улучшения для админ-панели */
/* Обеспечиваем видимость текста при любой теме */

.admin-dashboard-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-dashboard-container h1,
.admin-dashboard-container h2,
.admin-dashboard-container .section-header,
.admin-title,
.admin-subtitle,
.last-update {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.admin-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-subtitle {
    font-size: 14px;
    color: #666 !important;
}

.last-update {
    font-size: 12px;
    color: #999 !important;
    margin-top: 8px;
}

/* Секции админ-панели */
.dashboard-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.btn-icon {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-icon:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

/* Статус сервера */
.server-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    color: #333;
    transition: all 0.3s ease;
}

.status-card:hover {
    border-color: #D4AF37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.status-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.status-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Feature Toggles */
.feature-toggles-list {
    display: grid;
    gap: 12px;
}

.feature-toggle-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.feature-toggle-item:hover {
    border-color: #D4AF37;
}

.feature-toggle-item label {
    color: #333 !important;
    font-weight: 500;
    flex: 1;
}

.feature-toggle-item .toggle-switch {
    width: 48px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.feature-toggle-item .toggle-switch.active {
    background: #4caf50;
}

.feature-toggle-item .toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.feature-toggle-item .toggle-switch.active::after {
    transform: translateX(24px);
}

/* Селектор темы */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-option {
    cursor: pointer;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-card {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    color: #333 !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-option input[type="radio"]:checked + .theme-card {
    border-color: #D4AF37;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.theme-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin: 0 auto 12px;
}

.light-preview {
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border: 1px solid #ddd;
}

.dark-preview {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.pink-preview {
    background: linear-gradient(135deg, #ff6b9d, #fec9d4);
}

/* Логи действий */
.action-logs-list {
    max-height: 400px;
    overflow-y: auto;
}

.log-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

.log-item:last-child {
    border-bottom: none;
}

.log-item .log-time {
    color: #999;
    font-size: 11px;
}

.log-item .log-message {
    color: #333;
    margin-top: 4px;
}

/* Градиентный фон для админ-панели */
body[data-current-page="admin"] {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.15) 0%, 
        rgba(118, 75, 162, 0.15) 50%,
        rgba(102, 126, 234, 0.15) 100%
    );
}

/* Навигационные кнопки админ-панели */
.admin-navigation {
    margin-bottom: 24px;
}

.admin-nav-btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    color: white;
}

.admin-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.admin-nav-btn:active {
    transform: translateY(0);
}

/* Загрузка */
.loading-indicator {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
    background: #D4AF37;
    color: #000 !important;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Feature toggles text elements - increased specificity */
.admin-dashboard-container .toggle-name,
.dashboard-section .toggle-name,
div.toggle-name {
    color: #000 !important;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.admin-dashboard-container .toggle-description,
.dashboard-section .toggle-description,
div.toggle-description {
    color: #333 !important;
    font-size: 12px;
    margin-bottom: 4px;
}

.admin-dashboard-container .toggle-category,
.dashboard-section .toggle-category,
div.toggle-category {
    color: #666 !important;
    font-size: 11px;
    font-style: italic;
}

/* Action logs text elements - increased specificity */
.admin-dashboard-container .log-description,
.dashboard-section .log-description,
div.log-description {
    color: #000 !important;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
}

.admin-dashboard-container .log-time,
.dashboard-section .log-time,
.admin-dashboard-container .log-user,
.dashboard-section .log-user,
.admin-dashboard-container .log-type,
.dashboard-section .log-type,
span.log-time,
span.log-user,
span.log-type {
    color: #333 !important;
    font-size: 12px;
}

.admin-dashboard-container .empty-message,
.dashboard-section .empty-message,
p.empty-message {
    color: #333 !important;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Адаптивность */
@media (max-width: 768px) {
    .server-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .theme-selector {
        grid-template-columns: 1fr;
    }
    
    .admin-navigation {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .server-status-grid {
        grid-template-columns: 1fr;
    }
}

/* Темы приложения */
body.theme-light {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(240,240,240,0.95));
}

body.theme-dark {
    background: linear-gradient(135deg, rgba(44,62,80,0.95), rgba(52,73,94,0.95));
}

body.theme-dark .admin-dashboard-container h1,
body.theme-dark .admin-dashboard-container h2,
body.theme-dark .section-header,
body.theme-dark .admin-title,
body.theme-dark .admin-subtitle,
body.theme-dark .last-update {
    color: #ecf0f1 !important;
}

body.theme-dark .dashboard-section,
body.theme-dark .admin-header {
    background: rgba(52, 73, 94, 0.95);
}

body.theme-dark .status-card,
body.theme-dark .feature-toggle-item,
body.theme-dark .theme-card {
    background: rgba(44, 62, 80, 0.95);
    border-color: rgba(255,255,255,0.1);
    color: #ecf0f1;
}

body.theme-pink {
    background: linear-gradient(135deg, rgba(255,182,193,0.3), rgba(255,192,203,0.3));
}

body.theme-pink .admin-header,
body.theme-pink .dashboard-section {
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(255,182,193,0.3);
}

/* Toast уведомления */
.toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
