/* A4 print: screen chrome hidden, ink-friendly, tables repeat their header on every page. */
@page {
  size: A4;
  margin: 14mm 12mm 16mm;

  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-size: 8pt;
    color: #57534e;
  }
}

@media print {
  :root { --na-bg: #fff; }

  html, body {
    background: #fff !important;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .na-sidebar, .na-topbar, .na-admin-strip, .na-skip-link, .na-page-actions, .na-cookie,
  .na-form-actions, .btn, .dropdown, .modal, #toast-container, .d-print-none, nav {
    display: none !important;
  }

  .na-shell, .na-main-col { display: block; }
  .na-content { max-width: none; padding: 0; }
  .card, .na-list, .na-sheet { border-color: #d6d3d1; box-shadow: none !important; break-inside: avoid; }

  h1, .na-page-title { font-size: 16pt; }
  h2 { font-size: 13pt; }
  h1, h2, h3 { break-after: avoid; }

  a { color: #000; text-decoration: none; }

  table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr, td, th { break-inside: avoid; }
  th, td { border-bottom: 0.5pt solid #a8a29e; padding: 3pt 4pt; }
  th { font-weight: 600; text-align: left; }
  .na-num, .na-money { text-align: right; }

  .na-badge { border: 0.5pt solid #78716c; background: none !important; color: #000 !important; }
  time[title] { text-decoration: none; }

  .na-table-wrap { overflow: visible; }

  .na-print-sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; border: 0; }
  .na-print-toolbar { display: none !important; }
}

/* The print layout previews an A4 sheet on screen. */
@media screen {
  .na-print-body { background: var(--na-fill-strong); }

  .na-print-toolbar {
    max-width: 210mm;
    margin: var(--na-space-4) auto 0;
    padding: 0 var(--na-space-4);
    font-size: var(--na-fs-footnote);
    color: var(--na-muted);
  }

  .na-print-sheet {
    width: 210mm;
    min-height: 297mm;
    margin: var(--na-space-4) auto var(--na-space-6);
    padding: 14mm 12mm 16mm;
    background: #fff;
    border: 1px solid var(--na-line);
    box-shadow: var(--na-shadow-float);
  }
}

@media screen and (max-width: 220mm) {
  .na-print-sheet { width: auto; min-height: 0; margin: 0; padding: var(--na-space-4); border: 0; box-shadow: none; }
}
