/* Glass is opt-in; the original themes and their layouts remain unchanged. */
[data-style=glass]{--module-rail-width:80px;--section-sidebar-width:0px;--text:#352f2a;--secondary:#776f66;--line:rgba(100,86,70,.14);--canvas:#f6f3ee;--surface:rgba(255,255,255,.48);--ui-accent:#786654;--glass-avatar-bg:#685c50;--glass-action-bg:#fff;--glass-action-hover:#f2f2f2;color-scheme:light}
[data-style=glass] body:not(.auth-view){background:#c3b6a4;color:var(--text);isolation:isolate}
[data-style=glass] body:not(.auth-view)::before{content:"";position:fixed;inset:-30px;z-index:-2;pointer-events:none;background:radial-gradient(ellipse at 14% 12%,#fffaf0 0,transparent 43%),radial-gradient(ellipse at 88% 25%,#eee3cf 0,transparent 40%),linear-gradient(102deg,transparent 0 58%,#9a81694a 59% 61%,transparent 62%),linear-gradient(90deg,#b4a48e 0 8%,#ded3be 9% 35%,#9d8b72 36% 37%,#dfd5c2 38% 70%,#a6957e 71% 73%,#d5c6ae 74%),linear-gradient(#e8dfce,#9c8672);filter:blur(19px)}
[data-style=glass] body:not(.auth-view)::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(150deg,#fffcf650,#d5c7b420 55%,#66503b25)}
[data-style=glass] body:not(.auth-view) main{margin-left:96px;padding:24px 30px 112px;min-height:100dvh;width:auto;transition:margin .2s ease}
[data-style=glass] main>header{display:none}
[data-style=glass] #content{max-width:1600px;margin:0 auto;padding:26px;border:1px solid #ffffff80;border-radius:26px;background:rgba(250,248,243,.42);backdrop-filter:blur(24px) saturate(1.1);box-shadow:0 20px 65px #55412a16,inset 0 1px #ffffffa0;min-height:calc(100dvh - 230px)}
[data-style=glass] #glass-topbar{max-width:1600px;margin:0 auto 22px;min-height:72px;padding:12px 18px;display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,1.4fr) minmax(160px,1fr);gap:20px;align-items:center;border:1px solid #ffffff90;border-radius:22px;background:#faf7f05c;backdrop-filter:blur(24px);box-shadow:0 8px 30px #55412a10,inset 0 1px #fff9}
[data-style=glass] #profile{width:auto;height:auto;padding:0;display:flex;gap:12px;border:0;border-radius:12px;align-items:center;text-align:left;background:none}
[data-style=glass] #profile .avatar{background:var(--glass-avatar-bg);color:#fff7e9;width:40px;height:40px;flex:0 0 40px}
.glass-user-copy{display:flex;flex-direction:column;gap:5px}.glass-user-copy strong{font-size:16px;font-weight:600}.glass-user-copy small{font-size:11px;opacity:.65}
.glass-ai-slot{min-width:0}.glass-tools{display:flex;gap:10px;align-items:center;justify-content:flex-end;min-width:0}
[data-style=glass] #glass-topbar #agent-launcher{position:static!important;inset:auto!important;width:100%;height:44px;display:flex;align-items:center;justify-content:center;background:#ffffff68;color:#625649;border:1px solid #ffffffa0;border-radius:14px;box-shadow:inset 0 1px #fff9;font-size:14px;transform:none}
[data-style=glass] #glass-topbar #agent-launcher:not([hidden])::after{content:'有什么可以帮你？';font-size:12px;opacity:.58;margin-left:12px}
[data-style=glass] #glass-topbar #workbench-drag-lock,[data-style=glass] #glass-topbar #workbench-purchase-apply{position:static!important;inset:auto!important;transform:none;margin:0;flex-shrink:0}
[data-style=glass] #glass-topbar :is(.glass-expand,#workbench-drag-lock){width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border:0;border-radius:50%;display:inline-grid;place-items:center;flex-shrink:0}
[data-style=glass] .glass-expand{background:#fff4;font-size:24px}
[data-style=glass] #glass-topbar #workbench-drag-lock svg{width:22px;height:22px}
[data-style=glass] #module-rail{inset:118px auto 110px 18px;width:60px;height:auto;padding:12px 7px;border:1px solid #fff8;border-radius:22px;background:#faf7ed60;backdrop-filter:blur(22px);box-shadow:0 12px 35px #55412a15}
[data-style=glass] #module-rail .rail-button{color:#74695e;border-radius:14px;background:transparent;min-height:38px;width:44px}
[data-style=glass] #module-rail .rail-button.active{background:#fff9;color:#443a30;box-shadow:0 3px 9px #55412a12}
[data-style=glass] body:not(.agent-view) #sidebar{display:none}
[data-style=glass] #glass-menu{position:fixed;z-index:40;bottom:24px;left:calc(50% + 35px);transform:translateX(-50%);max-width:calc(100vw - 140px);display:flex;gap:5px;padding:9px;border:1px solid #fff9;border-radius:21px;background:#f5f0e7a8;backdrop-filter:blur(28px);box-shadow:0 10px 40px #4d3d2b26,inset 0 1px #fff9;overflow-x:auto;scrollbar-width:none}
[data-style=glass] #glass-menu>button{flex:0 0 auto;display:flex;align-items:center;gap:7px;padding:12px 14px;border-radius:13px;color:#766b5f;font-size:13px;white-space:nowrap;transition:background .16s,box-shadow .16s}
[data-style=glass] #glass-menu>button.active,[data-style=glass] #glass-menu>button.parent-active,[data-style=glass] #glass-menu>button[aria-expanded=true]{background:#fff9;color:#3e352d;box-shadow:0 3px 10px #55412a12}
[data-style=glass] #glass-menu .nav-icon{width:18px;height:18px;display:flex}[data-style=glass] #glass-menu svg{width:18px;height:18px}[data-style=glass] #glass-menu .nav-chevron{width:12px;transform:rotate(-90deg)}
#glass-menu-popup{position:fixed;z-index:65;width:248px;max-height:50dvh;overflow:auto;display:grid;padding:8px;border:1px solid #fff9;border-radius:17px;background:#f8f5eef2;backdrop-filter:blur(25px);box-shadow:0 15px 40px #4d3d2b25}#glass-menu-popup button{text-align:left;padding:12px 14px;border-radius:10px}#glass-menu-popup button:hover,#glass-menu-popup button.active{background:#e9e2d7}
[data-style=glass] #content :is(.metric,.panel,.wb-module,.card,.approval-center-card){background:#fffcf775;border:1px solid #ffffff90;box-shadow:0 6px 22px #55412a08,inset 0 1px #fff6;border-radius:18px}
[data-style=glass] #content .wb-module{backdrop-filter:blur(12px)}
[data-style=glass] #content .input,[data-style=glass] #content .workspace-select-trigger{background:#fff8;border-color:#fff9;color:var(--text)}
[data-style=glass] #content table{background:#fff3}[data-style=glass] #content th{background:#eae3d84d;color:#776d62}
[data-style=glass] #content>.approval-management-page,[data-style=glass] #content>.workbench-modules{animation:glass-page-in .4s ease-out}
@keyframes glass-page-in{from{opacity:0;filter:blur(5px)}to{opacity:1;filter:blur(0)}}
[data-style=glass] #drawer,[data-style=glass] #agent-panel{background:#f9f7f2f5;backdrop-filter:blur(28px)}
:root[data-style=glass] body:not(.auth-view){
  --glass-frame-right:calc(100% - var(--glass-frame-right-edge));
  --glass-ai-width:min(480px, 40vw);
  --glass-ai-gap:16px;
  --glass-ai-right:var(--glass-status-inset);
  --glass-ai-reveal:0px;
  --glass-ai-shift:0px;
  --glass-drawer-motion:280ms ease-in-out;
  --glass-drawer-inner-radius:28px;
}
:root[data-style=glass] body.agent-panel-open:not(.auth-view){
  --glass-ai-reveal:calc(var(--glass-ai-width) + var(--glass-ai-gap) + var(--glass-ai-right) - var(--glass-status-inset));
  --glass-ai-shift:var(--glass-shell-radius);
}
@media(max-width:700px){
  :root[data-style=glass] body:not(.auth-view){
    --glass-ai-right:16px;
    --glass-ai-width:min(360px, calc(100vw - 74px));
  }
  :root[data-style=glass] body.agent-panel-open:not(.auth-view){--glass-ai-shift:var(--glass-ai-reveal)}
}
:root[data-style=glass] :is(#drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page),#agent-panel){
  margin:0;
  inset:var(--glass-frame-top) var(--glass-frame-right) auto auto;
  height:var(--glass-frame-height);
  max-width:var(--glass-frame-width);
  border:0;
  border-radius:28px var(--glass-shell-radius) var(--glass-shell-radius) 28px;
  background:rgba(246,244,239,.70);
  -webkit-backdrop-filter:blur(26px) saturate(1.2);
  backdrop-filter:blur(26px) saturate(1.2);
  box-shadow:0 12px 38px #42382e26;
}
:root[data-style=glass] #drawer.glass-closing[hidden]{display:block!important;pointer-events:none}
/* Process editing and preview share the content frame and its slide transition. */
:root[data-style=glass] #drawer.drawer:is(.process-editor-page,.process-preview-page){
  position:absolute;inset:0;width:100%;height:100%;max-width:100%;box-sizing:border-box;
  padding-inline-start:var(--glass-drawer-rail-overlap,0px);
  padding-bottom:var(--glass-process-menu-clearance,0px);
  border-radius:inherit;overflow:hidden;container-type:inline-size;
}
:root[data-style=glass] body:has(#drawer:is(.process-editor-page,.process-preview-page):not([hidden])) #overlay{
  inset:auto;top:var(--glass-frame-top);left:var(--glass-frame-left);
  width:var(--glass-frame-width);height:var(--glass-frame-height);background:transparent;
}
@container (max-width:760px){
  #drawer.process-editor-page #wb-form>.process-visual-workspace{
    grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,45%) minmax(0,55%);
  }
}
/* Clip the moving sheet to the stationary content frame, including its corners and shadow. */
#drawer-layer{display:contents}
:root[data-style=glass] #drawer-layer:has(> #drawer:is(:not([hidden]),.glass-closing):not(.approval-form-editor-page)){
  display:block;position:fixed;z-index:900;pointer-events:none;
  top:var(--glass-frame-top);left:var(--glass-frame-left);
  width:var(--glass-frame-width);height:var(--glass-frame-height);
  border-radius:var(--glass-shell-radius);overflow:clip;
}
/* Follow the frame during theme changes as well as after layout settles. */
@supports (top:anchor(top)) and (width:anchor-size(width)){
  :root[data-style=glass] #content{anchor-name:--workbench-frame}
  :root[data-style=glass] #drawer-layer:has(> #drawer:is(:not([hidden]),.glass-closing):not(.approval-form-editor-page)){
    position-anchor:--workbench-frame;
    left:anchor(left);top:anchor(top);
    width:anchor-size(width);height:anchor-size(height);
  }
}
:root[data-style=glass] #drawer.drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page){
  position:absolute;inset:0 auto 0 0;height:100%;max-width:100%;
  box-sizing:border-box;
  width:var(--glass-drawer-width,var(--glass-drawer-one-column))!important;
  border-radius:var(--glass-shell-radius) var(--glass-drawer-inner-radius) var(--glass-drawer-inner-radius) var(--glass-shell-radius);
  box-shadow:none;
  clip-path:inset(0 round var(--glass-shell-radius) var(--glass-drawer-inner-radius) var(--glass-drawer-inner-radius) var(--glass-shell-radius));
  --glass-drawer-side-gap:clamp(14px,2vw,32px);
  padding-inline:calc(var(--glass-drawer-rail-overlap,0px) + var(--glass-drawer-side-gap)) var(--glass-drawer-side-gap);
}
:root[data-style=glass] #drawer:is(.product-drawer,.customer-drawer,.combo-drawer,.erp-drawer,.admin-drawer,.node-stage-drawer,.message-drawer,.approval-center-page,[data-columns="2"]),
:root[data-style=glass] #drawer:has(.approval-request-form,.table-wrap){
  --glass-drawer-width:var(--glass-drawer-two-columns);
}
:root[data-style=glass] #drawer.drawer[data-columns="5"]{--glass-drawer-width:var(--glass-drawer-five-columns)}
:root[data-style=glass] #drawer.drawer:not([hidden]){pointer-events:auto}
:root[data-style=glass] body:has(#drawer:is(:not([hidden]),.glass-closing):not(.approval-form-editor-page)) :is(#module-rail,#glass-menu){z-index:901}
:root[data-style=glass] #drawer:not(.process-editor-page,.approval-form-editor-page) :is(.input,.table-wrap,.note),
:root[data-style=glass] #agent-panel #agent-chat-form{background:rgba(255,255,255,.38);border-color:transparent}
:root[data-style=glass] #drawer:not(.process-editor-page,.approval-form-editor-page)>.close{border-radius:50%;background:#ffffff73}
:root[data-style=glass] #drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page)
  :is(button, .btn, [role="button"], input[type="button"], input[type="submit"], input[type="reset"], .workspace-select > .select-surface),
:root[data-style=glass] #drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page)
  input[type="file"]::file-selector-button {
  border: 0;
}
:root[data-style=glass] body:has(#drawer:is(:not([hidden]),.glass-closing):not(.process-editor-page,.process-preview-page,.approval-form-editor-page)) #overlay{background:transparent}
/* Keep the chat and the workspace on separate rounded surfaces. */
:root[data-style=glass] body:not(.auth-view) #agent-panel{
  right:var(--glass-ai-right);
  width:var(--glass-ai-width);
  max-width:none;
  z-index:1;
  border-radius:var(--glass-shell-radius);
  box-shadow:0 8px 28px #30241812;
  overflow:hidden;
  animation:none;
  clip-path:inset(0 0 0 100%);
}
:root[data-style=glass] body.agent-panel-open:not(.auth-view) #agent-panel{clip-path:inset(0 round var(--glass-shell-radius))}
:root[data-style=glass] body.agent-panel-open:has(#drawer:is(:not([hidden]),.glass-closing):not(.process-editor-page,.process-preview-page,.approval-form-editor-page)) #overlay{
  inset:var(--glass-frame-top) var(--glass-frame-right) auto var(--glass-frame-left);
  height:var(--glass-frame-height);
}
:root[data-style=glass] body.agent-panel-open #drawer.drawer:is(:not([hidden]),.glass-closing):not(.process-editor-page,.process-preview-page,.approval-form-editor-page){
  right:auto;
  max-width:var(--glass-frame-width);
}


#account-preferences-form [data-style-choice=glass] .interface-style-thumbnail{
 --thumb-bg:linear-gradient(135deg,#e8eef4,#b4c4d3 48%,#dfe8ef);
 --thumb-card:linear-gradient(130deg,#ffffffaa,#ffffff38);
 --thumb-rail:#f8fcff70;--thumb-accent:#566e84;
}
#account-preferences-form [data-style-choice=glass] .interface-style-thumbnail em{box-shadow:inset 0 1px #ffffffa8,0 2px 5px #31496317}
[data-style=glass] [hidden]{display:none!important}
:root[data-style=glass] body.agent-panel-open:not(.auth-view):not(.agent-view) main{margin-right:0}
@media(max-width:1100px){[data-style=glass] body:not(.auth-view) main{margin-left:82px;padding:18px 18px 105px}[data-style=glass] #glass-topbar{gap:12px;grid-template-columns:1fr 1.3fr auto;padding:12px}[data-style=glass] #glass-topbar #agent-launcher::after{display:none!important}[data-style=glass] #content{padding:18px}[data-style=glass] #module-rail{left:10px;width:58px}[data-style=glass] .glass-tools #test-preview-state{display:none}}
@media(max-width:700px){[data-style=glass] #glass-topbar{grid-template-columns:1fr auto;gap:12px}[data-style=glass] .glass-ai-slot{grid-column:1/-1;grid-row:2}[data-style=glass] #content{padding:14px;border-radius:18px}[data-style=glass] #glass-menu{left:calc(50% + 30px);max-width:calc(100vw - 100px);bottom:14px}[data-style=glass] #glass-menu>button{padding:10px}[data-style=glass] #module-rail{top:178px;bottom:94px}[data-style=glass] .glass-tools #help{display:none}[data-style=glass] body.agent-view #sidebar{display:none}[data-style=glass] body.agent-view main{margin-left:82px}}
@media(prefers-reduced-motion:reduce){[data-style=glass] #content>*{animation:none!important;transition:none!important}}
[data-style=glass] #glass-menu{width:max-content}
[data-style=glass] #glass-menu>button{width:auto;min-width:0;margin:0}
[data-style=glass] #content .metric{padding:16px;min-width:0}
[data-style=glass] #content .metric strong{overflow-wrap:anywhere}
@media(prefers-reduced-motion:no-preference){[data-style=glass] #content .wb-module{transition:box-shadow .2s,border-color .2s}[data-style=glass] #content .wb-module:hover{border-color:#fffd;box-shadow:0 10px 30px #55412a14}[data-style=glass] #glass-menu>button:hover{background:#fff7}}
/* Motion follows the actual workbench card class, including cards loaded after navigation. */
[data-style=glass] #content>.approval-management-page,[data-style=glass] #content>.workbench-modules{animation:none}
[data-style=glass] .glass-counting{position:relative;color:transparent!important}
[data-style=glass] .glass-count-visual{position:absolute;inset:0;color:var(--text);font:inherit;letter-spacing:inherit;pointer-events:none}
@media(prefers-reduced-motion:no-preference){
 [data-style=glass] #content :is(.workbench-module,.xhub-task-group > .wb-record){transition:translate .28s cubic-bezier(.2,.75,.2,1),box-shadow .28s,border-color .28s}
 [data-style=glass] #content :is(.workbench-module:not(.wb-dragging),.xhub-task-group > .wb-record):hover{translate:0 -4px;border-color:#fffe;box-shadow:0 18px 38px #55412a22,inset 0 1px #fff9}
 [data-style=glass] #glass-menu>button{transition:translate .22s,background .22s,box-shadow .22s}
 [data-style=glass] #glass-menu>button:hover{translate:0 -3px;box-shadow:0 5px 12px #55412a15}
 [data-style=glass] #module-rail .rail-button{transition:scale .2s,background .2s}
 [data-style=glass] #module-rail .rail-button:hover{scale:1.12;background:#fff8}
 [data-style=glass] #glass-menu-popup{transform-origin:bottom center;animation:glass-menu-open .26s cubic-bezier(.2,.75,.2,1)}
 :root[data-style=glass] body:not(.auth-view) #agent-panel{transition:clip-path var(--glass-drawer-motion)}
 @starting-style {
  :root[data-style=glass] body.agent-panel-open:not(.auth-view) #agent-panel{clip-path:inset(0 0 0 100% round var(--glass-shell-radius))}
 }
 :root[data-style=glass] body:not(.auth-view) #content{transition:width var(--glass-drawer-motion),translate var(--glass-drawer-motion)}
 :root[data-style=glass] #module-rail{transition:translate var(--glass-drawer-motion)}
 :root[data-style=glass] #glass-menu{transition:right var(--glass-drawer-motion),max-width var(--glass-drawer-motion)}
 :root[data-style=glass] #drawer:is(:not([hidden]),.glass-closing):not(.approval-form-editor-page){animation:glass-drawer-open var(--glass-drawer-motion) both}
 @keyframes glass-menu-open{from{opacity:0;translate:0 12px;scale:.96;filter:blur(4px)}to{opacity:1;translate:0 0;scale:1;filter:blur(0)}}
 @keyframes glass-drawer-open{
  from{transform:translateX(calc(-100% - 60px))}
  to{transform:none}
 }
}
/* The top status bar spans the content area with fully rounded ends. */
:root[data-style=glass] #glass-topbar{max-width:none;width:100%;border-radius:999px;padding-left:22px;padding-right:22px}
@media(max-width:700px){:root[data-style=glass] #glass-topbar{border-radius:30px;padding-left:16px;padding-right:16px}}

:root[data-style=glass] #glass-topbar{margin-left:0;margin-right:0}
@media(max-width:700px){:root[data-style=glass] #glass-topbar{grid-template-columns:minmax(0,1fr) auto;gap:10px}:root[data-style=glass] #glass-topbar .glass-user-copy{display:none}}
:root[data-style=glass]{--glass-status-inset:126px}
:root[data-style=glass] #glass-topbar{width:calc(100vw - 2 * var(--glass-status-inset));max-width:none}
@media(max-width:1100px){:root[data-style=glass]{--glass-status-inset:100px}}
/* One outer-frame width and corner radius for the glass workspace. */
:root[data-style=glass]{--glass-shell-radius:40px;--glass-shell-width:calc(100vw - 2 * var(--glass-status-inset))}
:root[data-style=glass] body:not(.auth-view) :is(#glass-topbar,#content){width:var(--glass-shell-width);max-width:none;margin-left:0;margin-right:0;border-radius:var(--glass-shell-radius)}
:root[data-style=glass] :is(#module-rail,#glass-menu){border-radius:var(--glass-shell-radius)}
:root[data-style=glass] body:not(.auth-view) #content{
  position:relative;
  z-index:2;
  width:calc(var(--glass-shell-width) - var(--glass-ai-reveal) + var(--glass-ai-shift));
  translate:calc(0px - var(--glass-ai-shift)) 0;
}
:root[data-style=glass] #module-rail{translate:calc(0px - var(--glass-ai-shift)) 0}
/* Floating bars use the glass surface alone, without an outline. */
:root[data-style=glass] :is(#glass-topbar,#module-rail,#glass-menu){border-color:transparent;box-shadow:0 10px 35px #55412a12}
/* The main glass frame also has no outline or inset highlight. */
:root[data-style=glass] body:not(.auth-view) #content{border-color:transparent;box-shadow:0 20px 65px #55412a16}
/* Compact top status bar. */
:root[data-style=glass] #glass-topbar{min-height:60px;padding-top:8px;padding-bottom:8px;gap:16px}
:root[data-style=glass] #glass-topbar #profile .avatar{width:34px;height:34px;flex-basis:34px}
:root[data-style=glass] #glass-topbar #agent-launcher{height:38px}
:root[data-style=glass] #glass-topbar .glass-user-copy{gap:3px}
:root[data-style=glass] #glass-topbar #profile .avatar{width:40px;height:40px;flex-basis:40px}
:root[data-style=glass] #glass-topbar #profile .avatar{width:44px;height:44px;flex-basis:44px}
:root[data-style=glass] #glass-topbar{padding-top:7px;padding-bottom:7px}
:root[data-style=glass] #glass-topbar #profile .avatar{width:48px;height:48px;flex-basis:48px}
:root[data-style=glass] #glass-topbar{padding-top:5px;padding-bottom:5px}
/* Match the avatar's left inset to its vertical inset inside the status bar. */
:root[data-style=glass] #glass-topbar{padding-left:5px}
/* Give the three navigation bars a deeper shared glass tint. */
:root[data-style=glass] :is(#glass-topbar,#module-rail,#glass-menu){background:rgba(181,166,145,.52)}
/* Real background artwork and lower-opacity glass reveal the scene through every layer. */
:root[data-style=glass] body:not(.auth-view)::before{inset:-14px;background-image:var(--glass-wallpaper,url('/background-warm.svg'));background-position:center;background-size:cover;filter:none;transform:scale(1.02)}
:root[data-style=glass] body:not(.auth-view)::after{content:none}
:root[data-style=glass] body:not(.auth-view) #content{background:rgba(255,255,255,.025);backdrop-filter:blur(6px) saturate(1.18);box-shadow:0 20px 65px #30241812}
:root[data-style=glass] :is(#glass-topbar,#module-rail,#glass-menu){background:rgba(255,255,255,.13);backdrop-filter:blur(18px) saturate(1.3)}
:root[data-style=glass] #content :is(.panel,.workbench-module,.metric,.card,.approval-center-card){background:rgba(255,255,255,.09);backdrop-filter:blur(15px) saturate(1.18);border-color:transparent;box-shadow:0 8px 26px #3024180b}
:root[data-style=glass] #content .metrics{gap:12px;padding:0;background:none;border:0;box-shadow:none;backdrop-filter:none}
:root[data-style=glass] #content :is(.module-intro,.note){background:rgba(255,255,255,.18)}
:root[data-style=glass] #content :is(.table-wrap,table){background:rgba(255,255,255,.12)}
:root[data-style=glass] #content th{background:rgba(255,255,255,.20)}
:root[data-style=glass] #content :is(.input,.workspace-select-trigger){background:rgba(255,255,255,.4)}
:root[data-style=glass] .workspace-select .select-surface{background:transparent;border-color:rgba(255,255,255,.4)}
:root[data-style=glass] .workspace-select :is(.select-trigger,#catalog-category),
:root[data-style=glass] .workspace-select :is(.select-options,#category-options),
:root[data-style=glass] :is(#content,#drawer) :is(.date-range-trigger,input[data-workspace-date]),
:root[data-style=glass] :is(.workspace-person-portal,.date-range-panel),
:root[data-style=glass] #content .btn:not(.entry-icon){
  background:rgba(255,255,255,.24);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
  backdrop-filter:blur(14px) saturate(1.15);
}
/* An expanded menu covers other fields. Continue the same highlight across its two parts. */
:root[data-style=glass] .workspace-select.open :is(.select-trigger,#catalog-category,.select-options,#category-options),
:root[data-style=glass] :is(#content,#drawer) :is(.date-range-trigger,input[data-workspace-date])[aria-expanded=true],
:root[data-style=glass] :is(.workspace-person-portal,.date-range-panel){
  background:linear-gradient(90deg,rgba(255,255,255,.28),transparent 85%) #f6f3ee;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
:root[data-style=glass] .workspace-select .select-options button[aria-selected=true]{background:rgba(255,255,255,.46)}
:root[data-style=glass] .workspace-select .select-options button:is(:hover,:focus-visible){background:rgba(255,255,255,.58)}
:root[data-style=glass] :is(#content,#drawer) :is(.toolbar,.approval-analysis-toolbar,.approval-catalog-toolbar,.approval-data-toolbar,.approval-record-filters) :is(input,button,select,.select-surface,.select-options),
:root[data-style=glass] .workspace-select :is(.select-surface,.select-options),
:root[data-style=glass] :is(.date-range-trigger,.date-range-panel,.workspace-person-portal){
  border-color:transparent;
}
.account-background-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
#account-preferences-form .account-background-choice{display:block;position:relative;margin:0;cursor:var(--workspace-pointer,pointer);border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--canvas)}
.account-background-choice:has(input:checked){outline:2px solid var(--text);outline-offset:2px}
.account-background-choice input{position:absolute;right:10px;top:10px;z-index:1;accent-color:#695d51}
.account-background-picker[hidden]{display:none!important}
.account-background-choice img{display:block;width:100%;aspect-ratio:1.7;object-fit:cover}
.account-background-choice span{display:block;padding:9px 11px}
#account-preferences-form .background-upload{display:inline-flex;cursor:var(--workspace-pointer,pointer);margin:4px 0 10px;padding:9px 14px}
.background-upload-status{margin-top:8px;color:var(--secondary)}
:root[data-style=glass] #glass-topbar{padding-left:8px;padding-right:9px}
:root[data-style=glass] .glass-tools #test-preview-state:empty{display:none}
.account-background-choice[hidden],.background-upload input[hidden]{display:none!important}
/* Straddle the main panel edge with half of the module rail on each side. */
:root[data-style=glass] #module-rail{left:calc(var(--glass-status-inset) - 30px);top:150px}
@media(max-width:1100px){:root[data-style=glass] #module-rail{left:calc(var(--glass-status-inset) - 29px)}}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:210px}}
:root[data-style=glass] #module-rail{top:180px}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:240px}}
/* Keep the rail anchored at the chosen top, with one continuous icon stack. */
:root[data-style=glass] #module-rail{bottom:auto;height:auto;max-height:calc(100dvh - 204px);gap:6px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;overscroll-behavior:contain}
:root[data-style=glass] #module-rail #section-nav{flex:none;overflow:visible}
:root[data-style=glass] #module-rail .rail-bottom{margin-top:0}
:root[data-style=glass] #module-rail :is(.rail-bottom,#rail-system){gap:6px}
@media(max-width:700px){:root[data-style=glass] #module-rail{max-height:calc(100dvh - 264px)}}
/* Circular icon targets throughout the floating module rail. */
:root[data-style=glass] #module-rail .rail-button{width:40px;height:40px;min-height:40px;flex-basis:40px;border-radius:50%}
/* Larger white circular module buttons. */
:root[data-style=glass] #module-rail .rail-button{width:46px;height:46px;min-height:46px;flex-basis:46px;border-radius:50%;background:#fff;color:#625a50}
:root[data-style=glass] #module-rail .rail-button:hover,:root[data-style=glass] #module-rail .rail-button.active{background:#fff;color:#332c25;box-shadow:0 3px 12px #40362625}
/* White glyphs at rest; a white circular surface and gray glyph on hover. */
:root[data-style=glass] #module-rail .rail-button,:root[data-style=glass] #module-rail .rail-button.active{background:transparent;color:#fff;box-shadow:none}
:root[data-style=glass] #module-rail .rail-button:hover,:root[data-style=glass] #module-rail .rail-button:focus-visible{background:#fff;color:#625a50;box-shadow:0 3px 12px #40362625}
/* Keep the currently open module highlighted after the pointer leaves. */
:root[data-style=glass] #module-rail .rail-button.glass-rail-highlight{background:#fff;color:#625a50;box-shadow:0 3px 12px #40362625}
:root[data-style=glass] #module-rail{top:170px;max-height:calc(100dvh - 194px)}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:230px;max-height:calc(100dvh - 254px)}}
:root[data-style=glass] #module-rail{top:160px;max-height:calc(100dvh - 184px)}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:220px;max-height:calc(100dvh - 244px)}}
/* Keep the rail anchored; raise only its individual circular icon buttons. */
:root[data-style=glass] #module-rail{top:180px;max-height:calc(100dvh - 204px)}
:root[data-style=glass] #module-rail .rail-button{position:relative;top:-6px}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:240px;max-height:calc(100dvh - 264px)}}
:root[data-style=glass] #module-rail{top:170px;max-height:calc(100dvh - 194px)}
@media(max-width:700px){:root[data-style=glass] #module-rail{top:230px;max-height:calc(100dvh - 254px)}}
/* Shorten the rail from its bottom without moving the icon stack. */
:root[data-style=glass] #module-rail{padding-bottom:4px}
:root[data-style=glass] #module-rail{padding-bottom:0}
/* Approved invariant: preserve ~7px at BOTH ends for any permitted icon count.
   Keep natural rail height and a continuous stack; see UI_RULES.md. */
/* Keep the floating bottom menu, without the workspace footer text. */
:root[data-style=glass] body:not(.auth-view) main>footer{display:none}
/* Extend only the bottom edge of the floating menu. */
:root[data-style=glass] #glass-menu{bottom:14px;padding-bottom:19px}
@media(max-width:700px){:root[data-style=glass] #glass-menu{bottom:6px;padding-bottom:17px}}
/* Restore the bottom menu; extend the central content frame instead. */
:root[data-style=glass] #glass-menu{bottom:24px;padding-bottom:9px}
@media(max-width:700px){:root[data-style=glass] #glass-menu{bottom:14px;padding-bottom:9px}}
:root[data-style=glass] body:not(.auth-view) #content{min-height:calc(100dvh - 220px)}
/* Extend the main frame to the middle of the unchanged floating bottom menu. */
:root[data-style=glass] body:not(.auth-view) #content{min-height:calc(100dvh - 160px)}
@media(min-width:701px) and (max-width:1100px){:root[data-style=glass] body:not(.auth-view) #content{min-height:calc(100dvh - 154px)}}
@media(max-width:700px){:root[data-style=glass] body:not(.auth-view) #content{min-height:calc(100dvh - 196px)}}
/* Mirror the current module at the right end of the bottom navigation. */
:root[data-style=glass] #glass-menu{align-items:center}
:root[data-style=glass] #glass-menu .glass-current-module{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;margin-left:8px;position:sticky;right:0;z-index:1;background:#fff;color:#625a50;border-radius:50%;box-shadow:0 3px 12px #40362620}
:root[data-style=glass] #glass-menu .glass-current-module svg{width:20px;height:20px}
:root[data-style=glass] #glass-menu .glass-current-module{width:46px;height:46px;flex-basis:46px}
/* Match the selected module's appearance in both navigation bars. */
:root[data-style=glass] #module-rail .rail-button.glass-rail-highlight,
:root[data-style=glass] #glass-menu .glass-current-module{background:#fff;color:#625a50;box-shadow:0 3px 12px #40362625;border:0;border-radius:50%}
:root[data-style=glass] #glass-menu .glass-current-module svg{display:block;width:20px;height:20px;stroke-width:1.6;flex:none}
/* The horizontal bar is as tall as the vertical rail is wide. */
:root[data-style=glass]{--glass-navigation-thickness:60px}
:root[data-style=glass] #module-rail{width:var(--glass-navigation-thickness)}
:root[data-style=glass] #glass-menu{height:var(--glass-navigation-thickness);padding-top:0;padding-bottom:0;align-items:center}
@media(max-width:1100px){:root[data-style=glass]{--glass-navigation-thickness:58px}}
/* Match the horizontal end inset to the vertical rail's approved ~7px end inset. */
:root[data-style=glass] #glass-menu{padding-right:6px}
:root[data-style=glass] #glass-menu:has(>.glass-current-module:only-child){width:var(--glass-navigation-thickness);padding-left:0;justify-content:flex-end}
:root[data-style=glass] #glass-menu .glass-current-module:only-child{margin-left:0}
/* Bottom menu uses the same white-at-rest and white-surface selection language. */
:root[data-style=glass]{--glass-menu-label:#fff;--glass-menu-label-hover:#625a50;--glass-menu-label-selected:#302923}
:root[data-style=glass] #glass-menu>button{color:var(--glass-menu-label);background:transparent;box-shadow:none}
:root[data-style=glass] #glass-menu>button:is(.active,.parent-active,[aria-expanded=true],:hover,:focus-visible){background:#fff;color:var(--glass-menu-label-hover);box-shadow:0 3px 12px #40362625}
:root[data-style=glass] #glass-menu>button,
:root[data-style=glass] .glass-heading-controls :is(button,.btn),
:root[data-style=glass] [data-erp-match-open]{font:400 14px/20px var(--font)}
/* Right-align the whole bottom bar with the main glass frame. */
:root[data-style=glass] #glass-menu{
  left:auto;
  right:calc(var(--glass-status-inset) + 72px + var(--glass-ai-reveal));
  transform:none;
  max-width:calc(var(--glass-shell-width) - var(--glass-ai-reveal) + var(--glass-ai-shift));
}
/* During expansion the module badge stays fixed at the right anchor. */
:root[data-style=glass] #glass-menu.glass-menu-unfolding .glass-current-module{position:absolute;right:6px;top:50%;transform:translateY(-50%);margin-left:0}
:root[data-style=glass] #content>.glass-content-section{font-size:20px;font-weight:600;line-height:28px;letter-spacing:0;margin:0 0 18px;padding:12px 4px 0;color:var(--text)}
:root[data-style=glass] #content>.glass-content-intro{padding:32px 16px 24px;margin:0 0 6px}
:root[data-style=glass] .glass-content-intro>.glass-content-section{font-size:20px;font-weight:600;line-height:28px;letter-spacing:0;margin:0;padding:0;color:var(--text)}
:root[data-style=glass] .glass-content-intro>.glass-content-description{font-size:12px;line-height:20px;margin:6px 0 0;color:var(--secondary)}
:root[data-style=glass] #content>.glass-content-intro{padding-left:28px}
/* One alignment line for the module heading and the content/card region. */
:root[data-style=glass]{--glass-content-default-inset:26px}
:root[data-style=glass] body:not(.auth-view) #content{padding-left:var(--glass-content-left-inset,var(--glass-content-default-inset))}
@media(max-width:1100px){:root[data-style=glass]{--glass-content-default-inset:18px}}
@media(max-width:700px){:root[data-style=glass]{--glass-content-default-inset:14px}}
/* The module rail belongs to the document flow coordinates, so it scrolls with the panel. */
:root[data-style=glass] #module-rail{position:absolute}
/* Fixed workspace shell: only the content beneath the sticky intro scrolls. */
:root[data-style=glass]:has(> body:not(.auth-view)){scrollbar-gutter:auto;overflow:hidden}
:root[data-style=glass] body:not(.auth-view){height:100dvh;overflow:hidden}
:root[data-style=glass] body:not(.auth-view) main{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:visible;padding-bottom:54px}
:root[data-style=glass] #glass-topbar{flex-shrink:0}
:root[data-style=glass] body:not(.auth-view) #content{flex:1 1 0;min-height:0;max-height:none;height:auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#766c5b55 transparent;padding-top:0}
:root[data-style=glass] #content>.glass-content-intro{position:sticky;top:0;z-index:10;flex:none;background:rgba(241,242,235,.28);backdrop-filter:blur(20px);border-radius:0 0 14px 14px}
:root[data-style=glass] #module-rail{position:fixed}
@media(max-width:700px){:root[data-style=glass] body:not(.auth-view) main{padding-bottom:43px}}
/* Keep the intro pinned without a separate card or frosted backing. */
:root[data-style=glass] #content>.glass-content-intro{background:transparent;backdrop-filter:none;box-shadow:none;border:0;border-radius:0}
/* Match the existing Sales Overview heading typography. */
:root[data-style=glass] .glass-content-intro>.glass-content-section{font-family:inherit;font-size:var(--adaptive-page-title,24px);font-weight:400;line-height:28px;letter-spacing:0;color:var(--text)}
:root[data-style=glass] .glass-content-intro>.glass-content-description{font-family:inherit;font-size:var(--adaptive-body,14px);font-weight:400;line-height:22px;letter-spacing:0;color:var(--secondary)}
/* Current menu's second-level pages live on the right of the pinned heading. */
:root[data-style=glass] #content>.glass-content-intro{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px;padding-right:var(--glass-content-scrollbar-width,0px)}
:root[data-style=glass] .glass-content-intro>.glass-content-section{grid-column:1;grid-row:1}
:root[data-style=glass] .glass-content-intro>.glass-content-description{grid-column:1;grid-row:2}
:root[data-style=glass] .glass-content-actions{grid-column:2;grid-row:1/span 2;display:flex;align-items:center;justify-content:flex-end;gap:8px;align-self:center}
:root[data-style=glass] .glass-content-actions>button{width:auto;min-height:36px;padding:8px 14px;margin:0;border:1px solid transparent;border-radius:12px;background:#ffffff30;color:var(--text);white-space:nowrap;transition:background .18s,box-shadow .18s}
:root[data-style=glass] .glass-content-actions>button:is(.active,:hover,:focus-visible){background:#fff;color:#625a50;box-shadow:0 3px 12px #40362615}
@media(max-width:900px){:root[data-style=glass] #content>.glass-content-intro{grid-template-columns:minmax(0,1fr)}:root[data-style=glass] .glass-content-actions{grid-column:1;grid-row:3;justify-content:flex-start;flex-wrap:wrap;margin-top:12px}}
/* The pinned module heading and tabs replace the duplicate Sales Overview copy. */
:root[data-style=glass] #content[data-glass-page=salesoverview] .heading>div:first-child{display:none}
:root[data-style=glass] #content[data-glass-page=salesoverview] .heading{justify-content:flex-end;margin-bottom:16px}
/* Put page operations after the second-level navigation, at the far right. */
:root[data-style=glass] .glass-heading-controls{grid-column:2;grid-row:1/span 2;align-self:center;display:flex;align-items:center;justify-content:flex-end;gap:12px}
:root[data-style=glass] .glass-heading-controls>.glass-content-actions{margin:0}
:root[data-style=glass] .glass-heading-controls>.glass-page-actions{display:flex;align-items:center;gap:8px;margin:0}
:root[data-style=glass] #content[data-glass-page=salesoverview] .heading.glass-actions-relocated{display:none}
@media(max-width:900px){:root[data-style=glass] .glass-heading-controls{grid-column:1;grid-row:3;justify-content:flex-end;flex-wrap:wrap;margin-top:12px}:root[data-style=glass] .glass-heading-controls>.glass-page-actions{margin-left:auto}}
@media(min-width:901px){
  :root[data-style=glass] .glass-heading-controls{align-self:end;align-items:flex-end}
  :root[data-style=glass] .glass-heading-controls>.glass-content-actions{align-self:flex-end}
}
/* Pill-shaped white backgrounds for bottom menu buttons. */
:root[data-style=glass] #glass-menu>button{border-radius:999px}
:root[data-style=glass] #glass-menu>button:is(.active,.parent-active,[aria-current=page]){color:var(--glass-menu-label-selected)}
/* All secondary pages share the pinned module heading; remove duplicate page headings. */
:root[data-style=glass] #content :is(.heading,.approval-management-heading){display:none}
/* Reserve the internal scrollbar gutter before async data arrives. */
:root[data-style=glass] body:not(.auth-view) #content{scrollbar-gutter:stable;overflow-anchor:none}
@supports not (scrollbar-gutter:stable){:root[data-style=glass] body:not(.auth-view) #content{overflow-y:scroll}}
/* Narrow, inset scroll tracks for content and its scrollable cards. */
:root[data-style=glass] #content,:root[data-style=glass] #content :is(.workbench-module,.table-wrap){scrollbar-width:auto;scrollbar-color:auto}
:root[data-style=glass] #content::-webkit-scrollbar,:root[data-style=glass] #content :is(.workbench-module,.table-wrap)::-webkit-scrollbar{width:4px;height:4px}
:root[data-style=glass] #content::-webkit-scrollbar-track,:root[data-style=glass] #content :is(.workbench-module,.table-wrap)::-webkit-scrollbar-track{background:transparent;margin-block:18px;margin-inline:12px}
:root[data-style=glass] #content::-webkit-scrollbar-thumb,:root[data-style=glass] #content :is(.workbench-module,.table-wrap)::-webkit-scrollbar-thumb{background:#766c5b55;border-radius:999px}
:root[data-style=glass] #content::-webkit-scrollbar-thumb:hover,:root[data-style=glass] #content :is(.workbench-module,.table-wrap)::-webkit-scrollbar-thumb:hover{background:#766c5b88}
:root[data-style=glass] #content::-webkit-scrollbar-button,:root[data-style=glass] #content :is(.workbench-module,.table-wrap)::-webkit-scrollbar-button{display:none;width:0;height:0}
@supports not selector(::-webkit-scrollbar){:root[data-style=glass] #content,:root[data-style=glass] #content :is(.workbench-module,.table-wrap){scrollbar-width:thin;scrollbar-color:#766c5b55 transparent}}
/* Restrict the scrollbar's travel area to the card region, below the fixed intro. */
:root[data-style=glass] body:not(.auth-view) #content{display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}
:root[data-style=glass] #content>.glass-content-intro{position:relative;top:auto;flex-shrink:0}
:root[data-style=glass] #content>.glass-content-scroll{flex:1 1 0;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:auto}
@media(prefers-reduced-motion:no-preference){
 /* Move the heading's 6px gap inside the scrollport so the first row can lift. */
 :root[data-style=glass] #content[data-glass-page=home]>.glass-content-intro{margin-bottom:0}
 :root[data-style=glass] #content[data-glass-page=home]>.glass-content-scroll{padding-top:6px}
}
:root[data-style=glass] .glass-content-scroll::-webkit-scrollbar{width:4px;height:4px}
:root[data-style=glass] .glass-content-scroll::-webkit-scrollbar-track{background:transparent;margin-top:18px;margin-bottom:18px}
:root[data-style=glass] .glass-content-scroll::-webkit-scrollbar-thumb{background:#766c5b55;border-radius:999px}
:root[data-style=glass] .glass-content-scroll::-webkit-scrollbar-thumb:hover{background:#766c5b88}
:root[data-style=glass] .glass-content-scroll::-webkit-scrollbar-button{display:none;width:0;height:0}
@supports not selector(::-webkit-scrollbar){:root[data-style=glass] #content>.glass-content-scroll{scrollbar-width:thin;scrollbar-color:#766c5b55 transparent}}
/* Keep the scrollbar at the original panel-right edge while limiting its vertical travel. */
:root[data-style=glass]{--glass-content-right-inset:26px}
:root[data-style=glass] #content>.glass-content-scroll{margin-right:calc(-1 * var(--glass-content-right-inset));padding-right:var(--glass-content-right-inset)}
@media(max-width:1100px){:root[data-style=glass]{--glass-content-right-inset:18px}}
@media(max-width:700px){:root[data-style=glass]{--glass-content-right-inset:14px}}
/* The inner buttons follow the rounded corners of the segmented control. */
:root[data-style=glass]:not([data-dark-wallpaper]) .glass-heading-controls>.glass-content-actions{--glass-menu-label:#443e37;--glass-menu-label-hover:#302923;--glass-menu-label-selected:#211c17}
:root[data-style=glass] .glass-heading-controls>.glass-content-actions{display:flex;gap:4px;padding:2px 4px;border-radius:10px;background:rgba(255,255,255,.5);box-shadow:0 3px 12px #4036260b}
@media(min-width:901px){
  :root[data-style=glass] .glass-content-intro>.glass-content-description{text-box:trim-end text ideographic-ink}
}
:root[data-style=glass] .glass-heading-controls .glass-content-actions>button{height:calc(var(--page-action-height) - 4px);min-height:calc(var(--page-action-height) - 4px);padding:5px 14px;border-radius:var(--page-action-radius);background:transparent;color:var(--glass-menu-label);box-shadow:none}
:root[data-style=glass] .glass-heading-controls .glass-content-actions>button:is(:hover,:focus-visible){background:rgba(255,255,255,.5);color:var(--glass-menu-label-hover);box-shadow:none}
:root[data-style=glass] :is(.btn.primary,.agent-send,.range-day.range-edge,.node-path-step.active b){background:var(--glass-action-bg);border-color:var(--glass-action-bg);color:var(--text)}
:root[data-style=glass] .glass-heading-controls .glass-content-actions>button.active,
:root[data-style=glass] .glass-heading-controls .glass-page-actions :is(button,.btn),
:root[data-style=glass] #drawer .btn.page-action,
:root[data-style=glass] [data-erp-match-open]{background:var(--glass-action-bg);border-color:var(--glass-action-bg);color:var(--glass-menu-label-selected)}
:root[data-style=glass] .glass-heading-controls .glass-content-actions>button.active{box-shadow:0 2px 7px #0002}
:root[data-style=glass] .glass-heading-controls .glass-page-actions :is(button,.btn),
:root[data-style=glass] [data-erp-match-open],
:root[data-style=glass] .account-bulk-actions .btn{height:var(--page-action-height);min-height:var(--page-action-height);border-radius:var(--page-action-radius)}
:root[data-style=glass] :is(.btn.primary,.agent-send):not(:disabled):hover,
:root[data-style=glass] .glass-heading-controls .glass-page-actions :is(button,.btn):not(:disabled):hover,
:root[data-style=glass] #drawer .btn.page-action:not(:disabled):hover,
:root[data-style=glass] [data-erp-match-open]:not(:disabled):hover{background:var(--glass-action-hover);border-color:var(--glass-action-hover)}
:root[data-style=glass] #content .btn:not(.entry-icon):enabled:hover{background:rgba(255,255,255,.42)}
/* Fill the whole filter height with glass, including the first and last painted pixels. */
:root[data-style=glass] #content :is(.toolbar,.approval-catalog-toolbar,.approval-data-toolbar) .workspace-select .select-surface{border:0}
:root[data-style=glass] #content :is(.toolbar,.approval-catalog-toolbar,.approval-data-toolbar) .workspace-select .select-trigger{height:var(--filter-control-height)}
:root[data-style=glass] #content :is(.toolbar,.approval-catalog-toolbar,.approval-data-toolbar) .workspace-select .select-options{top:100%;left:0;right:0}
:root[data-style=glass] #content .entry-targets .name-search-select.open .select-surface{
 background:linear-gradient(105deg,rgba(255,255,255,.28),transparent 85%) #f6f3ee;
 border-color:transparent
}

/* Surfaces over a dark wallpaper use light ink. */
:root[data-style=glass][data-dark-wallpaper]{
  --glass-light-ink:var(--text);
  --glass-light-secondary:var(--secondary);
  --glass-light-canvas:var(--canvas);
  --glass-dark-surface:rgba(25,33,43,.77);
  --glass-dark-control:#35404c;
}
:root[data-style=glass][data-dark-wallpaper] :is(#content,#glass-topbar){
  --text:#f4f6fa;
  --secondary:#cbd3dc;
  --muted:var(--secondary);
  --canvas:#26303b;
  --surface:#2c3641;
  --hover:#374350;
  --selected:#42505e;
  --line:#ffffff30;
  color:var(--text);
  color-scheme:dark;
}
:root[data-style=glass][data-dark-wallpaper] body:not(.auth-view) #content{background:rgba(16,23,32,.33)}
:root[data-style=glass][data-dark-wallpaper] :is(#glass-topbar,#glass-menu,#module-rail){background:rgba(71,77,85,.51)}
:root[data-style=glass][data-dark-wallpaper] #glass-topbar :is(#agent-launcher,.glass-expand){background:var(--glass-dark-control);color:var(--text)}
:root[data-style=glass][data-dark-wallpaper] #glass-topbar #agent-launcher::after{opacity:1;color:var(--secondary)}
:root[data-style=glass][data-dark-wallpaper] #content :is(.panel,.metric,.card,.approval-center-card,.module-intro,.note,.table-wrap,table){
  background:var(--glass-dark-surface);color:var(--text);
}
:root[data-style=glass][data-dark-wallpaper] #content :is(.panel,.workbench-module,.metric,.card,.approval-center-card){background:rgba(25,33,43,.60)}
:root[data-style=glass][data-dark-wallpaper] #content :is(th,.erp-date,.empty){color:var(--secondary)}
:root[data-style=glass][data-dark-wallpaper] #content th{background:#303b47}
:root[data-style=glass][data-dark-wallpaper] #content :is(.input,.select-trigger,:where(#catalog-category),.date-range-trigger,input[data-workspace-date],.btn:not(.primary)),
:root[data-style=glass][data-dark-wallpaper] #content .btn:not(.entry-icon):enabled:hover{
  background:var(--glass-dark-control);color:var(--text);
}
:root[data-style=glass][data-dark-wallpaper] #content .input::placeholder{color:var(--secondary)}
:root[data-style=glass][data-dark-wallpaper] #content .tabs button.active{color:var(--text)}
:root[data-style=glass][data-dark-wallpaper] #content .glass-heading-controls>.glass-content-actions{background:var(--glass-dark-control)}
:root[data-style=glass][data-dark-wallpaper] #content :is(.workspace-select.open,.date-range-panel,.workspace-person-portal,.approval-center-record.panel,.pill.neutral){
  --text:var(--glass-light-ink);--secondary:var(--glass-light-secondary);--canvas:var(--glass-light-canvas);
  --hover:#eee;--selected:#e7e7e7;color:var(--text);color-scheme:light;
}
:root[data-style=glass][data-dark-wallpaper] #content :is(.workspace-select.open .select-trigger,.workspace-select.open #catalog-category,.date-range-trigger[aria-expanded=true],input[data-workspace-date][aria-expanded=true],.approval-center-record.panel,.pill.neutral){background:var(--glass-light-canvas);color:var(--glass-light-ink)}
:root[data-style=glass][data-dark-wallpaper] #drawer .btn.page-action,
:root[data-style=glass][data-dark-wallpaper] #content :is(.btn.primary,.range-day.range-edge,.node-path-step.active b,.glass-page-actions .btn,[data-erp-match-open]){
  background:var(--glass-action-bg);color:var(--glass-light-ink);
}
:root[data-style=glass][data-dark-wallpaper] #content .glass-content-actions>button.active{color:var(--glass-light-ink)}
:root[data-style=glass][data-dark-wallpaper] #content .sales-trend-line.ordered{stroke:var(--text)}
:root[data-style=glass][data-dark-wallpaper] #content :is(.sales-trend-dot.ordered,.sales-trend-legend .ordered){fill:var(--text);background:var(--text)}

/* Keep the palette local to the open sheet and the menus it owns. */
:root[data-dark-wallpaper][data-style] :is(#drawer,#agent-panel,#account-popover,[data-sheet-popup]){
  --canvas:#252d37;
  --surface:#2d3742;
  --text:#f2f4f7;
  --secondary:#c1cbd5;
  --muted:var(--secondary);
  --line:#ffffff2c;
  --hover:#38434f;
  --selected:#455362;
  --ui-accent:#c5d3e1;
  --sheet-control:#36414d;
  color:var(--text);
  color-scheme:dark;
  background:var(--sheet-background,rgba(27,34,43,.95));
  border-color:var(--line);

  & :is(.panel,.table-wrap,.upload,.interface-style-choice,.account-background-choice,.note,.module-intro,.pill.neutral){
    background:var(--surface);
    border-color:var(--line);
  }
  & :is(.note,.empty,.interface-style-choice small,.interface-style-group h3,.background-upload-status,th){
    color:var(--secondary);
  }
  & th{background:var(--surface)}
  & :is(.input,.select-trigger,.date-range-trigger,input[data-workspace-date],.btn,.close){
    background:var(--sheet-control);
    color:var(--text);
    border-color:var(--line);
  }
  & :is(input,textarea)::placeholder{color:var(--secondary);opacity:1}
  & :is(.btn,.close):enabled:hover{background:var(--selected)}
  & :is(.btn.primary,.agent-send,.range-day.range-edge){
    background:var(--text);
    color:var(--canvas);
  }
  & .btn.primary:enabled:hover{background:#dce4ec;color:var(--canvas)}
  & .select-options, & .workspace-select.open .select-trigger, & .select-trigger[aria-expanded=true]{
    background:var(--sheet-control);
    color:var(--text);
    border-color:var(--line);
  }
  & .select-options button:is(:hover,:focus-visible,[aria-selected=true]){background:var(--selected)}
  & :is(.account-background-choice,.interface-style-choice):has(input:checked){outline-color:var(--ui-accent)}
  & input:is([type=radio],[type=checkbox]){accent-color:var(--ui-accent)}
  & .danger{color:#ffacaa!important}
  & .required-mark{color:#ffacaa}
}
:root[data-style][data-dark-wallpaper] [data-sheet-popup]{--sheet-background:var(--canvas)}
:root[data-style][data-dark-wallpaper] #agent-panel #agent-chat-form{background:var(--sheet-control);border-color:var(--line)}
:root[data-style][data-dark-wallpaper] #agent-panel #agent-chat-form textarea{background:transparent;color:var(--text)}

/* Content actions use the inventory filter button surface in both wallpaper modes. */
:root[data-style=glass] #content .btn:not(.entry-icon) {
  background: rgba(255,255,255,.24);
  color: var(--text);
  border: 0;
  border-radius: 10px;
  box-shadow: none;
}
:root[data-style=glass] #content .btn:not(.entry-icon):enabled:hover {background:rgba(255,255,255,.42)}
:root[data-style=glass][data-dark-wallpaper] #content .btn:not(.entry-icon),
:root[data-style=glass][data-dark-wallpaper] #content .btn:not(.entry-icon):enabled:hover {background:var(--glass-dark-control);color:var(--text)}

:root[data-style=glass] .glass-heading-controls{min-width:0;max-width:100%;flex-wrap:wrap}
:root[data-style=glass] .glass-heading-controls>.glass-page-actions{order:0;flex-wrap:wrap;justify-content:flex-end}
:root[data-style=glass] .glass-heading-controls>.glass-content-actions{order:1;min-width:0;max-width:100%;overflow:visible;flex-wrap:wrap;margin-left:auto}
:root[data-style=glass] .glass-heading-controls>.glass-content-actions>button{flex:none;white-space:nowrap}

:root[data-style=glass] #content .glass-heading-controls>.glass-page-actions :is(button,.btn){
  box-sizing:border-box;
  height:var(--page-action-height);
  min-height:var(--page-action-height);
}

@media (prefers-reduced-motion:no-preference){
  :root[data-style=glass] .glass-heading-controls.glass-tertiary-enter{
    animation:glass-tertiary-open 420ms cubic-bezier(.22,.8,.2,1) backwards;
  }
  @keyframes glass-tertiary-open{
    from{transform:translateX(calc(100% + 8px))}
    to{transform:translateX(0)}
  }
}


:root[data-style=glass] .glass-heading-controls:has(>.glass-content-actions){
  overflow:clip;
  overflow-clip-margin:4px;
}

:root[data-style=glass] #content .glass-heading-controls>.glass-content-actions{
  height:auto;min-height:var(--page-action-height);
  padding-block:0;border:0;
  align-items:center;
}

:root[data-style=glass] #content .glass-heading-controls>.glass-content-actions>button.active{
  position:relative;
  isolation:isolate;
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
:root[data-style=glass] #content .glass-heading-controls>.glass-content-actions>button.active::before{
  content:"";
  position:absolute;
  inset:3px 0;
  z-index:-1;
  pointer-events:none;
  background:#fff;
  border-radius:var(--page-action-radius);
  box-shadow:0 1px 4px #0002;
}

:root[data-style=glass] .glass-content-intro:has(.glass-content-actions)>.glass-content-description{
  display:none;
}

/* Leave the bottom row's shadows inside the scroll viewport. */
:root[data-style=glass] #content[data-glass-page=home]>.glass-content-scroll{
  margin-bottom:calc(-1 * var(--glass-content-default-inset));
  padding-bottom:var(--glass-content-default-inset);
}

:root[data-style=glass] #content .workspace-select .select-surface{border:0}
:root[data-style=glass] #content .workspace-select:not(.drop-up) .select-options{top:100%;left:0;right:0}

/* Let approval actions scroll clear of the floating bottom menu. */
:root[data-style=glass] body.approval-management-view #content>.glass-content-scroll{
 margin-bottom:calc(-1 * var(--glass-content-default-inset));
 padding-bottom:calc(var(--glass-content-default-inset) + var(--glass-process-menu-clearance,0px));
}

:root[data-style=glass] #drawer.drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page){
 background-color:rgba(246,244,239,.35);
}
:root[data-style=glass][data-dark-wallpaper] #drawer.drawer:not(.process-editor-page,.process-preview-page,.approval-form-editor-page){
 background-color:rgba(27,34,43,.72);
}
:root[data-style=glass] body #drawer.drawer[data-columns="5"]:has(.wb-task-table){
 left:0;right:0;--glass-drawer-width:100%;
}
