/* التقرير الشهري — صفحة طباعة: أبيض، خط واضح، بلا زجاج. زر الطباعة → حفظ PDF */
* { box-sizing: border-box; }
html, body { margin: 0; background: #e9edf3; color: #111827; font-family: 'Cairo', system-ui, sans-serif; font-size: 14px; }
.rp-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: #fff; border-bottom: 1px solid #d7dde7; position: sticky; top: 0; }
.rp-bar input { font: inherit; padding: 4px 8px; border: 1px solid #c7cfdb; border-radius: 8px; margin-inline-start: 6px; }
.rp-bar button { font: inherit; font-weight: 700; padding: 6px 14px; border: 0; border-radius: 8px; background: #0e7490; color: #fff; cursor: pointer; }
#rp-msg { color: #b91c1c; font-size: 13px; }
.rp-page { width: 100%; max-width: 210mm; margin: 16px auto; background: #fff; padding: 16mm 14mm; box-shadow: 0 4px 30px rgba(0,0,0,.12); }
.rp-head { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid #0e7490; padding-bottom: 10px; margin-bottom: 14px; }
.rp-head img { width: 44px; height: 44px; }
.rp-head h1 { margin: 0; font-size: 20px; }
.rp-head small { display: block; color: #4b5b74; font-size: 12.5px; }
.rp-head .rp-at { margin-inline-start: auto; text-align: left; color: #4b5b74; font-size: 12px; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 16px; }
.rp-kpi { border: 1px solid #d7dde7; border-radius: 10px; padding: 8px 10px; }
.rp-kpi b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.rp-kpi span { color: #4b5b74; font-size: 12px; }
.rp-kpi.net { background: #ecfdf5; border-color: #6ee7b7; }
h2 { font-size: 15px; margin: 16px 0 6px; padding-inline-start: 8px; border-inline-start: 4px solid #0e7490; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 6px 8px; border-bottom: 1px solid #e5e9f0; text-align: right; vertical-align: top; }
th { background: #f3f6fa; font-weight: 700; }
td.n, th.n { text-align: left; font-variant-numeric: tabular-nums; direction: ltr; }
tfoot td { font-weight: 800; background: #f8fafc; }
.tw { overflow-x: auto; }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rp-note { color: #4b5b74; font-size: 12px; margin-top: 18px; border-top: 1px dashed #c7cfdb; padding-top: 8px; line-height: 1.7; }
.rp-loading { text-align: center; color: #4b5b74; }
@media (max-width: 760px) { .rp-kpis { grid-template-columns: repeat(2, 1fr); } .rp-two { grid-template-columns: 1fr; } .rp-page { padding: 14px; } }
@media print {
  html, body { background: #fff; }
  .no-print { display: none !important; }
  .rp-page { width: auto; margin: 0; padding: 0; box-shadow: none; }
  h2 { break-after: avoid; }
  table { break-inside: auto; } tr { break-inside: avoid; }
  @page { size: A4; margin: 14mm; }
}
