/* 1. MATAMOS EL ESPACIO ENTRE CARPETAS (DE RAÍZ) */
ul.fi-sidebar-nav-groups {
    gap: 0.2rem !important; /* Quitamos el hueco gigante */
}

/* 2. LE QUITAMOS EL MARGEN OCULTO A CADA CARPETA */
li.fi-sidebar-group {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 3. DEVOLVEMOS LA LETRA A SU TAMAÑO NORMAL, PERO PEGADITA */
.fi-sidebar-group-label {
    font-size: 0.875rem !important; /* Devolvemos tu tamaño normal */
    padding-top: 0.5rem !important; /* Solo un pelín de aire arriba */
    padding-bottom: 0 !important;   /* Pegado a sus links por abajo */
    margin-bottom: 0 !important;
}

/* =========================================
   MARCADO DE MENÚ SELECCIONADO (ESTILO PRO)
   ========================================= */

/* 1. EL ITEM SELECCIONADO (El hijo, ej: "Catálogo") */
.fi-sidebar-item-active > button,
.fi-sidebar-item-active > a {
    background-color: #eaf5f8 !important; /* Un fondo azul muy suave y elegante */
    color: #1282A2 !important; /* Tu color Primary brillante */
    font-weight: 700 !important;
    position: relative;
    border-radius: 6px !important;
}

/* Pintar el icono del item activo */
.fi-sidebar-item-active > a .fi-icon,
.fi-sidebar-item-active > button .fi-icon {
    color: #1282A2 !important;
}

/* La barrita indicadora a la derecha (Toque TailAdmin) */
.fi-sidebar-item-active > a::after,
.fi-sidebar-item-active > button::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background-color: #1282A2;
    border-radius: 4px 0 0 4px;
}

/* 2. EL GRUPO SELECCIONADO (El padre, ej: "Inventarios y Compras") */
/* Usamos el truco CSS :has() para detectar si un hijo está activo */
.fi-sidebar-group:has(.fi-sidebar-item-active) .fi-sidebar-group-label {
    color: #034078 !important; /* Tu azul marino oscuro (Info) */
    font-weight: 800 !important; /* Más negrita para resaltar */
}
