/* Edspire V18.2.1 Reporting / Print Quality Patch
   Shared professional school report system. Special documents such as the
   3-copy fee voucher, salary slip, certificates and ID cards retain their
   dedicated templates. */

.report-print-area{
  position:relative;
  isolation:isolate;
  background:#fff;
  color:#17263a;
}
.report-branding-block{position:relative;z-index:1;margin:0 0 12px}
.report-letterhead-grid{
  display:grid;
  grid-template-columns:90px minmax(0,1fr) 140px;
  gap:14px;
  align-items:center;
  min-height:82px;
}
.report-brand-side{display:flex;align-items:center;min-width:0}
.report-brand-left{justify-content:flex-start}
.report-brand-right{justify-content:flex-end}
.report-brand-side img{display:block;max-width:100%;width:auto;height:70px;object-fit:contain}
.report-brand-right img{width:138px;height:auto;max-width:138px;max-height:62px;object-fit:contain}
.report-brand-right.is-empty{visibility:hidden}
.report-brand-center{text-align:center;min-width:0}
.report-school-title{
  margin:0;
  color:#c62828;
  font-family:Georgia,'Times New Roman',serif;
  font-size:24px;
  line-height:1.05;
  letter-spacing:.2px;
  font-weight:700;
}
.report-school-subtitle{margin-top:3px;color:#173f70;font-size:10.5px;font-weight:700;line-height:1.15}
.report-main-title{margin-top:5px;color:#103f76;font-size:17px;font-weight:800;line-height:1.12}
.report-subtitle{margin-top:3px;color:#50657d;font-size:10px;font-weight:600;line-height:1.2}
.report-contact-line{text-align:center;color:#41566f;font-size:8.5px;line-height:1.25;margin-top:4px;overflow-wrap:anywhere}
.report-divider{border-top:2px solid #103f76;margin-top:8px}
.report-generated-meta{display:flex;justify-content:flex-end;gap:18px;flex-wrap:wrap;color:#63778e;font-size:8px;margin:5px 0 0}
.report-generated-meta b{color:#3d526b;font-weight:700}
.report-watermark{
  position:absolute;
  z-index:0;
  left:50%;top:52%;
  width:min(42%,320px);height:min(42%,320px);
  transform:translate(-50%,-50%);
  object-fit:contain;
  opacity:.035;
  pointer-events:none;
  user-select:none;
}
.report-print-area>*:not(.report-watermark){position:relative;z-index:1}

.report-filter-summary{
  display:flex;flex-wrap:wrap;gap:7px 18px;
  padding:8px 10px;margin:8px 0 10px;
  background:#f7f9fc;border:1px solid #dbe4ee;border-radius:7px;
}
.report-filter-summary>div{display:flex;gap:6px;align-items:baseline;min-width:120px}
.report-filter-summary span{font-size:8.5px;color:#6a7c91;text-transform:uppercase;font-weight:700;letter-spacing:.25px}
.report-filter-summary strong{font-size:9.5px;color:#173f70;font-weight:700}

.report-kpis{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 10px}
.report-kpi{min-width:145px;padding:8px 10px;border:1px solid #d8e2ed;border-radius:7px;background:#fbfcfe}
.report-kpi span{display:block;font-size:8px;text-transform:uppercase;color:#72839a;font-weight:800;letter-spacing:.3px}
.report-kpi strong{display:block;margin-top:2px;color:#123e73;font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}

.report-print-area .panel{overflow:visible}
.report-print-area .panel>h2,.report-print-area .panel>h3{color:#173f70}
.report-print-area .table-wrap{overflow:auto}
.report-print-area table.report-table,
.report-print-area .table-wrap>table{width:100%;border-collapse:collapse;background:#fff}
.report-print-area table thead th,
.report-print-area table tr:first-child th{
  background:#eef3f8;color:#143c6b;font-weight:800;text-transform:uppercase;letter-spacing:.2px;
}
.report-print-area table th,.report-print-area table td{vertical-align:middle}
.report-print-area table tbody tr:nth-child(even){background:#fbfcfe}
.report-print-area table tbody tr:hover{background:#f4f8fc}
.report-print-area .money,
.report-print-area td[data-type="money"],
.report-print-area th[data-type="money"]{
  text-align:right!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;font-variant-numeric:tabular-nums;
}
.report-print-area .identifier,.report-print-area .phone{white-space:nowrap;font-variant-numeric:tabular-nums}
.report-print-area .status-cell{text-align:center;white-space:nowrap}
.report-print-area .text-wrap{white-space:normal;overflow-wrap:anywhere}
.report-empty-state{
  margin:14px 0;padding:22px 18px;text-align:center;border:1px dashed #c7d3df;border-radius:8px;background:#fbfcfd;color:#41566f
}
.report-empty-state strong{display:block;color:#173f70;font-size:13px}
.report-empty-state small{display:block;margin-top:5px;color:#74869a;font-size:9.5px}
.report-footer{
  display:flex;justify-content:space-between;gap:16px;align-items:center;
  border-top:1px solid #c8d4e1;margin-top:12px;padding-top:6px;color:#687b91;font-size:7.5px;line-height:1.25
}
.report-footer span:first-child{min-width:0;overflow-wrap:anywhere}
.report-footer span:last-child{white-space:nowrap}

/* Report-specific screen hints. */
body.route-fee-reports .report-print-area table td:nth-child(n+6):nth-child(-n+8),
body.route-fee-reports .report-print-area table th:nth-child(n+6):nth-child(-n+8),
body.route-fee-collection-reports-v16 .report-print-area table td:nth-child(7),
body.route-fee-collection-reports-v16 .report-print-area table th:nth-child(7),
body.route-payroll-reports .report-print-area table td:nth-child(n+5):nth-child(-n+9),
body.route-payroll-reports .report-print-area table th:nth-child(n+5):nth-child(-n+9),
body.route-expense-reports .report-print-area table td:last-child,
body.route-expense-reports .report-print-area table th:last-child,
body.route-annual-financial-report .report-print-area table td:nth-child(n+2),
body.route-annual-financial-report .report-print-area table th:nth-child(n+2){
  text-align:right;white-space:nowrap;word-break:normal;overflow-wrap:normal;font-variant-numeric:tabular-nums
}

@page reportPortrait{size:A4 portrait;margin:10mm 10mm 12mm 10mm}
@page reportLandscape{size:A4 landscape;margin:8mm 10mm 10mm 10mm}

@media print{
  html,body{background:#fff!important}
  body.report-page{margin:0!important;padding:0!important}
  body.report-page .sidebar,body.report-page .topbar,body.report-page .app-footer,body.report-page .mobile-overlay,
  body.report-page .no-print,body.report-page .toolbar.no-print,body.report-page button.no-print{display:none!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;margin:0!important;padding:0!important;background:#fff!important}
  body.report-page .report-print-area{
    display:block!important;position:relative!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;
    border:0!important;box-shadow:none!important;overflow:visible!important;background:#fff!important;color:#111!important;
  }
  body.report-portrait-page .report-print-area{page:reportPortrait!important}
  body.report-landscape-page .report-print-area{page:reportLandscape!important}

  body.report-page .report-branding-block{margin:0 0 2.5mm!important;break-inside:avoid;page-break-inside:avoid}
  body.report-page .report-letterhead-grid{grid-template-columns:20mm minmax(0,1fr) 36mm!important;gap:3mm!important;min-height:18mm!important}
  body.report-page .report-brand-side img{width:auto!important;height:17mm!important;max-width:20mm!important;max-height:17mm!important;object-fit:contain!important}
  body.report-page .report-brand-right img{width:36mm!important;height:auto!important;max-width:36mm!important;max-height:16mm!important;object-fit:contain!important}
  body.report-page .report-school-title{font-size:17pt!important;line-height:1.02!important;color:#b82020!important}
  body.report-page .report-school-subtitle{font-size:7.5pt!important;margin-top:.5mm!important;color:#173f70!important}
  body.report-page .report-main-title{font-size:11.5pt!important;margin-top:1mm!important;color:#103f76!important}
  body.report-page .report-subtitle{font-size:7.5pt!important;margin-top:.6mm!important;color:#4f6073!important}
  body.report-page .report-contact-line{font-size:6.5pt!important;margin-top:.7mm!important;color:#384c62!important}
  body.report-page .report-divider{border-top:1.3pt solid #103f76!important;margin-top:1.2mm!important}
  body.report-page .report-generated-meta{font-size:6pt!important;gap:4mm!important;margin-top:1mm!important;color:#65768a!important}
  body.report-page .report-watermark{
    position:fixed!important;left:50%!important;top:51%!important;width:72mm!important;height:72mm!important;transform:translate(-50%,-50%)!important;
    opacity:.035!important;object-fit:contain!important;z-index:0!important;pointer-events:none!important
  }
  body.report-page .report-print-area>*:not(.report-watermark){position:relative!important;z-index:1!important}

  body.report-page .report-filter-summary{padding:1.6mm 2mm!important;margin:1.5mm 0 2mm!important;gap:1.1mm 4mm!important;border-radius:1mm!important;background:#f8fafc!important}
  body.report-page .report-filter-summary>div{min-width:24mm!important;gap:1mm!important}
  body.report-page .report-filter-summary span{font-size:5.8pt!important}
  body.report-page .report-filter-summary strong{font-size:6.5pt!important}
  body.report-page .report-kpis{gap:2mm!important;margin:1.5mm 0 2mm!important}
  body.report-page .report-kpi{min-width:30mm!important;padding:1.5mm 2mm!important;border-radius:1mm!important;box-shadow:none!important;background:#fff!important}
  body.report-page .report-kpi span{font-size:5.8pt!important}
  body.report-page .report-kpi strong{font-size:9.5pt!important}

  body.report-page .panel{box-shadow:none!important;border:0!important;border-radius:0!important;margin:0 0 2mm!important;padding:0!important;background:transparent!important;overflow:visible!important}
  body.report-page .table-wrap{overflow:visible!important;border:0!important;border-radius:0!important;width:100%!important}
  body.report-page table{display:table!important;width:100%!important;border-collapse:collapse!important;table-layout:auto!important;background:#fff!important}
  body.report-page table thead{display:table-header-group!important}
  body.report-page table tfoot{display:table-footer-group!important}
  body.report-page table tbody{display:table-row-group!important}
  body.report-page table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  body.report-page table th,body.report-page table td{border:1px solid #aab9c8!important;padding:1.1mm 1mm!important;color:#111!important;vertical-align:middle!important;line-height:1.14!important}
  body.report-page table th{background:#eef3f8!important;color:#173f70!important;font-size:6.7pt!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.08pt!important}
  body.report-page table td{font-size:7.2pt!important;background:#fff!important}
  body.report-page table tbody tr:nth-child(even) td{background:#fbfcfd!important}
  body.report-page .money,body.report-page td[data-type="money"],body.report-page th[data-type="money"]{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;text-align:right!important;font-variant-numeric:tabular-nums!important}
  body.report-page .identifier,body.report-page .phone{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
  body.report-page .report-empty-state{margin:4mm 0!important;padding:8mm 4mm!important;border:1px solid #cbd6e1!important;background:#fff!important}
  body.report-page .report-empty-state strong{font-size:10pt!important}
  body.report-page .report-empty-state small{font-size:7pt!important}
  body.report-page .report-footer{margin-top:3mm!important;padding-top:1.5mm!important;font-size:5.8pt!important;break-inside:avoid!important;page-break-inside:avoid!important}

  /* Naturally wide reports stay readable in landscape. */
  body.route-student-reports-v16 .report-print-area table,
  body.route-report-students .report-print-area table,
  body.route-fee-reports .report-print-area table,
  body.route-payroll-reports .report-print-area table,
  body.route-staff-attendance-report .report-print-area table{table-layout:auto!important}
  body.route-student-reports-v16 .report-print-area table td,
  body.route-report-students .report-print-area table td,
  body.route-fee-reports .report-print-area table td,
  body.route-payroll-reports .report-print-area table td{font-size:7pt!important;padding:.95mm .8mm!important}
  body.route-student-reports-v16 .report-print-area table th,
  body.route-report-students .report-print-area table th,
  body.route-fee-reports .report-print-area table th,
  body.route-payroll-reports .report-print-area table th{font-size:6.4pt!important;padding:1mm .8mm!important}

  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
}
.report-signature-row{display:flex;justify-content:space-between;gap:30px;margin-top:24px;text-align:center;font-size:9px;color:#31475e}
@media print{body.report-page .report-signature-row{margin-top:6mm!important;font-size:7pt!important;break-inside:avoid!important;page-break-inside:avoid!important}}
