/* =====================================================================
   [شكل] التقرير اليومي والشهري — تحسين الشكل بس
   نفس التقسيمة (الكروت على الشمال والخلاصة والشارت على اليمين) ونفس الأرقام والحسابات
   ===================================================================== */
.rp-classic .container { max-width: 100%; padding: 0; }
.rp-classic .widget-box { background: transparent !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }

/* الفلاتر */
.rp-classic .widget-box > .form-group.row { background: #fff; border: 1px solid var(--gs-border); border-radius: 16px; padding: 14px 8px 6px; margin: 0 0 16px !important; box-shadow: var(--gs-shadow-sm); }
.rp-classic .widget-box > .form-group.row label { font-size: 12.5px !important; font-weight: 700 !important; color: var(--gs-muted) !important; margin-bottom: 6px; }
.rp-classic .widget-box > .form-group.row .form-control { height: 42px; border-radius: 12px !important; border: 1px solid var(--gs-border) !important; font-size: 14px !important; font-weight: 600; margin-bottom: 8px; }
.rp-classic .select2-container .select2-selection--single { height: 42px !important; border-radius: 12px !important; border: 1px solid var(--gs-border) !important; display: flex; align-items: center; }

/* جسم التقرير */
.rp-classic .widget-body { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.rp-classic .widget-body > .row { font-weight: 400 !important; }

/* الكروت */
.rp-classic .card { border: 1px solid var(--gs-border) !important; border-radius: 16px !important; box-shadow: var(--gs-shadow-sm); overflow: hidden; margin-bottom: 16px !important; background: #fff; transition: box-shadow .2s ease, transform .2s ease; animation: gsRise .5s var(--gs-ease) both; }
.rp-classic .card:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, .07); }
.rp-classic .card-header { background: #fafafa !important; border-radius: 0 !important; border-bottom: 1px solid #eef0f2 !important; padding: 11px 16px !important; font-size: 14.5px; font-weight: 800; color: var(--gs-text); position: relative; }
.rp-classic .card-header::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--gs-red); }
.rp-classic .card-header a { color: var(--gs-red) !important; text-decoration: none !important; border-bottom: 1px dashed currentColor; font-weight: 800; }
.rp-classic .card-header a:hover { border-bottom-style: solid; }
.rp-classic .card-body { padding: 14px 16px !important; }
.rp-classic .card-body p { font-size: 13px !important; font-weight: 700; color: var(--gs-muted) !important; margin: 0 0 2px; }
.rp-classic .card-body h5 { font-size: 21px !important; font-weight: 800 !important; margin: 0 0 4px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.rp-classic .card-body hr { margin: 10px 0 !important; border-top: 1px dashed #e3e5e9; }

/* الخلاصة (أول كارت على اليمين) بشكل مميز */
.rp-classic .col-sm-6:last-child > .card:first-child { background: linear-gradient(135deg, #1b1b1b 0%, #0e0e0e 100%); border-color: #1b1b1b !important; position: relative; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-header { background: transparent !important; color: #fff; border-bottom-color: rgba(255, 255, 255, .1) !important; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-body p { color: #b9bcc2 !important; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-body h5 { color: #fff; font-size: 22px !important; }
.rp-classic .col-sm-6:last-child > .card:first-child #expenses { color: #ff9a9d !important; }
.rp-classic .col-sm-6:last-child > .card:first-child #final { color: #7ee2a4 !important; }
.rp-classic #final, .rp-classic #visa_final, .rp-classic #cash_final { color: #1d4fb8 !important; }

/* [شكل] ألوان الأرقام بنفس ألوان السيستم والشارت (بدل indigo و #9b59b6 و #d12026 القديمة) */
.rp-classic .card-body h5 { color: var(--gs-text, #1d2127); }
.rp-classic .card-body p[style*="#555"] { color: var(--gs-muted, #636b78) !important; }
.rp-classic .row[style*="9b59b6"], .rp-classic .row[style*="9b59b6"] h5 { color: #7c3aed !important; }
.rp-classic .row[style*="16a34a"], .rp-classic .row[style*="16a34a"] h5 { color: #16a34a !important; }
.rp-classic h5[style*="d12026"] { color: var(--gs-red, #d53c41) !important; }
.rp-classic h5[style*="indigo"] { color: #1d4fb8 !important; }
.rp-classic #renew_income { color: #1d4fb8; }
.rp-classic #new_income { color: #16a34a; }
.rp-classic #visits_income { color: #d97706; }
.rp-classic #income_total { color: #7c3aed; }
.rp-classic #total_expenses { color: var(--gs-red, #d53c41); }
.rp-classic .table thead th { background: #fafafa; color: var(--gs-muted, #636b78); font-weight: 800; font-size: 12.5px; border-color: #eef0f2 !important; }
.rp-classic .table td { border-color: #eef0f2 !important; }

@media (max-width: 575px) {
    .rp-classic .card-body h5 { font-size: 18px !important; }
    .rp-classic .card-body p { font-size: 12px !important; }
}
/* [شكل] الكروت على نفس خط كارت الفلتر اللي فوق (كانت داخلة لجوه ~26px من الناحيتين) */
.rp-classic .widget-body > .row { padding: 0 !important; margin-left: -10px !important; margin-right: -10px !important; }

/* =====================================================================
   [شكل] التقارير: كل رقم في مربع لوحده (العنوان فوق والرقم تحته في نفس المربع) بمسافات واضحة — نفس الترتيب بالظبط
   (صف العناوين + صف الأرقام بيتعرضوا كمربع واحد لكل عمود)
   ===================================================================== */
.rp-classic .card-body > hr { display: none !important; }
.rp-classic .card-body > .row { margin-left: -5px !important; margin-right: -5px !important; }
.rp-classic .card-body > .row > [class*="col-"] { border: 0 solid transparent; border-left-width: 5px; border-right-width: 5px; background-clip: padding-box; }
/* صف العناوين */
.rp-classic .card-body > .row:has(> [class*="col-"] > p:only-child) { margin-top: 10px !important; }
.rp-classic .card-body > .row:first-child:has(> [class*="col-"] > p:only-child) { margin-top: 0 !important; }
.rp-classic .card-body > .row:has(> [class*="col-"] > p:only-child) > [class*="col-"] { background-color: #f7f8fa; border-radius: 14px 14px 0 0; padding-top: 12px; padding-bottom: 2px; }
.rp-classic .card-body > .row:has(> [class*="col-"] > p:only-child) p { margin: 0 !important; font-size: 13px !important; font-weight: 700 !important; color: #667085 !important; line-height: 1.5; }
/* صف الأرقام */
.rp-classic .card-body > .row:has(> [class*="col-"] > h5) > [class*="col-"] { background-color: #f7f8fa; border-radius: 0 0 14px 14px; padding-top: 2px; padding-bottom: 12px; }
.rp-classic .card-body > .row:has(> [class*="col-"] > h5) h5 { margin: 4px 0 0 !important; line-height: 1.25; }
/* الزوار (العنوان والرقم في نفس الخانة) */
.rp-classic .card-body > .gs-rep-visitors { margin-top: 10px !important; }
.rp-classic .card-body > .gs-rep-visitors > .col-6 { background-color: #f7f8fa; border-radius: 14px; padding-top: 10px; padding-bottom: 10px; }
.rp-classic .card-body > .gs-rep-visitors > .col-6 p { margin: 0 0 4px !important; font-size: 13px !important; font-weight: 700; color: #667085 !important; }
.rp-classic .card-body > .gs-rep-visitors > .col-6 h6 { margin: 0 !important; }
.rp-classic .card-body > .gs-rep-visitors > .col-12 { background: transparent; padding-top: 6px; }
/* كارت الملخص الغامق */
.rp-classic .col-sm-6:last-child > .card:first-child .card-body > .row > [class*="col-"] { background-color: rgba(255, 255, 255, .06) !important; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-body > .row:has(> [class*="col-"] > p:only-child) p { color: #b9bcc2 !important; }
@media (max-width: 575.98px) {
    .rp-classic .card-body { padding: 14px !important; }
    .rp-classic .card-body > .row:has(> [class*="col-"] > h5) h5 { font-size: 19px !important; }
}
/* المربعات في نفس الصف بنفس الطول (العنوان تحت في خانته والرقم فوق في خانته — فالمربع يبان حتة واحدة) */
.rp-classic .card-body > .row { align-items: stretch !important; }
.rp-classic .card-body > .row:has(> [class*="col-"] > p:only-child) > [class*="col-"] { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rp-classic .card-body > .row > [class*="col-"] { margin-top: 0 !important; margin-bottom: 0 !important; }

/* =====================================================================
   [شكل] التقرير اليومي والشهري أوضح — نفس الترتيب ونفس الألوان
   ===================================================================== */
/* عنوان الكارت: أيقونة + الاسم من البداية */
.rp-classic .card-header { display: flex; align-items: center; justify-content: flex-start; gap: 10px; text-align: start; font-size: 15px; min-height: 52px; }
.rp-classic .card-header .rr-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    background: rgba(var(--gs-red-rgb, 213, 60, 65), .1); color: var(--gs-red, #d53c41); font-size: 14px; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-header .rr-ic { background: rgba(255, 255, 255, .1); color: #fff; }
/* الأرقام أكبر شوية والعناوين أوضح */
.rp-classic .card-body h5 { font-size: 24px !important; letter-spacing: -.2px; }
.rp-classic .card-body p { color: #5b6270 !important; }
/* زرار "تقرير PDF" جوه كارت الفلتر */
.rp-classic .widget-box > .form-group.row.gs-rp-filters { align-items: flex-end; }
@media (min-width: 576px) {
    .rp-classic .widget-box > .form-group.row.gs-rp-filters > [class*="col-sm-"]:not(.is-in-filter) { flex: 1 1 0; max-width: none; }
}
.gs-rp-tools.is-in-filter { margin: 0 0 8px; display: flex; }
.gs-rp-tools.is-in-filter .gs-rp-print { height: 42px; }
@media (max-width: 575.98px) {
    .gs-rp-tools.is-in-filter { margin-top: 4px; }
    .gs-rp-tools.is-in-filter .gs-rp-print { width: 100%; justify-content: center; }
}
/* [شكل] الموبايل: المبالغ الكبيرة (زي 68,359.81) مبقتش تتقسم على سطرين ولا تخرج برّه المربع */
.rp-classic .card-body h5 { white-space: nowrap; }
/* الأرقام أصغر سنة عشان تستحمل مبالغ بالمليون (-1,249,909.81) */
.rp-classic .card-body > .row:has(> [class*="col-"] > h5) h5 { font-size: 21px !important; }
.rp-classic .col-sm-6:last-child > .card:first-child .card-body h5 { font-size: 20px !important; }
@media (max-width: 575.98px) {
    .rp-classic .card-body > .row:has(> [class*="col-"] > h5) h5,
    .rp-classic .col-sm-6:last-child > .card:first-child .card-body h5 { font-size: 18px !important; letter-spacing: -.3px; }
    .rp-classic .card-body > .row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
}
/* الرقم الطويل بس (مليون مثلاً) هو اللي بيصغر على قد مربعه — js/gs-polish.js (gsFitNum) */
.rp-classic .card-body h5.gs-fit { overflow: hidden; }
