@media print {
  /* Issue #437: long reports (cash handover, fee analytics) clipped in
     the browser's print-preview dialog because the app layout sets
     html/body/main with viewport-bound overflow rules. Force the
     document to flow naturally across pages so the preview paginates
     and the user can scroll through all pages before printing. */
  html, body {
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
  }

  /* Hide non-printable elements */
  #sidebar,
  aside,
  .safe-area-shell-top,
  .mobile-topbar,
  .admin-topbar,
  nav,
  .sidebar,
  .topbar,
  #sidebar-toggle,
  #user-dropdown-container,
  .no-print,
  button:not(.print-include),
  a.btn,
  .pagination,
  .flash,
  [data-controller="flash"],
  [data-controller="sidebar"],
  [data-controller="dropdown"] {
    display: none !important;
  }

  /* Reset layout */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt !important;
    line-height: 1.4 !important;
  }

  #main-content,
  main {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Page setup */
  @page {
    size: A4;
    margin: 15mm 10mm;
  }

  /* Prevent page breaks inside elements */
  .card,
  table,
  tr,
  .stat-card,
  .report-card-section {
    page-break-inside: avoid;
  }

  /* Table styling for print */
  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    border: 1px solid #333;
    padding: 6px 8px;
    text-align: left;
  }

  th {
    background-color: #f3f4f6 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Fee analytics / dashboards — remove overflow clipping so all content prints.
     Issue #437: added .overflow-x-hidden / .overflow-y-hidden because the
     app layout's <main> uses overflow-x-hidden, which was clipping the
     cash handover report in the print-preview dialog. */
  .overflow-hidden,
  .overflow-x-hidden,
  .overflow-y-hidden,
  .overflow-x-auto,
  .overflow-y-auto,
  .overflow-auto,
  [style*="overflow"],
  [style*="max-height"] {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
  }

  /* Charts should page-break after, not clip */
  canvas {
    max-width: 100% !important;
    height: auto !important;
    page-break-after: auto;
  }

  /* Dashboard stat cards — flow naturally */
  .grid {
    display: block !important;
  }

  .grid > * {
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  /* Fee receipt specific — fits both A4 and thermal 80mm */
  .fee-receipt {
    max-width: 210mm;
    margin: 0 auto;
    padding: 10mm;
    border: 2px solid #333;
  }

  .fee-receipt .school-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
  }

  /* Thermal receipt (80mm POS printer) */
  .fee-receipt.thermal,
  .fee-receipt--thermal {
    max-width: 72mm;    /* 80mm paper minus ~4mm margin each side */
    padding: 2mm;
    border: none;
    font-size: 9pt;
    line-height: 1.2;
  }

  .fee-receipt.thermal .school-header,
  .fee-receipt--thermal .school-header {
    border-bottom: 1px dashed #333;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  .fee-receipt.thermal table,
  .fee-receipt--thermal table {
    font-size: 8pt;
  }

  .fee-receipt.thermal th,
  .fee-receipt.thermal td,
  .fee-receipt--thermal th,
  .fee-receipt--thermal td {
    padding: 2px 3px;
    border: none;
    border-bottom: 1px dotted #999;
  }

  /* Report card specific — A4 portrait */
  @page report-card {
    size: A4 portrait;
    margin: 15mm;
  }

  @page single-report-card {
    size: A4 portrait;
    margin: 8mm;
  }

  .report-card {
    page: report-card;
    max-width: 210mm;
    margin: 0 auto;
    border: 2px solid #333;
    padding: 15mm;
    font-size: 11pt;
    line-height: 1.4;
    color: #000 !important;
    background: #fff !important;
  }

  .report-card * {
    color: #000 !important;
    background: transparent !important;
  }

  .report-card table {
    width: 100% !important;
    border-collapse: collapse;
  }

  .report-card th,
  .report-card td {
    border: 1px solid #333 !important;
    padding: 4px 8px;
    text-align: left;
    font-size: 10pt;
  }

  .report-card th {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: bold;
  }

  .report-card .school-header {
    text-align: center;
    margin-bottom: 20px;
  }

  .report-card .school-header h1,
  .report-card .school-header h2 {
    margin: 4px 0;
  }

  .report-card .student-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
  }

  .report-card .grade-summary {
    margin-top: 15px;
    page-break-inside: avoid;
  }

  .report-card .signatures {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    page-break-inside: avoid;
  }

  /* Template report cards use one portrait design system for Single and
     Combined output. Semantic component hooks keep print proportions aligned
     without relying on responsive screen breakpoints or global font shrinking. */
  @page combined-report-card {
    size: A4 portrait;
    margin: 8mm;
  }

  .single-exam-report-card {
    page: single-report-card;
  }

  .combined-report-card {
    page: combined-report-card;
  }

  /* The A4 page already supplies its margins. The dashboard's inset must
     not reduce the report width or waste the space needed by its footer. */
  #main-content > div:has(.report-card-document) {
    padding: 0 !important;
  }

  /* Hidden screen actions must not leave the space-y gap above the paper. */
  #main-content [data-testid="professional-report-card"] {
    margin-top: 0 !important;
  }

  .single-exam-report-card,
  .combined-report-card {
    --report-card-body-size: 9pt;
    --report-card-meta-size: 8.25pt;
    --report-card-section-heading-size: 9.5pt;
    --report-card-title-size: 11.5pt;
    --report-card-school-name-size: 16pt;
    --report-card-section-gap: 1.2mm;
    --report-card-signature-space: 24mm;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-card-document .report-card-header {
    display: grid !important;
    gap: 1mm !important;
    margin-bottom: 1.5mm !important;
    padding-bottom: 1mm !important;
  }

  .report-card-document .report-card-header img {
    width: 20mm !important;
    height: 20mm !important;
    margin: 0 !important;
  }

  .report-card-document .report-card-school-branding {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.5mm !important;
  }

  .report-card-document .report-card-school-header--with-logo .report-card-school-branding {
    grid-template-columns: 20mm minmax(0, 1fr) 20mm !important;
  }

  .report-card-document .report-card-contact { grid-column: auto !important; }

  .report-card-document[data-academic-format="subject_terms"] { --report-card-school-name-size: 18pt; }
  .report-card-document[data-academic-format="subject_terms"] .report-card-school-header--with-logo .report-card-school-branding {
    grid-template-columns: 20mm minmax(0, 1fr) 20mm !important;
  }
  .report-card-document[data-academic-format="subject_terms"] .report-card-header img { width: 20mm !important; height: 20mm !important; }
  .report-card-document[data-academic-format="subject_terms"] .subject-term-table th,
  .report-card-document[data-academic-format="subject_terms"] .subject-term-table td { padding: 1.1mm 0.6mm !important; font-size: 9pt !important; }
  /* Term headings and two attendance periods can otherwise orphan the
     promotion/signature sections of a five-subject card. Keep readable 9pt
     text and the signature area; reclaim excess cell padding, not content. */
  .combined-report-card[data-academic-format="subject_terms"] .subject-term-table th,
  .combined-report-card[data-academic-format="subject_terms"] .subject-term-table td,
  .combined-report-card[data-academic-format="subject_terms"] th,
  .combined-report-card[data-academic-format="subject_terms"] td { padding-block: 0.1mm !important; }
  .combined-report-card[data-academic-format="subject_terms"] .report-card-student-field { padding-block: 0.25mm !important; }
  .combined-report-card[data-academic-format="subject_terms"] [data-testid="subject-term-remarks"] > div { display: grid !important; grid-template-columns: 12mm minmax(0, 1fr); gap: 1mm; }
  .report-card-document[data-academic-format="subject_terms"] .subject-term-table thead th { width: auto !important; }
  .report-card-document[data-academic-format="subject_terms"] .subject-term-table td,
  .report-card-document[data-academic-format="subject_terms"] .subject-term-table thead th:not(:first-child) { text-align: center !important; }
  .report-card-document[data-academic-format="subject_terms"] [data-testid="configurable-report-sections"] .subject-term-remarks { width: 100% !important; }
  .report-card-document[data-academic-format="subject_terms"] .subject-term-title { padding: 1.5mm !important; background: var(--report-card-primary) !important; color: white !important; }

  .report-card-document[data-wide-supplemental="true"] [data-testid="configurable-report-sections"] [data-testid="report-section-general-attributes"],
  .report-card-document[data-wide-supplemental="true"] [data-testid="configurable-report-sections"] [data-testid="report-section-co-scholastic"] {
    width: 100% !important;
  }

  .report-card-document .report-card-school-name {
    margin: 0 !important;
    font-size: var(--report-card-school-name-size, 16pt) !important;
    line-height: 1.1 !important;
  }

  .report-card-document .report-card-header p {
    margin-top: 0.4mm !important;
    font-size: var(--report-card-meta-size, 8.25pt) !important;
    line-height: 1.15 !important;
  }

  .report-card-document .report-card-header .report-card-title {
    margin-top: 0.75mm !important;
    font-size: var(--report-card-title-size, 11.5pt) !important;
    line-height: 1.1 !important;
  }

  .single-exam-report-card [data-testid="configurable-report-sections"],
  .combined-report-card [data-testid="configurable-report-sections"] {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--report-card-section-gap) 1.5mm !important;
    break-inside: auto;
    page-break-inside: auto;
  }

  .single-exam-report-card [data-testid="configurable-report-sections"] section,
  .combined-report-card [data-testid="configurable-report-sections"] section {
    box-sizing: border-box;
    display: block !important;
    width: calc(50% - 0.75mm) !important;
    margin: 0 !important;
    min-width: 0;
    flex: 0 0 auto;
  }

  .single-exam-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-student"],
  .single-exam-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-academics"],
  .single-exam-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-summary"],
  .single-exam-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-signatures"],
  .combined-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-student"],
  .combined-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-academics"],
  .combined-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-summary"],
  .combined-report-card [data-testid="configurable-report-sections"] [data-testid="report-section-signatures"] {
    flex: 0 0 auto !important;
    width: 100% !important;
  }

  .single-exam-report-card .report-card-section-heading,
  .combined-report-card .report-card-section-heading {
    margin-bottom: 0.6mm !important;
    padding: 0.7mm 1.2mm !important;
    font-size: var(--report-card-section-heading-size) !important;
    line-height: 1.1 !important;
  }

  .single-exam-report-card .report-card-student-grid,
  .combined-report-card .report-card-student-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
  }

  .single-exam-report-card .grid > *,
  .combined-report-card .grid > * {
    margin-bottom: 0 !important;
  }

  .single-exam-report-card [data-testid="report-section-attendance"] > .grid,
  .combined-report-card [data-testid="report-section-attendance"] > .grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .single-exam-report-card [data-testid="report-section-health"] > .grid,
  .combined-report-card [data-testid="report-section-health"] > .grid,
  .combined-report-card [data-testid="report-section-remarks"] > .grid,
  .single-exam-report-card [data-testid="report-section-promotion"] > .grid,
  .combined-report-card [data-testid="report-section-promotion"] > .grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .single-exam-report-card .report-card-student-field,
  .combined-report-card .report-card-student-field {
    display: grid !important;
    grid-template-columns: minmax(0, 42%) minmax(0, 58%) !important;
    align-items: start;
    column-gap: 1mm;
    padding: 0.75mm 1mm !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
  }

  .single-exam-report-card .report-card-student-field dt,
  .combined-report-card .report-card-student-field dt {
    width: auto !important;
  }

  /* The seventeenth (APAAR) field adds a ninth student row. Reclaim row padding
     on dense exam-column cards so signatures are not orphaned on page two;
     retain the 9pt text and the full 20mm signature-writing area. */
  .combined-report-card[data-wide-supplemental="true"] .report-card-student-field {
    padding-block: 0.5mm !important;
  }

  .single-exam-report-card th,
  .single-exam-report-card td,
  .combined-report-card th,
  .combined-report-card td {
    padding: 0.55mm 0.8mm !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
  }

  .single-exam-report-card section,
  .combined-report-card section,
  .single-exam-report-card tr,
  .combined-report-card tr {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .single-exam-report-card [data-testid="report-section-student"],
  .combined-report-card [data-testid="report-section-student"] {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  /* A short academic table must stay one unit. In Chromium paged flex
     layout, allowing this item to fragment can stretch its first fragment to
     the page bottom, then move the tfoot and all following sections to a new
     sheet even when the complete card easily fits on page one. */
  .single-exam-report-card [data-testid="report-section-academics"],
  .combined-report-card [data-testid="report-section-academics"] {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .single-exam-report-card table,
  .combined-report-card table {
    break-inside: auto;
    page-break-inside: auto;
  }

  .single-exam-report-card table,
  .combined-report-card table {
    display: table !important;
    table-layout: fixed !important;
    max-width: none !important;
    width: 100% !important;
  }

  .combined-report-card .report-card-responsive-table {
    max-width: 100% !important;
    overflow: visible !important;
  }

  .single-exam-report-card thead th,
  .combined-report-card thead th {
    width: 1% !important;
  }

  /* Dense supplemental grids need room for their descriptive row labels.
     Equal-width columns turn ordinary labels into tall stacks of words. */
  .combined-report-card[data-wide-supplemental="true"] :is([data-testid="report-section-general-attributes"], [data-testid="report-section-co-scholastic"]) thead th {
    width: auto !important;
  }

  .combined-report-card[data-wide-supplemental="true"] :is([data-testid="report-section-general-attributes"], [data-testid="report-section-co-scholastic"]) thead th:first-child {
    width: 28% !important;
  }

  .single-exam-report-card th,
  .single-exam-report-card td,
  .combined-report-card th,
  .combined-report-card td {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .single-exam-report-card thead,
  .combined-report-card thead {
    display: table-header-group;
  }

  /* Academic totals are ordinary content, not a repeating page footer.
     Keeping the tfoot in the table row flow avoids Chromium's special paged
     footer placement when laying out the report's summary rows. */
  .single-exam-report-card .report-card-academic-table tfoot,
  .combined-report-card .report-card-academic-table tfoot {
    display: table-row-group;
  }

  .single-exam-report-card section [class~="p-2"],
  .combined-report-card section [class~="p-2"],
  .single-exam-report-card section [class~="p-3"],
  .combined-report-card section [class~="p-3"] {
    padding: 0.8mm 1mm !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
  }

  .single-exam-report-card .report-card-summary-grid,
  .combined-report-card .report-card-summary-grid {
    display: grid !important;
    gap: 0.8mm !important;
  }

  .single-exam-report-card .report-card-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .combined-report-card .report-card-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .single-exam-report-card .report-card-summary-item,
  .combined-report-card .report-card-summary-item {
    min-width: 0;
    padding: 0.8mm 1mm !important;
  }

  .single-exam-report-card .report-card-summary-label,
  .combined-report-card .report-card-summary-label {
    font-size: 8pt !important;
    line-height: 1.05 !important;
  }

  .single-exam-report-card .report-card-summary-value,
  .combined-report-card .report-card-summary-value {
    margin-top: 0.4mm;
    font-size: 10.75pt !important;
    line-height: 1.05 !important;
  }

  .single-exam-report-card [data-testid="document-marks"],
  .combined-report-card [data-testid="document-marks"] {
    display: flex !important;
    padding-top: 2mm !important;
    font-size: var(--report-card-body-size) !important;
    line-height: 1.15 !important;
  }

  .report-card-document .report-card-signature-images {
    min-height: 20mm;
  }

  [data-testid="professional-report-card"] {
    break-after: page;
    page-break-after: always;
  }

  [data-testid="professional-report-card"]:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  /* Attendance register specific */
  @page attendance-register {
    size: A4 landscape;
    margin: 10mm 8mm;
  }

  .attendance-register {
    page: attendance-register;
    font-size: 9pt;
  }

  .attendance-register th,
  .attendance-register td {
    padding: 3px 4px;
    text-align: center;
  }

  .attendance-register-table {
    font-size: 8pt;
  }

  .attendance-register-table th,
  .attendance-register-table td {
    padding: 2px 3px;
    border: 1px solid #666;
  }

  .attendance-register .print\:block {
    display: block !important;
  }

  /* Certificate specific */
  .certificate {
    max-width: 297mm;
    min-height: 210mm;
    margin: 0 auto;
    padding: 20mm;
    border: 3px double #333;
    text-align: center;
  }

  .certificate .cert-border {
    border: 1px solid #666;
    padding: 15mm;
    min-height: calc(210mm - 40mm);
  }

  /* Remove background colors except where explicitly preserved */
  *:not(th):not(.print-bg) {
    background-color: transparent !important;
  }

  [data-testid="professional-report-card"] *,
  [data-testid="professional-report-card"] {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  [data-testid="professional-report-card"] .bg-gray-900 {
    color: #fff !important;
    background-color: #111827 !important;
  }

  [data-testid="professional-report-card"] .bg-gray-100 {
    background-color: #f3f4f6 !important;
  }

  [data-testid="professional-report-card"] .bg-gray-50 {
    background-color: #f9fafb !important;
  }

  [data-testid="professional-report-card"] .bg-green-50 {
    background-color: #f0fdf4 !important;
  }

  [data-testid="professional-report-card"] .bg-red-50 {
    background-color: #fef2f2 !important;
  }

  /* Issue #2511: the generic print cleanup above must not flatten the shared
     school-report palette back to black, white, and grey. Reassert the same
     semantic colors after that reset so screen, preview, PDF, and color paper
     preserve one visual hierarchy. */
  [data-testid="professional-report-card"] .report-card-document {
    background-color: #fff !important;
    border-color: var(--report-card-line, #a8c0c0) !important;
    color: var(--report-card-ink, #24353b) !important;
  }

  [data-testid="professional-report-card"] .report-card-header {
    background-color: #fff !important;
    border-bottom-color: var(--report-card-accent, #bf8b30) !important;
  }

  [data-testid="professional-report-card"] .report-card-section-heading {
    background-color: var(--report-card-primary, #174f55) !important;
    color: #fff !important;
  }

  [data-testid="professional-report-card"] .report-card-student-field:nth-child(4n + 1),
  [data-testid="professional-report-card"] .report-card-student-field:nth-child(4n + 2) {
    background-color: var(--report-card-surface-alt, #fafcfb) !important;
  }

  [data-testid="professional-report-card"] table thead th {
    background-color: var(--report-card-soft, #e7f0ef) !important;
    color: var(--report-card-primary-dark, #123d40) !important;
  }

  [data-testid="professional-report-card"] table tbody th {
    background-color: var(--report-card-surface, #f4f8f7) !important;
    color: var(--report-card-primary-dark, #123d40) !important;
  }

  [data-testid="professional-report-card"] .report-card-academic-table tbody tr:nth-child(even) > :not(.bg-green-50) {
    background-color: var(--report-card-surface-alt, #fafcfb) !important;
  }

  [data-testid="professional-report-card"] .report-card-academic-table tfoot td {
    background-color: var(--report-card-accent-soft, #faf3e5) !important;
    color: var(--report-card-primary-dark, #123d40) !important;
  }

  [data-testid="professional-report-card"] .report-card-summary-item {
    background-color: var(--report-card-surface, #f4f8f7) !important;
  }

  [data-testid="professional-report-card"] .report-card-result--pass {
    background-color: var(--report-card-pass-bg, #e7f5ec) !important;
  }

  [data-testid="professional-report-card"] .report-card-result--fail {
    background-color: var(--report-card-fail-bg, #fbecec) !important;
  }

  /* Preserve background for elements that need it */
  .print-bg,
  th {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Bulk print: page break between report cards / certificates */
  .report-card + .report-card,
  .certificate + .certificate {
    page-break-before: always;
  }

  /* Transfer certificate specific */
  .transfer-certificate {
    max-width: 210mm;
    margin: 0 auto;
    padding: 15mm;
    border: 2px solid #333;
  }

  .transfer-certificate .school-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .transfer-certificate .tc-field {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted #999;
  }

  .transfer-certificate .tc-label {
    font-weight: bold;
    min-width: 180px;
  }

  /* Links */
  a {
    color: black !important;
    text-decoration: none !important;
  }

  /* Images */
  img {
    max-width: 100%;
  }
}

@media print {
  @page grade-report { size: A4 portrait; margin: 8mm; }
  .grade-report-document { page: grade-report; break-after: page; padding: 0 !important; font-size: 8.5pt; line-height: 1.15; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .grade-report-document:last-child { break-after: auto; }
  .grade-report-sections { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2mm 3mm; }
  .grade-report-document .report-card-section-heading { font-size: 8.5pt !important; padding: 0.8mm 1mm !important; margin-bottom: 0.5mm !important; }
  .grade-report-document th, .grade-report-document td { padding: 0.3mm 0.8mm !important; font-size: 8.5pt !important; line-height: 1.15; }
  .grade-report-document .report-card-signature-images { height: 8mm !important; min-height: 8mm !important; }
  .grade-report-document .report-card-signatures { margin-top: 1mm !important; padding-top: 1mm !important; }
  .grade-report-document .report-card-signature-slot p { font-size: 8.5pt !important; }
  .grade-report-legend { font-size: 7.5pt; }
}

@media print {
  @page multipage-report-card { size: A4 portrait; margin: 0; }
  [data-controller~="report-print-layout"] [hidden] { display: none !important; }
  [data-controller~="report-print-layout"]:has(.report-card-multipage-preview) { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .report-card-multipage-preview { padding: 0 !important; margin: 0 !important; overflow: visible !important; }
  .report-card-multipage-page { page: multipage-report-card; box-sizing: border-box; width: 210mm !important; height: 297mm !important; padding: 10mm !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; break-after: page; break-inside: avoid; }
  .report-card-multipage-page:last-child { break-after: auto; }
  .report-card-multipage-content { width: 190mm !important; height: 277mm !important; }
  /* Each fragment was measured into its A4 sheet by ReportPaginator. A second
     browser fragmentation pass can displace totals into the following page. */
  .report-card-multipage-content > *,
  .report-card-multipage-content table,
  .report-card-multipage-content tr { break-inside: avoid; page-break-inside: avoid; }
}
