/* =====================================================================
 * menu.css — MENU NOVO e topo (redesign F2a, v183)
 * Tudo aqui só vale com <html class="sw-shell"> (todos os logados, menu.js).
 * Sem essa classe o sistema fica exatamente como antes.
 * ===================================================================== */
#swMenu, .sw-mini-btn, .sw-setor{display:none}

/* ---- troca de menu ---- */
#nav{display:none!important}   /* v533: #nav é só a lista interna das telas (telas.js); nunca aparece */
html.sw-shell #swMenu{display:flex;flex-direction:column;gap:1px;flex:1;min-height:0;overflow:auto;padding:6px 10px 12px}
html.sw-shell .brand{position:relative;padding:16px 18px 14px}
/* rodapé do menu numa linha só: "Desenvolvido por Plyine" e a versão */
html.sw-shell .side-foot{font-size:0;padding:9px 16px;display:flex;align-items:center;justify-content:space-between;gap:8px}
html.sw-shell .side-foot > span:first-of-type{font-size:10.5px;white-space:nowrap}
html.sw-shell .side-foot > span:not(:first-of-type){display:none}
html.sw-shell .side-foot #appBuild{font-size:10px!important;margin-top:0!important;white-space:nowrap}

/* ---- itens ---- */
.sw-menu [hidden]{display:none!important}
.sw-ms{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--sw-sidebar-muted);padding:14px 10px 5px}
.sw-msub{font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--sw-sidebar-muted);padding:10px 10px 3px 40px}
.sw-mi{display:flex;align-items:center;gap:10px;width:100%;min-height:34px;border:0;border-radius:8px;background:transparent;color:var(--sw-sidebar-text);
  font:inherit;font-size:13px;font-weight:600;line-height:1.25;padding:7px 10px;text-align:left;cursor:pointer}
.sw-mi:hover{background:rgba(255,255,255,.06);color:#fff}
.sw-mi:focus-visible{outline:2px solid var(--sw-gold);outline-offset:-2px}
.sw-mi.on{background:rgba(255,255,255,.11);color:#fff;box-shadow:inset 3px 0 0 var(--sw-gold)}
.sw-mi-ic{flex:0 0 18px;width:18px;height:18px;display:grid;place-items:center;opacity:.9}
.sw-mi-ic svg{width:17px;height:17px}
.sw-mi-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sw-mi-chev{flex:0 0 14px;display:grid;place-items:center;opacity:.6;transition:transform .15s}
.sw-mi-chev svg{width:14px;height:14px}
.sw-mi-badge{flex:0 0 auto;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#B3241C;color:#fff;font-size:10.5px;font-weight:800;display:grid;place-items:center}

/* ---- grupos (um aberto por vez) ---- */
.sw-mg-h .sw-mi-ic{color:var(--c,currentColor)}
.sw-mg-h.on-dentro{color:#fff}
.sw-mg-h.on-dentro .sw-mi-tx::after{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--c,var(--sw-gold));margin-left:7px;vertical-align:1px}
.sw-mg-b{display:none;padding:1px 0 6px}
.sw-mg.aberto .sw-mg-b{display:block}
.sw-mg.aberto > .sw-mg-h .sw-mi-chev{transform:rotate(180deg)}
.sw-mg-b .sw-mi{padding-left:40px;font-size:12.8px;font-weight:500;min-height:31px}
.sw-mg-b .sw-mi .sw-mi-ic{display:none}
.sw-mg-b .sw-mi.on{box-shadow:inset 3px 0 0 var(--c,var(--sw-gold))}

/* ---- sublista (Faturamento, Análise contábil) ---- */
.sw-mn-b{display:none}
.sw-mn.aberto .sw-mn-b{display:block}
.sw-mn.aberto .sw-mp .sw-mi-chev{transform:rotate(180deg)}
.sw-mg-b .sw-mn-b .sw-mi{padding-left:54px;font-size:12.3px}
.sw-mp.on-dentro{color:#fff}

/* ---- rodapé do menu ---- */

/* ---- recolher (só ícones, 64 px) ---- */
html.sw-shell .sw-mini-btn{display:grid;place-items:center;position:absolute;right:10px;top:50%;transform:translateY(-50%);width:26px;height:26px;border-radius:7px;
  border:1px solid rgba(255,255,255,.14);background:transparent;color:#DCE7DF;cursor:pointer}
html.sw-shell .sw-mini-btn:hover{background:rgba(255,255,255,.08)}
html.sw-shell .sw-mini-btn svg{width:15px;height:15px}
@media(min-width:921px){
  html.sw-shell.sw-menu-mini .app{grid-template-columns:64px 1fr}
  html.sw-shell.sw-menu-mini .brand{padding:14px 0 44px;display:flex;justify-content:center}
  html.sw-shell.sw-menu-mini .brand h1,html.sw-shell.sw-menu-mini .brand small,html.sw-shell.sw-menu-mini .side-foot{display:none}
  html.sw-shell.sw-menu-mini .brand .logo{gap:0}
  html.sw-shell.sw-menu-mini .sw-mini-btn{right:auto;left:50%;top:auto;bottom:10px;transform:translateX(-50%)}
  html.sw-shell.sw-menu-mini #swMenu{padding:6px 8px}
  html.sw-shell.sw-menu-mini .sw-ms,html.sw-shell.sw-menu-mini .sw-mi-tx,html.sw-shell.sw-menu-mini .sw-mi-chev,
  html.sw-shell.sw-menu-mini .sw-mg-b{display:none!important}
  html.sw-shell.sw-menu-mini .sw-mi{justify-content:center;padding:8px 0;position:relative}
  html.sw-shell.sw-menu-mini .sw-mi-badge{position:absolute;top:2px;right:4px;min-width:8px;height:8px;padding:0;font-size:0}
  html.sw-shell.sw-menu-mini .sw-msec + .sw-msec{border-top:1px solid rgba(255,255,255,.08);margin-top:6px;padding-top:6px}
}
@media(max-width:920px){ html.sw-shell .sw-mini-btn{display:none} }

/* ---- topo: uma linha de ferramentas + a barra de contexto embaixo ---- */
html.sw-shell .topbar{border-top:3px solid var(--sw-setor,var(--sw-brand));padding-top:7px;padding-bottom:8px;row-gap:7px}
html.sw-shell .topbar .topbar-logo{display:none}
html.sw-shell .topbar #ctxBar{order:30;flex:1 1 100%}
/* auditoria do design, Etapa 2 (25/11/2026): em tela larga o Grupo e o Exercício entram na mesma linha da busca (a barra
   fica com uma linha só); tema, instalar e sincronização ficam só com o ícone (o nome aparece ao passar o mouse).
   Sem espaço, a linha quebra sozinha como antes. */
@media (min-width:1200px){
  html.sw-shell .topbar #ctxBar{order:0;flex:0 1 auto}
  html.sw-shell .topbar #swTemaBtn>span,html.sw-shell .topbar #instalarTopoBtn>span,html.sw-shell .topbar #syncTxt{display:none}
  html.sw-shell .topbar #swSetor{display:none}   /* o setor já está no alto da coluna do menu e na cor da faixa */
  html.sw-shell .topbar #gsWrap{flex:0 1 220px;min-width:140px}
}
@media (min-width:1200px) and (max-width:1599px){
  html.sw-shell .topbar #userMenuBtn .um,html.sw-shell .topbar #userMenuBtn .umchev{display:none}   /* fica a inicial; o nome está no menu ao clicar */
}
html.sw-shell .sw-setor{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--sw-text-2);border:1px solid var(--sw-line);border-radius:999px;padding:3px 9px 3px 7px;white-space:nowrap}
html.sw-shell .sw-setor[hidden]{display:none}
html.sw-shell .sw-setor::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--c)}
