/* Печать отчёта: виден только #report, A4, 15 мм поля */

@media print {
  /* Печать черно-белая (ТЗ 9.3): фон бумаги белый, заголовки отчёта без фирменного цвета */
  body {
    background: #fff !important;
  }
  #report h1,
  #report h2,
  #report h3 {
    color: #000 !important;
  }

  /* Скрываем всё кроме диалога */
  body > *:not(#report-dialog) {
    display: none !important;
  }

  dialog#report-dialog {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  dialog#report-dialog .dialog-toolbar {
    display: none !important;
  }

  #report {
    width: 100% !important;
  }

  /* Разрывы страниц между разделами */
  #report h2 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  #report table {
    page-break-inside: avoid;
  }

  @page {
    size: A4;
    margin: 15mm;
  }

  #report table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 8px;
  }

  #report th,
  #report td {
    border: 1px solid #000;
    padding: 4px 6px;
    text-align: right;
    font-size: 10pt;
  }

  #report th {
    text-align: left;
    background: #eee;
  }

  code,
  .formula {
    font-family: monospace;
    font-size: 10pt;
  }

  .ok {
    color: #000 !important;
  }
  .bad {
    color: #000 !important;
    font-weight: 700 !important;
  }

  h1 {
    font-size: 14pt;
  }
  h2 {
    font-size: 12pt;
  }
}
