:root {
  --quote-red: #ce3d38;
  --quote-red-soft: #fcf0ee;
}
.quote-shell .page-heading { padding-bottom: 20px; }
.quote-shell .stat-card { min-height: 142px; }
.quote-shell .stat-value { font-size: 28px; }
.quote-table { min-width: 900px; }
.quote-table td { height: 61px; }
.quote-table .quote-id { color: #4e5c6e; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 11px; }
.quote-table .quote-name { color: #424e60; font-weight: 600; }
.quote-table .quote-customer { color: #98a2af; font-size: 10px; margin-top: 4px; }
.quote-form { display: grid; gap: 18px; }
.quote-form .form-section { padding: 0; }
.quote-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.quote-form .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quote-form .form-field > span, .import-form .form-field > span { color: #6f7b89; font-size: 11px; font-weight: 550; }
.quote-form .input, .quote-form .select, .quote-form .textarea, .import-form .input, .import-form .select { width: 100%; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: #5f6c7b; background: white; font-size: 11px; }
.quote-form .textarea { padding: 9px 10px; min-height: 78px; resize: vertical; }
.quote-lines-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.quote-lines-table { width: 100%; min-width: 1800px; border-collapse: collapse; font-size: 10px; }
.quote-lines-table th { height: 34px; padding: 0 8px; background: #fafbfc; color: #9ca4ae; font-weight: 550; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.quote-lines-table td { padding: 7px 8px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.quote-lines-table input, .quote-lines-table select { width: 100%; min-height: 29px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; color: #596777; background: #fff; font-size: 10px; }
.quote-lines-table .line-number { width: 36px; color: #aab2bc; text-align: center; }
.quote-lines-table .money { font-variant-numeric: tabular-nums; text-align: right; color: #4f5f70; }
/* 第二十轮：图片 + 10 个属性列 */
.quote-lines-table th.col-attr { min-width: 72px; }
.quote-lines-table td.line-thumb { width: 58px; min-width: 58px; text-align: center; }
.quote-lines-table .line-thumb .product-thumb { width: 42px; height: 42px; margin: 0 auto; }
.quote-lines-table .line-thumb .product-thumb.empty svg { width: 14px; height: 14px; }
.quote-lines-table td.attr-cell { min-width: 74px; max-width: 118px; }
.quote-lines-table td.attr-cell input { min-width: 58px; }
/* ─── 第二十一轮（2026-09-19）：行高字号 / 吸顶表头 / 冻结首尾列 / 选择弹框 / 双图 ─── */
.quote-lines-wrap { max-height: 66vh; overflow: auto; overscroll-behavior: contain; }
.quote-lines-table { font-size: 11px; min-width: 1950px; }
/* 编码 / 名称列加宽：放得下 9 位组合编码和搜索按钮 */
.quote-lines-table th:nth-child(3), .quote-lines-table td:nth-child(3) { min-width: 112px; width: 112px; }
.quote-lines-table th:nth-child(4), .quote-lines-table td:nth-child(4) { min-width: 172px; width: 172px; }
.quote-lines-table th { height: 38px; position: sticky; top: 0; z-index: 3; box-shadow: inset 0 -1px 0 var(--line); }
.quote-lines-table thead th:first-child { left: 0; z-index: 4; }
.quote-lines-table thead th:last-child { right: 0; z-index: 4; }
.quote-lines-table td { padding: 8px; }
.quote-lines-table input, .quote-lines-table select { min-height: 34px; padding: 0 8px; font-size: 11px; }
.quote-lines-table td.line-number { position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid #f0f2f5; }
.quote-lines-table td.line-thumb { position: sticky; right: 0; z-index: 2; background: #fff; border-left: 1px solid #f0f2f5; }
.quote-lines-table tr.line-combo td.line-number, .quote-lines-table tr.line-combo td.line-thumb { background: #fcfcfd; }
.quote-lines-table td.cell-type { min-width: 92px; }
.quote-lines-table td.cell-type select { font-weight: 600; }
.quote-lines-table .line-thumb .product-thumb { width: 46px; height: 46px; }
.quote-lines-table .line-thumb .product-thumb.empty svg { width: 16px; height: 16px; }
.thumb-slot { position: relative; display: inline-grid; place-items: center; }
.thumb-slot .thumb-fallback { display: none; }
.dual-thumbs { display: flex; gap: 5px; justify-content: center; align-items: center; }
.dual-thumbs .thumb-slot, .dual-thumbs .product-thumb { width: 40px; height: 40px; }
.dual-thumbs .product-thumb.empty svg { width: 14px; height: 14px; }
/* 编码 / 名称 / 组件输入框旁的模糊搜索按钮 */
.pick-field { display: flex; gap: 4px; align-items: center; min-width: 0; }
.pick-field input { min-width: 0; flex: 1; }
.pick-btn { flex: none; width: 28px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #f7f8fa; color: #8a94a2; cursor: pointer; transition: color .15s, border-color .15s; }
.pick-btn:hover { color: var(--quote-red); border-color: var(--quote-red); background: var(--quote-red-soft); }
.pick-btn svg { width: 14px; height: 14px; }
.quote-lines-table .cell-parts .pick-field { flex: 1; min-width: 0; }
.quote-lines-table .cell-parts .part-cost { width: 76px; flex: none; }
/* 选择弹框（图片 + 名称 + 编码 + 报价卡片） */
.modal.picker-modal { width: 640px; }
.picker-search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; color: #9ca4ae; }
.picker-search:focus-within { border-color: var(--quote-red); background: #fff; }
.picker-search svg { flex: none; width: 15px; height: 15px; }
.picker-search input { flex: 1; min-height: 40px; border: 0; outline: none; background: transparent; font-size: 13px; color: #4a5568; }
.picker-list { max-height: 48vh; overflow: auto; display: grid; gap: 8px; padding-right: 2px; }
.picker-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.picker-item:hover { border-color: var(--quote-red); background: var(--quote-red-soft); }
.picker-thumb { flex: none; display: inline-grid; place-items: center; }
.picker-thumb .product-thumb { width: 46px; height: 46px; }
.picker-thumb .product-thumb.empty svg { width: 16px; height: 16px; }
.picker-thumb.dual { display: inline-flex; gap: 4px; }
.picker-thumb.dual .product-thumb { width: 38px; height: 38px; }
.picker-thumb.dual .product-thumb.empty svg { width: 13px; height: 13px; }
.picker-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.picker-copy strong { color: #424e60; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-copy .picker-code { color: #98a2af; font-size: 11px; }
.picker-price { display: block; text-align: right; color: #4f5f70; font-size: 13px; }
.picker-price strong { font-size: 14px; }
.picker-price small { color: #98a2af; font-size: 10px; margin-left: 2px; }
.picker-price.ref strong { color: #8a6d3b; }
.picker-price.none { color: #c3cad3; }
.picker-note { display: block; text-align: right; color: #aab2bc; font-size: 10px; margin-top: 1px; }
/* 区块间距统一 */
.quote-form { gap: 20px; }
.quote-form .panel + .panel { margin-top: 0; }
@media (max-width: 700px) {
  .quote-form .form-grid, .quote-form .form-grid.three { grid-template-columns: 1fr; }
  .quote-table { min-width: 780px; }
  .modal.picker-modal { width: 100%; }
}
.form-error { color: #bc5a52; font-size: 11px; }
/* ─── 第二十三轮（2026-09-20）：组合行 = 总行 + 握把/功能头/包装配件子行（可展开折叠） ─── */
.quote-lines-table .combo-toggle { width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #98a2af; cursor: pointer; transition: color .15s, background .15s; vertical-align: middle; }
.quote-lines-table .combo-toggle:hover { color: var(--quote-red); background: var(--quote-red-soft); }
.quote-lines-table .combo-toggle svg { width: 13px; height: 13px; transition: transform .15s; }
.quote-lines-table .combo-toggle.closed svg { transform: rotate(-90deg); }
.quote-lines-table tr.line-combo td.line-number { min-width: 46px; white-space: nowrap; }
.quote-lines-table tr.line-sub > td { padding: 5px 8px 5px 40px; background: #fafbfc; }
.quote-lines-table tr.line-sub.sub-closed { display: none; }
.sub-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.sub-kind { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; line-height: 1.5; }
.sub-kind.handle { background: var(--quote-red-soft); color: var(--quote-red); }
.sub-kind.head { background: #eaf3ec; color: #3f7d53; }
.sub-kind.pack { background: #f3efe7; color: #8a6d3b; }
.sub-label { flex: none; color: #9ca4ae; font-size: 10px; }
.sub-grid .pick-field { width: 190px; flex: none; }
.sub-grid .pick-field.sub-name { width: 240px; }
.sub-grid .part-cost { width: 92px; flex: none; }
.sub-note { color: #aab2bc; font-size: 10px; }
.combo-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-bottom: 3px; }
.combo-sum .sum-part, .combo-sum .sum-op { color: #8a94a2; font-size: 10px; }
.combo-sum .sum-op { color: #c3cad3; }
.combo-sum strong { color: #424e60; font-size: 12px; }
/* ─── 第二十四轮（2026-09-20）：配件子行图片 + 成本分析按钮 + 无成本提示 ─── */
.sub-thumb { flex: none; display: inline-grid; place-items: center; }
.sub-thumb .thumb-slot, .sub-thumb .product-thumb { width: 34px; height: 34px; }
.sub-thumb .product-thumb.empty svg { width: 13px; height: 13px; }
.sub-grid .sub-cost-btn { flex: none; }
.sub-cost-hint { color: #b98a3c; font-size: 10px; }
/* ─── 第二十五轮（2026-09-21）：成本手工修订（弹窗编辑表单 + 目录快捷入口） ─── */
.cost-edit-entry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed #e4e8ed; }
.cost-edit-entry .field-hint { margin: 0; }
.cost-edit-form { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.cost-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 12px; }
.cost-edit-grid label { display: grid; gap: 3px; font-size: 11px; color: #6f7b89; font-weight: 550; }
.cost-edit-grid input, .cost-edit-grid select { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; }
.cost-edit-total { color: #424e60; font-size: 12px; }
.cost-edit-total strong { font-size: 14px; margin: 0 2px; }
#cost-edit-total-usd { color: #8a6d3b; font-size: 11px; }
.cost-edit-note { display: grid; gap: 3px; font-size: 11px; color: #6f7b89; font-weight: 550; }
.cost-edit-note input { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; }
.cost-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cost-edit-form .field-hint { margin: 0; }
/* ─── 第二十六轮（2026-09-21）：明细分 tab 编辑（tab 栏 / 行编辑网格 / 工序组卡片） ─── */
.modal:has(.cost-edit-tabs) { width: 760px; max-width: 96vw; }
.cost-edit-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.cost-edit-tab { padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; background: transparent; color: #8a94a2; font-size: 12px; font-weight: 600; cursor: pointer; transition: color .15s, background .15s; }
.cost-edit-tab:hover { color: #4e5c6e; }
.cost-edit-tab.active { background: #fff; border-color: var(--line); color: #ce3d38; }
.cost-edit-tab-body { padding-top: 13px; display: grid; gap: 8px; }
.cost-edit-table { display: grid; gap: 7px; }
.cet-title { margin: 6px 0 0; font-size: 12px; color: #424e60; }
.cer-head, .cer-row { display: grid; gap: 6px; align-items: center; }
.cer-head span { font-size: 11px; color: #8a94a2; font-weight: 600; }
.cer-row input { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; width: 100%; box-sizing: border-box; }
.cols-mat { grid-template-columns: 1.3fr .8fr .7fr .7fr .7fr 34px; }
.cols-step { grid-template-columns: 1.6fr .8fr 34px; }
.cols-sup { grid-template-columns: 1.2fr 1.2fr .8fr .8fr 34px; }
.cols-fee { grid-template-columns: 1.6fr .8fr 34px; }
.cer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 7px; background: #f8f9fb; color: #6e7a89; font-size: 11px; }
.cer-foot strong { color: #424e60; font-size: 12px; margin-left: 3px; }
.cost-group-edit { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cge-head { display: flex; gap: 6px; align-items: center; }
.cge-head input { flex: 1; min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 600; color: #424e60; background: #fff; }
.cge-sum { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed #e4e8ed; font-size: 11px; color: #6e7a89; }
.cge-sum strong { color: #424e60; font-size: 12px; margin-left: 2px; }
.cge-sum label { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; color: #6e7a89; }
.cge-sum input { min-height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; width: 120px; }
/* ─── 第二十七轮（2026-09-21）：原始单元格 tab——按行卡片（行号 + 各列输入框） + 总成本 ─── */
.craw-src { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid #e7d9c9; border-radius: 8px; background: #fbf7f0; font-size: 11px; color: #8a6d3b; font-weight: 550; }
.craw-src input { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; max-width: 220px; }
.craw-row { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.craw-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.craw-no { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #8a94a2; font-weight: 600; }
.craw-no input { width: 64px; min-height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; }
.craw-cells { display: flex; flex-wrap: wrap; gap: 7px; }
.craw-cell { display: grid; gap: 3px; flex: 1 1 108px; min-width: 96px; }
.craw-cell > span { font-size: 10px; color: #98a2af; font-weight: 700; letter-spacing: .4px; }
.craw-cell input { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: #596777; background: #fff; width: 100%; box-sizing: border-box; }
.craw-row .button { justify-self: start; }
.import-drop { display: grid; place-items: center; min-height: 125px; padding: 20px; border: 1px dashed #d4d9e0; border-radius: 8px; background: #fcfcfd; color: #919aa6; text-align: center; }
.import-drop input { display: none; }
.import-preview { max-height: 410px; overflow: auto; margin-top: 15px; }
.import-summary { display: flex; gap: 15px; flex-wrap: wrap; padding: 12px 13px; margin-bottom: 12px; border-radius: 7px; background: #f8f9fb; color: #6e7a89; font-size: 11px; }
.activity-list .empty-state { min-height: 180px; }
.quick-actions { display: grid; gap: 8px; padding: 0 20px 20px; }
.quick-actions .button { justify-content: flex-start; }
.catalog-filter { width: 210px; }
/* ─── 第二十八轮（2026-09-21）：UI/UX 排版整理——控件宽度 ↔ 信息匹配 + 编辑器字号加大 ─── */
/* 报价单信息表单 */
.quote-form .form-field > span, .import-form .form-field > span { font-size: 12px; }
.quote-form .input, .quote-form .select, .quote-form .textarea, .import-form .input, .import-form .select { font-size: 12.5px; min-height: 37px; }
.form-error { font-size: 12px; }
/* 报价单列表 */
.quote-table .quote-id { font-size: 12px; }
.quote-table .quote-customer { font-size: 11px; }
.import-summary { font-size: 12px; }
/* 明细表：字号 11→12，行高同步 */
.quote-lines-table { font-size: 12px; }
.quote-lines-table th { height: 40px; }
.quote-lines-table input, .quote-lines-table select { font-size: 12px; min-height: 35px; }
/* 列宽按内容语义分配（列序：1# / 2分类 / 3编码 / 4名称 / 5-14属性 / 15数量 / 16成本 / 17利润率 / 18手工价 / 19报价 / 20操作 / 21图片） */
.quote-lines-table td.cell-type { min-width: 96px; }
.quote-lines-table th:nth-child(3), .quote-lines-table td:nth-child(3) { min-width: 126px; width: 126px; }  /* 编码：9 位码 + 搜索钮 */
.quote-lines-table th:nth-child(4), .quote-lines-table td:nth-child(4) { min-width: 180px; width: 180px; }  /* 名称 */
.quote-lines-table td.attr-cell { min-width: 78px; max-width: 124px; }
.quote-lines-table td:nth-child(15) { min-width: 76px; }   /* 数量 */
.quote-lines-table td:nth-child(17) { min-width: 64px; }   /* 利润率 0.30 */
.quote-lines-table td:nth-child(18) { min-width: 92px; }   /* 手工价 4.8500 */
.quote-lines-table td.cell-cost { min-width: 216px; max-width: 300px; }
.quote-lines-table .currency-mini { width: 62px; }
.quote-lines-table td.line-thumb { width: 62px; min-width: 62px; }
.pick-btn { width: 30px; height: 35px; }
/* 行内成本摘要 / 组合行 */
.combo-sum .sum-part, .combo-sum .sum-op { font-size: 11px; }
.combo-sum strong { font-size: 12.5px; }
.cost-hint { font-size: 12px; }
.quote-calc { font-size: 13px; }
.manual-tag { font-size: 11px; }
.quote-total { font-size: 12px; }
.quote-total-line { font-size: 18px; }
.quote-total-line .srv-total { font-size: 14px; }
.price-ref { font-size: 12px; }
.sub-kind { font-size: 11px; }
.sub-label, .sub-note, .sub-cost-hint { font-size: 11px; }
.sub-grid .pick-field { width: 200px; }
.sub-grid .pick-field.sub-name { width: 250px; }
.sub-grid .part-cost { width: 96px; }
/* 选择弹框 */
.picker-search input { font-size: 14px; }
.picker-copy strong { font-size: 13.5px; }
.picker-copy .picker-code { font-size: 12px; }
.picker-price { font-size: 14px; }
.picker-price strong { font-size: 15px; }
.picker-price small { font-size: 11px; }
.picker-note { font-size: 11px; }
/* 成本编辑弹窗（25-27 轮）微调 */
.cost-edit-grid label, .cost-edit-note { font-size: 12px; }
.cost-edit-total, .cer-foot, .cge-sum { font-size: 12px; }
.cost-edit-total strong, .cer-foot strong, .cge-sum strong { font-size: 13px; }
.cet-title { font-size: 13px; }
.cost-edit-tab { font-size: 13px; }
/* ─── 第二十八轮补充（2026-09-21）：控件与容器边界呼吸感（桌面端） ─── */
@media (min-width: 901px) {
  /* 表单区块恢复内边距：输入控件不再顶着面板边框 */
  .quote-form .form-section, .import-form { padding: 18px 20px 20px; }
  /* 报价明细表格与面板边缘留白 */
  .quote-lines-wrap { margin: 0 20px; }
  .quote-lines-table th { padding: 0 10px; }
  .quote-lines-table td { padding: 8px 10px; }
  .quote-lines-table th:first-child, .quote-lines-table td.line-number { padding-left: 12px; }
  .quote-lines-table th:last-child, .quote-lines-table td.line-thumb { padding-right: 12px; }
  /* 明细汇总条（实时合计 + 按钮）与面板边缘留白 */
  .panel-footer.quote-footer { padding: 14px 20px 16px; }
}
