/* Improved print stylesheet for full-width fitting */

@page {
  margin: 14mm 10mm;
  size: auto;
}

html, body {
  width: 100%;
  background: #fff;
  color: #222;
  font: 11px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  -webkit-print-color-adjust: exact;
}

h1,h2,h3,h4 {
  font-weight: 600;
  margin: 0 0 .5rem;
  page-break-after: avoid;
}

.report-body {
  width: 100%;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed; /* Forces columns to wrap */
  margin: 0 0 0.75rem;
}

th, td {
  border: 1px solid #777;
  padding: 4px 5px;
  font-size: 10px;
  vertical-align: top;
  word-break: break-word;
  white-space: normal; /* allow wrapping */
}

thead th {
  background: #f2f2f2;
}

tr:nth-child(even) td {
  background: #fafafa;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Print only main content when using in-place printing */
@media print {
  /* Hide app chrome */
  #sidebar,
  .sidebar,
  .app-sidebar,
  .layout-sidebar,
  .drawer,
  .offcanvas,
  .site-header,
  header[role="banner"],
  nav,
  .navbar,
  .brand,
  .branding,
  .report-toolbar,
  .toolbar,
  .actions,
  .btn,
  button,
  .modal,
  .blazor-modal-backdrop,
  .footer,
  footer,
  .print-hide {
    display: none !important;
    visibility: hidden !important;
  }

  .print-scope,
  .report-root,
  .report-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Avoid weird page breaks mid-row */
  tr, td, th {
    page-break-inside: avoid;
  }
}

.page-break-before { page-break-before: always; }
.page-break-after  { page-break-after: always; }
