/* Load after the legacy and Aurora stylesheets. All values below describe roles, not pages. */
body[data-theme="aurora"] {
  --ui-canvas:#f3f7ff;--ui-sidebar:#f0f6ff;--ui-surface:#ffffff;--ui-surface-muted:#edf3ff;--ui-surface-raised:#fbfdff;--ui-hover:#e5edff;
  --ui-text:#14244b;--ui-text-secondary:#3d557c;--ui-text-muted:#62779e;--ui-link:#305fd3;--ui-border:#dce6f8;--ui-border-strong:#bfcdea;
  --ui-accent:#4166ed;--ui-accent-hover:#2b4bd4;--ui-on-accent:#ffffff;--ui-focus:#7951de;--ui-shadow:0 8px 26px #24407815;
  --ui-success:#21724e;--ui-success-bg:#e8f6ee;--ui-warning:#955c13;--ui-warning-bg:#fff3dd;--ui-danger:#ae3f47;--ui-danger-bg:#fff0f0;
  --ui-creation:#7546d9;--ui-acquisition:#00899d;--ui-sales:#be6316;--ui-distribution:#315bce;--ui-green:#247450;
}
body[data-theme="light"] {
  --ui-canvas:#f8f9fc;--ui-sidebar:#ffffff;--ui-surface:#ffffff;--ui-surface-muted:#f0f2f7;--ui-surface-raised:#ffffff;--ui-hover:#e9eef7;
  --ui-text:#202532;--ui-text-secondary:#424c60;--ui-text-muted:#667186;--ui-link:#2255b8;--ui-border:#d9dfe9;--ui-border-strong:#b7c2d3;
  --ui-accent:#294eae;--ui-accent-hover:#183c96;--ui-on-accent:#ffffff;--ui-focus:#7149d4;--ui-shadow:0 8px 24px #1b25400f;
  --ui-success:#176c49;--ui-success-bg:#e8f5ed;--ui-warning:#87520f;--ui-warning-bg:#fff1d8;--ui-danger:#aa343f;--ui-danger-bg:#ffebed;
  --ui-creation:#6741bb;--ui-acquisition:#087b86;--ui-sales:#af5b18;--ui-distribution:#2651b4;--ui-green:#1c6746;
}
body[data-theme="dark"] {
  color-scheme:dark;
  --ui-canvas:#111827;--ui-sidebar:#172238;--ui-surface:#1d2a40;--ui-surface-muted:#25364f;--ui-surface-raised:#22324b;--ui-hover:#304260;
  --ui-text:#f2f6ff;--ui-text-secondary:#d5e0f2;--ui-text-muted:#aabbd4;--ui-link:#9bbcff;--ui-border:#394b66;--ui-border-strong:#59708d;
  --ui-accent:#a1b7ff;--ui-accent-hover:#c3d0ff;--ui-on-accent:#17223e;--ui-focus:#cfadff;--ui-shadow:0 12px 30px #050b1990;
  --ui-success:#7ce0af;--ui-success-bg:#1b4438;--ui-warning:#ffd287;--ui-warning-bg:#493922;--ui-danger:#ffadb5;--ui-danger-bg:#4b2730;
  --ui-creation:#c4a5ff;--ui-acquisition:#7ce1ea;--ui-sales:#ffc28a;--ui-distribution:#a5c2ff;--ui-green:#82dbad;
}
body[data-theme] {--ui-module-accent:var(--ui-accent);--ink:var(--ui-text);--muted:var(--ui-text-muted);--line:var(--ui-border);--green:var(--ui-accent);--accent:var(--ui-accent);color:var(--ui-text)!important;background:var(--ui-canvas)!important}
body[data-theme][data-module="creation"]{--ui-module-accent:var(--ui-creation)}
body[data-theme][data-module="acquisition"]{--ui-module-accent:var(--ui-acquisition)}
body[data-theme][data-module="sales"]{--ui-module-accent:var(--ui-sales)}
body[data-theme][data-module="distribution"]{--ui-module-accent:var(--ui-distribution)}
body[data-theme][data-module="green"]{--ui-module-accent:var(--ui-green)}

body[data-theme] #workspace{background:var(--ui-canvas)!important;color:var(--ui-text)!important}
body[data-theme] #workspace .sidebar{background:var(--ui-sidebar)!important;border-color:var(--ui-border)!important;color:var(--ui-text)}
body[data-theme] #workspace .brand-wordmark,body[data-theme] #workspace .breadcrumb strong{color:var(--ui-text)!important}
body[data-theme] #workspace :is(.brand-wordmark small,.aurora-nav-heading,.nav-caption,.breadcrumb,.sidebar-bottom){color:var(--ui-text-muted)!important}
body[data-theme] #workspace .nav{color:var(--ui-text-secondary)!important;background:transparent!important}
body[data-theme] #workspace .nav.aurora-subnav{color:var(--ui-text-muted)!important}
body[data-theme] #workspace .nav:hover:not(.active){background:var(--ui-hover)!important;color:var(--ui-text)!important}
body[data-theme] #workspace .nav.active{background-color:var(--ui-module-accent)!important;background-image:none!important;color:var(--ui-on-accent)!important;border-color:transparent!important;box-shadow:var(--ui-shadow)!important}
body[data-theme] #workspace main,body[data-theme] #workspace main>header{background:var(--ui-canvas)!important;color:var(--ui-text)!important}
body[data-theme] #workspace main>header{background:var(--ui-surface)!important;border-color:var(--ui-border)!important}
body[data-theme] #workspace :is(.card,.sp-card,.stats article,.ac-project,.cr-panel,.terminal-package,.digital-create-card){background:var(--ui-surface)!important;border-color:var(--ui-border)!important;color:var(--ui-text)!important;box-shadow:var(--ui-shadow)!important}
body[data-theme] #workspace :is(.card,.sp-card,.stats article) :is(h1,h2,h3,strong){color:var(--ui-text)!important}
body[data-theme] #workspace :is(.muted,.cell-sub,.stats p,.stats small,.steps p,.capability>p,.instructions p){color:var(--ui-text-muted)!important}
body[data-theme] #workspace :is(.page-heading,.page-heading h1,.content,.card p:not(.muted)){color:var(--ui-text)}
body[data-theme] #workspace :is(input,select,textarea){background:var(--ui-surface-raised)!important;border-color:var(--ui-border-strong)!important;color:var(--ui-text)!important}
body[data-theme] :is(input,select,textarea)::placeholder{color:var(--ui-text-muted)!important;opacity:1}
body[data-theme] :is(label,legend){color:var(--ui-text-secondary)!important}
body[data-theme] :is(input,select,textarea):focus{border-color:var(--ui-focus)!important}
body[data-theme] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--ui-focus)!important;outline-offset:3px}
body[data-theme] #workspace :is(button.primary,.primary),body[data-theme] dialog :is(button.primary,.primary){background:var(--ui-module-accent)!important;color:var(--ui-on-accent)!important;border:1px solid var(--ui-module-accent)!important;box-shadow:none!important}
body[data-theme] #workspace :is(button.primary,.primary):hover{filter:brightness(.93)}
body[data-theme] #workspace :is(button.secondary,.secondary),body[data-theme] dialog :is(button.secondary,.secondary){background:var(--ui-surface-raised)!important;color:var(--ui-module-accent)!important;border:1px solid var(--ui-border-strong)!important}
body[data-theme] #workspace :is(.text-button,a){color:var(--ui-link)!important}
body[data-theme] #workspace table{color:var(--ui-text)!important}
body[data-theme] #workspace :is(th,thead td){background:var(--ui-surface-muted)!important;color:var(--ui-text-secondary)!important;border-color:var(--ui-border)!important}
body[data-theme] #workspace td{background:var(--ui-surface)!important;color:var(--ui-text-secondary)!important;border-color:var(--ui-border)!important}
body[data-theme] #workspace tbody tr:hover td{background:var(--ui-hover)!important}
body[data-theme] dialog{background:var(--ui-surface)!important;color:var(--ui-text)!important;border:1px solid var(--ui-border-strong)!important;box-shadow:var(--ui-shadow)!important}
body[data-theme] dialog :is(h1,h2,h3,p:not(.muted)){color:var(--ui-text)!important}
body[data-theme] dialog .muted{color:var(--ui-text-muted)!important}
body[data-theme] dialog::backdrop{background:#0b1025a8}
body[data-theme] #workspace :is(.notice,.empty,pre,.ac-facts div,.ac-ai,.digital-upload){background:var(--ui-surface-muted)!important;color:var(--ui-text-secondary)!important;border-color:var(--ui-border)!important}
body[data-theme] #workspace :is(.tag,.toast){background:var(--ui-success-bg)!important;color:var(--ui-success)!important}
body[data-theme] #workspace :is(.tag.warning,.warning){background:var(--ui-warning-bg)!important;color:var(--ui-warning)!important}
body[data-theme] #workspace :is(.tag.danger,.error){background:var(--ui-danger-bg)!important;color:var(--ui-danger)!important;border-color:var(--ui-danger)!important}
#sales-dialog .error:not(:empty){background:var(--ui-danger-bg,#fff0f0)!important;color:var(--ui-danger,#ac4242)!important;border-color:var(--ui-danger,#ac4242)!important}
body[data-theme] #workspace :is(.console-hero,.aurora-welcome){background:var(--ui-surface-muted)!important;border:1px solid var(--ui-border)!important;color:var(--ui-text)!important}
body[data-theme] #workspace .console-hero :is(h1,h2){color:var(--ui-text)!important}
body[data-theme] #workspace .console-hero :is(.eyebrow,.muted),body[data-theme] #workspace footer{color:var(--ui-text-muted)!important}
