.factory-workbench-shell{display:none}
.factory-workbench-shell__side{display:none}
/* 工作台壳层是跨页面共享的 UI：重置页面级通用选择器，避免业务页的
   a/img/button/span/font 规则改变导航的尺寸和排版。 */
.factory-workbench-shell,
.factory-workbench-shell *,
.factory-workbench-shell__side,
.factory-workbench-shell__side *{
  box-sizing:border-box!important;
  font-family:-apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;
  letter-spacing:normal!important;
  text-transform:none!important;
}
/* 权限菜单加载后脚本会写入 inline display，移动端必须强制保持工作台壳层隐藏。 */
@media (max-width:768px){
  .factory-workbench-shell,
  .factory-workbench-shell__side{display:none!important}
}
@media (min-width:769px){
  body.factory-workbench-page{padding-top:40px!important;padding-left:180px!important;max-width:none!important;margin:0!important}
  .factory-workbench-shell{position:fixed!important;inset:0 0 auto 0!important;height:40px!important;z-index:1000!important;display:flex!important;align-items:center!important;background:#dfe8c7!important;border-bottom:1px solid #c6d2ad!important;color:#222!important;font:14px/1.2 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;isolation:isolate!important}
  .factory-workbench-shell__title{width:84px!important;height:40px!important;margin-left:6px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;color:#222;text-decoration:none;white-space:nowrap;flex:0 0 84px!important;order:-1!important}
  .factory-workbench-shell__title span{display:inline!important;margin:0!important;padding:0!important;font:14px/1.2 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important}
  .factory-workbench-shell__toggle{width:84px!important;height:40px!important;margin-left:0!important;padding:0!important;border:0!important;background:transparent!important;cursor:pointer;display:grid!important;place-content:center!important;gap:3px!important;flex:0 0 84px!important;order:0!important}
  .factory-workbench-shell__toggle i{display:block!important;width:21px!important;height:3px!important;border-radius:2px;background:#333!important}
  .factory-workbench-shell__album{margin-left:auto!important;border:0!important;background:none!important;color:#222!important;font:inherit;cursor:pointer;white-space:nowrap;order:2!important}
  .factory-workbench-shell__expiry{height:40px!important;display:inline-flex!important;align-items:center!important;margin-left:40px!important;color:#596454!important;font:13px/1.2 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;white-space:nowrap!important;flex:0 0 auto!important;order:1!important}
  .factory-workbench-shell__actions{display:flex!important;align-items:center!important;gap:16px!important;margin:0!important;padding:0 14px!important;order:3!important;height:40px!important}
  .factory-workbench-shell__actions button,.factory-workbench-shell__actions a{display:inline-flex!important;align-items:center!important;height:40px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;color:#222!important;text-decoration:none!important;font:14px/1.2 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;cursor:pointer!important;white-space:nowrap!important}
  .factory-workbench-shell__actions img{display:inline-block!important;width:16px!important;height:16px!important;max-width:none!important;max-height:none!important;object-fit:contain!important;vertical-align:middle!important;margin:0 4px 0 0!important}
  .factory-workbench-shell__actions a.has-chat-unread img{animation:factory-shell-contact-pulse 1s ease-in-out infinite}
  @keyframes factory-shell-contact-pulse{50%{transform:scale(1.2);opacity:.55;filter:brightness(0) saturate(100%) invert(19%) sepia(97%) saturate(6127%) hue-rotate(357deg) brightness(92%) contrast(120%)}}
  .factory-workbench-shell__actions button.is-anonymous{color:#777}
  .factory-workbench-shell__actions button.is-anonymous img{filter:grayscale(1);opacity:.7}
  .factory-workbench-shell__side{position:fixed!important;top:40px!important;bottom:0!important;left:0!important;width:180px!important;z-index:999!important;display:block;overflow:auto!important;padding:10px 6px!important;margin:0!important;background:#2f789f!important;isolation:isolate!important}
  .factory-workbench-shell__grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:54px!important;gap:3px!important;margin:0!important;padding:0!important}
  .factory-workbench-shell__entry{min-width:0!important;min-height:54px!important;width:auto!important;height:54px!important;margin:0!important;padding:4px 2px!important;border-radius:4px!important;background:rgba(18,74,112,.42)!important;color:#f7fbff!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;text-align:center!important;text-decoration:none!important;font:600 12px/16px -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;overflow:hidden!important}
  .factory-workbench-shell__entry:hover{background:#266b94!important}
  .factory-workbench-shell__entry span{display:block!important;max-width:100%!important;margin:0!important;padding:0!important;font:600 12px/16px -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .factory-workbench-shell__entry img{display:block!important;width:18px!important;height:18px!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;object-fit:contain!important;filter:brightness(0) invert(1)!important}
  body.factory-workbench-sidebar-hidden{padding-left:0!important}
  body.factory-workbench-sidebar-hidden .factory-workbench-shell__side{display:none!important}
  .factory-workbench-shell [hidden],.factory-workbench-shell__side [hidden]{display:none!important}
  body.factory-workbench-album-hidden > :not(.factory-workbench-shell):not(.factory-workbench-shell__side){visibility:hidden}
  /* 页面自身的吸顶头部必须避开共享工作台顶部栏。 */
  body.factory-workbench-page .manage-header,
  body.factory-workbench-page .g19-sticky-head,
  body.factory-workbench-page .page-header,
  body.factory-workbench-page .app-header,
  body.factory-workbench-page header.sticky,
  body.factory-workbench-page [data-sticky-header],
  body.factory-workbench-page .so-header,
  body.factory-workbench-page .soc-header{top:40px!important;left:180px!important;right:0!important}
  body.factory-workbench-page .so-main{padding-top:var(--so-header-height, 46px)!important}
  body.factory-workbench-page .soc-main{padding-top:calc(var(--soc-header-bar, 46px) + 8px)!important}
  body.factory-workbench-sidebar-hidden .so-header,
  body.factory-workbench-sidebar-hidden .soc-header{left:0!important}
  /* Sticky page headers only need top offset while in normal flow (body already
     has padding-left:180px). Fixed headers (native or PAW-promoted) must also
     set left/right or they full-bleed over the sidebar. */
  body.factory-workbench-page .cm-header,
  body.factory-workbench-page .sticky-header,
  body.factory-workbench-page .pt-header,
  body.factory-workbench-page .bd-header,
  body.factory-workbench-page .inv-header,
  body.factory-workbench-page .fc-header,
  body.factory-workbench-page .cf-header,
  body.factory-workbench-page .mm-header,
  body.factory-workbench-page .fpm-header,
  body.factory-workbench-page .ss-header,
  body.factory-workbench-page .rfm-header,
  body.factory-workbench-page .ocu-header,
  body.factory-workbench-page .of-header,
  body.factory-workbench-page .pc-header,
  body.factory-workbench-page .chs-header,
  body.factory-workbench-page .batch-header,
  body.factory-workbench-page .product-add-header,
  body.factory-workbench-page .edit-header,
  body.factory-workbench-page .recycle-header,
  body.factory-workbench-page .quote-header,
  body.factory-workbench-page .factory-settings__header,
  body.factory-workbench-page .sr-header,
  body.factory-workbench-page .ai-topbar,
  body.factory-workbench-page .history-topbar,
  body.factory-workbench-page .factory-category-select-header,
  body.factory-workbench-page .factory-category-select-topbar,
  body.factory-workbench-page .sac-select-topbar,
  body.factory-workbench-page .topbar,
  body.factory-workbench-page .top-toolbar,
  body.factory-workbench-page .lg-header,
  body.factory-workbench-page .pool-header,
  body.factory-workbench-page .assistant-topbar{top:40px!important}
  /* Fixed headers: pin to content column so title bar never covers left nav. */
  body.factory-workbench-page .cm-header.paw-existing-fixed-header,
  body.factory-workbench-page .sticky-header.paw-existing-fixed-header,
  body.factory-workbench-page .pt-header.paw-existing-fixed-header,
  body.factory-workbench-page .bd-header.paw-existing-fixed-header,
  body.factory-workbench-page .inv-header.paw-existing-fixed-header,
  body.factory-workbench-page .fc-header.paw-existing-fixed-header,
  body.factory-workbench-page .cf-header.paw-existing-fixed-header,
  body.factory-workbench-page .mm-header.paw-existing-fixed-header,
  body.factory-workbench-page .fpm-header.paw-existing-fixed-header,
  body.factory-workbench-page .ss-header.paw-existing-fixed-header,
  body.factory-workbench-page .rfm-header.paw-existing-fixed-header,
  body.factory-workbench-page .ocu-header.paw-existing-fixed-header,
  body.factory-workbench-page .of-header.paw-existing-fixed-header,
  body.factory-workbench-page .pc-header.paw-existing-fixed-header,
  body.factory-workbench-page .chs-header.paw-existing-fixed-header,
  body.factory-workbench-page .batch-header.paw-existing-fixed-header,
  body.factory-workbench-page .product-add-header.paw-existing-fixed-header,
  body.factory-workbench-page .edit-header.paw-existing-fixed-header,
  body.factory-workbench-page .recycle-header.paw-existing-fixed-header,
  body.factory-workbench-page .quote-header.paw-existing-fixed-header,
  body.factory-workbench-page .factory-settings__header.paw-existing-fixed-header,
  body.factory-workbench-page .sr-header.paw-existing-fixed-header,
  body.factory-workbench-page .ai-topbar.paw-existing-fixed-header,
  body.factory-workbench-page .history-topbar.paw-existing-fixed-header,
  body.factory-workbench-page .factory-category-select-header.paw-existing-fixed-header,
  body.factory-workbench-page .factory-category-select-topbar.paw-existing-fixed-header,
  body.factory-workbench-page .sac-select-topbar.paw-existing-fixed-header,
  body.factory-workbench-page .topbar.paw-existing-fixed-header,
  body.factory-workbench-page .top-toolbar.paw-existing-fixed-header,
  body.factory-workbench-page .lg-header.paw-existing-fixed-header,
  body.factory-workbench-page .pool-header.paw-existing-fixed-header,
  body.factory-workbench-page .assistant-topbar.paw-existing-fixed-header,
  body.factory-workbench-page .paw-existing-fixed-header,
  body.factory-workbench-page .pd-header,
  body.factory-workbench-page .mc-header{top:40px!important;left:180px!important;right:0!important;width:auto!important;z-index:998!important}
  body.factory-workbench-sidebar-hidden .cm-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .sticky-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .pt-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .bd-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .inv-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .fc-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .cf-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .mm-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .fpm-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .ss-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .rfm-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .ocu-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .of-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .pc-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .chs-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .batch-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .product-add-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .edit-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .recycle-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .quote-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .factory-settings__header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .sr-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .ai-topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .history-topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .factory-category-select-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .factory-category-select-topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .sac-select-topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .top-toolbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .lg-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .pool-header.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .assistant-topbar.paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .paw-existing-fixed-header,
  body.factory-workbench-sidebar-hidden .pd-header,
  body.factory-workbench-sidebar-hidden .mc-header{left:0!important}
  body.factory-workbench-page .cm-header-inner,
  body.factory-workbench-page .pd-header-inner,
  body.factory-workbench-page .pt-header-inner{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
  body.factory-workbench-page .mc-header-inner{max-width:720px!important;margin:0 auto!important}
  body.factory-workbench-page .mc-container,
  body.factory-workbench-page .pt-container{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
  /* 积分页自身头部是 sticky：页面流已经从顶部工作台之后开始，不能再次叠加 body 顶部留白。 */
  body.factory-points-page{padding-top:0!important}
  body.factory-settings-page,
  body.factory-subscription-renew-page{padding-top:0!important}
  /* 这三个页面的业务头部是页面首元素；用自身外边距避开固定工作台，避免
     同时给 body 加顶部留白造成双重间距。 */
  body.factory-workbench-page.factory-points-page .pt-header,
  body.factory-workbench-page.factory-settings-page .factory-settings__header,
  body.factory-workbench-page.factory-subscription-renew-page .sr-header{margin-top:40px!important}
  body.factory-workbench-page .factory-settings__header,
  body.factory-workbench-page .sr-header{top:40px!important}
  body.factory-workbench-page .factory-settings__header-inner,
  body.factory-workbench-page .sr-header-inner,
  body.factory-workbench-page .factory-settings__container,
  body.factory-workbench-page .sr-container{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
  /* 共享工作台接入后，页面主内容使用剩余桌面宽度，不保留旧的窄屏 max-width。 */
  body.factory-workbench-page main,
  body.factory-workbench-page .container,
  body.factory-workbench-page .page-container,
  body.factory-workbench-page [class$="-main"]{width:100%;max-width:none;margin-left:0;margin-right:0}
  /* AI 生成页使用固定的聚焦工作区，宽屏最多 768px，窄桌面随工作区收缩。 */
  body.factory-workbench-page .ai-topbar,
  body.factory-workbench-page .ai-workspace{width:min(768px,calc(100% - 32px))!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important}
  body.factory-workbench-page .ai-result-stage{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
  body.factory-workbench-page .ai-control-strip,
  body.factory-workbench-page .ai-bottom-tools,
  body.factory-workbench-page .ai-prompt-area:not([hidden]){width:min(768px,calc(100% - 32px))!important;max-width:none!important}
  /* 店铺首页与详情页也复用同一工作台：右侧保留首页一致的 390px 画册工作区。 */
  body.factory-workbench-storefront-page { padding-left:0!important; }
  body.factory-workbench-storefront-page .fsf-footer,
  body.factory-workbench-storefront-page > .fsf-menu-overlay { display:none!important; }
  body.factory-workbench-storefront-page .fsf-main { width:390px!important; max-width:390px!important; height:calc(100vh - 40px); min-height:calc(100vh - 40px); margin:0 0 0 auto!important; padding:12px 6px 24px!important; overflow:visible; background:var(--fsf-bg,#f5f7f6); }
  body.factory-workbench-storefront-page .fsf-detail { display:flex; flex-direction:column; max-width:none; margin:0; }
  body.factory-workbench-storefront-page .fsf-main-image-wrap { width:calc(100% + 12px); margin-left:-6px; margin-right:-6px; padding:0; border:0; border-radius:0; position:static; }
  body.factory-workbench-storefront-page .fsf-info-block,
  body.factory-workbench-storefront-page .fsf-info-grid,
  body.factory-workbench-storefront-page .fsf-section-block,
  body.factory-workbench-storefront-page .fsf-color-picker { width:100%; margin-top:6px; }
}
