/* Portal SGE: menu lateral + área dos sistemas. Cores e fonte vêm do sge-core. */
html, body { height: 100%; margin: 0; }
body.sge { display: grid; grid-template-columns: 264px 1fr; background: var(--sge-fundo); color: var(--sge-texto); font-family: var(--sge-fonte); }
body.bloqueado .menu, body.bloqueado .area { visibility: hidden; }

.menu { display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--sge-marca-escura); color: #e2e8f0; overflow-y: auto; min-height: 0; }
.menu-topo { display: flex; align-items: center; gap: 10px; }
.menu-topo img { background: #fff; border-radius: 8px; padding: 2px; }
.menu-recolher { margin-left: auto; background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; min-width: 44px; min-height: 44px; }
.lista-menu h2, .menu-titulo { margin: 12px 4px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.lista-menu ul { list-style: none; margin: 0; padding: 0; }
.lista-menu li { display: flex; align-items: center; }
.item { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.item:hover, .item.ativo { background: rgba(255, 255, 255, .1); }
.icone { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--sge-marca); color: #fff; font-weight: 700; font-size: 13px; }
.abrir-fora { color: #94a3b8; text-decoration: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.abrir-fora:hover { color: #fff; }
.menu-rodape { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.menu-fechar { margin-left: auto; background: none; border: 0; color: inherit; font-size: 24px; cursor: pointer; min-width: 44px; min-height: 44px; }
.abertos-celular .aba-botao, .abertos-celular .aba-fechar { color: inherit; }
.abertos-celular .aba-item { border-color: rgba(255, 255, 255, .25); }
@media (min-width: 761px) {
    body.menu-recolhido { grid-template-columns: 64px 1fr; }
    body.menu-recolhido .menu .nome, body.menu-recolhido .menu h2, body.menu-recolhido .menu-topo strong,
    body.menu-recolhido #busca, body.menu-recolhido .abrir-fora, body.menu-recolhido #pessoa { display: none; }
}

.area { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.barra { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--sge-borda); background: var(--sge-superficie); overflow-x: auto; }
.botao-inicio, .botao-menu { min-height: 40px; padding: 0 12px; border: 1px solid var(--sge-borda); border-radius: 8px; background: var(--sge-superficie); color: var(--sge-texto); font: inherit; cursor: pointer; }
.abas { display: flex; gap: 6px; }
.aba-item { display: inline-flex; align-items: center; border: 1px solid var(--sge-borda); border-radius: 8px; overflow: hidden; }
.aba-botao, .aba-fechar { min-height: 40px; border: 0; background: none; color: var(--sge-texto); font: inherit; cursor: pointer; padding: 0 10px; white-space: nowrap; }
.aba-botao[aria-current="page"] { background: var(--sge-destaque-suave); font-weight: 600; }

.inicio { padding: 20px; overflow-y: auto; }
.inicio h1 { font-size: 20px; margin: 0 0 16px; }
.quadros { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.quadro { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 110px; padding: 14px; border: 1px solid var(--sge-borda); border-radius: var(--sge-raio); background: var(--sge-superficie); color: var(--sge-texto); font: inherit; text-align: left; text-decoration: none; cursor: pointer; box-shadow: var(--sge-sombra); }
.quadro:hover { border-color: var(--sge-destaque); }
.quadro .nome { font-weight: 600; }
.quadro .quadro-area { font-size: 12px; color: var(--sge-texto-2); }

.palco { flex: 1; position: relative; min-height: 0; }
.aba { position: absolute; inset: 0; }
.aba iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.aba-aviso { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--sge-fundo); }

.tela { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .92); }
.tela[hidden] { display: none; }
.cartao { max-width: 440px; width: 100%; padding: 28px 24px; border-radius: 16px; background: var(--sge-superficie); color: var(--sge-texto); text-align: center; }
.cartao h2 { margin: 0 0 10px; font-size: 21px; }
.cartao p { margin: 0 0 18px; line-height: 1.6; color: var(--sge-texto-2); }

.so-celular { display: none; }
@media (max-width: 760px) {
    body.sge { grid-template-columns: 1fr; }
    .menu { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); z-index: 1000; transform: translateX(-100%); transition: transform .2s, visibility .2s; visibility: hidden; }
    body.menu-aberto .menu { transform: none; box-shadow: var(--sge-sombra-forte); visibility: visible; }
    .menu-recolher, .abas { display: none; }
    .so-celular { display: block; }
    .abertos-celular { display: flex; flex-direction: column; gap: 6px; }
    .area { height: 100dvh; }
}
@media (prefers-reduced-motion: reduce) { .menu { transition: none; } }
