/* ============================================================
   HEADER — padrao do Topbar do SIGO / frotas

   Nas duas SPAs o topbar e BRANCO (--surface) com borda inferior, e
   so o menu lateral e navy. Antes aqui o header tambem era escuro,
   o que deixava a tela com duas faixas azuis empilhadas.

   Referencia: netmaster-spa-sigo/components/Topbar.tsx
     background: var(--surface); borderBottom: 1px solid var(--border)
     avatar circular 34px com iniciais, em gradiente da marca
   ============================================================ */
/* O topbar COMECA onde o menu termina — nao passa por cima dele.
   E o arranjo do frotas e do SIGO: <aside> em altura total a esquerda,
   e ao lado uma coluna com topbar + conteudo. Por isso o `left` segue
   a largura do menu e acompanha o colapso. */
.header {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e6e8ec;
    color: #1f2937;
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 1020;
    padding: 0 16px !important;
    transition: left 0.22s ease;
}

    /* menu colapsado: o topbar avanca junto */
    .header.expanded {
        left: var(--sidebar-w-collapsed);
    }

/* Botão do menu — ghost, como no SIGO */
.btn-menu {
    color: #4b5563;
    background: none;
    border: none;
    height: 36px;
    width: 36px;
    border-radius: 8px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
}

    .btn-menu:hover {
        background: #f1f3f6;
        color: #111827;
    }

    .btn-menu i {
        font-size: 18px;
        line-height: 1;
    }

/* o me-5 do markup abria um vao grande demais entre botao e marca */
.header .btn-menu.me-5 {
    margin-right: 12px !important;
}

/* A marca normalmente vive no menu lateral (menuDefault.css), como no
   frotas — some junto com o menu ao colapsar. Nas páginas que escondem
   o menu inteiro (Aprovação Pedidos), o badge reaparece aqui no topbar
   — ver .header-logo-pedido em _LoginPartial.cshtml e pedido.css. */

/* ---------------- Usuário ---------------- */
.avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--blue-600), var(--blue-800));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .01em;
    user-select: none;
}

.user-info {
    line-height: 1.2;
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

.user-role {
    font-size: 11px;
    color: #6b7280;
}

.logout-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 17px;
    line-height: 1;
    color: #4b5563 !important;
    transition: background .12s, color .12s;
}

    .logout-icon:hover {
        background: #fdecec;
        color: #c0392b !important;
    }

/* em telas estreitas sobra so o avatar */
@media (max-width: 767.98px) {
    .user-info {
        display: none;
    }
}
