/* Smart Fin Reports — 5.4.9.20 Dark Financial Semantics
   Scope: dark-mode negative figures and ECL status shading only.
   This layer does not modify text, signs, dimensions, spacing, cards or calculations. */

/* Negative values: the renderer adds .sfr-negative-value without changing text,
   therefore the original minus sign remains visible. Existing explicit semantic
   classes are covered as a fallback. */
body.dark-platform #sfr-platform-root [data-sfr-module-root] .sfr-negative-value,
#sfr-platform-root[data-theme="dark"] [data-sfr-module-root] .sfr-negative-value,
.sfr-platform-root[data-theme="dark"] [data-sfr-module-root] .sfr-negative-value,
.dark #sfr-platform-root [data-sfr-module-root] .sfr-negative-value,
body.dark-platform #sfr-platform-root [data-sfr-module-root] .is-negative > :is(strong,b,[data-value],[data-amount],[data-total]),
#sfr-platform-root[data-theme="dark"] [data-sfr-module-root] .is-negative > :is(strong,b,[data-value],[data-amount],[data-total]),
body.dark-platform #sfr-platform-root [data-sfr-module-root] :is(.sfr-hr-value-negative,td.negative,b.negative,strong.negative),
#sfr-platform-root[data-theme="dark"] [data-sfr-module-root] :is(.sfr-hr-value-negative,td.negative,b.negative,strong.negative){
  color:#f87171!important;
  -webkit-text-fill-color:#f87171!important;
}

/* ECL dark status badges: dark translucent fills, readable light text and an
   inset keyline. Geometry remains unchanged. */
body.dark-platform .sfr-rce-tool .sfr-rce-badge.good,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool .sfr-rce-badge.good,
.dark .sfr-rce-tool .sfr-rce-badge.good,
body.dark-platform .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.good > b,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.good > b{
  background:rgba(16,185,129,.16)!important;
  color:#86efac!important;
  box-shadow:inset 0 0 0 1px rgba(52,211,153,.40)!important;
}
body.dark-platform .sfr-rce-tool .sfr-rce-badge.watch,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool .sfr-rce-badge.watch,
.dark .sfr-rce-tool .sfr-rce-badge.watch,
body.dark-platform .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.watch > b,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.watch > b{
  background:rgba(245,158,11,.16)!important;
  color:#fcd34d!important;
  box-shadow:inset 0 0 0 1px rgba(251,191,36,.40)!important;
}
body.dark-platform .sfr-rce-tool .sfr-rce-badge.risk,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool .sfr-rce-badge.risk,
.dark .sfr-rce-tool .sfr-rce-badge.risk,
body.dark-platform .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.risk > b,
#sfr-platform-root[data-theme="dark"] .sfr-rce-tool :is(.sfr-rce-priority-list,.sfr-rce-validation-list) article.risk > b{
  background:rgba(239,68,68,.16)!important;
  color:#fca5a5!important;
  box-shadow:inset 0 0 0 1px rgba(248,113,113,.42)!important;
}

@media print{
  #sfr-platform-root [data-sfr-module-root] .sfr-negative-value{
    color:#b91c1c!important;
    -webkit-text-fill-color:#b91c1c!important;
  }
}
