@page { size: A4 portrait; margin: 1cm; }

@media print {
  /* Hide non-report UI */
  header, .sidebar, .financeiro-tabs, .caixa-search-filters, #pdfBtn, .report-button, .dark-button, button:not(.print-btn) {
    display: none !important;
  }

  /* Allow full content flow */
  .App, .main-container, .content, .financeiro-container, .report-page {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    display: block !important;
  }

  /* Table pagination rules */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    page-break-inside: auto !important;
  }
  thead {
    display: table-header-group !important;
  }
  tfoot {
    display: table-footer-group !important;
  }
  tr {
    page-break-inside: avoid !important;
    page-break-after: auto !important;
  }

  /* Prevent splitting totals */
  .total-row, .grand-total {
    page-break-inside: avoid !important;
  }

  /* Ensure consistent fonts */
  body {
    font-family: inherit;
    font-size: 12pt;
  }
} 