/* ╔══════════════════════════════════════════════════════════════╗
   ║  35-spacing-fix.css  v1                                      ║
   ║  إصلاح نهائي لتساوي المسافات بين بطاقات الداشبورد           ║
   ║  يُحمَّل بعد جميع الملفات الأخرى                            ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── 1. تعريف موحّد للمسافة — يلغي --section-gap: 22px ── */
:root {
  --dash-gap:     14px;
  --section-gap:  14px;   /* override 19-dashboard-pro.css */
}

@media (max-width: 600px) {
  :root { --dash-gap: 10px; --section-gap: 10px; }
}

/* ── 2. الحاوية الرئيسية ── */
/* [FIX] :not(.is-hidden) لمنع تسرّب الداشبورد تحت شاشة بدء الامتحان */
.dashboard:not(.is-hidden) {
  display:         flex         !important;
  flex-direction:  column       !important;
  align-items:     stretch      !important;
  gap:             var(--dash-gap) !important;
  padding-block:   0            !important;
}

/* ── 3. كل ابن مباشر: صفّر margin ── */
.dashboard:not(.is-hidden) > * {
  margin-top:    0 !important;
  margin-bottom: 0 !important;
  flex-shrink:   0 !important;
}

/* ── 4. البطاقات المعروفة التي لها margin-bottom خاص ── */
/* من 30-rescue-features.css */
#nf26-qotd-card,
#nf26-rescue-card,
/* من 26-new-features.css */
#exam-countdown-card,
/* من 19-dashboard-pro.css */
.nf09-card,
.v11-dash-card,
/* أي بطاقة داشبورد عامة */
.dash-card,
.dc-card,
.dc-wrap {
  margin-top:    0 !important;
  margin-bottom: 0 !important;
}

/* ── 5. الـ wrappers من الطبقة الثانية ── */
.dashboard > section > *,
.dashboard > div > .nf09-card,
.dashboard > div > .v11-dash-card,
.dashboard > div > [id^="nf"] {
  margin-top:    0 !important;
  margin-bottom: 0 !important;
}

/* ── 6. divider: negative margin لتتوسط بصرياً ── */
.dash-section-divider {
  margin-block: calc(var(--dash-gap) * -0.5) !important;
}

/* ── 7. لا padding زيادة على الحاوية الخارجية ── */
.main-content,
.content-col,
.page-content,
#main-scroll-area {
  padding-block: 0 !important;
}
