/* Destaques legíveis nos dois temas, inclusive com striping/hover do DataTables. */
:root{--workflow-red-bg:#fce7e8;--workflow-red-text:#781e29;--workflow-green-bg:#e1f3e6;--workflow-green-text:#175332}
[data-bs-theme="dark"]{--workflow-red-bg:#48232b;--workflow-red-text:#ffdce1;--workflow-green-bg:#203e2d;--workflow-green-text:#d5f7df}
table.dataTable tbody tr.workflow-red>td,.history-result.workflow-red{background:var(--workflow-red-bg)!important;color:var(--workflow-red-text)!important;box-shadow:none!important}
table.dataTable tbody tr.workflow-green>td,.history-result.workflow-green{background:var(--workflow-green-bg)!important;color:var(--workflow-green-text)!important;box-shadow:none!important}
table.dataTable tbody tr.workflow-red a,table.dataTable tbody tr.workflow-green a{color:inherit;text-decoration:underline}
table.dataTable tbody tr.workflow-red .row-delete,table.dataTable tbody tr.workflow-green .row-delete{color:inherit}
.document-alert{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-weight:600}
.alert-dot{display:inline-block;width:13px;height:13px;border-radius:50%;border:1px solid currentColor;flex-shrink:0}
.document-alert.red .alert-dot{background:#e24848}.document-alert.yellow .alert-dot{background:#f3c548}.document-alert.green .alert-dot{background:#40ac6a}
.history-result{padding:16px;border-radius:10px}.result-label{display:inline-block;font-weight:600;margin-left:12px}

/* Histórico cronológico: uma seção por passagem de etapa. */
.process-history {scroll-margin-top:100px}
.history-stage {margin-top:24px}
.history-stage h3 {font-size:1rem;margin:0 0 12px}
.history-events {list-style:none;margin:0;padding:0 0 0 16px;border-left:2px solid var(--bs-border-color,#52634e)}
.history-event {padding:14px 16px;margin:0 0 10px;border:1px solid var(--bs-border-color,#52634e);border-radius:10px;overflow-wrap:anywhere}
.history-event-heading,.history-event-meta {display:flex;gap:8px 18px;flex-wrap:wrap;align-items:center}
.history-event-meta {font-size:.85rem;margin-top:6px;opacity:.85}
.history-extra {font-size:.8rem;margin-top:8px}
.history-extra summary {cursor:pointer;opacity:.75}
.history-extra p {margin:8px 0 0}
@media(max-width:600px){.history-events{padding-left:10px}.history-event{padding:12px}.history-event-meta{display:grid;gap:5px}}
