/**
 * SOCIO - Forzar Modo Oscuro
 * CSS adicional para asegurar que el modo oscuro se aplique correctamente
 */

/* === FORZAR MODO OSCURO UNIVERSAL === */
[data-theme="dark"] {
    color-scheme: dark !important;
}

[data-theme="dark"] *,
[data-theme="dark"] *::before,
[data-theme="dark"] *::after {
    box-sizing: border-box !important;
}

/* Fondo universal */
[data-theme="dark"] html,
[data-theme="dark"] body {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

/* Todos los contenedores principales */
[data-theme="dark"] div,
[data-theme="dark"] main,
[data-theme="dark"] section,
[data-theme="dark"] article,
[data-theme="dark"] aside,
[data-theme="dark"] nav {
    background-color: inherit !important;
    color: inherit !important;
}

/* Texto específico */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] label,
[data-theme="dark"] legend,
[data-theme="dark"] caption {
    color: #ffffff !important;
}

/* Headers */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #ffffff !important;
}

/* Formularios forzados */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border: 1px solid #4a5568 !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #9ca3af !important;
}

/* Botones */
[data-theme="dark"] button {
    background-color: #4a90e2 !important;
    color: #ffffff !important;
    border: 1px solid #4a90e2 !important;
}

[data-theme="dark"] button:hover {
    background-color: #357abd !important;
}

/* Enlaces */
[data-theme="dark"] a {
    color: #4a90e2 !important;
}

[data-theme="dark"] a:hover {
    color: #357abd !important;
}

/* Tablas */
[data-theme="dark"] table {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

[data-theme="dark"] th,
[data-theme="dark"] td {
    border-color: #4a5568 !important;
    color: #ffffff !important;
}

/* Listas */
[data-theme="dark"] ul,
[data-theme="dark"] ol,
[data-theme="dark"] li {
    color: #ffffff !important;
}

/* Elementos específicos de Bootstrap */
[data-theme="dark"] .card {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] .modal-content {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #4a5568 !important;
    color: #ffffff !important;
}

/* Alertas */
[data-theme="dark"] .alert {
    background-color: #2d3748 !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] .alert-success {
    background-color: #065f46 !important;
    color: #d1fae5 !important;
    border-color: #10b981 !important;
}

[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
    border-color: #dc2626 !important;
}

[data-theme="dark"] .alert-warning {
    background-color: #78350f !important;
    color: #fcd34d !important;
    border-color: #f59e0b !important;
}

/* Elementos específicos de la aplicación */
[data-theme="dark"] .navbar {
    background-color: #2d3748 !important;
}

[data-theme="dark"] .footer {
    background-color: #1a1a1a !important;
    color: #e2e8f0 !important;
}

/* Formularios específicos */
[data-theme="dark"] .form-group {
    color: #ffffff !important;
}

[data-theme="dark"] .form-control {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] .form-select {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #4a5568 !important;
}

[data-theme="dark"] .form-check-label {
    color: #ffffff !important;
}

/* Elementos específicos de páginas */
[data-theme="dark"] .login-box,
[data-theme="dark"] .register-form,
[data-theme="dark"] .formulario {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border: 1px solid #4a5568 !important;
}

[data-theme="dark"] .titulo-form {
    color: #ffffff !important;
}

/* Sobrescribir cualquier color específico */
[data-theme="dark"] .text-dark {
    color: #ffffff !important;
}

[data-theme="dark"] .text-muted {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .bg-white {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .bg-light {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .bg-secondary {
    background-color: #4a5568 !important;
}