/* Work business screens. Include after base styles in each approved document.
   Screen-only: print/export keeps the product's own templates. Hidden state,
   backdrops, stacking, focus traps, permissions and open/close stay with each module. */
@media screen {
body.work-inner-layout {
  --wb-inner-ink: #10233f;
  --wb-inner-muted: #4c5d73;
  --wb-inner-brand: #126b62;
  --wb-inner-line: #dfe6eb;
  --wb-inner-canvas: #f6f8fa;
  --wb-inner-shadow: 0 18px 55px rgba(14, 36, 57, .12);
}

body.work-inner-layout #appShell :is(.content, #shopDecorationSection, #aiGiftSection) {
  min-width: 0;
  color: var(--wb-inner-ink);
}

body.work-inner-layout #appShell :is(.content, #shopDecorationSection, #aiGiftSection) > .hero-strip {
  padding: 16px 20px;
  border: 1px solid var(--wb-inner-line);
  border-radius: 10px;
  background: white;
  color: var(--wb-inner-ink);
  box-shadow: none;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.panel, .card, .system-pricing-card, .self-quote-designer-card, .overview-panel, .overview-card, .fieldset, .erp-purchase-advice):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-width: 0;
  border: 1px solid var(--wb-inner-line);
  border-radius: 8px;
  background: #fff;
  color: var(--wb-inner-ink);
}

body.work-inner-layout #appShell :is(.content, #shopDecorationSection, #aiGiftSection) :is(.panel-heading, .sales-panel-heading, .system-pricing-card-head, .inventory-adjust-heading):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  padding: 12px 16px;
  gap: 8px 12px;
  border-bottom: 1px solid var(--wb-inner-line);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(h2, h3):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  color: var(--wb-inner-ink);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(legend, .section-heading, .editor-heading):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  font-weight: 600;
  line-height: 1.5;
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) fieldset:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-inline-size: 0;
  border: 1px solid var(--wb-inner-line);
  border-radius: 8px;
  padding: 12px 14px;
}

body.work-inner-layout :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer) {
  inline-size: min(78vw, 1180px);
  max-inline-size: 100vw;
  background-color: #fff;
  color: var(--wb-inner-ink);
  border-inline-start: 1px solid var(--wb-inner-line);
  box-shadow: var(--wb-inner-shadow);
}

body.work-inner-layout :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog) {
  box-sizing: border-box;
  max-inline-size: min(920px, calc(100vw - 40px));
  border: 1px solid var(--wb-inner-line);
  border-radius: 12px;
  background-color: #fff;
  color: var(--wb-inner-ink);
  box-shadow: var(--wb-inner-shadow);
}

body.work-inner-layout :is(.crm-create-dialog, .crm-contract-detail, .crm-proposal-preview, .quote-product-picker, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #crmActivityForm, #employeeForm, #warehouseForm, #roleForm) {
  inline-size: min(920px, calc(100vw - 40px));
}

body.work-inner-layout :is(
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog)
) > header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--wb-inner-line);
  background: #fff;
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog)
) > header :is(h1, h2) {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

body.work-inner-layout :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer) :is(.crm-drawer-body, .standard-solution-drawer-body, #editorForm) {
  min-inline-size: 0;
  padding-inline: 20px;
}

body.work-inner-layout :is(
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog)
) > footer {
  padding: 11px 20px;
  border-top: 1px solid var(--wb-inner-line);
  background: #fff;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.hero-actions, .self-quote-actions, .sales-intake-actions, .inventory-adjust-actions, .system-pricing-actions, .review-actions, .dialog-actions):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  gap: 8px;
  flex-wrap: wrap;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog)
) :is(.tabs, .system-pricing-tabs, .crm-customer-modules, .crm-scope-tabs, [role="tablist"]):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  gap: 4px;
  max-inline-size: 100%;
  overflow-x: auto;
  border-bottom: 1px solid var(--wb-inner-line);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail)
) :is(.tabs, .system-pricing-tabs, .crm-customer-modules, .crm-scope-tabs, .review-tabs, [role="tablist"]) > :is(button, a):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 5px 5px 0 0;
  white-space: nowrap;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail)
) :is(.tabs, .system-pricing-tabs, .crm-customer-modules, .crm-scope-tabs, .review-tabs, [role="tablist"]) :is([aria-selected="true"], .active):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  color: var(--wb-inner-brand);
  box-shadow: inset 0 -2px 0 var(--wb-inner-brand);
  font-weight: 600;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.crm-create-grid, .employee-grid, .warehouse-form-grid, .sales-intake-grid, .inventory-adjust-fields, .self-quote-form-grid, .system-pricing-discount-grid, .system-pricing-invoice-grid, .form-grid):not([hidden]):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  min-inline-size: 0;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.field, form label, fieldset label):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  color: var(--wb-inner-muted);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(input:not([type]), input[type="text"], input[type="search"], input[type="number"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid var(--wb-inner-line);
  border-radius: 5px;
  color: var(--wb-inner-ink);
  background-color: #fff;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.45;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) textarea:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  height: auto;
  min-height: 58px;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(input:not([type]), input[type="text"], input[type="search"], input[type="number"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea):focus-visible:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  outline: 2px solid var(--wb-inner-brand);
  outline-offset: 1px;
  border-color: var(--wb-inner-brand);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(input:not([type]), input[type="text"], input[type="search"], input[type="number"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea):is(:disabled, [readonly]):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  background-color: #f4f6f8;
  color: var(--wb-inner-muted);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) .button:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-height: 30px;
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.45;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) .button.primary:not(:disabled):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  background-color: var(--wb-inner-brand);
  border-color: var(--wb-inner-brand);
  color: white;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) .button.secondary:not(:disabled):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  background-color: #fff;
  border-color: var(--wb-inner-line);
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail) button:not(.danger):not(:disabled):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-height: 30px;
  padding: 5px 13px;
  border: 1px solid var(--wb-inner-line);
  border-radius: 6px;
  background: #fff;
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.table-wrap, .qpp-catalog, .erp-fulfillment-lines):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) table:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  font-size: 12.5px;
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(thead th, .table-wrap th):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  padding: 9px 12px;
  color: var(--wb-inner-muted);
  background-color: #f6f8fa;
  font-size: 12px;
  font-weight: 600;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) tbody td:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  padding: 10px 12px;
  border-bottom-color: #eff3f6;
  line-height: 1.5;
}

body.work-inner-layout :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail) {
  box-sizing: border-box;
  max-inline-size: 1440px;
  margin-inline: auto;
  padding: 16px 20px;
  color: var(--wb-inner-ink);
}

body.work-inner-layout :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail) > :is(header,.head) {
  padding-block: 5px 14px;
  border-bottom: 1px solid var(--wb-inner-line);
}

body.work-inner-layout:has(> #basketDraftList) > :is(h1, p, #refreshBasketDrafts) {
  margin-inline: 20px;
}

}
@media screen {
  body.work-inner-layout #warehouseForm .warehouse-form-grid > label.warehouse-check:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  body.work-inner-layout #warehouseForm .warehouse-form-grid > .warehouse-check > input[type="checkbox"] {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    margin: 0;
  }

  body.work-inner-layout #warehouseForm .warehouse-form-grid > .wide {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 1280px) {
body.work-inner-layout :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer) {
  inline-size: min(92vw, 1180px);
}

}
@media screen and (max-width: 720px) {
body.work-inner-layout :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer) {
  inline-size: 100%;
  max-inline-size: 100%;
}

body.work-inner-layout :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog) {
  max-inline-size: calc(100vw - 16px);
}

body.work-inner-layout :is(
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog)
) > :is(header, footer) {
  padding: 10px 12px;
}

body.work-inner-layout :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer) :is(.crm-drawer-body, .standard-solution-drawer-body, #editorForm) {
  padding-inline: 12px;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(.crm-create-grid, .employee-grid, .warehouse-form-grid, .sales-intake-grid, .inventory-adjust-fields, .self-quote-form-grid, .system-pricing-discount-grid, .system-pricing-invoice-grid, .form-grid):not([hidden]):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) :is(input:not([type]), input[type="text"], input[type="search"], input[type="number"], input[type="tel"], input[type="email"], input[type="url"], input[type="date"], input[type="datetime-local"], select, textarea):not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-height: 38px;
  font-size: 16px;
}

body.work-inner-layout :is(
  #appShell :is(.content, #shopDecorationSection, #aiGiftSection),
  :is(#editorDrawer, #crmCustomerDrawer, #standardSolutionDrawer),
  :is(.crm-create-dialog, #productChangeDialog, #crmActivityForm, #crmShareForm, #createForm, #batchPricePolicyForm, #batchProductAttributeForm, #batchProductCraftForm, #roleForm, #warehouseForm, #employeeForm, #resetPasswordForm, .crm-contract-detail, .crm-proposal-preview, .crm-account-v2-review-dialog, .crm-account-activity-dialog, .quote-product-picker, .material-dialog, #pricingDialog, #renameProjectDialog, #confirmDialog),
  :is(.admin-shell .editor-card, .admin-shell .material-list-card, .admin-shell .box-library-card, .app-shell > :is(.left-panel, .right-panel) .panel-section)
) .button:not(:where(.contract-docx-preview-dialog, .contract-docx-preview-dialog *, .docx-wrapper, .docx-wrapper *, [class^="quote-document-preview"], [class^="quote-document-preview"] *, .product-image-preview, .product-image-preview *)) {
  min-height: 38px;
}

body.work-inner-layout :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail) {
  padding-inline: 12px;
}

body.work-inner-layout :is(main.wrap:has(#inviteForm, #decisionForm), main:has(> #filter, > .columns #queue), #basketDraftList, #basketDraftDetail) .columns {
  grid-template-columns: minmax(0, 1fr);
}

}

/* The independent material editor ships a desktop-only 1180px body. Reflow
   its management controls without changing the design canvas in its sibling app. */
@media screen and (max-width: 1179px) {
  body.work-inner-layout:has(main.admin-shell) { min-width: 0; }
  body.work-inner-layout .admin-shell { grid-template-columns: minmax(0, 1fr); }
  body.work-inner-layout .admin-sidebar nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }
  body.work-inner-layout .admin-sidebar .nav-item { flex: 0 0 auto; gap: 6px; }
  body.work-inner-layout .admin-shell :is(.management-grid, .toolbar-card) {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }
}
@media screen and (max-width: 720px) {
  body.work-inner-layout:has(main.admin-shell) :is(.admin-topbar, .admin-top-actions, .page-heading, .heading-actions, .card-title, .box-title-actions, .dialog-actions) {
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
  }
  body.work-inner-layout:has(main.admin-shell) .admin-topbar { padding: 12px; }
  body.work-inner-layout .admin-shell :is(.admin-content, .admin-sidebar) { padding: 12px; }
  body.work-inner-layout .admin-shell .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.work-inner-layout .admin-shell :is(.admin-box-list, .admin-accessory-list, .preview-section, .form-grid, .management-grid),
  body.work-inner-layout:has(main.admin-shell) .material-dialog :is(.upload-layout, .upload-form-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
}
