/* Preserve action and status colours after the legacy dark control rules. */
html[data-theme="dark"] body .btn.btn.primary,
html[data-theme="dark"] body .btn-primary.btn-primary,
html[data-theme="dark"] body .quick-status-grid .quick-action.start,
html[data-theme="dark"] body .quick-status-grid .quick-action.reopen {
  background:#2563eb!important;color:#fff!important;border-color:#60a5fa!important;
}
html[data-theme="dark"] body .quick-status-grid .quick-action.waiting,
html[data-theme="dark"] body .btn.btn.warning {
  background:#a94709!important;color:#fff!important;border-color:#fb923c!important;
}
html[data-theme="dark"] body .quick-status-grid .quick-action.resolved,
html[data-theme="dark"] body .quick-status-grid .quick-action.closed,
html[data-theme="dark"] body .workflow-btn.workflow-btn.success,
html[data-theme="dark"] body .btn.btn.success {
  background:#15803d!important;color:#fff!important;border-color:#4ade80!important;
}
html[data-theme="dark"] body .btn.btn.danger,
html[data-theme="dark"] body .btn.btn.danger-soft {
  background:#9f2535!important;color:#fff!important;border-color:#fb7185!important;
}
html[data-theme="dark"] body .btn.btn.secondary {
  background:#193b68!important;color:#bfdbfe!important;border-color:#5288c9!important;
}
html[data-theme="dark"] body :is(.btn,.btn-primary,.quick-action,.workflow-btn) :is(b,strong,small,span) {
  color:inherit!important;
}
html[data-theme="dark"] body :is(.btn.primary,.btn.secondary,.btn.danger,.btn.danger-soft,.btn.success,.btn.warning,.quick-action):hover {
  filter:brightness(1.12);
}
html[data-theme="dark"] body :is(button,a,input,select,textarea):focus-visible {
  outline:2px solid #93c5fd!important;outline-offset:3px;
}
html[data-theme="dark"] body .sidebar nav a.active {
  background:#193b68!important;color:#93c5fd!important;border-left-color:#60a5fa!important;
}
html[data-theme="dark"] body .sidebar nav a:hover {
  background:#172e4c!important;color:#bfdbfe!important;
}
html[data-theme="dark"] body :is(.flash.success,.alert.success,.contract-pill.ma) {
  background:#123e2e!important;color:#86efac!important;border-color:#34d399!important;
}
html[data-theme="dark"] body :is(.flash.warning,.alert.warning) {
  background:#422b11!important;color:#fcd34d!important;border-color:#f59e0b!important;
}
html[data-theme="dark"] body :is(.flash.error,.flash.danger,.alert.error,.contract-pill.expired,.priority-high,.priority-urgent) {
  background:#481f2c!important;color:#fda4af!important;border-color:#fb7185!important;
}
html[data-theme="dark"] body :is(.flash.info,.contract-pill.project) {
  background:#18355d!important;color:#93c5fd!important;border-color:#60a5fa!important;
}
html[data-theme="dark"] body .contract-pill.general {
  background:#30304e!important;color:#c4b5fd!important;border-color:#a78bfa!important;
}
html[data-theme="dark"] body .case-reader .case-timeline-item:is(.event-ai_resolution_analyzed,.event-ai_resolution_reanalyzed) :is(summary,.timeline-title:before) {
  color:#c4b5fd!important;
}
html[data-theme="dark"] body .flash :is(b,strong,small,span,p) {color:inherit!important}
