/* Shared theme for the main shell, agent shell and embedded core pages.
   Override --suite-* for brand variants. No layout, permissions or navigation changes. */
:root {
  --suite-sidebar:#302753;
  --suite-sidebar-bottom:#27213f;
  --suite-sidebar-selected:#4b416d;
  --suite-primary:#6255d9;
  --suite-primary-hover:#5144bf;
  --suite-primary-soft:#f0edff;
  --suite-primary-line:#d9d2fa;
  --suite-canvas:#f4f5fa;
  --suite-surface:#fff;
  --suite-surface-muted:#f8f9fc;
  --suite-line:#e4e7ef;
  --suite-text:#243044;
  --suite-muted:#627089;
  --bg:var(--suite-canvas);
  --surface:var(--suite-surface);
  --surface-2:var(--suite-surface-muted);
  --ink:var(--suite-text);
  --text:var(--suite-text);
  --muted:var(--suite-muted);
  --line:var(--suite-line);
  --accent:var(--suite-primary);
  --accent-strong:var(--suite-primary-hover);
  --accent-2:#7057e8;
  --purple:var(--suite-sidebar);
  --purple-deep:var(--suite-sidebar-bottom);
}

/* Purple is confined to navigation. Work surfaces stay white. */
body .sidebar {
  --sidebar-ink:#fff; --sidebar-muted:#ded5f7; --sidebar-icon:#f0eaff; --sidebar-gold:#ded5f7;
  color:#fff; border-right-color:transparent;
  background:linear-gradient(180deg,var(--suite-sidebar),var(--suite-sidebar-bottom)); box-shadow:none;
}
.agent-shell .agent-sidebar {
  --sidebar-ink:#fff; --sidebar-muted:#ded5f7; --sidebar-icon:#f0eaff; --sidebar-gold:#ded5f7;
  color:#fff; border-right-color:rgba(255,255,255,.08);
  background:radial-gradient(circle at 16% 4%,rgba(134,111,225,.22),transparent 24%),radial-gradient(circle at 86% 68%,rgba(74,122,191,.13),transparent 28%),linear-gradient(180deg,#30284f 0%,#292342 48%,#211c37 100%);
  box-shadow:12px 0 32px rgba(30,24,55,.12);
}
.agent-sidebar .agent-menu-icon { color:var(--menu-icon-color,#dcd4ff); text-shadow:none; font-weight:500; }
.agent-sidebar .agent-menu-group.is-open { background:rgba(255,255,255,.035); }
.agent-sidebar .agent-menu-parent:hover,.agent-sidebar .agent-menu-parent:focus-visible { background:rgba(255,255,255,.09); }
.agent-sidebar .agent-submenu button { border-radius:9px; color:rgba(239,234,255,.76); }
.agent-sidebar .agent-submenu button.is-active { color:#fff; background:linear-gradient(90deg,rgba(117,91,204,.42),rgba(255,255,255,.075)); box-shadow:inset 2px 0 #e7ca78; }
body .sidebar .nav-item,body .sidebar .nav-download-link,body .sidebar .operations-nav-toggle,
body .sidebar :is(.data-market-subnav-item,.handbook-subnav-item,.listing-subnav-item,.erp-order-subnav-item,.operations-nav-item) { color:#eee8ff; }
body .sidebar .nav-item.active,
body .sidebar :is(.data-market-subnav-item,.handbook-subnav-item,.listing-subnav-item,.erp-order-subnav-item,.operations-nav-item).active {
  color:#fff; border-color:transparent; background:var(--suite-sidebar-selected); box-shadow:inset 3px 0 #dfbf70; backdrop-filter:none;
}
body .sidebar .nav-item.active::before,
body .sidebar :is(.data-market-nav-toggle,.handbook-nav-toggle,.listing-nav-toggle,.erp-order-nav-toggle,.operations-nav-toggle) b { color:#eee8ff; }
body .sidebar .nav-section-label,body .sidebar .brand > div:last-child span { color:#ded5f7; text-shadow:none; }

body .workspace,html.agent-embedded-view body,.agent-shell .agent-workspace { background:var(--suite-canvas); }
body .workspace > .workspace-taskbar,body .workspace > .topbar,.agent-shell .agent-topbar {
  background:var(--suite-surface); border-color:var(--suite-line); box-shadow:0 1px 3px #24304405;
}
.agent-topbar .agent-tabs { background:var(--suite-surface-muted); border-radius:8px; }
.agent-topbar .agent-tab { border-radius:6px; }
.agent-topbar .agent-tab.is-active,body .workspace-task-tab-shell.active {
  background:var(--suite-primary-soft); border-color:var(--suite-primary-line); color:var(--suite-primary); box-shadow:inset 0 -2px var(--suite-primary);
}
body .workspace-task-tab-shell.active .workspace-task-tab,body .workspace-task-tab-shell.active .workspace-task-tab i { color:var(--suite-primary); }
.agent-topbar .agent-tab:hover,.agent-topbar .agent-tabs-scroll:hover { background:var(--suite-primary-soft); }
.agent-topbar .agent-tabs-scroll { color:var(--suite-muted); }
.agent-topbar .action-divider { background:var(--suite-line); }
.agent-topbar .download-action { border-color:var(--suite-line); }
.agent-topbar .download-action[aria-expanded="true"] { color:var(--suite-primary); border-color:var(--suite-primary-line); background:var(--suite-primary-soft) !important; }

/* Semantic danger/warning/success variants are deliberately not recolored. */
.agent-workspace .button.query,.agent-workspace .button.sync,.agent-workspace .manual-search-button,.agent-workspace #agentManagedStoreQuery,
body .workspace .primary-button:not(.danger-button):not(.danger) {
  color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); box-shadow:none;
}
.agent-workspace .button.outline { border-color:var(--suite-primary-line); color:var(--suite-primary); background:#fff; }
.agent-workspace .button.secondary,body .workspace .secondary-button { color:var(--suite-text); border-color:var(--suite-line); background:#fff; box-shadow:none; }
.agent-workspace :is(.button.query,.button.sync):hover:not(:disabled),body .workspace .primary-button:not(.danger-button):not(.danger):hover:not(:disabled) { background:var(--suite-primary-hover); }
.agent-shell :is(button,a,input,select):focus-visible,body .workspace :is(button,a,input,select,textarea):focus-visible { outline:2px solid var(--suite-primary); outline-offset:2px; }
.agent-sidebar :is(button,a):focus-visible,body .sidebar :is(button,a):focus-visible { outline:2px solid #eee8ff; outline-offset:-2px; }
.agent-workspace :is(input,select,textarea),body .workspace :is(input,select,textarea) { accent-color:var(--suite-primary); }
.agent-workspace .field :is(input,select),.agent-workspace .date-range { border-color:var(--suite-line); border-radius:6px; }
.agent-workspace :is(.order-filter-card,.order-status-card,.order-table-card,.summary-filter-card,.summary-table-card,.manual-listing-table-card) { background:#fff; border-color:var(--suite-line); box-shadow:0 2px 8px #24304404; }
.agent-workspace .order-filter-card { border-top-color:var(--suite-primary-line); }
.agent-workspace :is(.order-table,.summary-table) th { background:var(--suite-surface-muted); color:var(--suite-text); }
.agent-workspace .order-list-footer,.agent-workspace .order-total-strip,.agent-workspace .summary-total-strip { background:#fff; border-color:var(--suite-line); }
.agent-workspace .order-status-card button.is-active { color:var(--suite-primary); }
.agent-workspace .order-status-card button.is-active::after { background:var(--suite-primary); }
.agent-workspace .order-status-card button.is-active b,.agent-workspace .pagination b,.agent-workspace .system-store-table-card footer b { color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); }
.agent-workspace .batch-actions button:not(:disabled) { color:var(--suite-primary); background:var(--suite-primary-soft); }

/* Download guidance follows the same shell theme. */
/* Action hierarchy: one solid primary, quiet secondary actions, explicit danger.
   Do not target financial results, order-status badges or platform brand marks. */
.agent-workspace .manual-action {
  color:var(--suite-primary); border:1px solid var(--suite-primary-line);
  background:var(--suite-primary-soft); border-radius:9px; box-shadow:none;
}
.agent-workspace .manual-action i { color:inherit; background:#ffffff80; border-radius:7px; }
.agent-workspace .manual-action small { color:inherit; opacity:.85; }
.agent-workspace .manual-action.green { color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); }
.agent-workspace .manual-action:is(.red,.amber) { color:#b63549; border-color:#f2cdd4; background:#fff0f2; }
.agent-workspace .manual-action:hover:not(:disabled):not([aria-disabled="true"]) { border-color:var(--suite-primary); box-shadow:0 3px 9px #30275312; }
.agent-workspace .manual-action.green:hover:not(:disabled) { background:var(--suite-primary-hover); }
.agent-workspace .manual-action:is(.red,.amber):hover:not(:disabled) { border-color:#d98595; background:#ffe5e9; }
.agent-workspace .manual-status-card button.is-active { color:var(--suite-primary); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); box-shadow:inset 0 -2px var(--suite-primary); }
.agent-workspace .manual-status-card button.is-active :is(.status-icon,b) { color:var(--suite-primary); background:#e2dcfc; }
.agent-workspace .button:not(:disabled):not([aria-disabled="true"]):hover,
body .workspace .secondary-button:not(:disabled):hover { box-shadow:0 3px 9px #30275312; }
.agent-workspace .button.secondary:hover:not(:disabled),body .workspace .secondary-button:hover:not(:disabled) { border-color:var(--suite-primary-line); background:var(--suite-surface-muted); }
body .agent-reference-drawer .od-dispatch button { color:#fff; background:var(--suite-primary); }
body .agent-reference-drawer .od-metadata span { color:var(--suite-primary); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }

.agent-topbar .agent-plugin-popover,.agent-topbar .agent-plugin-popover::before { background:#fff; border-color:var(--suite-line); }
.agent-topbar .agent-plugin-stage { background:var(--suite-surface-muted); border-color:var(--suite-line); }
.agent-topbar :is(.agent-plugin-heading > span,.agent-plugin-address button,.agent-plugin-collector a) { color:var(--suite-primary) !important; background:var(--suite-primary-soft) !important; }
.agent-topbar :is(.agent-plugin-heading small,.agent-plugin-stage > small,.agent-plugin-collector summary span) { color:var(--suite-primary); }
.agent-topbar .agent-plugin-primary,.agent-topbar .agent-plugin-stage-icon { background:var(--suite-primary) !important; }
.agent-topbar .agent-plugin-stage.success .agent-plugin-stage-icon { background:#26976d !important; }
.agent-topbar .agent-plugin-release { background:#fff; }

/* Core cards, including those embedded in the agent shell. The live-screen
   and specialized image-preview canvases keep their independent palettes. */
body .workspace .panel { border-color:var(--suite-line); background:#fff; box-shadow:0 2px 10px #24304405; }

/* Embedded business modules share the shell palette, not the legacy gold/teal
   decoration. Scope selectors to presentation surfaces; status colors survive. */
body .workspace :is(.store-auth-hero,.billing-page-heading,.admin-page-heading) {
  color:var(--suite-text); border-color:var(--suite-primary-line);
  background:linear-gradient(115deg,#fff,var(--suite-primary-soft));
  box-shadow:0 4px 16px #24304406;
}
body .workspace .store-auth-hero::before { background:none; }
body .workspace .store-auth-hero :is(h2,p:last-child) { color:var(--suite-text); }
body .workspace :is(.store-auth-hero,.billing-page-heading,.admin-page-heading) .eyebrow { color:var(--suite-primary); }
body .workspace :is(.store-auth-card.active,.store-auth-method.active) {
  border-color:var(--suite-primary-line); background:var(--suite-primary-soft); box-shadow:none;
}
body .workspace .store-auth-card-icon { color:#fff; background:var(--suite-primary); }

/* AI workflow: purple denotes choices, green still denotes completed work. */
/* The older workflow polish marks step colors important; match that priority. */
body .workspace .ai-stepper { border-color:var(--suite-primary-line) !important; background:var(--suite-surface-muted) !important; }
body .workspace :is(.ai-step.active,.ai-step.done) { color:var(--suite-primary) !important; background:var(--suite-primary-soft) !important; }
body .workspace :is(.ai-step.active,.ai-step.done) strong { color:#fff !important; background:var(--suite-primary) !important; box-shadow:none !important; }
body .workspace .ai-thinking-panel:not([data-state="error"]):not([data-state="warning"]) {
  border-color:var(--suite-primary-line); background:linear-gradient(110deg,var(--suite-primary-soft),#fff); box-shadow:0 4px 16px #6255d908;
}
body .workspace .ai-thinking-orbit {
  color:var(--suite-primary); border-color:var(--suite-primary-line);
  background:radial-gradient(circle,#fff,var(--suite-primary-soft)); box-shadow:0 0 18px #6255d914;
}
body .workspace .ai-thinking-orbit i { background:var(--suite-primary); }
body .workspace .ai-thinking-copy .eyebrow { color:var(--suite-primary); }
body .workspace .ai-thinking-copy strong { color:var(--suite-text); }
body .workspace .ai-thinking-copy > span:last-child { color:var(--suite-muted); }
body .workspace .ai-thinking-steps > span:not(.done):not(.active) { color:var(--suite-muted); border-color:var(--suite-line); background:#fff; }
body .workspace .ai-thinking-steps > span:not(.done):not(.active) i { background:#c3c9d5; }
body .workspace .ai-thinking-steps > span.active { color:var(--suite-primary); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); box-shadow:none; }
body .workspace .ai-thinking-steps > span.active i { background:var(--suite-primary); }
body .workspace .ai-mode-workbench {
  border-color:var(--suite-primary-line); background:linear-gradient(135deg,var(--suite-primary-soft),#f8f9fc 65%,#fff); box-shadow:0 5px 18px #24304406;
}
body .workspace .ai-mode-heading .eyebrow { color:var(--suite-primary); }
body .workspace :is(.ai-output-scope,.ai-product-mode) > span,
body .workspace .ai-mode-sequence-label { color:var(--suite-muted); }
body .workspace :is(.ai-output-scope,.ai-product-mode) > span b,
body .workspace .ai-mode-sequence-label b { color:#fff; background:var(--suite-primary); }
body .workspace :is(.ai-output-scope,.ai-product-mode) button { color:var(--suite-text); border-color:var(--suite-line); background:#fff; box-shadow:none; }
body .workspace :is(.ai-output-scope,.ai-product-mode) button strong { color:var(--suite-text); }
body .workspace :is(.ai-output-scope,.ai-product-mode) button small { color:var(--suite-muted); }
body .workspace :is(.ai-output-scope,.ai-product-mode) button.active {
  color:var(--suite-primary); border-color:var(--suite-primary); background:#fff; box-shadow:inset 4px 0 var(--suite-primary);
}
body .workspace :is(.ai-output-scope,.ai-product-mode) button.active strong { color:var(--suite-primary); }
body .workspace .ai-generation-modes button { --mode-rgb:98,85,217; --mode-color:var(--suite-primary); box-shadow:0 3px 10px #24304406; }
body .workspace .ai-generation-modes button.active { border-color:var(--suite-primary); background:var(--suite-primary-soft); box-shadow:0 3px 12px #6255d910; }
body .workspace :is(.ai-reference-mode-summary,.ai-manual-controls,.ai-sku-strip) { color:var(--suite-muted); border-color:var(--suite-primary-line); background:#fff; }
body .workspace .ai-reference-mode-summary strong { color:var(--suite-primary); background:var(--suite-primary-soft); }

/* Calculator navigation and explanatory surfaces; financial outcomes unchanged. */
body .workspace .profit-calculator-panel .panel-header { border-color:var(--suite-line); }
body .workspace .profit-calculator-panel > .panel-header::after { background:linear-gradient(90deg,transparent,var(--suite-primary)); }
body .workspace .profit-calculator-panel .panel-eyebrow { color:var(--suite-primary); }
body .workspace .profit-tool-tabs { border-color:var(--suite-line); background:var(--suite-surface-muted); box-shadow:none; }
body .workspace .profit-tool-tabs button { color:var(--suite-text); border-color:var(--suite-line); background:#fff; box-shadow:0 2px 8px #24304405; }
body .workspace .profit-tool-tabs button::after { background:var(--suite-primary); }
body .workspace .profit-tool-tabs button i { color:var(--suite-primary); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); box-shadow:none; }
body .workspace .profit-tool-tabs button small { color:var(--suite-muted); }
body .workspace .profit-tool-tabs button:hover { border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }
body .workspace .profit-tool-tabs button.active { color:var(--suite-primary); border-color:var(--suite-primary); background:var(--suite-primary-soft); box-shadow:0 3px 12px #6255d914; }
body .workspace .profit-tool-tabs button.active i { color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); }
body .workspace .profit-tool-tabs button.active small { color:var(--suite-primary); }
body .workspace .profit-tool-section { border-color:var(--suite-line); background:#fff; box-shadow:0 4px 16px #24304406; }
body .workspace .profit-section-heading { border-color:var(--suite-line); }
body .workspace .profit-section-heading > div::before { background:var(--suite-primary); }
body .workspace .profit-section-heading strong { color:var(--suite-text); }
body .workspace .profit-section-heading span { color:var(--suite-muted); }
body .workspace :is(.profit-data-note,.profit-carrier-rate-note,.profit-return-formula) { color:var(--suite-muted); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }
body .workspace .profit-return-formula :is(span,strong) { color:var(--suite-primary); }
body .workspace .profit-commission-match[data-state="waiting"] { color:var(--suite-muted); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }
body .workspace .profit-commission-match[data-state="waiting"] strong { color:var(--suite-text); }
body .workspace .profit-commission-match[data-state="waiting"] i { color:#fff; background:var(--suite-primary); box-shadow:none; }

/* Billing amounts and payment-method selection use the same accent. */
body .workspace .billing-account-grid article { border-color:var(--suite-line); background:#fff; box-shadow:0 3px 12px #24304405; }
body .workspace .billing-account-grid .billing-balance-card { border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }
body .workspace .billing-balance-card :is(span,small) { color:var(--suite-muted); }
body .workspace .billing-balance-card strong { color:var(--suite-primary); }
body .workspace .billing-payment-methods button { color:var(--suite-text); border-color:var(--suite-line); background:var(--suite-surface-muted); }
body .workspace .billing-payment-methods button.active { color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); }
body .workspace .billing-qr-stage { border-color:var(--suite-line); background:var(--suite-surface-muted); }
body .workspace .billing-qr-stage div { color:var(--suite-muted); }

/* The real software overview is embedded as the agent-shell home page. Keep its
   data and layout intact while matching the shared blue-violet workspace skin. */
html.agent-embedded-view body [data-home-classic] :is(.overview-welcome-panel,.overview-playbook-card,.overview-quick-panel,.overview-learning-panel) {
  border-color:var(--suite-line); background:#fff; box-shadow:0 3px 14px #24304408;
}
html.agent-embedded-view body [data-home-classic] .overview-account-kpis > div {
  border-color:var(--suite-line); background:var(--suite-surface-muted);
}
html.agent-embedded-view body [data-home-classic] .overview-account-kpis strong,
html.agent-embedded-view body [data-home-classic] .overview-banner-kicker { color:var(--suite-primary); }
html.agent-embedded-view body [data-home-classic] .overview-playbook-card > header > span {
  color:#fff; border-color:var(--suite-primary); background:var(--suite-primary);
}
html.agent-embedded-view body [data-home-classic] :is(.overview-playbook-card.playbook-start,.overview-playbook-card.playbook-operate,.overview-playbook-card.playbook-grow) {
  background:linear-gradient(145deg,var(--suite-primary-soft),#fff 58%);
}
html.agent-embedded-view body [data-home-classic] .overview-playbook-actions button {
  border-color:var(--suite-line); background:#fff;
}
html.agent-embedded-view body [data-home-classic] :is(.overview-playbook-actions button::before,.playbook-operate .overview-playbook-actions button::before,.playbook-grow .overview-playbook-actions button::before) { background:var(--suite-primary); }
html.agent-embedded-view body [data-home-classic] .overview-playbook-actions button:hover {
  border-color:var(--suite-primary-line); background:var(--suite-primary-soft);
}
html.agent-embedded-view body [data-home-classic] .overview-workflow-motion,
html.agent-embedded-view body [data-home-classic] .overview-course-visual {
  border-color:var(--suite-primary-line); background:linear-gradient(145deg,#30256d,#171c3f 58%,#20275b);
}
html.agent-embedded-view body [data-home-classic] :is(.workflow-motion-head > span > i,.workflow-route-progress) { background:var(--suite-primary); }
html.agent-embedded-view body [data-home-classic] .workflow-product-visual { color:#ded8ff; border-color:#897bea; background:#6255d933; }
html.agent-embedded-view body [data-home-classic] .workflow-route-spark { border-color:#f0edff; background:#897bea; }
html.agent-embedded-view body [data-home-classic] .overview-web-shortcuts .shortcut-card {
  --shortcut-accent:var(--suite-primary); --shortcut-soft:var(--suite-primary-soft); --shortcut-line:var(--suite-primary-line);
  border-color:var(--suite-line); background:#fff;
}
html.agent-embedded-view body [data-home-classic] .overview-web-shortcuts .shortcut-card:hover {
  color:var(--suite-text); border-color:var(--suite-primary-line); background:var(--suite-primary-soft); box-shadow:0 10px 24px #6255d912;
}
html.agent-embedded-view body [data-home-classic] .overview-web-shortcuts .shortcut-card > i,
html.agent-embedded-view body [data-home-classic] .overview-web-shortcuts .shortcut-listing > i {
  color:#fff; border-color:#ffffff33; background:linear-gradient(145deg,#8173eb,var(--suite-primary)); box-shadow:0 8px 17px #6255d926;
}
html.agent-embedded-view body [data-home-classic] .overview-web-shortcuts .shortcut-listing { border-color:var(--suite-primary-line); background:var(--suite-primary-soft); }
html.agent-embedded-view body [data-home-classic] .overview-quick-panel > header i,
html.agent-embedded-view body [data-home-classic] .overview-learning-panel > header i { background:var(--suite-primary); }
html.agent-embedded-view body [data-home-classic] .overview-course-copy > div > span { color:var(--suite-primary); background:var(--suite-primary-soft); }
html.agent-embedded-view body [data-home-classic] .overview-course-copy > button { color:#fff; border-color:var(--suite-primary); background:var(--suite-primary); }
html.agent-embedded-view body [data-home-classic] .overview-course-copy > button:hover { border-color:var(--suite-primary-hover); background:var(--suite-primary-hover); }

/* Administration metrics and module switcher are decorative, not role gates. */
body .workspace .admin-metric-grid > div { border-color:var(--suite-line); background:#fff; box-shadow:0 3px 12px #24304405; }
body .workspace .admin-metric-grid > div::after { background:var(--suite-primary-soft); }
body .workspace .admin-module-switch { border-color:var(--suite-line); background:var(--suite-surface-muted); }
body .workspace .admin-module-switch button.active { color:var(--suite-primary); background:var(--suite-primary-soft); box-shadow:none; }
body .workspace .admin-module-switch button.active i { color:#fff; background:var(--suite-primary); box-shadow:none; }
