/* --- estrutura ------------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 58px;
  padding: 0 var(--s-6);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
}
.brand {
  gap: var(--s-3);
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--fs-4);
}
.brand:hover {
  background: none;
}
/* Logótipo RILab, como no ícone da app: «RI» no gradiente azul, «Lab» na cor do texto e um traço
   azul por baixo, centrado. */
.wordmark {
  position: relative;
  display: inline-block;
  padding-bottom: var(--s-2);
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.wordmark b {
  background: linear-gradient(135deg, var(--accent), #1e6fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: inherit;
}
.wordmark::after {
  content: "";
  position: absolute;
  right: 26%;
  bottom: 0;
  left: 26%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #1e6fff);
}
.wordmark-lg {
  padding-bottom: var(--s-3);
  font-size: 36px;
}
.wordmark-lg::after {
  height: 5px;
  border-radius: 3px;
}
.mainnav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 2px;
}
.navlink {
  height: 100%;
  min-height: 0;
  padding: 0 var(--s-4);
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  box-shadow: inset 0 -2px 0 transparent;
}
.navlink:hover {
  background: none;
  color: var(--ink);
}
.navlink.on {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.navlink.on .ico {
  color: var(--accent);
}
.mainnav .navlink {
  transition:
    color 0.12s,
    background 0.12s,
    box-shadow 0.16s;
}
.mainnav .navlink.on {
  background: linear-gradient(to top, var(--accent-soft), transparent 70%);
}
/* v6.9.0: a marca de «A tratar» numa entrada (ui.js, navAlert): um ponto cheio para os críticos,
   um anel para quem só tem itens em atenção (a forma diz o mesmo que a cor) */
.nav-alert {
  flex: none;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.nav-alert.bad {
  background: currentColor;
}
/* Na barra de cima, ao canto do nome e fora do fluxo: a navegação fica com a mesma largura com ou
   sem marcas (com as quatro, a 1121 px e numa letra larga, a pesquisa encolhia e cortava o texto) */
.mainnav .navlink {
  position: relative;
}
.mainnav .nav-alert {
  position: absolute;
  top: 15px;
  right: 2px;
}
/* v5.26.2: 380 px, para o texto da pesquisa caber inteiro; v5.39.1: «Equipamento, serial, componente…»,
   que cabe também com a DejaVu Sans (a letra do system-ui em muitos Linux) */
.omni {
  position: relative;
  margin-left: auto;
  width: 380px;
}
/* v5.11.0: a lupa que abre a pesquisa só existe no telemóvel (responsivo.css) */
.omni-toggle {
  display: none;
}
.omni-box {
  position: relative;
  display: flex;
  align-items: center;
}
.omni-box > .ico {
  position: absolute;
  left: 11px;
  color: var(--faint);
}
.omni-box input {
  min-height: var(--h-3);
  padding: var(--s-2) 34px;
  background: var(--surface-2);
}
.omni-box kbd {
  position: absolute;
  right: 9px;
  padding: 0 var(--s-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  color: var(--faint);
  font: var(--fs-1)/18px var(--mono);
}
.omni-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: var(--s-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.omni-item {
  width: 100%;
  justify-content: flex-start;
  gap: var(--s-3);
  border: 0;
  background: none;
  text-align: left;
}
.omni-item span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.omni-item small {
  color: var(--muted);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}
.omni-item.first {
  background: var(--surface-3);
}
.omni-item > .ico {
  color: var(--faint);
}
/* v6.9.0: os grupos dos resultados (páginas, backups e ações), depois dos equipamentos */
.omni-group {
  margin-top: var(--s-2);
  padding: var(--s-2) var(--s-4) var(--s-1);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: var(--fs-1);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.omni-group:first-child {
  margin-top: 0;
  border-top: 0;
}
.omni-results {
  max-height: min(70vh, 520px);
  overflow-y: auto;
}
.omni-empty {
  padding: var(--s-3);
  color: var(--muted);
}
.chev {
  color: var(--faint);
}
.top-tools {
  display: flex;
  gap: var(--s-2);
}
.top-tools .icon-btn {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.top-tools .icon-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.content {
  max-width: 1480px;
  margin: 0 auto;
  padding: var(--s-6) var(--s-6) 64px;
}
.tabbar {
  display: none;
}

/* --- cabeçalho de página -------------------------------------------------------- */
.page-head {
  margin-bottom: var(--s-6);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  color: var(--faint);
  font-size: var(--fs-2);
}
.crumbs .back {
  min-height: var(--h-2);
  padding: 3px var(--s-3) 3px var(--s-2);
  margin-right: var(--s-2);
  font-size: var(--fs-2);
}
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.page-title {
  min-width: 0;
}
.page-title h1 {
  font-size: var(--fs-6);
  font-weight: 750;
}
.page-title p {
  margin-top: var(--s-1);
  color: var(--muted);
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.eq-title {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.eq-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--accent);
  font: 750 var(--fs-4) var(--mono);
}
.eq-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-2);
  color: var(--muted);
}
.eq-meta button.link {
  gap: var(--s-1);
}
/* v5.23.0: position relative para o texto só dos leitores de ecrã (.vh, absoluto) dos selos ficar
   dentro da fila que desliza; senão, um separador fora de vista alarga a página no telemóvel. */
.tabs {
  position: relative;
  display: flex;
  gap: var(--s-1);
  margin-top: var(--s-5);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs button {
  min-height: var(--h-3);
  padding: var(--s-3) var(--s-4);
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  box-shadow: inset 0 -2px 0 transparent;
}
.tabs button:hover {
  color: var(--ink);
  background: none;
}
.tabs button.on {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}
/* v5.20.0 (P09): os separadores das partes de um grupo (Manutenção, Vigilância), logo por baixo do
   cabeçalho da página (ui.js, groupHead) */
.group-tabs {
  margin: calc(var(--s-3) * -1) 0 var(--s-5);
}
/* v5.11.0: há mais separadores à direita (ui.js, marcarSeparadores); v5.20.0: ou à esquerda */
.tabs.mais-a-direita {
  -webkit-mask-image: linear-gradient(to left, transparent, #000 48px);
  mask-image: linear-gradient(to left, transparent, #000 48px);
}
.tabs.mais-a-esquerda {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px);
  mask-image: linear-gradient(to right, transparent, #000 48px);
}
.tabs.mais-a-esquerda.mais-a-direita {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

/* --- painéis -------------------------------------------------------------------- */
.panel {
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--elev-1);
  min-width: 0;
}
.panel + .panel {
  margin-top: var(--s-5);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
/* v2.2: «Discos retirados» na página Saúde, fechada por omissão */
details.retired-disks > summary {
  cursor: pointer;
  list-style: none;
}
details.retired-disks > summary::-webkit-details-marker {
  display: none;
}
details.retired-disks:not([open]) > summary {
  margin-bottom: 0;
}
details.retired-disks > summary h2::after {
  content: "▸";
  font-size: var(--fs-1);
  color: var(--muted);
}
details.retired-disks[open] > summary h2::after {
  content: "▾";
}
/* v6.9.0: o título de um painel um ponto acima do texto (16 px), para se distinguir dele */
.panel-head h2 {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-4);
  font-weight: 650;
}
.panel-head .count {
  font: 650 var(--fs-1) var(--mono);
  color: var(--muted);
}
.empty {
  padding: var(--s-6);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-2);
  color: var(--muted);
  text-align: center;
}
.empty.slim {
  padding: var(--s-4);
}
.empty.big {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  padding: 44px var(--s-6);
}
.empty.big > .ico {
  width: 28px;
  height: 28px;
  color: var(--faint);
}
.empty.big b {
  color: var(--ink);
  font-size: var(--fs-4);
}
.empty.big span {
  max-width: 420px;
}
.empty .ico {
  vertical-align: -3px;
}
