/* ═══════════════════════════════════════════════════════════════
   الوضع الداكن — تدرج بنفسجي غني (مرجع التصميم)
   يُحمَّل آخرًا ليتجاوز account / exams / android / site
   ═══════════════════════════════════════════════════════════════ */

html[data-theme="dark"] body.biology-platform,
html[data-theme="dark"] body.bio-lab {
  background:
    radial-gradient(ellipse 95% 80% at 78% 18%, rgba(94, 23, 235, 0.72) 0%, rgba(61, 16, 120, 0.35) 32%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 12% 72%, rgba(45, 11, 90, 0.85) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(123, 44, 191, 0.28) 0%, transparent 55%),
    linear-gradient(165deg, #1a0840 0%, #0f0528 40%, #0a041a 100%) !important;
  color: var(--text);
  background-attachment: fixed;
}

/* الهيرو — نفس التدرج البنفسجي الحيّ */
html[data-theme="dark"] .bx-hero {
  background:
    radial-gradient(ellipse 90% 80% at 80% 25%, #5e17eb 0%, #3d1078 30%, #2d0b5a 55%, #12062c 82%, #0a041a 100%) !important;
}
html[data-theme="dark"] .bx-blob--a {
  background: radial-gradient(circle, rgba(94, 23, 235, 0.85), transparent 65%) !important;
  opacity: .85;
}
html[data-theme="dark"] .bx-blob--b {
  background: radial-gradient(circle, rgba(192, 38, 211, 0.55), transparent 65%) !important;
}
html[data-theme="dark"] .bx-orb__glow {
  background: radial-gradient(circle, rgba(94, 23, 235, 0.55), rgba(123, 44, 191, 0.28) 45%, transparent 70%) !important;
}

/* الهيدر والفوتر */
html[data-theme="dark"] .bx-hdr {
  background: linear-gradient(180deg, rgba(10, 4, 26, 0.92), rgba(15, 5, 40, 0.78)) !important;
  border-bottom-color: rgba(196, 181, 253, 0.12) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
html[data-theme="dark"] .bx-ft {
  background: linear-gradient(180deg, #0f0528 0%, #0a041a 100%) !important;
  border-top-color: rgba(196, 181, 253, 0.12) !important;
}

/* الواجهة العامة — بطاقات زجاجية بنفسجية */
html[data-theme="dark"] .bx-kicker { background: rgba(255,255,255,.06); color: #e8e2f8; }
html[data-theme="dark"] .bx-unit,
html[data-theme="dark"] .bx-feature,
html[data-theme="dark"] .bx-grade,
html[data-theme="dark"] .bx-step {
  background: linear-gradient(160deg, rgba(45, 11, 90, 0.55), rgba(18, 6, 44, 0.75)) !important;
  border-color: rgba(196, 181, 253, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 12px 32px rgba(5, 1, 16, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-theme="dark"] .bx-feature__ico {
  background: linear-gradient(145deg, rgba(94, 23, 235, 0.28), rgba(217, 70, 239, 0.12));
  border-color: rgba(196, 181, 253, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 20px rgba(94, 23, 235, 0.2);
}
html[data-theme="dark"] .bx-steps {
  background: linear-gradient(145deg, rgba(28, 12, 64, 0.8), rgba(10, 4, 26, 0.9)) !important;
}
html[data-theme="dark"] .bx-grade__cta { color: #ddd6fe; }
html[data-theme="dark"] .bx-spot,
html[data-theme="dark"] .bx-cta {
  border: 1px solid rgba(196, 181, 253, 0.16);
  background: linear-gradient(145deg, rgba(45, 11, 90, 0.5), rgba(15, 5, 40, 0.85)) !important;
}
html[data-theme="dark"] .bx-mock { background: linear-gradient(160deg, #2d0b5a, #1a0840); color: #fff; }
html[data-theme="dark"] .bx-mock__head small,
html[data-theme="dark"] .bx-mock__stats small { color: rgba(232, 226, 248, 0.7); }
html[data-theme="dark"] .bx-mock__stats div { background: rgba(94, 23, 235, 0.2); }
html[data-theme="dark"] .bx-mock__stats b { color: #ede9fe; }
html[data-theme="dark"] .bx-mock__bars { background: rgba(94, 23, 235, 0.14); }
html[data-theme="dark"] .bx-mock__pill { background: rgba(16,185,129,.18); color: #6ee7b7; }

html[data-theme="dark"] .bx-marquee {
  background: rgba(10, 4, 26, 0.55) !important;
  border-top-color: rgba(196, 181, 253, 0.12) !important;
}
html[data-theme="dark"] .bx-marquee__item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(196, 181, 253, 0.14) !important;
  color: #fff !important;
}

/* صفحات الدخول */
html[data-theme="dark"] .auth-card {
  background: linear-gradient(160deg, rgba(45, 11, 90, 0.75), rgba(15, 5, 40, 0.92)) !important;
  border-color: rgba(196, 181, 253, 0.16) !important;
  box-shadow: 0 24px 60px rgba(5, 1, 16, 0.55), 0 0 40px rgba(94, 23, 235, 0.18);
}
html[data-theme="dark"] .input,
html[data-theme="dark"] .acc-input {
  background-color: var(--field-bg) !important;
  color: var(--field-text) !important;
  border-color: var(--field-border) !important;
}
html[data-theme="dark"] .auth-alt__card { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .auth-link,
html[data-theme="dark"] .auth-alt__card small { color: #c4b5fd; }
html[data-theme="dark"] .auth-imgPane {
  background:
    radial-gradient(ellipse 80% 70% at 60% 40%, #5e17eb 0%, #2d0b5a 45%, #0a041a 100%) !important;
}

/* لوحة الطالب */
html[data-theme="dark"] body.bio-lab .acc-topbar__bar {
  background: linear-gradient(120deg, #0a041a 0%, #2d0b5a 50%, #5e17eb 100%) !important;
}
html[data-theme="dark"] body.bio-lab .acc-sidebar {
  background: linear-gradient(180deg, rgba(28, 12, 64, 0.95), rgba(10, 4, 26, 0.98)) !important;
  border-color: rgba(196, 181, 253, 0.12) !important;
}
html[data-theme="dark"] body.bio-lab .acc-nav__item:not(.is-active):not(.is-danger) {
  color: rgba(241,236,255,.9) !important;
}
html[data-theme="dark"] body.bio-lab .acc-stat,
html[data-theme="dark"] body.bio-lab .acc-card,
html[data-theme="dark"] body.bio-lab .acc-course,
html[data-theme="dark"] body.bio-lab .acc-lecture,
html[data-theme="dark"] body.bio-lab .acc-item,
html[data-theme="dark"] body.bio-lab .acc-lectureInfo,
html[data-theme="dark"] body.bio-lab .as-q,
html[data-theme="dark"] body.bio-lab .ass-result-card,
html[data-theme="dark"] body.bio-lab .redeem-card,
html[data-theme="dark"] .wallet-history,
html[data-theme="dark"] .exam-card,
html[data-theme="dark"] .assign-card {
  background: linear-gradient(160deg, rgba(45, 11, 90, 0.55), rgba(18, 6, 44, 0.8)) !important;
  border-color: rgba(196, 181, 253, 0.14) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 28px rgba(5, 1, 16, 0.3);
}
html[data-theme="dark"] body.bio-lab .acc-card h2,
html[data-theme="dark"] body.bio-lab .acc-card__title,
html[data-theme="dark"] body.bio-lab .acc-course__title,
html[data-theme="dark"] body.bio-lab .acc-lecture__title,
html[data-theme="dark"] body.bio-lab .acc-stat__val { color: #fff !important; }
html[data-theme="dark"] body.bio-lab .acc-btn--ghost { color: #ddd6fe !important; }
html[data-theme="dark"] body.bio-lab .acc-notifs {
  background: linear-gradient(160deg, rgba(28, 12, 64, 0.9), rgba(10, 4, 26, 0.95)) !important;
}

/* أقسام الصفحة الرئيسية */
html[data-theme="dark"] .bx-section {
  background: transparent !important;
}
html[data-theme="dark"] .bx-head__title { color: #fff !important; }
html[data-theme="dark"] .bx-head__sub { color: rgba(232, 226, 248, 0.72) !important; }
