/* Reset básico */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* SIDEBAR */
#sidebar {
    width: 60px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #343a40;
    color: white;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    white-space: nowrap;
    padding-top: 20px;
}

    /* Expande el sidebar al hacer hover */
    #sidebar:hover {
        width: 220px;
    }

    /* Ocultar texto del menú cuando está colapsado */
    #sidebar a {
        display: flex;
        align-items: center;
        padding: 12px;
        color: white;
        text-decoration: none;
        transition: background 0.3s;
    }

        #sidebar a i {
            font-size: 20px;
            width: 30px;
            text-align: center;
        }

        #sidebar a .menu-text {
            display: none;
            margin-left: 10px;
        }

    /* Mostrar el texto cuando el sidebar está expandido */
    #sidebar:hover a .menu-text {
        display: inline;
    }

    /* Ajustar el contenido cuando el sidebar está expandido */
    #sidebar:hover ~ #content {
        margin-left: 220px;
        width: calc(100% - 220px);
    }

/* CONTENIDO PRINCIPAL */
#content {
    transition: margin-left 0.3s ease-in-out;
    margin-left: 60px; /* Espacio cuando el menú está colapsado */
    width: calc(100% - 60px);
    min-height: 100vh; /* Ocupa toda la pantalla */
    padding: 20px;
    background: #f8f9fa; /* Color de fondo opcional */
}

/* Título del sidebar */
.sidebar-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Tamaño del texto reducido */
    padding: 8px 0;
    white-space: nowrap;
}

    .sidebar-title i {
        font-size: 1.5rem; /* Tamaño del icono */
        margin-right: 8px;
    }

/* Oculta el texto del título cuando el sidebar está colapsado */
#sidebar .sidebar-title .menu-text {
    display: none;
}

#sidebar:hover .sidebar-title .menu-text {
    display: inline;
}

/* Centra el icono del título cuando está colapsado */
#sidebar .sidebar-title {
    justify-content: center;
}

#sidebar:hover .sidebar-title {
    justify-content: start;
}

.modal {
    z-index: 1050 !important; /* Bootstrap usa 1050 para los modales */
}

.modal-backdrop {
    z-index: 1040 !important; /* Asegura que el fondo del modal esté detrás */
}

.dataTables_wrapper {
    z-index: 1 !important; /* Hace que DataTable quede por debajo del modal */
}
