.wrapper {
    position: absolute;
    overflow: hidden;
    width: 15rem;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

/* Elementos hijo directamente (que serían: nav y content) */
.wrapper > * {
    overflow: auto;
    flex: 1 1 auto;
}

.vertical-nav {
    min-width: 15rem;
    width: 15rem;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 3px 3px 10px var(--color-shadow);
    transition: all 0.4s;
}

.vertical-nav > .nav {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    flex-flow: column;
}

.sidebar-submenu {
    display: none !important;
}

.sidebar-submenu.is-open {
    display: block !important;
}

#sidebar .nav-link {
    cursor: pointer;
}

#sidebar .nav-link.sidebar-active {
    background-color: var(--color-sidebar-active) !important;
    color: var(--color-sidebar-active-text) !important;
    font-weight: 600;
}

#sidebar .nav-link.sidebar-active i {
    color: var(--color-sidebar-active-text) !important;
}

#sidebar .nav-link.sidebar-group-active {
    background-color: var(--color-sidebar-hover-bg) !important;
    color: var(--color-sidebar-active-text) !important;
}

.page-content {
    width: calc(100% - 15rem);
    margin-left: 15rem;
    transition: all 0.4s;
}

#sticky-footer {
    width: calc(100% - 15rem);
    margin-left: 15rem;
    transition: all 0.4s;
}

#sticky-footer.active {
    width: 100%;
    margin-left: 0;
}

/* Sin sidebar (login y landing sin sesión): contenido y footer a todo el ancho */
.no-sidebar .page-content,
.no-sidebar #sticky-footer {
    width: 100%;
    margin-left: 0;
}

#sidebar.active {
    margin-left: -15rem;
}

#content.active {
    width: 100%;
    margin: 0;
}

@media (max-width: 1200px) {

    .wrapper {
        position: absolute;
        overflow: hidden;
        width: 13rem;
        height: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
    }

    /* Elementos hijo directamente (que serían: nav y content) */
    .wrapper > * {
        overflow: auto;
        flex: 1 1 auto;
    }

    .vertical-nav {
        min-width: 13rem;
        width: 13rem;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        box-shadow: 3px 3px 10px var(--color-shadow);
        transition: all 0.4s;
    }

    .page-content {
        width: calc(100% - 13rem);
        margin-left: 13rem;
        transition: all 0.4s;
    }

    #sticky-footer {
        width: 100%;
        margin-left: 0;
        transition: all 0.4s;
    }

    #sticky-footer.active {
        width: calc(100% - 13rem);
        margin-left: 13rem;
    }

    #sidebar.active {
        margin-left: -13rem;
    }

    #content.active {
        width: 100%;
        margin: 0;
    }

    #sidebar {
        margin-left: -13rem;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
        margin: 0;
    }
    #content.active {
        margin-left: 13rem;
        width: calc(100% - 13rem);
    }
}


/* ── Modo móvil: sidebar overlay, no empuja contenido ── */
@media (max-width: 999px) {

    .vertical-nav {
        min-width: 13rem;
        width: 13rem;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1039;
        box-shadow: 3px 3px 10px var(--color-shadow);
        transition: all 0.4s;
    }

    .page-content {
        width: 100%;
        margin-left: 0;
        transition: none;
    }

    #topBar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--app-header-height);
        z-index: 1038;
    }

    #sticky-footer {
        width: 100%;
        margin-left: 0;
        transition: none;
        position: fixed;
        bottom: 0;
        left: 0;
        height: var(--app-footer-height);
        z-index: 1038;
    }

    /* Espacio para que el contenido no quede detrás de la barra fija superior e inferior */
    .page-content {
        padding-top: var(--app-header-height);
        padding-bottom: var(--app-footer-height);
    }

    /* Oculto por defecto */
    #sidebar {
        margin-left: -13rem;
    }

    /* Visible al activar */
    #sidebar.active {
        margin-left: 0;
    }

    /* Content NUNCA se mueve */
    #content {
        width: 100% !important;
        margin: 0 !important;
    }
    #content.active {
        width: 100% !important;
        margin: 0 !important;
    }

    #sticky-footer.active {
        width: 100%;
        margin-left: 0;
    }

    /* Backdrop */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--color-shadow-strong);
        z-index: 1038;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}
/*
*
* ==========================================
* FOR DEMO PURPOSE
* ==========================================
*
*/
.separator {
    margin: 3rem 0;
    border-bottom: 1px dashed var(--color-sidebar-border);
}

.text-uppercase {
    letter-spacing: 0.1em;
}

.text-gray {
    color: var(--color-sidebar-muted);
}
