/* ===== topbar-contextual-metrics-patch ===== */
/*
  Venda/Margem no topo só fazem sentido nas calculadoras de produto.
  Nas áreas administrativas/central/pedido/histórico, esses números podem confundir,
  então ficam ocultos sem remover os elementos que o JS ainda atualiza.
*/
.app:has(#homeView.active) .topbar-right .totals-inline,
.app:has(#dashboardView.active) .topbar-right .totals-inline,
.app:has(#mainControlView.active) .topbar-right .totals-inline,
.app:has(#pedidoView.active) .topbar-right .totals-inline,
.app:has(#formalQuoteView.active) .topbar-right .totals-inline,
.app:has(#histPedidosView.active) .topbar-right .totals-inline,
.app:has(#clientesView.active) .topbar-right .totals-inline {
  display: none !important;
}

/* Remove o separador interno quando os indicadores estão ocultos e deixa o topo mais limpo. */
.app:has(#homeView.active) .topbar-right,
.app:has(#dashboardView.active) .topbar-right,
.app:has(#mainControlView.active) .topbar-right,
.app:has(#pedidoView.active) .topbar-right,
.app:has(#formalQuoteView.active) .topbar-right,
.app:has(#histPedidosView.active) .topbar-right,
.app:has(#clientesView.active) .topbar-right {
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  gap: 10px !important;
  padding-left: 10px !important;
  border-left: 1px solid var(--border) !important;
}

/* Mantém o perfil/status/tema bem alinhados quando os totais somem. */
.app:has(#homeView.active) #activeProfileChip,
.app:has(#dashboardView.active) #activeProfileChip,
.app:has(#mainControlView.active) #activeProfileChip,
.app:has(#pedidoView.active) #activeProfileChip,
.app:has(#formalQuoteView.active) #activeProfileChip,
.app:has(#histPedidosView.active) #activeProfileChip,
.app:has(#clientesView.active) #activeProfileChip {
  margin-left: 0 !important;
}
