/* Reports: one design for the screen and the PDF (A4). All classes start with "qr-".
   Sizes in mm / pt so the screen preview and the printed page match. */
.qr { font-family: "Segoe UI", Tahoma, Cairo, Arial, sans-serif; font-size: 9pt; color: #1f2937; line-height: 1.35; }
.qr * { box-sizing: border-box; }

/* Page header: company (start side) and report title (end side). Arabic mirrors by itself (dir="rtl"). */
.qr-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6mm; padding-bottom: 3mm; border-bottom: 0.5pt solid #1F5AA6; }
.qr-company { display: flex; gap: 4mm; align-items: flex-start; min-width: 0; }
.qr-logo { width: 20mm; height: 20mm; object-fit: contain; flex: none; }
.qr-company-name { font-size: 14pt; font-weight: 700; color: #1F5AA6; }
.qr-company-alt { font-size: 10pt; }
.qr-company-info { font-size: 8pt; color: #4b5563; white-space: pre-line; }
.qr-title-block { text-align: end; flex: none; }
.qr-title { font-size: 14pt; font-weight: 700; }
.qr-period { font-size: 10pt; }
.qr-printed { font-size: 8pt; color: #4b5563; }

/* Filters line under the header */
.qr-filters { font-size: 8pt; color: #374151; padding: 1.5mm 0; border-bottom: 0.5pt solid #d1d5db; margin-bottom: 3mm; }
.qr-filters span + span::before { content: " | "; color: #9ca3af; }
.qr-filters b { font-weight: 600; }

/* Table: header row repeats on every printed page, rows are never cut between pages */
.qr-table { width: 100%; border-collapse: collapse; }
.qr-table thead { display: table-header-group; }
.qr-table tr { break-inside: avoid; }
.qr-table th { background: #EEF2F7; font-weight: 700; text-align: start; padding: 1.5mm 1.5mm; border-bottom: 0.75pt solid #9ca3af; white-space: nowrap; }
.qr-table td { padding: 1.2mm 1.5mm; border-bottom: 0.25pt solid #e5e7eb; vertical-align: top; }
.qr-table .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qr-table .nowrap { white-space: nowrap; }
.qr-table tr.qr-opening td { font-style: italic; background: #fafafa; }
.qr-table tr.qr-header-row td { font-weight: 700; background: #f3f4f6; }
.qr-table tr.qr-section td { font-weight: 700; font-size: 10pt; padding-top: 3mm; border-bottom: 0.75pt solid #9ca3af; }
.qr-table tr.qr-total td { font-weight: 700; border-top: 0.75pt solid #374151; border-bottom: none; background: #f9fafb; }
.qr-info { display: flex; flex-wrap: wrap; gap: 1mm 8mm; margin-bottom: 3mm; font-size: 9pt; }
.qr-info b { font-weight: 600; }
.qr-totals { margin-top: 3mm; margin-inline-start: auto; width: 75mm; border-collapse: collapse; }
.qr-totals td { padding: 1mm 1.5mm; }
.qr-totals tr.grand td { font-weight: 700; font-size: 10.5pt; border-top: 0.75pt solid #374151; }
.qr-empty { padding: 6mm 0; text-align: center; color: #6b7280; }

/* Screen only: the report on a white A4 sheet */
.qr-paper { background: #fff; width: 210mm; max-width: 100%; margin: 0 auto; padding: 12mm; box-shadow: 0 1px 4px rgba(0,0,0,.15); overflow-x: auto; }
.qr-paper.landscape { width: 297mm; }
.qr-signatures { display: flex; justify-content: space-between; margin-top: 14mm; font-size: 9pt; break-inside: avoid; }
