@page {
  size: A4 portrait;
  margin: 14mm 12mm;
}
@page products {
  size: A4 landscape;
  margin: 13mm 12mm;
}
@media print {
  body { background: white; color: #172e35; font: 10pt/1.35 Arial, sans-serif; }
  header, main { display: none !important; }
  #print { display: block; margin: 0; padding: 0; width: 100%; }
  #print section { display: block; margin: 0 0 6mm; padding: 0; border: 0; border-radius: 0; }
  #print section[data-section="Товары"] { page: products; }
  #print h1 { margin: 0 0 6mm; font-size: 18pt; }
  #print h2 { break-after: avoid; margin: 4mm 0 2mm; font-size: 14pt; }
  #print .scroll { overflow: visible; margin: 0; max-height: none; }
  #print table { width: 100%; table-layout: fixed; border-collapse: collapse; font: inherit; }
  #print thead { display: table-header-group; }
  #print tr { break-inside: avoid; }
  #print th, #print td {
    padding: 1.8mm 2mm; vertical-align: top; text-align: left;
    white-space: normal; overflow-wrap: anywhere; border: 0; border-bottom: .2mm solid #c8d7d7;
  }
  #print th, #print tr.heading td {
    background: #204c55; color: white; font-weight: bold;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  #print tr.group td, #print tr.total td {
    background: #e0eeea; color: #174641; font-weight: bold;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  #print td.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  #print [data-section="Статьи"] th:nth-child(1) { width: 44%; }
  #print [data-section="Статьи"] th:nth-child(2) { width: 23%; }
  #print [data-section="Статьи"] th:nth-child(3) { width: 19%; }
  #print [data-section="Товары"] table { font-size: 9pt; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(1) { width: 11%; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(2) { width: 10%; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(3) { width: 17%; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(4) { width: 10%; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(5) { width: 13%; }
  #print [data-section="Товары"]:not(.client-section) th:nth-child(6) { width: 12%; }
  #print [data-section="Сверка"] th:first-child { width: 72%; }
  #print [data-section="Документы"] th:first-child { width: 48%; }
  #print [data-section="Документы"] th:nth-child(2) { width: 32%; }
  #print .client-section h3 { font-size:11pt; color:#193e47; margin:4mm 0 1.5mm; break-after:avoid; }
  #print .client-section .wide-note { margin:2mm 0; padding:1.8mm 2mm; background:#edf4f8; }
  #print .client-section .band td { background:#f3f7f7; }
  #print .client-section .child td:first-child { padding-inline-start:5mm; }
  #print .client-section .cols-2 th:first-child { width:74%; }
  #print .client-section .cols-3 th:first-child { width:49%; }
  #print .client-section .cols-4 th:first-child { width:34%; }
  #print .client-section .cols-9 th:nth-child(3),#print .client-section .cols-6 th:nth-child(3) { width:22%; }
  #print .client-section .cols-9 th:nth-child(9) { width:13%; }
  #print .client-section .cols-9 th:nth-child(-n+2) { width:8%; }
  #print .client-section th.amount { text-align:right; }
  #print .client-section td.small-share { white-space:normal; }
}
