/* Barra superior de la app (con sesión): la "barra noche" de la tienda MOSFET. */
.topbar {
    position: sticky; top: 0; z-index: 40;
    height: var(--head-h);
    display: flex; align-items: center; justify-content: space-between; gap: 12px 24px;
    padding: 0 16px;
    color: #fff;
    background: var(--night);
}
.topbar__menu {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-left: -8px; border-radius: var(--radius-sm); color: #fff;
}
.topbar__menu:hover { background: var(--night-hover); }
.topbar__brand { display: flex; flex: none; align-items: center; gap: 7px; margin-right: auto; border-radius: var(--radius-sm); }
/* flex: none y max-width: none: la barra nunca encoge el logo (se deformaba en el celular). */
.topbar__iso { display: block; flex: none; width: auto; max-width: none; height: 44px; }
.topbar__word { display: block; flex: none; width: auto; max-width: none; height: 40px; }
@media (min-width: 1024px) {
    /* Menú contraído: solo el isotipo, centrado sobre la columna de íconos (68 px). */
    [data-sidebar="collapsed"] .topbar__word { display: none; }
    [data-sidebar="collapsed"] .topbar__iso { margin-left: -12px; }
}
@media (max-width: 340px) {
    .topbar__word { height: 34px; }
}
/* Accesos de sistema (Papelera, Configuración): el menú de la barra de la tienda. Bajo 1024 px van al menú
   desplegable, junto al resto. */
.topbar__shortcuts { display: none; align-items: center; gap: 4px; }
.topbar__shortcut {
    display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px;
    border-radius: var(--radius-sm); color: var(--night-ink); font-size: .87rem; text-decoration: none; white-space: nowrap;
}
.topbar__shortcut .ico { width: 18px; height: 18px; }
.topbar__shortcut:hover { color: #fff; background: var(--night-hover); }
.topbar__shortcut.is-active { color: #fff; background: rgba(26, 143, 232, .25); font-weight: 600; }
@media (min-width: 1024px) {
    .topbar__shortcuts { display: flex; }
}
.topbar__user { display: flex; align-items: center; gap: 16px; min-width: 0; font-size: .87rem; color: var(--night-ink); }
.topbar__user form { margin: 0; }
.topbar__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__dev {
    padding: 3px 9px; border-radius: 999px; white-space: nowrap;
    font-size: .75rem; font-weight: 600; color: var(--warn); background: var(--warn-soft);
}
.topbar__link { color: var(--night-ink); white-space: nowrap; }
.topbar__link:hover, .topbar__link[aria-current] { color: #fff; }
/* "Salir": botón con aspecto de enlace, como en la tienda, con área táctil de 32 px. */
.topbar__logout {
    min-height: 32px; padding: 4px 10px; margin-right: -10px;
    border: 0; border-radius: var(--radius-sm); background: none;
    color: var(--night-ink); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.topbar__logout:hover { color: #fff; background: var(--night-hover); }

@media (min-width: 768px) {
    .topbar { padding: 0 24px; }
}
@media (max-width: 1023.98px) {
    .topbar__menu { display: inline-flex; }
}
@media (max-width: 760px) {
    .topbar__link, .topbar__dev { display: none; }
}
@media (max-width: 480px) {
    .topbar__who { max-width: 40vw; }
}
