/* ==========================================================================
   ARCHIVO: wwwroot/css/NavBarApp.css
   Nota 1 (11/11/2026) - LGC: Estilos de la barra de navegacion 2.0 (_NavBarApp2.cshtml).
     - Misma altura que la barra anterior (3.5rem) para no mover el contenido (main tiene margin-top: 3.5rem).
     - Todo va bajo .qh-nav para no afectar los menus anteriores (_NavBar, _NavBar_Viewer, _NavBarApp).
   ========================================================================== */

.qh-nav {
    --qh-nav-bg: #0f1b2d;
    --qh-nav-text: #a9b6cc;
    --qh-nav-hover: rgba(255, 255, 255, .06);
    --qh-accent: #2f7cf6;
    --qh-green: #8fce00;
    --qh-dd-text: #273248;
    --qh-dd-muted: #8a94a6;
    min-height: 3.5rem;
    padding: 0 .75rem;
    background: var(--qh-nav-bg) !important;
    font-size: .875rem;
}

    /* Linea de acento inferior */
    .qh-nav::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--qh-accent), var(--qh-green));
    }

    /* ---------- Marca ---------- */
    .qh-nav .qh-brand {
        display: flex;
        align-items: center;
        gap: .5rem;
        color: #fff;
        font-weight: 600;
        margin-right: 1rem;
    }

    .qh-nav .qh-brand-version {
        font-size: .65rem;
        font-weight: 600;
        color: var(--qh-green);
        background: rgba(143, 206, 0, .15);
        border-radius: 10px;
        padding: 1px 7px;
    }

    /* ---------- Opciones de la barra ---------- */
    .qh-nav .qh-menu {
        gap: 2px;
    }

    .qh-nav .qh-top {
        position: relative;
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .5rem .7rem !important;
        border-radius: 8px;
        color: var(--qh-nav-text) !important;
        white-space: nowrap;
        transition: background-color .15s ease, color .15s ease;
    }

        .qh-nav .qh-top i {
            font-size: .8rem;
        }

        .qh-nav .qh-top:hover,
        .qh-nav .qh-top.show {
            background: var(--qh-nav-hover);
            color: #fff !important;
        }

        /* Opcion activa (site.js agrega "active" segun la pagina) */
        .qh-nav .qh-top.active {
            background: rgba(47, 124, 246, .18);
            color: #fff !important;
        }

            .qh-nav .qh-top.active::after {
                content: "";
                position: absolute;
                left: .7rem;
                right: .7rem;
                bottom: -.62rem;
                height: 3px;
                border-radius: 3px;
                background: var(--qh-accent);
            }

        .qh-nav .qh-top.dropdown-toggle::after {
            border: 0;
            content: "\f078";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: .55rem;
            margin-left: .15rem;
            opacity: .7;
            vertical-align: middle;
        }

    .qh-nav .qh-badge {
        background: #ef4444;
        color: #fff;
        font-size: .65rem;
        font-weight: 600;
        line-height: 1.4;
        border-radius: 9px;
        padding: 0 .4rem;
    }

    /* ---------- Menus desplegables (claros) ---------- */
    .qh-nav .qh-dd {
        min-width: 15rem;
        margin-top: .55rem !important;
        padding: .4rem;
        border: 0;
        border-top: 3px solid var(--qh-accent);
        border-radius: 0 0 12px 12px;
        box-shadow: 0 18px 40px rgba(15, 27, 45, .18);
        background: #fff;
    }

        .qh-nav .qh-dd .dropdown-submenu {
            margin-top: 0 !important;
            border-radius: 12px;
            border-top: 0;
            top: -.4rem;
        }

    .qh-nav .qh-dd-item {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .45rem .7rem;
        border-radius: 8px;
        color: var(--qh-dd-text);
        font-size: .82rem;
    }

        .qh-nav .qh-dd-item:hover,
        .qh-nav .qh-dd-item:focus {
            background: #eef4ff;
            color: #0f1b2d;
        }

    .qh-nav .qh-dd-icon {
        width: 1rem;
        text-align: center;
        color: var(--qh-accent);
    }

    .qh-nav .qh-dd-main {
        font-weight: 600;
    }

    .qh-nav .qh-dd-arrow {
        margin-left: auto;
        font-size: .6rem;
        color: var(--qh-dd-muted);
    }

    .qh-nav .qh-dd-group {
        font-size: .65rem;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--qh-dd-muted);
        padding: .5rem .7rem .2rem;
    }

    .qh-nav .qh-dd .dropdown-divider {
        margin: .3rem .2rem;
        border-color: #eef1f6;
    }

    /* Etiqueta de solo consulta */
    .qh-nav .qh-view {
        margin-left: auto;
        font-size: .6rem;
        color: var(--qh-dd-muted);
        border: 1px solid #d5dbe5;
        border-radius: 6px;
        padding: 0 .35rem;
        line-height: 1.5;
    }

    /* ---------- Menu en columnas (Catalogs) ---------- */
    .qh-nav .qh-has-mega {
        position: static;
    }

    .qh-nav .qh-mega {
        left: .75rem;
        right: .75rem;
        margin-top: 0 !important;
        max-height: calc(100vh - 5rem);
        overflow-y: auto;
        padding: 1rem 1.25rem;
        border: 0;
        border-top: 3px solid var(--qh-accent);
        border-radius: 0 0 14px 14px;
        box-shadow: 0 18px 40px rgba(15, 27, 45, .2);
        background: #fff;
    }

    .qh-nav .qh-mega-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: .5rem 1.25rem;
    }

    .qh-nav .qh-mega-col h6 {
        font-size: .68rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #0f1b2d;
        border-bottom: 1px solid #eef1f6;
        padding-bottom: .35rem;
        margin: .25rem 0 .35rem;
    }

    .qh-nav .qh-mega-group {
        font-size: .62rem;
        font-weight: 600;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--qh-dd-muted);
        margin: .5rem 0 .15rem .45rem;
    }

    .qh-nav .qh-mega-link {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .35rem .45rem;
        border-radius: 7px;
        color: var(--qh-dd-text);
        font-size: .8rem;
        text-decoration: none;
    }

        .qh-nav .qh-mega-link:hover {
            background: #eef4ff;
            color: #0f1b2d;
        }

    .qh-nav .qh-mega-main {
        display: inline-flex;
        align-items: center;
        gap: .5rem;
        margin-bottom: .5rem;
        font-weight: 600;
        color: var(--qh-accent);
        text-decoration: none;
    }

    /* ---------- Lado derecho ---------- */
    .qh-nav .qh-right {
        gap: .4rem;
        flex-direction: row;
    }

    .qh-nav .qh-search {
        position: relative;
        display: flex;
        align-items: center;
        gap: .5rem;
        width: 13rem;
        height: 2.1rem;
        padding: 0 .6rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, .07);
        border: 1px solid rgba(255, 255, 255, .1);
        color: #7f93b3;
    }

        .qh-nav .qh-search input {
            flex: 1;
            min-width: 0;
            border: 0;
            outline: 0;
            background: transparent;
            color: #fff;
            font-size: .8rem;
        }

            .qh-nav .qh-search input::placeholder {
                color: #7f93b3;
            }

        .qh-nav .qh-search:focus-within {
            border-color: var(--qh-accent);
            background: rgba(255, 255, 255, .1);
        }

        .qh-nav .qh-search kbd {
            font-family: inherit;
            font-size: .6rem;
            color: #7f93b3;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, .2);
            border-radius: 4px;
            padding: 0 .3rem;
        }

    .qh-nav .qh-search-results {
        display: none;
        position: absolute;
        top: calc(100% + .45rem);
        right: 0;
        width: 22rem;
        max-height: 60vh;
        overflow-y: auto;
        padding: .4rem;
        border-radius: 12px;
        border-top: 3px solid var(--qh-accent);
        background: #fff;
        box-shadow: 0 18px 40px rgba(15, 27, 45, .22);
        z-index: 1050;
    }

        .qh-nav .qh-search-results.show {
            display: block;
        }

        .qh-nav .qh-search-results a {
            display: block;
            padding: .45rem .6rem;
            border-radius: 8px;
            color: var(--qh-dd-text);
            font-size: .82rem;
            text-decoration: none;
        }

            .qh-nav .qh-search-results a small {
                display: block;
                color: var(--qh-dd-muted);
                font-size: .68rem;
            }

            .qh-nav .qh-search-results a:hover,
            .qh-nav .qh-search-results a.qh-selected {
                background: #eef4ff;
            }

        .qh-nav .qh-search-results .qh-empty {
            padding: .6rem;
            color: var(--qh-dd-muted);
            font-size: .8rem;
        }

    .qh-nav .qh-icon-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        padding: 0 !important;
        border-radius: 8px;
        color: var(--qh-nav-text) !important;
    }

        .qh-nav .qh-icon-btn:hover {
            background: var(--qh-nav-hover);
            color: #fff !important;
        }

        .qh-nav .qh-icon-btn.dropdown-toggle::after {
            display: none;
        }

    .qh-nav #notifyBadge {
        position: absolute;
        top: 2px;
        right: 0;
        font-size: .6rem;
    }

    .qh-nav .qh-user {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .2rem .6rem .2rem .2rem !important;
        border-radius: 24px;
        background: rgba(255, 255, 255, .06);
    }

        .qh-nav .qh-user:hover {
            background: rgba(255, 255, 255, .1);
        }

    .qh-nav .qh-avatar {
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        object-fit: cover;
    }

    .qh-nav .qh-avatar-initials {
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #60a5fa, var(--qh-accent));
        color: #fff;
        font-size: .75rem;
        font-weight: 600;
    }

    .qh-nav .qh-user-text {
        line-height: 1.1;
    }

        .qh-nav .qh-user-text b {
            display: block;
            color: #fff;
            font-size: .78rem;
            font-weight: 500;
        }

        .qh-nav .qh-user-text small {
            color: var(--qh-green);
            font-size: .65rem;
        }

/* Pantallas medianas: sin texto del usuario y buscador mas angosto */
@media (max-width: 1399.98px) {
    .qh-nav .qh-user-text {
        display: none;
    }

    .qh-nav .qh-search {
        width: 10rem;
    }
}

/* Barra colapsada (menu hamburguesa) */
@media (max-width: 991.98px) {
    .qh-nav .navbar-collapse {
        max-height: calc(100vh - 3.5rem);
        overflow-y: auto;
        padding-bottom: .75rem;
    }

    .qh-nav .qh-top.active::after {
        display: none;
    }

    .qh-nav .qh-mega {
        position: static;
    }

    .qh-nav .qh-right {
        flex-wrap: wrap;
        margin-top: .5rem;
    }

    .qh-nav .qh-search {
        width: 100%;
    }
}
