@page {
  size: A4 portrait;
  margin: 12mm 12mm 16mm;
}
@media print {
  html, body { background: #fff !important; }
  .print-toolbar, .no-print { display: none !important; }
  .dms-doc, .print-sheet {
    width: auto;
    max-width: none;
    border: none;
    margin: 0;
    box-shadow: none;
  }
  table { page-break-inside: auto; }
  tr, .dms-totals, .totals { page-break-inside: avoid; }
  thead { display: table-header-group; }
  .num, .text-right, td.amount { text-align: right; }
  .print-pagenum {
    position: fixed;
    bottom: 4mm;
    right: 0;
    font-size: 10px;
    font-family: Arial, sans-serif;
  }
  .print-pagenum::after { content: "Page " counter(page); }
}
.num, .text-right { text-align: right; font-variant-numeric: tabular-nums; }
