/* T-0157 报价单 / 销售退货 / 销售换货页面样式（独立文件，遵守 CSP style-src 'self'） */
.sd-dialog{width:min(1120px,96vw);max-height:92vh;display:flex;flex-direction:column;overflow:hidden}
.sd-dialog[open]{display:flex}
.sd-dialog h3{flex:0 0 auto}
.sd-dialog form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.sd-dialog .pricing-dialog-foot{flex:0 0 auto;position:sticky;bottom:0;z-index:3}
.sd-docbar{display:flex;flex-wrap:wrap;gap:var(--sp-4) var(--sp-24);padding:var(--sp-8) var(--sp-16);background:var(--bg);border-bottom:1px solid var(--line);font-size:var(--fs-body);color:var(--text)}
.sd-docbar b{color:var(--text);font-weight:600}
.sd-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-8) var(--sp-12);padding:var(--sp-12) var(--sp-16) var(--sp-4)}
.sd-fields label{display:flex;flex-direction:column;gap:var(--sp-4);font-size:var(--fs-body);color:var(--text);min-width:0}
.sd-fields input,.sd-fields select{height:30px;border:1px solid var(--line);border-radius:var(--radius);padding:0 var(--sp-8);font-size:var(--fs-body);background:var(--surface);color:var(--text);min-width:0;width:100%}
.sd-fields input[readonly]{background:var(--bg);color:var(--text)}
.sd-fields em,.sd-note em{color:var(--warn-text);font-style:normal}
.sd-lines-head{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-8);padding:var(--sp-8) var(--sp-16) var(--sp-4);font-size:var(--fs-body);font-weight:700;color:var(--text)}
.sd-lines-head .secondary{height:26px;padding:0 var(--sp-8);border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);font-size:var(--fs-body);font-weight:400}
.sd-hint{font-size:var(--fs-sm);font-weight:400;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-lines{padding:0 var(--sp-16);max-height:34vh;overflow:auto;border:1px solid var(--line);border-radius:var(--radius);margin:0 var(--sp-16);background:var(--surface)}
.sd-line-table{width:100%;border-collapse:collapse;table-layout:fixed}
.sd-line-table thead th{position:sticky;top:0;z-index:2;height:30px;padding:0 var(--sp-8);background:var(--brand-soft);color:var(--text);font-weight:700;text-align:left;white-space:nowrap;border-bottom:1px solid var(--line);overflow:hidden;text-overflow:ellipsis}
.sd-line-table td{height:30px;padding:0 var(--sp-8);color:var(--text);border-bottom:1px solid var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sd-line-table tbody tr:nth-child(even){background:var(--bg)}
.sd-line-table .num{text-align:right;font-variant-numeric:tabular-nums}
.sd-line-table .sd-input{height:24px;width:100%;border:1px solid var(--line);border-radius:var(--radius);padding:0 var(--sp-4);font-size:var(--fs-body);text-align:right;background:var(--surface);color:var(--text)}
.sd-line-table button{height:22px;padding:0 var(--sp-8);border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--brand-strong);}
.sd-line-empty{padding:var(--sp-24) 0 !important;text-align:center;color:var(--text-2)}
.sd-total{display:flex;justify-content:flex-end;align-items:center;gap:var(--sp-8);padding:var(--sp-8) var(--sp-16);font-size:var(--fs-body);color:var(--text)}
.sd-total b{font-size:var(--fs-body);color:var(--text)}
.sd-note{display:flex;flex-direction:column;gap:var(--sp-4);padding:var(--sp-4) var(--sp-16) var(--sp-4);font-size:var(--fs-body);color:var(--text)}
.sd-note textarea{border:1px solid var(--line);border-radius:var(--radius);padding:var(--sp-4) var(--sp-8);resize:vertical;color:var(--text)}
.sd-readonly{min-height:26px;padding:var(--sp-4) var(--sp-8);border:1px solid var(--line);border-radius:var(--radius);background:var(--bg);font-size:var(--fs-body);color:var(--text);white-space:normal}
.sd-rule{margin:0;padding:0 var(--sp-16) var(--sp-4);font-size:var(--fs-body);color:var(--text-2)}
.sd-history{padding:var(--sp-4) var(--sp-16) var(--sp-8);max-height:120px;overflow:auto;font-size:var(--fs-body)}
.sd-history table{width:100%;border-collapse:collapse}
.sd-history th{background:var(--brand-soft);text-align:left;padding:var(--sp-4) var(--sp-8);position:sticky;top:0}
.sd-history td{padding:var(--sp-4) var(--sp-8);border-bottom:1px solid var(--line);color:var(--text)}
.sd-quotation td,.sd-quotation th,.sd-return td,.sd-return th,.sd-exchange td,.sd-exchange th{padding-left:var(--sp-4);padding-right:var(--sp-4)}
.sd-quotation th:nth-child(1){width:14%}
.sd-quotation th:nth-child(2){width:8%}
.sd-quotation th:nth-child(3){width:6%}
.sd-quotation th:nth-child(4){width:6%}
.sd-quotation th:nth-child(5){width:9%}
.sd-quotation th:nth-child(6){width:8%}
.sd-quotation th:nth-child(7){width:7%}
.sd-quotation th:nth-child(8){width:16%}
.sd-quotation th:nth-child(9){width:9%}
.sd-quotation th:nth-child(10){width:17%}
.sd-return th:nth-child(1){width:14%}
.sd-return th:nth-child(2){width:15%}
.sd-return th:nth-child(3){width:12%}
.sd-return th:nth-child(4){width:7%}
.sd-return th:nth-child(5){width:7%}
.sd-return th:nth-child(6){width:7%}
.sd-return th:nth-child(7){width:6%}
.sd-return th:nth-child(8){width:6%}
.sd-return th:nth-child(9){width:9%}
.sd-return th:nth-child(10){width:17%}
.sd-exchange th:nth-child(1){width:14%}
.sd-exchange th:nth-child(2){width:16%}
.sd-exchange th:nth-child(3){width:10%}
.sd-exchange th:nth-child(4){width:8%}
.sd-exchange th:nth-child(5){width:8%}
.sd-exchange th:nth-child(6){width:8%}
.sd-exchange th:nth-child(7){width:6%}
.sd-exchange th:nth-child(8){width:6%}
.sd-exchange th:nth-child(9){width:6%}
.sd-exchange th:nth-child(10){width:18%}
.sd-quotation .pricing-actions button,
.sd-return .pricing-actions button,
.sd-exchange .pricing-actions button{height:22px;padding:0 var(--sp-4);}
.sd-quotation .pricing-actions,
.sd-return .pricing-actions,
.sd-exchange .pricing-actions{gap:var(--sp-4);flex-wrap:nowrap}
.sd-line-table.sd-lines-quotation th:nth-child(1){width:4%}
.sd-line-table.sd-lines-quotation th:nth-child(2){width:28%}
.sd-line-table.sd-lines-quotation th:nth-child(3){width:20%}
.sd-line-table.sd-lines-quotation th:nth-child(4){width:7%}
.sd-line-table.sd-lines-quotation th:nth-child(5){width:8%}
.sd-line-table.sd-lines-quotation th:nth-child(6){width:11%}
.sd-line-table.sd-lines-quotation th:nth-child(7){width:12%}
.sd-line-table.sd-lines-quotation th:nth-child(8){width:10%}
.sd-line-table.sd-lines-return th:nth-child(1){width:30%}
.sd-line-table.sd-lines-return th:nth-child(2){width:20%}
.sd-line-table.sd-lines-return th:nth-child(3){width:7%}
.sd-line-table.sd-lines-return th:nth-child(4){width:7%}
.sd-line-table.sd-lines-return th:nth-child(5){width:7%}
.sd-line-table.sd-lines-return th:nth-child(6){width:7%}
.sd-line-table.sd-lines-return th:nth-child(7){width:11%}
.sd-line-table.sd-lines-return th:nth-child(8){width:11%}
.sd-line-table.sd-lines-exchange th:nth-child(1){width:30%}
.sd-line-table.sd-lines-exchange th:nth-child(2){width:20%}
.sd-line-table.sd-lines-exchange th:nth-child(3){width:7%}
.sd-line-table.sd-lines-exchange th:nth-child(4){width:10%}
.sd-line-table.sd-lines-exchange th:nth-child(5){width:12%}
.sd-line-table.sd-lines-exchange th:nth-child(6){width:13%}
.sd-line-table.sd-lines-exchange th:nth-child(7){width:8%}
.sd-line-table.sd-lines-view th:nth-child(1){width:4%}
.sd-line-table.sd-lines-view th:nth-child(2){width:30%}
.sd-line-table.sd-lines-view th:nth-child(3){width:20%}
.sd-line-table.sd-lines-view th:nth-child(4){width:7%}
.sd-line-table.sd-lines-view th:nth-child(5){width:9%}
.sd-line-table.sd-lines-view th:nth-child(6){width:14%}
.sd-line-table.sd-lines-view th:nth-child(7){width:16%}
.sd-line-table.sd-lines-view-cost th:nth-child(1){width:4%}
.sd-line-table.sd-lines-view-cost th:nth-child(2){width:28%}
.sd-line-table.sd-lines-view-cost th:nth-child(3){width:18%}
.sd-line-table.sd-lines-view-cost th:nth-child(4){width:6%}
.sd-line-table.sd-lines-view-cost th:nth-child(5){width:6%}
.sd-line-table.sd-lines-view-cost th:nth-child(6){width:10%}
.sd-line-table.sd-lines-view-cost th:nth-child(7){width:12%}
.sd-line-table.sd-lines-view-cost th:nth-child(8){width:12%}
