/* =============================================================================
   TEMA ESCURO — overrides de painéis/ícones/alertas com cor hardcoded
   Carregado por último. Só afeta [data-theme="dark"]; o modo claro fica intacto.
   Fundos pastéis → tintas escuras; textos escuros → tons claros legíveis.
   ============================================================================= */

/* ---- Sucesso (verde) ---- */
:root[data-theme="dark"] .stat-card-icon.success,
:root[data-theme="dark"] .timeline-item[data-type="RESPOSTA_EMPRESA"] .timeline-icon,
:root[data-theme="dark"] .detail-response,
:root[data-theme="dark"] .import-upload-area.has-file,
:root[data-theme="dark"] .import-upload-area.has-file .import-upload-icon,
:root[data-theme="dark"] .import-result-icon.success,
:root[data-theme="dark"] .modal-confirm-icon.success,
:root[data-theme="dark"] .data-table tbody tr.row-success,
:root[data-theme="dark"] .monitoring-status.active,
:root[data-theme="dark"] .ra-kpi.success { background: #13291d; color: #4ade80; }
:root[data-theme="dark"] .coverage-check.active { background: #13291d !important; color: #4ade80 !important; }
:root[data-theme="dark"] .info-card.success,
:root[data-theme="dark"] .alert-success { background: #13291d; border-color: #1f5236; color: #4ade80; }
:root[data-theme="dark"] .status-ativo { background: #13291d; color: #4ade80; }

/* ---- Aviso (âmbar) ---- */
:root[data-theme="dark"] .stat-card-icon.warning,
:root[data-theme="dark"] .timeline-item[data-type="MUDANCA_STATUS"] .timeline-icon,
:root[data-theme="dark"] .import-result-icon.warning,
:root[data-theme="dark"] .modal-confirm-icon.warning,
:root[data-theme="dark"] .data-table tbody tr.row-highlight,
:root[data-theme="dark"] .monitoring-status.paused,
:root[data-theme="dark"] .ra-kpi.warning,
:root[data-theme="dark"] .ra-log-item.warning,
:root[data-theme="dark"] .monitoring-status.paused { background: #2c2410; color: #fbbf24; }
:root[data-theme="dark"] .info-card.warning,
:root[data-theme="dark"] .alert-warning { background: #2c2410; border-color: #4d3d14; color: #fbbf24; }
:root[data-theme="dark"] .cov-badge.cov-reduced,
:root[data-theme="dark"] .status-pendente { background: #2c2410; color: #fbbf24; }
:root[data-theme="dark"] .unread-row { background: #221d10 !important; }

/* ---- Perigo (vermelho) ---- */
:root[data-theme="dark"] .stat-card-icon.danger,
:root[data-theme="dark"] .import-result-icon.error,
:root[data-theme="dark"] .modal-confirm-icon.danger,
:root[data-theme="dark"] .data-table tbody tr.row-danger,
:root[data-theme="dark"] .monitoring-status.error,
:root[data-theme="dark"] .ra-kpi.error,
:root[data-theme="dark"] .ra-config-error { background: #2e1717; color: #f87171; }
:root[data-theme="dark"] .import-errors-list,
:root[data-theme="dark"] .ra-log-item.error,
:root[data-theme="dark"] .btn-ghost-danger:hover:not(:disabled),
:root[data-theme="dark"] .btn-table-action.btn-delete:hover { background: #2e1717; }
:root[data-theme="dark"] .info-card.danger { background: #2e1717; border-color: #542020; color: #f87171; }
:root[data-theme="dark"] .status-erro,
:root[data-theme="dark"] .status-badge.nao-resolvida { background: #2e1717; color: #f87171; }
:root[data-theme="dark"] .coverage-check.excluded { background: #2e1717 !important; color: #f87171 !important; }

/* ---- Info (azul) ---- */
:root[data-theme="dark"] .stat-card-icon.info,
:root[data-theme="dark"] .timeline-item[data-type="MENSAGEM_CLIENTE"] .timeline-icon,
:root[data-theme="dark"] .chain-current,
:root[data-theme="dark"] .modal-confirm-icon.info,
:root[data-theme="dark"] .data-table tbody tr.selected:hover,
:root[data-theme="dark"] .btn-table-action.btn-view:hover { background: #12222f; color: #60a5fa; }
:root[data-theme="dark"] .info-card.info,
:root[data-theme="dark"] .alert-info { background: #12222f; border-color: #1c3a52; color: #60a5fa; }
:root[data-theme="dark"] .status-badge.aberta { background: #12222f; color: #60a5fa; }
:root[data-theme="dark"] .unread-row,
:root[data-theme="dark"] .row-unread { background: #12222f !important; }
:root[data-theme="dark"] .unread-row:hover,
:root[data-theme="dark"] .row-unread:hover { background: #16293b !important; }

/* ---- Textos de status sobre tinta (fundo já herda o token) ---- */
:root[data-theme="dark"] .badge-success-subtle { color: #4ade80; }
:root[data-theme="dark"] .tribunal-tag { color: #60a5fa; }

/* ---- Índigo / roxo ---- */
:root[data-theme="dark"] .status-badge.respondida { background: #1a2033; color: #a5b4fc; }
:root[data-theme="dark"] .attachment-generated .attachment-icon { background: #221a35; color: #c4b5fd; }

/* ---- Neutros (pipeline pulado) ---- */
:root[data-theme="dark"] .pipeline-step.skipped .pipeline-dot { background: var(--gray-200); border-color: var(--gray-200); }
:root[data-theme="dark"] .pipeline-step.skipped::after { background: var(--gray-100); }

/* ---- Scrollbar sutil no dark ---- */
:root[data-theme="dark"] ::-webkit-scrollbar { width: 10px; height: 10px; }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #33363a; border-radius: 6px; }
:root[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }
