diff --git a/report_generator.py b/report_generator.py index 40701bd..bc53989 100644 --- a/report_generator.py +++ b/report_generator.py @@ -331,11 +331,13 @@ def generate_pdf(data: dict) -> bytes: .stat.critical .num, .stat.error .num {{ color: #dc2626; }} .stat.warning .num {{ color: #d97706; }} .stat.info .num {{ color: #3b82f6; }} - .section {{ margin-bottom: 24px; page-break-inside: avoid; }} + .section {{ margin-bottom: 24px; }} + .section h2 + table {{ page-break-before: avoid; }} .section h2 {{ font-size: 13pt; font-weight: 700; border-bottom: 2px solid #FFC407; padding-bottom: 6px; margin-bottom: 12px; }} table {{ width: 100%; border-collapse: collapse; font-size: 9pt; }} th {{ background: #f5f4f1; padding: 6px 10px; text-align: left; font-weight: 700; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #ddd; }} td {{ padding: 6px 10px; border-bottom: 1px solid #eee; vertical-align: top; }} + tr {{ page-break-inside: avoid; }} .pass {{ color: #059669; font-weight: 700; }} .fail {{ color: #dc2626; font-weight: 700; }} .not-tested {{ color: #999; }}