/* ═══════════════════════════════════════════════════════════════
   Chem Lab — Light ≠ Dark
   فصل جذري + وضوح نصوص كامل في الوضعين
   يُحمَّل آخراً ليتفوق على الألوان الثابتة
   ═══════════════════════════════════════════════════════════════ */

/* ========== LIGHT MODE ========== */
html[data-theme="light"] .chem-hdr {
  background: var(--hdr-bg) !important;
  color: var(--hdr-text) !important;
  box-shadow: 0 4px 20px rgba(20, 8, 34, 0.08) !important;
  border-bottom: 1px solid var(--hdr-border);
}
html[data-theme="light"] .chem-hdr__strip {
  background: var(--hdr-strip-bg) !important;
  color: var(--hdr-strip-text) !important;
  border-bottom: 1px solid var(--border) !important;
}
html[data-theme="light"] .chem-hdr__strip em { color: var(--primary) !important; }
html[data-theme="light"] .chem-hdr__brand,
html[data-theme="light"] .chem-hdr__name { color: var(--hdr-text) !important; }
html[data-theme="light"] .chem-hdr__tag { color: var(--hdr-muted) !important; }
html[data-theme="light"] .chem-hdr__link {
  color: var(--text) !important;
}
html[data-theme="light"] .chem-hdr__link:hover {
  background: var(--surface-soft) !important;
  color: var(--primary) !important;
}
html[data-theme="light"] .chem-hdr__logoFallback {
  background: var(--accent-light) !important;
  color: var(--primary) !important;
}
html[data-theme="light"] .chem-hdr__burger {
  border-color: var(--border-strong) !important;
}
html[data-theme="light"] .chem-hdr__burger span { background: var(--text-strong) !important; }
html[data-theme="light"] .chem-hdr__theme .theme-switch--pro,
html[data-theme="light"] .chem-hdr .theme-switch--pro {
  background: #FFFFFF !important;
  border-color: rgba(20, 8, 34, 0.16) !important;
}
html[data-theme="light"] .chem-hdr__drawer {
  background: var(--card-bg) !important;
  border-top: 1px solid var(--border) !important;
}

html[data-theme="light"] .chem-hero {
  background: var(--hero-bg) !important;
  color: var(--hero-text) !important;
  border-bottom: 1px solid var(--border);
}
html[data-theme="light"] .chem-hero__brand,
html[data-theme="light"] .chem-hero__teacher,
html[data-theme="light"] .chem-hero__desc,
html[data-theme="light"] .chem-hero__enLine,
html[data-theme="light"] .chem-hero__photoCapAr,
html[data-theme="light"] .chem-hero__photoCapEn {
  color: var(--hero-text) !important;
}
html[data-theme="light"] .chem-hero__enLine,
html[data-theme="light"] .chem-hero__teacher,
html[data-theme="light"] .chem-hero__photoCapEn {
  color: var(--hero-accent) !important;
  font-weight: 700;
}
html[data-theme="light"] .chem-hero__desc {
  color: var(--hero-muted) !important;
  font-weight: 500;
}
html[data-theme="light"] .chem-hero__glow { opacity: 0.22; }
html[data-theme="light"] .chem-hero__mols { color: rgba(91, 44, 138, 0.22) !important; }
html[data-theme="light"] .chem-hero__orbits i { border-color: rgba(91, 44, 138, 0.12) !important; }
html[data-theme="light"] .chem-hero__photoCap {
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.92)) !important;
}
html[data-theme="light"] .chem-hero .chem-btn--outline {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: transparent !important;
}
html[data-theme="light"] .chem-hero .chem-btn--outline:hover {
  background: var(--accent-soft) !important;
}

html[data-theme="light"] .chem-path,
html[data-theme="light"] .chem-features,
html[data-theme="light"] .chem-cta,
html[data-theme="light"] .chem-stats { background: var(--section-bg) !important; }
html[data-theme="light"] .chem-axes,
html[data-theme="light"] .chem-grades { background: var(--section-alt-bg) !important; }

html[data-theme="light"] .chem-path__step,
html[data-theme="light"] .chem-feature,
html[data-theme="light"] .chem-grade,
html[data-theme="light"] .chem-axes__list li,
html[data-theme="light"] .chem-companion,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .auth-formPane {
  background: #FFFFFF !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .chem-path__label,
html[data-theme="light"] .chem-feature__title,
html[data-theme="light"] .chem-grade__name,
html[data-theme="light"] .chem-axes__list b,
html[data-theme="light"] .auth-head__title {
  color: var(--text-strong) !important;
}
html[data-theme="light"] .chem-path__hint,
html[data-theme="light"] .chem-feature__text,
html[data-theme="light"] .chem-grade__hint,
html[data-theme="light"] .chem-axes__list em,
html[data-theme="light"] .chem-section__sub,
html[data-theme="light"] .auth-head__sub,
html[data-theme="light"] .label {
  color: #2A1B3D !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
html[data-theme="light"] .chem-path__num,
html[data-theme="light"] .chem-grade__cta,
html[data-theme="light"] .chem-section__kicker,
html[data-theme="light"] .chem-feature__z,
html[data-theme="light"] .chem-path__sym {
  color: #5B2C8A !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}
html[data-theme="light"] .chem-axes__el,
html[data-theme="light"] .chem-axes__el strong,
html[data-theme="light"] .chem-axes__el small {
  color: #FFFFFF !important;
  opacity: 1 !important;
}
html[data-theme="light"] .chem-grade__name,
html[data-theme="light"] .chem-axes__list b,
html[data-theme="light"] .chem-feature__title,
html[data-theme="light"] .chem-path__label {
  color: #0E0618 !important;
  font-weight: 800 !important;
}
html[data-theme="light"] .chem-grade__media {
  background: #F0EAF8 !important;
}
html[data-theme="light"] .chem-grade__media img {
  object-fit: contain !important;
  opacity: 1 !important;
}
html[data-theme="light"] .chem-feature__sym {
  color: rgba(91, 44, 138, 0.22) !important;
}

html[data-theme="light"] .chem-stat {
  background: linear-gradient(160deg, #2B1248, #5B2C8A) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .chem-stat__val { color: #FFFFFF !important; }
html[data-theme="light"] .chem-stat__lbl { color: rgba(255, 255, 255, 0.85) !important; }

html[data-theme="light"] .chem-cta__box {
  background: linear-gradient(135deg, #2B1248 0%, #5B2C8A 100%) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .chem-cta__title,
html[data-theme="light"] .chem-cta__kicker { color: #FFFFFF !important; }
html[data-theme="light"] .chem-cta__sub { color: rgba(255, 255, 255, 0.88) !important; }
html[data-theme="light"] .chem-cta .chem-btn--solid {
  background: #FFFFFF !important;
  color: #1A0B2E !important;
  font-weight: 800 !important;
}

/* Footer — LIGHT: أبيض نظيف + بنفسجي */
html[data-theme="light"] .chem-ft {
  background: linear-gradient(180deg, #F8F5FC 0%, #EEE6F8 100%) !important;
  color: #1C1228 !important;
  border-top: 1px solid rgba(91, 44, 138, 0.14);
  box-shadow: 0 -12px 40px rgba(43, 18, 72, 0.06);
}
html[data-theme="light"] .chem-ft__topbar {
  background: #FFFFFF !important;
  color: #5B2C8A !important;
  border-bottom: 1px solid rgba(91, 44, 138, 0.12);
}
html[data-theme="light"] .chem-ft__topbar em { color: #2B1248 !important; }
html[data-theme="light"] .chem-ft__logoWrap {
  background: #0B0614 !important;
  border: 1px solid rgba(91, 44, 138, 0.2);
  box-shadow: 0 8px 20px rgba(43, 18, 72, 0.12);
}
html[data-theme="light"] .chem-ft__platform { color: #140822 !important; }
html[data-theme="light"] .chem-ft__subject { color: #5B2C8A !important; }
html[data-theme="light"] .chem-ft__tag { color: #3A2A4E !important; }
html[data-theme="light"] .chem-ft__heading { color: #140822 !important; }
html[data-theme="light"] .chem-ft__heading::after { background: #5B2C8A !important; }
html[data-theme="light"] .chem-ft__nav a,
html[data-theme="light"] .chem-ft__socialLink,
html[data-theme="light"] .chem-ft__phone,
html[data-theme="light"] .chem-ft__socialLbl {
  color: #2A1B3D !important;
}
html[data-theme="light"] .chem-ft__nav a:hover,
html[data-theme="light"] .chem-ft__socialLink:hover,
html[data-theme="light"] .chem-ft__phone:hover {
  color: #5B2C8A !important;
}
html[data-theme="light"] .chem-ft__socialIco,
html[data-theme="light"] .chem-ft__phoneIco {
  background: #FFFFFF !important;
  border: 1px solid rgba(91, 44, 138, 0.16);
  color: #5B2C8A !important;
  box-shadow: 0 2px 8px rgba(43, 18, 72, 0.06);
}
html[data-theme="light"] .chem-ft__bottom {
  border-top: 1px solid rgba(91, 44, 138, 0.14) !important;
  color: #3A2A4E !important;
}
html[data-theme="light"] .chem-ft__rights,
html[data-theme="light"] .chem-ft__dev {
  color: #3A2A4E !important;
}

html[data-theme="light"] .auth-imgPane {
  background: linear-gradient(155deg, #F8F6FC 0%, #E8DFF4 50%, #D4C0EB 100%) !important;
}
html[data-theme="light"] .auth-imgPane__brand {
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.95)) !important;
  color: var(--text-strong) !important;
}
html[data-theme="light"] .auth-imgPane__brand strong { color: var(--text-strong) !important; }
html[data-theme="light"] .auth-imgPane__brand span { color: var(--muted) !important; }
html[data-theme="light"] .auth-imgFallback { color: var(--text) !important; }
html[data-theme="light"] .auth-imgFallback__hero { color: var(--primary) !important; }
html[data-theme="light"] .btn-submit {
  background: var(--btn-solid-bg) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .auth-link { color: var(--primary) !important; }

/* Account light */
html[data-theme="light"] .acc-topbar__bar {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="light"] .acc-brand,
html[data-theme="light"] .acc-brand__name { color: var(--text-strong) !important; }
html[data-theme="light"] .acc-brand__sub { color: var(--muted) !important; }
html[data-theme="light"] .acc-student {
  background: var(--page-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .acc-student__ico { color: var(--primary) !important; }
html[data-theme="light"] .acc-pill {
  background: var(--primary) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .acc-pill__ico { color: #FFFFFF !important; }
html[data-theme="light"] .acc-bell {
  background: var(--page-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .acc-burger { border-color: var(--border-strong) !important; }
html[data-theme="light"] .acc-burger span { background: var(--text-strong) !important; }
html[data-theme="light"] .acc-sidebar,
html[data-theme="light"] .acc-card,
html[data-theme="light"] .acc-stat,
html[data-theme="light"] .acc-companion,
html[data-theme="light"] .acc-notifs,
html[data-theme="light"] .acc-assess-card,
html[data-theme="light"] .acc-feedCard,
html[data-theme="light"] .acc-chatCard,
html[data-theme="light"] .wallet-summary__card,
html[data-theme="light"] .wallet-history__item {
  background: #FFFFFF !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .acc-nav__item { color: var(--text) !important; }
html[data-theme="light"] .acc-nav__item:hover {
  background: var(--page-bg) !important;
  color: var(--text-strong) !important;
}
html[data-theme="light"] .acc-nav__item.is-active {
  background: linear-gradient(135deg, #2B1248, #5B2C8A) !important;
  color: #FFFFFF !important;
}
html[data-theme="light"] .acc-nav__ico { color: var(--primary) !important; }
html[data-theme="light"] .acc-nav__item.is-active .acc-nav__ico { color: #FFFFFF !important; }
html[data-theme="light"] .acc-hero {
  background: linear-gradient(135deg, #FFFFFF 0%, #F0E8F8 55%, #E4D6F2 100%) !important;
  color: var(--text-strong) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="light"] .acc-hero h1,
html[data-theme="light"] .acc-hero__kicker { color: var(--text-strong) !important; }
html[data-theme="light"] .acc-hero__sub { color: var(--muted) !important; }
html[data-theme="light"] .acc-hero__kicker { color: var(--primary) !important; }
html[data-theme="light"] .acc-journey__step {
  background: #FFFFFF !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="light"] .acc-journey__num { color: var(--primary) !important; }
html[data-theme="light"] .acc-journey__label { color: var(--text-strong) !important; }
html[data-theme="light"] .acc-journey__hint { color: var(--muted) !important; }
html[data-theme="light"] .acc-companion h3,
html[data-theme="light"] .acc-stat__val,
html[data-theme="light"] .acc-card__title,
html[data-theme="light"] .acc-card h2 {
  color: var(--text-strong) !important;
}
html[data-theme="light"] .acc-companion p,
html[data-theme="light"] .acc-stat__lbl { color: var(--muted) !important; }
html[data-theme="light"] .acc-stat__ico {
  background: var(--accent-light) !important;
  color: var(--primary) !important;
}

/* ========== DARK MODE ========== */
html[data-theme="dark"] .chem-hdr {
  background: var(--hdr-bg) !important;
  color: #FFFFFF !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45) !important;
  border-bottom: 1px solid var(--hdr-border);
}
html[data-theme="dark"] .chem-hdr__strip {
  background: var(--hdr-strip-bg) !important;
  color: var(--hdr-strip-text) !important;
  border-bottom: 1px solid rgba(232, 213, 248, 0.1) !important;
}
html[data-theme="dark"] .chem-hdr__brand,
html[data-theme="dark"] .chem-hdr__name,
html[data-theme="dark"] .chem-hdr__link { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-hdr__tag { color: #CDBFE0 !important; }
html[data-theme="dark"] .chem-hdr__link:hover { background: rgba(192, 132, 252, 0.15) !important; }
html[data-theme="dark"] .chem-hdr__logoFallback {
  background: rgba(192, 132, 252, 0.18) !important;
  color: #E9D8F8 !important;
}
html[data-theme="dark"] .chem-hdr__burger { border-color: rgba(255, 255, 255, 0.25) !important; }
html[data-theme="dark"] .chem-hdr__burger span { background: #FFFFFF !important; }
html[data-theme="dark"] .chem-hdr__drawer {
  background: #0B0614 !important;
  border-top: 1px solid rgba(232, 213, 248, 0.12) !important;
}

html[data-theme="dark"] .chem-hero {
  background: var(--hero-bg) !important;
  color: #FFFFFF !important;
  border-bottom: 0;
}
html[data-theme="dark"] .chem-hero__brand,
html[data-theme="dark"] .chem-hero__photoCapAr { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-hero__enLine,
html[data-theme="dark"] .chem-hero__teacher,
html[data-theme="dark"] .chem-hero__photoCapEn {
  color: #E9D8F8 !important;
  font-weight: 700;
}
html[data-theme="dark"] .chem-hero__desc {
  color: #E0D4F0 !important;
  font-weight: 500;
}
html[data-theme="dark"] .chem-hero__mols { color: rgba(232, 213, 248, 0.22) !important; }
html[data-theme="dark"] .chem-hero__orbits i { border-color: rgba(232, 213, 248, 0.14) !important; }
html[data-theme="dark"] .chem-hero__photoCap {
  background: linear-gradient(transparent, rgba(11, 6, 20, 0.92)) !important;
}
html[data-theme="dark"] .chem-hero .chem-btn--outline {
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}
html[data-theme="dark"] .chem-hero .chem-btn--solid {
  background: linear-gradient(135deg, #A855F7, #7C3AED) !important;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .chem-path,
html[data-theme="dark"] .chem-features,
html[data-theme="dark"] .chem-cta,
html[data-theme="dark"] .chem-stats { background: var(--section-bg) !important; }
html[data-theme="dark"] .chem-axes,
html[data-theme="dark"] .chem-grades { background: var(--section-alt-bg) !important; }

html[data-theme="dark"] .chem-path__step,
html[data-theme="dark"] .chem-feature,
html[data-theme="dark"] .chem-grade,
html[data-theme="dark"] .chem-axes__list li,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .auth-formPane {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .chem-path__label,
html[data-theme="dark"] .chem-feature__title,
html[data-theme="dark"] .chem-grade__name,
html[data-theme="dark"] .chem-axes__list b,
html[data-theme="dark"] .chem-section__title,
html[data-theme="dark"] .auth-head__title {
  color: #FFFFFF !important;
}
html[data-theme="dark"] .chem-path__hint,
html[data-theme="dark"] .chem-feature__text,
html[data-theme="dark"] .chem-grade__hint,
html[data-theme="dark"] .chem-axes__list em,
html[data-theme="dark"] .chem-section__sub,
html[data-theme="dark"] .auth-head__sub,
html[data-theme="dark"] .label {
  color: #E8DCF5 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .chem-path__num,
html[data-theme="dark"] .chem-grade__cta,
html[data-theme="dark"] .chem-section__kicker,
html[data-theme="dark"] .chem-feature__z,
html[data-theme="dark"] .chem-path__sym,
html[data-theme="dark"] .auth-link {
  color: #E9D8F8 !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .chem-axes__el,
html[data-theme="dark"] .chem-axes__el strong,
html[data-theme="dark"] .chem-axes__el small {
  color: #FFFFFF !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .chem-grade__media {
  background: #1A1028 !important;
}
html[data-theme="dark"] .chem-grade__media img {
  object-fit: contain !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .chem-feature__sym {
  color: rgba(232, 213, 248, 0.22) !important;
}
html[data-theme="dark"] .chem-path__step {
  background: #1A1028 !important;
}
html[data-theme="dark"] .chem-path__step.is-active,
html[data-theme="dark"] .chem-path__step:hover {
  border-color: #C084FC !important;
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.25) !important;
}
html[data-theme="dark"] .chem-feature__sym {
  color: rgba(192, 132, 252, 0.12) !important;
}
html[data-theme="dark"] .chem-feature__mark {
  background: #3B1764 !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .chem-axes__el {
  background: linear-gradient(145deg, #3B1764, #7C3AED) !important;
}

html[data-theme="dark"] .chem-stat {
  background: linear-gradient(160deg, #1A0B2E, #5B21B6) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(192, 132, 252, 0.25);
}
html[data-theme="dark"] .chem-stat__val { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-stat__lbl { color: #E9D8F8 !important; }

html[data-theme="dark"] .chem-cta__box {
  background: linear-gradient(135deg, #1A0B2E 0%, #6D28D9 55%, #A855F7 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.25);
}
html[data-theme="dark"] .chem-cta__title,
html[data-theme="dark"] .chem-cta__kicker { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-cta__sub { color: #F3E8FF !important; }
html[data-theme="dark"] .chem-cta .chem-btn--solid {
  background: #FFFFFF !important;
  color: #1A0B2E !important;
}

/* Footer — DARK: ليل بنفسجي مضيء */
html[data-theme="dark"] .chem-ft {
  background: linear-gradient(180deg, #12081F 0%, #0B0614 55%, #06030C 100%) !important;
  color: #FFFFFF !important;
  border-top: 1px solid rgba(192, 132, 252, 0.28);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .chem-ft__topbar {
  background: #1A0B2E !important;
  color: #E9D8F8 !important;
  border-bottom: 1px solid rgba(192, 132, 252, 0.22);
}
html[data-theme="dark"] .chem-ft__topbar em { color: #C084FC !important; }
html[data-theme="dark"] .chem-ft__logoWrap {
  background: #0B0614 !important;
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.2);
}
html[data-theme="dark"] .chem-ft__platform { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-ft__subject { color: #E9D8F8 !important; }
html[data-theme="dark"] .chem-ft__tag { color: #F0E8FA !important; }
html[data-theme="dark"] .chem-ft__heading { color: #FFFFFF !important; }
html[data-theme="dark"] .chem-ft__heading::after { background: #C084FC !important; }
html[data-theme="dark"] .chem-ft__nav a,
html[data-theme="dark"] .chem-ft__socialLink,
html[data-theme="dark"] .chem-ft__phone,
html[data-theme="dark"] .chem-ft__socialLbl {
  color: #F3E8FF !important;
}
html[data-theme="dark"] .chem-ft__nav a:hover,
html[data-theme="dark"] .chem-ft__socialLink:hover,
html[data-theme="dark"] .chem-ft__phone:hover {
  color: #FFFFFF !important;
}
html[data-theme="dark"] .chem-ft__socialIco,
html[data-theme="dark"] .chem-ft__phoneIco {
  background: rgba(192, 132, 252, 0.14) !important;
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #E9D8F8 !important;
}
html[data-theme="dark"] .chem-ft__bottom {
  border-top: 1px solid rgba(192, 132, 252, 0.22) !important;
  color: #E8DCF5 !important;
}
html[data-theme="dark"] .chem-ft__rights,
html[data-theme="dark"] .chem-ft__dev {
  color: #E8DCF5 !important;
}

html[data-theme="dark"] .auth-imgPane {
  background: linear-gradient(155deg, #0B0614 0%, #1A0B2E 45%, #5B21B6 100%) !important;
}
html[data-theme="dark"] .auth-imgPane__brand {
  background: linear-gradient(transparent, rgba(11, 6, 20, 0.95)) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .auth-imgPane__brand strong { color: #FFFFFF !important; }
html[data-theme="dark"] .auth-imgPane__brand span { color: #E9D8F8 !important; }
html[data-theme="dark"] .auth-imgFallback { color: #E9D8F8 !important; }
html[data-theme="dark"] .auth-imgFallback__hero { color: #C084FC !important; }
html[data-theme="dark"] .btn-submit {
  background: linear-gradient(135deg, #A855F7, #7C3AED) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .input,
html[data-theme="dark"] .auth-form .input {
  background: #140C22 !important;
  color: #F7F2FC !important;
  border-color: rgba(232, 213, 248, 0.22) !important;
}

/* Account dark — completely different from light */
html[data-theme="dark"] body.chem-lab,
html[data-theme="dark"] body.chemistry-pro,
html[data-theme="dark"] body.chem-lab.student-no-header,
html[data-theme="dark"] body.chemistry-pro.student-no-header {
  background: #0B0614 !important;
  color: #F7F2FC !important;
}
html[data-theme="dark"] .acc-topbar__bar {
  background: linear-gradient(135deg, #12081F 0%, #1A0B2E 50%, #2E1065 100%) !important;
  border: 1px solid rgba(192, 132, 252, 0.25) !important;
  color: #FFFFFF !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] .acc-brand,
html[data-theme="dark"] .acc-brand__name { color: #FFFFFF !important; }
html[data-theme="dark"] .acc-brand__sub { color: #D8B4FE !important; }
html[data-theme="dark"] .acc-student {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-student__ico { color: #E9D8F8 !important; }
html[data-theme="dark"] .acc-pill {
  background: #C084FC !important;
  color: #0B0614 !important;
}
html[data-theme="dark"] .acc-pill__ico { color: #0B0614 !important; }
html[data-theme="dark"] .acc-bell {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-burger span { background: #FFFFFF !important; }
html[data-theme="dark"] .acc-sidebar,
html[data-theme="dark"] .acc-card,
html[data-theme="dark"] .acc-stat,
html[data-theme="dark"] .acc-companion,
html[data-theme="dark"] .acc-notifs,
html[data-theme="dark"] .acc-assess-card,
html[data-theme="dark"] .acc-feedCard,
html[data-theme="dark"] .acc-chatCard,
html[data-theme="dark"] .wallet-summary__card,
html[data-theme="dark"] .wallet-history__item,
html[data-theme="dark"] .acc-courseHero,
html[data-theme="dark"] .acc-lecHero,
html[data-theme="dark"] .redeem-card,
html[data-theme="dark"] .as-q {
  background: #1A1028 !important;
  border-color: rgba(232, 213, 248, 0.14) !important;
  color: #F7F2FC !important;
}
html[data-theme="dark"] .acc-nav__item { color: #F7F2FC !important; }
html[data-theme="dark"] .acc-nav__item:hover {
  background: rgba(192, 132, 252, 0.12) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-nav__item.is-active {
  background: linear-gradient(135deg, #7C3AED, #A855F7) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-nav__ico { color: #C084FC !important; }
html[data-theme="dark"] .acc-nav__item.is-active .acc-nav__ico { color: #FFFFFF !important; }
html[data-theme="dark"] .acc-nav__lbl { color: inherit !important; opacity: 1 !important; }
html[data-theme="dark"] .acc-hero {
  background: linear-gradient(135deg, #12081F 0%, #2E1065 50%, #6D28D9 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] .acc-hero h1,
html[data-theme="dark"] .acc-hero__kicker { color: #FFFFFF !important; }
html[data-theme="dark"] .acc-hero__sub { color: #E9D8F8 !important; }
html[data-theme="dark"] .acc-journey__step {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-journey__num { color: #E9D8F8 !important; }
html[data-theme="dark"] .acc-journey__label { color: #FFFFFF !important; }
html[data-theme="dark"] .acc-journey__hint { color: #CDBFE0 !important; }
html[data-theme="dark"] .acc-companion h3,
html[data-theme="dark"] .acc-stat__val,
html[data-theme="dark"] .acc-card__title,
html[data-theme="dark"] .acc-card h2,
html[data-theme="dark"] .wallet-summary__value,
html[data-theme="dark"] .wallet-history__title {
  color: #FFFFFF !important;
}
html[data-theme="dark"] .acc-companion p,
html[data-theme="dark"] .acc-stat__lbl,
html[data-theme="dark"] .wallet-summary__label,
html[data-theme="dark"] .wallet-history__meta {
  color: #CDBFE0 !important;
}
html[data-theme="dark"] .acc-stat__ico {
  background: rgba(192, 132, 252, 0.16) !important;
  color: #C084FC !important;
}
html[data-theme="dark"] .acc-btn--primary,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .acc-modal-btn--primary,
html[data-theme="dark"] .ui-btn--success {
  background: linear-gradient(135deg, #A855F7, #7C3AED) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .ass-hero {
  background: linear-gradient(135deg, #12081F, #6D28D9) !important;
  color: #FFFFFF !important;
}
html[data-theme="dark"] .ass-brand,
html[data-theme="dark"] .ass-brand span { color: #F7F2FC !important; }
html[data-theme="dark"] .acc-main .input,
html[data-theme="dark"] .acc-main input,
html[data-theme="dark"] .acc-main select,
html[data-theme="dark"] .acc-main textarea,
html[data-theme="dark"] .acc-commentForm textarea,
html[data-theme="dark"] .acc-chatSend textarea {
  background: #140C22 !important;
  color: #F7F2FC !important;
  border-color: rgba(232, 213, 248, 0.22) !important;
}

/* Mobile sidebar readability both modes */
@media (max-width: 980px) {
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar,
  html[data-theme="light"] .acc-sidebar.is-open {
    background: #FFFFFF !important;
    color: #1C1228 !important;
    border-color: rgba(20, 8, 34, 0.12) !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__item,
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar .acc-nav__item {
    color: #1C1228 !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__lbl,
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar .acc-nav__lbl {
    color: #1C1228 !important;
    opacity: 1 !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__ico,
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar .acc-nav__ico {
    color: #5B2C8A !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__item.is-active,
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar .acc-nav__item.is-active {
    background: linear-gradient(135deg, #2B1248, #5B2C8A) !important;
    color: #FFFFFF !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__item.is-active .acc-nav__lbl {
    color: #FFFFFF !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__item.is-danger,
  html[data-theme="light"] body:has(#accSideNavToggle:checked) .acc-sidebar .acc-nav__item.is-danger {
    color: #8F1D18 !important;
    background: rgba(192, 57, 43, 0.12) !important;
    border-color: rgba(192, 57, 43, 0.28) !important;
  }
  html[data-theme="light"] .acc-sidebar.is-open .acc-nav__item.is-danger .acc-nav__lbl {
    color: #8F1D18 !important;
  }

  html[data-theme="dark"] body:has(#accSideNavToggle:checked) .acc-sidebar,
  html[data-theme="dark"] .acc-sidebar.is-open {
    background: #1A1028 !important;
    color: #F7F2FC !important;
    border-color: rgba(232, 213, 248, 0.14) !important;
  }
  html[data-theme="dark"] .acc-sidebar.is-open .acc-nav__item { color: #F7F2FC !important; }
  html[data-theme="dark"] .acc-sidebar.is-open .acc-nav__lbl { color: #F7F2FC !important; opacity: 1 !important; }
  html[data-theme="dark"] .acc-sidebar.is-open .acc-nav__ico,
  html[data-theme="dark"] .acc-sidebar.is-open .acc-nav__ico svg {
    color: #C084FC !important;
    stroke: currentColor !important;
  }
}

/* Atmosphere adapts */
html[data-theme="light"] .chem-bg__floats span { color: rgba(91, 44, 138, 0.16) !important; }
html[data-theme="dark"] .chem-bg__floats span { color: rgba(192, 132, 252, 0.22) !important; }
html[data-theme="dark"] .chem-bg__hex path { stroke: rgba(192, 132, 252, 0.14) !important; }
html[data-theme="light"] .chem-lab-decor { color: rgba(91, 44, 138, 0.10) !important; }
html[data-theme="dark"] .chem-lab-decor { color: rgba(192, 132, 252, 0.14) !important; }

html[data-theme="dark"] .acc-lectureCover,
html[data-theme="dark"] .acc-courseHero__media,
html[data-theme="dark"] .mp-pathItem__cover {
  background: #12081c !important;
  border-color: rgba(192, 132, 252, 0.18) !important;
}
html[data-theme="dark"] .acc-lectureCover__img,
html[data-theme="dark"] .acc-courseHero__img,
html[data-theme="dark"] .mp-pathItem__coverImg {
  object-fit: contain !important;
}
