/* /Components/Layout/MainLayout.razor.rz.scp.css */
/* estilos del layout en Custom.css */
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* ═══════════════════════════════════════════════════════════════════
   NavMenu.razor.css  —  Solfa
   ═══════════════════════════════════════════════════════════════════ */

/* ── Toggler mobile ──────────────────────────────────────────────── */
.navbar-toggler[b-7bg4cnwqnl] {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

    .navbar-toggler:checked[b-7bg4cnwqnl] {
        background-color: rgba(255, 255, 255, 0.5);
    }

/* ── Top row ─────────────────────────────────────────────────────── */
.top-row[b-7bg4cnwqnl] {
    height: 3.5rem;
    background-color: rgba(0, 0, 0, 0.4);
}

.navbar-brand[b-7bg4cnwqnl] {
    font-size: 1.1rem;
}

/* ── ICONOS: regla base .bi ──────────────────────────────────────── */
.bi[b-7bg4cnwqnl] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

/* Clase unificada para iconos dentro de nav-link */
.nav-icon[b-7bg4cnwqnl] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: static !important;
    top: unset !important;
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem;
    margin-right: 0.5rem !important;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Material Symbols dentro de nav-link */
.nav-icon-ms[b-7bg4cnwqnl] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1rem !important;
    width: 1rem !important;
    min-width: 1rem;
    margin-right: 0.5rem !important;
    vertical-align: middle;
    flex-shrink: 0;
    line-height: 1;
}

/* Icono settings de la empresa */
.nav-icon-empresa[b-7bg4cnwqnl] {
    font-size: 1.2rem;
    color: #d7d7d7 !important;
    vertical-align: middle;
}

/* Iconos dentro del input de búsqueda */
.nav-icon-search[b-7bg4cnwqnl] {
    position: static !important;
    top: unset !important;
    width: auto !important;
    height: auto !important;
    margin-right: 0 !important;
    font-size: 0.85rem;
}

/* ── Iconos SVG background (originales del template) ─────────────── */
.bi-house-door-fill-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.bi-lock-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM5 8h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z'/%3E%3C/svg%3E");
}

.bi-person-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person' viewBox='0 0 16 16'%3E%3Cpath d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10Z'/%3E%3C/svg%3E");
}

.bi-person-badge-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person-badge' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0z'/%3E%3Cpath d='M4.5 0A2.5 2.5 0 0 0 2 2.5V14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2.5A2.5 2.5 0 0 0 11.5 0h-7zM3 2.5A1.5 1.5 0 0 1 4.5 1h7A1.5 1.5 0 0 1 13 2.5v10.795a4.2 4.2 0 0 0-.776-.492C11.392 12.387 10.063 12 8 12s-3.392.387-4.224.803a4.2 4.2 0 0 0-.776.492V2.5z'/%3E%3C/svg%3E");
}

.bi-person-fill-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person-fill' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E");
}

.bi-arrow-bar-left-nav-menu[b-7bg4cnwqnl] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-arrow-bar-left' viewBox='0 0 16 16'%3E%3Cpath d='M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5ZM10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5Z'/%3E%3C/svg%3E");
}

/* ── Nav items ───────────────────────────────────────────────────── */
.nav-item[b-7bg4cnwqnl] {
    font-size: 0.78rem; /* un poco más fino */
    padding-bottom: 0.2rem; /* menos espaciado vertical */
}

    .nav-item:first-of-type[b-7bg4cnwqnl] {
        padding-top: 0.5rem; /* reducido */
    }

    .nav-item:last-of-type[b-7bg4cnwqnl] {
        padding-bottom: 0.5rem;
    }

    /* Reducir px-3 (1rem) a px-2 visualmente sin tocar clases Bootstrap.
       padding-left chico y ÚNICO para todo el menú: los submenús se alinean a
       este mismo margen (sin escalonar) — ver bloque <style> del .razor. */
    .nav-item.px-3[b-7bg4cnwqnl] {
        padding-left: 0.35rem !important;
        padding-right: 0.6rem !important;
    }

    .nav-item[b-7bg4cnwqnl]  .nav-link {
        color: #d7d7d7;
        background: none;
        border: none;
        border-radius: 0 4px 4px 0; /* borde izq recto: el fondo llega al borde del sidebar */
        height: 2.6rem; /* un poco más bajo que 3rem */
        display: flex;
        align-items: center;
        line-height: 1;
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        /* El fondo (hover/activo) se estira hasta el borde izq del sidebar (x=0):
           margin-left negativo tapa el padding-left del contenedor (0.35rem);
           el padding-left del link mantiene el texto en su lugar (0.35 + 0.4 = 0.75). */
        margin-left: -0.35rem;
        padding-left: 0.75rem;
        padding-right: 0.4rem;
    }

    /* Ítem seleccionado: color de ACENTO del usuario (por defecto magenta de marca) */
    .nav-item[b-7bg4cnwqnl]  a.active {
        background-color: var(--app-accent, #dc2c88);
        color: #fff;
        font-weight: 600;
    }

    .nav-item[b-7bg4cnwqnl]  a.active:hover {
        background-color: var(--app-accent, #dc2c88);
        color: #fff;
        filter: brightness(0.9);
    }

    .nav-item[b-7bg4cnwqnl]  .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.12);
        color: white;
    }

/* Sub-menu: padding uniforme */
.sub-menu[b-7bg4cnwqnl] {
    padding-left: 0.4rem;
    padding-bottom: 0;
}

    .sub-menu .nav-link[b-7bg4cnwqnl] {
        height: 2.3rem !important;
        font-size: 0.75rem;
    }

/* ── Chevron animado ─────────────────────────────────────────────── */
.nav-chevron[b-7bg4cnwqnl] {
    margin-left: auto;
    flex-shrink: 0;
    position: static !important;
    top: unset !important;
    width: 0.7rem !important;
    height: 0.7rem !important;
    margin-right: 0 !important;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

    .nav-chevron.nav-chevron-open[b-7bg4cnwqnl] {
        transform: rotate(180deg);
    }

/* ── Accordion: animación suave ──────────────────────────────────── */
.nav-submenu-wrapper[b-7bg4cnwqnl] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    /* Submenú desplegado: violeta un poco más claro para diferenciarlo del menú */
    .nav-submenu-wrapper.nav-submenu-open[b-7bg4cnwqnl] {
        max-height: 1200px;
        transition: max-height 0.4s ease;
        background: rgba(255, 255, 255, 0.06);
        border-radius: 6px;
    }

/* ── Separadores: línea fina (sin texto) ─────────────────────────── */
.nav-separador[b-7bg4cnwqnl] {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    margin: 0.4rem 0.6rem;
}

/* ── Mensaje sin resultados ──────────────────────────────────────── */
.nav-sin-resultados[b-7bg4cnwqnl] {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    padding: 0.6rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* ── Badges de notificación ──────────────────────────────────────── */
.nav-badge[b-7bg4cnwqnl] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 0.6rem;
    background-color: #f59e0b;
    color: #1a1a1a;
    margin-left: auto;
    flex-shrink: 0;
}

    .nav-badge.nav-badge-danger[b-7bg4cnwqnl] {
        background-color: #ef4444;
        color: white;
    }

/* ── Avatar del usuario ──────────────────────────────────────────── */
.nav-avatar[b-7bg4cnwqnl] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
    border-radius: 50%;
    background-color: #3b82f6;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    margin-right: 0.5rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Área del usuario al pie ─────────────────────────────────────── */
.nav-usuario-area[b-7bg4cnwqnl] {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.4rem;
    padding-top: 0.1rem;
}

/* ── Scrollable / responsive ─────────────────────────────────────── */
.nav-scrollable[b-7bg4cnwqnl] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-7bg4cnwqnl] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-7bg4cnwqnl] {
        display: none;
    }

    .nav-scrollable[b-7bg4cnwqnl] {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
        overflow-x: hidden; /* nunca desborda horizontalmente */
        width: 100%; /* ocupa exactamente el sidebar, ni más ni menos */
        box-sizing: border-box;
    }
}

/* ── Syncfusion datatable ─────────────────────────────────────────── */
.rz-datatable .rz-datatable-table[b-7bg4cnwqnl] {
    table-layout: auto !important;
    width: 100% !important;
    white-space: normal;
    word-wrap: break-word;
}
