/* AppBraga v1.58.484 — contraste global de texto
   Clareia apenas texto secundário/auxiliar em fundos dark. */
:root{
  --muted:#b4c5dc!important;
  --app-muted:#b4c5dc!important;
  --abm-muted:#b4c5dc!important;
  --app-imp-muted:#b4c5dc!important;
  --ck-muted:#b4c5dc!important;
  --imp-muted:#b4c5dc!important;
  --dash-muted:#b4c5dc!important;
  --dir-muted:#b4c5dc!important;
  --ent-muted:#b4c5dc!important;
  --eq-muted:#b4c5dc!important;
  --etq-muted:#b4c5dc!important;
  --gp-muted:#b4c5dc!important;
  --hist-muted:#b4c5dc!important;
  --it-muted:#b4c5dc!important;
  --mnt-muted:#b4c5dc!important;
  --mp-muted:#b4c5dc!important;
  --mst-muted:#b4c5dc!important;
  --not-muted:#b4c5dc!important;
  --portal-muted:#c2d0e4!important;
  --stock-muted:#b4c5dc!important;
  --cfg-muted:#b4c5dc!important;
  --pro-muted:#b4c5dc!important;
  --ab-hero-muted:#c2d0e4!important;
}

/* Placeholders: deixam de desaparecer no fundo. */
body input::placeholder,
body textarea::placeholder{
  color:#9fb3cf!important;
  opacity:1!important;
}

/* Texto auxiliar recorrente das páginas oficiais. */
body .ck-code-sub,
body .ck-alert-sub,
body .ck-mini-sub,
body .diag-sub,
body .diag-feed-item small,
body .gp-card-title-row small,
body .gp-toggle small,
body .gp-live-meta,
body .gp-kpi small,
body .gp-test-head>div small,
body .it-sub,
body .it-summary-grid small,
body .it-detail-info small,
body .it-timeline-time,
body .it-timeline-copy p,
body .it-drop small,
body .it-subbox p,
body .mst-sub,
body .mst-muted,
body .stock-sub,
body .hist-sub,
body .mnt-sub,
body .cfg-sub,
body .portal-card p,
body .portal-card small,
body .app-state-summary article>small,
body .app-state-box-head span,
body .app-state-errors span,
body .app-state-errors time,
body .app-state-empty,
body .app-state-foot,
body .app-state-listener-table td>small,
body .app-state-muted,
body .smart-copy header small,
body .smart-copy footer,
body .smart-empty,
body .rules-summary small,
body .smart-kpis small,
body .app-state-v2-kpis small,
body .rule-fields label>span,
body .rule-auto>span,
body .app-state-costguard span{
  color:#aebfd7!important;
}

/* Textos descritivos/empty states precisam de um nível acima. */
body .it-empty,
body .it-summary-empty,
body .mst-empty,
body .stock-empty,
body .ck-empty,
body .gp-empty,
body .hist-empty,
body .mnt-empty,
body .smart-empty,
body .empty-state,
body [class*="empty-state"],
body [class$="-empty"]{
  color:#aebfd7!important;
}

/* Rodapés e metadados: legíveis sem competir com o conteúdo principal. */
body .it-table-footer,
body .it-statusbar,
body .ck-table-footer,
body .hist-table-footer,
body .stock-table-footer,
body .mst-table-footer,
body .table-footer,
body .footer-stats,
body .page-meta,
body .last-update,
body [class*="last-update"]{
  color:#afc1da!important;
}

/* Labels pequenos usados em configurações e cartões. */
body label>span,
body .field-label,
body .form-label,
body .meta-label{
  color:#bdcce0;
}

/* Mantém estados/ações sem alterações de cor. */
body .danger,
body .warning,
body .success,
body .ok,
body .error,
body [class*="state"],
body [class*="status"],
body [class*="badge"],
body [class*="pill"]{
  /* intencionalmente sem override global de color */
}

/* ===== v1.58.486 — CORREÇÃO DA ORIGEM DO TEXTO PRETO =====
   O CSS legado define --text:#111827 quando a página não recebe body.dark.
   Várias páginas AppBraga atuais têm fundo dark próprio sem essa classe, pelo que
   elementos sem cor explícita herdavam texto quase preto. Corrigimos a variável
   no body dark real da app, preservando body.app-light e áreas de impressão. */
body:not(.app-light){
  --text:#eef5ff!important;
  --muted:#b4c5dc!important;
  color:#eef5ff!important;
}

/* Controlos nativos também deixam de cair no preto do browser/tema antigo. */
body:not(.app-light) input:not([type="color"]),
body:not(.app-light) textarea,
body:not(.app-light) select{
  color:#eef5ff!important;
}
body:not(.app-light) select option,
body:not(.app-light) select optgroup{
  color:#eef5ff!important;
  background:#0b1b34!important;
}

/* Elementos que frequentemente não recebem uma classe de texto própria. */
body:not(.app-light) legend,
body:not(.app-light) summary,
body:not(.app-light) caption,
body:not(.app-light) output{
  color:#eef5ff!important;
}

/* Nunca contaminar etiquetas/folhas destinadas a impressão. */
body:not(.app-light) #printAreaEtiquetaAppBraga,
body:not(.app-light) #printAreaEtiquetaAppBraga *,
body:not(.app-light) [data-print-area],
body:not(.app-light) [data-print-area] *{
  color:#000!important;
}
