/* 可选界面对标项：只改变当前设备的呈现，不改变业务数据。 */
.ui-pref-trigger{
  min-height:32px;padding:0 10px;border:1px solid var(--line,#dce2eb);border-radius:8px;
  background:var(--surface,#fff);color:var(--ink,#18202f);font-size:12px;font-weight:750;
  white-space:nowrap;transition:border-color .15s,background .15s,transform .15s;
}
.ui-pref-trigger:hover{border-color:var(--accent,#9a5f3d);background:var(--accent-glow,#fff1e5);transform:translateY(-1px)}
.ui-pref-trigger.mobile{min-height:38px;padding:0 9px;background:var(--surface,#fffdf8);font-size:11px}
.ui-pref-backdrop{position:fixed;inset:0;z-index:1400;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(24,32,47,.30);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.ui-pref-panel{width:min(560px,100%);max-height:min(720px,calc(100dvh - 36px));overflow:auto;background:var(--surface,#fff);border:1px solid var(--line,#e6e9f0);border-radius:16px;box-shadow:0 28px 90px rgba(15,23,42,.20);color:var(--ink,#18202f)}
.ui-pref-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px;border-bottom:1px solid var(--line,#e6e9f0)}
.ui-pref-head h2{margin:0;font-size:18px;line-height:1.25}.ui-pref-head p{margin:5px 0 0;color:var(--muted,#777066);font-size:11px;line-height:1.5}
.ui-pref-close{width:32px;height:32px;border:0;border-radius:50%;background:var(--surface-2,#f3f5f9);color:var(--muted,#777066);font-size:18px;line-height:1}
.ui-pref-close:hover{background:var(--line,#e6e9f0);color:var(--ink,#18202f)}
.ui-pref-body{padding:18px 22px}.ui-pref-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.ui-pref-field{display:flex;flex-direction:column;gap:7px;min-width:0}.ui-pref-field span{font-size:11px;color:var(--muted,#777066);font-weight:800}.ui-pref-field select{width:100%;height:40px;padding:0 10px;border:1px solid var(--line,#e6e9f0);border-radius:9px;background:var(--surface-2,#f7f8fb);color:var(--ink,#18202f);font-size:12px}.ui-pref-field select:focus{border-color:var(--accent,#9a5f3d);box-shadow:0 0 0 3px var(--accent-glow,rgba(154,95,61,.14));outline:0}
.ui-pref-benchmark{margin-top:16px;padding:11px 12px;border:1px dashed var(--line,#e6e9f0);border-radius:9px;background:var(--surface-2,#f7f8fb);color:var(--muted,#777066);font-size:11px;line-height:1.65}
.ui-pref-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 22px 20px;border-top:1px solid var(--line,#e6e9f0)}.ui-pref-actions{display:flex;gap:8px;margin-left:auto}.ui-pref-actions button{min-height:38px;padding:0 13px;border-radius:8px;font-size:12px;font-weight:750}.ui-pref-cancel{border:1px solid var(--line,#e6e9f0);background:var(--surface,#fff);color:var(--ink,#18202f)}.ui-pref-save{border:1px solid var(--accent,#9a5f3d);background:var(--accent,#9a5f3d);color:#fff}.ui-pref-reset{border:0;background:transparent;color:var(--muted,#777066);font-size:11px}

/* 夜班对标主题：深色仅覆盖常见业务容器，确保弹窗、表格和工作台同时可读。 */
body.ui-theme-midnight{--bg-deep:#0d1117;--bg-main:#111820;--bg-card:#151d27;--bg-panel:#1c2733;--bg-hover:#233243;--border:#2b3948;--border-light:#3a4a5c;--text-primary:#e7edf4;--text-secondary:#a4b3c3;--text-muted:#75879a;--accent:#67a9ff;--accent-glow:rgba(103,169,255,.16);--accent-hover:#8bbdff;--surface:#151d27;--surface-soft:#111820;--surface-raised:#1b2632;--surface-2:#1c2733;--ink:#e7edf4;--ink-soft:#a4b3c3;--muted:#8495a8;--line:#2b3948;--brand:#d49a73;background:var(--bg-deep)!important;color:var(--ink)!important;color-scheme:dark}
body.ui-theme-midnight #app,body.ui-theme-midnight .content-area,body.ui-theme-midnight .main-body{background:var(--bg-deep)!important;color:var(--ink)!important}
body.ui-theme-midnight .topbar,body.ui-theme-midnight .sidebar,body.ui-theme-midnight .suite-card,body.ui-theme-midnight .sops-card,body.ui-theme-midnight .mini-card,body.ui-theme-midnight .card,body.ui-theme-midnight .sc,body.ui-theme-midnight .ai-panel,body.ui-theme-midnight .suite-summary-card,body.ui-theme-midnight .suite-filterbar,body.ui-theme-midnight .suite-pipeline-card,body.ui-theme-midnight .suite-check-item,body.ui-theme-midnight .suite-report-center,body.ui-theme-midnight .ui-pref-panel{background:var(--bg-card)!important;border-color:var(--border)!important;color:var(--ink)!important}
body.ui-theme-midnight .suite-filter-field input,body.ui-theme-midnight .suite-filter-field select,body.ui-theme-midnight .ai-field input,body.ui-theme-midnight .ai-field select,body.ui-theme-midnight .ff input,body.ui-theme-midnight .ff select,body.ui-theme-midnight .ff textarea,body.ui-theme-midnight .ui-pref-field select{background:var(--bg-panel)!important;border-color:var(--border)!important;color:var(--ink)!important}
body.ui-theme-midnight .suite-alert-row,body.ui-theme-midnight .suite-work-row,body.ui-theme-midnight .suite-risk-row,body.ui-theme-midnight .suite-report-row,body.ui-theme-midnight .suite-card-head,body.ui-theme-midnight .suite-section-head,body.ui-theme-midnight .suite-tabs{border-color:var(--border)!important}
body.ui-theme-midnight .suite-pipeline-card.active{background:rgba(103,169,255,.16)!important;border-color:var(--accent)!important}.ui-theme-midnight .suite-filter-presets button,.ui-theme-midnight .ui-pref-benchmark{background:var(--bg-panel);border-color:var(--border);color:var(--ink-soft)}
body.ui-theme-midnight #login-page{background:radial-gradient(ellipse at 30% 50%,rgba(103,169,255,.14),transparent 60%),var(--bg-deep)!important;color:var(--ink)!important}body.ui-theme-midnight .modal,body.ui-theme-midnight .modal-hd,body.ui-theme-midnight .modal-ft{background:var(--bg-card)!important;border-color:var(--border)!important;color:var(--ink)!important}
body.ui-theme-midnight .bottom,body.ui-theme-midnight .sheet,body.ui-theme-midnight .login-box{background:var(--bg-card)!important;border-color:var(--border)!important;color:var(--ink)!important}body.ui-theme-midnight .field{background:var(--bg-panel)!important;border-color:var(--border)!important;color:var(--ink)!important}

/* 系统主题只在系统处于深色时切换，用户选择的暖白默认保持不变。 */
@media(prefers-color-scheme:dark){body.ui-theme-system{--bg-deep:#0d1117;--bg-main:#111820;--bg-card:#151d27;--bg-panel:#1c2733;--bg-hover:#233243;--border:#2b3948;--border-light:#3a4a5c;--text-primary:#e7edf4;--text-secondary:#a4b3c3;--text-muted:#75879a;--accent:#67a9ff;--accent-glow:rgba(103,169,255,.16);--surface:#151d27;--surface-2:#1c2733;--ink:#e7edf4;--ink-soft:#a4b3c3;--muted:#8495a8;--line:#2b3948;background:var(--bg-deep)!important;color:var(--ink)!important;color-scheme:dark}.ui-theme-system #app,.ui-theme-system .topbar,.ui-theme-system .sidebar,.ui-theme-system .suite-card,.ui-theme-system .suite-filterbar,.ui-theme-system .ui-pref-panel{background:var(--bg-card)!important;border-color:var(--border)!important;color:var(--ink)!important}}

/* 密度与布局对标项。 */
body.ui-density-compact .suite-card-body{padding:10px 12px}body.ui-density-compact .suite-alert-row,body.ui-density-compact .suite-work-row{padding:8px 0}body.ui-density-compact .suite-card-head,body.ui-density-compact .suite-section-head{padding:10px 12px}body.ui-density-compact .suite-summary-card{padding:9px 10px}body.ui-density-compact .pb{padding-top:10px;padding-bottom:10px}
body.ui-layout-queue .suite-grid{grid-template-columns:1fr!important}body.ui-layout-queue .suite-alert-list{max-height:min(58vh,640px);overflow:auto;padding-right:4px}body.ui-layout-queue .suite-card-head p{max-width:72ch}
body.ui-layout-compact .suite-grid{grid-template-columns:minmax(0,1.12fr) minmax(240px,.88fr)}body.ui-layout-compact .suite-pipeline{gap:5px}body.ui-layout-compact .suite-pipeline-card{padding:9px}.ui-layout-compact .suite-pipeline-value{font-size:20px}
body.ui-reduced-motion *,body.ui-reduced-motion *::before,body.ui-reduced-motion *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.001ms!important}

@media(max-width:760px){.ui-pref-backdrop{align-items:flex-end;padding:0}.ui-pref-panel{width:100%;max-height:92dvh;border-radius:16px 16px 0 0}.ui-pref-head{padding:18px 16px 12px}.ui-pref-body{padding:16px}.ui-pref-grid{grid-template-columns:1fr;gap:12px}.ui-pref-foot{padding:12px 16px calc(16px + env(safe-area-inset-bottom));}.ui-pref-actions{flex:1}.ui-pref-actions button{flex:1}.ui-pref-reset{white-space:nowrap}.ui-density-compact .stat,.ui-density-compact .card{padding:10px}.ui-layout-queue main{padding-top:12px}}
