.quote-create-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(380px,.9fr);gap:16px;align-items:start}.quote-entry{min-width:0}.quote-entry .qux-card{margin-bottom:14px;padding:18px;background:#fff;border:1px solid #e7edf6;border-radius:10px}.quote-entry h2{display:flex;align-items:center;gap:12px;font-size:17px;margin:0 0 16px;color:#102343}.quote-entry h2 b{display:inline-grid;place-items:center;border-radius:50%;width:30px;height:30px;background:#0068ff;color:white;font-size:18px}.quote-entry h2 small{font-size:11px;color:#217bda;background:#eff8ff;padding:4px}.quote-basic-grid{display:grid;grid-template-columns:1fr 1fr 1.2fr 1.3fr;gap:12px}.quote-entry label{font-size:12px;font-weight:500;color:#203652;min-width:0}.quote-entry input,.quote-entry select,.quote-entry textarea{width:100%;margin-top:6px;padding:9px;border:1px solid #d5dfed;border-radius:5px;min-width:0;background:white;color:#193251}.quote-entry input[readonly]{background:#f0f3f7;color:#687e99}.quote-entry em{color:#e02626;font-style:normal}.quote-contact-grid{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:14px}.quote-customer-card{background:#f0f7ff;border-radius:7px;margin-top:14px;padding:12px}.quote-customer-card p{font-size:12px;color:#61799b;margin:8px 0 0}.quote-rule-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;background:#eff7ff;padding:14px;border-radius:7px}.quote-rule-grid div{border-left:1px solid #d6e7f8;padding-left:10px}.quote-rule-grid small,.quote-rule-grid strong{display:block;font-size:12px}.quote-rule-grid strong{margin-top:7px;line-height:1.5}.quote-entry #quote-rule-card>p{font-size:12px;color:#467ab3}.quote-entry .item-row,.quote-product-head{display:grid;grid-template-columns:2.1fr 1fr 1fr .6fr .7fr 1fr;gap:7px;align-items:start}.quote-product-head{font-size:11px;background:#f1f6fc;padding:10px 5px}.quote-entry .item-row{padding:10px 0;border-bottom:1px solid #e5edf6}.quote-entry .item-row>label{font-size:0}.quote-entry .item-row>label input{font-size:12px;padding:8px 5px}.quote-entry .item-row>.product{display:none}.quote-row-actions{font-size:12px;display:flex;flex-wrap:wrap;gap:6px;padding-top:9px}.quote-line-total{width:100%;font-weight:600}.quote-row-actions button{font-size:11px;color:#0071ff;padding:3px;background:white;border:0}.quote-product-footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:14px}.quote-product-footer strong{margin-left:auto;font-size:14px}.quote-product-footer strong span{color:#e50000;font-size:22px}.quote-live-preview{background:#eff6fc;padding:14px;border-radius:10px;position:sticky;top:12px;min-width:0;display:flex;flex-direction:column;gap:8px}.quote-live-preview header,.quote-live-preview footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.quote-live-preview h2{font-size:19px;margin:0}.quote-live-preview iframe{border:0;background:white;width:100%;height:760px;box-shadow:0 2px 16px #18385420}.quote-live-preview p{font-size:12px;color:#56749a}.quote-live-preview footer{justify-content:center;padding:12px}.quote-live-preview:fullscreen{overflow:auto;width:100%;height:100%}.quote-live-preview:fullscreen iframe{height:90vh}.quote-entry details{margin-top:15px}.quote-entry .check-row input{width:auto}.quote-entry .grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}#quote-payment-description{background:#f5f9fe;padding:10px;color:#51719a;font-size:13px}.qux-shell .qux-heading{align-items:center}.qux-shell .qux-heading h1{font-size:28px}.qux-shell #quote-create-form{padding-bottom:24px}
@media(max-width:1300px){.quote-create-columns{grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr)}.quote-basic-grid{grid-template-columns:1fr 1fr}.quote-entry .item-row,.quote-product-head{grid-template-columns:1.8fr .9fr .9fr .6fr .7fr 1fr}.quote-entry .qux-card{padding:12px}.quote-entry h2 small{display:none}.quote-contact-grid{gap:8px}}
@media(max-width:850px){.quote-create-columns{grid-template-columns:1fr}.quote-live-preview{position:static}.quote-live-preview iframe{height:600px}.quote-rule-grid{grid-template-columns:1fr 1fr}.quote-product-head{display:none}.quote-entry .item-row{grid-template-columns:repeat(3,minmax(0,1fr))}.quote-entry .item-row>label{font-size:12px}.quote-entry .item-row>label:first-child{grid-column:1/-1}.quote-entry .item-row input,.quote-entry input,.quote-entry select,.quote-entry textarea{font-size:16px}.quote-contact-grid{grid-template-columns:1fr}.quote-entry .grid{grid-template-columns:1fr 1fr}.quote-entry h2{font-size:16px}.quote-basic-grid{grid-template-columns:1fr 1fr}.quote-product-footer strong{margin-left:0}.quote-entry .qux-card{padding:12px}}
.quote-pdf-pages{flex:1 1 auto;min-height:0;height:auto;overflow:auto;background:#e1e8f0;padding:8px}.quote-pdf-pages canvas{display:block;width:100%;height:auto;background:white;margin:0 auto 12px;box-shadow:0 2px 12px #18385420}.quote-basic-grid label{display:block}.quote-basic-grid label em{display:inline}
.quote-preview-environment{position:fixed;bottom:0;left:0;right:0;z-index:1000;background:#fff4d9;color:#785b14;text-align:center;font-size:11px;padding:3px}
.quote-entry .quote-minimum{display:block;font-size:10px;color:#6f8198;line-height:1.4;margin-top:4px}.quote-entry #quote-low-price{margin-top:12px;background:#fff8ec;padding:12px;border-radius:6px}.quote-entry #quote-low-price[hidden]{display:none}
/* 付款条件三字段：标签与必填标识同行，三个输入框同一水平线 */
.quote-entry .quote-contact-grid>label{display:block}
.quote-entry .quote-contact-grid>label em{display:inline;margin-left:2px}
/* 客户联系人：下拉框与「＋新增」同行，新增面板就地展开，不离开当前报价草稿 */
.quote-entry .quote-contact-field{display:block;font-size:12px;font-weight:500;color:#203652;min-width:0}
.quote-entry .quote-contact-pick{display:flex;gap:6px;align-items:stretch;margin-top:6px}
.quote-entry .quote-contact-pick select{margin-top:0;flex:1 1 auto;width:auto;min-width:0}
.quote-entry .quote-contact-pick button{flex:0 0 auto;padding:0 10px;border:1px solid #0068ff;background:#fff;color:#0068ff;border-radius:5px;font-size:12px;white-space:nowrap;cursor:pointer}
.quote-entry .quote-contact-pick button:hover{background:#eff6ff}
.quote-entry .quote-contact-new{margin-top:10px;padding:10px;border:1px dashed #b9d5f5;border-radius:6px;background:#fff}
.quote-entry .quote-contact-new[hidden]{display:none}
.quote-entry .quote-contact-new-fields{display:grid;grid-template-columns:1fr .8fr 1fr 1.4fr;gap:10px}
.quote-entry .quote-contact-new-fields>label{display:block}
.quote-entry .quote-contact-new-fields>label em{display:inline;margin-left:2px}
.quote-entry .quote-contact-new-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.quote-entry .quote-contact-new-actions p{font-size:12px;color:#b3261e;margin:0}
@media(max-width:850px){.quote-entry .quote-contact-new-fields{grid-template-columns:1fr 1fr}}
/* ===== 2026-10-28 报价页改版 =====
   1) 「客户报价规则／联动信息」卡片撤出报价页：规则仍在客户360维护，选客户后自动带出并联动价格/账期/有效期；
   2) 产品行固定 8 列表格式：序号 | 商品名称 | 规格型号 | 参考目录价 | 折扣% | 数量 | 含税单价 | 小计／操作。
      商品名称与规格型号是两个独立搜索框（各自带候选列表），只按名称或只按规格型号都能定位到商品；
      行内单元格用显式 grid-column + grid-row 摆位（缺 grid-row 会被 grid 稀疏自动放置推到下一行），
      序号是真实元素 .quote-seq（不用 ::before，避免与输入框不同基线）+ CSS 计数器。 */
.quote-entry .item-row,.quote-product-head{grid-template-columns:32px minmax(0,1.75fr) minmax(0,1.4fr) minmax(0,.78fr) minmax(0,.55fr) minmax(0,.42fr) minmax(0,.85fr) minmax(0,1fr);align-items:start}
.quote-entry #item-rows{counter-reset:qrow}
.quote-entry .item-row{counter-increment:qrow}
.quote-entry .quote-seq{grid-column:1;grid-row:1;align-self:start;display:flex;align-items:center;justify-content:center;height:37px;margin-top:6px;font-size:12px;color:#5b7089}
.quote-entry .quote-seq::before{content:counter(qrow)}
.quote-entry .item-row>label:nth-of-type(1){grid-column:2;grid-row:1}
.quote-entry .item-row>label:nth-of-type(2){grid-column:3;grid-row:1}
.quote-entry .item-row>label:nth-of-type(3){grid-column:4;grid-row:1}
.quote-entry .item-row>label:nth-of-type(4){grid-column:7;grid-row:1}
.quote-entry .item-row>label:nth-of-type(5){grid-column:6;grid-row:1}
.quote-entry .item-row>label:nth-of-type(6){grid-column:5;grid-row:1}
.quote-entry .item-row>span.line-total{display:none}
.quote-entry .item-row>.quote-row-actions{grid-column:8;grid-row:1}
.quote-entry .item-row>label:nth-of-type(4) input,.quote-entry .item-row>label:nth-of-type(5) input,.quote-entry .item-row>label:nth-of-type(6) input{text-align:right}
.quote-entry .item-row .quote-line-total{font-size:13px;color:#193251}
/* 大写金额与合计（小写）都要贴表格右边界。原选择器写成 .quote-entry .quote-total-upper，
   而 <p class="quote-total-upper"> 与 .quote-product-footer 同级、并不在 .quote-entry 里
   —— 规则从未命中，实测一直左对齐。这里补上真正命中的选择器。 */
#quote-create-form .quote-total-upper,
.quote-entry .quote-total-upper{margin:12px 0 0;font-size:13px;color:#203652;text-align:right}
.quote-entry .quote-total-upper span{font-weight:600}
.quote-entry .quote-quiet-btn{margin-top:8px;border:0;background:none;color:#0068ff;font-size:12px;padding:0;cursor:pointer}
.quote-entry .quote-quiet-btn:hover{text-decoration:underline}
@media(max-width:1300px){.quote-entry .item-row,.quote-product-head{grid-template-columns:26px minmax(0,1.7fr) minmax(0,1.35fr) minmax(0,.74fr) minmax(0,.55fr) minmax(0,.42fr) minmax(0,.82fr) minmax(0,.98fr)}}
/* 窄屏：表头隐藏，行内改 2 列卡片；序号保留成行首小标（不藏起来），操作区独占一行右对齐，整页不横向溢出 */
@media(max-width:850px){
 .quote-entry .item-row{grid-template-columns:1fr 1fr}
 .quote-entry .quote-seq{display:flex;grid-column:1/-1;grid-row:auto;width:100%;height:auto;margin:0;justify-content:flex-start;font-weight:600;color:#0068ff}
 .quote-entry .quote-seq::before{content:'序号 ' counter(qrow)}
 .quote-entry .item-row>label:nth-of-type(1),.quote-entry .item-row>label:nth-of-type(2),.quote-entry .item-row>label:nth-of-type(3),.quote-entry .item-row>label:nth-of-type(4),.quote-entry .item-row>label:nth-of-type(5),.quote-entry .item-row>label:nth-of-type(6),.quote-entry .item-row>.quote-row-actions{grid-column:auto;grid-row:auto}
 .quote-entry .item-row>label:nth-of-type(1),.quote-entry .item-row>label:nth-of-type(2){grid-column:1/-1}
 .quote-entry .item-row>.quote-row-actions{grid-column:1/-1;justify-content:flex-end;padding-top:0}
}
/* 候选行两段式：主行命中维度、副行另一维度 + 单位 + 目录价；名称再长也换行，不撑破浮层 */
.quote-entry .item-row .combo-list{min-width:min(320px,calc(100vw - 48px))}
.quote-entry .combo-item{white-space:normal}
.quote-entry .quote-opt-name{display:block;font-size:12px;line-height:1.45;color:#193251;overflow-wrap:anywhere}
.quote-entry .quote-opt-meta{display:block;font-size:11px;line-height:1.4;color:#6f8198;margin-top:2px;overflow-wrap:anywhere}
/* 只打了字没选中商品：输入框转警示色 + 行内红字提示，提交时也会被前端拦住 */
.quote-entry .quote-row-hint{display:block;font-size:10px;line-height:1.4;color:#b3261e;margin-top:3px}
.quote-entry .quote-row-hint[hidden]{display:none}
.quote-entry .item-row.quote-row-unpicked .combo-box input{border-color:#e2a33c;background:#fffdf2}
/* 数量/单价/折扣列很窄：关掉数字框上下箭头，否则最右一位会被吃掉（1600.00 显示成 1600.0C） */
.quote-entry .item-row input[type=number]{-webkit-appearance:none;-moz-appearance:textfield;appearance:textfield}
.quote-entry .item-row input[type=number]::-webkit-outer-spin-button,.quote-entry .item-row input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* ===== WB42 报价单据页：三模块统一规范（数值取自 style.css 的 --ux-* 变量） ===== */
/* 报价新建页只有一个表单 #quote-create-form，用它的 ID 做作用域即可，不必再套 .qux-shell 前缀链。 */

/* 页标题 24（列表页也是 .qux-heading，用 :has 区分，别把首页标题一起压小） */
.qux-shell:has(#quote-create-form) .qux-heading h1{font-size:var(--ux-h1);line-height:1.35}
/* 区域标题 16 / 卡片内边距 16 */
#quote-create-form .quote-entry h2{font-size:var(--ux-sec);margin:0 0 12px}
#quote-create-form .qux-card{padding:var(--ux-card-pad)}

/* 字段网格：2 列 + 行距 11（原来 4 列窄格塞不下「标签 + 控件」；客户联系人 3 项、其他商务条件 4 项同理） */
#quote-create-form .quote-basic-grid,
#quote-create-form .quote-contact-grid,
#quote-create-form .quote-contact-new-fields,
#quote-create-form .quote-entry .grid{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ux-gap) 16px
}

/* 字段：标签在左，标签列共用 --ux-label-w（最长「质保期限（月）」13px ≈ 91px） */
#quote-create-form :is(.quote-basic-grid,.quote-contact-grid,.quote-contact-new-fields,.quote-entry .grid,.quote-entry details)>label:not(.check-row){
  display:grid;grid-template-columns:var(--ux-label-w) minmax(0,1fr);column-gap:6px;align-items:center;
  font-size:var(--ux-label);color:#40536b;white-space:nowrap;margin-top:0;position:relative
}
/* 控件显式落第 2 列：标签里的 <em>*</em> 否则会被当成第 3 个网格项，把 select 顶到第二行 */
#quote-create-form :is(.quote-basic-grid,.quote-contact-grid,.quote-contact-new-fields,.quote-entry .grid,.quote-entry details)>label:not(.check-row)>:is(input,select,textarea){
  grid-column:2;grid-row:1;margin-top:0;min-width:0;
  font-size:var(--ux-field);min-height:var(--ux-ctl-h);padding:7px 10px;border-radius:var(--ux-radius)
}
/* 必填星号：摘掉自己的盒子，与标签文字并成第 1 列同一段文本（仍继承 em 的红色） */
#quote-create-form :is(.quote-basic-grid,.quote-contact-grid,.quote-contact-new-fields,.quote-entry .grid,.quote-entry details)>label:not(.check-row)>em{display:contents}
/* 客户联系人那一条是 div + caption，不是 label，单独对齐 */
#quote-create-form .quote-contact-field{display:grid;grid-template-columns:var(--ux-label-w) minmax(0,1fr);column-gap:6px;align-items:center}
#quote-create-form .quote-contact-caption{font-size:var(--ux-label);color:#40536b;white-space:nowrap;margin:0}
#quote-create-form .quote-contact-pick{margin-top:0}

/* 明细行：与订单/合同同一套紧凑规格（13px / 32px） */
#quote-create-form .quote-entry .item-row>label input{font-size:var(--ux-item-fs);min-height:var(--ux-item-h);padding:5px 8px}

/* 窄屏：单列 + 触控高度 40（位置放末尾，覆盖上面的 36px） */
@media(max-width:900px){
  #quote-create-form .quote-basic-grid,
  #quote-create-form .quote-contact-grid,
  #quote-create-form .quote-contact-new-fields,
  #quote-create-form .quote-entry .grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:700px){
  #quote-create-form :is(.quote-basic-grid,.quote-contact-grid,.quote-contact-new-fields,.quote-entry .grid,.quote-entry details)>label:not(.check-row)>:is(input,select,textarea){min-height:40px}
}

/* —— WB48 报价单据页商品明细收口（2026-11-02）——
   问题实测：左栏只有 758px（1600）/ 554px（1280），8 列商品行里名称 167、规格 133，
   小计与复制/删除挤在同一列导致行高 96px（两行），与「一件商品一行」不符。
   处理：① 商品明细横跨页面两栏（指令 5.5 第二步），拿到整页宽度；
        ② 商品行拆成 9 列：序号｜名称｜规格｜参考目录价｜折扣｜数量｜含税单价｜小计｜操作，
           小计独立成列、操作只放按钮，整行单行显示。
   仅桌面端生效；≤850 仍走原「标签在上、两列」的手机版式。 */
@media (min-width:851px){
  /* 撤销跨栏（2026-11-02 第二轮）：上一轮把 .quote-entry 设成 display:contents、section 跨整行，
     让商品明细拿到整页宽度；代价是右侧 PDF 预览被挤到第 1 行、其余区块横跨全页，
     不再是「左侧填写 / 右侧实时预览」的合同式结构。这里让 .quote-entry 回到左栏，
     预览固定在第 1 行右列，与合同新建页一致；商品表宽度靠下面的列宽收紧解决。 */
  /* 右预览栏按可用宽度收窄：1280 时若固定 380，左栏只剩 627，10 列商品行里
     「参考目录价/含税单价」被压到 45px、「操作」56px 放不下复制删除。
     收成 clamp(280,27%,380) 后 1280 左栏 727，单价类列回到 58px、操作 73px。
     预览宽度换录入准确性是正确的取舍——完整查看仍走原有的「全屏预览」入口。 */
  .quote-create-columns{grid-template-columns:minmax(0,1fr) clamp(280px,27%,380px)}
  .quote-create-columns > .quote-entry{min-width:0}
  .quote-create-columns > .quote-live-preview{grid-column:2;grid-row:1}

  /* 10 列：序号｜名称｜规格｜单位｜参考目录价｜折扣｜数量｜含税单价｜小计｜操作。
     DOM 里 label 的顺序是 名称→规格→参考→单价→数量→折扣，与视觉列序不一致，
     所以每列都显式定位，不依赖自动流。 */
  .quote-create-columns .quote-product-head,
  .quote-create-columns .item-row{
    /* 撤销跨栏后左栏 848（1440）/ 727（1280），原来是 1.5fr : 1fr，名称只有 ~120px，
       "BICARBONATE POWDER…" 基本全靠省略号。改成 2.2fr : 1.3fr：
       名称 247 / 规格 146（1440），价格类小列各自收一点仍够显示 33,622.00 与两个按钮。 */
    grid-template-columns:26px minmax(0,2.2fr) minmax(0,1.3fr) 40px minmax(0,.5fr) minmax(0,.42fr) minmax(0,.38fr) minmax(0,.5fr) minmax(0,.58fr) minmax(0,.6fr);
    gap:6px;
    align-items:center;
  }
  .quote-create-columns .item-row{padding:6px 0}
  .quote-create-columns .item-row > .quote-seq{grid-column:1}
  .quote-create-columns .item-row > label:nth-of-type(1){grid-column:2}
  .quote-create-columns .item-row > label:nth-of-type(2){grid-column:3}
  .quote-create-columns .item-row > .quote-unit{grid-column:4;text-align:center;font-size:12px;color:#41597a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .quote-create-columns .item-row > label:nth-of-type(3){grid-column:5}
  .quote-create-columns .item-row > label:nth-of-type(6){grid-column:6}
  .quote-create-columns .item-row > label:nth-of-type(5){grid-column:7}
  .quote-create-columns .item-row > label:nth-of-type(4){grid-column:8}
  .quote-create-columns .item-row > .quote-line-total{grid-column:9;text-align:right;font-size:13px;color:#193251;font-weight:600;white-space:nowrap}
  .quote-create-columns .item-row > .quote-row-actions{grid-column:10;justify-content:flex-end;padding-top:0;flex-wrap:nowrap;gap:4px}
  .quote-create-columns .item-row .quote-row-actions button{padding:4px 6px;white-space:nowrap}
  .quote-create-columns .item-row > .line-total{display:none}
}

/* 行高收口：参考目录价那一格里有「最低允许销售价」小字，空着也占位把行撑到 56px；
   加上输入框自带 margin-top:6px、操作按钮 43px，整行被顶到 69px。统一压到 32px 控件 + 28px 按钮。 */
@media (min-width:851px){
  .quote-create-columns .item-row > label{display:block}
  .quote-create-columns .item-row > label input,
  .quote-create-columns .item-row .combo-box{height:32px;min-height:32px;margin-top:0;padding:0 6px;font-size:12px;box-sizing:border-box}
  .quote-create-columns .item-row > label input{padding:0 6px;text-align:right}
  .quote-create-columns .item-row > label:nth-of-type(1) input,
  .quote-create-columns .item-row > label:nth-of-type(2) input{text-align:left}
  .quote-create-columns .item-row .quote-minimum:empty{display:none}
  .quote-create-columns .item-row .quote-minimum{display:block;margin-top:2px}
  .quote-create-columns .item-row > .quote-row-actions button{height:28px;min-height:0;padding:0 8px;font-size:12px;line-height:26px}
  .quote-create-columns .item-row > .quote-seq{margin-top:0;height:32px;display:flex;align-items:center;justify-content:center}
}

/* 预览限高：右栏里的预览卡按可用高度定高，PDF 区用 flex:1 吃掉剩余空间。
   原来这里写的是 `#quote-live-pdf{max-height:300px}`——ID 选择器特异性高于
   `.quote-live-preview:fullscreen .quote-pdf-pages`，导致全屏后 PDF 仍然只有 300px 高，
   下面留 600px 空白（实测 1440×900：pane 900 / pdf 300）。现已删除该限高，
   常规态与全屏态都靠 flex 分配高度。 */
@media (min-width:851px){
  .quote-create-columns > .quote-live-preview{height:min(560px, calc(100vh - 220px))}
}

/* ===== 报价单真·全屏预览层（2026-11-02 第四轮重做） =====
   上一轮是把 <aside class="quote-live-preview"> 整体 requestFullscreen，
   于是「报价单预览」标题、「↻ 刷新」、底部「↓ 下载PDF / 全屏预览」跟着一起进全屏，
   全屏里看到的仍然是原页面的三件东西 → 用户判定「不是真全屏、只有半屏预览」。
   现在改为独立层 #quote-fs-layer（挂 body 下、position:fixed inset:0），
   只保留「关闭 / 下载PDF / 页码」，PDF 块整体搬进层里（DOM 搬迁，不重渲染 → 与下载是同一份）。
   高度用 100dvh（移动端地址栏收放时也是真实可视高度），中间用 flex 吃掉剩余空间：
   全程不写死高度、不留 max-height、不用 overflow:hidden 去裁文档。 */
#quote-fs-layer{
  position:fixed;inset:0;z-index:2147483000;
  display:flex;flex-direction:column;
  width:100vw;height:100vh;height:100dvh;
  background:#e7edf5;overflow:hidden;
}
#quote-fs-layer .qfs-bar{
  flex:0 0 auto;display:flex;align-items:center;gap:10px;
  padding:10px 16px;background:#fff;border-bottom:1px solid #dbe6f5;
  min-height:52px;box-sizing:border-box;
}
#quote-fs-layer .qfs-title{font-size:15px;font-weight:700;color:#102343;white-space:nowrap}
#quote-fs-layer .qfs-page{font-size:12.5px;color:#56749a;white-space:nowrap;font-variant-numeric:tabular-nums}
#quote-fs-layer .qfs-gap{flex:1 1 auto}
#quote-fs-layer .qfs-btn{
  flex:0 0 auto;min-height:34px;padding:0 14px;border:1px solid #cfe0f5;border-radius:7px;
  background:#fff;color:#1560d8;font-size:13.5px;font-weight:600;cursor:pointer;white-space:nowrap;
}
#quote-fs-layer .qfs-btn:hover{background:#f2f7ff}
#quote-fs-layer .qfs-close{border-color:#dfe6ee;color:#33475e}
#quote-fs-layer .qfs-close:hover{background:#f5f7fa}
/* 中间阅读区：除工具栏外的全部高度都归它 */
#quote-fs-layer .qfs-body{
  flex:1 1 auto;min-height:0;display:flex;flex-direction:column;
  padding:0;overflow:hidden;
}
/* 两重 ID 特异性 (2,0,0)：压掉 .quote-pdf-pages 的 padding/background，
   以及任何遗留的 #quote-live-pdf 高度限制。 */
#quote-fs-layer #quote-live-pdf{
  flex:1 1 auto;min-height:0;height:auto;max-height:none;
  width:100%;overflow:auto;padding:16px;
  background:#e1e8f0;border-radius:0;box-sizing:border-box;
}
#quote-fs-layer #quote-live-pdf canvas{
  display:block;width:100%;height:auto;max-width:1120px;
  margin:0 auto 14px;background:#fff;box-shadow:0 2px 12px #18385420;
}
/* 1920 视口下 1120px 只占 58% 宽，两侧空白过多；大屏把上限放到 1320（A4 仍按比例，不拉伸变形） */
@media (min-width:1600px){
  #quote-fs-layer #quote-live-pdf canvas{max-width:1320px}
}
@media (max-width:600px){
  #quote-fs-layer .qfs-bar{padding:8px 10px;gap:7px;min-height:46px}
  #quote-fs-layer .qfs-title{font-size:13.5px}
  #quote-fs-layer .qfs-page{display:none}
  #quote-fs-layer .qfs-btn{min-height:32px;padding:0 9px;font-size:12.5px}
  #quote-fs-layer #quote-live-pdf{padding:8px}
}
/* 打开全屏层时锁住页面滚动，避免背景跟着滚 */
body.quote-fs-open{overflow:hidden}

/* 手机端预览不能无限长：给一个可滚动的上限，避免整页被一张 A4 顶到很远。 */
@media (max-width:850px){
  .quote-live-preview #quote-live-pdf{max-height:420px;overflow:auto}
}

/* 851~1080 之间右列最小 340px 会把「基本信息」压到 400px 以内，宁可把预览整体下移成整宽卡片 */
@media (min-width:851px) and (max-width:1080px){
  .quote-create-columns{grid-template-columns:minmax(0,1fr)}
  .quote-create-columns > .quote-live-preview{grid-column:1;grid-row:auto;max-height:none}
}

/* 金额列按「内容宽度」给，不再用 fr 分。
   实测（probe_disc_width.py，13px 字体）：参考价「33622.00」需要 73px，而 .5fr 在 1440 只有 54px、
   在 1280 只有 44px —— 参考价被裁 21~31px、折扣「100.00」被裁 7px、单价同样被裁。
   金额看不全属于硬缺陷；名称与规格是搜索框，截断可由输入补全，所以把宽度从它们身上让出来。
   预算：序号 22 + 单位 32 + 参考 68 + 折扣 56 + 数量 38 + 单价 68 + 小计 80 + 操作 78 = 442，
   加 9 个 4px 间距，1440 下名称/规格 209/127，1280 下 134/81（该档属可接受取舍）。
   951 是下限：再往下左栏装不下 10 列，改走下面 851~950 的卡片式换行。 */
@media (min-width:851px) and (max-width:950px){
  /* 851~950 这一档原先是「单列 + 10 列单行」，实测 860 下商品名只剩 62px、900 剩 87px，
     已经看不出是哪个商品。950 以下一律改用与 ≤850 相同的卡片式换行，名称独占一行。 */
  .quote-create-columns .quote-product-head{display:none}
  .quote-create-columns .item-row{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px 10px;
    align-items:start;
  }
  /* 143~164 段给 10 列写的显式 grid-column（部分带 :nth-of-type，特异性更高）必须整体复位，
     否则卡片网格里每个字段仍被钉在原来的列号上，名称格被压到 18px。 */
  .quote-create-columns .item-row > *{grid-column:auto!important;grid-row:auto!important}
  .quote-create-columns .item-row > label{font-size:12px}
  .quote-create-columns .item-row > label:nth-of-type(1){grid-column:1/-1!important}
  .quote-create-columns .item-row > .quote-seq,
  .quote-create-columns .item-row > .line-total{display:none!important}
  .quote-create-columns .item-row > .quote-line-total{grid-column:1/-1!important;text-align:right}
  .quote-create-columns .item-row > .quote-row-actions{grid-column:1/-1!important;justify-content:flex-end;flex-wrap:wrap;padding-top:0}
}

@media (min-width:951px){
  .quote-create-columns .quote-product-head,
  .quote-create-columns .item-row{
    grid-template-columns:22px minmax(0,1.9fr) minmax(0,1.15fr) 32px 68px 56px 38px 68px 80px 78px;
  }
  /* 间距 6→4：9 个间隙省 18px，全部让给名称/规格（它们是搜索框，宽度直接决定能不能看清选中的是哪个商品）。 */
  .quote-create-columns .quote-product-head,
  .quote-create-columns .item-row{gap:4px}
  /* 「复制 / 删除」两个按钮实测各 40px，操作列原来 62px，右对齐时向左溢出压住小计列
     （截图里小计看起来被截断，其实是按钮压上去）。按钮内边距收到 6px、列宽给到 78px 后刚好放下。 */
  .quote-create-columns .item-row .quote-row-actions button{padding:0 6px}
  .quote-create-columns .item-row > label input{padding:0 4px}
  .quote-create-columns .item-row > .quote-line-total{font-size:12px}
  .quote-create-columns .quote-product-head > *{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  /* 106 行的 `#quote-create-form ... input{padding:5px 8px}` 带 ID，特异性 (1,3,1) 高于上面的类选择器，
     左右各 8px 内边距会把 68px 的金额框吃掉 16px，导致「33622.00」正好差 7px 被裁。
     这一条同样带 ID（(1,3,2)）才能生效；只作用于三个金额/数量框，名称与规格的搜索框保持原内边距。 */
  #quote-create-form .quote-create-columns .item-row > label input.reference,
  #quote-create-form .quote-create-columns .item-row > label input.price,
  #quote-create-form .quote-create-columns .item-row > label input.qty,
  #quote-create-form .quote-create-columns .item-row > label input.quote-discount{padding:0 4px}
}

/* ===== WB51 报价商品明细列结构（2026-11-02 第五轮，唯一的列位来源）=====
   历史问题：同一个表上叠了四套列定义（基础 6 列 / 8 列 nth-of-type / WB48 的 10 列 / ≥951 再加一套），
   表头与商品行各自按「第几个 label」猜列位；而行内 DOM 顺序是 参考→单价→数量→折扣，与视觉列序相反，
   所以每加一个字段就错列一次，只能靠 grid-column 逐项掰、靠 !important 压。本轮改成结构上对得齐：
   ① 行内 DOM 顺序 = 视觉列序（序号→名称→规格→单位→参考→折扣→单价→数量→小计→操作）；
   ② 表头与商品行共用同一份 grid-template-columns 与同一组 .qs-* 类名；
   ③ 数字列按「真实值必须完整」定宽：参考 33622.00 / 折扣 100.00 / 单价 33622.00 / 数量 1234 /
      小计 ¥336,220.00 / 操作 复制+删除。
   预算：30+40+74+58+74+50+88+84 = 498 固定列 + 9×5=45 间距；
   1440 左栏 848 → 名称/规格 305（196/109）；1280 左栏 727 → 184（129/72）。
   金额一个字都不能截，名称/规格是搜索框可继续输入，所以宽度从它们身上让。 */
@media (min-width:951px){
  #quote-create-form .quote-product-head,
  #quote-create-form .item-row{
    display:grid;
    /* 规格列 104：占位符「搜索规格型号」按 12.5px 需 75px 文字 + 左右 8px 内边距 = 91px，
       列宽 96 时输入框只有 84px，实测被裁成「搜索规格型」。104 让 1440/1366 下完整显示。
       参考目录价/折扣/含税单价各收 6/4/6px 给名称列：1366 下名称列原本只剩 87px，
       名称框 75px 连 6 个字的占位符都放不下。 */
    grid-template-columns:30px minmax(0,2.2fr) minmax(104px,1.3fr) 40px 68px 54px 68px 50px 110px 88px;
    column-gap:5px;
    align-items:center;
  }
  #quote-create-form .quote-product-head>.qs-seq,
  #quote-create-form .item-row>.qs-seq{grid-column:1;grid-row:1}
  #quote-create-form .quote-product-head>.qs-name,
  #quote-create-form .item-row>.qs-name{grid-column:2;grid-row:1}
  #quote-create-form .quote-product-head>.qs-spec,
  #quote-create-form .item-row>.qs-spec{grid-column:3;grid-row:1}
  #quote-create-form .quote-product-head>.qs-unit,
  #quote-create-form .item-row>.qs-unit{grid-column:4;grid-row:1}
  #quote-create-form .quote-product-head>.qs-ref,
  #quote-create-form .item-row>.qs-ref{grid-column:5;grid-row:1}
  #quote-create-form .quote-product-head>.qs-disc,
  #quote-create-form .item-row>.qs-disc{grid-column:6;grid-row:1}
  #quote-create-form .quote-product-head>.qs-price,
  #quote-create-form .item-row>.qs-price{grid-column:7;grid-row:1}
  #quote-create-form .quote-product-head>.qs-qty,
  #quote-create-form .item-row>.qs-qty{grid-column:8;grid-row:1}
  #quote-create-form .quote-product-head>.qs-amount,
  #quote-create-form .item-row>.qs-amount{grid-column:9;grid-row:1}
  #quote-create-form .quote-product-head>.qs-ops,
  #quote-create-form .item-row>.qs-ops{grid-column:10;grid-row:1}

  /* 表头：字号与另两个模块一致（12.5 / 表头底 #f1f7ff / 高 34），数字列右对齐、序号与单位居中 */
  #quote-create-form .quote-product-head{
    background:#f1f7ff;font-size:12.5px;font-weight:600;color:#4b6b90;
    padding:0;min-height:34px;align-items:center;border-radius:7px 7px 0 0;
  }
  #quote-create-form .quote-product-head>span{display:flex;align-items:center;height:34px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #quote-create-form .quote-product-head>.qs-seq,
  #quote-create-form .quote-product-head>.qs-unit,
  #quote-create-form .quote-product-head>.qs-ops{justify-content:center}
  #quote-create-form .quote-product-head>.qs-ref,
  #quote-create-form .quote-product-head>.qs-disc,
  #quote-create-form .quote-product-head>.qs-price,
  #quote-create-form .quote-product-head>.qs-qty,
  #quote-create-form .quote-product-head>.qs-amount{justify-content:flex-end}

  /* 行：一件商品一行，控件同高 30px；数字列右对齐 + 等宽数字，避免不同位数上下跳 */
  #quote-create-form .item-row{padding:5px 0;border-bottom:1px solid #edf2f9}
  #quote-create-form .item-row>.qs-seq{height:30px;margin:0;display:flex;align-items:center;justify-content:center;font-size:12px;color:#6b7f96}
  #quote-create-form .item-row>.qs-unit{height:30px;display:flex;align-items:center;justify-content:center;font-size:12px;color:#41597a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #quote-create-form .item-row>label{display:block;font-size:0}
  #quote-create-form .item-row>label input,
  #quote-create-form .item-row>.qs-name .combo-box,
  #quote-create-form .item-row>.qs-spec .combo-box{width:100%;height:30px;min-height:30px;margin:0;padding:0 6px;font-size:12.5px;line-height:28px;border-radius:6px;box-sizing:border-box}
  #quote-create-form .item-row>.qs-name input,
  #quote-create-form .item-row>.qs-spec input{text-align:left}
  #quote-create-form .item-row>.qs-ref input,
  #quote-create-form .item-row>.qs-disc input,
  #quote-create-form .item-row>.qs-price input,
  #quote-create-form .item-row>.qs-qty input{text-align:right;font-variant-numeric:tabular-nums;padding:0 5px}
  #quote-create-form .item-row>.qs-amount{text-align:right;font-size:12.5px;font-weight:600;color:#193251;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:clip}
  /* 最低允许销售价的小字：只在有内容时占位，空着不许把行撑高 */
  #quote-create-form .item-row .quote-minimum:empty{display:none}
  #quote-create-form .item-row .quote-minimum{display:block;font-size:10px;line-height:1.3;margin-top:1px;color:#6f8198}

  /* 操作列：复制/删除与订单、合同同一套规格（24px 高、11.5px、6px 圆角、蓝色文字、删除红字） */
  #quote-create-form .item-row>.qs-ops{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex-wrap:nowrap;padding:0}
  #quote-create-form .item-row>.qs-ops button{
    height:24px;min-height:0;padding:0 7px;font-size:11.5px;font-weight:600;line-height:1;
    border:1px solid #e2e9f2;border-radius:6px;background:#fff;color:#3b6ea8;cursor:pointer;white-space:nowrap;
  }
  #quote-create-form .item-row>.qs-ops button:hover{background:#f4f8fd;border-color:#c3d4e8}
  #quote-create-form .item-row>.qs-ops button[data-action="remove-item"]{color:#d05c5c;border-color:#f0d9d9}
  #quote-create-form .item-row>.qs-ops button[data-action="remove-item"]:hover{background:#fdf3f3;border-color:#e8bcbc}

  /* 合计与表格右边界同一条竖线：小计列右边界 = 第 9 列右边界，合计就对齐到它 */
  #quote-create-form .quote-product-footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
  #quote-create-form .quote-product-footer strong{margin-left:auto;font-variant-numeric:tabular-nums;text-align:right}
}

/* 1200–1300 紧凑档：十列在 1280 的可用宽度（约 693px）里放不下「110px 小计 + 96px 规格」，
   实测名称列被挤到 28px、名称框只剩一个字，无法选商品。此档收紧固定列并减小列间距，
   名称列拿回 110px 以上；小计 106px 仍能完整显示 ¥67,870.00。1366 以上走默认档。 */
@media (min-width:951px) and (max-width:1300px){
  #quote-create-form .quote-product-head,
  #quote-create-form .item-row{
    grid-template-columns:28px minmax(0,2.2fr) minmax(78px,1.3fr) 36px 66px 52px 66px 46px 106px 76px;
    column-gap:4px;
  }
}

/* 951 以下的卡片式版式（含 851~950 档）：字段名靠 label 文字显示，隐藏的列头不参与 */
@media (max-width:950px){
  #quote-create-form .item-row>.qs-ops{display:flex;justify-content:flex-end;gap:6px;grid-column:1/-1}
  #quote-create-form .item-row>.qs-ops button{
    height:24px;min-height:0;padding:0 8px;font-size:11.5px;font-weight:600;line-height:1;
    border:1px solid #e2e9f2;border-radius:6px;background:#fff;color:#3b6ea8;cursor:pointer;
  }
  #quote-create-form .item-row>.qs-ops button[data-action="remove-item"]{color:#d05c5c;border-color:#f0d9d9}
  #quote-create-form .item-row>.qs-amount{text-align:right;font-weight:600;color:#193251;font-variant-numeric:tabular-nums}
}
