/* EDSPIRE SCHOOL MANAGEMENT SYSTEM V18.2.1
   Commercial Report Print / PDF Hotfix
   PRINT PRESENTATION ONLY. No database/business/calculation rules. */

.print-only{display:none}

@media print {
  @page edspireReportPortrait { size: A4 portrait; margin: 10mm 10mm 12mm; }
  @page edspireReportLandscape { size: A4 landscape; margin: 8mm 8mm 10mm; }
  @page voucherCommercial { size: A4 landscape; margin: 5mm; }

  html,body{height:auto!important;min-height:0!important;background:#fff!important}
  body.report-page{margin:0!important;padding:0!important;background:#fff!important}
  body.report-page.report-portrait-page .report-print-sheet{page:edspireReportPortrait!important}
  body.report-page.report-landscape-page .report-print-sheet{page:edspireReportLandscape!important}

  body.report-page .sidebar,
  body.report-page .topbar,
  body.report-page .mobile-overlay,
  body.report-page .workflow-breadcrumbs,
  body.report-page .breadcrumbs,
  body.report-page .no-print,
  body.report-page .screen-only,
  body.report-page .app-footer,
  body.report-page .report-control-panel,
  body.report-page .report-action-toolbar,
  body.report-page .pagination,
  body.report-page .export-buttons{display:none!important}
  body.report-page .print-only{display:block!important}

  body.report-page .app-shell,
  body.report-page .main-area,
  body.report-page .content{
    display:block!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important
  }
  body.report-page .report-print-sheet{
    display:block!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important;box-shadow:none!important
  }
  body.report-page .report-print-sheet>.panel{break-inside:auto!important;page-break-inside:auto!important}
  body.report-page .report-branding-block{break-inside:avoid!important;page-break-inside:avoid!important;margin:0 0 2mm!important}
  body.report-page .report-letterhead-grid{grid-template-columns:26mm 1fr 36mm!important;gap:3mm!important;min-height:20mm!important;align-items:center!important}
  body.report-page .report-brand-left img{width:18mm!important;height:18mm!important;max-width:18mm!important;max-height:18mm!important;object-fit:contain!important}
  body.report-page .report-brand-right img{width:32mm!important;height:18mm!important;max-width:32mm!important;max-height:18mm!important;object-fit:contain!important}
  body.report-page .report-school-title{font-size:14pt!important;line-height:1.05!important}
  body.report-page .report-school-subtitle{font-size:8pt!important;line-height:1.1!important}
  body.report-page .report-main-title{font-size:12pt!important;line-height:1.1!important;margin-top:1mm!important}
  body.report-page .report-subtitle{font-size:8pt!important;line-height:1.15!important}
  body.report-page .report-contact-line{font-size:7pt!important;line-height:1.2!important;margin-top:.8mm!important}
  body.report-page .report-generated-meta{font-size:6.5pt!important;margin-top:1mm!important}
  body.report-page .report-watermark{
    position:fixed!important;left:50%!important;top:52%!important;width:48mm!important;height:48mm!important;
    max-width:48mm!important;max-height:48mm!important;transform:translate(-50%,-50%)!important;object-fit:contain!important;
    opacity:.028!important;z-index:0!important;pointer-events:none!important
  }
  body.report-page .report-print-sheet>*:not(.report-watermark){position:relative!important;z-index:1!important}

  body.report-page .report-filter-summary{margin:1.5mm 0 2mm!important;padding:1.4mm 2mm!important;gap:1mm 3mm!important}
  body.report-page .report-filter-summary span{font-size:6.2pt!important}
  body.report-page .report-filter-summary strong{font-size:7.2pt!important}
  body.report-page .report-summary-doc{margin:1.5mm 0 2mm!important;break-inside:avoid!important}
  body.report-page .report-summary-title{font-size:7pt!important}

  body.report-page .table-wrap{overflow:visible!important;width:100%!important;max-width:none!important}
  body.report-page table.report-table{width:100%!important;border-collapse:collapse!important;margin:0!important}
  body.report-page table.report-table thead{display:table-header-group!important}
  body.report-page table.report-table tfoot{display:table-footer-group!important}
  body.report-page table.report-table tbody{display:table-row-group!important}
  body.report-page table.report-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body.report-page table.report-table th,
  body.report-page table.report-table td{word-break:normal!important;overflow-wrap:normal!important;white-space:normal!important}
  body.report-page table.report-table .identifier,
  body.report-page table.report-table .phone,
  body.report-page table.report-table .date-cell{white-space:nowrap!important}

  body.report-page .report-footer{
    display:grid!important;grid-template-columns:1fr auto 1fr!important;align-items:center!important;gap:4mm!important;
    margin-top:3mm!important;padding-top:1.5mm!important;border-top:1px solid #c8d2de!important;font-size:6.2pt!important;
    color:#5b6877!important;break-inside:avoid!important;page-break-inside:avoid!important
  }
  body.report-page .report-footer-left{text-align:left!important}
  body.report-page .report-footer-center{text-align:center!important;white-space:nowrap!important}
  body.report-page .report-footer-right{text-align:right!important;white-space:nowrap!important}

  /* Student Detailed Report: print an intentionally readable 11-column model.
     The complete 19-field export and 15-column screen table remain untouched. */
  body.route-student-reports-v16 .student-detailed-screen-table{display:none!important}
  body.route-student-reports-v16 .student-detailed-print-table{display:block!important}
  body.route-student-reports-v16 .student-detailed-report-panel{margin:0!important;padding:0!important;border:0!important}
  body.route-student-reports-v16 .student-detailed-report-print-table{table-layout:fixed!important}
  body.route-student-reports-v16 .student-detailed-report-print-table th{font-size:8pt!important;padding:.9mm .85mm!important;line-height:1.12!important}
  body.route-student-reports-v16 .student-detailed-report-print-table td{font-size:8.5pt!important;padding:.8mm .85mm!important;line-height:1.15!important}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(1){width:5%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(2){width:9%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(3){width:14%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(4){width:14%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(5){width:6%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(6){width:10%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(7){width:11%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(8){width:6%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(9){width:10%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(10){width:9%}
  body.route-student-reports-v16 .student-detailed-report-print-table th:nth-child(11){width:6%}
  body.route-student-reports-v16 .student-detailed-report-print-table small{display:block!important;font-size:7.2pt!important;line-height:1.1!important;color:#4f6073!important;margin-top:.4mm!important}

  body.route-student-reports-v16 .student-detailed-report-print-table .print-compact-nowrap{white-space:nowrap!important;font-size:8.2pt!important}

  /* Attendance documents */
  body.route-attendance-most-absents .report-print-sheet,
  body.route-attendance-regular .report-print-sheet,
  body.route-attendance-blank-sheet .report-print-sheet{page:edspireReportPortrait!important}
  body.route-attendance-most-absents .att-print-panel,
  body.route-attendance-regular .att-print-panel,
  body.route-attendance-blank-sheet .att-print-panel{padding:0!important;margin:0!important;border:0!important;box-shadow:none!important}
  body.route-attendance-most-absents table.report-table th,
  body.route-attendance-regular table.report-table th,
  body.route-attendance-blank-sheet table.report-table th{font-size:7.5pt!important;padding:1.2mm .9mm!important}
  body.route-attendance-most-absents table.report-table td,
  body.route-attendance-regular table.report-table td,
  body.route-attendance-blank-sheet table.report-table td{font-size:8.2pt!important;padding:1.25mm .9mm!important;line-height:1.18!important}
  body.route-attendance-most-absents .report-branding-block,
  body.route-attendance-regular .report-branding-block{margin-bottom:1.5mm!important}
  body.route-attendance-regular .report-filter-summary{margin-bottom:1.5mm!important}
  body.route-attendance-blank-sheet .screen-only{display:none!important}
  body.route-attendance-blank-sheet .blank-attendance-print-register{display:block!important}
  body.route-attendance-blank-sheet .att-blank-sheet-print{table-layout:fixed!important}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(1){width:5%}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(2){width:12%}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(3){width:8%}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(4){width:23%}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(5),
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(6),
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(7),
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(8),
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(9){width:7%}
  body.route-attendance-blank-sheet .att-blank-sheet-print th:nth-child(10){width:17%}
  body.route-attendance-blank-sheet .att-blank-sheet-print td{height:6.5mm!important}

  /* Academics list/timetable print remains its existing data/view, but receives
     the same official document chrome removal and restrained branding. */
  body.route-classes .acad-print-only,
  body.route-sections .acad-print-only,
  body.route-subjects .acad-print-only,
  body.route-timetable .acad-print-only{display:block!important}
  body.route-classes .sidebar,body.route-classes .topbar,body.route-classes .app-footer,body.route-classes .workflow-breadcrumbs,body.route-classes .no-print,
  body.route-sections .sidebar,body.route-sections .topbar,body.route-sections .app-footer,body.route-sections .workflow-breadcrumbs,body.route-sections .no-print,
  body.route-subjects .sidebar,body.route-subjects .topbar,body.route-subjects .app-footer,body.route-subjects .workflow-breadcrumbs,body.route-subjects .no-print,
  body.route-timetable .sidebar,body.route-timetable .topbar,body.route-timetable .app-footer,body.route-timetable .workflow-breadcrumbs,body.route-timetable .no-print{display:none!important}

  /* P0 fee voucher blank-first-page authority. No calculation/content redesign. */
  body.fee-voucher-print-page{margin:0!important;padding:0!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;background:#fff!important}
  body.fee-voucher-print-page .sidebar,
  body.fee-voucher-print-page .topbar,
  body.fee-voucher-print-page .mobile-overlay,
  body.fee-voucher-print-page .workflow-breadcrumbs,
  body.fee-voucher-print-page .voucher-toolbar,
  body.fee-voucher-print-page .app-footer,
  body.fee-voucher-print-page .no-print,
  body.fee-voucher-print-page .toast,
  body.fee-voucher-print-page .alert{display:none!important}
  body.fee-voucher-print-page .app-shell,
  body.fee-voucher-print-page .main-area,
  body.fee-voucher-print-page .content{
    display:block!important;position:static!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;
    margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important;transform:none!important
  }
  body.fee-voucher-print-page .content>.voucher-page-wrap{display:block!important}
  body.fee-voucher-print-page .voucher-page-wrap{
    page:voucherCommercial!important;position:relative!important;float:none!important;clear:both!important;
    width:287mm!important;max-width:287mm!important;min-width:287mm!important;height:190mm!important;min-height:190mm!important;max-height:190mm!important;
    margin:0 auto!important;padding:0!important;transform:none!important;overflow:hidden!important;
    break-before:auto!important;page-break-before:auto!important;break-inside:avoid-page!important;page-break-inside:avoid!important;
    break-after:page!important;page-break-after:always!important
  }
  body.fee-voucher-print-page .voucher-page-wrap:first-of-type{break-before:auto!important;page-break-before:auto!important;margin-top:0!important}
  body.fee-voucher-print-page .voucher-page-wrap.is-last-voucher-page{break-after:auto!important;page-break-after:auto!important}
  body.fee-voucher-print-page .voucher-sheet-v174{
    display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;position:static!important;
    width:287mm!important;min-width:287mm!important;max-width:287mm!important;height:190mm!important;min-height:190mm!important;max-height:190mm!important;
    margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important;break-inside:avoid-page!important;page-break-inside:avoid!important
  }
  body.fee-voucher-print-page .voucher-copy-v174{
    flex:0 0 33.333333%!important;width:33.333333%!important;max-width:33.333333%!important;min-width:0!important;
    height:190mm!important;min-height:190mm!important;max-height:190mm!important;overflow:hidden!important;break-inside:avoid-page!important;page-break-inside:avoid!important
  }
  body.fee-voucher-print-page .voucher-inner-v174{height:100%!important;min-height:0!important;max-height:100%!important;overflow:hidden!important;box-sizing:border-box!important;transform:none!important}

  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
}

@media print {
  /* Dedicated fee receipt document. Existing screen receipt remains unchanged. */
  body.route-fee-receipt .sidebar,
  body.route-fee-receipt .topbar,
  body.route-fee-receipt .mobile-overlay,
  body.route-fee-receipt .workflow-breadcrumbs,
  body.route-fee-receipt .app-footer,
  body.route-fee-receipt .fee-receipt-screen,
  body.route-fee-receipt .no-print{display:none!important}
  body.route-fee-receipt .print-only{display:block!important}
  body.route-fee-receipt .app-shell,
  body.route-fee-receipt .main-area,
  body.route-fee-receipt .content{display:block!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important}
  body.route-fee-receipt .fee-receipt-print{page:edspireReportPortrait!important;width:100%!important;margin:0!important;padding:0!important;background:#fff!important}
  body.route-fee-receipt .fee-receipt-print-amounts{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5mm!important;margin:5mm 0!important}
  body.route-fee-receipt .fee-receipt-print-amounts>div{border:1px solid #b9c6d4!important;border-radius:2mm!important;padding:4mm!important;text-align:center!important}
  body.route-fee-receipt .fee-receipt-print-amounts span{display:block!important;font-size:8pt!important;color:#526274!important;margin-bottom:1.5mm!important}
  body.route-fee-receipt .fee-receipt-print-amounts strong{font-size:15pt!important;color:#103f76!important}
  body.route-fee-receipt .report-footer{display:grid!important;grid-template-columns:1fr auto 1fr!important;gap:4mm!important;border-top:1px solid #c8d2de!important;padding-top:1.5mm!important;margin-top:6mm!important;font-size:6.5pt!important;color:#5b6877!important}
  body.route-fee-receipt .report-footer-center{text-align:center!important}
  body.route-fee-receipt .report-footer-right{text-align:right!important}

  /* Academics print footer uses the shared official footer component. */
  body.route-classes .acad-print-only .report-footer,
  body.route-sections .acad-print-only .report-footer,
  body.route-subjects .acad-print-only .report-footer,
  body.route-timetable .acad-print-only .report-footer{display:grid!important;grid-template-columns:1fr auto 1fr!important;gap:4mm!important;border-top:1px solid #c8d2de!important;padding-top:1.5mm!important;margin-top:3mm!important;font-size:6pt!important;color:#5b6877!important}
  body.route-classes .acad-print-only .report-footer-center,
  body.route-sections .acad-print-only .report-footer-center,
  body.route-subjects .acad-print-only .report-footer-center,
  body.route-timetable .acad-print-only .report-footer-center{text-align:center!important}
  body.route-classes .acad-print-only .report-footer-right,
  body.route-sections .acad-print-only .report-footer-right,
  body.route-subjects .acad-print-only .report-footer-right,
  body.route-timetable .acad-print-only .report-footer-right{text-align:right!important}
}
