/* ------------- Estilos navbar -------------  */

.app-nav {
    width: 250px;
    min-width: 250px;
    height: 100%;
    border-right: 1px solid rgba(15, 142, 162, 0.22);
    overflow-y: auto;
    overflow-x: hidden;
    transition:
    width 0.6s ease-in-out,
    min-width 0.6s ease-in-out;
    will-change: width, min-width;
    background:white
}

.nav-toggle-wrapper {
    padding: 12px 2px 0 12px;
}

.nav-toggle {
    height: 36px;
    width: 36px;
    border-radius: var(--radius-md);
    border: none;
    background:white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2a3a4e;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.nav-toggle:hover {
    background: linear-gradient(145deg, #f8fcff 0%, #e8f2f8 100%);
    color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(16, 24, 40, 0.14);
}

.nav-collapsed .app-nav {
    width: 60px;
    min-width: 60px;
}

.nav-collapsed .nav-label {
    opacity: 0;
    transform: translateX(-8px);
    max-width: 0;
}

.app-nav > div.logo > img {
    height: 70px;
    width: 75%;
    object-fit: contain;
    margin: 12px;
}

.app-nav > div.nav-item {
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding: 0px 18px 0px 18px;
    margin-bottom: 8px;
    color: #334257;
    font-weight: 600;
    border-radius: 0 999px 999px 0;
    border-left: 3px solid transparent;
    transition:
        padding 0.6s ease-in-out,
        background-color 0.2s ease,
        border-left-color 0.2s ease,
        color 0.2s ease;
}

.app-nav > div.nav-item:hover {
    background: linear-gradient(90deg, #e8f4f8 0%, #f3f8fc 90%);
    border-left-color: rgba(15, 142, 162, 0.55);
    color: #1f344f;
}

.app-nav a {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-label {
    margin-left: 12px;
    max-width: 170px;
    overflow: hidden;
    white-space: nowrap;
    transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    max-width 0.3s ease;
}

.app-nav > div.nav-item:hover,
.app-nav > div.nav-item a.active,
.app-nav > div.nav-item.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-footer-logo {
    margin-top: auto;
    padding: 20px 18px 18px;
    width: 100%;
    transition:
        padding 0.6s ease-in-out,
        opacity 0.2s ease;
}

.nav-footer-logo img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    transform-origin: center;
    transition:
        width 0.6s ease-in-out,
        max-width 0.6s ease-in-out,
        transform 0.6s ease-in-out;
}

.nav-collapsed .nav-footer-logo {
    padding: 14px 8px 16px;
}

.nav-collapsed .nav-footer-logo img {
    width: 28px;
    max-width: 28px;
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background:rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 110000;
}

body.nav-mobile-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.nav-mobile-open .app-nav {
    transform: translateX(0);
}

@media screen and (max-width: 600px) {
    .app-nav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px;
        min-width: 260px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform 0.6s ease-in-out;
        z-index: 110010;
    }

    .logo {
        display: flex;
    }

    .nav-toggle-wrapper {
        display: none;
    }

    .app-nav > div.nav-item {
        justify-content: flex-start;
        padding: 0 18px;
    }

    .app-nav > div.nav-item a {
        justify-content: flex-start;
    }

    .app-nav > div.nav-item a > div {
        display: flex !important;
    }

    .nav-footer-logo {
        padding: 20px 18px 18px;
    }

    .nav-footer-logo img {
        width: 100%;
        max-width: 150px;
    }
}
