/* Monitor maps its semantic tokens to the actual SOP parent theme; no second palette. */
:root.monitor-embedded,:root.monitor-embedded[data-theme=dark]{--bg:transparent;--surface:var(--sop-surface,#fffef9);--raised:var(--sop-soft,#edf1e6);--hover:var(--sop-soft,#edf1e6);--text:var(--sop-text,#26332b);--muted:var(--sop-muted,#616e64);--line:var(--sop-border,#dce2d7);--line-strong:var(--sop-border,#dce2d7);--cyan:var(--sop-accent,#42652e);--cyan-bg:var(--sop-soft,#edf1e6);--shadow:var(--sop-shadow);--focus:var(--sop-accent);--canvas-bg:var(--sop-bg)}
:root:not(.monitor-embedded){--sop-bg:var(--bg);--sop-surface:var(--surface);--sop-soft:var(--raised);--sop-text:var(--text);--sop-muted:var(--muted);--sop-border:var(--line);--sop-accent:var(--cyan);--sop-shadow:var(--shadow)}
:root:not(.monitor-embedded) body.monitor-production{--op-heading:var(--sop-text);--op-text:var(--sop-text);--op-secondary:var(--sop-muted);--op-muted:var(--sop-muted);--op-line:var(--sop-border);--op-accent:var(--sop-accent);--op-accent-soft:var(--sop-soft)}
:root .monitor-production{--op-bg:transparent;--op-side:color-mix(in srgb,var(--sop-surface) 76%,transparent);--op-surface:var(--sop-surface);--op-raised:var(--sop-soft);--op-text:var(--sop-text);--op-heading:var(--sop-text);--op-secondary:var(--sop-muted);--op-muted:var(--sop-muted);--op-line:var(--sop-border);--op-accent:var(--sop-accent);--op-accent-soft:var(--sop-soft);background:transparent}
html,body,.op-main,.op-workspace{background:transparent!important}
.op-brand,.op-local,.op-breadcrumb,.op-demo,.login-theme,.op-top-tools [data-action=theme],.op-top-tools [data-action=logout],.monitor-shell-actions{display:none!important}
.monitor-embedded .op-topbar{display:none!important}
.op-sidebar{padding-top:18px;background:color-mix(in srgb,var(--sop-surface) 65%,transparent)!important}
.op-topbar,.op-workspace-head,.op-footer{background:color-mix(in srgb,var(--sop-surface) 78%,transparent)!important}
.op-topbar{height:58px;padding-left:24px}.op-global-search{margin-right:auto;max-width:520px!important;width:min(70%,520px)!important}
.op-panel,.op-work-results,.content-card,.op-news-card,.drawer,.filter-picker-panel,.preview-account-menu{border-radius:14px!important;border-color:var(--sop-border)!important;box-shadow:var(--sop-shadow)}
.op-object-tabs button,.filter-picker,.op-button,.text-button,.op-nav,.op-icon-button{border-radius:10px!important}
.op-object-tabs button.active{background:var(--sop-soft)!important;color:var(--sop-accent)!important;border-color:var(--sop-border)!important}
.drawer,.drawer-body{background:var(--sop-surface)!important;color:var(--sop-text)!important}.drawer-header{background:var(--sop-soft)!important;border-color:var(--sop-border)!important}
.op-footer::before{content:'本地历史数据 · 只读预览';font-size:10px;color:var(--sop-muted)}


/* Navigation is owned by the shared Monitor header. */
.op-sidebar{display:none!important}.monitor-production{grid-template-columns:minmax(0,1fr)!important}.op-main{grid-column:1!important;margin-left:0!important}
/* Remove the actual sidebar track, including its persisted collapsed state. */
.monitor-production .op-shell,.monitor-production .op-shell.collapsed{grid-template-columns:minmax(0,1fr)!important}
/* Stable reading surfaces stay readable against every SOP sky. */
.monitor-production .op-workspace{background:var(--sop-bg)!important}
.monitor-production .op-topbar,.monitor-production .op-workspace-head,.monitor-production .op-footer{background:var(--sop-surface)!important}
.monitor-production .platform-auth-alert{background:var(--sop-soft)!important;color:var(--sop-text)!important;border-color:var(--sop-border)!important}
.monitor-production .platform-auth-alert :is(button,small){color:var(--sop-text)!important}
.monitor-production[data-workspace=accounts] .op-topbar{display:flex}

/* SOP-owned component surfaces and states, including legacy account controls. */
.monitor-production :is(.op-panel,.account-panel,.content-card,.op-work-results,.account-inspector-card,.account-inspector-metrics,.account-summary){background:var(--sop-surface);color:var(--sop-text);border-color:var(--sop-border);border-radius:16px;box-shadow:var(--sop-shadow)}
.monitor-production :is(.auth-view-tabs button[aria-pressed=true],.auth-rail-state.is-public,.auth-context svg){color:var(--sop-accent);border-color:var(--sop-accent)}
.monitor-production .auth-rail-state.is-healthy{color:var(--sop-positive)}
.monitor-production .auth-rail-state.is-auth{color:var(--sop-warning)}
.monitor-production :is(.auth-platform-rail>button[aria-pressed=true],.account-inspector-judgment){background:var(--sop-soft);border-color:var(--sop-border)}
.monitor-production :is(.filter-picker-panel,.platform-picker-popup,.account-inspector-card,.account-auth-callout){background:var(--sop-surface)!important;color:var(--sop-text);border-color:var(--sop-border)!important;box-shadow:var(--sop-shadow)}
.monitor-production :is(.platform-picker-popup,.filter-picker-panel){border-radius:14px}
.monitor-production :is(.op-object-tabs button.active,.op-object-tabs button[aria-selected=true]){background:var(--sop-soft)!important;color:var(--sop-accent)!important}
.monitor-production :is(.platform-picker>summary,.filter-picker,.account-search-input,.op-search){background:var(--sop-surface);border-color:var(--sop-border);color:var(--sop-text);border-radius:10px}
.monitor-production :is(.account-panel tr:hover,.filter-picker-panel button:hover,.platform-picker .auth-platform-rail>button:hover){background:var(--sop-soft)}
.monitor-production .auth-detail-note{background:var(--sop-surface);border-color:var(--sop-border);border-radius:14px}
.monitor-production .auth-detail-note small{color:var(--sop-muted)}
.monitor-production .auth-badge.is-auth{color:var(--sop-warning)}
.monitor-production .auth-badge.is-healthy{color:var(--sop-positive)}
.monitor-production .auth-badge.is-public{color:var(--sop-accent)}
.monitor-production .account-inspector-alert{background:var(--sop-soft);border-color:var(--sop-border)}
/* Accounts live within Sources; keep the collection navigation visible. */
.monitor-production[data-workspace=accounts] #tabs{display:flex!important;height:auto;flex:1 0 100%;margin:0;gap:10px}
.monitor-production[data-workspace=accounts] .monitor-tab-row{display:flex!important}
.monitor-production[data-workspace=accounts] #filters,.monitor-production[data-workspace=accounts] #filterChips,.monitor-production[data-workspace=accounts] .op-page-toolbar>.op-filter-reset{display:none!important}

/* One persistent search entry; account queries use the same account search pipeline. */
.monitor-production[data-workspace=accounts] .account-panel-head .account-search-panel{display:none}
.monitor-production .op-topbar .op-global-search{width:520px!important;max-width:520px!important;flex:0 0 520px!important;margin-left:64px!important;margin-right:auto!important}
/* Heading, filters and navigation belong to the workspace, not a nested panel. */
.monitor-production .op-workspace-head{background:transparent!important;box-shadow:none!important;border-radius:0}
/* Compact desktop heading: search no longer consumes a separate horizontal bar. */
.monitor-production .op-topbar{display:none!important}
.monitor-production .op-page-toolbar{display:flex!important;align-items:center;flex-wrap:wrap;gap:12px}
.monitor-production .op-page-toolbar .op-page-head{flex:none;margin:0!important}
.monitor-production .op-page-toolbar .op-global-search{width:300px!important;max-width:300px!important;flex:0 0 300px!important;margin:0!important;height:38px;order:0}
.monitor-production .op-page-toolbar .op-filter-row{margin-left:auto}
.monitor-heading-actions{display:none!important}
.monitor-production .monitor-heading-actions #refreshButton{display:flex!important;width:auto;min-width:86px;height:38px;padding:0 12px;border:1px solid var(--sop-border);border-radius:10px;background:var(--sop-surface);color:var(--sop-accent);font-size:12px}
.monitor-production .op-filter-row #refreshButton{display:inline-flex!important;align-items:center;justify-content:center;width:auto;min-width:86px;height:38px;padding:0 12px;border:1px solid var(--sop-border);border-radius:10px;background:var(--sop-surface);color:var(--sop-accent);font-size:12px;white-space:nowrap}
.monitor-production .monitor-heading-actions .monitor-heading-logout{display:flex!important;width:38px;height:38px;padding:0;border:1px solid var(--sop-border);border-radius:10px;background:var(--sop-surface);color:var(--sop-accent);align-items:center;justify-content:center}
.monitor-production .monitor-heading-actions .monitor-heading-logout:hover{background:var(--sop-soft);color:var(--sop-text)}
.monitor-sync-control{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;color:var(--sop-muted)}
.monitor-production .monitor-sync-control #autoRefresh{display:inline-flex!important;width:25px;height:25px;align-items:center;justify-content:center;color:var(--sop-accent)}
.monitor-sync-control #autoRefresh:disabled{opacity:.4;cursor:default}
.monitor-production .op-page-toolbar{justify-content:flex-start!important}
.monitor-production .op-page-toolbar .op-page-head{width:140px!important;flex:0 0 140px!important}
.monitor-production .op-page-toolbar .op-global-search{position:static!important;transform:none!important;left:auto!important;right:auto!important;grid-column:auto!important;order:0!important;margin:0!important}
:root body.monitor-production[data-workspace] .op-page-toolbar>.op-page-head{margin:0!important;width:140px!important;flex:0 0 140px!important}
:root body.monitor-production[data-workspace] .op-page-toolbar{gap:12px!important}
/* Keep filters as a right-aligned group, separate from the heading search. */
:root body.monitor-production[data-workspace="monitor"] .op-page-toolbar>.op-filter-row{display:flex!important;margin-left:auto!important;flex:0 1 auto!important;justify-content:flex-end!important}
:root body.monitor-production[data-workspace="monitor"] .op-page-toolbar>.op-filter-row{margin-right:0!important}
:root body.monitor-production[data-workspace] .op-page-toolbar>.unified-account-tools{margin-left:auto!important}
.monitor-production .preview-account-filter[hidden]{display:none!important}

/* Isolated globe viewport: quiet deep space, static stars, no animation cost. */
.monitor-production .geo-map[data-projection="globe"]{
 background-color:#050a14!important;
 background-image:url('/earth-stars.svg'),radial-gradient(ellipse at 48% 52%,#132539 0%,#0a1423 45%,#050a14 78%)!important;
 background-size:cover,cover!important;
 border-color:#304151!important;
}
.geo-map[data-projection="globe"] .geo-vector-map{background:transparent!important}
.geo-map[data-projection="globe"] .geo-map-tools,
.geo-map[data-projection="globe"] .geo-map-modes{background:#111e2ce8!important;border-color:#354555!important;box-shadow:0 3px 12px #0003}
.geo-map[data-projection="globe"] .geo-map-tools button,
.geo-map[data-projection="globe"] .geo-map-modes button{color:#c0d3df!important}
.geo-map[data-projection="globe"] .geo-map-modes .segment{background:#101b28!important;border-color:#354555!important}
.geo-map[data-projection="globe"] .geo-map-modes button[aria-pressed="true"]{background:#293e4d!important;color:#d7ede6!important}
.geo-map[data-projection="globe"] .geo-legend{color:#b2c1d0!important}
/* Photographic environment, kept outside the readable data surfaces. */
body.monitor-production::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:var(--sop-bg);filter:saturate(.66);transition:filter 1s ease}
body.monitor-production{isolation:isolate;background:transparent!important}
:root[data-theme=dark] body.monitor-production::before{filter:saturate(.5) brightness(.52)}
:root[data-atmosphere=dusk] body.monitor-production::before,:root[data-atmosphere=dawn] body.monitor-production::before{filter:saturate(.65) sepia(.22) brightness(.65)}
.monitor-production .op-page-toolbar{background:transparent!important;backdrop-filter:none}
.monitor-production :is(.op-panel,.op-work-results,.content-card,.op-news-card,.drawer,.filter-picker-panel,.preview-account-menu,.geo-section){background:color-mix(in srgb,var(--sop-surface) 94%,transparent)!important;border-color:var(--sop-border)!important}
.monitor-production :is(.op-table-wrap,.op-table-shell,.op-run-table,.op-quality-panel){background:color-mix(in srgb,var(--sop-surface) 94%,transparent)!important}
.monitor-production :is(.op-topbar,.op-footer){background:color-mix(in srgb,var(--sop-surface) 91%,transparent)!important}
@media(prefers-reduced-motion:reduce){body.monitor-production::before{transition:none}}
:root .monitor-production .op-workspace{background:transparent!important}
:root .monitor-production .op-page-toolbar{background:transparent!important}
:root .monitor-production #sourceViewTabs{background:color-mix(in srgb,var(--sop-bg) 80%,transparent)!important}
:root[data-visual-theme=logo] body.monitor-production::before{background:radial-gradient(ellipse at 70% 10%,color-mix(in srgb,var(--sop-accent) 13%,transparent),transparent 65%),var(--sop-bg);filter:none}
:root .monitor-production .geo-map[data-projection=globe][data-map-style=classic]{background:radial-gradient(ellipse at center,var(--sop-soft),var(--sop-bg))!important;border-color:var(--sop-border)!important}


/* Classic cartography shares the application's neutral surfaces and warm accent. */
:root .monitor-production .geo-section{--geo-land:#e4e0d7;--geo-1:#d6cdbb;--geo-2:#c5b596;--geo-3:#b6a078;--geo-4:#a98a59;--geo-5:#96713d}
:root[data-theme=dark] .monitor-production .geo-section{--geo-land:#393937;--geo-1:#514d44;--geo-2:#71644d;--geo-3:#94805c;--geo-4:#b09a70;--geo-5:#d0b485}
:root .geo-map :is(.geo-map-tools,.geo-map-modes,.geo-map-modes .segment){background:var(--sop-surface)!important;border-color:var(--sop-border)!important;box-shadow:none!important}
:root .geo-map :is(.geo-map-tools,.geo-map-modes) button{color:var(--sop-muted)!important}
:root .geo-map .geo-map-modes button[aria-pressed=true]{background:var(--sop-soft)!important;color:var(--sop-accent)!important}
:root .geo-map[data-map-style=classic] .geo-legend{color:var(--sop-muted)!important;background:var(--sop-surface)!important}
/* Preview identity lives with the shell brand; footer consumes no space. */
body.monitor-production .op-footer{display:none!important}

/* Shared Canvas precipitation layer reused from the All Tasks shell. */
.monitor-weather-overlay{position:fixed;inset:0;z-index:80;pointer-events:none;opacity:0;transition:opacity .3s ease;overflow:hidden}
.monitor-weather-overlay .surface-precipitation{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;display:block}
@media(prefers-reduced-motion:reduce){.monitor-weather-overlay{transition:none!important}}
