/* One-page A4 report. Grid: 0.5 cm cells (42 x 59), type follows the brand A4 scale. */
/* The report is always light, whatever the screen theme */
.print-report {
  display: none;
  --bg: var(--lean-offwhite);
  --surface: rgba(34, 36, 73, 0.04);
  --border: rgba(179, 180, 179, 0.7);
  --text: var(--lean-navy);
  --text-muted: var(--lean-darkgray);
  color: var(--text);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

@page { size: A4 portrait; margin: 0; }

@media print {
  html, body { background: var(--lean-offwhite) !important; }
  body > *:not(.print-report) { display: none !important; }
  .print-report { display: block; }
}

/* Off-white page (the brand forbids white backgrounds; full-colour logo sits on #F3F3F2) */
.pr-page {
  width: 210mm; height: 297mm; overflow: hidden;
  background: var(--lean-offwhite);
  display: flex; flex-direction: column;
  font-family: var(--font); font-size: 10pt; line-height: 1.45;
}
.pr-content { flex: 1; min-height: 0; padding: 10mm 10mm 0; display: flex; flex-direction: column; gap: 2.5mm; }

.pr-head { border-bottom: 1.5pt solid var(--lean-blue); padding-bottom: 2.5mm; }
.pr-head h1 { font-size: 28pt; font-weight: var(--w-black); line-height: 1.15; }
.pr-date { font-size: 8pt; font-weight: var(--w-light); color: var(--text-muted); }
.pr-page h2 { font-size: 14pt; font-weight: var(--w-bold); margin-top: 2mm; line-height: 1.3; }

.pr-alert {
  padding: 2mm 4mm; border-radius: 1.5mm; background: var(--lean-yellow); color: var(--lean-navy);
}

.pr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5mm; }
.pr-kpi {
  display: flex; flex-direction: column; padding: 2.5mm 4mm; border-radius: 1.5mm;
  background: var(--surface); border-top: 1.2mm solid var(--lean-blue);
}
.pr-kpi:nth-child(2) { border-top-color: var(--lean-green); }
.pr-kpi:nth-child(3) { border-top-color: var(--lean-teal); }
.pr-kpi:nth-child(4) { border-top-color: var(--lean-navy); }
.pr-kpi__label { font-size: 8pt; font-weight: var(--w-semibold); color: var(--text-muted); }
.pr-kpi__value { font-size: 20pt; font-weight: var(--w-black); line-height: 1.2; white-space: nowrap; }
.pr-kpi__delta { font-size: 7.5pt; font-weight: var(--w-light); color: var(--text-muted); }

.pr-split { display: grid; grid-template-columns: 45mm 1fr; gap: 5mm; align-items: center; }
.pr-ring svg { width: 45mm; height: auto; display: block; }
.pr-table { font-size: 9pt; }
.pr-table th, .pr-table td { padding: 0.9mm 2mm; }
.pr-table thead th { font-size: 8pt; }

.pr-summary { font-size: 10pt; text-align: start; }

.pr-recent { list-style: none; margin: 0; padding: 0; font-size: 8.5pt; }
.pr-recent li {
  display: grid; grid-template-columns: 22mm 10mm 1fr 35mm; gap: 3mm;
  padding: 0.8mm 0; border-bottom: 0.5pt solid var(--border);
}

/* Tall format: logo area along the bottom, logo in the bottom corner.
   Logo 25 mm tall: monogram ~15 mm, clear space X ~7.5 mm; 8 mm reserved. */
.pr-logo-area {
  flex: none; height: 40mm; padding: 0 10mm 0 10mm;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10mm;
}
.pr-note { font-size: 7.5pt; font-weight: var(--w-light); color: var(--text-muted); padding-bottom: 8mm; }
.pr-logo { height: 25mm; width: auto; display: block; margin: 0 0 7.5mm; padding: 0; }
/* Keep the logo in the bottom-right corner in Arabic too */
[dir="rtl"] .pr-logo-area { flex-direction: row-reverse; }
