/* Casca do painel (30/10/2026): menu lateral com ícones, recolhido pelo ☰ ao lado da logo; topo com título, busca, engrenagem e menu do usuário. */
:root:root .app .z2i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:root:root .app .side-topo { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px 18px; }
:root:root .app .side-topo .brand { padding: 0; min-width: 0; }
:root:root .app .side a { display: flex; align-items: center; gap: 12px; }
:root:root .app .side a.ir-pdv { margin-top: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
:root:root .app .side .rot { line-height: 1.25; min-width: 0; }
:root:root .app .side .brand .rot { white-space: nowrap; }
:root:root .app .side nav { flex: 1 1 auto; }

/* grupo Configurações: botão que abre e fecha a lista de ajustes, no fim do menu */
:root:root .app .grp-config { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; margin: 14px 0 0; padding: 11px 12px; border: 0; border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 0; background: transparent; color: var(--side-fg); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
:root:root .app .grp-config:hover { color: #FFFFFF; }
:root:root .app .grp-config .seta-grp { margin-left: auto; font-size: 18px; line-height: 1; transition: transform .2s; }
:root:root .app .grp-config[aria-expanded="true"] .seta-grp { transform: rotate(90deg); }
:root:root .app .nav-config a { padding-left: 22px; }
:root:root .app .nav-config[hidden] { display: none; }

/* recolhido: só ícones (dica pelo atributo title) */
@media (min-width: 701px) {
  :root:root .app.recolhido { grid-template-columns: 76px minmax(0, 1fr); }
  :root:root .app.recolhido .side { padding-left: 8px; padding-right: 8px; }
  :root:root .app.recolhido .side .rot { display: none; }
  :root:root .app.recolhido .side-topo { justify-content: center; }
  :root:root .app.recolhido .side-topo .brand { display: none; }
  :root:root .app.recolhido .side a { justify-content: center; padding-left: 0; padding-right: 0; }
  :root:root .app.recolhido .grp-config { justify-content: center; padding-left: 0; padding-right: 0; }
  :root:root .app.recolhido .nav-config a { padding-left: 0; }
  :root:root .app.recolhido .side .grp { padding: 8px 0 4px; margin: 8px 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
}

/* menu aberto mantém a largura padrão até 701 px (o tema antigo estreitava para 206 px e cortava "Zero2 Gestão" ao lado do ☰) */
@media (min-width: 701px) and (max-width: 1050px) { :root:root .app:not(.recolhido) { grid-template-columns: 226px minmax(0, 1fr); } }

/* topo */
:root:root .app .topbar { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
:root:root .app .tb-titulo { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; }
:root:root .app .panel-heading-brand > svg { display: none; }
:root:root .app .tb-titulo b { font: 700 18px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root:root .app #menuBtn { display: none; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--fg); cursor: pointer; }
:root:root .app .side-topo { justify-content: flex-start; gap: 4px; }
:root:root .app .side-topo .brand { gap: 6px; font-size: 16px; min-width: 0; }
:root:root .app .side-topo .brand > svg { width: 24px; height: 24px; flex: none; }
:root:root .app .menu-lado { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--side-fg); cursor: pointer; }
:root:root .app .menu-lado:hover, :root:root .app .menu-lado:focus-visible { background: rgba(255, 255, 255, .1); color: #FFFFFF; }
:root:root .app .busca-global { position: relative; flex: 1 1 280px; max-width: 460px; margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 42px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
:root:root .app .busca-global input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: inherit; outline: none; }
:root:root .app .busca-global:focus-within { box-shadow: 0 0 0 3px var(--accent-soft), inset 0 0 0 1px var(--accent); }
:root:root .app .busca-global kbd { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--surface); color: var(--muted); }
:root:root .app .bg-lista { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; padding: 6px; border-radius: 16px; background: var(--surface); box-shadow: 0 18px 40px rgba(11, 25, 71, .18), inset 0 0 0 1px var(--line); }
:root:root .app .bg-lista a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--fg); text-decoration: none; }
:root:root .app .bg-lista a.on, :root:root .app .bg-lista a:hover { background: var(--accent-soft); }
:root:root .app .tb-icone { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--fg); }
:root:root .app .tb-icone:hover { color: var(--accent); }
:root:root .app button.tb-icone { border: 0; cursor: pointer; font: inherit; }
:root:root .app .menu-usuario { position: relative; flex: none; }
:root:root .app .menu-usuario summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 12px 3px 3px; border-radius: 999px; background: var(--surface-2); }
:root:root .app .menu-usuario summary::-webkit-details-marker { display: none; }
:root:root .app .avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 13px var(--f-display); }
:root:root .app .mu-nome { font-weight: 600; }
:root:root .app .mu-painel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 40px rgba(11, 25, 71, .18), inset 0 0 0 1px var(--line); }
:root:root .app .mu-tema .theme-toggle { width: 100%; margin: 6px 0; }
:root:root .app .mu-painel .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }

@media (max-width: 700px) {
  :root:root .app #menuBtn { display: grid; }
  :root:root .app .topbar { flex-wrap: wrap; }
  :root:root .app .busca-global { order: 5; flex: 1 1 100%; max-width: none; margin: 0; }
  :root:root .app .busca-global kbd, :root:root .app .mu-nome, :root:root .app .workspace-name { display: none; }
  :root:root .app .tb-titulo { flex: 1; }
  :root:root .app .panel-heading-brand > svg { display: block; }
}
