/* Compact operating workspace. Scroll belongs to each list, not the document. */
/* CBT names stay fully visible in both languages, including narrow screens. */
.cbt-en, .cbt-zh { display: block; overflow-wrap: anywhere; white-space: normal; }
.cbt-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cbt-path-node { min-width: 0; max-width: 100%; }
.cbt-path-node .cbt-en { color: var(--color-text); font-size: 13px; line-height: 1.5; }
.cbt-path-node .cbt-zh { color: var(--color-text-secondary); font-size: 12px; line-height: 1.5; }
.cbt-path-separator { color: var(--color-text-muted); }
#erpCbtModal .zy-cbt-current { flex-direction: column; align-items: flex-start; }
#erpCbtModal { padding: 24px; overflow: hidden; }
#erpCbtModal .erp-cbt-modal-card { display: flex; flex-direction: column; width: 100%; max-width: 1480px; height: calc(100dvh - 48px); padding: 0; overflow: hidden; }
#erpCbtModal .modal-head { flex: none; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
#erpCbtModal .modal-head p { margin: 3px 0 0; padding: 0; }
#erpCbtModal .erp-cbt-toolbar { flex: none; margin: 0; padding: 12px 20px 6px; gap: 8px; }
#erpCbtModal .erp-cbt-toolbar label { font-size: 13px; color: var(--color-text-secondary); }
#erpCbtModal .erp-cbt-toolbar input { min-width: 120px; }
#erpCbtModal #erpCbtPickerHint { flex: none; margin: 0; padding: 2px 20px 12px; font-size: 12px; line-height: 1.5; }
#erpCbtModal .cbt-picker-workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); flex: 1; min-height: 0; border-top: 1px solid var(--color-border); }
#erpCbtModal .cbt-picker-sidebar { min-width: 0; padding: 12px; overflow: auto; border-right: 1px solid var(--color-border); background: var(--color-surface-subtle); }
#erpCbtModal .cbt-trail-panel > summary { padding: 6px 8px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
#erpCbtModal .cbt-trail-panel[open] > summary { position: sticky; top: -12px; z-index: 1; background: var(--color-surface-subtle); }
#erpCbtModal #erpCbtTrail { display: grid; gap: 4px; }
#erpCbtModal .cbt-trail-step { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 10px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--color-text); text-align: left; font: inherit; cursor: pointer; }
#erpCbtModal .cbt-trail-step.active { background: var(--color-surface); border-color: var(--color-accent); }
#erpCbtModal .cbt-trail-number { flex: none; min-width: 20px; padding: 2px 0; text-align: center; color: var(--color-text-secondary); background: var(--color-canvas); border-radius: 4px; font-size: 12px; }
#erpCbtModal .cbt-trail-step .cbt-name { min-width: 0; }
#erpCbtModal .cbt-trail-step .cbt-en, #erpCbtModal .cbt-trail-step .cbt-zh { font-size: 12px; line-height: 1.5; }
#erpCbtModal .cbt-saved-category { margin-top: 12px; border-top: 1px solid var(--color-border); padding-top: 10px; font-size: 12px; }
#erpCbtModal .cbt-saved-category summary { cursor: pointer; line-height: 1.8; overflow-wrap: anywhere; }
#erpCbtModal .cbt-saved-category .cbt-path { margin-top: 8px; }
#erpCbtModal .cbt-picker-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#erpCbtModal .cbt-level-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; flex: none; padding: 10px 16px; border-bottom: 1px solid var(--color-border); font-size: 13px; }
#erpCbtModal .erp-cbt-cols { display: flex; flex: 1; min-height: 0; min-width: 0; overflow: hidden; margin: 0; padding: 0; }
#erpCbtModal .erp-cbt-col { flex: 1; min-width: 0; max-height: none; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 0; }
#erpCbtModal .cbt-option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); align-content: start; gap: 8px; padding: 16px; }
#erpCbtModal .erp-cbt-item { width: 100%; min-height: 80px; padding: 10px; gap: 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface); color: var(--color-text); font: inherit; text-align: left; }
#erpCbtModal .erp-cbt-item:hover { background: var(--color-surface-subtle); }
#erpCbtModal .erp-cbt-item.active { background: var(--color-accent-subtle); border-color: var(--color-accent); }
#erpCbtModal .erp-cbt-item .cbt-name { overflow: visible; white-space: normal; line-height: 1.5; }
#erpCbtModal .cbt-name .cbt-en { font-size: 13px; }
#erpCbtModal .cbt-name small { margin: 2px 0; font-size: 13px; color: var(--color-text-secondary); }
#erpCbtModal .cbt-name code { display: block; font-size: 11px; line-height: 1.5; }
#erpCbtModal .erp-cbt-search-name { display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
#erpCbtModal .erp-cbt-search-name .cbt-name { flex: 1; min-width: 0; }
#erpCbtModal .cbt-search-path { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#erpCbtModal .cbt-item-blocked .cbt-name :is(.cbt-en, small) { color: var(--color-danger); }
#erpCbtModal .erp-cbt-search-results { flex: 1; min-height: 0; max-height: none; overflow-x: hidden; margin: 0; border: 0; border-radius: 0; }
#erpCbtModal .erp-cbt-search-row { padding: 12px 16px; }
#erpCbtModal .cbt-picker-footer { flex: none; padding: 12px 20px; border-top: 1px solid var(--color-border); background: var(--color-surface); }
#erpCbtModal .erp-cbt-actions { margin: 0; flex-wrap: nowrap; align-items: center; gap: 16px; }
#erpCbtModal #erpCbtCandidateNote { flex: 1; min-width: 0; padding: 0; margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; max-height: 80px; overflow: auto; }
#erpCbtModal #erpCbtApplyButton { flex: none; }
#erpCbtModal #erpCbtApplyStatus { padding: 0; margin: 6px 0 0; max-height: 64px; overflow: auto; }
#erpCbtModal #erpCbtApplyStatus:empty { display: none; }
@media (max-width: 759px) {
  #erpCbtModal { padding: 8px; }
  #erpCbtModal .erp-cbt-modal-card { height: calc(100dvh - 16px); }
  #erpCbtModal .modal-head, #erpCbtModal .cbt-picker-footer { padding: 12px; }
  #erpCbtModal .erp-cbt-toolbar { padding: 8px 12px 4px; }
  #erpCbtModal .erp-cbt-toolbar label { display: none; }
  #erpCbtModal .erp-cbt-toolbar input { flex-basis: 100%; }
  #erpCbtModal #erpCbtPickerHint { padding: 4px 12px 8px; }
  #erpCbtModal .cbt-picker-workspace { display: flex; flex-direction: column; }
  #erpCbtModal .cbt-picker-sidebar { flex: none; max-height: 28dvh; padding: 6px 12px; border-right: 0; border-bottom: 1px solid var(--color-border); }
  #erpCbtModal .cbt-trail-panel > summary { padding: 4px 0; }
  #erpCbtModal .cbt-trail-panel[open] > summary { top: -6px; }
  #erpCbtModal .cbt-saved-category { margin-top: 4px; padding-top: 4px; }
  #erpCbtModal .cbt-picker-main { flex: 1; }
  #erpCbtModal .cbt-level-toolbar { padding: 6px 12px; gap: 8px; }
  #erpCbtModal .cbt-option-grid { grid-template-columns: minmax(0, 1fr); padding: 8px 12px; }
  #erpCbtModal .erp-cbt-search-name { flex-wrap: wrap; }
}
.cbt-dot-ok { background: var(--color-success); }
.cbt-current-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cbt-rule-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 12px; line-height: 1.5; }
.cbt-rule-ok { color: var(--color-success); background: var(--color-success-subtle); }
.cbt-rule-single { color: var(--color-warning); background: var(--color-warning-subtle); }
.cbt-rule-ban { color: var(--color-danger); background: var(--color-danger-subtle); }
.cbt-rule-unknown { color: var(--color-text-secondary); background: var(--color-canvas); }
.cbt-rule-badge .cbt-dot { background: currentColor; }
#erpProductModal .cbt-category-warning { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-md); color: var(--color-warning); background: var(--color-warning-subtle); font-size: 13px; line-height: 1.6; }
body.erp-app { --sidebar-width: 196px; }
body.erp-app[data-auth-state="authenticated"] { height: 100dvh; overflow: hidden; }
.app-sidebar { padding: 28px 14px 18px; background: var(--color-canvas); border-right: 0; }
.app-sidebar .app-brand { padding: 0 8px 32px; }
.app-brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--color-accent); }
.app-brand-mark svg { width: 32px; height: 32px; fill: none; stroke: white; stroke-width: 1.25; }
.app-brand-mark svg .radar-point { fill: white; stroke: none; }
.app-brand strong { font-size: 16px; font-weight: 650; }
.app-brand div > span { font-size: 11px; }
.app-sidebar .view-tabs { gap: 6px; }
.app-sidebar .view-tab { min-height: 44px; border-radius: 10px; padding: 10px 14px; font-size: 14px; gap: 12px; }
.app-sidebar .view-tab.active { background: var(--color-surface); color: var(--color-accent); box-shadow: 0 2px 6px rgb(28 44 70 / 6%); }
.app-sidebar-foot { margin-top: auto; padding: 16px 10px 8px; border: 0; }
.app-sidebar-foot strong { font-size: 12px; font-weight: 500; }
.app-sidebar-foot span { line-height: 1.6; }
.app-logout { margin-top: 4px; align-self: stretch; justify-content: flex-start; padding-left: 10px; font-weight: 400; }
.erp-app main { display: flex; flex-direction: column; gap: 8px; height: 100dvh; min-height: 0; max-width: none; padding: 16px 20px 16px 0; }
.erp-app > footer { display: none; }
.erp-app main > .notice { flex: none; margin: 0; }
.workspace-view:not(.hidden) { display: flex; flex: 1; min-height: 0; }
@media(max-width:390px) { .app-sidebar .view-tab .ui-icon { display:none; } }
.workspace-panel, #uploadedView .workspace-panel { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; margin: 0; overflow: visible; }
.workspace-controls { position: relative; z-index: 4; flex: none; padding: 10px 18px 6px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.workspace-page-head { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-height: 66px; padding: 14px 18px; border-bottom: 1px solid var(--color-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--color-surface); }
.workspace-page-head h1 { margin: 0; font-size: 22px; line-height: 30px; letter-spacing: -.03em; font-weight: 650; }
.workspace-head-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; min-width: 0; }
.workspace-head-title > span, .workspace-head-note { color: var(--color-text-secondary); font-size: 12px; }
.workspace-head-note { margin-left: auto; }
.workspace-head-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
#erpListPanel .zy-lib-switch { border: 0; background: var(--color-canvas); padding: 3px; gap: 2px; border-radius: 9px; }
#erpListPanel .zy-lib-btn { padding: 5px 10px; min-height: 30px; font-size: 12px; border: 0; border-radius: 6px; }
#erpListPanel .zy-lib-btn.active { color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-sm); }
#erpListPanel .zy-lib-btn + .zy-lib-btn { border: 0; }
#erpListPanel .zy-lib-btn span { margin-left: 4px; color: var(--color-text-secondary); font-weight: 400; font-variant-numeric: tabular-nums; }
.workspace-query-reset { margin-left: auto; }
.workspace-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-padding: 8px; }
/* Only the uploaded page still overlays its list with a selection dock. */
#erpProductScroll { padding-bottom: 8px; }
#uploadedListScroll { padding-bottom: 76px; }
#erpListPanel .workspace-query, #uploadedView .uploaded-toolbar, .workspace-query { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 6px 0; margin: 0; border: 0; }
.workspace-query > input[type="search"], #uploadedView #uploadedSearch { flex: 0 1 300px; min-width: 140px; max-width: 320px; height: 36px; padding: 6px 12px; border: 1px solid var(--color-border-control); border-radius: var(--radius-md); background: var(--color-surface-subtle); color: var(--color-text); font: inherit; }
.workspace-query .zy-btn, .workspace-query summary { white-space: nowrap; }
.workspace-country-row, .workspace-status-row { display: flex; align-items: start; gap: 8px; }
.workspace-filter-label { flex: 0 0 30px; font-size: 12px; line-height: 34px; color: var(--color-text-secondary); }
#uploadedView .uploaded-tabs { flex: 1; min-width: 0; padding: 0; gap: 4px; margin-bottom: 4px; }
#uploadedView .uploaded-tab { min-height: 30px; padding: 4px 8px; border-radius: 5px; font-size: 12px; }
.workspace-result-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 24px; font-size: 12px; }
.workspace-result-line .site-note { padding: 0; margin: 0; font-size: 12px; }
.workspace-batch, #uploadedView .uploaded-delete-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 0; margin: 0; border-radius: 0; background: transparent; }
.workspace-batch:not(.hidden), #uploadedView .uploaded-delete-bar:not(.hidden) { margin: 6px 0; padding: 10px 12px; background: var(--color-accent-subtle); border-radius: 10px; }
/* Product bulk actions remain in the select-all row even when nothing is selected.
   Keep their geometry stable to avoid shifting the list when the count changes. */
#erpListPanel .erp-selection-line { min-height: 40px; gap: 4px 10px; }
#erpListPanel .erp-selection-line > .erp-select-all { flex: none; }
#erpListPanel .erp-selection-line #erpBatchBar {
  position: static;
  z-index: auto;
  display: flex !important;
  flex: 0 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#erpListPanel .erp-selection-line #erpBatchBar .zy-btn { min-height: 30px; padding: 4px 8px; }
#erpListPanel .erp-selection-line #erpSelectedCount { color: var(--color-accent); font-size: 12px; white-space: nowrap; }
#erpListPanel .erp-selection-line #erpPromoteButton { min-width: 128px; }
.erp-batch-category-card { width: min(640px, calc(100vw - 24px)); max-height: min(82dvh, 740px); box-sizing: border-box; overflow: auto; }
.erp-batch-category-card > .site-note { margin: 10px 0; line-height: 1.6; }
.erp-batch-category-picker { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 58%); margin: 12px 0 6px; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.erp-batch-category-pane { display: flex; flex-direction: column; min-width: 0; }
.erp-batch-category-pane + .erp-batch-category-pane { border-left: 1px solid var(--color-border); }
.erp-batch-category-pane-head { padding: 8px 10px; color: var(--color-text-secondary); background: var(--color-canvas); border-bottom: 1px solid var(--color-border); font-size: 12px; font-weight: 600; }
.erp-batch-category-options { height: clamp(140px, 27dvh, 240px); overflow: auto; padding: 4px; }
.erp-batch-category-option { display: block; width: 100%; min-height: 36px; padding: 7px 8px; border: 0; border-radius: 5px; text-align: left; font: inherit; font-size: 13px; color: var(--color-text-primary); background: transparent; cursor: pointer; overflow-wrap: anywhere; }
.erp-batch-category-option:hover:not(:disabled), .erp-batch-category-option.nav { background: var(--color-accent-subtle); }
.erp-batch-category-option[aria-pressed="true"] { background: var(--color-accent-subtle); color: var(--color-accent); font-weight: 600; }
.erp-batch-category-option:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.erp-batch-category-option:disabled { cursor: not-allowed; opacity: .55; }
.erp-batch-category-empty { padding: 9px; color: var(--color-text-secondary); font-size: 12px; line-height: 1.5; }
#erpBatchCategoryChosen { margin: 6px 0 12px; font-weight: 600; }
.erp-batch-category-rows { border: 1px solid var(--color-border); border-radius: 8px; max-height: min(34dvh, 280px); overflow-y: auto; }
.erp-batch-category-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 10px; padding: 8px 10px; border-bottom: 1px solid var(--color-border); font-size: 12px; }
.erp-batch-category-row:last-child { border-bottom: 0; }
.erp-batch-category-row strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.erp-batch-category-row small { color: var(--color-text-secondary); overflow-wrap: anywhere; }
.erp-batch-category-row .erp-batch-error { color: var(--color-danger); }
.erp-batch-category-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
@media (max-width: 600px) {
  #erpListPanel .erp-selection-line #erpBatchBar { flex: 1 1 160px; }
}
#erpProductCards .erp-cbt-split { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--color-canvas); color: var(--color-text-secondary); font-size: 12px; white-space: nowrap; }
#erpProductCards .erp-cbt-split-light { width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
#erpProductCards .erp-cbt-split-ready { color: var(--color-success); background: var(--color-success-subtle); }
#erpProductCards .erp-cbt-split-split, #erpProductCards .erp-cbt-split-unavailable, #erpProductCards .erp-cbt-split-over_limit { color: var(--color-danger); background: var(--color-danger-subtle); }
#erpProductCards .erp-cbt-split-unknown { color: var(--color-warning); background: var(--color-warning-subtle); }
.workspace-panel .uploaded-pager { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--color-border); }
.uploaded-pager .site-note { padding: 0; font-size: 12px; }
.uploaded-pager select { height: 30px; padding: 2px 6px; font: inherit; }
.workspace-help { flex: none; margin: 0 !important; font-size: 12px; }
.workspace-help > summary { padding: 4px 12px; color: var(--color-text-secondary); cursor: pointer; }
.workspace-help > p { max-height: 140px; overflow: auto; margin: 0; padding: 8px 12px; }
.workspace-import { padding: 4px 0; }
.workspace-import .zy-import-row { margin: 0; width: 100%; padding: 4px 0; }
.workspace-import .site-note, #erpStagingHint { padding: 4px 0; margin: 0; font-size: 12px; }
.workspace-inline-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
#erpExtraFilters { flex: none; flex-wrap: nowrap; }
#erpExtraFilters .erp-cascader { flex: 0 1 220px; min-width: 150px; }
#erpUploadStatusFilter { flex: none; width: auto; max-width: 142px; min-height: 34px; }
.zy-tag-upload-unuploaded { color: var(--color-text-secondary); background: var(--color-surface-subtle, #f3f4f6); }
.workspace-inline-filters .erp-cascader-field { height: 34px; min-height: 34px; padding: 6px 10px; }
.workspace-filter-control { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; }
.workspace-filter-control label { flex: none; color: var(--color-text-secondary); }
#uploadedView .workspace-filter-control select { flex: none; min-width: 0; max-width: 100%; height: 34px; }
#uploadedExtraFilters { gap: 6px 12px; padding: 4px 0; }
#uploadedExtraFilters .workspace-filter-control { flex: none; }
#uploadedCatalog { width: 145px; }
#uploadedShipping { width: 125px; }
#uploadedCategory { width: 195px; }
#uploadedExtraFilters > .erp-cascader { flex: 0 1 205px; min-width: 0; }
#uploadedErpCascaderLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#uploadedListPanel .uploaded-primary-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
#uploadedListPanel .uploaded-primary-row .workspace-country-row { flex: 1 1 720px; min-width: 0; }
#uploadedView .uploaded-primary-row .workspace-country-row { flex-basis: 650px; align-items: center; }
#uploadedView #uploadedSiteTabs { display: flex; flex-wrap: nowrap; align-items: stretch; overflow-x: auto; gap: 3px; padding: 4px; margin: 0; background: var(--color-canvas); border-radius: 11px; scrollbar-width: thin; }
#uploadedView #uploadedSiteTabs .uploaded-tab[data-site] { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; flex: 0 0 auto; min-width: 92px; min-height: 52px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--color-text-secondary); box-shadow: none; }
#uploadedView #uploadedSiteTabs .uploaded-tab.active { background: var(--color-surface); color: var(--color-accent); box-shadow: var(--shadow-sm); }
.uploaded-site-name { display: flex; align-items: center; justify-content: flex-start; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 18px; }
.uploaded-site-count { padding: 0 4px; border-radius: 4px; background: var(--color-surface); color: var(--color-text-secondary); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.uploaded-site-meta { display: flex; align-items: baseline; gap: 8px; color: var(--color-text-secondary); font-size: 11px; font-weight: 400; line-height: 16px; white-space: nowrap; }
#uploadedView #uploadedSiteTabs .uploaded-quota { font-size: 11px; font-weight: 400; margin: 0; }
#uploadedView .workspace-country-row .uploaded-quota-refresh { flex: 0 0 auto; align-self: center; padding: 6px 8px; min-height: 44px; font-size: 12px; white-space: nowrap; }
#uploadedView .workspace-status-row { align-items: center; margin-top: 8px; }
#uploadedView #uploadedStatusTabs { gap: 4px; margin: 0; }
#uploadedView #uploadedStatusTabs .uploaded-tab { border: 0; background: transparent; color: var(--color-text-secondary); padding: 5px 10px; }
#uploadedView #uploadedStatusTabs .uploaded-tab.active { color: var(--color-accent); background: var(--color-accent-subtle); font-weight: 550; }
#uploadedView .uploaded-primary-row .uploaded-toolbar { flex: 0 1 352px; flex-wrap: nowrap; padding: 0; }
#uploadedView #uploadedSearch { flex: 0 1 260px; width: 260px; min-width: 120px; max-width: 260px; }
.uploaded-filter-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
#uploadedShippingHint:empty { display: none; }
.workspace-inline-filters .erp-cascader-panel { min-width: 0; width: min(420px, calc(100vw - 40px)); }
.erp-app :where(select, textarea, input:not([type="checkbox"]):not([type="radio"])) { border-radius: var(--radius-md); color: var(--color-text); font-family: var(--font-sans); }
.erp-app input::placeholder, .erp-app textarea::placeholder { color: var(--color-text-muted); opacity: 1; }
.erp-app .zy-menu, .erp-app .erp-cascader-panel { border-radius: 10px; border-color: var(--color-border); box-shadow: var(--shadow-menu); }
.workspace-inline-filters .erp-cascader-col { width: 50%; }
.workspace-inline-filters .zy-menu-item { display: block; width: 100%; text-align: left; border: 0; background: white; font: inherit; }
.workspace-inline-filters .zy-menu-item:is(:hover, .active) { background: var(--color-accent-subtle); }
#uploadedExtraFilters .erp-cascader-panel { left: auto; right: 0; max-height: min(360px, 50dvh); overflow: auto; }
.workspace-danger-menu { position: relative; flex: none; font-size: 12px; }
.workspace-danger-menu > summary { padding: 6px 10px; min-height: 34px; border: 1px solid var(--color-border-control); border-radius: 6px; cursor: pointer; background: white; }
.workspace-danger-body { display: none; }
.workspace-danger-menu[open] > .workspace-danger-body { display: flex; flex-direction: column; gap: 8px; position: absolute; top: calc(100% + 4px); right: 0; width: 300px; max-width: calc(100vw - 32px); max-height: 55dvh; overflow: auto; padding: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px; box-shadow: var(--shadow-menu); z-index: 35; }
.workspace-danger-body p { margin: 0; color: var(--color-danger); }

/* Both axes scroll in the same container, so sticky cells share its origin. */
#uploadedView .workspace-scroll table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; min-width: 0; }
#uploadedListScroll { overflow-x: hidden; }
#uploadedListScroll { scroll-padding-top: 44px; }
#uploadedView .workspace-scroll th { position: sticky; top: 0; z-index: 3; font-size: 12px; padding: 8px; }
#uploadedView .workspace-scroll td { padding: 3px 8px; height: 52px; vertical-align: middle; }
#uploadedView .workspace-scroll :is(th, td):first-child { position: sticky; left: 0; width: 44px; min-width: 44px; max-width: 44px; padding: 0; background: var(--color-surface); z-index: 2; }
#uploadedView .workspace-scroll :is(th, td):nth-child(2) { position: sticky; left: 44px; width: 18%; min-width: 0; max-width: none; background: var(--color-surface); z-index: 2; border-right: 1px solid var(--color-border); }
/* Leave status the remainder after sizing identity and readable metrics. */
#uploadedView .workspace-scroll :is(th, td):nth-child(3) { width: auto; min-width: 0; white-space: nowrap; }
#uploadedView .workspace-scroll :is(th, td):nth-child(4) { width: 10%; }
#uploadedView .workspace-scroll :is(th, td):nth-child(5) { width: 10%; }
#uploadedView .workspace-scroll :is(th, td):nth-child(6) { width: 10%; }
#uploadedView .workspace-scroll :is(th, td):nth-child(7) { width: 10%; white-space: nowrap; }
#uploadedView .workspace-scroll :is(th, td):nth-child(8) { width: 9%; white-space: nowrap; }
#uploadedView .workspace-scroll :is(th, td):not(:first-child) { overflow: hidden; text-overflow: ellipsis; }
#uploadedView .workspace-scroll th:first-child, #uploadedView .workspace-scroll th:nth-child(2) { background: var(--color-surface-subtle); z-index: 5; }
#uploadedView .uploaded-product-cell { min-width: 0; max-width: none; gap: 6px; align-items: center; }
#uploadedView .uploaded-product-cell > div { flex: 1; min-width: 0; }
#uploadedView .uploaded-product-cell .product-open { display: block; width: 100%; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; line-height: 20px; }
#uploadedView .uploaded-product-cell small { display: block; white-space: nowrap; font-size: 11px; line-height: 16px; }
#uploadedView .uploaded-product-cell small > .zy-tag { padding: 0 4px; font-size: 10px; line-height: 16px; vertical-align: top; }
#uploadedView .uploaded-variant-numbers { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 0 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; color: var(--color-text-secondary); font-size: 11px; line-height: 16px; }
#uploadedView .uploaded-variant-numbers > * { flex: none; white-space: nowrap; }
#uploadedView .uploaded-variant-numbers .product-copy { white-space: nowrap; }
#uploadedView .uploaded-product-cell img { width: 30px; height: 30px; border-radius: 6px; }
#uploadedView .uploaded-product-image { width: 36px; height: 44px; }
#uploadedView .uploaded-status { font-size: 12px; padding: 1px 5px; border-radius: 4px; }
#uploadedView .uploaded-cell-note { font-size: 12px; margin-top: 2px; }
.product-open, .product-copy { border: 0; padding: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.product-open { font-weight: 600; overflow-wrap: anywhere; }
.product-copy { color: var(--color-text-secondary); cursor: copy; }
.product-copy:is(:hover, :focus-visible) { color: var(--color-accent); text-decoration: underline; }
.product-open:is(:hover, :focus-visible) { color: var(--color-accent); text-decoration: underline; }
.uploaded-product-row, #erpProductCards .zy-card { cursor: default; }
.uploaded-product-image { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.erp-app label.selection-hit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 8px; box-sizing: border-box; border-radius: var(--radius-md); cursor: pointer; touch-action: manipulation; }
.selection-hit input, #erpProductCards .zy-card-select input { width: 18px; height: 18px; margin: 0; cursor: pointer; flex: none; }
:is(.selection-hit, #erpProductCards .zy-card-select):is(:hover, :focus-within) { background: var(--color-accent-subtle); }
:is(.selection-hit, #erpProductCards .zy-card-select):has(input:disabled) { cursor: default; background: var(--color-surface-subtle); }
:is(.selection-hit, #erpProductCards .zy-card-select) input:disabled { cursor: default; }

/* Keep the existing card selectors/selection behavior; list is the default. */
#erpProductCards[data-layout="list"] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
#erpProductCards[data-layout="list"] .zy-card { display: grid; grid-template-columns: 44px 44px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 72px; padding: 10px 18px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; }
#erpProductCards .zy-card-img { width: 100%; padding: 0; border: 0; font: inherit; cursor: pointer; }
#erpProductCards[data-layout="list"] .zy-card-img { width: 44px; height: 44px; aspect-ratio: auto; border: 0; border-radius: 4px; }
#erpProductCards[data-layout="list"] .zy-card-body { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(120px, 180px) 140px 90px; gap: 12px; align-items: center; padding: 0; min-width: 0; }
#erpProductCards .zy-card-title { display: block; -webkit-line-clamp: unset; min-height: 0; margin-bottom: 2px; overflow: visible; font-size: 13px; }
#erpListPanel .zy-card:hover { background: var(--color-surface-hover); box-shadow: none; transform: none; }
#erpProductCards .zy-card:has(.zy-card-select input:checked) { background: var(--color-accent-subtle); }
#erpProductCards .zy-card-title { font-weight: 550; line-height: 1.6; }
#erpProductCards[data-layout="list"] .zy-card-img { border-radius: 8px; background: var(--color-surface-subtle); }
#erpProductCards .zy-card-code { font-size: 12px; font-weight: 400; color: var(--color-text-secondary); }
#erpProductCards[data-layout="list"] .zy-card-meta { margin: 0; }
#erpProductCards .zy-card-select { left: 8px; right: auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; box-sizing: border-box; touch-action: manipulation; }
#erpProductCards[data-layout="list"] .zy-card-select { position: static; padding: 0; box-shadow: none; background: transparent; }
.zy-card-values { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--color-text-secondary); }
#erpProductCards .zy-card-foot { margin: 0; font-size: 12px; }
#erpProductCards[data-layout="images"] { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-items: start; }
#erpProductCards[data-layout="images"] .zy-card-img { height: 110px; aspect-ratio: auto; }
#erpProductCards[data-layout="images"] { padding: 16px 18px; gap: 14px; }
#erpProductCards[data-layout="images"] .zy-card { border-radius: 12px; overflow: hidden; box-shadow: none; }
#erpProductCards[data-layout="images"] .zy-card-img img { object-fit: contain; }
#erpProductCards[data-layout="images"] .zy-card-body { gap: 4px; padding: 8px; min-width: 0; }
#erpProductCards[data-layout="images"] .zy-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#erpProductCards[data-layout="images"] .zy-card-foot, #erpProductCards[data-layout="images"] .zy-card-category, #erpProductCards[data-layout="images"] .zy-card-values { display: none; }
.zy-card:focus-within { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.erp-upload-panel { width: min(560px, calc(100vw - 16px)); padding: 0; border-radius: var(--radius-overlay); background: var(--color-surface); box-shadow: var(--shadow-overlay); color: var(--color-text); }
.erp-upload-panel h3 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--color-border); background: var(--color-surface); font-size: 16px; }
.erp-upload-close { width: 32px; height: 32px; color: var(--color-text-secondary); }
.erp-upload-summary { margin: 0; padding: 12px 18px; font-size: 13px; overflow-wrap: anywhere; }
.erp-upload-options { min-width: 0; border: 0; padding: 0 18px; margin: 0; }
.erp-upload-options > legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.erp-upload-country-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.erp-upload-country-head b { margin-right: auto; }
.erp-upload-country-head label { display: inline-flex; align-items: center; min-height: 32px; gap: 4px; cursor: pointer; }
.erp-upload-country-head button { color: var(--color-accent); min-height: 32px; font-weight: 400; }
#erpUploadSiteCount { color: var(--color-text-secondary); font-size: 12px; }
.erp-upload-quota { color: var(--color-text-secondary); margin: 2px 0 8px; }
.erp-upload-quota:empty { display: none; }
.erp-upload-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 8px 0 14px; border: 0; }
.erp-upload-site { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 0 8px; padding: 8px 10px; border: 1px solid var(--color-border-control); border-radius: var(--radius-md); cursor: pointer; }
.erp-upload-site input { grid-row: 1 / 3; align-self: center; margin: 0; }
.erp-upload-site:has(input:checked) { background: var(--color-accent-subtle); border-color: var(--color-accent); }
.erp-upload-site:has(input:disabled) { color: var(--color-text-secondary); background: var(--color-surface-subtle); cursor: default; }
.erp-upload-site small { color: var(--color-text-secondary); font-size: 12px; }
.erp-upload-stock { border-top: 1px solid var(--color-border); padding-top: 12px; margin: 0 0 12px; }
.erp-upload-stock label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.erp-upload-stock > span { flex-basis: 100%; color: var(--color-text-secondary); font-size: 12px; }
.erp-upload-status { margin: 0; padding: 0 18px 8px; overflow-wrap: anywhere; }
.erp-upload-status:empty { display: none; }
.erp-upload-actions { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; padding: 12px 18px; margin: 0; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.erp-upload-outcomes { margin: 0 18px 12px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.erp-upload-outcome { overflow-wrap: anywhere; }
.erp-upload-outcome small { margin-left: 0; color: var(--color-text-secondary); }

/* Mounted editor sections have direct navigation; disclosures never unmount inputs. */
#erpProductModal .erp-product-modal-card { max-width: 1760px; }
#erpProductModal .erp-detail-head { padding: 10px 16px; align-items: center; }
.detail-actionbar { padding: 6px 16px; }
.detail-actionbar .detail-scope { flex: 1 1 180px; padding: 0; border: 0; background: transparent; }
.editor-section-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 16px; border-block: 1px solid var(--color-border); flex: none; background: var(--color-surface-subtle); }
.editor-section-nav button { padding: 4px 8px; border: 0; border-radius: 4px; color: var(--color-accent); background: transparent; cursor: pointer; font: inherit; }
#erpProductModal .zy-modal-body { padding: 12px 16px; scroll-padding: 12px; }
#erpProductModal .detail-overview { gap: 16px; }
#erpProductModal .detail-side-column { background: var(--color-surface-subtle); border-radius: 12px; }
#erpProductModal .zy-section-title h3 { font-size: 14px; }
#erpProductModal .erp-detail-head { background: var(--color-surface-subtle); }
.editor-section-nav button { color: var(--color-text-secondary); }
.editor-section-nav button:hover { color: var(--color-accent); background: var(--color-accent-subtle); }
#erpProductModal .zy-modal-body :where(input,select,textarea) { border-radius: var(--radius-md); }
#erpProductModal .zy-section { padding: 10px 0; }
#erpProductModal .zy-section-title { margin-bottom: 8px; gap: 2px; }
#erpProductModal .zy-section-title.zy-attr-title { flex-direction: row; align-items: center; justify-content: space-between; }
#erpProductModal details.zy-section > summary { font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 8px; }
#erpProductModal .detail-side-column .zy-section { padding: 10px; }
#erpProductModal .detail-gallery { position: relative; }
#erpProductModal .detail-gallery .zy-section-title { min-height: 32px; justify-content: center; padding-right: 40px; }
#erpProductModal .zy-gallery { gap: 6px; }
#erpProductModal .zy-gallery-cell:first-child { grid-column: auto; aspect-ratio: 1; }
#erpProductModal .zy-gallery-image { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--color-surface); cursor: zoom-in; }
#erpProductModal .detail-gallery .zy-gallery-add { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; min-height: 32px; aspect-ratio: auto; }
#erpProductModal #detail-variants table { table-layout: fixed; min-width: 960px; }
#erpProductModal #detail-variants :is(th,td) { box-sizing: border-box; padding: 6px 8px; }
#erpProductModal #erpVariantHead th:first-child { width: 110px; }
#erpProductModal #erpVariantHead th:nth-child(3) { width: clamp(270px, 29vw, 420px); }
#erpProductModal #erpVariantHead :is(th:nth-child(4),th:nth-child(5)) { width: 100px; }
#erpProductModal #erpVariantHead th:nth-child(6) { width: 74px; }
#erpProductModal #erpVariantHead th:last-child { width: 54px; }
#erpProductModal #erpVariantRows .zy-variant-spec { white-space: normal; overflow-wrap: anywhere; }
#erpProductModal #erpVariantRows input { width: 100%; min-width: 0; max-width: none; min-height: 28px; padding: 4px 6px; }
#erpProductModal #erpVariantRows button[data-variant-remove] { width: 100%; min-height: 28px; padding: 4px 0; }
#erpProductModal [data-variant-gallery] { display: flex; align-items: center; gap: 6px; min-width: 0; }
#erpProductModal .zy-variant-gallery { flex: 1 1 0; width: 0; min-width: 0; max-width: none; align-items: flex-start; gap: 4px; padding: 2px 2px 6px; }
#erpProductModal .zy-variant-picture { display: flex; width: 52px; border: 1px solid var(--color-border); border-radius: 4px; overflow: hidden; }
#erpProductModal .zy-variant-image { position: relative; width: 100%; height: 52px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: var(--color-surface); cursor: grab; }
#erpProductModal .zy-variant-image:active { cursor: grabbing; }
#erpProductModal .zy-variant-image img { width: 100%; height: 100%; border: 0; border-radius: 0; cursor: inherit; }
#erpProductModal .zy-variant-picture-order { position: absolute; top: 2px; left: 2px; padding: 1px 4px; border-radius: 3px; background: var(--color-surface); color: var(--color-text-secondary); font-size: 10px; pointer-events: none; }
#erpProductModal .zy-variant-picture-remove { position: absolute; top: 0; right: 0; width: 24px; height: 24px; min-height: 0; padding: 0; border: 0; border-radius: 0 0 0 4px; background: var(--color-surface); color: var(--color-danger); font-size: 18px; }
#erpProductModal .zy-picture-drop { outline: 2px solid var(--color-accent); outline-offset: -2px; }
#erpProductModal .zy-variant-gallery-actions { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 44px; }
#erpProductModal .zy-variant-gallery-actions .zy-btn { width: 44px; min-height: 28px; padding: 3px 0; font-size: 12px; }
#erpProductModal .zy-variant-gallery-actions .site-note { margin: 0; padding: 0; font-size: 11px; white-space: nowrap; }
.erp-variant-picture-picker { max-height: calc(100dvh - 100px); display: flex; flex-direction: column; }
.erp-variant-picture-picker .modal-head, .erp-variant-picture-footer { flex: none; }
.erp-variant-picture-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; overflow-y: auto; min-height: 0; padding: 4px; }
.erp-variant-picture-choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--color-border); border-radius: 6px; cursor: pointer; }
.erp-variant-picture-choice:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-subtle); }
.erp-variant-picture-choice:has(input:disabled) { opacity: .65; cursor: default; }
.erp-variant-picture-choice input { position: absolute; top: 8px; left: 8px; margin: 0; }
.erp-variant-picture-choice img { width: 100%; height: 100px; object-fit: contain; }
.erp-variant-picture-choice span { font-size: 12px; color: var(--color-text-secondary); }
.erp-variant-picture-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 12px; }
@media (pointer: coarse), (max-width: 800px) {
  #erpProductModal .zy-variant-picture { width: 64px; }
  #erpProductModal .zy-variant-image { height: 64px; }
  #erpProductModal .zy-variant-picture-remove { width: 44px; height: 44px; }
  #erpProductModal .zy-variant-gallery-actions .zy-btn, #erpProductModal #erpVariantRows button[data-variant-remove] { min-height: 44px; }
  #erpProductModal #erpVariantRows input { min-height: 40px; }
  .erp-variant-picture-picker .zy-btn { min-height: 44px; }
  .erp-variant-picture-picker { max-height: calc(100dvh - 80px); }
}
#erpProductModal .zy-fields.detail-basic-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#erpProductModal .detail-basic-fields .wide { grid-column: 1 / -1; }
#erpProductModal .zy-field { gap: 4px; }
#erpProductModal .zy-cbt-row { padding: 8px 10px; }
#erpProductModal :is(#erpCbtZhPath, #erpAttrClipboardStatus):empty { display: none; }
#erpProductModal :is(#erpAttrMeta, [data-category-meta]) { margin: 0 0 8px; }
#erpProductModal #erpAttrForm { container: cbt-attributes / inline-size; }
#erpProductModal .zy-attr-group { margin-top: 10px; padding: 8px 12px 12px; }
#erpProductModal .zy-attr-group legend small { display: inline; margin: 0 0 0 8px; }
#erpProductModal .zy-attr-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px 12px; margin-top: 10px; }
#erpProductModal .zy-attr-sections .zy-attr-group { margin: 0; }
#erpProductModal .zy-attr-group-wide { grid-column: 1 / -1; }
#erpProductModal .zy-attr-group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 152px), 1fr)); align-items: end; gap: 10px 12px; }
#erpProductModal .zy-attr-group-grid .zy-field { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; }
#erpProductModal .zy-attr-group-grid .zy-field > label { min-height: 18px; color: var(--color-text); }
#erpProductModal .zy-attr-group-grid .zy-field > :is(input, select, .zy-attr-quantity) { width: 100%; max-width: 180px; }
#erpProductModal .zy-attr-group-grid .zy-field:has([data-attr-input="MODEL"]) { grid-column: span 2; }
#erpProductModal .zy-attr-group-grid .zy-field:has([data-attr-input="MODEL"]) > input { max-width: none; }
#erpProductModal .zy-attr-group-grid :is(input, select) { min-height: 32px; height: 32px; padding: 4px 6px; }
#erpProductModal .zy-attr-group-grid input[type="number"] { text-align: right; }
#erpProductModal .zy-attr-quantity { gap: 4px; }
#erpProductModal .zy-attr-quantity select { width: auto; max-width: 110px; }
#erpProductModal .zy-attr-group-dimensions .zy-attr-group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#erpProductModal .zy-attr-group-dimensions .zy-dimensions-grid-1 { grid-template-columns: minmax(0, 1fr); }
#erpProductModal .zy-attr-group-dimensions .zy-dimensions-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#erpProductModal .zy-attr-group-dimensions .zy-dimensions-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#erpProductModal .zy-attr-group-dimensions .zy-dimensions-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#erpProductModal .zy-attr-group-dimensions .zy-dimensions-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#erpProductModal .zy-package-line { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; }
#erpProductModal .zy-package-field { flex-direction: column; align-items: start; }
#erpProductModal .zy-package-caption { font-size: 12px; color: var(--color-text-secondary); }
#erpProductModal .zy-package-measure label { display: block; margin-bottom: 4px; }
#erpProductModal .zy-package-weight-control .zy-package-measure { flex: 0 0 72px; width: 72px; min-width: 72px; }
#erpProductModal .zy-package-size-control .zy-package-measure { flex: 0 1 72px; width: 72px; }
#erpProductModal .zy-package-measure input { height: 32px; }
#erpProductModal .zy-axis-list { padding: 8px 10px; margin-bottom: 10px; }
#erpProductModal .radar-actions { gap: 12px; align-items: center; margin-top: 8px; }
#erpProductModal .detail-help { padding: 0; border: 0; }
#erpProductModal .detail-help p { margin: 8px 0 0; }
@media (min-width: 981px) {
  #erpProductModal .detail-overview { grid-template-columns: 280px minmax(0, 1fr); }
  #erpProductModal .detail-side-column { display: block; }
  #erpProductModal .detail-side-column .zy-section:first-child { border-right: 0; border-bottom: 1px solid var(--color-border); }
  #erpProductModal .detail-main-column .zy-section:first-child { padding-top: 0; }
}
@media (max-width: 800px) {
  #erpProductModal .zy-attr-group-grid :is(input, select) { min-height: 40px; height: 40px; }
  #erpProductModal .zy-package-measure input { height: 40px; }
  #erpProductModal .zy-package-field:has(.zy-package-size-control) { flex-basis: 100%; flex-direction: column; align-items: stretch; }
}
@media (max-width: 700px) {
  #erpProductModal .zy-attr-group-grid { grid-template-columns: minmax(0, 1fr); }
  #erpProductModal .zy-attr-group-dimensions .zy-attr-group-grid { grid-template-columns: minmax(0, 1fr); }
  #erpProductModal .zy-attr-group-grid .zy-field:has([data-attr-input="MODEL"]) { grid-column: auto; grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
@container cbt-attributes (max-width: 720px) {
  #erpProductModal .zy-attr-sections { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 701px) {
  @container cbt-attributes (max-width: 900px) {
    #erpProductModal .zy-attr-group-dimensions :is(.zy-dimensions-grid-5, .zy-dimensions-grid-6) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
}
.country-context { position: sticky; top: 0; z-index: 4; padding: 6px 0; background: white; gap: 6px; }
.country-section-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.country-draft { scroll-margin-top: 70px; }
.country-listings { scroll-margin-top: 70px; }
.country-listing-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-form-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.inventory-form-fields .zy-fields { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.inventory-form-fields .zy-field { grid-template-columns: 108px minmax(0, 1fr); }
#inventoryPickerStatus:empty { display: none; }
.draft-discard-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.inventory-modal-card .zy-foot-actions { position: sticky; bottom: 0; padding: 10px 0; background: white; display: flex; flex-wrap: wrap; gap: 8px; }
#inventoryUnknownActions { flex-basis: 100%; }
.inv-picker-item { width: 100%; text-align: left; background: white; }
.inv-record-details > summary { cursor: pointer; color: var(--color-accent); font-size: 12px; }
.inv-record-details[open] > summary { margin-bottom: 6px; }
#inventoryGroups { padding: 4px 18px; }
.inv-group { margin: 14px 0; border-radius: 10px; }
.inv-group-head { padding: 12px 16px; background: var(--color-surface-subtle); }
.inv-group-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; }
.inv-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.inv-group-meta { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-table { table-layout: fixed; min-width: 720px; }
.inv-table :is(th,td):first-child { width: 34%; }
.inv-table :is(th,td):nth-child(2) { width: 110px; text-align: right; padding-right: 28px; }
.inv-table :is(th,td):nth-child(3) { padding-left: 24px; }
.inv-table td { vertical-align: middle; }
.inv-table .inv-total-cell { font-size: 17px; font-weight: 550; }
.inv-variant-cell { min-width: 0; }
.inv-variant-cell > div { min-width: 0; }
.inv-variant-sku { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-record { display: grid; grid-template-columns: 82px 64px minmax(120px,1fr) auto auto; align-items: center; gap: 6px; }
.inv-record-note { grid-column: 3 / -1; grid-row: 2; border: 0; padding: 0; }
.inv-record-qty { text-align: right; font-variant-numeric: tabular-nums; }
.inv-tracking { border-radius: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-record .inv-mini-btn { margin: 0; min-height: 32px; padding: 4px 8px; }
.inv-record { padding: 4px 0; }
/* Beijing centered above one row of five country cards. */
.time-content { display: block; padding: 24px 18px; overflow: auto; }
#timeView .panel { margin: 0; width: 100%; overflow: auto; }
.time-cards { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
.time-card { padding: 16px; border-radius: 12px; border-color: var(--color-border); box-shadow: none; }
.time-card .time-clock { display: block; color: var(--color-text); font-weight: 400; font-size: 30px; letter-spacing: -.035em; }
.time-chip { background: transparent; padding: 0; border: 0; border-radius: 0; font-size: 12px; }
.time-card .time-meta { gap: 6px 12px; }
.time-diff { color: var(--color-accent); font-weight: 400; }
.time-holidays { border-top: 1px solid var(--color-border); margin-top: 16px; padding-top: 12px; }
.time-holiday { align-items: baseline; line-height: 1.6; gap: 6px; }
.time-holiday-days { white-space: nowrap; text-align: right; }
.time-card-hero { max-width: 360px; margin: 4px auto 20px; padding: 20px 24px 16px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface-subtle); text-align: left; }
.time-card-hero .time-card-head { justify-content: flex-start; gap: 8px; }
.time-card-hero .time-card-head strong { font-size: 14px; font-weight: 600; }
.time-card-hero .time-flag { font-size: 20px; }
.time-reference-label { margin-left: auto; color: var(--color-text-secondary); font-size: 12px; }
.time-card-hero .time-clock { display: block; margin: 16px 0 4px; color: var(--color-text); font-size: 56px; line-height: 1.1; font-weight: 300; letter-spacing: -.04em; white-space: nowrap; }
.time-seconds { margin-left: 6px; color: var(--color-text-secondary); font-size: 24px; font-weight: 400; letter-spacing: 0; }
.time-card-hero .time-date { font-size: 12px; }
.time-card-hero .time-meta { justify-content: flex-start; gap: 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: 12px; }
.time-reference-zone { margin-left: auto; font-variant-numeric: tabular-nums; }
.workspace-time-help { margin-top: 16px; font-size: 12px; color: var(--color-text-secondary); }
.workspace-time-help > summary { cursor: pointer; }

@media (max-width: 1100px) {
  #erpProductCards[data-layout="list"] .zy-card-body { grid-template-columns: minmax(130px, 1fr) 140px 130px; gap: 8px; }
  #erpProductCards[data-layout="list"] .zy-card-foot { display: none; }
  .time-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .time-card-hero { padding: 18px 16px; }
  .time-card-hero .time-clock { font-size: 48px; }
}
@media (max-width: 800px) {
  body.erp-app[data-auth-state="authenticated"] { display: flex; flex-direction: column; }
  .app-sidebar { flex: none; display: grid; grid-template-columns: 1fr auto; padding: 10px 12px 0; }
  .app-sidebar .app-brand { padding: 0; }
  .app-sidebar .app-brand div > span { display: none; }
  .app-sidebar .app-brand-mark { width: 28px; height: 28px; border-radius: 8px; }
  .app-sidebar .app-brand-mark svg { width: 26px; height: 26px; }
  .app-sidebar .view-tabs { grid-column: 1 / -1; grid-row: 2; padding: 4px 0; }
  .app-sidebar .view-tab { min-height: 44px; padding: 8px 4px; gap: 6px; font-size: 12px; white-space: nowrap; justify-content: center; }
  .app-logout { grid-row: 1; grid-column: 2; margin: 0; padding: 4px 6px; min-height: 32px; }
  #erpFingerprintButton { grid-row: 3; grid-column: 1 / -1; margin: 4px 0 0; justify-content: center; }
  .erp-app main { height: auto; flex: 1; min-height: 0; padding: 8px; margin: 0; }
  .workspace-controls { padding: 4px 8px; }
  .workspace-page-head { padding: 12px; gap: 8px 12px; min-height: 58px; }
  .workspace-page-head h1 { font-size: 20px; }
  .workspace-head-title { gap: 4px 10px; }
  .workspace-head-tools { gap: 4px; }
  #erpListPanel .workspace-head-tools { flex-basis: 100%; margin: 0; justify-content: flex-end; }
  #erpListPanel .workspace-head-tools #erpCategoryOpenButton { margin-right: auto; }
  .workspace-head-tools .zy-btn { min-height: 40px; padding-inline: 10px; }
  #erpListPanel .workspace-query { gap: 6px; }
  #erpListPanel .workspace-query > input { flex: 1 1 calc(100% - 70px); max-width: none; min-width: 0; }
  #erpListPanel #erpExtraFilters { flex: 1 1 auto; }
  #erpListPanel #erpExtraFilters .erp-cascader { min-width: 110px; flex: 1; }
  #erpListPanel .workspace-query-reset { margin-left: 0; }
  #erpListPanel .workspace-query .zy-btn, #erpExtraFilters .erp-cascader-field { min-height: 40px; }
  .workspace-query > input[type="search"], #uploadedView #uploadedSearch { flex-basis: calc(100% - 150px); min-width: 120px; }
  .workspace-query > .workspace-secondary { display: none; }
  .workspace-query .zy-btn { min-height: 36px; padding: 6px 8px; }
  #erpExtraFilters { flex-basis: 100%; flex-wrap: wrap; }
  #erpExtraFilters .erp-cascader { flex: 1; }
  #uploadedExtraFilters { gap: 6px 12px; }
  #uploadedListPanel .uploaded-primary-row { gap: 4px; }
  #uploadedListPanel .uploaded-primary-row .workspace-country-row { flex-basis: 100%; }
  #uploadedView .uploaded-primary-row .uploaded-toolbar { flex: 0 1 352px; }
  #uploadedView #uploadedSearch { flex: 1; width: auto; min-width: 0; max-width: 260px; height: 40px; }
  #uploadedView .uploaded-primary-row .zy-btn, #uploadedView .uploaded-filter-actions .zy-btn { min-height: 40px; }
  #uploadedView .workspace-filter-control select, #uploadedExtraFilters .erp-cascader-field { height: 40px; }
  #uploadedExtraFilters .erp-cascader-field { min-height: 40px; }
  #uploadedExtraFilters .erp-cascader-panel { left: auto; right: 0; }
  #uploadedExtraFilters .workspace-filter-control { flex: none; flex-direction: row; align-items: center; gap: 6px; }
  #uploadedExtraFilters > .erp-cascader { flex: 0 1 205px; align-self: center; }
  #erpExtraFilters .erp-cascader-panel { left: auto; right: 0; }
  #erpProductCards[data-layout="images"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .workspace-country-row .workspace-filter-label, .workspace-status-row .workspace-filter-label { display: none; }
  #uploadedView .uploaded-tabs { flex-wrap: nowrap; overflow-x: auto; align-items: center; scrollbar-width: thin; }
  #uploadedView .uploaded-tab { flex: none; min-height: 36px; }
  .workspace-result-line { gap: 4px; }
  .workspace-result-line .site-note { font-size: 12px; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(2) { width: 164px; min-width: 164px; max-width: 164px; }
  #uploadedView .uploaded-product-cell { align-items: center; }
  #uploadedView .uploaded-product-cell img { width: 28px; height: 28px; }
  #uploadedView .uploaded-product-cell b { font-size: 12px; }
  .workspace-panel .uploaded-pager { padding: 4px; gap: 6px; font-size: 12px; }
  .workspace-panel .uploaded-pager .zy-btn { padding: 4px 6px; }
  #erpProductCards[data-layout="list"] .zy-card { grid-template-columns: 44px 44px minmax(0, 1fr); gap: 8px; padding: 6px 8px; }
  #erpProductCards[data-layout="list"] .zy-card-img { width: 44px; height: 44px; }
  #erpProductCards[data-layout="list"] .zy-card-body { grid-template-columns: minmax(0, 1fr) 120px; gap: 4px; }
  #erpProductCards[data-layout="list"] .zy-card-meta { grid-column: 1 / -1; grid-row: 2; }
  #erpProductCards[data-layout="list"] .zy-card-values { grid-column: 2; grid-row: 1; }
  #erpProductModal .erp-detail-head { padding: 10px 12px; }
  .detail-actionbar { padding: 4px 12px; }
  .detail-actionbar .detail-scope { flex-basis: 100%; }
  .editor-section-nav { padding: 4px 8px; }
  .editor-section-nav button { min-height: 36px; padding: 4px 6px; font-size: 12px; }
  #erpProductModal .zy-modal-body { padding: 12px; }
  #erpProductModal .detail-gallery .zy-section-title { min-height: 44px; padding-right: 50px; }
  #erpProductModal .detail-gallery .zy-gallery-add { width: 44px; height: 44px; min-height: 44px; }
  .country-context { align-items: start; }
  .country-context > strong { flex-basis: 100%; }
  .time-cards { grid-template-columns: minmax(0, 1fr); }
  .time-content { padding: 16px 12px; }
  .time-card-hero { width: 100%; }
  .time-card-hero .time-clock { font-size: 56px; }
  .inv-group-head { grid-template-columns: auto minmax(0,1fr); gap: 6px 10px; }
  .inv-group-meta { grid-column: 1 / -1; }
  .inv-table { min-width: 650px; }
  #inventoryGroups { padding: 0 10px; }
  .time-card { min-width: 0; }
  .time-tz { letter-spacing: 0; }
  .erp-upload-panel { max-height: calc(100dvh - 16px); }
  .erp-upload-close, .erp-upload-actions .zy-btn { min-height: 44px; }
  .erp-upload-country-head label, .erp-upload-country-head button { min-height: 44px; }
  .erp-upload-site { min-height: 54px; }
}
@media (max-width: 480px) {
  #uploadedExtraFilters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
  #uploadedExtraFilters .workspace-filter-control { flex-direction: column; align-items: stretch; gap: 2px; }
  #uploadedView .workspace-filter-control select { width: 100%; }
  #uploadedExtraFilters > .erp-cascader { align-self: end; }
  .uploaded-filter-actions { grid-column: 1 / -1; width: 100%; justify-content: space-between; margin: 0; }
  #erpListPanel .zy-lib-switch { margin-left: auto; }
  #erpListPanel .zy-lib-btn { padding-inline: 7px; font-size: 11px; }
  #erpProductCards[data-layout="list"] .zy-card-body { grid-template-columns: minmax(0,1fr); }
  #erpProductCards[data-layout="list"] .zy-card-values { grid-row: 3; grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
  #erpProductCards[data-layout="list"] .zy-card { min-height: 90px; align-items: start; padding-block: 10px; }
  #erpProductCards[data-layout="list"] .zy-card-select { align-self: center; }
  #erpProductCards[data-layout="list"] .zy-card-img { margin-top: 4px; }
  .workspace-head-note { display: none; }
}

#uploadedView .workspace-scroll :is(th, td):nth-child(5), #uploadedView .workspace-scroll :is(th, td):nth-child(6) { text-align: right; font-variant-numeric: tabular-nums; }
#uploadedView .uploaded-country-name { white-space: nowrap; font-weight: 600; }

/* Uploaded country detail: one working page with persistent context. */
#uploadedView .country-detail-page { overflow: hidden; }
.country-detail-head { display: flex; gap: 10px; align-items: center; flex: none; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
.country-detail-heading { flex: 1; min-width: 0; }
.country-detail-heading h3 { font-size: 18px; line-height: 24px; margin: 0; }
.country-detail-heading .site-note { display: block; font-size: 12px; overflow-wrap: anywhere; }
.country-detail-nav { display: flex; flex: none; align-items: center; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-subtle); }
.country-detail-nav .zy-btn { border-color: transparent; background: transparent; white-space: nowrap; }
.country-detail-nav #countryStatus { margin-left: auto; padding: 0; color: var(--color-warning); font-size: 12px; }
#uploadedModalBody.country-detail-scroll { flex: 1; min-height: 0; max-height: none; overflow: auto; padding: 0 12px 16px; overscroll-behavior: contain; scroll-padding-top: 10px; }
.country-product-overview { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 13px; border-bottom: 1px solid var(--color-border); }
.country-product-overview > img { width: 60px; height: 60px; object-fit: contain; background: var(--color-surface-subtle); border: 1px solid var(--color-border); }
.country-product-overview > div { flex: 1; min-width: 0; }
.country-product-overview p { margin: 4px 0 0; font-size: 12px; color: var(--color-text-secondary); }
.country-product-overview > details { flex: 0 1 260px; font-size: 12px; overflow-wrap: anywhere; }
.country-product-overview summary, .country-section > summary, .country-section details > summary { cursor: pointer; }
.country-section { min-width: 0; margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--color-border); scroll-margin-top: 10px; }
.country-section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.country-section h4, .country-section legend { font-size: 14px; font-weight: 650; margin: 0; }
.country-section > summary { font-size: 14px; font-weight: 650; padding: 0 0 8px; }
.country-section > summary small { font-size: 12px; font-weight: 400; color: var(--color-text-secondary); margin-left: 8px; }
.country-filter-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; align-items: center; }
.country-filter-row input { flex: 1; min-width: 180px; height: 34px; font: inherit; padding: 6px 8px; border: 1px solid var(--color-border-control); border-radius: 6px; }
.country-filter-row select { width: auto; font: inherit; height: 34px; }
.country-selection-bar { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 7px 8px; background: var(--color-surface-subtle); border: 1px solid var(--color-border); font-size: 12px; }
.country-selection-bar > .selection-count { margin-right: auto; }
.country-variant-table { max-width: 100%; margin: 0; }
.country-variant-table table { width: 100%; min-width: 1040px; font-size: 13px; border-collapse: separate; border-spacing: 0; }
.country-variant-table th { background: var(--color-surface-subtle); white-space: nowrap; padding: 9px 8px; font-size: 12px; }
.country-variant-table td { padding: 8px; vertical-align: top; border-bottom: 1px solid var(--color-border); font-variant-numeric: tabular-nums; }
.country-variant-table :is(th,td):first-child { width: 30px; }
.country-variant-table :is(th,td):nth-child(2) { width: 230px; min-width: 200px; }
.country-variant-table :is(th,td):nth-child(4) { min-width: 160px; }
.country-variant-table :is(th,td):nth-child(6), .country-variant-table :is(th,td):nth-child(7) { text-align: right; white-space: nowrap; }
.country-variant-table :is(th,td):last-child { min-width: 90px; }
.country-variant-table small, .country-money > span { display: block; font-size: 12px; line-height: 20px; }
.country-variant-table small { color: var(--color-text-secondary); }
.country-variant-identity { display: flex; gap: 8px; min-width: 0; }
.country-variant-identity img { width: 38px; height: 38px; object-fit: contain; }
.country-variant-identity strong { font-size: 13px; font-weight: 600; }
.country-copy { background: transparent; border: 0; padding: 0; color: var(--color-accent); font: inherit; cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.country-copy:hover, .country-copy:focus-visible { text-decoration: underline; }
.country-front { display: block; font-size: 12px; margin-top: 6px; }
.country-net-editor { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--color-border); }
.country-net-editor label { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.country-net-editor input[type="number"] { width: 80px; min-width: 0; height: 30px; padding: 4px; font: inherit; }
.country-net-actions, .country-copy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; }
.country-net-actions .site-note, .country-copy-actions .site-note { font-size: 12px; padding: 0; }
.country-expanded-cell { background: var(--color-surface-subtle); }
.country-listing-detail { padding: 8px 12px; border-left: 2px solid var(--color-border); margin: 6px; font-size: 12px; }
.country-listing-detail p { margin: 6px 0; overflow-wrap: anywhere; }
.country-listing-detail > label { margin-right: 10px; }
.country-listing-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.country-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 24px; margin: 8px 0 12px; font-size: 12px; color: var(--color-text-secondary); }
.country-facts strong { display: block; font-size: 13px; color: var(--color-text); font-weight: 500; overflow-wrap: anywhere; }
.country-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.country-gallery img { width: 90px; height: 90px; object-fit: contain; border: 1px solid var(--color-border); }
.country-attributes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin: 8px 0; font-size: 12px; }
.country-attributes > div { display: grid; grid-template-columns: minmax(100px,35%) 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--color-border); }
.country-attributes dt { font-weight: 550; }
.country-attributes dt small { display: block; font-weight: 400; color: var(--color-text-secondary); }
.country-attributes dd { margin: 0; overflow-wrap: anywhere; }
#country-draft .uploaded-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#country-draft .uploaded-edit-grid > label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
#country-draft textarea { min-height: 122px; resize: vertical; }
.country-task { padding: 8px 0; font-size: 12px; border-bottom: 1px solid var(--color-border); }
.country-task-times { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 5px 0; color: var(--color-text-secondary); font-size: 11px; }
.country-task p { overflow-wrap: anywhere; }
.country-task p .country-task-times { margin: 2px 0 0; }
.country-platform-reason { padding: 6px 0; font-size: 12px; overflow-wrap: anywhere; }
.country-variant-table td .uploaded-variant-error { max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width:800px) {
  .country-detail-head { flex-wrap: wrap; padding: 8px; gap: 6px; }
  .country-detail-heading h3 { font-size: 16px; }
  .country-detail-heading { flex-basis: calc(100% - 110px); }
  .country-detail-head > button, .country-detail-nav .zy-btn { min-height: 40px; }
  .country-detail-nav { flex-wrap: wrap; gap: 2px; padding: 4px 8px; }
  .country-detail-nav #countryStatus { width: 100%; min-height: 0; margin: 0; }
  #uploadedModalBody.country-detail-scroll { padding: 0 8px 12px; }
  .country-product-overview { flex-wrap: wrap; gap: 8px; padding: 8px 0; }
  .country-product-overview > img { width: 46px; height: 46px; }
  .country-product-overview > details { flex-basis: 100%; }
  .country-facts, .country-attributes, #country-draft .uploaded-edit-grid { grid-template-columns: 1fr; }
  .country-filter-row input { flex-basis: 100%; }
  .country-filter-row .zy-btn, .country-selection-bar .zy-btn, .country-net-actions .zy-btn, .country-copy-actions .zy-btn { min-height: 40px; }
  .country-selection-bar > .selection-count { flex-basis: 100%; }
  .country-section { padding: 10px 0; }
}
#uploadedProductModal .site-note { padding: 0; margin: 0; font-size: 12px; }
#uploadedProductModal .country-detail-head { padding: 8px 12px; }
#uploadedProductModal .country-variant-table :is(th, td) { padding: 6px 8px; }
#uploadedProductModal .country-variant-table small { line-height: 18px; }
#uploadedProductModal .country-net-actions { position: static; flex-basis: 100%; border-top: 1px solid var(--color-border); padding: 6px 0 0; }

/* Current-country detail: compare in the table, inspect alongside it. */
#uploadedProductModal .country-detail-head { padding: 14px 18px; gap: 12px; background: var(--color-surface); }
.country-back { white-space: nowrap; }
.country-header-media { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; background: var(--color-surface-subtle); color: var(--color-text-secondary); border: 1px solid var(--color-border); border-radius: 6px; }
.country-header-media img { width: 100%; height: 100%; object-fit: contain; }
.country-detail-heading h3 { font-size: 19px; line-height: 26px; font-weight: 650; overflow-wrap: anywhere; }
.country-product-open { font-weight: inherit; }
.country-product-open::after { content: "查看产品 ›"; display: inline-block; margin-left: 10px; color: var(--color-accent); font-size: 12px; font-weight: 500; white-space: nowrap; }
.country-header-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--color-text-secondary); font-size: 12px; }
.country-site-label { color: var(--color-accent); font-weight: 550; }
.country-detail-nav { padding: 0 18px; gap: 18px; background: var(--color-surface); min-height: 40px; }
.country-detail-nav .zy-btn { padding: 10px 0; border-radius: 0; font-weight: 550; }
.country-detail-nav .zy-btn:focus-visible { outline-offset: -2px; }
.country-detail-nav .zy-btn.is-current { color: var(--color-accent); box-shadow: inset 0 -2px var(--color-accent); }
.country-detail-layout { display: grid; grid-template-columns: minmax(0,1fr); flex: 1; min-height: 0; position: relative; }
#uploadedModalBody.country-detail-scroll { width: 100%; padding: 0 18px 20px; }
.country-section { padding: 18px 0; }
.country-section-title h4, .country-draft legend { font-size: 15px; }
.country-section-caption { color: var(--color-text-secondary); font-size: 12px; margin: 4px 0 12px; }
.country-shipping-reference { font-size: 12px; color: var(--color-text-secondary); text-align: right; }
.country-filter-row { padding: 14px 0 12px; gap: 8px; }
.country-filter-row input { max-width: 460px; }
.country-filter-row select { min-width: 120px; }
.country-selection-bar { padding: 8px 10px; border-radius: 6px; background: var(--color-accent-subtle); border-color: var(--color-border); gap: 8px; }
#countryRetryReason { min-height: 18px; line-height: 18px; }
.country-menu { position: relative; font-size: 12px; flex: 0 0 auto; }
.country-menu > summary { list-style: none; min-height: 34px; display: flex; align-items: center; padding: 6px 10px; border-radius: 6px; color: var(--color-text-secondary); cursor: pointer; }
.country-menu > summary::after { content: "⌄"; margin-left: 6px; }
.country-menu > div { position: absolute; top: calc(100% + 4px); right: 0; z-index: 8; min-width: 160px; padding: 5px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); box-shadow: var(--shadow-menu); }
.country-menu > div .zy-btn { width: 100%; display: block; border: 0; text-align: left; white-space: nowrap; }
.country-menu[open] > summary { background: var(--color-surface-hover); }
#uploadedProductModal .country-variant-table table { display: table; width: 100%; min-width: 990px; overflow: visible; }
.country-variant-table :is(th,td):nth-child(2) { width: 210px; min-width: 185px; }
.country-variant-table :is(th,td):nth-child(4) { min-width: 85px; text-align: right; }
.country-variant-table :is(th,td):nth-child(5) { min-width: 180px; }
.country-variant-table :is(th,td):nth-child(6) { min-width: 155px; text-align: left; white-space: normal; }
.country-variant-table :is(th,td):nth-child(7), .country-variant-table :is(th,td):nth-child(8) { text-align: right; white-space: nowrap; }
#uploadedProductModal .country-variant-table th { padding: 9px 10px; }
#uploadedProductModal .country-variant-table td { padding: 10px; vertical-align: middle; }
#uploadedProductModal .country-variant-table :is(th,td):first-child { width: 44px; min-width: 44px; padding: 0; }
.country-variant-row:hover { background: var(--color-surface-hover); }
.country-variant-identity { align-items: center; gap: 10px; }
.country-variant-identity img { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 4px; }
.country-publish-reason { max-width: 28em; white-space: normal; overflow-wrap: anywhere; }
.country-upload-result { margin-block-start: 4px; }
.country-listing-count { white-space: nowrap; }
.country-price { font-weight: 550; }
.country-competition-hint { min-width: 208px; text-align: left; font-weight: 400; }
.country-competition-hint small { display: block; font-size: 12px; line-height: 20px; color: var(--color-text-secondary); }
.country-money > span { color: var(--color-text); font-size: 13px; }
.country-value-source { font-size: 12px; color: var(--color-text-secondary); }
.country-net-editor { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; margin-top: 3px; }
.country-net-editor label { color: var(--color-text-secondary); }
.country-net-editor input[type="number"] { width: 74px; height: 30px; text-align: right; }
.country-default, .country-text-button { background: transparent; border: 0; font: inherit; font-size: 12px; padding: 4px 0; color: var(--color-accent); cursor: pointer; }
.country-default:hover, .country-text-button:hover { text-decoration: underline; }
.country-default:disabled { color: var(--color-text-muted); cursor: default; }
.country-help { font-size: 12px; color: var(--color-text-secondary); margin-top: 10px; }
.country-help summary { cursor: pointer; }
.country-help p { margin: 8px 0; line-height: 1.6; }
.country-info-grid { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(0,1.2fr); gap: 28px; }
.country-product-facts { min-width: 0; }
.country-facts { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; gap: 14px 18px; }
.country-facts dt { color: var(--color-text-secondary); font-size: 12px; }
.country-facts dd { margin: 4px 0 0; color: var(--color-text); font-size: 13px; overflow-wrap: anywhere; }
.country-package-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0; }
.country-package-action small { color: var(--color-text-secondary); font-size: 12px; }
.country-product-facts > details { border-top: 1px solid var(--color-border); padding: 10px 0; font-size: 12px; }
.country-product-facts > details > summary { color: var(--color-text-secondary); cursor: pointer; }
.country-product-facts > details p { overflow-wrap: anywhere; }
.country-draft { min-width: 0; margin: 0; padding: 0 0 0 24px; border: 0; border-left: 1px solid var(--color-border); }
.country-draft legend { padding: 0; font-weight: 650; }
.country-copy-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 5px 0 10px; color: var(--color-text-secondary); font-size: 12px; }
.country-copy-preview { padding: 12px 14px; border-radius: 6px; background: var(--color-surface-subtle); }
.country-copy-preview > div + div { border-top: 1px solid var(--color-border); padding-top: 12px; margin-top: 12px; }
.country-copy-preview small { color: var(--color-text-secondary); font-size: 12px; }
.country-copy-preview p { margin: 6px 0 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
#country-draft .uploaded-edit-grid { grid-template-columns: 1fr; gap: 14px; }
#country-draft .uploaded-edit-grid > label { gap: 5px; }
#country-draft .uploaded-edit-grid .country-default { align-self: flex-start; }
.country-copy-actions { padding: 12px 0 0; }
.country-copy-actions small { color: var(--color-text-secondary); font-size: 12px; }
.country-inspector { min-width: 0; max-width: none; width: min(460px,100%); max-height: 100dvh; height: 100dvh; margin: 0 0 0 auto; padding: 0; position: fixed; inset: 0 0 0 auto; border: 0; border-left: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-overlay); }
.country-inspector[open] { display: flex; flex-direction: column; }
.country-inspector::backdrop { background: rgba(22,30,44,.24); }
.country-inspector > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; flex: 0 0 auto; border-bottom: 1px solid var(--color-border); }
.country-inspector h4 { font-size: 16px; margin: 3px 0 0; overflow-wrap: anywhere; }
.country-inspector-body { padding: 0 18px 20px; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
.country-inspector .country-listing-detail { border: 0; border-bottom: 1px solid var(--color-border); margin: 0; padding: 16px 0; font-size: 13px; }
.country-inspector .country-listing-detail > label.selection-hit { display: inline-flex; vertical-align: middle; gap: 6px; align-items: center; margin: 0 8px 8px 0; }
.country-inspector .country-listing-detail p { margin: 8px 0; line-height: 1.6; }
.country-snapshot-section { margin-top: 16px; }
.country-snapshot-section h5 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.country-snapshot-section small, .country-snapshot-stamp { font-size: 12px; color: var(--color-text-secondary); }
.country-shipping-detail small { display: block; margin-top: 4px; line-height: 1.6; }
.country-fee-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; padding: 12px; border-radius: 6px; background: var(--color-surface-subtle); }
.country-fee-grid dt { color: var(--color-text-secondary); font-size: 12px; }
.country-fee-grid dd { margin: 4px 0 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.country-inspector .country-gallery img { width: 90px; height: 90px; border-radius: 4px; }
@media(min-width:1700px) {
  .country-detail-layout.has-inspector { grid-template-columns: minmax(0,1fr) 420px; }
  .country-inspector { position: relative; inset: auto; width: 100%; height: 100%; max-height: 100%; margin: 0; box-shadow: none; }
}
@media(max-width:1000px) {
  .country-info-grid { grid-template-columns: 1fr; gap: 22px; }
  .country-draft { border-left: 0; border-top: 1px solid var(--color-border); padding: 18px 0 0; }
}
@media(max-width:800px) {
  #uploadedProductModal .country-detail-head { padding: 10px; gap: 8px; }
  .country-detail-heading { flex-basis: calc(100% - 110px); }
  .country-header-media { display: none; }
  .country-detail-heading h3 { font-size: 16px; line-height: 22px; }
  .country-header-meta { gap: 3px 8px; }
  #countryHeaderSummary { flex-basis: 100%; }
  .country-detail-head > #countryDetailSync { margin-left: auto; }
  .country-detail-nav { padding: 0 10px; gap: 16px; }
  #uploadedModalBody.country-detail-scroll { padding: 0 10px 16px; }
  .country-section-title { align-items: flex-start; flex-wrap: wrap; }
  .country-shipping-reference { text-align: left; }
  .country-filter-row input { max-width: none; }
  .country-filter-row select { flex: 1; }
  .country-selection-bar > .selection-count { flex-basis: 100%; }
  .country-selection-bar .zy-btn, .country-menu > summary, .country-default, .country-text-button { min-height: 40px; }
  #uploadedProductModal .zy-btn, .country-menu > summary, .country-default, .country-text-button { min-height: 44px; }
  .country-net-editor input[type="number"], #country-draft input, #country-draft textarea { font-size: 16px; min-height: 40px; }
  .country-inspector { width: 100%; }
}

/* Native collection-import dialog follows the existing workspace palette. */
.collected-import-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.collected-import-dialog::backdrop { background: rgb(15 23 42 / 35%); }
.collected-import-dialog .zy-field { display: block; margin: 12px 0; }
.collected-import-dialog .zy-field label { display: block; text-align: left; margin-bottom: 8px; }
.collected-import-dialog textarea { width: 100%; min-height: 180px; resize: vertical; font-family: ui-monospace, monospace; }
.collected-import-dialog .zy-btn { min-height: 44px; }
.collected-import-results { max-height: 280px; overflow-y: auto; margin: 12px 0; }
.collected-import-results table { table-layout: fixed; width: 100%; }
.collected-import-results th:first-child { width: 55%; }
.collected-import-results td { vertical-align: top; overflow-wrap: anywhere; }

/* Five-site buyer copy editor: compact country cards, shared language bases,
   optional per-site descriptions, and explicit draft-only buyer preview. */
#erpProductModal .erp-copy-editor { display: grid; gap: 12px; min-width: 0; }
#erpProductModal .erp-copy-heading { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; }
#erpProductModal .erp-copy-heading h4,
#erpProductModal .erp-copy-preview h4 { font-size: 15px; font-weight: 650; line-height: 1.45; margin: 0 0 3px; }
#erpProductModal .erp-copy-heading p,
#erpProductModal .erp-copy-preview-head small { font-size: 12px; line-height: 1.6; color: var(--color-text-secondary); margin: 0; }
#erpProductModal .erp-copy-heading > small { color: var(--color-text-muted); font-size: 12px; text-align: right; }
#erpProductModal .erp-copy-title-list { display: grid; gap: 6px; }
#erpProductModal .erp-copy-country { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 12px; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 10px; min-width: 0; }
#erpProductModal .erp-copy-country-head { display: flex; flex-direction: column; gap: 3px; }
#erpProductModal .erp-copy-country-head strong { font-size: 13px; font-weight: 600; }
#erpProductModal .erp-copy-country-head strong small { color: var(--color-text-muted); font-size: 11px; font-weight: 400; margin-left: 3px; }
#erpProductModal .erp-copy-source { font-size: 11px; color: var(--color-text-muted); }
#erpProductModal .erp-copy-country-input { display: flex; align-items: center; gap: 10px; min-width: 0; }
#erpProductModal .erp-copy-country-input > input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 13px; }
#erpProductModal .erp-copy-country-input > small { width: 42px; text-align: right; flex: none; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
#erpProductModal .erp-copy-country-input .erp-copy-invalid { color: var(--color-danger); font-weight: 600; }
#erpProductModal .erp-copy-country-input .zy-btn { flex: none; font-size: 12px; padding-inline: 8px; }
#erpProductModal .erp-copy-master-titles,
#erpProductModal .erp-copy-internal { border: 1px solid var(--color-border); border-radius: 10px; padding: 12px 14px; }
#erpProductModal .erp-copy-master-titles > summary,
#erpProductModal .erp-copy-internal > summary { font-size: 13px; font-weight: 550; cursor: pointer; }
#erpProductModal .erp-copy-master-fields { display: grid; gap: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 14px; }
#erpProductModal .erp-copy-master-fields label,
#erpProductModal .erp-copy-base-description,
#erpProductModal .erp-copy-country-description label,
#erpProductModal .erp-copy-internal label { display: grid; gap: 7px; min-width: 0; font-size: 12px; font-weight: 550; }
#erpProductModal .erp-copy-master-fields input { width: 100%; box-sizing: border-box; }
#erpProductModal .erp-copy-master-titles p,
#erpProductModal .erp-copy-country-description-editor p { font-size: 12px; color: var(--color-text-secondary); margin: 10px 0 0; }
#erpProductModal .erp-copy-description-heading { margin-top: 4px; }
#erpProductModal .erp-copy-language-tabs { margin-bottom: 0; }
#erpProductModal .erp-copy-base-description textarea,
#erpProductModal .erp-copy-country-description textarea,
#erpProductModal .erp-copy-internal textarea { width: 100%; box-sizing: border-box; min-height: 150px; line-height: 1.7; font-size: 13px; resize: vertical; }
#erpProductModal .erp-copy-country-description { border: 1px solid var(--color-border); border-radius: 10px; padding: 14px; display: grid; gap: 12px; }
#erpProductModal .erp-copy-description-line { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
#erpProductModal .erp-copy-description-line label { flex: 1 1 180px; }
#erpProductModal .erp-copy-description-line select { width: 100%; }
#erpProductModal .erp-copy-description-line small { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 10px; }
#erpProductModal .erp-copy-description-line button { margin-bottom: 2px; }
#erpProductModal .erp-copy-country-description-editor { display: grid; gap: 4px; }
#erpProductModal .erp-copy-internal { display: grid; gap: 12px; }
#erpProductModal .erp-copy-internal:not([open]) { display: block; }
#erpProductModal .erp-copy-internal label { margin-top: 10px; }
#erpProductModal .erp-copy-internal input { width: 100%; }
#erpProductModal .erp-copy-preview { display: grid; gap: 12px; border: 1px solid var(--color-border); border-radius: 12px; padding: 16px; background: var(--color-surface-subtle); }
#erpProductModal .erp-copy-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
#erpProductModal .erp-copy-preview-head select { flex: none; max-width: 180px; }
#erpProductModal .erp-copy-preview > small { font-size: 11px; color: var(--color-text-muted); }
#erpProductModal .erp-copy-preview > strong { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
#erpProductModal .erp-copy-preview > p { font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; margin: 0; color: var(--color-text-secondary); }
@media(max-width:800px) {
  #erpProductModal .erp-copy-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  #erpProductModal .erp-copy-country { grid-template-columns: minmax(0,1fr); gap: 8px; }
  #erpProductModal .erp-copy-country-head { flex-direction: row; justify-content: space-between; gap: 10px; align-items: center; }
  #erpProductModal .erp-copy-country-input { flex-wrap: wrap; gap: 8px; }
  #erpProductModal .erp-copy-country-input > input { flex-basis: 100%; }
  #erpProductModal .erp-copy-master-fields { grid-template-columns: minmax(0,1fr); }
  #erpProductModal .erp-copy-preview-head { flex-wrap: wrap; }
  #erpProductModal .erp-copy-preview-head select { flex: 1 1 180px; max-width: none; }
}
#erpProductModal [data-copy-description-owner][hidden] { display: none; }
#erpProductModal [data-copy-reset][hidden] { display: none; }

/* Uploaded list: keep filters accessible but give the table the viewport. */
#uploadedListPanel .workspace-page-head { min-height: 48px; padding: 7px 14px; }
#uploadedListPanel .workspace-page-head h1 { font-size: 20px; line-height: 28px; }
/* Header stacking context must outrank sticky table cells when the fixed
   batch dock overlaps the list on short/narrow screens. */
#uploadedListPanel .workspace-controls { padding: 6px 14px 4px; z-index: 10; }
#uploadedListPanel .uploaded-primary-row { gap: 4px 12px; }
#uploadedView .uploaded-primary-row .workspace-country-row { flex: 1 1 660px; gap: 6px; }
#uploadedView #uploadedSiteTabs { padding: 2px; border-radius: 8px; }
#uploadedView #uploadedSiteTabs .uploaded-tab[data-site] { min-width: 85px; min-height: 40px; padding: 3px 8px; gap: 0; border-radius: 6px; }
#uploadedView #uploadedSiteTabs .uploaded-site-name { gap: 4px; line-height: 17px; }
#uploadedView #uploadedSiteTabs .uploaded-site-meta { gap: 5px; line-height: 15px; }
#uploadedView .workspace-country-row .uploaded-quota-refresh { min-height: 32px; padding: 4px 7px; }
#uploadedView .uploaded-primary-row .uploaded-toolbar { flex: 0 1 315px; gap: 5px; }
#uploadedView .uploaded-primary-row .uploaded-toolbar .workspace-filter-label { display: none; }
#uploadedView #uploadedSearch { flex: 1 1 auto; width: 220px; max-width: none; height: 32px; }
#uploadedView .uploaded-primary-row .uploaded-toolbar .zy-btn { min-height: 32px; padding: 4px 10px; }
#uploadedListPanel .uploaded-refine-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
#uploadedView .uploaded-refine-row .workspace-status-row { flex: 0 0 auto; align-items: center; gap: 5px; margin: 0; }
#uploadedView #uploadedStatusTabs { flex: 0 0 auto; gap: 2px; padding: 0; }
#uploadedView #uploadedStatusTabs .uploaded-tab { min-height: 30px; padding: 4px 7px; }
#uploadedView #uploadedExtraFilters { flex: 1 1 330px; padding: 0; gap: 4px 8px; }
#uploadedView #uploadedExtraFilters .workspace-filter-control { gap: 4px; }
#uploadedView #uploadedExtraFilters .workspace-filter-control select,
#uploadedView #uploadedExtraFilters .erp-cascader-field { height: 32px; min-height: 32px; padding-block: 4px; }
#uploadedView #uploadedCatalog { width: 126px; }
#uploadedView #uploadedShipping { width: 118px; }
#uploadedView #uploadedCategory { width: 166px; }
#uploadedView #uploadedExtraFilters > .erp-cascader { flex: 0 1 170px; }
#uploadedView .uploaded-filter-actions { gap: 2px; }
#uploadedView .uploaded-filter-actions .zy-btn { min-height: 32px; padding: 4px 7px; }
#uploadedListPanel .workspace-result-line { min-height: 30px; margin-top: 3px; gap: 4px 8px; padding: 2px 0; }
#uploadedListPanel .workspace-result-line:has(> #uploadedSummary:empty) { display: none; }
#uploadedListPanel .workspace-result-line .site-note { line-height: 20px; }
/* Selection and actions share a single compact row. */
#uploadedListPanel #uploadedDeleteBar { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; margin: 4px 0 0; padding: 0; border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: transparent; box-shadow: none; }
#uploadedListPanel #uploadedDeleteCount { color: var(--color-accent); font-size: 12px; }
.uploaded-batch-actions { display: contents; }
#uploadedListPanel .uploaded-batch-actions .zy-btn { min-height: 32px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.uploaded-whole-action { display: inline-flex; border-left: 1px solid var(--color-border); padding-left: 8px; margin-left: 2px; }
#uploadedListPanel .workspace-scroll td { height: 52px; }
#uploadedListPanel .workspace-scroll :is(th, td):nth-child(2) { width: 28%; min-width: 0; max-width: none; }
#uploadedListPanel .uploaded-product-cell small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#uploadedListPanel .uploaded-cell-note { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#uploadedListPanel .uploaded-error-snippet { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 18px; cursor: help; }
@media (max-width: 1100px) {
  #uploadedView .uploaded-primary-row .workspace-country-row { flex-basis: 100%; }
  #uploadedView .uploaded-primary-row .uploaded-toolbar { flex: 1 1 auto; max-width: 480px; }
  #uploadedView #uploadedSearch { max-width: none; }
  #uploadedView .uploaded-refine-row .workspace-status-row { max-width: 100%; }
  #uploadedView #uploadedExtraFilters { flex-basis: 100%; }
}
@media (max-width: 800px) {
  #uploadedListPanel .workspace-controls { padding: 6px 10px 4px; }
  #uploadedListPanel .workspace-page-head { padding: 8px 10px; }
  #uploadedListPanel .workspace-scroll :is(th, td):nth-child(2) { width: 23%; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(3) { width: 46%; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(7),
  #uploadedView .workspace-scroll :is(th, td):nth-child(8) { display: none; }
  #uploadedView .uploaded-refine-row .workspace-status-row { width: 100%; }
  #uploadedView #uploadedStatusTabs { flex: 1 1 auto; min-width: 0; }
  #uploadedView .uploaded-primary-row .uploaded-toolbar .zy-btn { min-height: 40px; }
  #uploadedView #uploadedSearch { height: 40px; }
  #uploadedView #uploadedExtraFilters .workspace-filter-control select,
  #uploadedView #uploadedExtraFilters .erp-cascader-field { height: 40px; min-height: 40px; }
}
@media (max-width: 480px) {
  #uploadedListPanel .workspace-scroll :is(th, td):nth-child(2) { width: 36%; }
  #uploadedView .uploaded-variant-numbers > span { display: none; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(3) { width: auto; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(4) { width: 64px; }
  #uploadedView .workspace-scroll :is(th, td):nth-child(5),
  #uploadedView .workspace-scroll :is(th, td):nth-child(6) { display: none; }
  #uploadedView #uploadedExtraFilters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #uploadedView #uploadedExtraFilters .workspace-filter-control select { width: 100%; }
  #uploadedView #uploadedExtraFilters > .erp-cascader { width: 100%; }
}

@media (max-width: 600px) {
  #uploadedListPanel .workspace-controls { flex: 0 1 auto; min-height: 80px; overflow-y: auto; }
  #uploadedListScroll { flex: 1 0 min(160px, 25dvh); }
  #uploadedListPanel #uploadedDeleteBar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px 0; }
  #uploadedListPanel #uploadedDeleteBar > .selection-extra:not([hidden]) { grid-column: 1 / -1; }
  #uploadedListPanel .uploaded-batch-actions .zy-btn { width: 100%; min-height: 40px; padding: 6px 8px; }
  .uploaded-whole-action { margin: 0; padding: 0; border-left: 0; }
}

/* Five-country category profiles, expanded on demand. */
.country-category-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.country-category-check { border-top:1px solid var(--color-border);padding:10px 0;overflow-wrap:anywhere; }
.country-category-check p { margin:4px 0; }
#erpProductModal .zy-attr-fields { container: cbt-attributes / inline-size; }
#erpProductModal .country-category-current { padding-bottom:10px; border-bottom:1px solid var(--color-border); }
#erpProductModal #erpCountryCategoryPanel > .zy-section { margin-top:0; }
#erpProductModal .country-package-note { grid-column:1 / -1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:0; }
.category-scope-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:4px 0 12px}
.category-scope-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:56px;min-width:0;padding:8px 5px;border:1px solid var(--border,#dce1e8);border-radius:7px;background:var(--surface,#fff);color:inherit;cursor:pointer}
.category-scope-tabs [aria-selected="true"]{background:#edf4ff;border-color:#2463bd;color:#174787;box-shadow:inset 0 -2px 0 #2463bd}
.category-scope-tabs small{font-size:12px;font-weight:400;color:var(--text-muted,#596579)}
.category-scope-tabs button:focus-visible{outline:3px solid #2463bd;outline-offset:2px}
.category-scope-help{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0}
.category-scope-help p{margin:0;flex:1;min-width:180px;color:var(--text-muted,#596579);line-height:1.6}
.erp-upload-category-plans{max-height:220px;overflow:auto;margin:10px 0}.erp-upload-category-plans table{width:100%;border-collapse:collapse;font-size:12px}.erp-upload-category-plans td,.erp-upload-category-plans th{text-align:left;padding:7px;border-bottom:1px solid #dce1e8}.erp-upload-category-plans .notice{margin:8px 0}
@media(max-width:760px){.category-scope-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.country-category-actions{width:100%}}

.erp-upload-dialog { z-index:75; padding:12px; }
.erp-upload-dialog .erp-upload-panel { max-height:calc(100dvh - 24px);overflow:auto; }
.erp-upload-category-plans .zy-btn { min-height:44px;display:block;padding:5px 7px; }
/* Refresh stays a visible, single-click action on every supported surface. */
.refresh-status:empty { display: none; }
.refresh-status { font-size: 12px; overflow-wrap: anywhere; }
.zy-btn[aria-busy="true"] { position: relative; }
.zy-btn[aria-busy="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 2px; border-radius: 2px; background: currentColor; animation: workspace-refresh-pulse 1s ease-in-out infinite; }
@keyframes workspace-refresh-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .zy-btn[aria-busy="true"]::after { animation: none; } }

/* Counts occupy the same space before and after selection. */
.selection-count { display: inline-block; min-width: 8em; color: var(--color-accent); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.uploaded-delete-hint:not(:empty) { color: var(--color-danger); font-size: 12px; font-weight: 600; white-space: nowrap; }
#uploadedListPanel #uploadedDeleteCount { min-width: 8em; }

.inspection-dialog { width:min(760px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid var(--line,#ddd); border-radius:12px; padding:20px; }
.inspection-dialog::backdrop { background:rgba(0,0,0,.35); }
.inspection-dialog .modal-head { position:sticky; top:-20px; background:var(--panel,#fff); z-index:1; }
.inspection-dialog .modal-close { min-width:44px; min-height:44px; font-size:20px; }
.inspection-dialog:has(#inspectionCategories) { width:min(560px,calc(100vw - 24px)); }
.inspection-dialog .site-note { padding:0; }
#inspectionProgress { margin-top:10px; }
#inspectionCategories { min-width:0; padding:0; margin:16px 0; border:1px solid var(--color-border); border-radius:8px; }
.inspection-category-heading, .inspection-category-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 12px; }
.inspection-category-heading { background:var(--color-canvas); border-radius:8px 8px 0 0; }
.inspection-category-heading h4 { margin:0; font-size:14px; }
.inspection-category-list { list-style:none; margin:0; padding:0; max-height:min(32dvh, 280px); overflow:auto; }
.inspection-category-row { border-top:1px solid var(--color-border); font-size:14px; overflow-wrap:anywhere; }
.inspection-category-empty { margin:0; padding:18px 12px; border-top:1px solid var(--color-border); color:var(--color-text-secondary); }
.inspection-category-heading .zy-btn, .inspection-dialog .inspection-remove, #inspectionCategoryPicker button { min-height:44px; }
#inspectionCategoryPicker { margin:0 12px 10px; }
#inspectionCategoryPicker .erp-batch-category-options { height:clamp(140px, 24dvh, 220px); }
#inspectionRemoved { margin:8px 12px; }
#inspectionFeedback:empty { display:none; }
.inspection-dialog .uploaded-modal-actions { flex-wrap:wrap; }
.inspection-dialog table { width:100%; overflow-wrap:anywhere; }

/* 属性建议值下拉：自绘弹层，点击箭头始终展开全部候选（避免原生 datalist
   按当前输入值过滤，选过一次后看不到其它候选）。 */
.zy-attr-combo { position: relative; display: flex; align-items: stretch; gap: 0; min-width: 0; width: 100%; }
.zy-attr-combo input { width: auto; flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.zy-attr-combo-toggle { flex: none; width: 34px; min-height: 34px; border: 1px solid #c5ced4; border-left: 0; border-top-right-radius: 4px; border-bottom-right-radius: 4px; background: #fff; color: #52636b; font-size: 12px; line-height: 1; cursor: pointer; }
.zy-attr-combo-toggle:hover:not(:disabled) { background: #eef3f8; }
.zy-attr-combo-toggle:disabled { cursor: default; opacity: .5; }
.zy-attr-combo-list { position: absolute; z-index: 30; top: calc(100% + 2px); left: 0; right: 0; max-height: 240px; overflow: auto; padding: 4px; border: 1px solid #c5ced4; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.18); display: flex; flex-direction: column; gap: 2px; }
.zy-attr-combo-list[hidden] { display: none; }
.zy-attr-combo-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.zy-attr-combo-opt:hover, .zy-attr-combo-opt:focus-visible { background: #edf4ff; outline: none; }
.zy-attr-combo-opt small { color: #7a8894; font-size: 11px; }

#ordersView .workspace-page-head { min-height: 52px; padding: 8px 14px; }
#ordersView .workspace-page-head h1 { font-size: 20px; }
#ordersQueryForm #ordersSite { width: auto; min-width: 116px; }
#ordersStages { display: flex; flex-wrap: wrap; gap: 4px; margin-block: 8px 4px; }
#ordersStages .site-tab { min-height: 32px; padding: 4px 10px; }
#ordersView .workspace-result-line { align-items: flex-start; justify-content: space-between; }
.orders-coverage { color: var(--color-text-secondary); font-size: 12px; max-width: 100%; }
.orders-coverage summary { cursor: pointer; }
.orders-coverage ul { margin: 6px 0; padding-inline-start: 18px; overflow-wrap: anywhere; }
.orders-coverage li + li { margin-block-start: 4px; }
.orders-workspace { display: flex; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.orders-workspace > .workspace-scroll { min-width: 0; background: var(--color-surface); }
.orders-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.orders-table :is(th,td) { padding: 6px 8px; white-space: nowrap; vertical-align: middle; }
.orders-table th { position: sticky; top: 0; z-index: 2; background: var(--color-surface-subtle); font-size: 12px; }
.orders-table td { height: 54px; }
.orders-table tbody tr:hover td, .orders-table .order-selected td { background: var(--color-accent-subtle); }
.orders-table .order-number { padding-inline-start: 14px; }
.orders-table .order-image { width: 58px; }
.orders-table .order-money { text-align: right; font-variant-numeric: tabular-nums; }
.orders-table .order-amount { color: var(--color-accent); font-weight: 650; }
.orders-table .order-date { font-variant-numeric: tabular-nums; }
.orders-table .order-id { min-height: 26px; padding: 0; color: var(--color-accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.orders-table .order-sale { max-width: clamp(110px, 15vw, 240px); }
.orders-table :is(.order-sale-title, .order-sale small) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.orders-table .order-sale-title { font-weight: 550; }
.orders-table .order-sourcing-link { font-size: 12px; }
.orders-table small { display: block; color: var(--color-text-secondary); font-size: 11px; font-weight: 400; line-height: 1.4; }
.order-picture-button { background: transparent; border: 0; padding: 0; border-radius: 6px; cursor: pointer; display: inline-flex; }
.order-thumb { display: block; width: 40px; height: 40px; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); object-fit: contain; }
.order-thumb-empty { display: grid; place-items: center; color: var(--color-text-secondary); background: var(--color-surface-subtle); }
.orders-missing { color: var(--color-text-secondary); }
.orders-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 14px; border-top: 1px solid var(--color-border); }
.orders-totals, .orders-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12px; font-variant-numeric: tabular-nums; }
.orders-totals { color: var(--color-text-secondary); }
.orders-totals strong { color: var(--color-text); }
.orders-pager { margin-inline-start: auto; }
.orders-pager .site-note { padding: 0; }
.orders-empty { margin: 16px; }
.orders-detail[open] { display: flex; flex-direction: column; color: var(--color-text); background: var(--color-surface); border: 0; padding: 0; }
.orders-detail[open]:not(:modal) { position: static; margin: 0; width: clamp(325px, 31vw, 440px); height: 100%; box-sizing: border-box; flex: none; border-inline-start: 1px solid var(--color-border); }
.orders-detail[open]:modal { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: none; width: min(440px, 100vw); max-width: none; }
.orders-detail::backdrop { background: rgb(15 23 42 / 36%); }
.orders-detail .zy-modal-head { display: flex; flex: none; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--color-border); }
.orders-detail .zy-modal-head h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.orders-detail .zy-modal-body { flex: 1; min-height: 0; max-height: none; padding: 12px 14px; overflow: auto; overscroll-behavior: contain; font-size: 13px; }
.orders-detail .site-note { padding: 0; }
.orders-detail h4 { margin: 14px 0 8px; font-size: 13px; }
.order-detail-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; color: var(--color-text-secondary); }
.orders-detail .notice { margin: 8px 0; padding: 6px 9px; overflow-wrap: anywhere; }
.orders-detail dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 5px 12px; font-variant-numeric: tabular-nums; }
.orders-detail dt { color: var(--color-text-secondary); }
.orders-detail dd { margin: 0; overflow-wrap: anywhere; }
.order-detail-money { background: var(--color-surface-subtle); padding: 8px 10px; border-radius: 6px; }
.order-items, .order-shipments { list-style: none; padding: 0; margin: 0; }
.order-items li { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px; padding: 8px 0; border-block-end: 1px solid var(--color-border); overflow-wrap: anywhere; }
.order-items .order-thumb { width: 64px; height: 64px; }
.order-items p { margin: 3px 0; }
.order-items a { display: inline-block; margin-top: 3px; }
.order-shipments li { display: flex; flex-wrap: wrap; gap: 3px 10px; padding: 7px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.order-shipments li small { color: var(--color-text-secondary); }
#ordersView:has(.orders-detail[open]:not(:modal)) .orders-table { min-width: 740px; }
#ordersView:has(.orders-detail[open]:not(:modal)) .orders-table :is(th,td) { padding-inline-end: 6px; }
#ordersView:has(.orders-detail[open]:not(:modal)) .orders-table .order-sale { max-width: 145px; }
#ordersView:has(.orders-detail[open]:not(:modal)) .order-extra { display: none; }
#ordersActionError { color: var(--color-danger); margin-block-start: 6px; }

@media (max-width: 640px) {
  .orders-table { min-width: 0; }
  .orders-table :is(td,th) { padding: 5px; }
  .orders-table .order-number { padding-inline-start: 8px; }
  .orders-table .order-image { width: 36px; }
  .orders-table .order-image .order-thumb { width: 32px; height: 32px; }
  .orders-table .order-id { font-size: 11px; }
  .orders-table .order-amount { font-size: 12px; }
  .orders-table .order-status { white-space: normal; padding-inline: 3px; }
  .orders-table .ui-badge { font-size: 11px; padding-inline: 3px; white-space: normal; }
  .orders-table :is(.order-sale,.order-cost,.order-profit,.order-extra,.order-date) { display: none; }
  #ordersStages .site-tab { padding-inline: 8px; }
  .orders-footer { padding: 6px 8px; }
}
