/**
 * 「价目表」工作台样式（客户版阶段 2 前端）。
 *
 * 口径来源：5177 `src/styles/03-price-list.css`（整块工作台 2,647 行）里的形状与节奏：
 *   - 页面骨架：标题区 + 摘要 + 左树右表（`.price-list-workbench-scroll` / `--product-knowledge-tree-width`）；
 *   - 表格缩放：`zoom: var(--price-list-table-scale, .8)`（03-price-list.css:579）；
 *     **本表的局部缩放与 5177 的最终值一致**：5177 面板渲染时写的是
 *     `priceListTableScaleActualValue(80)/100 = 1.1`（IW:123-126、3057-3059、35335；
 *     CSS 里的 .8 只是没被 JS 覆盖时的兜底），再叠板块缩放 0.70 → 0.77；
 *     客户版同为 1.1 × 0.70 = 0.77（数值不需要另配补偿）。
 *   - 主表/参考价/Remark/历史报价各自独立的列模板（03-price-list.css 的 `--price-list-*-column-template`）；
 *   - 行高默认 240px、最小 150px、最大 720px（IW:120-122）。
 *
 * 客户版规则（与 app.css 同一套）：
 *   - 颜色一律 `var(--wb-*)`（`npm run check:design` 会扫本文件）；
 *   - px 一律抄 5177 的缩放前原值，由板块缩放 `--workbench-section-scale`（默认 0.70）统一缩放
 *     （2026-10-01 业务方实机对照后拍板；旧基准 §6 C9 的"不复刻"已作废）。
 */

/* ============================================================
 * 1. 页面骨架
 * ============================================================ */

.price-list-maintenance-page {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-6);
  min-width: 0;
}

.price-list-heading {
  gap: var(--wb-space-5);
}

.price-list-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-5);
}

.price-list-excel-action-group,
.price-list-category-open-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--wb-space-1);
  min-width: 0;
}

.price-list-excel-feedback {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  max-width: 420px;
}

.price-list-excel-last-updated {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.price-list-excel-status {
  color: var(--wb-success);
  font-size: var(--wb-fs-12);
  line-height: var(--wb-font-line-height);
  overflow-wrap: anywhere;
}

.price-list-excel-status.error {
  color: var(--wb-danger);
}

.price-list-excel-status[hidden] {
  display: none;
}

/* ============================================================
 * 2. 统计摘要（照 IW:20980-21008）
 * ============================================================ */

.price-list-summary-panel {
  display: grid;
  gap: var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-5) var(--wb-space-6);
  box-shadow: var(--wb-shadow-soft);
}

/* 2026-10-13 摘要上移进标题行后，这里只剩「摘要就绪」小字：去盒子、去投影，
 * 留一点上间距让它在标题行分隔线之下呼吸（照 5177 头部的收法）。 */
.price-list-summary-panel--line {
  display: block;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: var(--wb-space-3) 0 0;
}

/* 统计小框簇：排在大标题同一行右侧（2026-10-13 业务方口径，样式照 5177 头部小框：
 * 描边圆角小方框、上面小标签、下面粗数字，flex-wrap 自带窄屏换行，不另做媒体查询）。 */
.price-list-heading-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--wb-space-3);
  min-width: 0;
}

.price-list-heading-chip {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-2) var(--wb-space-3);
  min-width: 64px;
}

.price-list-heading-chip span {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  white-space: nowrap;
}

.price-list-heading-chip strong {
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
}

/* 价目表卡片标题行：标签簇跟着标题走，「更新本地 Excel」顶到最右（共用 .section-heading
 * 只在价目表这张卡里改成左起排，其他模块不动）。 */
#priceListModule .section-heading {
  justify-content: flex-start;
}
#priceListModule .section-heading .heading-actions {
  margin-left: auto;
}

.price-list-summary-status {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

/* ============================================================
 * 3. 左树 + 右表布局（容器与滚动方式照 5177 03-price-list.css:167-206：
 *    外层按视口高固定、横向可滚；表格自己在容器内双向滚，表头 sticky）
 * ============================================================ */

.price-list-maintenance-page {
  /* 工作台视口高：5177 是 max(560px, calc((100vh - 180px) / scale))，客户版没有页面缩放，取前半段 */
  --price-list-workbench-viewport-height: max(560px, calc(100vh - 180px));
}

.price-list-workbench-scroll {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: var(--price-list-workbench-viewport-height);
  max-height: var(--price-list-workbench-viewport-height);
  overflow-x: auto;
  overflow-y: hidden;
}

.price-list-workbench-layout {
  /* 左树宽度由面板拖动写入（240–620px，照 IW:154-156）；这里给默认值兜底。
     主区最小宽 1440px（IW:178），不够宽时外层横向滚动（5177 同款）。 */
  --price-list-tree-width: 320px;
  --price-list-workbench-main-min-width: 1440px;
  display: grid;
  grid-template-columns: var(--price-list-tree-width, 320px) minmax(var(--price-list-workbench-main-min-width, 1440px), 1fr);
  align-items: stretch;
  gap: 12px;
  width: max(100%, calc(var(--price-list-tree-width, 320px) + var(--price-list-workbench-main-min-width, 1440px) + 12px));
  min-width: calc(var(--price-list-tree-width, 320px) + var(--price-list-workbench-main-min-width, 1440px) + 12px);
  min-height: 0;
  height: var(--price-list-workbench-viewport-height);
  max-height: var(--price-list-workbench-viewport-height);
  box-sizing: border-box;
}

/* 左树与产品知识是同一套组件/样式（`.product-knowledge-tree*` 在 taxonomy-tree.css），
   这里只放 5177 价目表自己的覆写（5177-CSS 03-price-list.css:208-327 的几何；颜色走令牌）。 */
.price-list-category-tree {
  --product-list-depth: 0;   /* 树行缩进由每行行内样式覆写（照产品知识树） */
  height: 100%;
  min-height: 0;
}

.price-list-category-tree .price-list-category-tree-row {
  grid-template-columns: 26px minmax(0, 1fr);
}

.price-list-category-tree .product-knowledge-tree-row {
  gap: 5px;
  padding-left: calc(var(--product-list-depth, 0) * 31px);
}

.price-list-category-tree .product-knowledge-tree-toggle {
  min-width: 26px;
  min-height: 31px;
  font-size: calc(var(--wb-fs-12) * 1.3);
}

.price-list-category-tree .price-list-tree-unclassified,
.price-list-category-tree .product-knowledge-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-3);
  min-width: 0;
  min-height: 34px;
  font-size: calc(var(--wb-fs-13) * 1.3);
  padding: 5px 9px;
}

.price-list-category-tree-row[data-price-list-tree-level="1"] .product-knowledge-tree-item {
  min-height: 44px;
  font-size: calc(var(--wb-fs-13) * 1.5 * 1.3);
  line-height: 1.2;
}

.price-list-category-tree-row[data-price-list-tree-level="2"] .product-knowledge-tree-item {
  min-height: 39px;
  font-size: calc(var(--wb-fs-13) * 1.2 * 1.3);
  line-height: 1.2;
}

.price-list-tree-unclassified {
  margin-top: 4px;
}

.price-list-tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-list-tree-counts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  color: var(--wb-text-secondary);
  font-size: calc(var(--wb-fs-11) * 1.3);
  font-weight: var(--wb-fw-850);
}

.price-list-tree-counts strong,
.price-list-tree-counts em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  height: 23px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg);
  color: var(--wb-text-primary);
  font-style: normal;
  line-height: 1;
  padding: 0 7px;
}

.price-list-tree-counts em {
  border-color: var(--wb-toast-success-border);
  background: var(--wb-success-bg);
  color: var(--wb-success);
}

.price-list-category-tree .product-knowledge-tree-item.active .price-list-tree-counts strong,
.price-list-category-tree .product-knowledge-tree-item.active .price-list-tree-counts em,
.price-list-tree-unclassified.active .price-list-tree-counts strong,
.price-list-tree-unclassified.active .price-list-tree-counts em {
  border-color: var(--wb-panel-bg);
  background: var(--wb-panel-bg);
}

/* 类目标题行（5177-CSS-PL:5011-5015 / 14417-14420） */
.price-list-category-tree .quote-side-title {
  min-height: 36px;
  font-size: calc(var(--wb-fs-12) * 1.3);
  padding: 8px 10px;
}

.price-list-category-tree .quote-side-title.product-tree-search-heading {
  min-height: 54px;
  padding-block: 10px;
}

.price-list-tree-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 8px;
  height: auto;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.price-list-tree-resize-handle:hover {
  background: var(--wb-accent-soft);
}

.price-list-workbench-main {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: var(--wb-space-4);
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* 表格壳：撑满主区最后一行，表格自己在里面滚（IW:200-206） */
.price-list-workbench-main > [data-price-list-grid-shell] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* ============================================================
 * 4. 工具排（照 IW:24792-24817）
 * ============================================================ */

.price-list-maintenance-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-4) var(--wb-space-5);
  box-shadow: var(--wb-shadow-soft);
}

.price-list-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-3);
}

.price-list-category-filter {
  position: relative;
}

.price-list-category-picker {
  position: absolute;
  top: calc(100% + var(--wb-space-1));
  left: 0;
  z-index: var(--wb-z-menu);
  display: flex;
  gap: var(--wb-space-1);
  border: 1px solid var(--wb-menu-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-menu-bg);
  padding: var(--wb-space-3);
  box-shadow: var(--wb-shadow-menu);
  max-width: min(760px, 82vw);
  overflow: auto;
}

.product-cascade-trigger {
  min-height: var(--wb-control-height);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--wb-btn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-btn-bg);
  color: var(--wb-btn-ink);
  padding: 0 var(--wb-space-5);
  font: inherit;
  font-size: var(--wb-fs-13);
  cursor: pointer;
}

.product-cascade-trigger.has-value {
  color: var(--wb-accent-ink);
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
}

.product-cascade-trigger:hover {
  color: var(--wb-btn-hover-ink);
  border-color: var(--wb-btn-hover-border);
  background: var(--wb-btn-hover-bg);
}

.product-cascade-column {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  min-width: 118px;
  max-height: 300px;
  overflow: auto;
  border-right: 1px solid var(--wb-border);
  padding-right: var(--wb-space-3);
}

.product-cascade-column:last-child {
  border-right: 0;
  padding-right: 0;
}

.product-cascade-option,
.product-cascade-clear {
  border: 1px solid transparent;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-text-primary);
  padding: var(--wb-space-2) var(--wb-space-3);
  font: inherit;
  font-size: var(--wb-fs-12);
  text-align: left;
  cursor: pointer;
}

.product-cascade-option:hover,
.product-cascade-clear:hover {
  background: var(--wb-btn-text-hover-bg);
}

.product-cascade-option.active,
.product-cascade-clear.active {
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  font-weight: var(--wb-fw-700);
}

.product-cascade-node {
  color: var(--wb-accent-ink);
  border-color: var(--wb-chip-border);
  background: var(--wb-chip-bg);
}

.product-cascade-empty {
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-12);
  padding: var(--wb-space-2) var(--wb-space-3);
}

.price-list-category-picker-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--wb-space-2);
  min-width: 168px;
  padding-left: var(--wb-space-3);
}

.price-list-category-picker-actions span {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  overflow-wrap: anywhere;
}

.price-list-table-scale-control {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-3);
  min-height: var(--wb-control-height);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: 0 var(--wb-space-4);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-700);
  white-space: nowrap;
}

.price-list-table-scale-control input[type="range"] {
  width: 120px;
  accent-color: var(--wb-accent);
}

.price-list-toolbar-more summary {
  min-height: var(--wb-control-height);
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wb-btn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-btn-bg);
  color: var(--wb-btn-ink);
  padding: 0 var(--wb-space-5);
  font-size: var(--wb-fs-13);
  cursor: pointer;
  list-style: none;
}

.price-list-toolbar-more summary::-webkit-details-marker {
  display: none;
}

.price-list-toolbar-more[open] summary {
  color: var(--wb-btn-hover-ink);
  border-color: var(--wb-btn-hover-border);
  background: var(--wb-btn-hover-bg);
}

.price-list-toolbar-more-menu {
  position: absolute;
  z-index: var(--wb-z-menu);
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  margin-top: var(--wb-space-1);
  border: 1px solid var(--wb-menu-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-menu-bg);
  padding: var(--wb-space-2);
  box-shadow: var(--wb-shadow-menu);
}

.price-list-toolbar-more-menu button {
  border: 0;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-btn-text-ink);
  padding: var(--wb-space-2) var(--wb-space-5);
  font: inherit;
  font-size: var(--wb-fs-13);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.price-list-toolbar-more-menu button:hover {
  background: var(--wb-btn-text-hover-bg);
}

.price-list-toolbar-more-menu button:disabled {
  color: var(--wb-text-disabled);
  opacity: var(--wb-disabled-opacity);
  cursor: not-allowed;
}

.price-list-toolbar-more {
  position: relative;
}

.quote-library-status {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
  line-height: var(--wb-font-line-height);
  overflow-wrap: anywhere;
}

.quote-library-status.error {
  color: var(--wb-danger);
}

.quote-library-status[hidden] {
  display: none;
}

.price-list-context-hint {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

/* ============================================================
 * 5. 表格（照 IW:23679-23716、22413-22451）
 * ============================================================ */

.price-list-maintenance-table {
  /* 面板每次渲染都会把这些列模板/宽度变量写到这张表上（照 IW:3056-3069）。
     1.1 = 5177 的 JS 实际值（显示 80 + 偏移 30 = 110，IW:123-126/3096-3102/35335），
     不是给 1:1 环境配的补偿；叠上板块缩放 0.70 后与 5177 的 0.77 一致，不要改。 */
  --price-list-table-scale: 1.1;
  /* 这两枚只是兜底：行高与图高上限的真值都由 JS 同步逐行写到行内（IW:33429-33447
     与 33368-33391），静态值只兜「脚本还没跑/这行没同步上」的窗口，不许拿它当版式。 */
  --price-list-row-height: auto;
  --price-list-image-max-height: 360px;
  --price-list-main-column-template: 112px 220px 462px 74px 74px 74px 75px 88px 88px 101px;
  --price-list-main-min-width: 1368px;
  --price-list-reference-column-template: 112px 150px;
  --price-list-reference-width: 262px;
  --price-list-remark-width: 320px;
  --price-list-history-column-template: 140px 100px 110px 100px 120px 56px 230px;
  --price-list-history-width: 856px;
  --price-list-custom-images-width: 420px;
  /* 容器与滚动照 5177 03-price-list.css:565-580：撑满表格壳、四张表并排（inner 横向排）、
     容器自己双向滚（表头 sticky 在顶部），不再另设 max-height（外层视口高已固定）。 */
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overflow-anchor: none;
  box-sizing: border-box;
  zoom: var(--price-list-table-scale, 1.1);
  border: 1px solid var(--wb-price-list-grid-line);
  border-radius: 0;
  background: var(--wb-price-list-cell-bg);
  font-size: var(--wb-fs-18);
}

.price-list-maintenance-table-inner {
  display: flex;
  align-items: stretch;
  width: max-content;
}

.price-list-main-table {
  flex: 0 0 auto;
  min-width: var(--price-list-main-min-width, 1368px);
}

.price-list-grid-head,
.price-list-grid-row {
  display: grid;
  grid-template-columns: var(--price-list-main-column-template, 112px 220px 462px 74px 74px 74px 75px 88px 88px 101px);
  align-items: stretch;
}

.price-list-grid-head {
  position: sticky;
  top: 0;
  z-index: var(--wb-z-content);
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-weight: var(--wb-fw-900);
}

/* 表头单元与数据单元共用同一条外观规则（照 03-price-list.css:608-620）：
   每格四周都是 1px 网格线、内容水平垂直都居中、min-height 62px */
.price-list-grid-head > div,
.price-list-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 62px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  padding: var(--wb-space-2);
  text-align: center;
}

/* 六个数字列表头写小一号并收紧左右（照 03-price-list.css:634-643） */
.price-list-grid-head [data-price-list-main-column="lengthPx"],
.price-list-grid-head [data-price-list-main-column="widthPx"],
.price-list-grid-head [data-price-list-main-column="heightPx"],
.price-list-grid-head [data-price-list-main-column="volumePx"],
.price-list-grid-head [data-price-list-main-column="netWeightPx"],
.price-list-grid-head [data-price-list-main-column="grossWeightPx"] {
  font-size: var(--wb-fs-16);
  padding-left: 2px;
  padding-right: 2px;
}

/* 最后一列的右边线由容器外框兜住，不再叠一条（照 03-price-list.css:678-681） */
.price-list-grid-head > div:last-child,
.price-list-cell:last-child {
  border-right: 0;
}

/* 表头排字照 03-price-list.css:622-632 + invoice.css:2425-2440：
   标签是 inline-grid 居中，多行靠 JS 切出来的堆叠行（不是 pre-line 折 \n），
   紧凑到 line-height 1.05，表头因此矮到 64px 而不是 85px。 */
.price-list-header-label {
  display: inline-grid;
  place-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  line-height: 1.05;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

.price-list-header-stack {
  display: inline-grid;
  gap: 0;
  max-width: 100%;
  line-height: 1.05;
  white-space: normal;
  vertical-align: middle;
}

.price-list-header-line {
  display: block;
  min-width: 0;
  line-height: 1.05;
}

.price-list-grid-row {
  background: var(--wb-price-list-cell-bg);
}

/* 行高两态照 03-price-list.css:688-695：自动态让内容撑开（下限是 JS 写的行内值），
   手动态锁死高度。 */
.price-list-grid-row.is-auto-height {
  height: auto;
  min-height: var(--price-list-row-height, 0px);
}

.price-list-grid-row.is-manual-height {
  height: var(--price-list-row-height, 240px);
  min-height: var(--price-list-row-height, 240px);
}

.price-list-grid-row .price-list-cell {
  min-height: 0;
  overflow: hidden;
}

.price-list-grid-row:hover,
.price-list-grid-row.is-context-target {
  background: var(--wb-table-row-hover-bg);
}

.price-list-cell {
  color: var(--wb-price-list-cell-ink);
  overflow-wrap: anywhere;
}

/* calc 格（体积/毛重这类自动列）：浅灰底 + 加粗（照 03-price-list.css:1168-1172） */
.price-list-cell.calc-cell {
  background: var(--wb-price-list-calc-bg);
  color: var(--wb-price-list-cell-ink);
  font-weight: var(--wb-fw-800);
}

.price-list-item-cell {
  display: grid;
  place-items: center;
  gap: 4px;
  cursor: grab;
  user-select: none;
}

.price-list-item-cell span {
  color: var(--wb-price-list-empty-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-800);
}

.price-list-item-cell[draggable="true"] {
  cursor: grab;
}

.price-list-grid-row.is-dragging {
  opacity: var(--wb-disabled-opacity);
}

.price-list-grid-row.is-drop-before {
  box-shadow: inset 0 3px 0 var(--wb-price-list-resizer-ink);
}

.price-list-grid-row.is-drop-after {
  box-shadow: inset 0 -3px 0 var(--wb-price-list-resizer-ink);
}

/* 图片/描述两列改成纵向铺满（照 03-price-list.css:788-811） */
.price-list-image-cell,
.price-list-description-cell {
  align-items: stretch;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.price-list-description-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* 空态占位框：高度跟 03-price-list.css:820-832 一样锁在 190px（不是行高减出来的 228，
   那是之前两边行高被撑到 241 的元凶），外观也换成 5177 的实线浅框。 */
.price-list-image-dropzone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 4px;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 190px;
  border: 1px solid var(--wb-price-list-divide-line);
  border-radius: 8px;
  background: var(--wb-price-list-calc-bg);
  overflow: hidden;
}

.price-list-image-dropzone.has-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  height: auto;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  max-height: var(--price-list-image-max-height, 360px);
  background: var(--wb-price-list-cell-bg);
  overflow: visible;
}

/* 多图合辑（照 03-price-list.css:848-859）：整框铺满单元、内部图片自己排，
   外层框与空态同一条浅线。 */
.price-list-image-dropzone.has-image.has-picture-gallery {
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  max-height: none;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.price-list-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wb-space-1);
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-11);
}

.price-list-picture-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
  width: 100%;
  height: 100%;
  overflow: auto;
}

.price-list-picture-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface-muted);
  min-height: 96px;
}

.price-list-picture-tile img {
  max-width: 100%;
  /* 图片高度跟着描述文字长度走（JS 写的 --price-list-image-max-height），不是按行高算死值 */
  max-height: var(--price-list-image-max-height, 360px);
  object-fit: contain;
}

.price-list-picture-main-badge {
  position: absolute;
  left: var(--wb-space-1);
  top: var(--wb-space-1);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-pill-bg);
  color: var(--wb-pill-ink);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-850);
  padding: 0 var(--wb-space-2);
}

.price-list-row-category {
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-11);
}

.price-list-product-style-unselected {
  margin-left: var(--wb-space-2);
  color: var(--wb-warning);
}

/* 只读值画成像输入框一样的浅框（照 03-price-list.css:1907-1936） */
.price-list-readonly-value {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid var(--wb-price-list-readonly-border);
  border-radius: 5px;
  background: var(--wb-price-list-cell-bg);
  color: var(--wb-price-list-cell-ink);
  padding: 5px 6px;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.price-list-readonly-value.is-empty {
  color: var(--wb-price-list-placeholder-ink);
}

.price-list-readonly-value.is-multiline {
  height: 100%;
  min-height: 54px;
  line-height: 1.35;
  overflow: auto;
}

.price-list-cell.small-cell .price-list-readonly-value,
.price-list-reference-cell .price-list-readonly-value {
  text-align: center;
}

.price-list-empty {
  min-width: 100%;
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  padding: 28px;
  color: var(--wb-price-list-empty-ink);
  font-weight: var(--wb-fw-850);
  text-align: center;
}

/* 展开/收起 Reference Price 的竖条（照 03-price-list.css:1371-1405：10px 宽，
   文字视觉隐藏、用 title/aria 说明；夹在主表与参考价表之间） */
.price-list-reference-toggle {
  display: block;
  flex: 0 0 10px;
  align-self: stretch;
  width: 10px;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-right: 1px solid var(--wb-price-list-toggle-border);
  border-left: 1px solid var(--wb-price-list-toggle-border);
  border-radius: 0 !important;
  box-shadow: none !important;
  background: var(--wb-price-list-toggle-bg);
  cursor: pointer;
  line-height: 0;
  padding: 0;
}

.price-list-reference-toggle:hover,
.price-list-reference-toggle:focus-visible {
  background: var(--wb-price-list-toggle-hover);
  outline: 2px solid var(--wb-price-list-toggle-focus);
  outline-offset: -2px;
}

.price-list-reference-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 参考价表（照 IW:22385-22398；列宽来自 IW:159-162；并排布局见 IW:23716 的 inner） */
.price-list-reference-table {
  flex: 0 0 var(--price-list-reference-width, 262px);
  width: var(--price-list-reference-width, 262px);
  min-width: var(--price-list-reference-width, 262px);
  background: var(--wb-price-list-cell-bg);
}

/* Reference Price 的两行绿表头（照 03-price-list.css:1219-1261）：
   标题行 0-31px、列头行 31-62px，各自 sticky；单元内容居中 */
.price-list-reference-title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 31px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-900);
}

.price-list-reference-head {
  position: sticky;
  top: 31px;
  z-index: 2;
  height: 31px;
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-weight: var(--wb-fw-900);
}

.price-list-reference-head,
.price-list-reference-row {
  display: grid;
  grid-template-columns: var(--price-list-reference-column-template, 112px 150px);
}

.price-list-reference-head > div,
.price-list-reference-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  padding: var(--wb-space-2);
  text-align: center;
}

.price-list-reference-row {
  height: var(--price-list-row-height, auto);
  min-height: var(--price-list-row-height, 0);
  background: var(--wb-price-list-cell-bg);
}

.price-list-reference-row:hover,
.price-list-reference-row.is-context-target {
  background: var(--wb-table-row-hover-bg);
}

/* 多条参考价时改成纵向排列，只读框之间画分隔线（照 03-price-list.css:1281-1298） */
.price-list-reference-cell.is-multi-value {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.price-list-reference-cell.is-multi-value > .price-list-readonly-value {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: var(--wb-space-2);
}

.price-list-reference-cell.is-multi-value > .price-list-readonly-value + .price-list-readonly-value {
  border-top: 1px solid var(--wb-price-list-divide-line);
}

/* Remark 表（照 IW:22413-22422） */
.price-list-remark-table {
  flex: 0 0 var(--price-list-remark-width, 320px);
  width: var(--price-list-remark-width, 320px);
  min-width: var(--price-list-remark-width, 320px);
  background: var(--wb-price-list-cell-bg);
}

/* Remark 表头：单行 62px 绿底（照 03-price-list.css:1310-1343） */
.price-list-remark-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 62px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-900);
}

.price-list-remark-row {
  height: var(--price-list-row-height, auto);
  min-height: var(--price-list-row-height, 0);
  background: var(--wb-price-list-cell-bg);
}

.price-list-remark-row:hover,
.price-list-remark-row.is-context-target {
  background: var(--wb-table-row-hover-bg);
}

.price-list-remark-cell {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  padding: var(--wb-space-2);
  color: var(--wb-price-list-cell-ink);
}

/* 历史报价表（照 IW:22439-22451；列宽与文案来自 IW:188-196） */
.price-list-history-table {
  flex: 0 0 var(--price-list-history-width, 856px);
  width: var(--price-list-history-width, 856px);
  min-width: var(--price-list-history-width, 856px);
  background: var(--wb-price-list-cell-bg);
}

/* 历史报价的两行绿表头（照 03-price-list.css:1594-1643）：标题行 0-31px、
   列头行 31-62px；列头字左对齐、「图」列居中（跟 5177 一致） */
.price-list-history-title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 31px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-900);
}

.price-list-history-head {
  position: sticky;
  top: 31px;
  z-index: 2;
  height: 31px;
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-weight: var(--wb-fw-900);
}

.price-list-history-head > div {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: start;
  min-width: 0;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  padding-left: var(--wb-space-3);
  color: var(--wb-price-list-head-ink);
  text-align: left;
}

.price-list-history-head > div[data-price-list-history-column="image"] {
  justify-items: center;
  padding-left: 0;
  text-align: center;
}

.price-list-history-head,
.price-list-history-line {
  display: grid;
  grid-template-columns: var(--price-list-history-column-template, 140px 100px 110px 100px 120px 56px 230px);
}

/* 行与行之间靠 5px 间隙分开（照 03-price-list.css:1653-1663 的 history-scroll：
   flex 纵排 + gap 5px）。行内**不画**网格线——5177 的历史报价列在行中间没有深色
   分隔线，格感全部由只读框自己形成，这是两边之前看起来乱的主要差异。 */
.price-list-history-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  height: var(--price-list-row-height, auto);
  min-height: var(--price-list-row-height, 0);
  background: var(--wb-price-list-cell-bg);
}

.price-list-history-row:hover,
.price-list-history-row.is-context-target {
  background: var(--wb-table-row-hover-bg);
}

.price-list-history-line {
  align-items: center;
}

/* 只读框离单元格边缘留 4px 白缝，多条时框与框之间就是这条缝（照 03-price-list.css:1939-1948） */
.price-list-history-line > .price-list-readonly-value {
  width: calc(100% - 8px);
  min-height: 30px;
  margin: 0 4px;
}

.price-list-history-line > .price-list-readonly-value.is-multiline {
  height: auto;
  min-height: 30px;
  max-height: 90px;
}

/* 图列：内容居中，小方块 30×30 像颗缩略图按钮（照 03-price-list.css:1730/1953-1961） */
.price-list-history-image-cell {
  display: grid;
  place-items: center;
  min-width: 0;
}

.price-list-readonly-image {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--wb-price-list-readonly-border);
  border-radius: 5px;
  background: var(--wb-price-list-cell-bg);
  overflow: hidden;
}

.price-list-readonly-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-list-history-empty {
  padding: var(--wb-space-3);
  color: var(--wb-price-list-muted-ink);
}

/* Custom Images 只读列（照 IW:22484-22488 / 23711；几何来自 03-price-list.css:1414-1484） */
.price-list-custom-images-table {
  flex: 0 0 var(--price-list-custom-images-width, 420px);
  width: var(--price-list-custom-images-width, 420px);
  min-width: var(--price-list-custom-images-width, 420px);
  background: var(--wb-price-list-cell-bg);
}

/* Custom Images 表头单行 62px 绿底（照 03-price-list.css:1420-1443） */
.price-list-custom-images-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 62px;
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  background: var(--wb-price-list-head-bg);
  color: var(--wb-price-list-head-ink);
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-900);
}

.price-list-custom-images-row {
  border-right: 1px solid var(--wb-price-list-grid-line);
  border-bottom: 1px solid var(--wb-price-list-grid-line);
  height: var(--price-list-row-height, auto);
  min-height: var(--price-list-row-height, 0);
  padding: var(--wb-space-2);
  box-sizing: border-box;
}

.price-list-custom-images-row:hover,
.price-list-custom-images-row.is-context-target {
  background: var(--wb-table-row-hover-bg);
}

.price-list-custom-images-gallery {
  --price-list-custom-image-rows: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(var(--price-list-custom-image-rows), minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 5px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.price-list-custom-images-tile {
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--wb-price-list-input-border);
  border-radius: 6px;
  background: var(--wb-price-list-calc-bg);
}

.price-list-custom-images-tile img {
  width: 100%;
  height: 100%;
  background: var(--wb-price-list-cell-bg);
  object-fit: contain;
}

.price-list-custom-images-more {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  color: var(--wb-price-list-more-ink);
  font-weight: var(--wb-fw-900);
}

.price-list-custom-images-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--wb-price-list-muted-ink);
}

/* 继续显示更多产品（照 IW:22605-22614；蓝系配色照 03-price-list.css:1181-1211） */
.price-list-render-window {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-3);
  border: 1px solid var(--wb-price-list-render-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-price-list-render-bg);
  padding: var(--wb-space-3) var(--wb-space-5);
  color: var(--wb-price-list-render-ink);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-800);
}

.price-list-render-window button {
  min-height: 30px;
  border: 1px solid var(--wb-price-list-render-btn-border);
  border-radius: 5px;
  background: var(--wb-price-list-render-btn-bg);
  color: var(--wb-price-list-render-btn-ink);
  cursor: pointer;
  font: inherit;
  font-weight: var(--wb-fw-900);
  padding: var(--wb-space-1) var(--wb-space-5);
}

.price-list-render-window button:hover,
.price-list-render-window button:focus-visible {
  border-color: var(--wb-price-list-render-btn-hover-border);
  background: var(--wb-price-list-render-btn-hover-bg);
}

/* ============================================================
 * 6. 右键菜单（照 IW:23557-23566）
 * ============================================================ */

.price-list-row-context-menu {
  position: fixed;
  z-index: var(--wb-z-menu);
  display: flex;
  flex-direction: column;
  min-width: 168px;
  border: 1px solid var(--wb-menu-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-menu-bg);
  padding: var(--wb-space-2);
  box-shadow: var(--wb-shadow-menu);
  /* 反向补偿（2026-10-01 板块缩放）：菜单挂在缩放区（.card 内容）里，fixed 的尺寸与
   * 指针坐标都会被缩 0.70；照 5177 的除算（invoice.css:2697、09-quote-library-2.css:716）。 */
  zoom: calc(1 / var(--workbench-section-scale, 1));
}

.price-list-row-context-menu button {
  border: 0;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-btn-text-ink);
  padding: var(--wb-space-2) var(--wb-space-5);
  font: inherit;
  font-size: var(--wb-fs-13);
  text-align: left;
  cursor: pointer;
}

.price-list-row-context-menu button:hover {
  background: var(--wb-btn-text-hover-bg);
}

.price-list-row-context-menu button.is-danger {
  color: var(--wb-btn-danger-ink);
}

.price-list-row-context-menu button.is-danger:hover {
  background: var(--wb-btn-danger-hover-bg);
}

/* ============================================================
 * 7. 产品编辑弹窗 / 转移弹窗（照 IW:23076-23166）
 * ============================================================ */

.price-list-product-editor-backdrop,
.price-list-transfer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--wb-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wb-overlay-bg);
  padding: var(--wb-space-6);
}

.price-list-product-editor-dialog,
.price-list-transfer-dialog {
  display: flex;
  flex-direction: column;
  width: min(1180px, 96vw);
  max-height: 92vh;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-lg);
  background: var(--wb-panel-bg);
  box-shadow: var(--wb-shadow-modal);
  overflow: hidden;
  /* 反向补偿：弹窗在缩放区里，尺寸与居中都会被缩 0.70（5177 03-price-list.css:2002 同款）。 */
  zoom: calc(1 / var(--workbench-section-scale, 1));
}

.price-list-transfer-dialog {
  width: min(620px, 94vw);
}

/* 2026-10-09 照 5177：编辑产品弹窗默认开大（四边留 48px，关闭按钮与右下角把手都可及），
   右下角可拖拽调小；缩小后内容区自行滚动（body 本来就 overflow:auto）。 */
.price-list-product-editor-dialog {
  width: min(1980px, calc(100vw - 48px));
  height: min(1180px, calc(100dvh - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 48px);
  min-width: 520px;
  min-height: 320px;
  resize: both;
  overflow: hidden;
}

.price-list-product-editor-header,
.price-list-transfer-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--wb-space-4);
  border-bottom: 1px solid var(--wb-heading-divider);
  padding: var(--wb-space-5) var(--wb-space-7);
}

.price-list-product-editor-header h3,
.price-list-transfer-dialog h3 {
  margin: 0;
  font-size: var(--wb-fs-19);
  font-weight: var(--wb-fw-850);
  color: var(--wb-page-ink);
}

.price-list-transfer-dialog header p {
  margin: 0 0 var(--wb-space-1);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.price-list-editor-close {
  border: 0;
  background: transparent;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-18);
  line-height: 1;
  cursor: pointer;
}

.price-list-product-editor-body,
.price-list-transfer-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-6);
  padding: var(--wb-space-6) var(--wb-space-7);
  overflow: auto;
}

.price-list-product-editor-top-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.4fr) minmax(240px, 1fr);
  gap: var(--wb-space-6);
  align-items: start;
}

.price-list-editor-section {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-3);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-4);
}

.price-list-editor-section h4 {
  margin: 0;
  font-size: var(--wb-fs-14);
  font-weight: var(--wb-fw-850);
  color: var(--wb-text-primary);
}

.price-list-editor-image-target {
  position: relative;          /* 2026-10-09 照 5177：正方形主图位（图片绝对定位居中，不裁不撑） */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wb-space-1);
  width: 100%;
  min-height: 220px;
  aspect-ratio: 1 / 1;
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-surface-muted);
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-12);
  cursor: pointer;
  overflow: hidden;
}

/* 2026-10-09 照 5177：主图完整显示不裁剪——绝对定位 + 上下限都按已布局的方框解析。 */
.price-list-editor-image-target img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.price-list-editor-image-hint {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
}

.price-list-editor-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wb-space-4);
}

.price-list-editor-form-grid label,
.price-list-editor-history-row label {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.price-list-editor-form-grid label.is-full {
  grid-column: 1 / -1;
}

.price-list-editor-form-grid input,
.price-list-editor-form-grid textarea,
.price-list-editor-form-grid select,
.price-list-editor-history-row input,
.price-list-editor-history-row textarea {
  width: 100%;
  border: 1px solid var(--wb-input-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  padding: var(--wb-space-2) var(--wb-space-3);
  font: inherit;
  font-size: var(--wb-fs-13);
}

.price-list-editor-form-grid input:focus,
.price-list-editor-form-grid textarea:focus,
.price-list-editor-history-row input:focus,
.price-list-editor-history-row textarea:focus {
  outline: none;
  border-color: var(--wb-input-focus-border);
  box-shadow: var(--wb-input-focus-shadow);
}

.price-list-editor-volume-output {
  display: flex;
  align-items: center;
  min-height: var(--wb-input-height);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-13);
}

.price-list-editor-category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-2);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-2);
  max-height: 220px;
  overflow: auto;
}

.price-list-editor-alternate-grid,
.price-list-editor-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--wb-space-3);
}

.price-list-editor-image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wb-space-1);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-2);
}

.price-list-editor-image-card img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
}

.price-list-editor-image-card button {
  border: 0;
  background: transparent;
  color: var(--wb-btn-danger-ink);
  font-size: var(--wb-fs-11);
  cursor: pointer;
}

.price-list-editor-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wb-space-2);
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-4);
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-12);
  cursor: pointer;
}

.price-list-editor-history-head,
.price-list-editor-history-row {
  display: grid;
  grid-template-columns: 40px 130px 90px 100px 100px 130px 92px minmax(160px, 1fr) 40px;
  gap: var(--wb-space-2);
  align-items: center;
}

/* 2026-10-09 照 5177：历史报价第一行永远是待输入行（最前面一个 ＋；虚线框；填好点 ＋ 加入下方）。 */
.price-list-editor-history-row.is-draft-row {
  border: 1px dashed var(--wb-accent);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-1);
}

.price-list-editor-history-draft-add {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 auto;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--wb-accent);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg);
  color: var(--wb-accent-ink);
  font: inherit;
  font-weight: var(--wb-fw-900);
  cursor: pointer;
}

.price-list-editor-history-draft-blank {
  display: block;
}

.price-list-editor-history-draft-hint {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
}

/* 2026-10-09 照 5177：参考报价 = [＋][Quantity][Price USD] 待输入行 + 下方已加入的列表。 */
.price-list-editor-reference-draft {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--wb-space-2);
  align-items: end;
}

.price-list-editor-reference-draft label {
  display: grid;
  gap: var(--wb-space-1);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.price-list-editor-reference-draft input {
  width: 100%;
  border: 1px solid var(--wb-input-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  padding: var(--wb-space-2) var(--wb-space-3);
  font: inherit;
  font-size: var(--wb-fs-13);
}

.price-list-editor-reference-draft input:focus {
  outline: none;
  border-color: var(--wb-input-focus-border);
  box-shadow: var(--wb-input-focus-shadow);
}

.price-list-editor-reference-add {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--wb-accent);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg);
  color: var(--wb-accent-ink);
  font: inherit;
  font-weight: var(--wb-fw-900);
  font-size: var(--wb-fs-16);
  cursor: pointer;
}

.price-list-editor-reference-list {
  display: grid;
  gap: var(--wb-space-1);
}

.price-list-editor-reference-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--wb-space-2);
  align-items: center;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-1) var(--wb-space-2);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-13);
}

.price-list-editor-reference-item button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg);
  color: var(--wb-btn-danger-ink);
  font: inherit;
  font-weight: var(--wb-fw-900);
  cursor: pointer;
}

.price-list-editor-history-head {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
}

.price-list-editor-history-body {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
  max-height: 300px;
  overflow: auto;
}

.price-list-editor-history-image {
  display: flex;
  align-items: center;
  gap: var(--wb-space-1);
}

.price-list-editor-history-image img {
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
}

.price-list-editor-history-delete {
  border: 0;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-btn-danger-ink);
  font-size: var(--wb-fs-14);
  cursor: pointer;
}

.price-list-editor-empty {
  margin: 0;
  color: var(--wb-text-placeholder);
  font-size: var(--wb-fs-12);
}

/* 2026-10-09 照 5177：定制图上传方块是小方块、排在定制图最前（三行：提示 / 快捷键 / 按钮）。 */
.price-list-editor-custom-dropzone {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-content: stretch;
  gap: 3px;
  width: 112px;
  height: 112px;
  min-height: 0;
  padding: var(--wb-space-2);
  overflow: hidden;
  font-size: var(--wb-fs-11);
  text-align: center;
}

.price-list-editor-custom-dropzone strong {
  font-size: var(--wb-fs-12);
  line-height: 1.25;
}

.price-list-editor-custom-dropzone small {
  line-height: 1.2;
}

.price-list-editor-custom-dropzone button {
  width: 100%;
  padding: 2px 4px;
  font-size: var(--wb-fs-11);
}

/* 2026-10-09 照 5177：自定义 / 备用主图点开看大图（客户版只做看大图，点击或 Esc 关闭）。 */
.price-list-editor-image-preview-trigger {
  cursor: zoom-in;
}

.price-list-editor-image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--wb-z-modal) + 1);
  display: grid;
  place-items: center;
  background: var(--wb-overlay-bg);
  padding: var(--wb-space-6);
}

.price-list-editor-image-preview {
  display: grid;
  gap: var(--wb-space-2);
  margin: 0;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-lg);
  background: var(--wb-panel-bg);
  padding: var(--wb-space-4);
}

.price-list-editor-image-preview img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.price-list-editor-image-preview figcaption {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  text-align: center;
}

/* 2026-10-09 照 5177：产品知识里的价目表预览——参考价「数量」列补左侧分隔线，
   标题格同一条线连成完整列分界（省略号那格是列表头）。 */
.product-knowledge-price-list-preview .price-list-reference-head > div:first-child,
.product-knowledge-price-list-preview .price-list-reference-cell:first-child,
.product-knowledge-price-list-preview .price-list-reference-title {
  border-left: 1px solid var(--wb-border-strong);
}

.price-list-product-editor-footer,
.price-list-transfer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--wb-space-3);
  border-top: 1px solid var(--wb-heading-divider);
  padding: var(--wb-space-4) var(--wb-space-7);
}

.price-list-product-editor-footer {
  justify-content: space-between;
}

.price-list-editor-status {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  overflow-wrap: anywhere;
}

.price-list-editor-status.error {
  color: var(--wb-danger);
}

.price-list-transfer-body p {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}

.price-list-transfer-path {
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
  overflow-wrap: anywhere;
}

.price-list-transfer-category-field {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
}

.price-list-transfer-cascade {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-2);
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-2);
}

/* ============================================================
 * 8. 窄屏
 * ============================================================ */

@media (max-width: 1120px) {
  .price-list-product-editor-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .price-list-workbench-layout {
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    min-width: 0;
    height: auto;
    max-height: none;
  }

  .price-list-workbench-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .price-list-category-tree-list {
    max-height: 260px;
  }
}
