#printOpen { margin: 0 0 14px; }
#printPreview { position: fixed; inset: 0; z-index: 2000; overflow: auto; background: #e6ecef; padding: 20px; }
.print-toolbar { max-width: 850px; margin: 0 auto 20px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.print-actions { display: flex; gap: 12px; }
.print-actions button { width: auto; }
#printReport { display: flex; flex-direction: column; width: 210mm; padding: 12mm; margin: auto; background: #fff; color: #172e39; font-size: 10pt; line-height: 1.4; }
#printReport h1 { font-size: 23pt; margin-bottom: 3mm; }
#printReport h2 { font-size: 16pt; margin: 5mm 0 3mm; }
#printReport h3 { font-size: 12pt; }
#printReport p { line-height: 1.4; }
.report-heading p { margin: 0 0 2mm; }
.report-filters { display: grid; grid-template-columns: 40mm minmax(0, 1fr); gap: 1mm 3mm; margin: 3mm 0 4mm; font-size: 9pt; }
.report-filters dt { font-weight: bold; }
.report-filters dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.report-figure { margin: 3mm 0; break-inside: avoid; }
.report-map-frame { position: relative; overflow: hidden; contain: strict; margin: auto; background: #e6ecef; outline: 1px solid #b8c7cd; }
.report-map { position: absolute !important; top: 0; left: 0; pointer-events: none; }
.report-map .leaflet-control-attribution { max-width: 100%; }
.report-figure figcaption { font-size: 8pt; margin: 2mm 0; color: #526671; }
.legend.report-legend { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 1mm 4mm; padding: 2mm; box-shadow: none; border-radius: 0; font-size: 8pt; }
.report-legend span { display: inline-block; margin: 0; }
.report-legend > div { display: flex; flex-wrap: wrap; align-items: center; gap: 1mm 4mm; width: 100%; }
.report-legend .school-key { display: inline-flex; }
.report-atlas-status { font-size: 8pt; }
.report-dashboard, .report-sources, .report-appendix, .report-accident-analysis { margin-top: 10mm; }
.report-scope { padding: 2mm 3mm; border-left: 3px solid #315d6d; background: #edf3f5; font-size: 9pt; }
.report-provisional, #printReport .accident-provisional,
#printReport .accident-load-status:not([data-status="complete"]) { border-left: 3px solid #a85f12; padding: 2mm 3mm; background: #fff3dc; }
#printReport .accident-area-label { font-weight: 600; }
#printReport .accident-filter-summary, #printReport .accident-load-status { font-size: 9pt; }
#printReport .accident-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm; margin: 3mm 0; break-inside: avoid; }
#printReport .accident-kpi { padding: 2mm 3mm; border: 1px solid #b8c7cd; border-radius: 0; break-inside: avoid; }
#printReport .accident-kpi strong { display: block; font-size: 18pt; }
#printReport .accident-kpi span { display: block; font-size: 8pt; }
#printReport .accident-annual, #printReport .accident-time, #printReport .accident-comparison { margin: 4mm 0; break-inside: avoid; }
#printReport .accident-bars { margin: 2mm 0; padding: 0; list-style: none; }
#printReport .accident-bar-row { display: grid; grid-template-columns: 12mm minmax(0, 1fr) 14mm; align-items: center; gap: 3mm; margin: 2mm 0; font-size: 9pt; break-inside: avoid; }
#printReport .accident-bar-row > strong { text-align: right; }
#printReport .accident-bar { display: block; height: 3mm; background: #e2e8f0; }
#printReport .accident-bar > span { display: block; height: 100%; background: #175b70; }
#printReport .accident-heatmap-scroll { max-height: none; overflow: visible; }
#printReport .accident-heatmap { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 7.5pt; }
#printReport .accident-heatmap caption { text-align: left; font-size: 8pt; padding: 0 0 2mm; }
#printReport .accident-heatmap th, #printReport .accident-heatmap td { min-width: 0; max-width: none; padding: 1mm .3mm; border: 1px solid #b8c7cd; text-align: center; }
#printReport .accident-heatmap th:first-child { width: 15mm; }
#printReport .accident-source { overflow-wrap: anywhere; }
#printReport .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 3mm 0; gap: 2mm; break-inside: avoid; }
#printReport .dashboard-kpi { padding: 3mm; border-radius: 0; break-inside: avoid; }
#printReport .dashboard-kpi strong { font-size: 19pt; }
#printReport .dashboard-charts { display: block; }
#printReport .card { border-radius: 0; padding: 3mm; margin-bottom: 4mm; }
#printReport .dashboard-chart { break-inside: auto; }
#printReport .dashboard-metadata { break-inside: avoid; }
#printReport .dashboard-bar-row { margin: 2mm 0; break-inside: avoid; }
#printReport .dashboard-bar-label, #printReport .dashboard-cell-text, #printReport .dashboard-table-wrap { max-height: none; overflow: visible; }
#printReport .dashboard-metadata th, #printReport .dashboard-metadata td { padding: 2mm; font-size: 9pt; }
#printReport table { table-layout: fixed; }
#printReport thead { display: table-header-group; }
#printReport tr { break-inside: avoid; }
#printReport h2, #printReport h3 { break-after: avoid; }
#printReport .hint { font-size: 8.5pt; }
.report-bar { display: inline-block; width: 100%; height: 3mm; background: #e2e8f0; border-radius: 1mm; overflow: hidden; }
.report-bar > span { display: block; height: 100%; background: #2563eb; }
.dashboard-metadata .report-bar { display: block; }
.report-sources { font-size: 9pt; overflow-wrap: anywhere; }
.report-hazard { border-top: 1px solid var(--border); padding-top: 2mm; break-inside: avoid; }
.report-hazard h3 { margin: 2mm 0; }
.report-hazard .report-filters { display: block; }
.report-hazard dt { margin-top: 2mm; break-after: avoid; }
.report-hazard dd { margin: 0; }
.report-footer { order: 1; border-top: 1px solid #526671; padding-top: 2mm; margin-top: 8mm; font-size: 8pt; line-height: 1.3; font-weight: 600; }
#printFallback { display: none; }
@page {
  size: A4 portrait; margin: 12mm 12mm 22mm;
  @bottom-left {
    content: 'Gemeldete Originaldaten unbedingt mit heranziehen.';
    font-family: system-ui, sans-serif; font-size: 8pt; font-weight: 600; color: #172e39;
    vertical-align: top; padding-top: 4mm; border-top: 1px solid #526671;
  }
  @bottom-right {
    content: 'Seite ' counter(page) ' / ' counter(pages);
    font-family: system-ui, sans-serif; font-size: 8pt; color: #172e39;
    vertical-align: top; padding-top: 4mm; border-top: 1px solid #526671;
  }
}
.report-makau { margin-top: 10mm; font-size: 9pt; }
.report-makau .makau-conflict { margin: 4mm 0; padding: 3mm; border-radius: 0; }
.report-makau .makau-measure-option { border-width: 1px; border-radius: 0; padding: 3mm; }
.report-makau .makau-conflict, .report-makau .makau-measure-option { break-inside: auto; }
.report-makau .makau-warning, .report-makau .makau-stage { padding: 2mm 3mm; }
#printReport .makau-table-wrap { overflow: visible; }
#printReport .makau-table { font-size: 8pt; table-layout: fixed; }
#printReport .makau-table th, #printReport .makau-table td { padding: 1.5mm; overflow-wrap: anywhere; }
#printReport .makau-table th:last-child { width: 12mm; }
#printReport .makau-reference a { overflow-wrap: anywhere; }
#printReport .makau-note { max-height: none; }
@media print { .report-makau { break-before: page; margin-top: 0; } }
@media print {
  html, body { display: block; width: 186mm; height: auto; min-height: 0; margin: 0; padding: 0; background: #fff; overflow: visible; }
  body > :not(#printPreview):not(#printFallback) { display: none !important; }
  #printPreview { display: none !important; }
  #printFallback { display: block; }
  body.report-ready #printFallback { display: none; }
  body.report-ready #printPreview { display: block !important; position: static; overflow: visible; padding: 0; background: #fff; }
  .print-toolbar { display: none; }
  #printReport { display: block; width: 186mm; padding: 0; margin: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-dashboard, .report-appendix, .report-accident-analysis { break-before: page; margin-top: 0; }
  .report-footer { break-inside: avoid; }
  #printReport a { color: inherit; }
  .report-map * { animation: none !important; transition: none !important; }
}
 .wb-report-map { display:block; width:100%; max-height:110mm; }
 .wb-table table { width:100%; border-collapse:collapse; }
 .wb-table td,.wb-table th { border-bottom:1px solid #ccc; padding:5px; font-size:10px; }
 #printReport figure { break-inside:avoid; }
 #printReport p { overflow-wrap:anywhere; }
