#printDocument { display: none; }
#printDialog {
  width: min(26rem, calc(100% - 2rem));
  padding: 1.5rem;
  background: #fff;
  color: #182433;
  border: 1px solid #c6d0da;
  border-radius: 14px;
}
#printDialog::backdrop { background: #071524a8; }
#printDialog h2 { font-size: 1.2rem; margin: 0 0 1rem; }
#printDialog label { display: grid; gap: .4rem; margin-bottom: .9rem; }
#printDialog select, #printDialog button {
  font: inherit;
  padding: .5rem .75rem;
  border: 1px solid #a4b2c0;
  border-radius: 6px;
  background: #fff;
  color: #182433;
}
#printDialog .report-actions { display: flex; justify-content: flex-end; gap: .5rem; }
#printDialog #printConfirm { background: #163b63; color: #fff; }
#printStatus { color: #9d231a; }
#printStatus:empty { margin: 0; }

@media print {
  :root { color-scheme: light !important; }
  html, body {
    background: #fff !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body > :not(#printDocument), body::before, body::after { display: none !important; }
  #printDocument {
    display: block;
    color: #111;
    font: 9pt/1.6 'Prompt', Tahoma, sans-serif;
    overflow-wrap: anywhere;
  }
  #printDocument header {
    text-align: center;
    border-bottom: 1pt solid #333;
    padding-bottom: 3mm;
    margin-bottom: 4mm;
    break-inside: avoid;
  }
  #printDocument h1 { font-size: 16pt; margin: 0 0 2mm; }
  #printDocument h2 { font-size: 12pt; margin: 4mm 0 2mm; break-after: avoid; }
  #printDocument p { margin: 0 0 1mm; }
  #printDocument .report-stats {
    display: flex;
    gap: 3mm;
    border: 0.5pt solid #777;
    padding: 3mm;
    break-inside: avoid;
  }
  #printDocument .report-stats div { flex: 1; min-width: 0; }
  #printDocument .report-stats strong { display: block; font-size: 12pt; }
  #printDocument table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-bottom: 4mm; }
  #printDocument thead { display: table-header-group; }
  #printDocument tr { break-inside: avoid; }
  #printDocument th, #printDocument td {
    padding: 1.2mm 1.5mm;
    border: 0.5pt solid #999;
    font-size: 8pt;
    vertical-align: top;
  }
  #printDocument th { background: #eee; print-color-adjust: exact; }
  #printDocument th:first-child { width: 18%; }
  #printDocument td:last-child { white-space: pre-line; }
  #printDocument footer {
    display: block;
    color: #333;
    border-top: 0.5pt solid #777;
    padding-top: 2mm;
    margin-top: 4mm;
    font-size: 8pt;
  }
}
