/*
 * Casca do site do Gerium (barra do topo, menu lateral, barra inferior no
 * celular). Só variáveis de tokens.css e classes ds-* (guarda:
 * painel/tests_amostra_design.py); nada de #hex.
 */
.gm-so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Barra do topo ---- */
.gm-topo {
    position: sticky; top: 0; z-index: var(--z-barra);
    display: flex; align-items: center; gap: var(--esp-3);
    background: var(--superficie); border-bottom: 1px solid var(--linha);
    padding: var(--esp-3) 72px var(--esp-3) var(--esp-4); box-sizing: border-box; min-height: 60px;
}
.gm-marca { font-size: var(--fs-lg); }
.gm-hamburguer { display: none; border: 1px solid var(--linha); background: var(--superficie); color: var(--tinta); border-radius: var(--raio-sm); width: 40px; height: 40px; cursor: pointer; }
.gm-empresa { display: flex; align-items: center; gap: var(--esp-2); min-width: 0; margin: 0; }
.gm-empresa i { color: var(--accent); }
.gm-empresa select { border: 1px solid var(--linha); border-radius: var(--raio-pill); padding: 6px var(--esp-3); font-size: var(--fs-sm); background: var(--superficie); color: var(--tinta); max-width: 240px; min-width: 0; text-overflow: ellipsis; }
.gm-direita { margin-left: auto; display: flex; align-items: center; gap: var(--esp-3); }
.gm-novo { position: relative; }
.gm-novo > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--esp-2); }
.gm-novo > summary::-webkit-details-marker { display: none; }
.gm-novo-lista { position: absolute; right: 0; top: calc(100% + var(--esp-2)); min-width: 230px; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); box-shadow: var(--sombra-3); padding: var(--esp-2); z-index: var(--z-menu); }
.gm-novo-lista a { display: block; padding: var(--esp-2) var(--esp-3); border-radius: var(--raio-sm); color: var(--tinta); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.gm-novo-lista a:hover { background: var(--accent-light); color: var(--accent-dark); }
.gm-sino { position: relative; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--raio-pill); color: var(--tinta-suave); text-decoration: none; border: 1px solid var(--linha); }
.gm-sino:hover { color: var(--accent-dark); border-color: var(--accent); }
.gm-sino-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: var(--raio-pill); background: var(--erro); color: var(--superficie); font-size: var(--fs-xs); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Corpo: menu lateral + conteúdo ---- */
.gm-corpo { display: flex; align-items: flex-start; min-height: calc(100vh - 60px); }
.gm-menu { flex: 0 0 236px; width: 236px; box-sizing: border-box; position: sticky; top: 60px; align-self: flex-start; max-height: calc(100vh - 60px); overflow-y: auto; padding: var(--esp-4) var(--esp-3); background: var(--superficie); border-right: 1px solid var(--linha); }
.gm-area { margin-bottom: var(--esp-4); }
.gm-area-titulo { display: flex; align-items: center; gap: var(--esp-2); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--tinta-suave); padding: var(--esp-1) var(--esp-3); text-decoration: none; }
.gm-area-titulo i { width: 18px; text-align: center; }
a.gm-area-titulo { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--tinta); font-weight: 700; padding: var(--esp-2) var(--esp-3); border-radius: var(--raio-sm); }
a.gm-area-titulo:hover { background: var(--fundo-suave); }
a.gm-area-titulo.ativo { background: var(--accent-light); color: var(--accent-dark); }
.gm-menu { padding-bottom: 56px; }
.gm-item { display: flex; align-items: center; justify-content: space-between; gap: var(--esp-2); padding: 7px var(--esp-3) 7px 38px; border-radius: var(--raio-sm); color: var(--tinta); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.gm-item:hover { background: var(--fundo-suave); }
.gm-item.ativo { background: var(--accent-light); color: var(--accent-dark); font-weight: 800; }
.gm-item.trancado { color: var(--tinta-suave); }
.gm-cadeado { font-size: var(--fs-xs); opacity: .8; }
.gm-conteudo { flex: 1 1 0; min-width: 0; padding: var(--esp-4); box-sizing: border-box; }
.gm-sem-menu .gm-conteudo { max-width: 1100px; margin: 0 auto; }
.gm-veu { position: fixed; inset: 0; background: var(--veu); z-index: calc(var(--z-menu) - 1); }
.gm-baixo { display: none; }

/* ---- Celular: menu vira gaveta e entra a barra inferior ---- */
@media (max-width: 900px) {
    .gm-topo { padding: var(--esp-2) 64px var(--esp-2) var(--esp-3); gap: var(--esp-2); }
    .gm-hamburguer { display: inline-flex; align-items: center; justify-content: center; }
    .gm-marca span { display: none; }
    .gm-empresa { flex: 1 1 0; }
    .gm-empresa select { max-width: none; width: 100%; }
    .gm-empresa i { display: none; }
    .gm-direita { margin-left: 0; gap: var(--esp-2); }
    .gm-novo > summary span { display: none; }
    .gm-menu { position: fixed; top: 0; left: 0; bottom: 0; max-height: none; z-index: var(--z-menu); transform: translateX(-105%); transition: transform .2s ease; width: min(86vw, 300px); box-shadow: var(--sombra-3); padding-top: var(--esp-5); }
    body.gm-menu-aberto .gm-menu { transform: none; }
    .gm-conteudo { padding: var(--esp-3); padding-bottom: calc(76px + var(--esp-3)); }
    .gm-baixo { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-barra); background: var(--superficie); border-top: 1px solid var(--linha); justify-content: space-around; align-items: center; padding: var(--esp-1) var(--esp-2); }
    .gm-baixo a, .gm-baixo button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--esp-2) 0; border: 0; background: none; color: var(--tinta-suave); font: inherit; font-size: var(--fs-xs); font-weight: 700; text-decoration: none; cursor: pointer; }
    .gm-baixo a.gm-baixo-mais { flex: 0 0 48px; height: 48px; border-radius: var(--raio-pill); background: var(--accent); color: var(--superficie); justify-content: center; }
}

/* ---- Telas de conta (entrar, senha) ---- */
.gm-centro { display: flex; justify-content: center; padding: var(--esp-6) var(--esp-3) var(--esp-7); }
.gm-caixa { background: var(--superficie); border-radius: var(--raio-lg); box-shadow: var(--sombra-4); padding: var(--esp-6); width: 400px; max-width: 100%; box-sizing: border-box; }
.gm-caixa h1 { font-size: var(--fs-lg); font-weight: 800; margin: 0 0 var(--esp-2); }
.gm-caixa p { color: var(--tinta-suave); font-size: var(--fs-sm); line-height: 1.55; }
.gm-caixa .sub { margin: 0 0 var(--esp-5); }
.gm-campo { margin-bottom: var(--esp-4); }
.gm-campo label { display: block; font-weight: 600; font-size: var(--fs-xs); margin-bottom: 6px; }
.gm-campo input { width: 100%; padding: 10px 14px; border: 1px solid var(--linha); border-radius: var(--raio-sm); font-size: var(--fs-sm); box-sizing: border-box; font-family: inherit; }
.gm-campo input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.gm-botao { display: block; width: 100%; box-sizing: border-box; text-align: center; background: var(--accent); color: var(--superficie); border: 0; border-radius: var(--raio-sm); padding: 12px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; text-decoration: none; font-family: inherit; }
.gm-botao:hover { background: var(--accent-dark); color: var(--superficie); }
.gm-erro { background: var(--erro-fundo); color: var(--erro); padding: 10px 14px; border-radius: var(--raio-sm); font-size: var(--fs-sm); margin-bottom: var(--esp-4); }
.gm-aviso { background: var(--accent-light); color: var(--accent-dark); padding: 10px 14px; border-radius: var(--raio-sm); font-size: var(--fs-sm); margin-bottom: var(--esp-4); line-height: 1.5; }
.gm-rodape { text-align: center; font-size: var(--fs-sm); color: var(--tinta-suave); margin-top: var(--esp-4); }
.gm-rodape a { color: var(--accent-dark); font-weight: 700; text-decoration: none; }
