/*
 * Barra superior única del ERP — usada tal cual por templates/base.html
 * (páginas nativas) y templates/admin/base_site.html (Admin), vía el
 * partial templates/partials/_shell_nav.html. 100% autocontenida (no
 * depende de que Bootstrap ni ningún otro framework haya cargado bien) a
 * propósito: antes la versión de las páginas nativas heredaba su reset de
 * estilos (sin subrayado, etc.) de Bootstrap, y si el CDN de Bootstrap
 * fallaba en cargar, la barra se veía distinta a la del Admin (2026-07-27,
 * reporte real del cliente). Un solo archivo para las dos = imposible que
 * vuelvan a divergir.
 */
.wsd-shell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    background-color: #7b1e3a !important;
    color: #fff !important;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    /* 2026-08-10, defensivo: esta barra tiene que verse SIEMPRE igual, sin
       importar qué otra hoja de estilos (o modo oscuro forzado del
       navegador/SO) se le ocurra tocar link/texto — ver el comentario del
       encabezado del archivo, "100% autocontenida". Los !important de acá
       para abajo son a propósito, no un parche apurado. */
    color-scheme: light;
}

.wsd-shell-brand {
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    margin-right: 20px;
    font-size: 1rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.wsd-shell-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    flex: 1;
}

.wsd-shell-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.wsd-shell-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.wsd-shell-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.16);
    font-weight: 600;
}

.wsd-shell-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85) !important;
    white-space: nowrap;
}

.wsd-shell-user form {
    display: inline;
}

.wsd-shell-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff !important;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
}

.wsd-shell-logout:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Sub-items (ej. si algún módulo vuelve a tener hijos en el menú) */
.wsd-shell-dropdown {
    position: relative;
}

.wsd-shell-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fffdfb !important;
    border: 1px solid #ddd6cc;
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 8px 24px -10px rgba(36, 27, 29, 0.35);
    z-index: 1050;
    padding: 6px;
    margin-top: 4px;
    color-scheme: light;
}

.wsd-shell-dropdown:hover .wsd-shell-dropdown-menu,
.wsd-shell-dropdown:focus-within .wsd-shell-dropdown-menu {
    display: block;
}

.wsd-shell-dropdown-item {
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    color: #241b1d !important;
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
}

.wsd-shell-dropdown-item:hover {
    background-color: #f3ede4;
    color: #7b1e3a !important;
}
