/* 智枢云OA v1.0.3 · 全局个性主题层。保留状态色、彩色功能分类及原业务布局。 */
:root{--oa-theme-color:#29499a;--oa-theme-ink:#29499a;--oa-theme-dark:#203c84;--oa-theme-bg:#f4f6f9;--oa-theme-soft:#eaf0ff;--oa-theme-line:#dce5ef;--oa-theme-contrast:#fff;--oa-theme-accent:#6baf63}
html[data-oa-palette]{--navy:var(--oa-theme-ink);--navy2:var(--oa-theme-dark);--navy-dark:var(--oa-theme-dark);--blue:var(--oa-theme-color);--blue2:var(--oa-theme-dark);--office-blue:var(--oa-theme-color);--brand-blue:var(--oa-theme-color);--brand-blue-dark:var(--oa-theme-dark);--theme-bg:var(--oa-theme-bg);--theme-line:var(--oa-theme-line);--bg:var(--oa-theme-bg);--line:var(--oa-theme-line);--accent:var(--oa-theme-soft)}
html[data-oa-palette] body{background:var(--oa-theme-bg)}
html[data-oa-palette] :is(.app,.owner-app,.shell) :is(.main,.owner-main){background:var(--oa-theme-bg)}
html[data-oa-palette] :is(.app.hub-portal-active .oa-top-brand,.app:not(.hub-portal-active) .brand,.owner-sidebar .side-brand,.side .side-brand){background:var(--oa-theme-color);color:var(--oa-theme-contrast)}
html[data-oa-palette] :is(.owner-sidebar .side-brand strong,.owner-sidebar .side-brand small,.side .side-brand small,.app:not(.hub-portal-active) .brand small){color:var(--oa-theme-contrast)}
html[data-oa-palette] .oa-top-brand span{color:var(--oa-theme-ink)}
html[data-oa-palette] .brand-mark{background:linear-gradient(135deg,var(--oa-theme-color),var(--oa-theme-dark));color:var(--oa-theme-contrast)}
html[data-oa-palette] .brand-mark::after{background:var(--oa-theme-accent)}
html[data-oa-palette] .app.hub-portal-active .oa-workbench-link{color:var(--oa-theme-ink);border-bottom-color:var(--oa-theme-accent)}
html[data-oa-palette] :is(.portal-hub .hub-system.active,.portal-hub .hub-system:hover,.portal-hub .hub-feature-main.active,.app:not(.hub-portal-active) .module-btn.active,.app:not(.hub-portal-active) .module-btn:hover,.owner-sidebar .side-item.active,.owner-sidebar .side-item:hover,.side .nav button.active,.side .nav button:hover,.side .nav a:hover){background:var(--oa-theme-soft);color:var(--oa-theme-ink);border-color:var(--oa-theme-line);box-shadow:inset 3px 0 var(--oa-theme-color)}
html[data-oa-palette] :is(.workbench-heading b,.work-panel-head h3,.workbench-heading button,.work-panel-head button,.hero.executive h1,.page-head h2,.hero-meta span b,.owner-sidebar .side-plain:not(.danger),.hub-display-title b,.hub-display-back,.hub-generic-tag,.hub-generic-intro h3){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.workbench-heading button:hover,.work-panel-head button:hover,.hub-symbol,.hero-meta span){background:var(--oa-theme-soft);color:var(--oa-theme-ink);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.work-tabs button.active,.primary-btn,.button.primary,.primary,.hub-sales-primary,.hub-generic-intro>button,.hub-action-card>button,.zhibo-login-submit){background:var(--oa-theme-color);border-color:var(--oa-theme-dark);color:var(--oa-theme-contrast);text-shadow:none}
html[data-oa-palette] :is(.primary-btn,.button.primary,.primary,.hub-sales-primary,.zhibo-login-submit):hover{background:var(--oa-theme-dark);filter:brightness(.96)}
html[data-oa-palette] :is(.hero.executive){border-left-color:var(--oa-theme-color)}
html[data-oa-palette] :is(.hero.executive .eyebrow,.hub-display-icon,.hub-feature-icon){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.hub-display-icon,.hub-feature-icon){background:var(--oa-theme-soft)}
html[data-oa-palette] :is(.hero:not(.executive),.hub-sales-heading,.hub-module-dashboard .hub-dash-heading){border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.hero:not(.executive)){background:linear-gradient(110deg,var(--oa-theme-color),var(--oa-theme-dark));color:var(--oa-theme-contrast)}
html[data-oa-palette] :is(.login-screen,.login-gate,.zhibo-login-gate){background:radial-gradient(ellipse at 15% 12%,var(--oa-theme-soft),transparent 50%),linear-gradient(135deg,var(--oa-theme-bg),var(--oa-theme-soft))}
html[data-oa-palette] :is(.zhibo-login-title,.zhibo-login-card h1,.login-copy h1,.login-card h1,.zhibo-auth-tab.active,.zhibo-auth-tab[aria-selected=true],.zhibo-login-forgot,.zhibo-login-card .zhibo-link){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.zhibo-login-tabs,.zhibo-auth-tabs){background:var(--oa-theme-soft);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.zhibo-login-card,.login-shell,.login-card){border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(input,select,textarea):focus{outline-color:var(--oa-theme-color);border-color:var(--oa-theme-color)}
html[data-oa-palette] :is(.ghost-btn,.ghost,.secondary-btn,.button.secondary):hover{border-color:var(--oa-theme-color);color:var(--oa-theme-ink);background:var(--oa-theme-soft)}
/* Keep business status colors meaningful; theme only adds accent color to neutral first cards. */
html[data-oa-palette] :is(.kpi-grid .kpi:first-child,.special-kpis .kpi:first-child){border-top-color:var(--oa-theme-color)}
/* Shared settings entry; the top action bar grows naturally on smaller screens. */
.oa-theme-trigger{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none;padding:4px 9px 4px 5px;min-height:34px;border:1px solid var(--oa-theme-line);border-radius:7px;background:#fff;color:var(--oa-theme-ink);font:600 12px/1.3 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;cursor:pointer}
.oa-theme-trigger:hover{background:var(--oa-theme-soft);border-color:var(--oa-theme-color)}
.oa-theme-trigger-img{display:block;width:27px;height:27px;border-radius:6px;object-fit:contain;background:var(--oa-theme-soft)}
.oa-theme-trigger-img[hidden],.oa-theme-trigger-img:not([hidden])+.oa-theme-trigger-icon{display:none}
.oa-theme-trigger-icon{width:27px;height:27px;display:grid;place-items:center;color:var(--oa-theme-ink);background:var(--oa-theme-soft);border-radius:6px;font-size:17px}
.oa-theme-login-trigger{position:absolute;top:14px;right:16px;z-index:12}
.oa-theme-login-trigger .oa-theme-trigger{box-shadow:0 3px 12px #2339520d}
.oa-theme-mascot{position:fixed;z-index:65;bottom:14px;right:14px;width:88px;height:88px;pointer-events:none;filter:drop-shadow(0 3px 7px #20354a20)}
.oa-theme-mascot[data-position=left]{left:14px;right:auto}
.oa-theme-mascot img{width:100%;height:100%;object-fit:contain;border-radius:16px}
.oa-theme-mascot[hidden],body:has(.modal:not([hidden])) .oa-theme-mascot,body:has(dialog[open]) .oa-theme-mascot{display:none!important}
.oa-theme-dialog,.oa-theme-dialog *{box-sizing:border-box}
.oa-theme-dialog{font:14px/1.5 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#283b52;border:1px solid var(--oa-theme-line);border-radius:16px;padding:0;width:min(760px,calc(100% - 28px));max-width:none;max-height:calc(100vh - 30px);background:#fff;box-shadow:0 18px 70px #23354b42;overflow:hidden}
.oa-theme-dialog:not([open]){display:none}
.oa-theme-dialog[open]{display:flex;flex-direction:column}
.oa-theme-dialog::backdrop{background:#1b2b4570;backdrop-filter:blur(2px)}
.oa-theme-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 22px;border-bottom:1px solid var(--oa-theme-line);background:linear-gradient(100deg,var(--oa-theme-soft),#fff)}
.oa-theme-dialog-head p{margin:0 0 3px;color:var(--oa-theme-ink);font-size:11px;font-weight:650;letter-spacing:.5px}
.oa-theme-dialog-head h2{font-size:21px;margin:0;color:var(--oa-theme-ink)}
.oa-theme-dialog-head button{border:1px solid var(--oa-theme-line);background:white;color:#637489;font-size:23px;border-radius:7px;width:36px;height:36px;cursor:pointer}
.oa-theme-dialog-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:18px 22px}
.oa-theme-preview{display:flex;align-items:center;gap:14px;padding:13px 16px;border:1px solid var(--oa-theme-line);border-radius:11px;background:var(--oa-theme-soft)}
.oa-theme-preview-image{width:68px;height:68px;flex:none;background:#fff;border-radius:13px;display:grid;place-items:center}
.oa-theme-preview-image img{width:100%;height:100%;object-fit:contain;border-radius:13px}
.oa-theme-preview-image>span{font-size:26px;color:var(--oa-theme-ink)}
.oa-theme-preview b{font-size:17px;color:var(--oa-theme-ink)}.oa-theme-preview p{margin:2px 0;color:#526781}.oa-theme-preview small{font-size:11px;color:#738097}
.oa-theme-section-title{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:20px 0 9px;flex-wrap:wrap}
.oa-theme-section-title h3{font-size:14px;margin:0;color:#283b52}.oa-theme-section-title small{font-size:11px;color:#7b8799}
.oa-theme-palette-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.oa-theme-palette,.oa-theme-mascot-option{font:inherit;cursor:pointer;background:#fff;border:1px solid #e1e6ef;border-radius:8px;color:#45576d;display:flex;align-items:center;gap:7px;padding:7px;min-width:0;text-align:left;font-size:12px}
.oa-theme-palette:hover,.oa-theme-mascot-option:hover{border-color:var(--oa-theme-color)}
.oa-theme-palette[aria-pressed=true],.oa-theme-mascot-option[aria-pressed=true]{border-color:var(--oa-theme-color);background:var(--oa-theme-soft);box-shadow:inset 0 0 0 1px var(--oa-theme-color);color:var(--oa-theme-ink);font-weight:650}
.oa-theme-swatch{width:29px;height:25px;flex:none;display:block;border:1px solid #dbe2ea;border-radius:5px;background:linear-gradient(125deg,var(--swatch) 0 52%,var(--swatch-bg) 53% 100%)}
.oa-theme-custom-color{margin-top:9px;border:1px solid var(--oa-theme-line);padding:8px 11px;border-radius:7px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.oa-theme-custom-color input{width:60px;height:30px;padding:2px;border:1px solid var(--oa-theme-line);cursor:pointer}
.oa-theme-mascot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.oa-theme-mascot-option{flex-direction:column;align-items:center;justify-content:flex-start;gap:5px;text-align:center;padding:9px 4px;min-height:88px}
.oa-theme-mascot-thumb{width:48px;height:48px;display:grid;place-items:center;border-radius:9px;background:#f1f4f9;color:#8a9bb2;font-size:24px;font-weight:400}
.oa-theme-mascot-thumb img{width:100%;height:100%;object-fit:contain;border-radius:9px}
.oa-theme-upload{margin-top:10px;border:1px dashed var(--oa-theme-line);background:var(--oa-theme-bg);padding:12px;border-radius:9px}
.oa-theme-upload b{color:var(--oa-theme-ink)}.oa-theme-upload p{font-size:12px;color:#67788f;margin:5px 0 10px}
.oa-theme-upload>div{display:flex;gap:8px;flex-wrap:wrap}
.oa-theme-upload-button,.oa-theme-upload button{cursor:pointer;font:600 12px/1.4 inherit;display:inline-flex;align-items:center;border:1px solid var(--oa-theme-line);border-radius:6px;padding:7px 12px;background:white;color:var(--oa-theme-ink)}
.oa-theme-upload-button{background:var(--oa-theme-color);color:var(--oa-theme-contrast)}
.oa-theme-upload input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.oa-theme-upload input[type=file]:focus-visible{outline:2px solid var(--oa-theme-color)}
.oa-theme-upload button:disabled{opacity:.45;cursor:not-allowed}
.oa-theme-position{display:flex;flex-wrap:wrap;gap:8px}
.oa-theme-position label{display:flex;align-items:center;gap:5px;padding:8px 11px;border:1px solid #e1e6ef;border-radius:7px;font-size:12px;cursor:pointer;color:#45576d}
.oa-theme-position label:has(input:checked){background:var(--oa-theme-soft);border-color:var(--oa-theme-color)}
.oa-theme-position input{accent-color:var(--oa-theme-color);width:auto;margin:0;padding:0}
.oa-theme-message{min-height:18px;margin:8px 0 0;font-size:12px;color:var(--oa-theme-ink)}
.oa-theme-message[data-error="1"]{color:#bc4141}
.oa-theme-dialog-foot{padding:12px 22px;display:flex;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--oa-theme-line);background:#fff}
.oa-theme-dialog-foot>div{display:flex;gap:8px}
.oa-theme-dialog-foot button{font:600 13px/1.4 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;padding:9px 14px;cursor:pointer;background:#fff;border:1px solid var(--oa-theme-line);border-radius:7px;color:#52647a}
#oaThemeSave{background:var(--oa-theme-color);border-color:var(--oa-theme-dark);color:var(--oa-theme-contrast)}
.oa-theme-dialog [hidden]{display:none!important}
.oa-theme-dialog :focus-visible,.oa-theme-trigger:focus-visible{outline:2px solid var(--oa-theme-color);outline-offset:2px}
@media(max-width:680px){.oa-theme-palette-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.oa-theme-mascot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.oa-theme-dialog-body{padding:14px}.oa-theme-dialog-head,.oa-theme-dialog-foot{padding:12px 14px}.oa-theme-mascot{width:64px;height:64px}.oa-theme-login-trigger{top:8px;right:8px}.oa-theme-trigger{padding-right:6px;gap:4px}.oa-theme-preview-image{width:54px;height:54px}}
@media(max-width:400px){.oa-theme-palette-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.oa-theme-mascot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.oa-theme-dialog *{transition:none!important;animation:none!important}}

/* Login decoration sits in the outer gutter on desktop; narrow screens use the toolbar icon only. */
.oa-theme-login-mascot{position:fixed;bottom:20px;right:20px;width:112px;height:112px;border-radius:18px;object-fit:contain;z-index:11;pointer-events:none;filter:drop-shadow(0 4px 10px #20354a1c)}
.oa-theme-login-mascot[data-position=left]{left:20px;right:auto}
.oa-theme-login-mascot[hidden]{display:none!important}
@media(max-width:1150px){.oa-theme-login-mascot{display:none!important}}
body:has(#businessLoginGate:not([hidden])) #oaThemeMascot,body:has(#loginScreen:not([hidden])) #oaThemeMascot,body:has(#loginGate:not([hidden])) #oaThemeMascot{display:none!important}

/* ===== v1.0.4 · 全页面主题，覆盖所有已有业务工作台 ===== */
:root{--oa-theme-surface:#f8faff;--oa-theme-panel:#edf3fc;--oa-theme-sidebar:#eaf0fc;--oa-theme-header:#f4f7fd;--oa-theme-pageEnd:#dce5f6;--oa-theme-text:#283b52;--oa-theme-wallpaper:none;--oa-theme-wallpaper-opacity:.18}
html[data-oa-palette]{color:var(--oa-theme-text);background:var(--oa-theme-bg)}
html[data-oa-palette] body{background:linear-gradient(135deg,var(--oa-theme-bg) 5%,var(--oa-theme-pageEnd) 100%);isolation:isolate;min-height:100vh;color:var(--oa-theme-text)}
html[data-oa-palette] body::before{content:"";position:fixed;inset:0;z-index:-1;background-image:var(--oa-theme-wallpaper);background-repeat:repeat;background-size:132px 132px;background-position:center;opacity:var(--oa-theme-wallpaper-opacity);pointer-events:none}
html[data-oa-background="wallpaper"] body::before{background-repeat:no-repeat;background-size:cover}
html[data-oa-background="color"] body::before{background-image:none}
html[data-oa-palette] :is(.app,.owner-app,.shell,.guest-layout,#homeView,#featureView,#specialWorkspace,#genericWorkspace,.portal-hub,.hub-display-content){background:transparent}
html[data-oa-palette] :is(.app,.owner-app,.shell) :is(.main,.owner-main){background:transparent}
html[data-oa-palette] :is(.app .topbar,.owner-topbar,.shell .topbar,.guest-topbar){background:var(--oa-theme-header);border-bottom:1px solid var(--oa-theme-line);box-shadow:0 2px 12px color-mix(in srgb,var(--oa-theme-ink) 7%,transparent)}
html[data-oa-palette] :is(.app:not(.hub-portal-active) .sidebar,.owner-sidebar,.side,.portal-hub .hub-systems,.portal-hub .hub-features,.hub-features-list,.system-nav,.sales-portal-worknav,.sales-portal-contract-nav,.project-flow-rail,.org-panel,.system-tree){background:linear-gradient(180deg,var(--oa-theme-header),var(--oa-theme-sidebar));border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.side-label,.side-section,.hub-system-heading,.hub-features-heading,.portal-channel-tabs,.section-title,.project-section-title){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.hub-system-heading,.hub-features-heading,.feature-head,.project-workspace-head,.sales-toolbar,.sales-tabbar,.omes-legacy-head,.oa-workflow-tabs,.oa-detail-tabs,.sales-portal-section-heading,.hub-display-head,.workbench-heading,.page-head){border-color:var(--oa-theme-line);background:linear-gradient(90deg,var(--oa-theme-panel),var(--oa-theme-surface))}
html[data-oa-palette] :is(.feature-head,.page-head,.project-workspace-head){border:1px solid var(--oa-theme-line);border-radius:9px;padding:12px 16px}
html[data-oa-palette] :is(.feature-head h1,.feature-head h2,.section-head h2,.section-head h3,.panel-head h3,.page-head h2,.workbench-heading b,.work-panel-head h3,.card-head h3,.project-form-head h2,.project-section-title,.qms-panel h3,.sales-portal-section-heading h2,.omes-panel h3,.guest-intro h1){color:var(--oa-theme-ink)}
/* Shared card surfaces, including generic and specialized pages. Do not alter grid layout or field dimensions. */
html[data-oa-palette] :is(.work-panel,.panel,.card,.feature-card,.hub-display,.hub-action-card,.hub-related,.hub-generic-intro,.hub-sales,.hub-sales-money>div,.hub-sales-metrics>div,.workbench-heading,.kpi,.attention-card,.governance-card,.system-card,.ba-workflow-card,.ba-sync-card,.org-panel,.approval-card,.doc-detail,.system-workspace,.meeting-launcher,.meeting-row,.company-list,.company-detail,.company-rules>div,.company-meta>div,.line-card,.detail-section,.form-section,.qms-panel,.qms-kpis>div,.qms-detail-head,.qms-detail-grid>div,.sales-ledger,.omes-panel,.omes-chart-card,.production-detail,.mes-alert-card,.order-standard-card,.oa-design-card,.oa-flow-def,.oa-announcement-list,.oa-schedule-list,.portal-card,.settings-card,.sales-report-panel,.project-form-card,.project-history-card,.project-unified-card,.project-integrated-form,.sales-portal-column,.sales-portal-content,.sales-portal-contractcontent,.sales-portal-metric,.guest-container,.guest-form-panel,.smart-doc-card){background:color-mix(in srgb,var(--oa-theme-surface) 94%,transparent);border-color:var(--oa-theme-line);border-radius:8px;box-shadow:0 2px 8px color-mix(in srgb,var(--oa-theme-ink) 6%,transparent)}
html[data-oa-palette] :is(.work-panel-head,.panel-head,.card-head,.project-form-head,.sales-portal-column-head,.hub-sales-table-head,.dialog-head,.oa-flow-def-head,.standard-card-head){border-bottom-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.work-quick,.hub-sales-money,.company-meta,.production-facts,.fulfillment-facts,.project-id-strip,.report-kpi-strip,.project-required-note,.form-hint,.rule-tip,.hub-dashboard-note){background:var(--oa-theme-panel);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.work-tabs,.segmented,.omes-tabs,.sales-view-switch,.sales-stage-filters,.oa-detail-tabs,.oa-workflow-tabs,.legacy-portal-tabs,.sales-portal-contract-nav,.project-workflow){background:var(--oa-theme-panel);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.work-tabs button:not(.active),.hub-system:not(.active),.module-btn:not(.active),.side-item:not(.active),.nav button:not(.active),.nav a){background:transparent}
html[data-oa-palette] :is(.segmented button.active,.omes-tabs button.active,.sales-tab.active,.sales-view-btn.active,.sales-stage-filter.active,.oa-workflow-tabs button.active,.oa-detail-tabs button.active,.system-nav-item.active,.sales-portal-worknav button.active,.sales-portal-contract-nav button.active,.project-rail-step.active,.project-workflow-step.active,.legacy-topnav-menu.active){background:var(--oa-theme-soft);border-color:var(--oa-theme-color);color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.portal-banner,.qms-banner,.project-init-banner,.sales-portal-intro,.hub-sales-heading,.oa-portal-v2 .oa-portal-display-head){border-color:var(--oa-theme-line);background:linear-gradient(115deg,var(--oa-theme-panel),var(--oa-theme-header));color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.portal-banner h1,.portal-banner h2,.qms-banner h1,.qms-banner h2,.project-init-banner h1,.sales-portal-intro h1,.hub-sales-heading h3){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.portal-banner p,.qms-banner p,.project-init-banner p,.sales-portal-intro p,.hub-sales-heading p){color:var(--oa-theme-text)}
/* Tables: consistent themed header and subtle alternate rows, with existing status cells intact. */
html[data-oa-palette] :is(.table-wrap,.hub-sales-table-scroll,.sales-portal-contract-table,.legacy-table,.special-table,.qms-table,.production-table,.company-table){border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(table,.hub-sales-table,.legacy-table,.special-table,.qms-table,.production-table) thead th{background:var(--oa-theme-panel);color:var(--oa-theme-ink);border-color:var(--oa-theme-line)}
html[data-oa-palette] table tbody td{border-bottom-color:var(--oa-theme-line)}
html[data-oa-palette] table tbody tr:nth-child(even):not(.selected-row){background:color-mix(in srgb,var(--oa-theme-soft) 42%,var(--oa-theme-surface))}
html[data-oa-palette] table tbody tr:hover,html[data-oa-palette] table tbody tr.selected-row{background:var(--oa-theme-soft)}
html[data-oa-palette] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]),select,textarea){border-color:var(--oa-theme-line);background:var(--oa-theme-surface);color:var(--oa-theme-text)}
html[data-oa-palette] :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.field>span,.form-grid label,.modal-form label,.compact-form label,.project-field>span){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.ghost-btn,.secondary-btn,.button.secondary,.ghost,.back-btn,.row-btn:not(.danger),.icon-btn,.project-submit-btn,.hub-display-back,.sales-portal-enter,.sales-mode-switch){border-color:var(--oa-theme-line);color:var(--oa-theme-ink)}
/* Themed dialogs (new/edit, review, purchasing, production, quality, password, document). */
html[data-oa-palette] :is(.modal,.special-modal){background:color-mix(in srgb,var(--oa-theme-text) 42%,transparent)}
html[data-oa-palette] :is(.dialog,.special-dialog,.company-dialog,.qms-dialog,.ba-approval-dialog,.brand-name-dialog){background:var(--oa-theme-surface);border-color:var(--oa-theme-line);border-radius:11px;box-shadow:0 20px 65px color-mix(in srgb,var(--oa-theme-text) 22%,transparent)}
html[data-oa-palette] :is(.dialog-head,.dialog-foot,.project-form-foot){background:var(--oa-theme-panel);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.dialog-head h3,.dialog-head h2){color:var(--oa-theme-ink)}
html[data-oa-palette] :is(.zhibo-login-gate,.login-screen,.login-gate){background:transparent}
html[data-oa-palette] :is(.zhibo-login-card,.login-shell,.login-card,.access-card){background:var(--oa-theme-surface);border-color:var(--oa-theme-line)}
html[data-oa-palette] .zhibo-login-content{background:var(--oa-theme-surface)}
html[data-oa-palette] .zhibo-login-heading h1,html[data-oa-palette] .zhibo-forgot{color:var(--oa-theme-ink)}
/* The login artwork itself can receive the selected palette without modifying the logo image. */
html[data-oa-palette] .zhibo-login-art{background-color:var(--oa-theme-ink);background-blend-mode:luminosity}
html[data-oa-palette] :is(.guest-mark,.guest-join-form button,#guestJoinBtn){background:var(--oa-theme-ink);color:#fff}
html[data-oa-palette] .guest-topbar{border-radius:9px;padding:8px 12px}
html[data-oa-palette] .guest-topbar .oa-theme-trigger{margin-left:auto}
html[data-oa-palette] :is(.oa-theme-dialog,.oa-theme-dialog input,.oa-theme-dialog select){color:var(--oa-theme-text)}
/* Whole-screen background picker */
.oa-theme-background-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.oa-theme-background-options label{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;border:1px solid var(--oa-theme-line);border-radius:9px;padding:8px;background:white;cursor:pointer}
.oa-theme-background-options label:has(input:checked){border-color:var(--oa-theme-color);background:var(--oa-theme-soft);box-shadow:inset 0 0 0 1px var(--oa-theme-color)}
.oa-theme-background-options input{position:absolute;top:13px;right:13px;width:14px;height:14px;margin:0;z-index:1}
.oa-theme-background-options b{font-size:12px;color:var(--oa-theme-ink)}.oa-theme-background-options small{font-size:10px;color:#687a8f}
.oa-bg-demo{display:block;height:58px;border-radius:5px;background:linear-gradient(120deg,var(--oa-theme-panel),var(--oa-theme-pageEnd));border:1px solid var(--oa-theme-line);overflow:hidden}
.oa-bg-pattern{background-image:var(--oa-theme-pattern-preview),linear-gradient(120deg,var(--oa-theme-panel),var(--oa-theme-pageEnd));background-repeat:repeat,no-repeat;background-size:34px 34px,cover}
.oa-bg-wallpaper{background-image:var(--oa-theme-wallpaper-preview),linear-gradient(160deg,var(--oa-theme-color),var(--oa-theme-panel));background-size:cover;background-position:center}
.oa-theme-opacity{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:12px;color:var(--oa-theme-ink)}
.oa-theme-opacity input{flex:1;width:100%;max-width:300px;min-width:60px}
.oa-theme-opacity output{min-width:38px;text-align:right}
@media(max-width:520px){.oa-theme-background-options{grid-template-columns:1fr}.oa-bg-demo{height:44px}.oa-theme-background-options label{display:grid;grid-template-columns:75px 1fr;gap:4px 10px;align-items:center}.oa-bg-demo{grid-row:1/3}.oa-theme-background-options b,.oa-theme-background-options small{grid-column:2}}
@media(prefers-reduced-motion:reduce){html[data-oa-background="pattern"] body::before,html[data-oa-background="wallpaper"] body::before{background-image:none}}

/* Authentication gates hide the unauthenticated workbench; only the theme backdrop is visible. */
body:has(#businessLoginGate:not([hidden]))>.app{display:none!important}
html[data-oa-palette] :is(.project-submit-btn,.sd-btn.primary){background:var(--oa-theme-ink);border-color:var(--oa-theme-ink);color:#fff}
html[data-oa-palette] :is(.sd-shell,.sd-main,.sd-content){background:transparent}
html[data-oa-palette] :is(.sd-sidebar,.sd-topbar,.sd-modal-head,.sd-modal-foot){background:var(--oa-theme-panel);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.sd-panel,.sd-stat,.sd-quick-card,.sd-ai-banner,.sd-ai-workspace,.sd-ai-layout,.sd-ai-result,.sd-modal,.sd-hero){background:color-mix(in srgb,var(--oa-theme-surface) 94%,transparent);border-color:var(--oa-theme-line)}
html[data-oa-palette] :is(.sd-section-head h2,.sd-panel-head h3,.sd-modal-head h3,.sd-hero h2,.sd-hero h1,.sd-sidebar-brand strong){color:var(--oa-theme-ink)}
html[data-oa-palette] .sd-side-item.active{background:var(--oa-theme-soft);color:var(--oa-theme-ink);border-color:var(--oa-theme-line)}
html[data-oa-palette] .sd-modal-mask{background:color-mix(in srgb,var(--oa-theme-text) 42%,transparent)}
html[data-oa-palette] :is(.sd-modal-mask:not([hidden]),.special-modal:not([hidden]))~#oaThemeMascot{display:none}

/* v1.0.5: one full-page composition, not a tiled wallpaper. */
html[data-oa-palette] body::before{background-repeat:no-repeat!important;background-size:cover!important;background-position:center center;opacity:var(--oa-theme-wallpaper-opacity);pointer-events:none}
html[data-oa-background="scene"][data-oa-scene-kind="portrait"] body::before{background-size:auto min(76vh,78vw)!important;background-position:95% 94%}
html[data-oa-background="wallpaper"] body::before{background-size:cover!important}
html[data-oa-background="color"] body::before{background-image:none!important}
html[data-oa-background="scene"] :is(.work-panel,.panel,.card,.kpi,.hub-display,.company-detail,.qms-panel,.sd-panel),html[data-oa-background="wallpaper"] :is(.work-panel,.panel,.card,.kpi,.hub-display,.company-detail,.qms-panel,.sd-panel){background-color:color-mix(in srgb,var(--oa-theme-surface) 91%,transparent)}
.oa-bg-pattern{background-image:var(--oa-theme-pattern-preview),linear-gradient(120deg,var(--oa-theme-panel),var(--oa-theme-pageEnd));background-repeat:no-repeat;background-size:cover;background-position:center}
.oa-full-scene-preview{position:relative;aspect-ratio:16/8;min-height:150px;margin-top:10px;overflow:hidden;border:1px solid var(--oa-theme-line);border-radius:10px;background-image:var(--oa-preview-art),linear-gradient(135deg,var(--oa-theme-bg),var(--oa-theme-pageEnd));background-size:cover;background-repeat:no-repeat;background-position:center}
.oa-full-scene-preview[data-kind="portrait"]{background-size:auto 90%,cover;background-position:92% center,center}
.oa-full-scene-preview>span{position:absolute;left:10px;bottom:10px;padding:5px 9px;border-radius:5px;background:rgba(255,255,255,.9);color:var(--oa-theme-ink);font-size:12px}
@media(prefers-reduced-motion:reduce){html[data-oa-background="scene"] body::before,html[data-oa-background="wallpaper"] body::before{background-image:none!important}}
