/* Jobs and Credit Control follow the device theme; no saved preference. */
@media screen and (prefers-color-scheme: dark) {
  .app-shell:has(.ops-section) {
    --erp-bg:#141414; --erp-panel:#1f1f1f; --erp-sidebar:#181818;
    --erp-ink:#ededed; --erp-muted:#b5b5b5; --erp-line:#3c3c3c;
    --erp-action:#2d7ca6; --erp-soft:#1c303e; --erp-accent-ink:#91c7e8;
    background:var(--erp-bg)!important; color:var(--erp-ink)!important;
    color-scheme:dark;
  }
  .app-shell.unified-learn-theme:has(.ops-section) {
    --erp-action:#32764d; --erp-soft:#203329; --erp-accent-ink:#9dd5af;
  }
  .app-shell .ops-section {color:var(--erp-ink)!important;color-scheme:dark}
  .app-shell .ops-section :is(.ops-summary article,.ops-row,.ops-empty,.ops-form-panel) {
    background:var(--erp-panel)!important; color:var(--erp-ink)!important;
    border-color:var(--erp-line)!important; box-shadow:none!important;
  }
  .app-shell .ops-section :is(h2,label,.ops-person strong,.ops-date strong,.ops-money,.ops-summary strong) {color:var(--erp-ink)!important}
  .app-shell .ops-section :is(.ops-meta,.ops-empty,.ops-summary article>span,.ops-person>span,.ops-date>span) {color:var(--erp-muted)!important}
  #dc-root .ops-section :is(input,select,textarea) {
    background:#242424!important; color:#ededed!important;
    border:1px solid #686868!important; color-scheme:dark;
  }
  #dc-root .ops-section :is(input,textarea)::placeholder {color:#b5b5b5!important;opacity:1}
  #dc-root .ops-section select option {background:#242424;color:#ededed}
  #dc-root .ops-section button {
    background:#272727!important; color:#ededed!important;
    border:1px solid #686868!important;
  }
  #dc-root .ops-section button:hover {background:#333!important;border-color:#929292!important}
  #dc-root .ops-section button.ops-primary {
    background:var(--erp-action)!important;color:#fff!important;border-color:var(--erp-action)!important;
  }
  #dc-root .ops-section button.ops-primary:hover {filter:brightness(1.12)}
  #dc-root .ops-section :is(button,input,select,textarea):focus-visible {
    outline:2px solid var(--erp-accent-ink)!important;outline-offset:3px;
  }
  #dc-root .ops-section button:disabled {opacity:.7}
  .app-shell .ops-section .ops-badge {background:var(--erp-soft)!important;color:var(--erp-accent-ink)!important}
  .app-shell .ops-section :is(.ops-badge.overdue,.ops-error) {
    background:#3c2523!important;color:#ffc0b8!important;border-color:#80514b!important;
  }
  .app-shell .ops-section .ops-badge.complete {background:#203b2b!important;color:#aee3bd!important}
}
