/* Cabeçalho compartilhado por todos os módulos do SIGEL. */
:root body .barra-superior.barra-superior-compacta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: auto;
  min-height: 63px;
  padding: 10px 30px;
}
:root[data-theme="dark"] body .barra-superior-compacta { border-bottom-color: #36756f; }
:root body .barra-superior-compacta .titulo-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}
:root body .barra-superior-compacta .titulo-topo small { display: none; }
.topo-marca {
  font-weight: 800;
  letter-spacing: .07em;
  border-inline-end: 1px solid #49c9b9;
  padding-inline-end: 12px;
}
:root body .barra-superior-compacta .usuario-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
:root body .barra-superior-compacta :is(.sigel-abrir-grade,.topo-compacto-botao) { min-height: 40px; }
:root body .barra-superior-compacta .sigel-abrir-grade {
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--superficie);
  color: inherit;
  font: inherit;
  font-size: calc(13px * var(--sigel-escala-fonte,1));
  font-weight: 400;
}
:root body .barra-superior-compacta .sigel-abrir-grade > svg {
  width: 17px;
  height: 17px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
}
.topo-compacto-botao {
  border: 1px solid var(--borda);
  border-radius: 7px;
  background: var(--superficie);
  color: inherit;
  font: inherit;
  padding: 7px 10px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.topo-compacto-botao::after { content: "⌄"; padding-inline-start: 7px; }
:root body .barra-superior-compacta :focus-visible { outline: 2px solid #47e2c9; outline-offset: 3px; }
:root body .barra-superior-compacta .topo-compacto-popover {
  position: fixed;
  inset: 62px 15px auto auto;
  top: calc(anchor(bottom, 54px) + 8px);
  margin: 0;
  padding: 14px;
  max-width: calc(100vw - 30px);
  max-height: calc(100dvh - 150px);
  overflow: auto;
  border: 1px solid var(--borda);
  border-radius: 9px;
  background: var(--superficie);
  color: inherit;
}
:root body .barra-superior-compacta .topo-compacto-popover:popover-open { display: grid; gap: 12px; justify-items: start; }
:root body .barra-superior-compacta .topo-compacto-popover:not(:popover-open) { display: none; }
:root body .usuario-identificacao {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 320px;
  text-align: right;
  overflow-wrap: anywhere;
}
:root body .usuario-identificacao strong { color: var(--texto); font-size: calc(13px * var(--sigel-escala-fonte,1)); font-weight: 400; line-height: 1.3; }
:root body .usuario-identificacao small { color: var(--cinza); font-size: calc(12px * var(--sigel-escala-fonte,1)); line-height: 1.3; }
:root body .barra-superior #ajudaTopo { margin: 0; }
:root body .barra-superior #ajudaTopo:empty { display: none; }
@media(max-width:1200px) {
  :root body .barra-superior.barra-superior-compacta { padding-inline: 16px; }
}
@media print { :root body .barra-superior-compacta .usuario-topo { display: none; } }
