/* Tema Oscuro - Sistema Educativo */
body.dark-theme {
    background: #1a1a1a;
    color: #9f5f5f;
}

/* Forzar texto oscuro en elementos con fondo claro */
.alert-success strong,
.alert-info strong,
.alert-warning strong,
.stat-card .number,
.stat-card .label {
    color: inherit !important;
}

body.dark-theme .navbar {
    background: #2d2d2d !important;
}

body.dark-theme .profile-container .header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

body.dark-theme .sidebar,
body.dark-theme .main-content,
body.dark-theme .card,
body.dark-theme .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-theme .form-control,
body.dark-theme .form-select,
body.dark-theme input,
body.dark-theme textarea,
body.dark-theme select {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-theme .form-control:focus {
    background: #252525;
    border-color: #667eea;
    color: #e0e0e0;
}

body.dark-theme .tab {
    color: #a0a0a0;
}

body.dark-theme .tab.active {
    color: #8b9cff;
    border-bottom-color: #8b9cff;
}

body.dark-theme .tabs {
    border-bottom-color: #404040;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3,
body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 {
    color: #c0b868;
}

body.dark-theme .form-group label {
    color: #7b6b6b;
}

body.dark-theme .btn-save,
body.dark-theme .upload-btn {
    background: #667eea;
}

body.dark-theme .btn-save:hover,
body.dark-theme .upload-btn:hover {
    background: #5568d3;
}

body.dark-theme .dropdown-menu {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-theme .dropdown-item {
    color: #e0e0e0;
}

body.dark-theme .dropdown-item:hover {
    background: #404040;
}

body.dark-theme .table {
    color: #e0e0e0;
    background: #2d2d2d;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background: #252525;
}

body.dark-theme .photo-preview {
    border-color: #8b9cff;
}

/* Alertas y Banners */
body.dark-theme .alert {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-theme .alert-success {
    background: #1e4620;
    border-color: #2e7d32;
    color: #a5d6a7;
}

body.dark-theme .alert-warning {
    background: #4a3800;
    border-color: #ff9800;
    color: #ffcc80;
}

body.dark-theme .alert-danger {
    background: #4a1616;
    border-color: #f44336;
    color: #ef9a9a;
}

body.dark-theme .alert-info {
    background: #1a3a52;
    border-color: #2196f3;
    color: #90caf9;
}

/* Toast Notifications */
body.dark-theme .toast,
body.dark-theme .Toastify__toast {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
    border: 1px solid #404040;
}

body.dark-theme .toast-success,
body.dark-theme .Toastify__toast--success {
    background: #1e4620 !important;
    color: #a5d6a7 !important;
}

body.dark-theme .toast-error,
body.dark-theme .Toastify__toast--error {
    background: #4a1616 !important;
    color: #ef9a9a !important;
}

body.dark-theme .toast-warning,
body.dark-theme .Toastify__toast--warning {
    background: #4a3800 !important;
    color: #ffcc80 !important;
}

body.dark-theme .toast-info,
body.dark-theme .Toastify__toast--info {
    background: #1a3a52 !important;
    color: #90caf9 !important;
}

/* Badges */
body.dark-theme .badge {
    color: #fff;
}

body.dark-theme .badge-primary {
    background: #667eea;
}

body.dark-theme .badge-success {
    background: #2e7d32;
}

body.dark-theme .badge-warning {
    background: #ff9800;
    color: #000;
}

body.dark-theme .badge-danger {
    background: #f44336;
}

/* Cards y Widgets */
body.dark-theme .stat-card,
body.dark-theme .widget,
body.dark-theme .action-card {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-theme .dashboard-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
}

/* Botones */
body.dark-theme .btn-primary {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

body.dark-theme .btn-outline-primary {
    border-color: #667eea;
    color: #8b9cff;
}

body.dark-theme .btn-outline-primary:hover {
    background: #667eea;
    color: #fff;
}

body.dark-theme .btn-secondary {
    background: #404040;
    border-color: #404040;
    color: #e0e0e0;
}

/* Gráficos Chart.js */
body.dark-theme canvas {
    filter: brightness(0.9);
}

/* Badge Publicada */
body.dark-theme .badge-publicada {
    background: #48b362;
    color: #155724;
}

/* Tamaños de Fuente */
body.font-pequeno {
    font-size: 12px;
}

body.font-normal {
    font-size: 14px;
}

body.font-grande {
    font-size: 16px;
}

/* Alto Contraste */
body.high-contrast {
    filter: contrast(1.5);
}

body.high-contrast * {
    border-color: #000 !important;
}

body.high-contrast a {
    text-decoration: underline !important;
}
