/* public/css/filament-sidebar-custom.css */
/* SOLUCIÓN QUE FUNCIONA SIEMPRE - SIN DEPENDER DE CLASES ESPECÍFICAS */

/* Fondo del sidebar en modo claro */
html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-sidebar-header {
    background-color: #1e293b !important;
}

/* Todos los textos del sidebar */
html:not(.dark) .fi-sidebar,
html:not(.dark) .fi-sidebar * {
    color: #e2e8f0 !important;
}

/* Reset de fondos */
html:not(.dark) .fi-sidebar a,
html:not(.dark) .fi-sidebar button {
    background-color: transparent !important;
}

/* Hover - funciona con cualquier elemento */
html:not(.dark) .fi-sidebar a:hover,
html:not(.dark) .fi-sidebar button:hover {
    background-color: #334155 !important;
}

html:not(.dark) .fi-sidebar a:hover *,
html:not(.dark) .fi-sidebar button:hover * {
    color: #ffffff !important;
}

/* Iconos */
html:not(.dark) .fi-sidebar svg {
    color: #94a3b8 !important;
}

html:not(.dark) .fi-sidebar a:hover svg {
    color: #ffffff !important;
}

/* === SOLUCIÓN PARA EL ACTIVO: USA EL ATRIBUTO HREF ACTUAL === */
/* El link que coincide con la URL actual */
html:not(.dark) .fi-sidebar a[href="{{ request()->url() }}"],
html:not(.dark) .fi-sidebar a[href*="{{ request()->path() }}"] {
    background-color: #f59e0b !important;
}

html:not(.dark) .fi-sidebar a[href="{{ request()->url() }}"] *,
html:not(.dark) .fi-sidebar a[href*="{{ request()->path() }}"] * {
    color: #ffffff !important;
}