/* layout/lateral.css — Menu lateral escuro (mesmo desenho do sistema de Estoque): marca, menu com rolagem sem barra, grupos, itens, contador, ponto, rodapé do usuário e a barra do topo no celular. Entra logo depois de casca.css; as regras do menu claro antigo foram retiradas de casca.css, complementos.css, movimento.css e responsivo.css. */
.lateral { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--lateral-fundo); color: #fff; /* quem rola é só o .menu: marca e rodapé ficam sempre à vista */ overflow: hidden; }
.lateral-marca, .lateral-rodape { flex: 0 0 auto; }
.lateral-marca { display: block; padding: 1.15rem 1.15rem 1rem; border-bottom: 1px solid var(--lateral-linha); color: #fff; text-decoration: none; }
/* versão branca da arte oficial (img/logo-branca.png), para o fundo escuro */
.marca-logo { display: block; width: 100%; max-width: 190px; height: auto; }
.marca-sub { display: block; margin-top: .5rem; font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }

/* O menu rola sem barra visível (roda do mouse, toque, teclado). No lugar da barra, uma sombra clara aparece no fim (ou no topo) só enquanto houver item escondido: as camadas "local" acompanham o conteúdo e cobrem a sombra quando a rolagem chega ao fim. */
.menu { flex: 1 1 auto; min-height: 0; padding: .85rem .7rem; overflow-y: auto; scrollbar-width: none;
  background:
    linear-gradient(var(--lateral-fundo) 30%, transparent) top / 100% 2.5rem no-repeat local,
    linear-gradient(transparent, var(--lateral-fundo) 70%) bottom / 100% 2.5rem no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(255,255,255,.16), transparent) top / 100% .8rem no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(255,255,255,.16), transparent) bottom / 100% .8rem no-repeat scroll,
    var(--lateral-fundo); }
.menu::-webkit-scrollbar { display: none; }
.menu .grupo { padding: .9rem .55rem .35rem; font-size: .63rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--lateral-grupo); }
.menu a { display: flex; align-items: center; gap: .6rem; margin-bottom: 1px; padding: .55rem .6rem; border-radius: var(--raio-sm); color: var(--lateral-texto); font-size: .84rem; font-weight: 500; text-decoration: none; transition: background .12s, color .12s; }
.menu a:hover { background: var(--lateral-hover); color: #fff; }
.menu a.ativo { background: var(--vermelho); color: #fff; font-weight: 600; view-transition-name: menu-ativo; }
.menu .ico { width: 17px; height: 17px; opacity: .75; }
.menu a:hover .ico, .menu a.ativo .ico { opacity: 1; }
/* contador (cargas, clientes sem mapa): translúcido no fundo escuro, branco sobre o item ativo */
.menu .cont { margin-left: auto; min-width: 1.15rem; height: 1.15rem; padding: 0 .4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; }
.menu a.ativo .cont { background: #fff; color: var(--vermelho); }
/* ponto de pendência: vermelho mais claro que o da marca, que some no #121212 (2,7:1); no item ativo vira branco */
.menu .ponto { flex: none; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--lateral-ponto); box-shadow: 0 0 0 3px rgba(255,92,92,.22); }
.menu a.ativo .ponto { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.28); }
/* o foco padrão (vermelho) tem só 2,7:1 sobre o fundo escuro; no menu o anel é branco (18,7:1) */
.lateral :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* rodapé: avatar, nome, papel e o botão Sair só com ícone */
.lateral-rodape { padding: .85rem 1rem; border-top: 1px solid var(--lateral-linha); }
.usuario-linha { display: flex; align-items: center; gap: .55rem; }
.lateral .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
.lateral .avatar[class*="cor-"] { background: var(--vermelho); }
.lateral-rodape .avatar { width: 30px; height: 30px; font-size: .72rem; }
.usuario-texto { flex: 1; min-width: 0; }
.usuario-nome, .usuario-papel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-nome { font-size: .78rem; font-weight: 600; line-height: 1.2; color: #fff; }
.usuario-papel { font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; color: var(--lateral-fraco); }
.usuario-sair { flex: 0 0 auto; margin: 0; }
.usuario-sair button { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.4); border-radius: var(--raio-sm); background: transparent; color: var(--lateral-texto); cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.usuario-sair button:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); color: #fff; }

/* celular e tablet: a lateral vira a barra escura do topo (logo branca + avatar); o menu vai para a barra inferior e para "Minha conta" */
.lateral-mob { display: none; }
.lateral-mob .avatar-btn { display: inline-flex; }
.avatar-btn { padding: 0; text-decoration: none; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .15s, transform .15s; }
.avatar-btn:hover { border-color: #fff; transform: scale(1.05); }
@media (max-width: 960px) {
  .lateral { position: static; height: auto; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; overflow: visible; }
  .lateral .menu, .lateral-rodape { display: none; }
  .lateral-marca { padding: 0; border-bottom: 0; }
  .marca-logo { max-width: 132px; }
  .marca-sub { display: none; }
  .lateral-mob { margin-left: auto; display: flex; gap: 8px; align-items: center; }
}
