/* ============================================================
   打印样式  ——  只输出 #printArea 内的报价单文档
   ============================================================ */

.print-area { display: none; }

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm 16mm;
  }

  html, body {
    background: #fff !important;
    height: auto !important;
    font-size: 12px;
  }

  .app,
  .toast-wrap,
  .modal-backdrop {
    display: none !important;
  }

  .print-area {
    display: block !important;
    color: #000;
    font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-area .p-page { page-break-after: always; }
  .print-area .p-page:last-child { page-break-after: auto; }

  .print-area table { page-break-inside: auto; }
  .print-area tr { page-break-inside: avoid; page-break-after: auto; }
  .print-area thead { display: table-header-group; }
  .print-area tfoot { display: table-footer-group; }
}

/* ---------- 报价单文档样式（屏幕与打印共用） ---------- */

.p-area { color: #111; line-height: 1.5; }

.p-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px;
  border-bottom: 2.5px solid #1b2c4d;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.p-company { display: flex; gap: 12px; align-items: flex-start; }
.p-logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 10px;
  background: #1b2c4d; color: #fff;
  display: grid; place-items: center;
  font-size: 21px; font-weight: 800;
}
.p-company-name { font-size: 17px; font-weight: 800; letter-spacing: .02em; }
.p-company-meta { font-size: 11px; color: #556; margin-top: 3px; line-height: 1.6; }

.p-doc { text-align: right; flex: 0 0 auto; }
.p-doc-title { font-size: 21px; font-weight: 800; letter-spacing: .32em; color: #1b2c4d; }
.p-doc-title-en { font-size: 9.5px; letter-spacing: .22em; color: #8a93a5; text-transform: uppercase; margin-top: 2px; }
.p-doc-meta { font-size: 11px; color: #445; margin-top: 8px; line-height: 1.75; }
.p-doc-meta b { font-family: ui-monospace, Consolas, monospace; color: #1b2c4d; }

.p-parties {
  display: flex; gap: 14px; margin-bottom: 14px;
}
.p-box {
  flex: 1;
  border: 1px solid #d5dce8;
  border-radius: 6px;
  padding: 9px 12px;
  background: #fafbfd;
}
.p-box-title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  color: #1b2c4d; text-transform: uppercase; margin-bottom: 5px;
  padding-bottom: 4px; border-bottom: 1px dashed #d5dce8;
}
.p-box-row { font-size: 11.5px; line-height: 1.75; display: flex; gap: 8px; }
.p-box-row .k { color: #7b8598; flex: 0 0 58px; }
.p-box-row .v { color: #1a1a1a; font-weight: 500; word-break: break-all; }

.p-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 0; }
.p-table thead th {
  background: #1b2c4d; color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: .05em;
  padding: 8px 8px; text-align: left; white-space: nowrap;
}
.p-table tbody td {
  border-bottom: 1px solid #e3e8f0;
  padding: 7px 8px;
  vertical-align: top;
}
.p-table tbody tr:nth-child(even) td { background: #fafbfd; }
.p-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-table .sku { font-family: ui-monospace, Consolas, monospace; font-size: 10px; color: #7b8598; }
.p-table .p-name { font-weight: 600; }
.p-table .p-spec { font-size: 10px; color: #7b8598; margin-top: 1px; }
.p-table tfoot td {
  padding: 7px 8px; font-size: 11.5px;
  border-bottom: 1px solid #e3e8f0;
}
.p-table tfoot .lbl { text-align: right; color: #445; font-weight: 600; }
.p-table tfoot .num { font-family: ui-monospace, Consolas, monospace; font-weight: 600; }
.p-table tfoot tr.grand td {
  background: #eef2f9; border-top: 2px solid #1b2c4d; border-bottom: 0;
  font-size: 14px; font-weight: 800; color: #1b2c4d;
}

.p-notes { margin-top: 14px; display: flex; gap: 14px; }
.p-notes .p-box { background: #fff; }
.p-notes-text { font-size: 11px; line-height: 1.85; color: #333; white-space: pre-wrap; }

.p-sign {
  margin-top: 22px;
  display: flex; gap: 30px;
}
.p-sign-col { flex: 1; }
.p-sign-line {
  border-bottom: 1px solid #1b2c4d;
  height: 42px;
}
.p-sign-lbl { font-size: 11px; color: #556; margin-top: 5px; }

.p-foot {
  margin-top: 20px; padding-top: 9px;
  border-top: 1px solid #d5dce8;
  font-size: 9.5px; color: #8a93a5;
  display: flex; justify-content: space-between; gap: 16px;
}
