/* 传统结算单版式。打印样式仅作用于打开的客户预览，业务页面保持原样。 */
#customerDialog{width:980px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:hidden}
#customerDialog .modal{display:flex;flex-direction:column;height:auto;max-height:calc(100dvh - 24px);overflow:hidden}
#customerDialog .modal-head,#customerDialog .modal-foot{position:static;flex:none}
#customerDialog .customer-print-hint{flex:none;font-size:12px;color:#66788e;padding:10px 22px;background:#edf5ff}
#customerDialog .customer-paper-wrap{overflow:auto;min-height:0;background:#fff}
#customerDialog .customer-paper{padding:22px 24px 26px;min-width:700px;background:#fff;color:#111;font:13px/1.25 "SimSun","Songti SC",serif}
#customerDialog .settlement-title{text-align:center;font:700 28px/1.2 "SimHei","Microsoft YaHei",sans-serif;margin:0 0 26px;color:#111}
#customerDialog .settlement-order-line{display:flex;justify-content:space-between;gap:14px;font-size:12px;margin:0 0 3px;overflow-wrap:anywhere}
#customerDialog .settlement-table{table-layout:fixed;width:100%;border-collapse:collapse;border-spacing:0;color:#111;margin:0 0 5px;font-size:12px;line-height:1.25}
#customerDialog .settlement-table th,#customerDialog .settlement-table td{border:1px solid #111;padding:2px 5px;text-align:center;vertical-align:middle;background:#fff;font-weight:400;overflow-wrap:anywhere}
#customerDialog .settlement-table .settlement-name{text-align:left}
#customerDialog .settlement-table .settlement-amount{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
#customerDialog .settlement-table .settlement-subtotal{text-align:right;padding:4px 6px}
#customerDialog .settlement-meta .settlement-vin{font-size:10px;letter-spacing:-.2px}
#customerDialog .settlement-remark{white-space:pre-wrap;font-size:11px;line-height:1.3;margin-top:1px}
#customerDialog .settlement-summary th:first-child{width:25%}
#customerDialog .settlement-extra{text-align:right;font-size:12px;margin:4px 0}
#customerDialog .settlement-summary-line{display:flex;align-items:baseline;justify-content:space-between;gap:20px;break-inside:avoid;page-break-inside:avoid}
#customerDialog .settlement-total{flex:1;min-width:0;text-align:right;font-weight:700;font-size:14px;margin:0;overflow-wrap:anywhere}
#customerDialog .settlement-total-number{font-weight:900;color:#000;white-space:nowrap;font-variant-numeric:tabular-nums}
#customerDialog .settlement-order-note{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0 8px}
#customerDialog .settlement-completion{flex-shrink:0;white-space:nowrap;font-size:12px;border:0;padding:0}
@media(max-width:760px){
  #customerDialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px)}
  #customerDialog .customer-paper{padding:18px 15px}
}
@media print{
  /* Zero browser page margins suppress automatic title/date/URL; page padding keeps safe print edges on every sheet. */
  @page{size:auto;margin:0;padding:10mm}
  body:has(#customerDialog[open]){margin:0!important;padding:0!important;background:#fff!important;color:#000!important}
  body:has(#customerDialog[open])>*:not(#customerDialog){display:none!important}
  body>#customerDialog[open]{display:block!important;position:static!important;inset:auto!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;overflow:visible!important}
  #customerDialog::backdrop{display:none!important}
  #customerDialog .modal,#customerDialog .customer-paper-wrap{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important}
  #customerDialog .modal-head,#customerDialog .modal-foot,#customerDialog .customer-print-hint{display:none!important}
  /* Needle printers need explicit cell typography: table/cell rules override the paper's font. */
  #customerDialog .customer-paper{min-width:0!important;width:100%;padding:0!important;font-size:10pt;font-weight:600;line-height:1.35;color:#000!important;background:#fff!important}
  #customerDialog .settlement-title{font-size:20pt;color:#000;margin-bottom:2mm}
  #customerDialog .settlement-order-line{font-size:9pt;align-items:baseline;gap:3mm;margin-bottom:1mm}
  #customerDialog .settlement-table{font-size:10pt;line-height:1.35;color:#000;margin-bottom:1mm;break-inside:auto}
  #customerDialog .settlement-table th,#customerDialog .settlement-table td{padding:.6mm 1mm;border-width:.2mm;border-color:#000;font-weight:600}
  #customerDialog .settlement-lines thead th:first-child{white-space:nowrap;padding-left:.6mm;padding-right:.6mm}
  #customerDialog .settlement-meta .settlement-vin{font-size:9pt;letter-spacing:normal}
  #customerDialog .settlement-remark{font-size:9pt;line-height:1.35}
  #customerDialog .settlement-table thead{display:table-header-group}
  #customerDialog .settlement-table tfoot{display:table-row-group}
  #customerDialog .settlement-table tr{break-inside:avoid;page-break-inside:avoid}
  #customerDialog .settlement-meta,#customerDialog .settlement-ending{break-inside:avoid;page-break-inside:avoid}
  #customerDialog .settlement-summary-line{gap:8mm}
  #customerDialog .settlement-total{font-size:10pt;margin:0}
  #customerDialog .settlement-completion,#customerDialog .settlement-order-note,#customerDialog .settlement-extra{font-size:9pt}
  #customerDialog .settlement-order-note{margin:0 0 .5mm}
  #customerDialog .settlement-completion{border:0;padding:0}
}
