/* Account-service errors stay visible without discarding a valid session. */
.auth-service-notice { position: fixed; top: 12px; inset-inline: 12px; z-index: 20000; max-width: 700px; margin-inline: auto; padding: 16px; border: 1px solid #efca8c; border-radius: 14px; background: #fff7e8; color: #613b14; box-shadow: 0 8px 28px #16305e22; line-height: 1.8; font-size: 14px; overflow-wrap: anywhere; }
.auth-service-notice button { margin-inline-start: 10px; padding: 5px 14px; border-radius: 8px; background: #16305e; color: #fff; }
.teacher-telegram-link { display: inline-block; margin-block: 14px; padding: 12px 18px; border-radius: 12px; background: #16305e; color: #fff; font-weight: 700; text-decoration: none; }
.teacher-telegram-link:focus-visible, .auth-service-notice button:focus-visible { outline: 3px solid #f4791f; outline-offset: 3px; }
.sp-resume-status { padding: 8px 12px; color: #fff; background: #16305ee6; border-radius: 8px; font-size: 12px; line-height: 1.7; }
/* Shared math: isolate LTR equations without changing Arabic paragraph direction. */
.physics-math { display: inline-block; max-width: 100%; vertical-align: middle; direction: ltr; unicode-bidi: isolate; overflow-x: auto; overflow-y: hidden; padding: .2em .12em; }
.physics-math-block { display: block; text-align: center; margin: .5em 0; }
.physics-math .katex { font-size: 1.08em; text-align: left; white-space: nowrap; }
.physics-math-fallback { white-space: pre-wrap; overflow-wrap: anywhere; }
#qmCheckpoints > div { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0; }
#engineModels .ai-model-row { flex-wrap: wrap; gap: .5rem; }
#engineModels .ai-model-pick { min-width: 0; overflow-wrap: anywhere; }
/* ============ Super Physics – Landing Page v2 (Mobile First) ============ */
:root {
  --navy: #16305e;
  --navy-dark: #0e2247;
  --orange: #f4791f;
  --orange-light: #ff9440;
}

* { font-family: 'Cairo', 'Tajawal', sans-serif; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: #ffffff; }

/* ---- Physics doodle background (subtle) ---- */
.physics-bg {
  position: relative;
}
.physics-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22,48,94,.05) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* ---- Buttons ---- */
.btn-orange {
  background: linear-gradient(135deg, var(--orange), #e2670e);
  color: #fff;
  transition: all .25s;
  box-shadow: 0 6px 18px rgba(244,121,31,.30);
}
.btn-orange:active { transform: scale(.96); }
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(244,121,31,.42); }

.btn-navy {
  background: linear-gradient(135deg, #1e3f7a, var(--navy));
  color: #fff;
  transition: all .25s;
  box-shadow: 0 6px 18px rgba(22,48,94,.25);
}
.btn-navy:active { transform: scale(.96); }
.btn-navy:hover { transform: translateY(-2px); }

/* ---- Skeleton loading (shimmer) ---- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 1rem;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
/* swap: while loading show skeleton, hide real content */
.swap-wrap .real { display: none; }
.swap-wrap.loaded .real { display: flex; animation: pop-in .45s cubic-bezier(.2,.9,.3,1.2); }
.swap-wrap.loaded .skeleton { display: none; }
@keyframes pop-in {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---- Hero ---- */
.hero-ring {
  background: radial-gradient(circle at 32% 28%, var(--orange-light), var(--orange) 62%, #d0640f);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(244,121,31,.12), 0 0 0 26px rgba(244,121,31,.06), 0 24px 50px rgba(244,121,31,.28);
}
.float-icon { position: absolute; animation: floaty 5s ease-in-out infinite; }
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-13px) rotate(7deg); }
}

/* 3D logo gentle float */
.logo3d-float { animation: logo-float 4.5s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(22,48,94,.18)); }
@keyframes logo-float {
  0%,100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

/* ---- Horizontal scroll (courses) ---- */
.h-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: .5rem .25rem 1.25rem;
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * {
  scroll-snap-align: center;
  flex: 0 0 84%;
  max-width: 340px;
}
@media (min-width: 640px) { .h-scroll > * { flex-basis: 46%; } }
@media (min-width: 1024px) { .h-scroll > * { flex-basis: 31%; } }

/* fade edges to hint scrolling */
.h-scroll-wrap { position: relative; }
.h-scroll-wrap::before,
.h-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 44px;
  z-index: 2;
  pointer-events: none;
}
.h-scroll-wrap::before { right: 0; background: linear-gradient(270deg, #fff 15%, transparent); }
.h-scroll-wrap::after { left: 0; background: linear-gradient(90deg, #fff 15%, transparent); }

/* scroll dots */
.scroll-dots { display: flex; justify-content: center; gap: 6px; }
.scroll-dots span {
  width: 8px; height: 8px; border-radius: 99px;
  background: #d1d5db; transition: all .3s;
}
.scroll-dots span.active { width: 22px; background: var(--orange); }

/* ---- Cards ---- */
.card-hover { transition: all .3s; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 18px 38px rgba(22,48,94,.13); }

/* ---- Section title ---- */
.section-title { position: relative; display: inline-block; }
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 0;
  width: 55%;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--orange), transparent);
}

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(26px); transition: all .65s cubic-bezier(.2,.7,.3,1); }
.reveal.show, .reveal.visible { opacity: 1; transform: none; }

/* ---- Toast ---- */
#toast {
  position: fixed;
  bottom: 24px;
  right: 50%;
  transform: translate(50%, 130px);
  z-index: 9999;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
  width: max-content;
  max-width: 92vw;
}
#toast.visible { transform: translate(50%, 0); }

/* ---- Marquee ---- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-inner { display: inline-block; animation: marquee 22s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---- WhatsApp 3D furry float : كورة حقيقية بفيزياء نط + سكواش + ظل أرضي ---- */
.wa-float {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 50;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 86px;
  height: 104px;
  -webkit-tap-highlight-color: transparent;
}
.wa-ball {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 74px;
  height: 74px;
  margin-left: -37px;
  display: block;
  transform-origin: 50% 100%;
  animation: wa-bounce 2.6s cubic-bezier(.4,0,.6,1) infinite;
  will-change: transform;
}
.wa-ball img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 6px 8px rgba(20,90,50,.35));
}
/* لمعة ضوء بتلف على سطح الكورة عشان تحس بالحجم */
.wa-gloss {
  position: absolute;
  top: 8%;
  left: 16%;
  width: 34%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%);
  pointer-events: none;
  mix-blend-mode: screen;
}
/* الظل الأرضي: بيكبر ويغمق لما الكورة تنزل وبيصغر ويهرب لما تطلع */
.wa-shadow {
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 58px;
  height: 12px;
  margin-left: -29px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(10,40,25,.38) 0%, rgba(10,40,25,.18) 45%, rgba(10,40,25,0) 72%);
  animation: wa-shadow 2.6s cubic-bezier(.4,0,.6,1) infinite;
  will-change: transform, opacity;
  pointer-events: none;
}
/* v17 F4: شارة الـ 1 اتشالت */
/* نطة حقيقية: طيران بطيء فوق، سقوط متسارع، سكواش عند الارتطام، ارتداد */
@keyframes wa-bounce {
  0%    { transform: translateY(0) scale(1.12, .82); }        /* لحظة الارتطام: مفلطحة */
  8%    { transform: translateY(-6px) scale(.94, 1.08); }     /* بتشد نفسها وهي طالعة */
  30%   { transform: translateY(-26px) scale(1, 1); }
  45%   { transform: translateY(-32px) scale(1.02, .98) rotate(3deg); }  /* قمة النطة: بطيئة */
  60%   { transform: translateY(-26px) scale(1, 1) rotate(0deg); }
  88%   { transform: translateY(-3px) scale(.96, 1.06); }     /* بتستطيل وهي ساقطة بسرعة */
  100%  { transform: translateY(0) scale(1.12, .82); }
}
@keyframes wa-shadow {
  0%    { transform: scale(1.15); opacity: 1; }
  45%   { transform: scale(.55); opacity: .35; }
  100%  { transform: scale(1.15); opacity: 1; }
}

/* لما تدوس: الكورة تتزنق في الأرض بجد */
.wa-float:active .wa-ball { animation-play-state: paused; transform: translateY(2px) scale(1.2, .72); transition: transform .1s; }
.wa-float:active .wa-shadow { animation-play-state: paused; transform: scale(1.3); opacity: 1; transition: all .1s; }

/* ---- بانر الخصم + العداد التنازلي ---- */
.offer-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #16305e, #1e3f7a);
  color: #fff;
  border-radius: 20px;
  padding: 14px 18px;
  box-shadow: 0 14px 34px rgba(22,48,94,.22);
  position: relative;
  overflow: hidden;
}
.offer-banner::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 55%;
  height: 180%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.09), transparent);
  transform: rotate(12deg);
  animation: offer-sheen 3.5s ease-in-out infinite;
}
@keyframes offer-sheen {
  0%, 60% { left: -30%; }
  100% { left: 110%; }
}
.offer-fire {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4791f, #ff9d4d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(244,121,31,.4);
  animation: fire-flick 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes fire-flick {
  0%, 100% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.08) rotate(3deg); }
}
.countdown { display: flex; align-items: center; gap: 4px; }
.cd-box {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 6px 4px 4px;
  min-width: 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.cd-box b { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cd-box i { font-style: normal; font-size: 9px; font-weight: 800; opacity: .7; margin-top: 2px; }
.cd-sep { font-weight: 900; opacity: .5; }
.cd-sec b { color: #ffb36b; animation: sec-tick 1s steps(1) infinite; }
@keyframes sec-tick { 0% { opacity: 1; } 50% { opacity: .55; } }

/* ---- أغلفة الكورسات بصورة المستر ---- */
.course-cover {
  position: relative;
  height: 176px;
  overflow: hidden;
  display: flex;
}
.course-cover-text {
  position: relative;
  z-index: 2;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: #fff;
  max-width: 58%;
}
.course-cover-text strong {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.course-grade {
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(4px);
}
.course-teacher {
  position: absolute;
  bottom: 0;
  left: 4px;
  height: 168px;
  width: auto;
  z-index: 1;
  filter: drop-shadow(-6px 6px 12px rgba(0,0,0,.35));
}
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  animation: badge-wiggle 2.4s ease-in-out infinite;
}
.free-badge { background: linear-gradient(135deg, #059669, #10b981); }
@keyframes badge-wiggle {
  0%, 88%, 100% { transform: rotate(0); }
  91% { transform: rotate(-6deg); }
  94% { transform: rotate(5deg); }
  97% { transform: rotate(-3deg); }
}

/* ---- الأسعار ---- */
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-old {
  color: #b0bcce;
  font-weight: 800;
  font-size: 14px;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 2px;
}
.price-new { color: #f4791f; font-weight: 900; font-size: 26px; line-height: 1; }
.price-new small { font-size: 12px; font-weight: 800; color: #93a1b5; }
.save-chip {
  background: rgba(16,185,129,.15);
  color: #34d399;
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 4px 10px;
}

/* mobile menu */
#mobileMenu { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
#mobileMenu.open { max-height: 460px; }

/* formula chips floating in hero */
.formula-chip {
  position: absolute;
  background: #fff;
  border: 1.5px solid #eef1f6;
  box-shadow: 0 8px 22px rgba(22,48,94,.10);
  border-radius: 14px;
  padding: 6px 12px;
  font-weight: 900;
  font-size: 13px;
  color: var(--navy);
  animation: floaty 6s ease-in-out infinite;
  z-index: 20;
  direction: ltr;
}
.formula-chip b { color: var(--orange); }

/* ============================================================
   ========== v4: منصة الامتحانات - إضافات جديدة ==========
   ============================================================ */

/* ---- أيقونات متحركة في كل الموقع ---- */
.icon-anim { display: inline-flex; animation: icon-float 3s ease-in-out infinite; }
@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.icon-pulse { animation: icon-pulse 2s ease-in-out infinite; }
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}
.icon-swing { animation: icon-swing 2.6s ease-in-out infinite; transform-origin: top center; }
@keyframes icon-swing {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}
.icon-ring { animation: icon-ring 3s ease-in-out infinite; transform-origin: 50% 4px; }
@keyframes icon-ring {
  0%, 60%, 100% { transform: rotate(0); }
  64% { transform: rotate(-14deg); }
  68% { transform: rotate(12deg); }
  72% { transform: rotate(-9deg); }
  76% { transform: rotate(6deg); }
  80% { transform: rotate(0); }
}
.icon-spin-slow { animation: atom-spin 8s linear infinite; }
.icon-beat { animation: icon-beat 1.6s ease-in-out infinite; }
@keyframes icon-beat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.22); }
  20% { transform: scale(1); }
  30% { transform: scale(1.14); }
}
.icon-wobble { animation: badge-wiggle 3s ease-in-out infinite; }
.icon-bounce-x { animation: icon-bounce-x 1.4s ease-in-out infinite; }
@keyframes icon-bounce-x {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

/* ---- شعار المستر 3D (بدون أي إطار أو خلفية) ---- */
.brand-logo {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  perspective: 300px;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: brand-logo-3d 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(22,48,94,.35)) drop-shadow(0 2px 3px rgba(244,121,31,.25));
  transform-style: preserve-3d;
}
.brand-logo.on-dark img {
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)) drop-shadow(0 0 14px rgba(244,121,31,.35));
}
@keyframes brand-logo-3d {
  0%, 100% { transform: translateY(0) rotateY(-10deg); }
  50% { transform: translateY(-4px) rotateY(10deg); }
}
.brand-logo.brand-logo-lg { width: 72px; height: 72px; }
.brand-logo.brand-logo-xl { width: 110px; height: 110px; }

/* ---- إطارات الفيديوهات ---- */
.video-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(22,48,94,.22);
  border: 3px solid #fff;
  outline: 1px solid rgba(22,48,94,.08);
  background: #0b1c3c;
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-frame .video-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(14,34,71,.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.video-frame .video-tag i { color: #ffb36b; }

/* فيديو الهيرو داخل حلقة */
.hero-video-chip {
  position: absolute;
  z-index: 20;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 14px 34px rgba(22,48,94,.3), 0 0 0 3px rgba(244,121,31,.35);
  animation: floaty 6s ease-in-out infinite;
}
.hero-video-chip video { width: 100%; height: 100%; object-fit: cover; }

/* فيديو عمودي داخل إطار موبايل */
.phone-mock {
  position: relative;
  width: min(250px, 68vw);
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #1e3f7a, #0e2247);
  box-shadow: 0 28px 60px rgba(14,34,71,.4), inset 0 1px 2px rgba(255,255,255,.2);
  margin: 0 auto;
}
.phone-mock::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 20px;
  background: #0e2247;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone-mock video {
  display: block;
  width: 100%;
  border-radius: 26px;
  aspect-ratio: 720 / 1365;
  object-fit: cover;
}
.phone-mock .phone-btn { 
  position: absolute;
  right: -3px;
  top: 90px;
  width: 3px;
  height: 54px;
  border-radius: 3px;
  background: #2a4a85;
}

/* شريط الفيديو العريض (فواصل بين السكاشن) */
.video-banner {
  position: relative;
  overflow: hidden;
}
.video-banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-banner .video-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,34,71,.82), rgba(14,34,71,.6) 50%, rgba(14,34,71,.85));
}

/* ============================================================
   ========== v4: صفحة تسجيل الدخول / التسجيل الجديد ==========
   ============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(244,121,31,.14), transparent),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(30,63,122,.18), transparent),
    linear-gradient(160deg, #0e2247, #16305e 55%, #1e3f7a);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1.5px, transparent 1.5px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* v9: كارت واحد متمركز — مفيش جانب ترحيبي */
.auth-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 90px rgba(5,15,40,.5);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .auth-shell { max-width: 520px; }
}

/* ---- الجانب الترحيبي: فيديو رأسي يملأ الجانب بالكامل ---- */
.auth-welcome {
  position: relative;
  background: #0e2247;
  color: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  overflow: hidden;
  min-height: 260px;
}
.auth-welcome-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}
.auth-welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,34,71,.35), transparent 40%, rgba(8,20,45,.88));
}
@media (min-width: 900px) {
  .auth-welcome { padding: 32px 28px; }
}
.auth-welcome > * { position: relative; z-index: 2; }
.auth-welcome-title {
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 900;
  margin-top: 8px;
  text-shadow: 0 4px 18px rgba(0,0,0,.6);
}
.auth-welcome-sub {
  color: #dbe5f7;
  font-weight: 700;
  font-size: 12.5px;
  margin-top: 6px;
  max-width: 270px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
/* سويتش نص الترحيب مع الأنيميشن */
.auth-welcome-swap { position: relative; width: 100%; }
.auth-welcome-swap .aw-mode { transition: opacity .45s ease, transform .45s ease; }
.auth-welcome-swap .aw-mode.aw-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  pointer-events: none;
}

/* ---- جانب الفورم ---- */
.auth-form-side { padding: 28px 22px 30px; display: flex; flex-direction: column; }
@media (min-width: 640px) { .auth-form-side { padding: 36px 36px 34px; } }

/* التاب سويتشر */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eef2f8;
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 22px;
}
.auth-tab {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  color: #6b7a90;
  padding: 11px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: color .35s;
}
.auth-tab.active { color: #fff; }
.auth-tab-pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: 5px;
  width: calc(50% - 5px);
  border-radius: 12px;
  background: linear-gradient(135deg, #f4791f, #e2670e);
  box-shadow: 0 6px 16px rgba(244,121,31,.35);
  transition: transform .45s cubic-bezier(.3,.9,.3,1.1);
  z-index: 1;
}
.auth-tabs[data-mode="register"] .auth-tab-pill { transform: translateX(calc(-100% - 0px)); }

/* حاوية الفورمين مع الانيميشن */
.auth-forms { position: relative; flex: 1; }
.auth-form { transition: opacity .4s ease, transform .4s ease; }
.auth-form.form-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(-26px);
  pointer-events: none;
  visibility: hidden;
}
.auth-form.form-enter-rtl { animation: form-slide-rtl .5s cubic-bezier(.2,.8,.3,1); }
.auth-form.form-enter-ltr { animation: form-slide-ltr .5s cubic-bezier(.2,.8,.3,1); }
@keyframes form-slide-rtl {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}
@keyframes form-slide-ltr {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: none; }
}

/* ظهور الحقول واحد ورا التاني */
.auth-form .field-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: field-in .55s cubic-bezier(.2,.8,.3,1) forwards;
}
.auth-form .field-anim:nth-child(1) { animation-delay: .08s; }
.auth-form .field-anim:nth-child(2) { animation-delay: .16s; }
.auth-form .field-anim:nth-child(3) { animation-delay: .24s; }
.auth-form .field-anim:nth-child(4) { animation-delay: .32s; }
.auth-form .field-anim:nth-child(5) { animation-delay: .40s; }
.auth-form .field-anim:nth-child(6) { animation-delay: .48s; }
.auth-form .field-anim:nth-child(7) { animation-delay: .56s; }
.auth-form .field-anim:nth-child(8) { animation-delay: .64s; }
@keyframes field-in {
  to { opacity: 1; transform: none; }
}

/* ---- الحقول ---- */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  color: #16305e;
  margin-bottom: 6px;
}
.field-box { position: relative; }
.field-box .field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8bc;
  font-size: 14px;
  transition: color .25s;
  pointer-events: none;
}
.field-input {
  width: 100%;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #16305e;
  background: #f5f7fb;
  border: 2px solid #e6ebf3;
  border-radius: 14px;
  padding: 12px 42px 12px 14px;
  outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field-input::placeholder { color: #a8b4c6; font-weight: 600; }
.field-input:focus {
  border-color: #f4791f;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244,121,31,.12);
}
.field-box:focus-within .field-icon { color: #f4791f; }
select.field-input { appearance: none; cursor: pointer; }
.field-box .select-arrow {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8bc;
  font-size: 12px;
  pointer-events: none;
}
/* زر إظهار كلمة المرور */
.eye-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #9aa8bc;
  cursor: pointer;
  font-size: 14px;
  padding: 6px;
  transition: color .2s;
}
.eye-btn:hover { color: #16305e; }

/* ---- مؤشر قوة كلمة المرور ---- */
.pw-meter {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s ease, opacity .4s ease, margin .4s ease;
  margin-top: 0;
}
.pw-meter.show { max-height: 60px; opacity: 1; margin-top: 8px; }
.pw-bars { display: flex; gap: 5px; }
.pw-bar {
  height: 6px;
  flex: 1;
  border-radius: 99px;
  background: #e6ebf3;
  transition: background .35s;
}
.pw-meter[data-level="1"] .pw-bar:nth-child(-n+1) { background: #ef4444; }
.pw-meter[data-level="2"] .pw-bar:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] .pw-bar:nth-child(-n+3) { background: #eab308; }
.pw-meter[data-level="4"] .pw-bar:nth-child(-n+4) { background: #22c55e; }
.pw-label { font-size: 11px; font-weight: 900; margin-top: 5px; color: #9aa8bc; }
.pw-meter[data-level="1"] .pw-label { color: #ef4444; }
.pw-meter[data-level="2"] .pw-label { color: #f59e0b; }
.pw-meter[data-level="3"] .pw-label { color: #ca8a04; }
.pw-meter[data-level="4"] .pw-label { color: #16a34a; }

/* تطابق كلمة المرور */
.pw-match { font-size: 11px; font-weight: 900; margin-top: 6px; display: none; }
.pw-match.ok { display: block; color: #16a34a; }
.pw-match.no { display: block; color: #ef4444; }

/* زر الإرسال */
.auth-submit {
  width: 100%;
  border: none;
  font-family: inherit;
  background: linear-gradient(135deg, #f4791f, #e2670e);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(244,121,31,.35);
  transition: transform .25s, box-shadow .25s;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(244,121,31,.45); }
.auth-submit:active { transform: scale(.97); }

/* موبايل: الكارت يملأ العرض براحة */
@media (max-width: 899px) {
  .auth-shell { max-width: 460px; }
}

/* ---- v5: لوجو الترحيب في صفحة الدخول (أصغر، فوق الفيديو) ---- */
.auth-welcome-logo { margin-bottom: 2px; width: 74px !important; height: 74px !important; }
@media (max-width: 899px) {
  .auth-welcome-logo { width: 56px !important; height: 56px !important; }
  .brand-logo.brand-logo-xl { width: 80px; height: 80px; }
}

/* ---- v5: تصغير ارتفاع الناف بار على الموبايل ---- */
@media (max-width: 640px) {
  header nav { padding-top: 6px !important; padding-bottom: 6px !important; }
  .brand-logo { width: 38px; height: 38px; }
}

/* ============================================================
   ========== v6: الصفحة الرئيسية للطالب (/home) ==========
   ============================================================ */
.dash-body { background: #f4f6fb; font-family: 'Cairo', sans-serif; }

/* روابط الهيدر */
.dash-navlink { padding: 8px 4px; position: relative; transition: color .25s; }
.dash-navlink:hover { color: #f4791f; }
.dash-navlink.active { color: #f4791f; }
.dash-navlink.active::after {
  content: ''; position: absolute; bottom: 0; right: 0; left: 0;
  height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, #f4791f, #ffb36b);
}

/* هيرو الداشبورد */
.dash-hero { position: relative; background: #0e2247; overflow: hidden; }
.dash-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .45;
}
.dash-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(14,34,71,.9), rgba(22,48,94,.68) 55%, rgba(30,63,122,.78));
}

/* إحصائيات الطالب */
.dash-stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  color: #fff;
  transition: transform .3s, background .3s;
}
.dash-stat:hover { transform: translateY(-4px); background: rgba(255,255,255,.13); }
.dash-stat-icon { color: #f4791f; font-size: 17px; }
.dash-stat-num { font-weight: 900; font-size: 22px; margin-top: 4px; }
.dash-stat-label { font-size: 10.5px; font-weight: 700; color: #b9c8e6; margin-top: 1px; }

/* الحالة الفاضية الفخمة */
.dash-empty {
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(22,48,94,.07);
  padding: 44px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dash-empty::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 90% 0%, rgba(244,121,31,.06), transparent),
    radial-gradient(ellipse 40% 50% at 5% 100%, rgba(22,48,94,.05), transparent);
  pointer-events: none;
}
.dash-empty-orbit { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.dash-orbit-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed rgba(244,121,31,.4);
  animation: orbit-spin 14s linear infinite;
}
.dash-orbit-dot {
  position: absolute; top: -5px; right: 50%; margin-right: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #f4791f; box-shadow: 0 0 12px rgba(244,121,31,.8);
  transform-origin: 5px 60px;
  animation: orbit-spin 14s linear infinite;
}
.dash-empty-icon {
  position: absolute; inset: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff4ea, #ffe4cc);
  border: 1px solid #ffd9b8;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #f4791f;
  box-shadow: inset 0 -6px 14px rgba(244,121,31,.15), 0 10px 24px rgba(244,121,31,.18);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* كروت "قريباً" */
.dash-soon-card {
  position: relative;
  background: #fff;
  border: 1px solid #eef1f7;
  border-radius: 22px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(22,48,94,.05);
  transition: transform .3s, box-shadow .3s;
  overflow: hidden;
}
.dash-soon-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(22,48,94,.1); }
.dash-soon-badge {
  position: absolute; top: 12px; left: 12px;
  background: #eef2f8; color: #16305e;
  font-size: 9.5px; font-weight: 900;
  border-radius: 999px; padding: 3px 10px;
}
.dash-soon-icon {
  font-size: 26px; color: #f4791f;
  margin-bottom: 10px; display: inline-block;
}

/* ======= الشريط السفلي المتحرك (موبايل) ======= */
.bottom-nav {
  position: fixed; bottom: 12px; right: 14px; left: 14px; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(14,34,71,.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: 8px 6px;
  box-shadow: 0 18px 40px rgba(5,15,40,.45);
  animation: bn-rise .6s cubic-bezier(.2,.9,.3,1.2) both;
}
@keyframes bn-rise {
  from { transform: translateY(90px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.bottom-nav-pill {
  position: absolute; top: 8px; bottom: 8px;
  width: calc(25% - 6px); right: 6px;
  background: linear-gradient(135deg, #f4791f, #ff9a4d);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(244,121,31,.45);
  transition: transform .4s cubic-bezier(.3,1.3,.4,1);
  z-index: 0;
}
.bn-item {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #93a7cd; font-weight: 800; font-size: 10px;
  padding: 6px 2px 5px;
  transition: color .3s, transform .3s;
  background: none; border: none; font-family: inherit; cursor: pointer;
}
.bn-item i { font-size: 17px; transition: transform .35s cubic-bezier(.3,1.5,.5,1); }
.bn-item.active { color: #fff; }
.bn-item.active i { transform: translateY(-2px) scale(1.12); animation: bn-icon-pop .45s cubic-bezier(.3,1.6,.5,1); }
.bn-item:not(.active):active i { transform: scale(.85); }
@keyframes bn-icon-pop {
  0% { transform: scale(.7); }
  60% { transform: translateY(-3px) scale(1.25); }
  100% { transform: translateY(-2px) scale(1.12); }
}

/* ============================================================
   v7 — الشعار في منتصف الفيديو + رسائل الخطأ + مودال الاسترجاع
   + أوفرلاي أنيميشن نجاح الدخول
   ============================================================ */

/* --- رسالة خطأ داخل الفورم --- */
.auth-err {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  font-weight: 800;
  font-size: 12.5px;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  line-height: 1.7;
  animation: errShake .4s ease;
}
.auth-err.auth-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
@keyframes errShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(5px); }
  50% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
}

/* --- الشعار ملزوق في منتصف الفيديو تماماً --- */
.aw-center-logo {
  position: absolute !important;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: clamp(90px, 11vw, 130px);
  height: auto;
  pointer-events: none;
  animation: centerLogoFloat 4.5s ease-in-out infinite;
}
.aw-center-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.65)) drop-shadow(0 0 22px rgba(244,121,31,.35));
}
@keyframes centerLogoFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -52%) scale(1.04); }
}

/* --- منطقة النص السفلية فوق التدرج --- */
.aw-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 4px;
}

/* --- مودال استرجاع كلمة المرور --- */
.reset-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.reset-modal[hidden] { display: none; }
.reset-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 48, .72);
  backdrop-filter: blur(6px);
  animation: fadeIn .3s ease;
}
.reset-card {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: resetPop .45s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes resetPop {
  from { opacity: 0; transform: translateY(30px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reset-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
}
.reset-close:hover { background: #fee2e2; color: #dc2626; transform: rotate(90deg); }
.reset-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4791f, #ffb340);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(244,121,31,.35);
}

/* --- أوفرلاي نجاح الدخول --- */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: #0e2247;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: fadeIn .35s ease;
}
.success-overlay[hidden] { display: none; }
.success-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .28;
}
.success-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(14,34,71,.15), rgba(8,20,45,.85));
}
.success-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 24px;
}
.success-logo {
  display: block;
  width: 120px;
  margin: 0 auto;
  animation: successLogoDrop .8s cubic-bezier(.34, 1.56, .64, 1) both;
}
.success-logo img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 12px 35px rgba(0,0,0,.6)) drop-shadow(0 0 28px rgba(244,121,31,.45));
}
@keyframes successLogoDrop {
  from { opacity: 0; transform: translateY(-70px) scale(.6) rotate(-8deg); }
  to   { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
.success-check {
  width: 62px;
  height: 62px;
  margin: 18px auto 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(34,197,94,.55);
  animation: checkPop .55s cubic-bezier(.34, 1.56, .64, 1) .45s both, checkPulse 1.6s ease .9s infinite;
}
@keyframes checkPop {
  from { opacity: 0; transform: scale(0) rotate(-60deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes checkPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70%  { box-shadow: 0 0 0 20px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.success-title {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 900;
  margin-top: 16px;
  text-shadow: 0 4px 18px rgba(0,0,0,.6);
  animation: successUp .6s ease .65s both;
}
.success-sub {
  color: #cdd9f2;
  font-weight: 700;
  font-size: 13.5px;
  margin-top: 8px;
  animation: successUp .6s ease .8s both;
}
@keyframes successUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-bar {
  width: 200px;
  height: 6px;
  margin: 22px auto 0;
  border-radius: 99px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
  animation: successUp .5s ease .9s both;
}
.success-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #f4791f, #ffb340);
  animation: barFill 1.9s ease .55s forwards;
}
@keyframes barFill { to { width: 100%; } }

/* ============================================================
   v8 — الجانب الترحيبي الكلاسيكي (بدون فيديو) + مودالات تليجرام
   ============================================================ */

/* --- النسخة الكلاسيكية: خلفية كحلي فخمة بدل الفيديو --- */
.auth-welcome-classic {
  justify-content: center !important;
  background:
    radial-gradient(circle at 80% 15%, rgba(244,121,31,.22), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(59,130,246,.2), transparent 50%),
    linear-gradient(160deg, #16305e, #0e2247 70%) !important;
  padding: 36px 24px !important;
}
.auth-welcome-classic::after { display: none; }
.auth-welcome-classic::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .5;
}
.auth-welcome-classic .auth-welcome-logo {
  margin-bottom: 14px;
  animation: centerLogoFloat 4.5s ease-in-out infinite;
}
@keyframes classicFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.auth-welcome-classic .auth-welcome-logo { animation: classicFloat 4.5s ease-in-out infinite; }

/* --- مودال ربط تليجرام (نفس ستايل reset-card + إضافات) --- */
.tg-steps { text-align: right; margin-top: 14px; }
.tg-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  line-height: 1.7;
}
.tg-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tg-code-box {
  background: #0e2247;
  color: #ffb340;
  font-family: monospace;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  direction: ltr;
  text-align: center;
  user-select: all;
  word-break: break-all;
}
.tg-warn {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
  font-weight: 800;
  font-size: 12px;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  line-height: 1.8;
  margin-top: 12px;
}
.tg-btn-telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  border-radius: 14px;
  padding: 13px;
  margin-top: 14px;
  transition: all .25s ease;
  box-shadow: 0 10px 25px rgba(42,171,238,.35);
}
.tg-btn-telegram:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(42,171,238,.45); }
.tg-skip {
  display: block;
  width: 100%;
  text-align: center;
  color: #94a3b8;
  font-weight: 800;
  font-size: 12px;
  margin-top: 12px;
  padding: 6px;
}
.tg-skip:hover { color: #64748b; text-decoration: underline; }
.tg-status {
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 12.5px;
  text-align: center;
  margin-top: 12px;
  line-height: 1.7;
}
.tg-status.wait { background: #eff6ff; border: 1.5px solid #bfdbfe; color: #1d4ed8; }
.tg-status.ok   { background: #f0fdf4; border: 1.5px solid #bbf7d0; color: #15803d; }
.tg-status.err  { background: #fef2f2; border: 1.5px solid #fecaca; color: #b91c1c; }

/* حقول مودال الاسترجاع المتعددة */
.reset-card .field-box { text-align: right; }
.reset-card .field-label-sm {
  display: block;
  text-align: right;
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  margin: 12px 0 5px;
}

/* ============================================================
   ================== SP-V10-CSS: حزمة v10 ====================
   زجاجي + معالج التسجيل + النوع + الدعم + الأوائل + المياه
   ============================================================ */

/* ---------- معالج التسجيل (3 مراحل) ---------- */
.wiz-progress {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 18px;
}
.wiz-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 64px;
  flex-shrink: 0;
}
.wiz-node-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #eef2f7;
  color: #94a3b8;
  border: 2px solid #e2e8f0;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.wiz-node-label {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  transition: color .3s;
}
.wiz-node.active .wiz-node-circle {
  background: linear-gradient(135deg, #f4791f, #fb923c);
  color: #fff;
  border-color: #f4791f;
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(244,121,31,.35);
}
.wiz-node.active .wiz-node-label { color: #f4791f; }
.wiz-node.done .wiz-node-circle {
  background: #16305e;
  color: #fff;
  border-color: #16305e;
}
.wiz-node.done .wiz-node-label { color: #16305e; }
.wiz-line {
  flex: 1;
  max-width: 56px;
  height: 3px;
  border-radius: 3px;
  background: #e2e8f0;
  margin-top: 18px;
  position: relative;
  overflow: hidden;
}
.wiz-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #16305e, #f4791f);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s ease;
}
.wiz-line.done::after { transform: scaleX(1); }
.wiz-dot { display: none; }

.wiz-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
  transition: all .25s;
  min-height: 48px;
}
.wiz-back:hover { border-color: #16305e; color: #16305e; }

/* ---------- اختيار النوع (ذكر/أنثى) ---------- */
.gender-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gender-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 18px;
  border: 2.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.gender-box img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.gender-box span {
  font-size: 13px;
  font-weight: 900;
  color: #475569;
  transition: color .25s;
}
.gender-check {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 18px;
  color: #f4791f;
  opacity: 0;
  transform: scale(.3) rotate(-90deg);
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.gender-box:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.gender-box.picked {
  border-color: #f4791f;
  background: linear-gradient(160deg, #fff7ed, #ffedd5);
  box-shadow: 0 10px 26px rgba(244,121,31,.22);
  transform: translateY(-3px);
}
.gender-box.picked img { transform: scale(1.1); }
.gender-box.picked span { color: #f4791f; }
.gender-box.picked .gender-check { opacity: 1; transform: scale(1) rotate(0); }

/* ---------- زر ومكونات الدعم ---------- */
.support-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #16305e, #1e3f7a);
  color: #fff;
  font-weight: 900;
  font-size: 13.5px;
  box-shadow: 0 10px 24px rgba(22,48,94,.28);
  transition: transform .25s, box-shadow .25s;
}
.support-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(22,48,94,.36); }
.sup-done-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, #f0fdf4, #dcfce7);
  border: 2px solid #bbf7d0;
  text-align: center;
}
.sup-done-box > i {
  font-size: 30px;
  color: #22c55e;
  margin-bottom: 6px;
  display: inline-block;
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sup-wa-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 14px;
  background: #22c55e;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .5px;
  box-shadow: 0 8px 20px rgba(34,197,94,.35);
  transition: transform .25s;
}
.sup-wa-num:hover { transform: translateY(-2px); }

/* ============================================================
   ================ لوحة الطالب v10 (زجاجي) ====================
   ============================================================ */
.dash-v10 {
  background:
    radial-gradient(900px 400px at 90% -50px, rgba(244,121,31,.07), transparent 60%),
    radial-gradient(800px 500px at -100px 300px, rgba(22,48,94,.06), transparent 60%),
    #f1f5f9;
}

/* عنوان قسم */
.dash-sec-title {
  font-weight: 900;
  color: #16305e;
  font-size: 17px;
  display: flex;
  align-items: center;
}
@media (min-width: 640px) { .dash-sec-title { font-size: 21px; } }

/* كارت زجاجي */
.glass-card {
  position: relative;
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 32px rgba(22,48,94,.09), inset 0 1px 0 rgba(255,255,255,.9);
  padding: 16px;
}
@media (min-width: 640px) { .glass-card { padding: 20px; } }
.glass-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: #16305e;
  font-size: 14px;
  margin-bottom: 12px;
}

/* أفاتار الهيرو */
.dash-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f4791f, #ffb36b);
  box-shadow: 0 8px 24px rgba(244,121,31,.35);
}
@media (min-width: 640px) { .dash-avatar { width: 74px; height: 74px; } }
.dash-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0e2247;
}

/* مربع الترتيب الزجاجي الجديد */
.rank-glass {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  border-radius: 22px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,.22);
  box-shadow: 0 8px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.25);
  padding: 14px 16px;
}
.rank-glass-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4791f, #fb923c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(244,121,31,.4);
}
.rank-glass-label { color: #bcd0f0; font-size: 11px; font-weight: 800; }
.rank-glass-num { color: #fff; font-size: 25px; font-weight: 900; line-height: 1.15; }
.rank-glass-sub { color: rgba(255,255,255,.55); font-size: 10.5px; font-weight: 700; }
.rank-glass-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.28);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  transition: all .25s;
}
.rank-glass-btn:hover { background: #f4791f; border-color: #f4791f; }

/* ---------- دوائر المياه ---------- */
.water-row {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 8px 0 4px;
}
.water-item { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.water-circle {
  --water-pct: 0%;
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #eef4fb;
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 10px 26px rgba(22,48,94,.14), inset 0 2px 8px rgba(22,48,94,.08);
  overflow: hidden;
}
@media (min-width: 640px) { .water-circle { width: 128px; height: 128px; } }
.water-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--water-pct);
  min-height: 4px;
  background: linear-gradient(180deg, #5ba8f5, #2f7fe0);
  transition: height 1.4s cubic-bezier(.22,1,.36,1);
}
.water-green .water-fill { background: linear-gradient(180deg, #4ade80, #16a34a); }
.water-wave {
  position: absolute;
  top: -14px;
  left: -50%;
  width: 200%;
  height: 18px;
  background: radial-gradient(18px 14px at 18px 18px, rgba(255,255,255,.35) 45%, transparent 46%);
  background-size: 36px 18px;
  animation: waveMove 3.2s linear infinite;
  opacity: .8;
}
.water-wave.w2 { animation-duration: 4.6s; animation-direction: reverse; opacity: .45; top: -10px; }
@keyframes waveMove { from { transform: translateX(0); } to { transform: translateX(36px); } }
.water-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.water-text b {
  font-size: 21px;
  font-weight: 900;
  color: #16305e;
  text-shadow: 0 1px 4px rgba(255,255,255,.8);
}
.water-text small { font-size: 10px; font-weight: 800; color: #64748b; margin-top: 1px; }
.water-circle[data-pct="100"] .water-text b,
.water-circle[data-pct="100"] .water-text small { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.water-label { font-size: 12px; font-weight: 900; color: #16305e; }

/* ---------- الرسم البياني ---------- */
.chart-wrap { position: relative; height: 230px; }
.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
}
.chart-empty > i {
  font-size: 34px;
  color: #cbd5e1;
  animation: floatY 3s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- منصة الأوائل (podium) ---------- */
.podium-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) { .podium-row { gap: 16px; } }
.podium-card {
  position: relative;
  border-radius: 20px;
  text-align: center;
  padding: 22px 8px 14px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible;
}
.podium-card.gold {
  padding-top: 30px;
  border: 2.5px solid #f5c542;
  background: linear-gradient(170deg, #fffbeb, #fef3c7 80%);
  box-shadow: 0 14px 40px rgba(245,158,11,.3), inset 0 1px 0 rgba(255,255,255,.9);
}
.podium-card.silver {
  border: 2.5px solid #c8d2de;
  background: linear-gradient(170deg, #f8fafc, #e8edf3 80%);
  box-shadow: 0 10px 30px rgba(100,116,139,.22), inset 0 1px 0 rgba(255,255,255,.9);
}
.podium-card.bronze {
  border: 2.5px solid #d9a06b;
  background: linear-gradient(170deg, #fff7ed, #fde8d3 80%);
  box-shadow: 0 10px 30px rgba(180,110,50,.22), inset 0 1px 0 rgba(255,255,255,.9);
}
.podium-crown {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(-8deg);
  color: #f5b301;
  font-size: 24px;
  filter: drop-shadow(0 3px 6px rgba(245,158,11,.5));
  animation: crownBob 2.6s ease-in-out infinite;
}
@keyframes crownBob { 0%,100% { transform: translateX(-50%) rotate(-8deg); } 50% { transform: translateX(-50%) rotate(6deg) translateY(-3px); } }
.podium-medal {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 19px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.podium-frame {
  position: relative;
  display: inline-block;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3.5px;
}
@media (min-width: 640px) { .podium-frame { width: 84px; height: 84px; } .podium-card.gold .podium-frame { width: 96px; height: 96px; } }
.podium-card.gold .podium-frame {
  width: 76px;
  height: 76px;
  background: conic-gradient(#f5c542, #fff3b0, #e9a600, #ffe27a, #f5c542);
  box-shadow: 0 0 0 3px rgba(245,197,66,.35), 0 8px 22px rgba(245,158,11,.45);
  animation: frameShine 3.5s linear infinite;
}
.podium-card.silver .podium-frame {
  background: conic-gradient(#c8d2de, #f5f8fb, #9fb0c3, #eef2f7, #c8d2de);
  box-shadow: 0 0 0 3px rgba(160,175,195,.3), 0 8px 20px rgba(100,116,139,.35);
  animation: frameShine 4.5s linear infinite;
}
.podium-card.bronze .podium-frame {
  background: conic-gradient(#d9a06b, #f7d9bd, #b0703a, #f0c9a5, #d9a06b);
  box-shadow: 0 0 0 3px rgba(200,140,90,.3), 0 8px 20px rgba(180,110,50,.35);
  animation: frameShine 5s linear infinite;
}
@keyframes frameShine { from { filter: hue-rotate(0deg) brightness(1); } 50% { filter: brightness(1.15); } to { filter: hue-rotate(0deg) brightness(1); } }
.podium-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  display: block;
}
.podium-name {
  font-weight: 900;
  color: #16305e;
  font-size: 12px;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}
@media (min-width: 640px) { .podium-name { font-size: 14px; } }
.podium-score { font-size: 10px; font-weight: 800; color: #94a3b8; margin-top: 2px; }
.podium-card.gold .podium-score { color: #b45309; }
.podium-card.silver .podium-score { color: #64748b; }
.podium-card.bronze .podium-score { color: #9a5b2d; }
.podium-empty { opacity: .55; filter: grayscale(.5); }

/* ---------- قائمة أول 20 ---------- */
.top-list { display: flex; flex-direction: column; gap: 6px; }
.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(248,250,252,.85);
  border: 1px solid #eef2f7;
  transition: transform .2s, box-shadow .2s;
}
.top-row:hover { transform: translateX(-3px); box-shadow: 0 6px 16px rgba(22,48,94,.08); }
.top-rank {
  width: 34px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 900;
  font-size: 12px;
  color: #64748b;
}
.top-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.top-name {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  color: #16305e;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-score { color: #f4791f; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.top-list-empty { text-align: center; padding: 22px 10px; }
.top-list-empty > i { font-size: 30px; color: #cbd5e1; }
.top-list-note { text-align: center; font-size: 11.5px; font-weight: 800; color: #94a3b8; padding: 10px; }

/* ---------- قسم حسابي ---------- */
.acc-profile-top { display: flex; align-items: center; gap: 14px; }
.acc-avatar {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(135deg, #16305e, #2a4a85);
  box-shadow: 0 8px 22px rgba(22,48,94,.25);
}
.acc-avatar img { width: 100%; height: 100%; border-radius: 19px; object-fit: cover; background: #fff; }
.acc-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  background: #f1f5f9;
  color: #64748b;
}
.acc-badge.ok { background: #dcfce7; color: #15803d; }
.acc-badge.warn { background: #fef3c7; color: #b45309; }
.acc-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.acc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248,250,252,.9);
  border: 1px solid #eef2f7;
}
.acc-row-ic {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(244,121,31,.12);
  color: #f4791f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.acc-row-label { font-size: 11.5px; font-weight: 800; color: #94a3b8; flex-shrink: 0; }
.acc-row-val {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  color: #16305e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-tg-list { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 7px; }
.acc-tg-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
}
.acc-tg-list li i {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(42,171,238,.12);
  color: #2aabee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.acc-tg-ok { display: flex; align-items: flex-start; gap: 11px; }
.acc-tg-ok > i { font-size: 26px; color: #22c55e; margin-top: 2px; }
.acc-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  font-size: 12.5px;
  font-weight: 900;
  color: #16305e;
  transition: all .25s;
}
.acc-help-btn:hover { border-color: #16305e; }
.acc-help-btn.wa { background: #22c55e; border-color: #22c55e; color: #fff; box-shadow: 0 6px 16px rgba(34,197,94,.3); }
.acc-help-btn.wa:hover { transform: translateY(-2px); }
.acc-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  border-radius: 16px;
  border: 2px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 900;
  font-size: 13.5px;
  transition: all .25s;
}
.acc-logout:hover { background: #dc2626; color: #fff; }

/* ---------- تجاوب الموبايل الصغير جداً ---------- */
@media (max-width: 380px) {
  .water-row { gap: 14px; }
  .water-circle { width: 96px; height: 96px; }
  .water-text b { font-size: 17px; }
  .podium-row { gap: 6px; }
  .podium-frame { width: 54px; height: 54px; }
  .podium-card.gold .podium-frame { width: 62px; height: 62px; }
  .podium-name { font-size: 10.5px; }
  .rank-glass { flex-wrap: wrap; gap: 10px; }
  .rank-glass-btn { width: 100%; justify-content: center; }
  .gender-box img { width: 48px; height: 48px; }
  .wiz-node { width: 56px; }
  .wiz-line { max-width: 34px; }
  .acc-row-label { font-size: 10.5px; }
  .acc-row-val { font-size: 11.5px; }
}

/* ============ SP-V11-CSS: صفحات منفصلة + اشتراكات + صورة ============ */

/* بلاطات الاختصار في الرئيسية */
.quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  padding: 18px 10px 14px; text-align: center;
  box-shadow: 0 10px 30px rgba(22,48,94,.08);
  transition: transform .25s, box-shadow .25s;
}
.quick-tile:active { transform: scale(.96); }
.quick-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(22,48,94,.13); }
.quick-tile i { font-size: 26px; color: #f4791f; margin-bottom: 4px; }
.quick-tile b { font-weight: 900; color: #16305e; font-size: 13px; }
.quick-tile small { color: #94a3b8; font-weight: 700; font-size: 10px; }

/* عناوين أجزاء الاشتراكات */
.subs-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 900; color: #16305e; font-size: 15px;
}
.subs-head-ic {
  width: 30px; height: 30px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff;
}
.subs-head-ic.mine { background: linear-gradient(135deg,#059669,#34d399); }
.subs-head-ic.new  { background: linear-gradient(135deg,#c2410c,#f4791f); }

/* حالة فاضية للاشتراكات */
.subs-empty {
  flex: 0 0 100% !important; max-width: 480px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1.5px dashed #dbe3f0; border-radius: 24px;
  padding: 28px 20px; text-align: center;
}
.subs-empty > i { font-size: 30px; color: #cbd5e1; }
.subs-wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; background: linear-gradient(135deg,#059669,#25d366);
  color: #fff; font-weight: 900; font-size: 12.5px;
  border-radius: 14px; padding: 10px 18px;
  box-shadow: 0 8px 20px rgba(37,211,102,.3);
  transition: transform .2s;
}
.subs-wa-btn:active { transform: scale(.95); }
.subs-active-row {
  display: flex; align-items: center; gap: 7px;
  background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0;
  font-weight: 900; font-size: 12px; border-radius: 12px;
  padding: 9px 12px; margin-bottom: 14px;
}

/* كارت ترتيبي في صفحة الأوائل */
.my-rank-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  padding: 14px 18px; box-shadow: 0 10px 30px rgba(22,48,94,.08);
}
.my-rank-card .rank-glass-icon {
  background: linear-gradient(135deg,#16305e,#2a4a85); color: #f4791f;
}

/* صورة الحساب القابلة للتعديل */
.avatar-editable { position: relative; }
.avatar-edit-btn {
  position: absolute; bottom: -2px; left: -2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg,#c2410c,#f4791f); color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; box-shadow: 0 4px 10px rgba(244,121,31,.4);
  cursor: pointer; transition: transform .2s;
}
.avatar-edit-btn:active { transform: scale(.88); }

/* موبايل صغير */
@media (max-width: 380px) {
  .quick-tile i { font-size: 21px; }
  .quick-tile b { font-size: 11.5px; }
  .quick-tile small { font-size: 9px; }
  .subs-head { font-size: 13.5px; }
  .my-rank-card { padding: 12px 14px; }
}

/* ---- v11.1: زمن الحل في قائمة الأوائل ---- */
.top-name { display: flex; flex-direction: column; line-height: 1.25; }
.top-time { font-size: 10px; color: #8a93a6; font-weight: 700; }

/* ============================================================
   ========== SP-V11-P3-CSS: هيدر الصفحة الرئيسية مضغوط وأنيق على الموبايل ==========
   ============================================================ */
.nav-btn { white-space: nowrap; }
.nav-btn .nav-btn-txt-sm { display: none; }

@media (max-width: 640px) {
  /* شريط الإعلان: أنحف وأصغر */
  #top-marquee { padding-top: 4px !important; padding-bottom: 4px !important; font-size: 11px; }
  #top-marquee .mx-8 { margin-left: 1.25rem; margin-right: 1.25rem; }

  /* الناف بار: صف واحد مضغوط */
  header nav { padding: 5px 10px !important; gap: 6px; }
  .brand-logo { width: 34px !important; height: 34px !important; }
  header nav .leading-tight .block:first-child { font-size: 13px !important; }
  header nav .leading-tight .block:last-child { display: none; } /* نخفي السطر الفرعي عشان الارتفاع */
  header nav a.flex { gap: 6px !important; }

  /* الأزرار: نص مختصر + حجم مريح للإبهام والاتنين ظاهرين */
  .nav-actions { gap: 5px !important; }
  .nav-btn .nav-btn-txt { display: none; }
  .nav-btn .nav-btn-txt-sm { display: inline; }
  .nav-btn { padding: 7px 10px !important; font-size: 12px !important; border-radius: 10px !important; }
  .nav-btn i { margin-left: 4px !important; font-size: 10px !important; }
  .nav-btn-login { border-width: 1.5px !important; }
  .nav-actions .swap-wrap .skeleton { height: 32px !important; width: 62px !important; }
  #menuBtn { font-size: 20px !important; padding: 0 4px !important; }
}

/* موبايلات ضيقة جدًا */
@media (max-width: 360px) {
  header nav .leading-tight .block:first-child { font-size: 12px !important; }
  .nav-btn { padding: 6px 8px !important; font-size: 11px !important; }
}

/* ============================================================
   ========== SP-V12-CSS: أوفرلاي تحميل ذرّي + أوائل الرئيسية ==========
   ============================================================ */
.sp-load-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 20, 45, .72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s ease;
}
.sp-load-overlay.on { opacity: 1; }
.sp-load-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  padding: 28px 34px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  min-width: 240px;
}
.sp-atom { position: relative; width: 84px; height: 84px; margin: 0 auto 14px; }
.sp-nucleus {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd08a, #f4791f);
  box-shadow: 0 0 18px rgba(244,121,31,.9);
  animation: sp-nucleus-pulse 1.2s ease-in-out infinite;
}
@keyframes sp-nucleus-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.25)} }
.sp-orbit {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.28);
}
.sp-orbit i {
  position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: #7dd3fc; box-shadow: 0 0 10px #7dd3fc;
}
.sp-orbit.o1 { transform: rotateZ(0deg) ; animation: sp-spin 1.6s linear infinite; }
.sp-orbit.o2 { transform: rotateZ(60deg) scale(.78); animation: sp-spin 2.2s linear infinite reverse; }
.sp-orbit.o3 { transform: rotateZ(-60deg) scale(.56); animation: sp-spin 1.1s linear infinite; }
@keyframes sp-spin { to { transform: rotate(360deg); } }
.sp-orbit.o2 { animation-name: sp-spin2; }
@keyframes sp-spin2 { from { transform: rotateZ(60deg) scale(.78) rotate(0deg);} to { transform: rotateZ(60deg) scale(.78) rotate(-360deg);} }
.sp-orbit.o3 { animation-name: sp-spin3; }
@keyframes sp-spin3 { from { transform: rotateZ(-60deg) scale(.56) rotate(0deg);} to { transform: rotateZ(-60deg) scale(.56) rotate(360deg);} }
.sp-load-title { color: #fff; font-weight: 900; font-size: 16px; }
.sp-load-sub { color: #bcd3f7; font-weight: 700; font-size: 12px; margin-top: 6px; min-height: 18px; transition: opacity .3s; }
.sp-load-bar {
  height: 6px; border-radius: 99px; background: rgba(255,255,255,.12);
  overflow: hidden; margin-top: 14px;
}
.sp-load-bar span {
  display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, #f4791f, #ffb46b);
  animation: sp-bar-slide 1.2s ease-in-out infinite;
}
@keyframes sp-bar-slide { 0%{margin-right:-40%} 100%{margin-right:100%} }

/* ---- أوائل الدفعة المصغّرة في الرئيسية (/home) ---- */
.home-top3 { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin-top: 14px; }
.home-top3-item { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 74px; }
.home-top3-frame {
  position: relative; width: 58px; height: 58px; border-radius: 50%; padding: 3px;
  background: conic-gradient(#cbd5e1, #94a3b8, #e2e8f0, #94a3b8, #cbd5e1);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.home-top3-item.g1 .home-top3-frame {
  width: 70px; height: 70px;
  background: conic-gradient(#fbbf24, #fde68a, #d97706, #fde68a, #fbbf24);
  box-shadow: 0 8px 22px rgba(251,191,36,.45);
}
.home-top3-item.g3 .home-top3-frame {
  background: conic-gradient(#d08a4f, #f6c8a0, #9a5b2d, #f6c8a0, #d08a4f);
}
.home-top3-frame img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.home-top3-medal { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-size: 15px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.home-top3-item.g1 .home-top3-crown {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  color: #fbbf24; font-size: 15px; animation: crown-float 2s ease-in-out infinite;
}
.home-top3-name { color: #e6eeff; font-weight: 800; font-size: 10.5px; max-width: 84px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-top3-score { color: #ffb46b; font-weight: 900; font-size: 10px; }
.home-top3-empty { color: #93a8cf; font-weight: 700; font-size: 11px; text-align: center; padding: 8px 0 2px; }
@keyframes crown-float { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-3px)} }

/* ============================================================
   ========== SP-V14-CSS: البراويز الدائرية الجديدة (ذهبي/فضي/برونزي) ==========
   الصورة دائرية تحت + البرواز فوقها — النوافذ دوائر مقاسة بالبيكسل
   ============================================================ */
.ornate-frame {
  position: relative;
  display: inline-block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.35));
}
.ornate-frame .ornate-border {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  z-index: 2;
  pointer-events: none;
}
.ornate-frame .ornate-photo {
  position: absolute;
  z-index: 1;
  object-fit: cover;
  background: #fff;
  border-radius: 50%;
}
/* نوافذ دائرية — نِسَب مقاسة من الصور المقصوصة + تراكب 1.5% تحت الحافة */
.ornate-frame.f-gold .ornate-photo   { left: 23.0%; top: 30.1%; width: 50.5%; height: 46.2%; }
.ornate-frame.f-silver .ornate-photo { left: 24.0%; top: 26.6%; width: 49.4%; height: 47.8%; }
.ornate-frame.f-bronze .ornate-photo { left: 23.5%; top: 25.7%; width: 49.2%; height: 47.5%; }

/* أحجام متدرجة: الأول > التاني > التالت — هيرو الرئيسية */
.home-top3 { align-items: flex-end; }
.home-top3-item .ornate-frame { width: 72px; }
.home-top3-item.g1 .ornate-frame { width: 92px; }
.home-top3-item.g3 .ornate-frame { width: 62px; }
@media (min-width: 640px) {
  .home-top3-item .ornate-frame { width: 90px; }
  .home-top3-item.g1 .ornate-frame { width: 114px; }
  .home-top3-item.g3 .ornate-frame { width: 78px; }
}
.home-top3 .home-top3-medal {
  position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%);
  font-size: 16px; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4));
}
.home-top3 .home-top3-crown {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  color: #fbbf24; font-size: 15px; z-index: 3; animation: crown-float 2s ease-in-out infinite;
}

/* أحجام متدرجة في منصة التتويج (/top): ذهبي > فضي > برونزي */
.podium-ornate { max-width: 100%; margin: 0 auto; }
.podium-card.silver .podium-ornate { width: 92px; }
.podium-card.gold .podium-ornate   { width: 122px; }
.podium-card.bronze .podium-ornate { width: 80px; }
@media (min-width: 640px) {
  .podium-card.silver .podium-ornate { width: 118px; }
  .podium-card.gold .podium-ornate   { width: 152px; }
  .podium-card.bronze .podium-ornate { width: 100px; }
}
@media (max-width: 380px) {
  .podium-card.silver .podium-ornate { width: 74px; }
  .podium-card.gold .podium-ornate   { width: 96px; }
  .podium-card.bronze .podium-ornate { width: 64px; }
  .home-top3-item .ornate-frame { width: 58px; }
  .home-top3-item.g1 .ornate-frame { width: 76px; }
  .home-top3-item.g3 .ornate-frame { width: 50px; }
}
/* البرواز الحقيقي بيلغي الإطار الدائري القديم في المنصة */
.podium-card .podium-ornate { padding: 0; background: none; border-radius: 0; }

/* ===== SP-V14: منع التمدد الأفقي (خصوصاً صفحة الأوائل) ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
.podium-row { width: 100%; min-width: 0; }
.podium-card { min-width: 0; }
.podium-card .podium-ornate,
.home-top3-item .ornate-frame { max-width: 100%; }
.podium-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#top-section { overflow-x: clip; }
.top-row { min-width: 0; }
.top-row > * { min-width: 0; }

/* ===================== SP-V13-UI-CSS ===================== */

/* --- P5: شارات الكورس تحت جنب الاسم --- */
.course-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.course-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.course-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 900; padding: 4px 10px; border-radius: 999px;
  line-height: 1; white-space: nowrap;
}
.course-chip i { font-size: 9.5px; }
.chip-off { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; box-shadow: 0 3px 8px rgba(239,68,68,.3); }
.chip-hot { background: linear-gradient(135deg, #f4791f, #fbbf24); color: #fff; box-shadow: 0 3px 8px rgba(244,121,31,.3); }
.chip-owned { background: linear-gradient(135deg, #059669, #10b981); color: #fff; box-shadow: 0 3px 8px rgba(5,150,105,.3); }
.chip-grade { background: #eef2f9; color: #16305e; border: 1px solid #dbe4f2; }
.chip-free { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; box-shadow: 0 3px 8px rgba(124,58,237,.3); }
.price-save {
  font-size: 10px; font-weight: 900; color: #059669;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 3px 8px;
}
.btn-course-peek {
  background: #eef2f9; color: #16305e; border: 2px solid #dbe4f2; transition: .2s;
}
.btn-course-peek:hover { background: #16305e; color: #fff; border-color: #16305e; }

/* --- إعدادات (v13) --- */
.settings-rows { display: flex; flex-direction: column; }
.settings-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px dashed #e8edf5;
}
.settings-row:last-child { border-bottom: 0; }
.settings-ic {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #fff4ec, #ffe8d6); color: #f4791f;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.settings-label { font-weight: 900; color: #16305e; font-size: 12.5px; }
.settings-hint { font-weight: 700; color: #94a3b8; font-size: 10px; margin-top: 1px; line-height: 1.5; }
.settings-toggle {
  width: 44px; height: 25px; border-radius: 999px; background: #e2e8f0;
  position: relative; flex-shrink: 0; transition: background .25s; border: 0; cursor: pointer;
}
.settings-toggle .toggle-knob {
  position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .25s;
}
.settings-toggle.on { background: linear-gradient(135deg, #f4791f, #fb923c); }
.settings-toggle.on .toggle-knob { transform: translateX(-19px); }
.settings-seg {
  display: flex; background: #eef2f9; border-radius: 12px; padding: 3px; gap: 2px; flex-shrink: 0;
}
.settings-seg button {
  font-size: 10.5px; font-weight: 900; color: #64748b; border: 0; background: transparent;
  border-radius: 9px; padding: 5px 10px; cursor: pointer; transition: .2s; font-family: inherit;
}
.settings-seg button.active { background: #fff; color: #f4791f; box-shadow: 0 2px 6px rgba(22,48,94,.12); }

/* تطبيقات الإعدادات */
html.sp-fs-small body { font-size: 14px; }
html.sp-fs-large body { font-size: 17.5px; }
html.sp-reduce-motion *, html.sp-reduce-motion *::before, html.sp-reduce-motion *::after {
  animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important;
}
html.sp-focus-mode .wa-float, html.sp-focus-mode #top-marquee { display: none !important; }

/* --- فك ربط التلجرام --- */
.tg-unlink-btn {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 10px;
  font-size: 11px; font-weight: 900; color: #dc2626; background: #fef2f2;
  border: 1.5px solid #fecaca; border-radius: 12px; padding: 8px 14px; cursor: pointer;
  transition: .2s; font-family: inherit; width: 100%;
}
.tg-unlink-btn:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.tg-unlink-btn:disabled { opacity: .6; cursor: wait; }

/* --- زر تواصل الدعم --- */
.acc-help-btn.support {
  background: linear-gradient(135deg, #16305e, #2a4a85); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(22,48,94,.25);
}
.acc-help-btn.support:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(22,48,94,.35); }

/* --- الواتس العائم في الداشبورد --- */
.wa-float-dash { position: fixed; bottom: 88px; left: 16px; z-index: 45; }
@media (min-width: 1024px) { .wa-float-dash { bottom: 24px; left: 24px; } }

/* --- صفحة الكورس (v13) --- */
.course-back {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 900; font-size: 12px;
  color: #64748b; margin-bottom: 12px; transition: .2s;
}
.course-back:hover { color: #f4791f; }
.course-hero {
  position: relative; border-radius: 26px; overflow: hidden;
  box-shadow: 0 15px 40px rgba(22,48,94,.18);
}
.course-hero-bg { position: absolute; inset: 0; }
.course-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.14), transparent 45%),
              radial-gradient(circle at 85% 90%, rgba(0,0,0,.22), transparent 55%);
}
.course-hero-inner {
  position: relative; z-index: 1; display: flex; align-items: stretch; gap: 14px;
  padding: 22px 20px;
}
.course-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.course-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.course-hero-chips .chip-grade { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
.course-hero-title { color: #fff; font-weight: 900; font-size: 22px; line-height: 1.35; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.course-hero-desc { color: rgba(255,255,255,.85); font-weight: 700; font-size: 12px; line-height: 1.8; margin-top: 7px; max-width: 420px; }
.course-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.course-meta-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 900;
  color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 4px 10px; backdrop-filter: blur(4px);
}
.course-hero-side {
  display: none; flex-direction: column; align-items: center; justify-content: flex-end; width: 210px; flex-shrink: 0;
}
.course-hero-teacher { width: 150px; filter: drop-shadow(0 8px 18px rgba(0,0,0,.3)); margin-bottom: -4px; }
.course-price-box {
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-radius: 18px;
  padding: 13px 16px; width: 100%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
@media (min-width: 640px) {
  .course-hero-side { display: flex; }
  .course-hero-inner { padding: 26px 26px 0 26px; }
  .course-hero-info { padding-bottom: 26px; }
  .course-hero-title { font-size: 27px; }
  .course-hero-desc { font-size: 13px; }
}
@media (max-width: 639px) {
  .course-hero-info { padding-bottom: 4px; }
  .course-hero-inner { flex-direction: column; }
  .course-hero-side { display: flex; width: 100%; flex-direction: column-reverse; }
  .course-hero-teacher { display: none; }
  .course-price-box { margin-bottom: 4px; }
}
.cpb-old { font-size: 12px; font-weight: 800; color: #94a3b8; text-decoration: line-through; }
.cpb-new { font-size: 24px; font-weight: 900; color: #16305e; line-height: 1.2; }
.cpb-new small { font-size: 11px; color: #64748b; }
.cpb-save {
  display: inline-block; font-size: 10px; font-weight: 900; color: #059669;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 3px 9px; margin-top: 5px;
}
.cpb-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 10px;
  background: linear-gradient(135deg, #f4791f, #fb923c); color: #fff; font-weight: 900; font-size: 13px;
  border-radius: 14px; padding: 11px; box-shadow: 0 6px 16px rgba(244,121,31,.35); transition: .2s;
}
.cpb-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(244,121,31,.45); }
.cpb-free { font-size: 15px; font-weight: 900; color: #7c3aed; }
.cpb-owned { font-size: 14px; font-weight: 900; color: #059669; }
.cpb-note { display: block; font-size: 10px; font-weight: 700; color: #94a3b8; margin-top: 4px; }

/* بانر القفل */
.course-lock-banner {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 1.5px solid #fed7aa;
  border-radius: 18px; padding: 13px 15px;
}
.lock-banner-ic {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, #f4791f, #fb923c); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  box-shadow: 0 5px 12px rgba(244,121,31,.35);
  animation: lockPulse 2s ease-in-out infinite;
}
@keyframes lockPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.lock-banner-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  background: #16305e; color: #fff; font-weight: 900; font-size: 11px;
  border-radius: 12px; padding: 9px 13px; transition: .2s; white-space: nowrap;
}
.lock-banner-btn:hover { background: #f4791f; transform: translateY(-2px); }
@media (max-width: 480px) {
  .course-lock-banner { flex-wrap: wrap; }
  .lock-banner-btn { width: 100%; justify-content: center; }
}

/* الأكورديون */
.course-acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-item {
  background: #fff; border: 1.5px solid #e8edf5; border-radius: 18px; overflow: hidden;
  transition: box-shadow .25s, border-color .25s;
}
.acc-item.open { border-color: #fdba74; box-shadow: 0 10px 28px rgba(244,121,31,.12); }
.acc-item.is-locked { background: #fafbfd; }
.acc-head {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: right;
  padding: 14px 15px; background: transparent; border: 0; cursor: pointer; font-family: inherit;
}
.acc-ic {
  width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(135deg, #eef2f9, #e2e9f5); color: #16305e;
  display: flex; align-items: center; justify-content: center; font-size: 15px; transition: .25s;
}
.acc-item.open .acc-ic { background: linear-gradient(135deg, #f4791f, #fb923c); color: #fff; box-shadow: 0 5px 12px rgba(244,121,31,.3); }
.acc-item.is-locked .acc-ic { color: #94a3b8; }
.acc-titles { flex: 1; min-width: 0; }
.acc-titles b { display: block; font-weight: 900; color: #16305e; font-size: 13px; }
.acc-item.is-locked .acc-titles b { color: #64748b; }
.acc-titles small { display: block; font-weight: 700; color: #94a3b8; font-size: 10px; margin-top: 2px; }
.acc-state {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 9.5px; font-weight: 900; border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}
.acc-state.locked { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.acc-state.soon { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.acc-state.open { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.acc-chev {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; font-size: 11px; transition: transform .25s ease;
}
/* v18 A10: محدد مباشر — فتح المجموعة مايلفّش أسهم الأبناء المقفولين (السهم لتحت وهم مقفولين) */
.acc-item.open > .acc-head .acc-chev { transform: rotate(180deg); color: #f4791f; }
/* v18 A9: أنيميشن خفيف سريع بتقنية grid-rows — مفيش max-height تقيل */
.acc-body { display: grid; grid-template-rows: 0fr; overflow: hidden; transition: grid-template-rows .28s ease; }
.acc-body > .acc-body-inner { min-height: 0; }
.acc-item.open > .acc-body { grid-template-rows: 1fr; }
.acc-body-inner { padding: 0 15px 16px; }
.acc-video-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden;
  background: #0f172a; box-shadow: 0 8px 22px rgba(15,23,42,.25);
}
.acc-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.acc-locked-body {
  text-align: center; background: #f8fafc; border: 1.5px dashed #dbe4f2; border-radius: 14px; padding: 20px 14px;
}
.acc-locked-ic {
  width: 46px; height: 46px; border-radius: 15px; margin: 0 auto 8px;
  background: #eef2f9; color: #94a3b8; display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.acc-locked-ic.soon { background: #fff7ed; color: #f4791f; }

/* سكيلتون صفحة الكورس */
.course-hero-skel { height: 210px; border-radius: 26px; margin-bottom: 16px; }
.course-acc-skel { height: 68px; border-radius: 18px; margin-bottom: 10px; }
.shimmer {
  background: linear-gradient(90deg, #eef2f9 25%, #f8fafc 50%, #eef2f9 75%);
  background-size: 200% 100%; animation: shimmerMove 1.4s infinite;
}
@keyframes shimmerMove { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* خطأ صفحة الكورس */
.course-error { text-align: center; padding: 50px 20px; }
.course-error i { font-size: 34px; color: #f4791f; }
.course-error-btn {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  background: #16305e; color: #fff; font-weight: 900; font-size: 12px;
  border-radius: 13px; padding: 10px 18px; transition: .2s;
}
.course-error-btn:hover { background: #f4791f; }
/* ===================== /SP-V13-UI-CSS ===================== */

/* ===================== SP-V14-MODAL: مودال تأكيد الاشتراك ===================== */
.sub-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 20, 45, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .25s ease;
}
.sub-modal-overlay.show { opacity: 1; }
.sub-modal {
  background: #fff; border-radius: 24px;
  padding: 26px 22px 20px; text-align: center;
  width: 100%; max-width: 360px;
  box-shadow: 0 30px 80px rgba(10, 20, 45, .35);
  transform: translateY(18px) scale(.96);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2);
  border: 1px solid rgba(244,121,31,.15);
}
.sub-modal-overlay.show .sub-modal { transform: none; }
.sub-modal-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(135deg, #f4791f, #fb923c);
  color: #fff; font-size: 22px;
  box-shadow: 0 10px 24px rgba(244,121,31,.35);
  margin-bottom: 12px;
}
.sub-modal-title { font-size: 18px; font-weight: 900; color: #16305e; }
.sub-modal-course { font-size: 13px; font-weight: 800; color: #64748b; margin-top: 4px; }
.sub-modal-price {
  margin: 12px auto 0; display: inline-block;
  background: #fff7ed; border: 1.5px dashed #fdba74;
  color: #b45309; font-weight: 900; font-size: 13.5px;
  padding: 8px 16px; border-radius: 14px;
}
.sub-modal-msg {
  margin-top: 12px; background: #fef2f2; border: 1.5px solid #fecaca;
  color: #b91c1c; font-weight: 900; font-size: 12.5px;
  padding: 10px 12px; border-radius: 14px;
}
.sub-modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.sub-modal-yes {
  flex: 1; background: linear-gradient(135deg, #f4791f, #fb923c);
  color: #fff; font-weight: 900; font-size: 13.5px;
  padding: 12px; border-radius: 16px; border: 0; cursor: pointer;
  box-shadow: 0 8px 20px rgba(244,121,31,.3);
  transition: transform .15s ease;
}
.sub-modal-yes:not(:disabled):hover { transform: translateY(-2px); }
.sub-modal-no {
  flex: .7; background: #f1f5f9; color: #475569;
  font-weight: 900; font-size: 13.5px;
  padding: 12px; border-radius: 16px; border: 0; cursor: pointer;
}
/* ===================== /SP-V14-MODAL ===================== */

/* SP-V14-A1: رسالة الطرد في صفحة الدخول */
.kicked-note {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fef2f2; border: 1.5px solid #fecaca;
  border-radius: 18px; padding: 14px 16px; margin-bottom: 16px;
  animation: kickedIn .45s cubic-bezier(.2,.9,.3,1.15);
}
.kicked-note > i { color: #dc2626; font-size: 20px; margin-top: 2px; }
.kicked-note b { color: #991b1b; font-size: 13.5px; font-weight: 900; display: block; }
.kicked-note p { color: #b91c1c; font-size: 11.5px; font-weight: 700; margin-top: 4px; line-height: 1.8; }
@keyframes kickedIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ===================== SP-V15-CSS: مجموعات + مشغل مخصص + وضع ليلي + زجاجي ===================== */

/* ---------- M1: قسم اشتراكاتي في الرئيسية ---------- */
.my-subs-skel { height: 86px; border-radius: 22px; background: #eef2f7; }
.my-subs-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .my-subs-grid { grid-template-columns: repeat(2, 1fr); } }
.my-sub-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(22,48,94,.08); border-radius: 22px; padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(22,48,94,.08);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden;
}
.my-sub-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .8s ease;
}
.my-sub-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(22,48,94,.14); }
.my-sub-card:hover::before { transform: translateX(100%); }
.my-sub-strip {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 21px; box-shadow: 0 8px 20px rgba(22,48,94,.22);
}
.my-sub-info { min-width: 0; flex: 1; }
.my-sub-info b { display: block; color: #16305e; font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-sub-info small { display: flex; align-items: center; gap: 5px; color: #059669; font-size: 11px; font-weight: 800; margin-top: 3px; }
.my-sub-go {
  width: 34px; height: 34px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  box-shadow: 0 6px 16px rgba(249,115,22,.3);
}
.my-subs-empty {
  text-align: center; padding: 28px 18px;
  background: rgba(255,255,255,.8); backdrop-filter: blur(10px);
  border: 1.5px dashed rgba(22,48,94,.15); border-radius: 22px;
}
.my-subs-empty > i { font-size: 30px; color: #cbd5e1; }
.my-subs-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff;
  font-weight: 900; font-size: 12.5px; padding: 10px 22px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(249,115,22,.32);
}

/* ---------- M3: الشريط المجمع (أب + أبناء) ---------- */
.acc-group { border: 1.5px solid rgba(249,115,22,.25) !important; }
.acc-group > .acc-head .acc-ic-group {
  background: linear-gradient(135deg, #f97316, #fbbf24) !important; color: #fff !important;
  box-shadow: 0 6px 16px rgba(249,115,22,.3);
}
.acc-group-inner { padding: 6px 4px 10px; }
.acc-group-count {
  display: flex; align-items: center; gap: 7px;
  color: #94a3b8; font-size: 11px; font-weight: 800; padding: 4px 8px 10px;
}
.acc-item.acc-child {
  margin: 0 0 8px; border-radius: 16px;
  border: 1px solid rgba(22,48,94,.07);
  background: #f8fafc;
  animation: none !important; opacity: 1 !important;
}
.acc-item.acc-child .acc-head { padding: 12px 14px; }
.acc-item.acc-child .acc-ic { width: 36px; height: 36px; font-size: 14px; border-radius: 12px; }
.acc-item.acc-child .acc-titles b { font-size: 12.5px; }
.acc-item.acc-child .acc-titles small { font-size: 10px; }

/* صف زر التشغيل */
.acc-play-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(22,48,94,.04), rgba(249,115,22,.05));
  border: 1px solid rgba(22,48,94,.07); border-radius: 16px; padding: 13px 15px;
}
.acc-play-info { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 180px; color: #475569; font-size: 11.5px; font-weight: 800; line-height: 1.7; }
.acc-play-info > i { color: #f97316; font-size: 17px; flex: none; }
.acc-play-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff;
  font-weight: 900; font-size: 13px; padding: 10px 24px; border-radius: 999px;
  border: none; cursor: pointer; box-shadow: 0 8px 20px rgba(249,115,22,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.acc-play-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 26px rgba(249,115,22,.45); }
.acc-play-btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- M4/M7: المشغل المخصص ---------- */
.sp-player-box {
  margin-top: 16px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, #0b1830, #16305e);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 60px rgba(11,24,48,.45);
  animation: playerIn .45s cubic-bezier(.22,1,.36,1);
}
@keyframes playerIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
/* v18 A12: الشريط العلوي طبقة فوق الفيديو — بيختفي أثناء التشغيل */
.sp-top-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 9;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(3,10,24,.78), rgba(3,10,24,0));
  transition: opacity .35s ease, transform .35s ease;
}
.sp-player-title { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 900; font-size: 13px; min-width: 0; }
.sp-player-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-player-title > i { color: #fbbf24; font-size: 16px; flex: none; }
.sp-player-close {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: rgba(255,255,255,.08); color: #cbd5e1; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: background .2s ease, color .2s ease;
}
.sp-player-close:hover { background: rgba(220,38,38,.85); color: #fff; }
/* v18 A2/A6: الفيديو full-bleed — المسرح هو كل المشغل، مفيش حواف حوالين الفيديو خالص */
.sp-player-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.sp-player-frame { position: absolute; inset: 0; overflow: hidden; }
/* v18 A5: تكبير طفيف يقص لوجو وعنوان يوتيوب برّا المسرح */
.sp-player-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  transform: scale(1.12); transform-origin: center center;
}
.sp-player-shield { position: absolute; inset: 0; z-index: 5; cursor: pointer; background: transparent; }
/* v18 A12: إخفاء أدوات التحكم والعلوي أثناء التشغيل — أي حركة ترجّعهم */
.sp-chrome-hidden .sp-top-bar { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.sp-chrome-hidden .sp-controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.sp-chrome-hidden { cursor: none; }
/* v17 F12: شيلنا التدرجات الضبابية — بدلها بنكبّر الإطار ونقصّه فإثباتات يوتيوب تخرج برّا المسرح */
.sp-player-loading {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55);
}
.sp-bigplay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 7;
  width: 76px; height: 76px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(249,115,22,.22), 0 18px 40px rgba(0,0,0,.5);
  transition: transform .25s ease;
}
.sp-bigplay:hover { transform: translate(-50%, -50%) scale(1.08); }
.sp-bigplay i { margin-right: -4px; }
/* v17 F11: علامة مائية أهدى — بتظهر وتختفي في أماكن عشوائية (مفيش حركة ملفتة) */
.sp-wm {
  position: absolute; top: 12%; left: 10%; z-index: 8; pointer-events: none;
  color: rgba(255,255,255,.28); font-size: 11px; font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); letter-spacing: .3px;
  white-space: nowrap; direction: rtl;
  opacity: 0; transition: opacity 1.4s ease;
}
.sp-wm.wm-show { opacity: 1; }
.sp-hidden-guard .sp-player-frame { filter: blur(30px); }
/* v18 A12: شريط التحكم طبقة فوق الفيديو من تحت — تدرج غامق يحافظ على وضوح الأزرار */
.sp-controls {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 9;
  display: flex; align-items: center; gap: 9px;
  padding: 26px 12px 10px;
  background: linear-gradient(0deg, rgba(3,10,24,.82), rgba(3,10,24,0));
  transition: opacity .35s ease, transform .35s ease;
}
.sp-ctl-btn {
  width: 36px; height: 36px; border-radius: 11px; flex: none; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s ease, transform .2s ease;
}
.sp-ctl-btn:hover { background: rgba(249,115,22,.85); transform: scale(1.06); }
/* v18 A4: زر الترجمة لما يكون شغال */
.sp-ctl-btn.active { background: linear-gradient(135deg, #f97316, #fb923c); box-shadow: 0 0 0 3px rgba(249,115,22,.25); }
.sp-time { color: #94a3b8; font-size: 11px; font-weight: 800; direction: ltr; min-width: 34px; text-align: center; }
/* v17 F11: الشريط بيتملي باللون مع تقدّم الفيديو (الخلفية بتتحدث من JS بـ linear-gradient) */
.sp-seek {
  flex: 1; min-width: 120px; height: 6px; border-radius: 999px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, #f97316 0%, #f97316 0%, rgba(255,255,255,.14) 0%);
  cursor: pointer; accent-color: #f97316; direction: ltr;
}
.sp-seek::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.28); cursor: grab;
}
.sp-speed-wrap { display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: 12px; }
.sp-speed {
  width: 86px; height: 5px; border-radius: 999px; appearance: none; -webkit-appearance: none;
  background: linear-gradient(90deg, #fbbf24 0%, #fbbf24 0%, rgba(255,255,255,.14) 0%);
  cursor: pointer; accent-color: #fbbf24; direction: ltr;
}
.sp-speed::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.25); cursor: grab;
}
.sp-speed-val { color: #fbbf24; font-size: 11px; font-weight: 900; min-width: 30px; direction: ltr; }
/* v18 A12: موبايل — التحكم أصغر ومتراص من غير لف عشان مايغطيش الفيديو */
@media (max-width: 560px) {
  .sp-controls { gap: 6px; padding: 20px 8px 8px; }
  .sp-ctl-btn { width: 31px; height: 31px; font-size: 11.5px; border-radius: 9px; }
  .sp-speed-wrap { display: none; }
  .sp-time { min-width: 30px; font-size: 10px; }
  .sp-seek { min-width: 60px; }
  .sp-bigplay { width: 60px; height: 60px; font-size: 21px; }
  .sp-top-bar { padding: 8px 10px; }
  .sp-player-title { font-size: 11.5px; }
}
.sp-player-box:fullscreen { border-radius: 0; }
.sp-player-box:fullscreen .sp-player-stage { width: 100%; height: 100%; aspect-ratio: auto; }

/* ---------- M5: سحب بالماوس ---------- */
/* v18 A1: أثناء السحب — نلغي الـ snap والسلوك الناعم عشان السحب يبقى لصيق بالماوس زي اللمس بالظبط */
.h-scroll.dragging { scroll-behavior: auto !important; scroll-snap-type: none !important; user-select: none; }
.h-scroll.dragging * { pointer-events: none; }

/* ---------- M6: المودال الزجاجي + اللوجو ---------- */
.sub-modal-glass {
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.65) !important;
  box-shadow: 0 30px 80px rgba(11,24,48,.35), inset 0 1px 0 rgba(255,255,255,.8) !important;
}
.sub-modal-logo {
  width: 66px; height: 66px; object-fit: contain; margin: -46px auto 4px;
  display: block; border-radius: 20px;
  background: rgba(255,255,255,.85); padding: 7px;
  box-shadow: 0 12px 30px rgba(22,48,94,.22); border: 1px solid rgba(255,255,255,.7);
}
.sub-modal-msg.ok { background: rgba(5,150,105,.1) !important; color: #047857 !important; border-color: rgba(5,150,105,.25) !important; }

/* ---------- M10: صور أكبر وأوضح في قائمة 4-20 ---------- */
.top-avatar-ring {
  flex: none; width: 54px; height: 54px; border-radius: 50%; padding: 2.5px;
  background: linear-gradient(135deg, #f97316, #fbbf24, #f97316);
  box-shadow: 0 5px 14px rgba(249,115,22,.22);
}
.top-avatar-ring .top-avatar {
  width: 100% !important; height: 100% !important; border-radius: 50%;
  object-fit: cover; border: 2px solid #fff; display: block;
}
.top-row { gap: 12px !important; padding: 11px 14px !important; }
.top-row.is-anon .top-avatar { filter: grayscale(.5); }
.top-row.is-anon .top-name { color: #64748b; }
@media (max-width: 380px) { .top-avatar-ring { width: 46px; height: 46px; } }

/* ---------- B1: مودال شروط الاستخدام ---------- */
.terms-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .25s ease; }
.terms-modal.show { opacity: 1; }
.terms-backdrop { position: absolute; inset: 0; background: rgba(11,24,48,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.terms-card {
  position: relative; width: 100%; max-width: 480px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7); border-radius: 26px; padding: 20px;
  box-shadow: 0 30px 90px rgba(11,24,48,.4);
  transform: translateY(14px) scale(.97); transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.terms-modal.show .terms-card { transform: none; }
.terms-head { text-align: center; padding-bottom: 12px; border-bottom: 1px dashed rgba(22,48,94,.12); }
.terms-logo { width: 58px; height: 58px; object-fit: contain; margin: 0 auto 6px; display: block; }
.terms-head h2 { color: #16305e; font-weight: 900; font-size: 16.5px; }
.terms-head p { color: #94a3b8; font-size: 11px; font-weight: 700; margin-top: 4px; }
.terms-body { overflow-y: auto; flex: 1; margin: 12px 0; padding-left: 6px; display: grid; gap: 10px; }
.terms-body::-webkit-scrollbar { width: 5px; }
.terms-body::-webkit-scrollbar-thumb { background: rgba(22,48,94,.18); border-radius: 999px; }
.terms-item {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(248,250,252,.9); border: 1px solid rgba(22,48,94,.06);
  border-radius: 16px; padding: 12px 13px;
}
.terms-item > i { color: #f97316; font-size: 16px; margin-top: 3px; flex: none; width: 20px; text-align: center; }
.terms-item b { color: #16305e; font-size: 12.5px; font-weight: 900; display: block; }
.terms-item p { color: #64748b; font-size: 11px; font-weight: 700; line-height: 1.85; margin-top: 3px; }
.terms-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: rgba(249,115,22,.07); border: 1.5px solid rgba(249,115,22,.28);
  border-radius: 14px; padding: 12px 14px; user-select: none;
}
.terms-check input { display: none; }
.terms-checkbox {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  border: 2px solid #f97316; background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; transition: all .2s ease;
}
.terms-check input:checked + .terms-checkbox { background: linear-gradient(135deg, #f97316, #fb923c); border-color: #f97316; transform: scale(1.05); }
.terms-check-label { color: #16305e; font-size: 12.5px; font-weight: 900; }
.terms-agree { margin-top: 12px !important; }
.terms-agree:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }

/* ---------- B2: ردع النسخ على صفحات الكورس ---------- */
#course-page { -webkit-user-select: none; user-select: none; }
#course-page input, #course-page textarea { -webkit-user-select: text; user-select: text; }

/* ---------- M11: الوضع الليلي (sp-dark) ---------- */
html.sp-dark body { background: #0b1424 !important; color: #dbe4f3; }
html.sp-dark .bg-white, html.sp-dark .glass-card,
html.sp-dark .card-hover, html.sp-dark .top-row,
html.sp-dark .my-sub-card, html.sp-dark .acc-item {
  background: #12203a !important; border-color: rgba(255,255,255,.07) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.35) !important;
}
html.sp-dark .bg-gray-100, html.sp-dark .bg-gray-50, html.sp-dark .bg-slate-50 { background: #0e1a30 !important; }
html.sp-dark .text-navy, html.sp-dark .acc-titles b, html.sp-dark .my-sub-info b,
html.sp-dark .settings-label, html.sp-dark .terms-item b, html.sp-dark .top-name { color: #e8eefb !important; }
html.sp-dark .text-gray-500, html.sp-dark .text-gray-400, html.sp-dark .settings-hint,
html.sp-dark .acc-titles small { color: #8fa3c4 !important; }
html.sp-dark .acc-item.acc-child { background: #0e1a30; }
html.sp-dark .acc-play-row { background: rgba(249,115,22,.08); border-color: rgba(249,115,22,.18); }
html.sp-dark .field-box, html.sp-dark .field-input { background: #0e1a30 !important; color: #dbe4f3 !important; border-color: rgba(255,255,255,.09) !important; }
html.sp-dark .my-subs-skel, html.sp-dark .course-hero-skel, html.sp-dark .course-acc-skel { background: #16233c; }
html.sp-dark .my-subs-empty { background: rgba(18,32,58,.85); border-color: rgba(255,255,255,.12); }
html.sp-dark .acc-locked-body { background: rgba(255,255,255,.03); }
html.sp-dark .settings-seg { background: #0e1a30; }
html.sp-dark .settings-seg button { color: #8fa3c4; }
html.sp-dark .settings-seg button.active { background: #f97316; color: #fff; }
html.sp-dark .acc-row { border-color: rgba(255,255,255,.06) !important; }
html.sp-dark .acc-row-val { color: #e8eefb !important; }
html.sp-dark .dash-sec-title { color: #e8eefb; }
html.sp-dark .sub-modal, html.sp-dark .sub-modal-glass { background: rgba(18,32,58,.88) !important; border-color: rgba(255,255,255,.12) !important; }
html.sp-dark .sub-modal-title { color: #e8eefb !important; }
html.sp-dark .top-list-note { color: #8fa3c4; }
html.sp-dark .terms-card { background: rgba(18,32,58,.94); border-color: rgba(255,255,255,.12); }
html.sp-dark .terms-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.07); }
html.sp-dark .terms-item p { color: #8fa3c4; }
html.sp-dark .terms-head h2, html.sp-dark .terms-check-label { color: #e8eefb; }

/* حجم الخط الفعّال في كل مكان (M11) */
html.sp-fs-small { font-size: 14px; }
html.sp-fs-large { font-size: 18px; }
/* ===================== /SP-V15-CSS ===================== */

/* SP-V15: الوضع الليلي — الهيدر والشريط السفلي */
html.sp-dark header { background: rgba(14,26,48,.92) !important; border-bottom: 1px solid rgba(255,255,255,.06); }
html.sp-dark header .text-navy, html.sp-dark header .font-black.text-navy { color: #e8eefb !important; }
html.sp-dark header .bg-gray-50 { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.08) !important; color: #dbe4f3 !important; }
html.sp-dark #logoutBtn { border-color: rgba(255,255,255,.14) !important; color: #dbe4f3 !important; }
html.sp-dark .bottom-nav, html.sp-dark #bottomNav { background: rgba(14,26,48,.95) !important; border-color: rgba(255,255,255,.07) !important; }
html.sp-dark .bn-item { color: #8fa3c4; }
html.sp-dark .bn-item.active { color: #f97316; }
html.sp-dark .chart-empty { color: #8fa3c4; }
html.sp-dark .quick-tile { background: #12203a; border-color: rgba(255,255,255,.07); }

/* ===================== SP-V16-CSS ===================== */

/* ---------- v16 M1: إطارات دائرية فخمة (بدل صور البراويز) — 3 مستويات فخامة ---------- */
.lux-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 5px;
  isolation: isolate;
}
.lux-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3.5px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: luxSpin 6s linear infinite;
}
.lux-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 2;
  background: #fff;
}
.lux-halo {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  z-index: 0;
  filter: blur(10px);
  opacity: .55;
  pointer-events: none;
}
.lux-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
  border: 2px solid #fff;
}
@keyframes luxSpin { to { transform: rotate(360deg); } }

/* الذهبي — أعلى فخامة: حلقة متحركة + هالة + تاج + شرارات */
.lux-gold { width: 104px; height: 104px; }
.lux-gold::before { background: conic-gradient(#f9d976, #b8860b, #ffe9a8, #d4a017, #fff3c4, #f9d976); }
.lux-gold .lux-halo { background: radial-gradient(circle, rgba(249,217,118,.9), transparent 70%); }
.lux-gold .lux-badge { background: linear-gradient(135deg, #d4a017, #b8860b); }
.lux-crown {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  z-index: 5;
  color: #f5b301;
  font-size: 20px;
  text-shadow: 0 2px 8px rgba(245,179,1,.55);
  animation: crownBob 2.6s ease-in-out infinite;
}
@keyframes crownBob { 0%,100% { transform: translateX(-50%) rotate(-6deg) translateY(0); } 50% { transform: translateX(-50%) rotate(4deg) translateY(-3px); } }
.lux-sparks { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.lux-sparks i {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 8px 2px rgba(249,217,118,.85);
  animation: sparkTwinkle 2.2s ease-in-out infinite;
}
.lux-sparks i:nth-child(1) { top: 6%; right: 10%; animation-delay: 0s; }
.lux-sparks i:nth-child(2) { bottom: 14%; right: -2%; animation-delay: .55s; }
.lux-sparks i:nth-child(3) { top: 28%; left: -4%; animation-delay: 1.1s; }
.lux-sparks i:nth-child(4) { bottom: 4%; left: 16%; animation-delay: 1.65s; }
@keyframes sparkTwinkle { 0%,100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }

/* الفضي — أكبر شوية من الأول (طلب المستر) وفخامة متوسطة: حلقة لامعة بدون شرارات */
.lux-silver { width: 86px; height: 86px; }
.lux-silver::before { background: conic-gradient(#eef2f7, #94a3b8, #ffffff, #b6c2d2, #eef2f7); animation-duration: 9s; }
.lux-silver .lux-halo { background: radial-gradient(circle, rgba(182,194,210,.75), transparent 70%); opacity: .45; }
.lux-silver .lux-badge { background: linear-gradient(135deg, #94a3b8, #64748b); }

/* البرونزي — أهدى: حلقة ثابتة تقريباً وهالة خفيفة */
.lux-bronze { width: 72px; height: 72px; }
.lux-bronze::before { background: conic-gradient(#e8b98a, #9a5b2d, #f3d1ab, #b3703a, #e8b98a); animation-duration: 14s; }
.lux-bronze .lux-halo { background: radial-gradient(circle, rgba(232,185,138,.6), transparent 70%); opacity: .35; }
.lux-bronze .lux-badge { background: linear-gradient(135deg, #b3703a, #9a5b2d); }

/* أحجام أكبر على الكمبيوتر */
@media (min-width: 640px) {
  .lux-gold { width: 128px; height: 128px; }
  .lux-silver { width: 104px; height: 104px; }
  .lux-bronze { width: 88px; height: 88px; }
  .lux-crown { font-size: 24px; top: -24px; }
}
/* نسخة البوديوم في صفحة /top */
.podium-lux { margin: 4px auto 8px; }

/* ---------- v16: زر تبديل الثيم في الهيدر ---------- */
.theme-toggle {
  position: relative;
  width: 58px;
  height: 30px;
  border-radius: 99px;
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  border: 1px solid rgba(0,0,0,.06);
  cursor: pointer;
  overflow: hidden;
  transition: background .45s ease;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 2px 8px rgba(245,158,11,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .45s cubic-bezier(.6,-0.28,.35,1.4), background .45s ease;
  z-index: 2;
}
.theme-ic-sun, .theme-ic-moon {
  position: absolute;
  font-size: 12px;
  color: #fff;
  transition: opacity .3s ease, transform .45s ease;
}
.theme-ic-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-toggle.is-dark { background: linear-gradient(135deg, #0f2244, #1e3a6d); border-color: rgba(255,255,255,.12); }
.theme-toggle.is-dark .theme-toggle-thumb {
  transform: translateX(-28px);
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  box-shadow: 0 2px 8px rgba(148,163,184,.5);
}
.theme-toggle.is-dark .theme-ic-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
.theme-toggle.is-dark .theme-ic-moon { opacity: 1; transform: rotate(0) scale(1); }
.theme-toggle-stars { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.theme-toggle.is-dark .theme-toggle-stars { opacity: 1; }
.theme-toggle-stars i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #e2e8f0;
  animation: sparkTwinkle 2.4s ease-in-out infinite;
}
.theme-toggle-stars i:nth-child(1) { top: 7px; right: 10px; }
.theme-toggle-stars i:nth-child(2) { bottom: 6px; right: 20px; animation-delay: .7s; }
.theme-toggle-stars i:nth-child(3) { top: 10px; right: 28px; animation-delay: 1.3s; }

/* موجة الانتقال الدائرية عند تبديل الثيم */
.theme-wave {
  position: fixed;
  z-index: 999;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%,-50%) scale(0);
  pointer-events: none;
  opacity: .96;
}
.theme-wave.to-dark { background: radial-gradient(circle, #16305e, #0b1424); }
.theme-wave.to-light { background: radial-gradient(circle, #ffffff, #eff6ff); }
.theme-wave.go {
  transform: translate(-50%,-50%) scale(320);
  opacity: 0;
  transition: transform .8s cubic-bezier(.3,.6,.35,1), opacity .55s ease .25s;
}

/* ---------- v16: انتقال ناعم بين الصفحات ---------- */
.page-enter { animation: pageFadeIn .5s cubic-bezier(.25,.6,.35,1) both; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
html.sp-reduce-motion .page-enter { animation: none; }

/* ---------- v16: Skeleton loaders لكروت الكورسات ---------- */
.skel-cards { display: flex !important; gap: 1rem; background: none !important; border: none !important; padding: 0 !important; width: 100%; }
.skel-card {
  flex: 0 0 84%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
@media (min-width: 640px) { .skel-card { flex-basis: 46%; } }
.skel-cover { height: 130px; width: 100%; }
.skel-line { height: 12px; border-radius: 8px; margin: 0 16px; }
.skel-line.w70 { width: 70%; } .skel-line.w60 { width: 60%; } .skel-line.w75 { width: 75%; }
.skel-line.w45 { width: 45%; } .skel-line.w40 { width: 40%; } .skel-line.w50 { width: 50%; }
.skel-line.w85 { width: 85%; } .skel-line.w80 { width: 80%; }
.skel-btn { height: 40px; border-radius: 16px; margin: 6px 16px 0; }
.skel-cover, .skel-line, .skel-btn {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: skelShimmer 1.4s ease-in-out infinite;
}
@keyframes skelShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
html.sp-dark .skel-card { background: #12203a; border-color: rgba(255,255,255,.07); }
html.sp-dark .skel-cover, html.sp-dark .skel-line, html.sp-dark .skel-btn {
  background: linear-gradient(90deg, #16233c 25%, #1d2c4a 50%, #16233c 75%);
  background-size: 200% 100%;
}

/* ---------- v16 B3: شريط تقدم الكورس ---------- */
.course-progress { margin-bottom: 14px; }
.course-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
  margin-bottom: 6px;
}
.course-progress-head b { color: #f4791f; font-size: 13px; }
.course-progress-track {
  height: 10px;
  border-radius: 99px;
  background: #eef2f7;
  overflow: hidden;
  position: relative;
}
.course-progress-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f4791f, #fbbf24);
  position: relative;
  transition: width 1s cubic-bezier(.3,.6,.35,1);
  min-width: 6px;
}
.course-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: progShine 2.2s ease-in-out infinite;
}
@keyframes progShine { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.course-progress small { display: block; margin-top: 5px; font-size: 10.5px; font-weight: 700; color: #94a3b8; }
html.sp-dark .course-progress-track { background: #0e1a30; }
html.sp-dark .course-progress-head { color: #8fa3c4; }

/* شريط تقدم مصغر في كارت "اشتراكاتي" بالرئيسية */
.my-sub-prog { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.my-sub-prog-track { flex: 1; height: 7px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.my-sub-prog-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f4791f, #fbbf24); min-width: 5px; }
.my-sub-prog em { font-style: normal; font-size: 10.5px; font-weight: 900; color: #f4791f; }
html.sp-dark .my-sub-prog-track { background: #0e1a30; }

/* ---------- v16 B1: تبويبات الأوائل / الأكثر تقدماً ---------- */
.top-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 4px 16px rgba(22,48,94,.06);
  width: fit-content;
}
.top-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 900;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .35s cubic-bezier(.3,.6,.35,1);
}
.top-tab i { font-size: 12px; }
.top-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #f4791f, #fb923c);
  box-shadow: 0 6px 16px rgba(244,121,31,.35);
  transform: translateY(-1px);
}
html.sp-dark .top-tabs { background: #12203a; border-color: rgba(255,255,255,.07); }
html.sp-dark .top-tab { color: #8fa3c4; }
html.sp-dark .top-tab.active { color: #fff; }

/* كارت بطل التقدم */
.improve-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #16305e, #274a8e);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 16px 40px rgba(22,48,94,.3);
  position: relative;
  overflow: hidden;
}
.improve-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(251,191,36,.22), transparent 55%);
  pointer-events: none;
}
.improve-hero-ic {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4791f, #fbbf24);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(244,121,31,.4);
  animation: heroBob 2.4s ease-in-out infinite;
}
@keyframes heroBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.improve-hero-body { flex: 1; min-width: 0; }
.improve-hero-body small { display: block; font-size: 10.5px; font-weight: 800; color: #9db6e0; }
.improve-hero-body b { display: block; font-size: 16px; font-weight: 900; color: #fff; margin-top: 2px; }
.improve-hero-delta {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 900;
  color: #052e16;
  background: linear-gradient(135deg, #4ade80, #a3e635);
  box-shadow: 0 4px 12px rgba(74,222,128,.35);
}
.improve-hero-ring { width: 64px; height: 64px; flex-shrink: 0; }
.improve-hero-ring .lux-photo { background: #16305e; }
.improve-delta { color: #16a34a !important; }
html.sp-dark .improve-delta { color: #4ade80 !important; }

/* شارة التعادل في القائمة */
.top-tied {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  color: #7c3aed;
  margin-top: 2px;
}
html.sp-dark .top-tied { color: #a78bfa; }

/* ---------- v16 M4: حواف التلاشي — mask بدل تدرج أبيض (شغالة صح في الليلي والصباحي) ---------- */
.h-scroll-wrap::before, .h-scroll-wrap::after { display: none !important; }
.h-scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}

/* ---------- v16 M3: إصلاحات الثيم الليلي الشاملة (أبيض على أبيض) ---------- */
/* كروت الكورسات: النص جوه الكارت الأبيض */
html.sp-dark .card-hover h3, html.sp-dark .card-hover .text-navy { color: #e8eefb !important; }
html.sp-dark .card-hover .text-gray-500, html.sp-dark .card-hover p { color: #8fa3c4 !important; }
html.sp-dark .course-chip { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.1) !important; }
html.sp-dark .chip-grade { color: #9db6e0 !important; }
html.sp-dark .btn-course-peek { background: rgba(255,255,255,.07) !important; color: #dbe4f3 !important; border-color: rgba(255,255,255,.12) !important; }
html.sp-dark .subs-active-row { background: rgba(34,197,94,.1) !important; color: #4ade80 !important; border-color: rgba(74,222,128,.22) !important; }
html.sp-dark .price-new { color: #fb923c !important; }
html.sp-dark .price-old { color: #64748b !important; }
/* الحالات الفاضية والرمادية */
html.sp-dark .subs-empty, html.sp-dark .top-list-empty {
  background: rgba(18,32,58,.7) !important;
  border-color: rgba(255,255,255,.09) !important;
}
html.sp-dark .subs-empty .text-navy, html.sp-dark .top-list-empty .text-navy { color: #e8eefb !important; }
/* البوديوم والأوائل */
html.sp-dark .podium-card { background: #12203a !important; border-color: rgba(255,255,255,.08) !important; }
html.sp-dark .podium-name { color: #e8eefb !important; }
html.sp-dark .my-rank-card, html.sp-dark .rank-glass { background: #12203a !important; border-color: rgba(255,255,255,.08) !important; }
html.sp-dark .lux-photo { background: #12203a; }
html.sp-dark .lux-badge { border-color: #12203a; }
/* الحساب: الصفوف البيضاء */
html.sp-dark .acc-row { background: rgba(255,255,255,.045) !important; }
html.sp-dark .acc-row-label { color: #7d92b5 !important; }
html.sp-dark .settings-row { background: rgba(255,255,255,.03) !important; border-color: rgba(255,255,255,.06) !important; }
/* المشغل والكورس */
html.sp-dark .course-hero { border-color: rgba(255,255,255,.09) !important; }
html.sp-dark .acc-group { border-color: rgba(244,121,31,.3) !important; }
/* أزرار وحقول عامة */
html.sp-dark .bg-orange-50 { background: rgba(244,121,31,.12) !important; }
html.sp-dark .border-gray-100, html.sp-dark .border-gray-200 { border-color: rgba(255,255,255,.09) !important; }
html.sp-dark .shadow-md, html.sp-dark .shadow-sm { box-shadow: 0 10px 30px rgba(0,0,0,.35) !important; }
html.sp-dark .text-gray-600, html.sp-dark .text-gray-700 { color: #b9c7e0 !important; }
html.sp-dark .home-top3-name { color: #e8eefb !important; }
html.sp-dark .home-top3-score { color: #8fa3c4 !important; }
html.sp-dark .subs-head { color: #e8eefb !important; }
html.sp-dark .water-text b { color: #e8eefb !important; }
html.sp-dark .glass-card-head { color: #e8eefb !important; }
html.sp-dark .my-subs-empty .text-navy, html.sp-dark .my-subs-empty div { color: #e8eefb; }
html.sp-dark .improve-hero { border-color: rgba(255,255,255,.14); }
/* توست ومودالات */
html.sp-dark .sub-modal-course { color: #9db6e0 !important; }
html.sp-dark .sub-modal-price { background: rgba(255,255,255,.05) !important; color: #dbe4f3 !important; }
html.sp-dark .sub-modal-no { background: rgba(255,255,255,.07) !important; color: #dbe4f3 !important; }
/* انتقال ناعم لتغيير الألوان في كل العناصر الرئيسية */
body, header, .glass-card, .card-hover, .acc-item, .top-row, .my-sub-card, .podium-card, .skel-card, .top-tabs, .acc-row {
  transition: background-color .45s ease, border-color .45s ease, color .3s ease;
}
/* ===================== /SP-V16-CSS ===================== */

/* ==================== SP-V17-CSS ==================== */

/* ---- v17 F5: أقراص سوشيال ميديا 3D بتلف ---- */
.social-discs { perspective: 700px; }
.disc-3d {
  display: block; width: 46px; height: 46px; cursor: pointer; position: relative;
  filter: drop-shadow(0 8px 14px rgba(15,23,42,.22));
  transition: transform .25s ease;
}
.disc-3d:hover { transform: translateY(-4px) scale(1.08); }
.disc-spin {
  position: absolute; inset: 0; transform-style: preserve-3d;
  animation: disc-rotate 5.5s linear infinite;
}
.disc-3d:hover .disc-spin { animation-duration: 1.4s; }
@keyframes disc-rotate {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}
.disc-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff; backface-visibility: hidden;
  border: 2.5px solid rgba(255,255,255,.55);
  box-shadow: inset 0 3px 8px rgba(255,255,255,.35), inset 0 -4px 9px rgba(0,0,0,.28);
}
.disc-front { transform: translateZ(3px); }
.disc-back { transform: rotateY(180deg) translateZ(3px); }
.disc-rim {
  position: absolute; inset: 0; border-radius: 50%;
  transform: translateZ(0);
  background: rgba(255,255,255,.12);
}
.disc-fb .disc-face { background: linear-gradient(145deg, #1877f2, #0e5fcb); }
.disc-yt .disc-face { background: linear-gradient(145deg, #ff0033, #c4001f); }
.disc-tg .disc-face { background: linear-gradient(145deg, #2aabee, #1583c7); }
.disc-tk .disc-face { background: linear-gradient(145deg, #2b2b3d, #0f0f1a); }
.disc-wa .disc-face { background: linear-gradient(145deg, #25d366, #17a74d); }
@media (max-width: 640px) {
  .disc-3d { width: 40px; height: 40px; }
  .disc-face { font-size: 16px; }
}

/* ---- v17 F2: معلومات السنتر داخل الكارت ---- */
.center-card { cursor: pointer; }
.center-info { max-height: 0; overflow: hidden; transition: max-height .45s ease; }
.center-card.open .center-info { max-height: 320px; }
.center-card.open .center-chev { transform: rotate(180deg); }
.center-chev { display: inline-block; transition: transform .3s ease; }
.center-info-inner {
  margin-top: 14px; padding-top: 13px; border-top: 1.5px dashed rgba(148,163,184,.35);
  display: flex; flex-direction: column; gap: 8px; text-align: right;
}
.center-info-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; font-weight: 800; color: #475569;
}
.center-info-row i { color: #f4791f; margin-top: 2px; width: 16px; text-align: center; flex: none; }
.center-info-wa {
  margin-top: 5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: #25d366; color: #fff; font-weight: 900; font-size: 12px;
  border-radius: 14px; padding: 9px 14px; transition: transform .2s ease, box-shadow .2s ease;
}
.center-info-wa:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37,211,102,.4); }

/* ---- v17 F3: قسم آراء الطلاب الفاضي ---- */
.testimonials-empty {
  background: #fff; border: 1.5px dashed rgba(148,163,184,.4); border-radius: 24px;
  padding: 38px 20px; text-align: center;
}
.tst-empty-ic {
  width: 58px; height: 58px; margin: 0 auto; border-radius: 50%;
  background: rgba(244,121,31,.1); color: #f4791f; font-size: 23px;
  display: flex; align-items: center; justify-content: center;
}

/* ---- v18 A2/A6: ستارة الإيقاف — بتختفي فعليًا مع hidden وبتشغّل بالضغط ---- */
.sp-pause-curtain {
  position: absolute; inset: 0; z-index: 6; cursor: pointer;
  background: radial-gradient(120% 120% at 50% 30%, #1c3564 0%, #0e2247 55%, #091830 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
/* v18 A2/A6: الإصلاح الجوهري — display:flex كان بيلغي خاصية hidden فالستارة وطبقة التحميل كانوا ثابتين فوق الفيديو وبيمنعوا التشغيل على الكمبيوتر */
.sp-player-stage [hidden] { display: none !important; }
.sp-player-box[hidden] { display: none !important; }
.sp-curtain-logo {
  width: 92px; height: 92px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 44px rgba(244,121,31,.28);
  animation: curtain-float 3.2s ease-in-out infinite;
}
.sp-curtain-logo img { width: 68px; height: 68px; object-fit: contain; }
@keyframes curtain-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.sp-curtain-txt { color: rgba(255,255,255,.75); font-size: 12.5px; font-weight: 800; padding: 0 16px; text-align: center; }

/* ---- v17 F12: مربع تحديد الجودة ---- */
.sp-quality-wrap { position: relative; }
.sp-quality-menu {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: rgba(14,25,45,.97); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 6px; min-width: 118px; z-index: 30;
  box-shadow: 0 14px 34px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 2px;
}
.sp-q-item {
  border: none; background: transparent; color: #cbd5e1; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 800;
  padding: 8px 12px; border-radius: 10px; text-align: center; direction: ltr;
  transition: background .15s ease, color .15s ease;
}
.sp-q-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.sp-q-item.active { background: rgba(249,115,22,.9); color: #fff; }

/* ---- v17 F7: كروت "اشتراكاتي" المستطيلة في الرئيسية ---- */
.my-subs-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.my-sub2-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 22px;
  border: 1px solid rgba(226,232,240,.9); box-shadow: 0 8px 22px rgba(15,23,42,.07);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.my-sub2-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15,23,42,.13); }
.my-sub2-cover { position: relative; height: 118px; display: block; overflow: hidden; }
.my-sub2-teacher {
  position: absolute; bottom: 0; left: 8px; height: 108px; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3));
}
.my-sub2-cover-title {
  position: absolute; top: 12px; right: 14px; max-width: 58%;
  color: #fff; font-size: 14px; font-weight: 900; line-height: 1.5;
  text-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.my-sub2-body { display: flex; flex-direction: column; gap: 8px; padding: 13px 15px 15px; }
.my-sub2-name { color: #16305e; font-size: 14.5px; font-weight: 900; }
.my-sub2-prog { display: flex; align-items: center; gap: 8px; }
.my-sub2-track { flex: 1; height: 7px; border-radius: 999px; background: rgba(148,163,184,.22); overflow: hidden; }
.my-sub2-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f4791f, #fbbf24); transition: width .8s ease; }
.my-sub2-prog em { font-style: normal; font-size: 11px; font-weight: 900; color: #f4791f; min-width: 32px; text-align: left; direction: ltr; }
.my-sub2-state { color: #10b981; font-size: 11px; font-weight: 800; }
.my-sub2-state i { margin-left: 4px; }
.my-sub2-go {
  margin-top: 3px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #f97316, #fb923c); color: #fff;
  font-size: 12.5px; font-weight: 900; border-radius: 14px; padding: 9px 12px;
}
.my-sub2-go i { transition: transform .2s ease; }
.my-sub2-card:hover .my-sub2-go i { transform: translateX(-4px); }

/* ---- v17 B1: صفحة الإشراف ---- */
.admin-body { min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226,232,240,.9);
  box-shadow: 0 4px 18px rgba(15,23,42,.06);
}
.admin-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #16305e, #2a4a85); color: #fbbf24;
  font-size: 11px; font-weight: 900; border-radius: 999px; padding: 5px 12px;
  border: 1px solid rgba(251,191,36,.35); margin-right: 6px;
  box-shadow: 0 4px 12px rgba(22,48,94,.28);
}
.admin-exit-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(239,68,68,.09); color: #dc2626;
  font-size: 12.5px; font-weight: 900; border-radius: 14px; padding: 9px 14px;
  border: 1px solid rgba(239,68,68,.22);
  transition: background .2s ease, transform .2s ease;
}
.admin-exit-btn:hover { background: #dc2626; color: #fff; transform: translateY(-1px); }
.admin-empty-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.admin-empty-hero { text-align: center; max-width: 420px; }
.admin-empty-ic {
  width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(244,121,31,.14), rgba(251,191,36,.1));
  color: #f4791f; font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(244,121,31,.2);
  box-shadow: 0 14px 34px rgba(244,121,31,.14);
  animation: curtain-float 3.4s ease-in-out infinite;
}
.admin-empty-hero h1 { color: #16305e; font-size: 21px; font-weight: 900; }
.admin-empty-hero p { color: #94a3b8; font-size: 13px; font-weight: 700; margin-top: 9px; line-height: 1.9; }
/* الوضع الليلي لصفحة الإشراف */
.sp-dark .admin-topbar { background: rgba(13,23,42,.96); border-bottom-color: rgba(51,65,85,.6); }
.sp-dark .admin-topbar .text-navy { color: #e2e8f0; }
.sp-dark .admin-topbar .text-gray-500 { color: #94a3b8; }
.sp-dark .admin-empty-hero h1 { color: #e2e8f0; }

/* الوضع الليلي: قسم الآراء الفاضي + معلومات السنتر + كروت اشتراكاتي */
.sp-dark .testimonials-empty { background: #12203c; border-color: rgba(71,85,105,.5); }
.sp-dark .my-sub2-card { background: #12203c; border-color: rgba(51,65,85,.6); }
.sp-dark .my-sub2-name { color: #e2e8f0; }

/* ==================== /SP-V17-CSS ==================== */

/* ============================================================
   SP-V18-CSS — لوحة الإشراف الكاملة (بوابة + درج + أقسام)
   ============================================================ */

/* ---------- بوابة الدخول ---------- */
.admin-gate { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-gate-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid #e6e9f2; border-radius: 22px; padding: 34px 28px; box-shadow: 0 20px 60px rgba(22,48,94,.12); text-align: center; }
.sp-dark .admin-gate-card { background: #101a2e; border-color: #23324e; }
.admin-gate[hidden] { display: none; }
.admin-gate-card .agc-ic, .admin-gate-card .admin-gate-ic { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 20px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 10px 26px rgba(22,48,94,.3); }
.admin-gate-card h1, .admin-gate-card h2 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 900; color: #16305e; }
.sp-dark .admin-gate-card h1, .sp-dark .admin-gate-card h2 { color: #e8eefc; }
.admin-gate-card p { margin: 0 0 18px; font-size: .85rem; opacity: .65; }
.admin-gate-card form { display: flex; flex-direction: column; gap: 12px; }
.admin-gate-card input[type="password"], .admin-gate-card input[type="text"], .admin-gate-card input[type="tel"], .admin-gate-card input[type="number"] { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1.5px solid #dde3f0; background: #f8faff; font-family: inherit; font-size: .95rem; font-weight: 700; text-align: center; color: #16305e; transition: .2s; outline: none; }
.admin-gate-card input:focus { border-color: #f4791f; background: #fff; box-shadow: 0 0 0 4px rgba(244,121,31,.12); }
.sp-dark .admin-gate-card input { background: #0c1526; border-color: #2a3e63; color: #e8eefc; }
.sp-dark .admin-gate-card input:focus { background: #101c36; border-color: #f4791f; }
.admin-gate-card button[type="submit"] { width: 100%; padding: 13px; border: 0; border-radius: 14px; background: linear-gradient(135deg,#f4791f,#f9a03f); color: #fff; font-family: inherit; font-size: .95rem; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; box-shadow: 0 10px 24px rgba(244,121,31,.35); transition: .2s; }
.admin-gate-card button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(244,121,31,.45); }
.admin-gate-card button[type="submit"]:active { transform: translateY(0); }
.admin-gate-err { background: #fee2e2; color: #b91c1c; border-radius: 12px; padding: 9px 12px; font-size: .82rem; margin-bottom: 12px; font-weight: 700; }
.sp-dark .admin-gate-err { background: rgba(185,28,28,.18); color: #fca5a5; }

/* ---------- زر الـ 3 شرط ---------- */
.admin-burger { width: 44px; height: 44px; border-radius: 13px; border: 1px solid #e2e6f0; background: #fff; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; transition: .2s; }
.sp-dark .admin-burger { background: #14203a; border-color: #26375a; }
.admin-burger span { display: block; width: 20px; height: 2.5px; border-radius: 3px; background: #16305e; transition: .25s; }
.sp-dark .admin-burger span { background: #dbe4ff; }
.admin-burger:hover { border-color: #f4791f; }
.admin-burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.admin-burger.is-open span:nth-child(2) { opacity: 0; }
.admin-burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- الدرج الجانبي ---------- */
.admin-drawer-overlay { position: fixed; inset: 0; background: rgba(8,14,28,.45); backdrop-filter: blur(2px); z-index: 940; }
.admin-drawer { position: fixed; top: 0; right: -300px; width: 288px; height: 100dvh; background: #fff; border-left: 1px solid #e6e9f2; z-index: 950; display: flex; flex-direction: column; transition: right .3s cubic-bezier(.22,.9,.3,1); box-shadow: -14px 0 44px rgba(10,18,40,.14); }
.sp-dark .admin-drawer { background: #0e1830; border-color: #23324e; }
.admin-drawer.open { right: 0; }
.admin-drawer-head { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; border-bottom: 1px solid #edf0f7; }
.sp-dark .admin-drawer-head { border-color: #1d2b47; }
.admin-drawer-head .adh-ic { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.admin-drawer-head b { font-size: .95rem; display: block; }
.admin-drawer-head small { font-size: .72rem; opacity: .6; }
.admin-nav { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.admin-nav button { display: flex; align-items: center; gap: 11px; width: 100%; text-align: right; padding: 11.5px 13px; border: 0; background: transparent; border-radius: 12px; font-family: inherit; font-size: .89rem; font-weight: 700; color: #334; cursor: pointer; transition: .16s; }
.sp-dark .admin-nav button { color: #c7d3ec; }
.admin-nav button i { width: 20px; text-align: center; color: #16305e; opacity: .75; }
.sp-dark .admin-nav button i { color: #8fa8d8; }
.admin-nav button:hover { background: #f2f5fb; }
.sp-dark .admin-nav button:hover { background: #16233e; }
.admin-nav button.active { background: linear-gradient(135deg,#16305e,#2a4a85); color: #fff; box-shadow: 0 6px 18px rgba(22,48,94,.28); }
.admin-nav button.active i { color: #ffd166; opacity: 1; }
.admin-drawer-foot { padding: 12px; border-top: 1px solid #edf0f7; display: flex; gap: 8px; }
.sp-dark .admin-drawer-foot { border-color: #1d2b47; }
.admin-drawer-foot button { flex: 1; padding: 10px; border-radius: 11px; border: 1px solid #e2e6f0; background: #fff; font-family: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; transition: .16s; }
.sp-dark .admin-drawer-foot button { background: #14203a; border-color: #26375a; color: #dbe4ff; }
.admin-drawer-foot button:hover { border-color: #f4791f; color: #f4791f; }

/* ---------- المحتوى الرئيسي ---------- */
.admin-main { max-width: 1180px; margin: 0 auto; padding: 22px 18px 80px; }
.admin-sec { display: none; animation: adminFade .3s ease; }
.admin-sec.active { display: block; }
@keyframes adminFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.admin-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-sec-head h2 { margin: 0; font-size: 1.28rem; display: flex; align-items: center; gap: 10px; }
.admin-sec-head h2 i { color: #f4791f; }
.admin-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- أزرار عامة ---------- */
.admin-btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 12px; border: 1px solid #dfe4ef; background: #fff; color: #223; font-family: inherit; font-size: .84rem; font-weight: 800; cursor: pointer; transition: .18s; }
.sp-dark .admin-btn { background: #14203a; border-color: #26375a; color: #dbe4ff; }
.admin-btn:hover { transform: translateY(-1px); border-color: #f4791f; }
.admin-btn.primary { background: linear-gradient(135deg,#16305e,#2a4a85); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(22,48,94,.25); }
.admin-btn.gold { background: linear-gradient(135deg,#f4791f,#f9a03f); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(244,121,31,.3); }
.admin-btn.danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.sp-dark .admin-btn.danger { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); color: #fca5a5; }
.admin-btn.warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.sp-dark .admin-btn.warn { background: rgba(180,83,9,.14); border-color: rgba(180,83,9,.4); color: #fcd34d; }
.admin-btn.ok { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.sp-dark .admin-btn.ok { background: rgba(22,163,74,.12); border-color: rgba(22,163,74,.35); color: #86efac; }
.admin-btn.sm { padding: 7px 11px; font-size: .76rem; border-radius: 10px; }
.admin-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.admin-back-btn { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 8px 14px; border-radius: 11px; border: 1px solid #dfe4ef; background: #fff; font-family: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; transition: .16s; }
.sp-dark .admin-back-btn { background: #14203a; border-color: #26375a; color: #dbe4ff; }
.admin-back-btn:hover { border-color: #f4791f; color: #f4791f; }

/* ---------- كروت الإحصائيات ---------- */
.admin-stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.admin-stat-card { background: #fff; border: 1px solid #e6e9f2; border-radius: 17px; padding: 16px 14px; text-align: center; position: relative; overflow: hidden; transition: .2s; }
.sp-dark .admin-stat-card { background: #101a2e; border-color: #23324e; }
.admin-stat-card::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 3.5px; background: var(--sc, #f4791f); }
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,25,50,.1); }
.admin-stat-card i { font-size: 1.15rem; color: var(--sc, #f4791f); margin-bottom: 7px; display: block; }
.admin-stat-card b { display: block; font-size: 1.45rem; line-height: 1.1; }
.admin-stat-card span { font-size: .72rem; opacity: .62; font-weight: 700; }

/* ---------- كروت الرسوم البيانية ---------- */
.admin-charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-chart-card { background: #fff; border: 1px solid #e6e9f2; border-radius: 17px; padding: 16px; }
.sp-dark .admin-chart-card { background: #101a2e; border-color: #23324e; }
.admin-chart-card.wide { grid-column: 1 / -1; }
.admin-chart-card h4 { margin: 0 0 10px; font-size: .88rem; }
.admin-chart-card canvas { max-height: 230px; }

/* ---------- اللوحات ---------- */
.admin-panel { background: #fff; border: 1px solid #e6e9f2; border-radius: 17px; padding: 18px; margin-bottom: 16px; }
.sp-dark .admin-panel { background: #101a2e; border-color: #23324e; }
.admin-panel.slim { padding: 14px 16px; }
.admin-panel h3 { margin: 0 0 12px; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.admin-panel h3 i, .admin-panel h4 i { color: #f4791f; }
.admin-panel h4 { margin: 0 0 8px; font-size: .9rem; }
.admin-panel.ok-panel { border-color: #bbf7d0; background: #f0fdf4; display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.sp-dark .admin-panel.ok-panel { background: rgba(22,163,74,.1); border-color: rgba(22,163,74,.32); }
.admin-panel.ok-panel i { color: #16a34a; font-size: 1.3rem; }
.admin-panel.sus-panel { border-color: #fecaca; }
.sp-dark .admin-panel.sus-panel { border-color: rgba(220,38,38,.4); }
.admin-panel.sus-panel h3 i { color: #dc2626; }
.sus-reason { background: #fef2f2; color: #b91c1c; border-radius: 11px; padding: 9px 12px; font-size: .83rem; font-weight: 700; margin: 0 0 12px; }
.sp-dark .sus-reason { background: rgba(220,38,38,.12); color: #fca5a5; }

/* ---------- الإدخالات ---------- */
.admin-input { padding: 10.5px 13px; border-radius: 12px; border: 1.5px solid #dfe4ef; background: #fff; font-family: inherit; font-size: .87rem; width: 100%; transition: .16s; }
.sp-dark .admin-input { background: #0c1526; border-color: #26375a; color: #e8eefb; }
.admin-input:focus { outline: none; border-color: #f4791f; box-shadow: 0 0 0 3px rgba(244,121,31,.13); }
.admin-input.xs { width: 76px; flex: 0 0 auto; text-align: center; }
.admin-input.grow { flex: 1; min-width: 0; }
.admin-textarea { padding: 11px 13px; border-radius: 12px; border: 1.5px solid #dfe4ef; background: #fff; font-family: inherit; font-size: .87rem; width: 100%; resize: vertical; transition: .16s; margin-bottom: 10px; }
.sp-dark .admin-textarea { background: #0c1526; border-color: #26375a; color: #e8eefb; }
.admin-textarea:focus { outline: none; border-color: #f4791f; box-shadow: 0 0 0 3px rgba(244,121,31,.13); }
.admin-color { width: 46px; height: 42px; border-radius: 11px; border: 1.5px solid #dfe4ef; background: #fff; padding: 3px; cursor: pointer; flex: 0 0 auto; }
.admin-form-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.admin-form-col { display: flex; flex-direction: column; gap: 10px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.admin-form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; font-weight: 800; opacity: .85; }
.admin-check { display: flex; align-items: center; gap: 9px; font-size: .86rem; cursor: pointer; }
.admin-check input { width: 17px; height: 17px; accent-color: #f4791f; cursor: pointer; }
.admin-check.big { font-size: .92rem; }
.admin-divider { height: 1px; background: #edf0f7; margin: 16px 0; }
.sp-dark .admin-divider { background: #1d2b47; }
.admin-hint { font-size: .8rem; opacity: .72; margin: 8px 0; line-height: 1.7; }
.admin-hint.ok { color: #16a34a; opacity: 1; font-weight: 700; }
.admin-hint.warn { color: #b45309; opacity: 1; font-weight: 700; }
.sp-dark .admin-hint.warn { color: #fcd34d; }
.admin-muted { opacity: .55; font-size: .8rem; }
.admin-muted.pad { display: block; padding: 10px 14px; }

/* ---------- الصفوف والرقائق ---------- */
.admin-rows { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.admin-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid #edf0f7; border-radius: 13px; background: #fbfcfe; flex-wrap: wrap; transition: .15s; }
.sp-dark .admin-row { background: #0c1526; border-color: #1d2b47; }
.admin-row.click { cursor: pointer; }
.admin-row.click:hover { border-color: #f4791f; transform: translateX(-2px); }
.admin-row-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #e8ecf5; display: flex; align-items: center; justify-content: center; color: #16305e; flex-shrink: 0; }
.sp-dark .admin-row-avatar { background: #1a2947; color: #8fa8d8; }
.admin-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-row-ic { color: #16305e; opacity: .6; width: 20px; text-align: center; flex-shrink: 0; }
.sp-dark .admin-row-ic { color: #8fa8d8; }
.admin-row-main { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 2px; }
.admin-row-main b { font-size: .88rem; }
.admin-row-main span { font-size: .76rem; opacity: .65; }
.admin-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3.5px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; background: #eef1f8; color: #445; }
.sp-dark .admin-chip { background: #1a2947; color: #b9c8e8; }
.admin-chip.red { background: #fee2e2; color: #b91c1c; }
.admin-chip.green { background: #dcfce7; color: #15803d; }
.admin-chip.blue { background: #dbeafe; color: #1d4ed8; }
.admin-chip.amber { background: #fef3c7; color: #b45309; }
.admin-chip.gold { background: #ffedd5; color: #c2410c; }
.sp-dark .admin-chip.red { background: rgba(185,28,28,.18); color: #fca5a5; }
.sp-dark .admin-chip.green { background: rgba(21,128,61,.18); color: #86efac; }
.sp-dark .admin-chip.blue { background: rgba(29,78,216,.18); color: #93c5fd; }
.sp-dark .admin-chip.amber { background: rgba(180,83,9,.18); color: #fcd34d; }
.sp-dark .admin-chip.gold { background: rgba(194,65,12,.18); color: #fdba74; }

/* ---------- شريط أدوات الطلاب ---------- */
.admin-toolbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.admin-toolbar .admin-input { flex: 1; min-width: 200px; width: auto; }
.admin-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-filters button { padding: 8px 13px; border-radius: 999px; border: 1px solid #dfe4ef; background: #fff; font-family: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; transition: .15s; }
.sp-dark .admin-filters button { background: #14203a; border-color: #26375a; color: #c7d3ec; }
.admin-filters button.active { background: #16305e; border-color: #16305e; color: #fff; }
.admin-ban-btn { padding: 7px 13px; border-radius: 10px; border: 0; font-family: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; background: #fee2e2; color: #b91c1c; transition: .15s; }
.admin-ban-btn.unban { background: #dcfce7; color: #15803d; }
.admin-ban-btn:hover { transform: translateY(-1px); }

/* ---------- بروفايل الطالب ---------- */
.prof-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.prof-avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #e8ecf5; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: #16305e; border: 3px solid #f4791f; position: relative; flex-shrink: 0; }
.sp-dark .prof-avatar { background: #1a2947; color: #8fa8d8; }
.prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prof-head-info { flex: 1; min-width: 200px; }
.prof-head-info h2 { margin: 0 0 6px; font-size: 1.3rem; }
.prof-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.prof-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.prof-info-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #edf0f7; border-radius: 13px; background: #fbfcfe; }
.sp-dark .prof-info-item { background: #0c1526; border-color: #1d2b47; }
.prof-info-item i { color: #f4791f; width: 18px; text-align: center; }
.prof-info-item > div { flex: 1; min-width: 0; }
.prof-info-item small { display: block; font-size: .68rem; opacity: .6; font-weight: 800; }
.prof-info-item b { font-size: .86rem; word-break: break-word; }
.ac-mini { width: 31px; height: 31px; border-radius: 9px; border: 1px solid #dfe4ef; background: #fff; color: #556; font-size: .74rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .15s; flex-shrink: 0; }
.sp-dark .ac-mini { background: #14203a; border-color: #26375a; color: #b9c8e8; }
.ac-mini:hover { border-color: #f4791f; color: #f4791f; transform: translateY(-1px); }
.ac-mini.danger { color: #dc2626; }
.ac-mini.danger:hover { border-color: #dc2626; background: #fef2f2; }
.ac-mini.gold { color: #f4791f; border-color: rgba(244,121,31,.45); }
.ac-mini.ok { color: #16a34a; }
.ac-mini.ok:hover { border-color: #16a34a; }
.ac-mini.warn { color: #b45309; }
.ac-mini.wa { color: #16a34a; text-decoration: none; }
.prof-circles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.prof-circle { text-align: center; padding: 12px; }
.prof-circle canvas { max-width: 110px; max-height: 110px; margin: 0 auto; }
.prof-circle b { display: block; margin-top: 8px; font-size: 1rem; }
.prof-circle span { font-size: .72rem; opacity: .62; font-weight: 700; }
.prof-course { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #edf0f7; border-radius: 13px; background: #fbfcfe; flex-wrap: wrap; margin-bottom: 8px; }
.sp-dark .prof-course { background: #0c1526; border-color: #1d2b47; }
.prof-course-bar { flex-basis: 100%; height: 6px; border-radius: 99px; background: #e8ecf5; overflow: hidden; }
.sp-dark .prof-course-bar { background: #1a2947; }
.prof-course-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,#f4791f,#f9a03f); }
.danger-zone { border-color: #fecaca !important; }
.sp-dark .danger-zone { border-color: rgba(220,38,38,.4) !important; }
.danger-zone h3 i { color: #dc2626 !important; }
.danger-zone .admin-form-row { margin-bottom: 0; }

/* ---------- كروت الكورسات (الإدارة) ---------- */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.ac-card { background: #fff; border: 1px solid #e6e9f2; border-radius: 19px; overflow: hidden; transition: .2s; }
.sp-dark .ac-card { background: #101a2e; border-color: #23324e; }
.ac-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,25,50,.12); }
.ac-card.unpub { opacity: .82; border-style: dashed; }
.ac-img { position: relative; height: 140px; background: linear-gradient(135deg,#16305e,#2a4a85); cursor: pointer; overflow: hidden; }
.ac-img img { width: 100%; height: 100%; object-fit: cover; }
.ac-img-ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: rgba(255,255,255,.75); font-size: .78rem; font-weight: 700; }
.ac-img-ph i { font-size: 1.6rem; }
.ac-img-edit { position: absolute; bottom: 9px; left: 9px; width: 32px; height: 32px; border-radius: 10px; background: rgba(0,0,0,.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .78rem; backdrop-filter: blur(4px); opacity: 0; transition: .18s; }
.ac-img:hover .ac-img-edit { opacity: 1; }
.ac-body { padding: 14px 15px 15px; }
.ac-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ac-title { margin: 0; font-size: 1rem; flex: 1; }
.ac-tags { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
.ac-tags.big { margin: 10px 0; gap: 8px; }
.ac-tag { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border-radius: 999px; font-size: .67rem; font-weight: 800; color: #fff; background: var(--tagc, #f4791f); box-shadow: 0 3px 9px color-mix(in srgb, var(--tagc, #f4791f) 40%, transparent); }
.ac-tag.rm, .ac-tag.add { cursor: pointer; font-size: .76rem; padding: 5px 13px; }
.ac-tag.rm:hover { opacity: .75; }
.ac-tag.add:hover { transform: scale(1.05); }
.ac-tag-add { width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed #f4791f; background: transparent; color: #f4791f; font-weight: 900; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.ac-tag-add:hover { background: #f4791f; color: #fff; }
.ac-tag-del { width: 26px; height: 26px; border-radius: 8px; border: 1px solid #fecaca; background: transparent; color: #dc2626; font-size: .66rem; cursor: pointer; }
.ac-price-row { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 7px; }
.ac-price { font-weight: 900; font-size: 1rem; color: #16305e; }
.sp-dark .ac-price { color: #ffd166; }
.ac-price.old { text-decoration: line-through; opacity: .45; font-size: .82rem; }
.ac-price.new { color: #dc2626; }
.sp-dark .ac-price.new { color: #fca5a5; }
.ac-price-edit { font-size: .68rem; opacity: 0; transition: .15s; color: #f4791f; }
.ac-price-row:hover .ac-price-edit { opacity: 1; }
.ac-countdown { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; color: #b45309; background: #fef3c7; border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.sp-dark .ac-countdown { background: rgba(180,83,9,.15); color: #fcd34d; }
.ac-countdown b[data-cd] { font-variant-numeric: tabular-nums; direction: ltr; }
.cd-over { color: #dc2626 !important; }
.ac-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .74rem; opacity: .8; margin-bottom: 11px; }
.ac-pub-chip { padding: 2.5px 10px; border-radius: 999px; font-size: .66rem; font-weight: 800; }
.ac-pub-chip.on { background: #dcfce7; color: #15803d; }
.ac-pub-chip.off { background: #fee2e2; color: #b91c1c; }
.sp-dark .ac-pub-chip.on { background: rgba(21,128,61,.18); color: #86efac; }
.sp-dark .ac-pub-chip.off { background: rgba(185,28,28,.18); color: #fca5a5; }
.ac-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- محرر الأشرطة ---------- */
.ace-list { display: flex; flex-direction: column; gap: 9px; }
.ace-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid #e6e9f2; border-radius: 14px; background: #fff; flex-wrap: wrap; transition: .15s; }
.sp-dark .ace-strip { background: #101a2e; border-color: #23324e; }
.ace-strip:hover { border-color: #cfd8ea; }
.ace-strip.t-group { background: linear-gradient(135deg,#f5f8ff,#eef3fc); border-color: #d5e0f5; }
.sp-dark .ace-strip.t-group { background: linear-gradient(135deg,#12203c,#101a2e); border-color: #2a3e63; }
.ace-strip-main { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 200px; }
.ace-strip-main > i { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .92rem; background: #eef1f8; color: #16305e; }
.sp-dark .ace-strip-main > i { background: #1a2947; color: #8fa8d8; }
.ace-strip.t-video .ace-strip-main > i { background: #ffedd5; color: #ea580c; }
.ace-strip.t-pdf .ace-strip-main > i { background: #fee2e2; color: #dc2626; }
.ace-strip.t-exam .ace-strip-main > i { background: #dbeafe; color: #1d4ed8; }
.sp-dark .ace-strip.t-video .ace-strip-main > i { background: rgba(234,88,12,.16); }
.sp-dark .ace-strip.t-pdf .ace-strip-main > i { background: rgba(220,38,38,.14); }
.sp-dark .ace-strip.t-exam .ace-strip-main > i { background: rgba(29,78,216,.16); }
.ace-strip-txt b { display: block; font-size: .89rem; }
.ace-strip-txt small { font-size: .72rem; opacity: .6; }
.ace-strip-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.ace-strip-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.ace-children { margin-right: 26px; padding-right: 13px; border-right: 2.5px dashed #d5e0f5; display: flex; flex-direction: column; gap: 8px; }
.sp-dark .ace-children { border-color: #2a3e63; }

/* ---------- شريط التقدم ---------- */
.admin-progress { position: relative; height: 26px; border-radius: 99px; background: #eef1f8; overflow: hidden; margin: 10px 0; }
.sp-dark .admin-progress { background: #1a2947; }
.admin-progress-bar { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg,#f4791f,#f9a03f); transition: width .3s; }
.admin-progress span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 900; }

/* ---------- شجرة البنوك ---------- */
.bank-tree { display: flex; flex-direction: column; gap: 9px; }
.bank-folder { border: 1px solid #d5e0f5; border-radius: 15px; background: linear-gradient(135deg,#f5f8ff,#eef3fc); overflow: hidden; }
.sp-dark .bank-folder { background: linear-gradient(135deg,#12203c,#101a2e); border-color: #2a3e63; }
.bank-folder-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.bank-folder-head .bf-ic { color: #f4a11f; font-size: 1.05rem; width: 22px; text-align: center; }
.bank-folder-head b { flex: 0 1 auto; font-size: .9rem; }
.bank-count { padding: 2px 9px; border-radius: 999px; background: rgba(22,48,94,.1); font-size: .66rem; font-weight: 800; }
.sp-dark .bank-count { background: rgba(143,168,216,.16); color: #b9c8e8; }
.bank-folder-btns { margin-right: auto; display: flex; gap: 5px; flex-wrap: wrap; }
.bank-folder-body { padding: 4px 14px 13px 13px; margin-right: 18px; border-right: 2.5px dashed #c6d4ef; display: flex; flex-direction: column; gap: 8px; }
.sp-dark .bank-folder-body { border-color: #2a3e63; }
.bank-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid #e6e9f2; border-radius: 13px; background: #fff; flex-wrap: wrap; transition: .15s; }
.sp-dark .bank-item { background: #101a2e; border-color: #23324e; }
.bank-item:hover { border-color: #f4791f; }
.bank-item-main { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 180px; }
.bank-item-main > i { width: 34px; height: 34px; border-radius: 10px; background: #ffedd5; color: #ea580c; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .86rem; }
.sp-dark .bank-item-main > i { background: rgba(234,88,12,.16); }
.bank-item-main b { display: block; font-size: .87rem; }
.bank-code { display: inline-block; font-size: .7rem; font-weight: 800; color: #1d4ed8; background: #dbeafe; border-radius: 7px; padding: 1.5px 8px; margin-top: 3px; }
.sp-dark .bank-code { background: rgba(29,78,216,.18); color: #93c5fd; }
.bank-item-btns { display: flex; gap: 5px; flex-wrap: wrap; }

/* ---------- الإشعارات ---------- */
.nt-urgent { color: #dc2626 !important; }
.nt-auto { color: #1d4ed8 !important; }
.nt-info { color: #f4791f !important; }

/* ---------- الخط الزمني ---------- */
.timeline { position: relative; margin: 14px 0; padding-right: 20px; display: flex; flex-direction: column; gap: 13px; }
.timeline::before { content: ''; position: absolute; top: 6px; bottom: 6px; right: 6px; width: 2.5px; border-radius: 3px; background: linear-gradient(180deg,#f4791f,#16305e); }
.tl-item { position: relative; display: flex; gap: 11px; }
.tl-dot { position: absolute; right: -19.5px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: #f4791f; border: 2.5px solid #fff; box-shadow: 0 0 0 2px rgba(244,121,31,.3); }
.sp-dark .tl-dot { border-color: #0b1424; }
.tl-body { flex: 1; background: #fff; border: 1px solid #e6e9f2; border-radius: 13px; padding: 10px 13px; }
.sp-dark .tl-body { background: #101a2e; border-color: #23324e; }
.tl-body b { display: block; font-size: .85rem; }
.tl-body span { display: block; font-size: .76rem; opacity: .7; margin-top: 2px; }
.tl-body small { display: block; font-size: .68rem; opacity: .5; margin-top: 4px; }

/* ---------- الدعم ---------- */
.support-msg { line-height: 1.6; }
.support-note { display: block; margin-top: 4px; font-size: .72rem; color: #b45309; }
.sp-dark .support-note { color: #fcd34d; }
.support-btns { display: flex; gap: 5px; }

/* ---------- توست + حالات ---------- */
.admin-toast { position: fixed; bottom: 24px; right: 50%; transform: translate(50%, 20px); background: #16305e; color: #fff; padding: 12px 22px; border-radius: 14px; font-size: .85rem; font-weight: 800; z-index: 15000; opacity: 0; transition: .3s; box-shadow: 0 12px 34px rgba(10,18,40,.3); max-width: 90vw; text-align: center; }
.admin-toast.show { opacity: 1; transform: translate(50%, 0); }
.admin-toast.err { background: #b91c1c; }
.admin-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 20px; font-weight: 800; opacity: .7; }
.admin-error { background: #fee2e2; color: #b91c1c; border-radius: 14px; padding: 16px; font-weight: 800; text-align: center; }
.sp-dark .admin-error { background: rgba(185,28,28,.15); color: #fca5a5; }
.admin-empty-note { text-align: center; padding: 40px 20px; opacity: .6; font-weight: 700; border: 2px dashed #dfe4ef; border-radius: 17px; }
.sp-dark .admin-empty-note { border-color: #26375a; }
.under-construction { text-align: center; padding: 70px 20px; }
.under-construction i { font-size: 3rem; color: #f4791f; margin-bottom: 16px; display: block; animation: ucBounce 2s ease-in-out infinite; }
@keyframes ucBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.under-construction h3 { margin: 0 0 8px; font-size: 1.2rem; }
.under-construction p { opacity: .6; font-size: .88rem; margin: 0; }

/* ---------- بانر الإشعار العاجل (للطلاب) ---------- */
.urgent-banner { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg,#b91c1c,#dc2626); color: #fff; padding: 11px 16px; font-size: .86rem; font-weight: 800; animation: urgentIn .4s ease; }
@keyframes urgentIn { from { transform: translateY(-100%); } to { transform: none; } }
.urgent-banner i { font-size: 1.05rem; flex-shrink: 0; animation: urgentPulse 1.4s ease-in-out infinite; }
@keyframes urgentPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.urgent-banner .ub-body { flex: 1; line-height: 1.5; }
.urgent-banner .ub-body small { display: block; font-weight: 600; opacity: .9; font-size: .76rem; }
.urgent-banner button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; flex-shrink: 0; }

/* ---------- موبايل ---------- */
@media (max-width: 640px) {
  .admin-main { padding: 16px 12px 70px; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .admin-stat-card b { font-size: 1.2rem; }
  .admin-charts-grid { grid-template-columns: 1fr; }
  .ac-grid { grid-template-columns: 1fr; }
  .admin-sec-head h2 { font-size: 1.08rem; }
  .ace-children { margin-right: 12px; padding-right: 9px; }
  .bank-folder-body { margin-right: 8px; padding-right: 9px; }
  .prof-circles { grid-template-columns: repeat(3, 1fr); }
  .prof-circle canvas { max-width: 82px; max-height: 82px; }
  .admin-drawer { width: 84vw; right: -86vw; }
}

/* ============================================================
   SP-V19-CSS — v19: مودالات + سويتشات + إصلاح الدرج + إعادة تصميم
   ============================================================ */

/* ---------- إصلاح الدرج الجانبي (لا يخرج نص خارجه) ---------- */
.admin-drawer { right: -320px; visibility: hidden; }
.admin-drawer.open { right: 0; visibility: visible; }
.admin-drawer-head b, .admin-drawer-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.admin-drawer-head .adh-t { min-width: 0; overflow: hidden; }
.admin-nav button { white-space: nowrap; overflow: hidden; }
.admin-nav button span { overflow: hidden; text-overflow: ellipsis; }
.admin-drawer-foot button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .admin-drawer { width: 84vw; max-width: 320px; right: -90vw; }
  .admin-drawer.open { right: 0; }
}

/* ---------- نظام المودالات spm ---------- */
.spm-overlay { position: fixed; inset: 0; background: rgba(8,14,28,.55); backdrop-filter: blur(6px); z-index: 14000; display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; transition: opacity .22s ease; overflow-y: auto; }
.spm-overlay.show { opacity: 1; }
.spm-box { background: #fff; border-radius: 22px; padding: 24px 22px 20px; width: 100%; max-width: 430px; box-shadow: 0 28px 70px rgba(8,16,38,.35); transform: translateY(16px) scale(.97); transition: transform .24s cubic-bezier(.22,.9,.3,1.2); direction: rtl; max-height: calc(100dvh - 40px); overflow-y: auto; }
.spm-box.wide { max-width: 560px; }
.spm-overlay.show .spm-box { transform: none; }
.sp-dark .spm-box { background: #101c36; border: 1px solid #24365a; color: #e8eefc; }
.spm-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.spm-ic { width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; box-shadow: 0 8px 20px rgba(22,48,94,.3); }
.spm-ic.danger { background: linear-gradient(135deg,#b91c1c,#ef4444); color: #fff; box-shadow: 0 8px 20px rgba(220,38,38,.3); }
.spm-head-t { min-width: 0; padding-top: 2px; }
.spm-head-t h3 { margin: 0 0 4px; font-size: 1.05rem; }
.spm-sub { font-size: .84rem; line-height: 1.65; opacity: .78; }
.spm-sub b { color: #f4791f; }
.spm-field { margin-bottom: 13px; }
.spm-form-grid { display: flex; flex-direction: column; }
.spm-label { display: block; font-size: .78rem; font-weight: 800; margin-bottom: 6px; opacity: .8; }
.spm-input { width: 100%; padding: 11.5px 14px; border-radius: 13px; border: 1.6px solid #dfe4ef; background: #f8fafd; font-family: inherit; font-size: .9rem; color: inherit; transition: .18s; box-sizing: border-box; }
.spm-input:focus { outline: none; border-color: #f4791f; background: #fff; box-shadow: 0 0 0 4px rgba(244,121,31,.12); }
.spm-input.err { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,.12); animation: spmShake .3s; }
@keyframes spmShake { 0%,100%{transform:none} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.sp-dark .spm-input { background: #0c1730; border-color: #26375a; color: #e8eefc; }
.sp-dark .spm-input:focus { background: #0e1c3a; }
textarea.spm-input { resize: vertical; min-height: 74px; line-height: 1.7; }
select.spm-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 13px center; padding-left: 34px; cursor: pointer; }
.spm-hint { font-size: .72rem; opacity: .6; margin-top: 5px; line-height: 1.6; }
.spm-actions { display: flex; gap: 9px; justify-content: flex-start; margin-top: 18px; flex-wrap: wrap; }
.spm-btn { display: inline-flex; align-items: center; gap: 7px; padding: 11px 20px; border-radius: 13px; border: 0; font-family: inherit; font-size: .86rem; font-weight: 800; cursor: pointer; transition: .18s; }
.spm-btn:hover { transform: translateY(-1.5px); }
.spm-btn:active { transform: none; }
.spm-btn.primary { background: linear-gradient(135deg,#16305e,#2a4a85); color: #fff; box-shadow: 0 8px 20px rgba(22,48,94,.28); }
.spm-btn.danger { background: linear-gradient(135deg,#b91c1c,#ef4444); color: #fff; box-shadow: 0 8px 20px rgba(220,38,38,.28); }
.spm-btn.danger:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.spm-btn.gold { background: linear-gradient(135deg,#f4791f,#f9a03f); color: #fff; box-shadow: 0 8px 20px rgba(244,121,31,.3); }
.spm-btn.ghost { background: #f1f4fa; color: #445; }
.sp-dark .spm-btn.ghost { background: #1a2946; color: #c7d3ec; }
.spm-btn.ghost:hover { background: #e8ecf5; }
.sp-dark .spm-btn.ghost:hover { background: #22335a; }

/* choice cards */
.spm-choices { display: flex; flex-direction: column; gap: 9px; }
.spm-choice { --ch: #16305e; display: flex; align-items: center; gap: 13px; width: 100%; padding: 13px 15px; border-radius: 15px; border: 1.6px solid #e3e8f2; background: #fafbfe; font-family: inherit; text-align: right; cursor: pointer; transition: .18s; }
.sp-dark .spm-choice { background: #0d1830; border-color: #24365a; color: #e8eefc; }
.spm-choice:hover { border-color: var(--ch); background: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10,20,45,.1); }
.sp-dark .spm-choice:hover { background: #12203e; }
.spm-choice-ic { width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--ch) 12%, transparent); color: var(--ch); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
/* v23 #4: معاينة الرسمة جوه كرت الاختيار (مصنع الصور) */
.spm-choice-thumb { width: 78px; height: 56px; border-radius: 10px; overflow: hidden; background: #fff; border: 1.5px solid #dfe6f5; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.spm-choice-thumb canvas { width: 100%; height: 100%; display: block; }
.sp-dark .spm-choice-thumb { background: #f7f9fd; border-color: #2a3f68; }
.spm-choice-t { flex: 1; min-width: 0; }
.spm-choice-t b { display: block; font-size: .88rem; }
.spm-choice-t small { display: block; font-size: .72rem; opacity: .6; margin-top: 2px; line-height: 1.5; }
.spm-choice-arrow { font-size: .7rem; opacity: .35; transition: .18s; }
.spm-choice:hover .spm-choice-arrow { opacity: 1; color: var(--ch); transform: translateX(-3px); }

/* dateTime */
.spm-dt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.spm-dt-grid .spm-field { margin-bottom: 4px; }
.spm-dt-preview { margin-top: 12px; padding: 12px 14px; border-radius: 13px; background: linear-gradient(135deg, rgba(22,48,94,.06), rgba(244,121,31,.06)); border: 1px dashed rgba(22,48,94,.2); font-size: .84rem; font-weight: 800; text-align: center; line-height: 1.7; }
.sp-dark .spm-dt-preview { background: rgba(255,209,102,.05); border-color: rgba(255,209,102,.2); }
.spm-dt-preview i { color: #f4791f; margin-left: 6px; }
.dt-past { color: #ef4444; font-size: .74rem; }

/* crop */
.spm-crop-stage { margin: 0 auto; border-radius: 14px; overflow: hidden; border: 2px solid #e3e8f2; background: #0b1830; cursor: grab; touch-action: none; max-width: 100%; }
.spm-crop-stage:active { cursor: grabbing; }
.spm-crop-stage canvas { display: block; width: 100%; height: 100%; }
.spm-range { width: 100%; accent-color: #f4791f; height: 6px; cursor: pointer; }

/* ---------- السويتش الجميل sp-switch ---------- */
.sp-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.sp-switch input { display: none; }
.sp-switch-track { position: relative; width: 52px; height: 28px; border-radius: 999px; background: linear-gradient(135deg,#ef4444,#dc2626); transition: .25s; box-shadow: inset 0 2px 5px rgba(0,0,0,.18); flex-shrink: 0; }
.sp-switch input:checked + .sp-switch-track { background: linear-gradient(135deg,#16a34a,#22c55e); }
.sp-switch-thumb { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .25s cubic-bezier(.22,.9,.3,1.3); display: flex; align-items: center; justify-content: center; font-size: .58rem; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.sp-switch input:checked + .sp-switch-track .sp-switch-thumb { right: 27px; }
.sp-switch-thumb .on-ic { display: none; color: #16a34a; }
.sp-switch-thumb .off-ic { display: block; color: #dc2626; }
.sp-switch input:checked + .sp-switch-track .on-ic { display: block; }
.sp-switch input:checked + .sp-switch-track .off-ic { display: none; }
.sp-switch-label { font-size: .82rem; font-weight: 800; }
.sp-switch.sm .sp-switch-track { width: 42px; height: 23px; }
.sp-switch.sm .sp-switch-thumb { width: 17px; height: 17px; font-size: .5rem; }
.sp-switch.sm input:checked + .sp-switch-track .sp-switch-thumb { right: 22px; }

/* ---------- v19: لوحة التحكم المعاد تصميمها ---------- */
.dash-group { margin-bottom: 26px; }
.dash-group-title { display: flex; align-items: center; gap: 9px; font-size: .92rem; font-weight: 900; margin: 0 0 12px; opacity: .85; }
.dash-group-title i { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .82rem; color: #fff; }
.dash-group-title.g-blue i { background: linear-gradient(135deg,#16305e,#2a4a85); }
.dash-group-title.g-orange i { background: linear-gradient(135deg,#f4791f,#f9a03f); }
.dash-group-title.g-green i { background: linear-gradient(135deg,#16a34a,#22c55e); }
.dash-group-title.g-purple i { background: linear-gradient(135deg,#7c3aed,#a78bfa); }
.admin-stat-card.click { cursor: pointer; transition: .2s; position: relative; }
.admin-stat-card.click:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(10,20,45,.14); border-color: #f4791f; }
.admin-stat-card.click::after { content: '\f104'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; bottom: 10px; left: 12px; font-size: .68rem; opacity: 0; transition: .2s; color: #f4791f; }
.admin-stat-card.click:hover::after { opacity: .8; }
/* progress ring */
.dash-ring { display: flex; align-items: center; gap: 12px; }
.dash-ring svg { transform: rotate(-90deg); flex-shrink: 0; }
.dash-ring .ring-bg { stroke: #eef1f8; }
.sp-dark .dash-ring .ring-bg { stroke: #1c2b4a; }
.dash-ring .ring-fg { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.22,.9,.3,1); }
.dash-ring-txt b { display: block; font-size: 1.05rem; }
.dash-ring-txt small { font-size: .7rem; opacity: .6; }

/* ---------- SP-V21: فولدرات وبنوك ستايل ويندوز ---------- */
.bank-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 14px; }
.bank-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding: 16px 10px 13px; border-radius: 18px; border: 1.5px solid transparent; background: transparent; cursor: pointer; transition: .18s; font-family: inherit; text-align: center; position: relative; aspect-ratio: 1 / 1.08; }
.bank-tile:hover { background: rgba(244,166,31,.08); border-color: rgba(244,166,31,.35); }
.sp-dark .bank-tile:hover { background: rgba(244,166,31,.09); }
.bank-tile:active { transform: scale(.97); }
/* — جسم الفولدر (زي وندوز): لسان + جسم متدرج — */
.bank-tile .wfolder { position: relative; width: 88px; height: 68px; margin: 10px auto 12px; flex-shrink: 0; filter: drop-shadow(0 8px 14px rgba(214,148,10,.35)); transition: .18s; }
.bank-tile:hover .wfolder { transform: translateY(-3px) scale(1.04); }
.bank-tile .wfolder::before { content: ''; position: absolute; top: -8px; right: 0; width: 42%; height: 16px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg,#f6bd45,#eda72c); }
.bank-tile .wfolder::after { content: ''; position: absolute; inset: 0; border-radius: 8px 3px 9px 9px; background: linear-gradient(180deg,#ffd97a 0%,#ffc94f 40%,#f4a11f 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -4px 8px rgba(190,120,5,.28); }
.bank-tile .wfolder .wf-count { position: absolute; z-index: 2; bottom: 7px; left: 7px; min-width: 24px; height: 20px; padding: 0 7px; border-radius: 999px; background: #16305e; color: #ffd166; font-size: .64rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(10,20,45,.35); }
.bank-tile .wfolder .wf-paper { position: absolute; z-index: 1; top: 6px; left: 10px; right: 10px; height: 22px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg,#ffffff,#eef2fa); box-shadow: 0 1px 3px rgba(20,35,70,.18); }
/* — البنك: خزنة أسئلة كحلي مميزة — */
.bank-tile .wbank { position: relative; width: 82px; height: 72px; margin: 8px auto 12px; flex-shrink: 0; border-radius: 14px; background: linear-gradient(160deg,#22437c 0%,#16305e 55%,#0e2143 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.16), inset 0 -5px 10px rgba(0,0,0,.3), 0 9px 16px rgba(14,28,58,.4); display: flex; align-items: center; justify-content: center; transition: .18s; }
.bank-tile:hover .wbank { transform: translateY(-3px) scale(1.04); }
.bank-tile .wbank::before { content: ''; position: absolute; top: 8px; left: 10px; right: 10px; height: 3.5px; border-radius: 3px; background: linear-gradient(90deg,#ffd166,#f4a11f); opacity: .9; }
.bank-tile .wbank i { font-size: 1.7rem; color: #ffd166; text-shadow: 0 3px 8px rgba(0,0,0,.35); }
.bank-tile .wbank .wb-q { position: absolute; bottom: 6px; left: 8px; width: 20px; height: 20px; border-radius: 7px; background: #f4791f; color: #fff; font-size: .68rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 7px rgba(244,121,31,.45); }
.bank-tile b { font-size: .8rem; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; color: #21304e; }
.sp-dark .bank-tile b { color: #e8eefc; }
.bank-tile small { font-size: .64rem; opacity: .55; margin-top: 3px; }
.bank-tile .bt-menu { position: absolute; z-index: 3; top: 7px; left: 7px; width: 29px; height: 29px; border-radius: 10px; border: 0; background: rgba(240,243,250,.95); color: #556; cursor: pointer; font-size: .72rem; opacity: 0; transition: .18s; box-shadow: 0 2px 6px rgba(15,25,50,.14); }
.sp-dark .bank-tile .bt-menu { background: rgba(26,41,70,.95); color: #c7d3ec; }
.bank-tile:hover .bt-menu, .bank-tile:focus-within .bt-menu { opacity: 1; }
.bank-tile .bt-menu:hover { background: #f4791f; color: #fff; }
@media (max-width: 560px) {
  .bank-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .bank-tile { padding: 12px 6px 10px; }
  .bank-tile .wfolder { width: 68px; height: 52px; }
  .bank-tile .wbank { width: 64px; height: 56px; }
  .bank-tile .wbank i { font-size: 1.35rem; }
  .bank-tile b { font-size: .7rem; }
  .bank-tile .bt-menu { opacity: 1; }
}
@media (max-width: 380px) { .bank-tiles { grid-template-columns: repeat(2, 1fr); } }
/* breadcrumb */
.bank-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 15px; padding: 10px 14px; border-radius: 13px; background: #f4f6fc; font-size: .8rem; font-weight: 800; }
.sp-dark .bank-crumbs { background: #14203a; }
.bank-crumbs button { border: 0; background: transparent; font-family: inherit; font-size: .8rem; font-weight: 800; color: #16305e; cursor: pointer; padding: 3px 7px; border-radius: 8px; transition: .15s; }
.sp-dark .bank-crumbs button { color: #8fa8d8; }
.bank-crumbs button:hover { background: rgba(244,121,31,.12); color: #f4791f; }
.bank-crumbs .crumb-sep { opacity: .35; font-size: .62rem; }
.bank-crumbs .crumb-cur { color: #f4791f; padding: 3px 7px; }

/* ---------- v19: تحت البناء (مركز وجميل) ---------- */
.admin-under-construction { min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 40px 20px; }
.admin-under-construction .auc-ic, .admin-under-construction .uc-ic { width: 96px; height: 96px; border-radius: 28px; background: linear-gradient(135deg, rgba(244,121,31,.12), rgba(255,209,102,.18)); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #f4791f; margin-bottom: 16px; animation: ucFloat 3s ease-in-out infinite; }
@keyframes ucFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.admin-under-construction h2, .admin-under-construction h3 { margin: 0 0 6px; font-size: 1.25rem; }
.admin-under-construction p { margin: 0; font-size: .86rem; opacity: .65; max-width: 380px; line-height: 1.8; }
.admin-under-construction .auc-badge, .admin-under-construction .uc-badge { margin-top: 18px; padding: 8px 18px; border-radius: 999px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; font-size: .76rem; font-weight: 900; box-shadow: 0 8px 20px rgba(22,48,94,.25); order: 5; }

/* ---------- v19: صفوف الطلاب hover grow ---------- */
.admin-row { transition: .18s; }
.admin-row:hover { transform: translateY(-2px) scale(1.008); box-shadow: 0 10px 26px rgba(10,20,45,.1); border-color: #f4791f; z-index: 2; position: relative; }

/* ---------- v19: كروت الكورسات أطول (جهة الطالب) ---------- */
.course-cover { height: 240px; }
@media (max-width: 640px) { .course-cover { height: 210px; } }

/* ---------- v19: أكورديون يختفي تماماً ---------- */
.acc-item:not(.open) .acc-body-inner { padding-block: 0; }
.acc-body-inner { transition: padding .35s ease; }

/* ---------- v19: قسم طلبات الاشتراك ---------- */
.subreq-card { border: 1.5px solid #e6eaf4; border-radius: 17px; background: #fff; padding: 15px 16px; margin-bottom: 11px; transition: .18s; }
.sp-dark .subreq-card { background: #101c36; border-color: #24365a; }
.subreq-card:hover { border-color: #f4791f; box-shadow: 0 10px 26px rgba(10,20,45,.1); }
.subreq-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.subreq-av { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1rem; flex-shrink: 0; overflow: hidden; }
.subreq-av img { width: 100%; height: 100%; object-fit: cover; }
.subreq-info { flex: 1; min-width: 0; }
.subreq-info b { display: block; font-size: .9rem; }
.subreq-info small { font-size: .72rem; opacity: .6; display: block; margin-top: 2px; }
.subreq-course { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(244,121,31,.1); color: #f4791f; font-size: .74rem; font-weight: 800; }
.subreq-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; font-size: .76rem; opacity: .75; }
.subreq-meta span { display: inline-flex; align-items: center; gap: 5px; }
.subreq-meta i { color: #16305e; opacity: .7; }
.sp-dark .subreq-meta i { color: #8fa8d8; }
.subreq-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.subreq-status { padding: 4px 12px; border-radius: 999px; font-size: .7rem; font-weight: 900; }
.subreq-status.pending { background: #fffbeb; color: #b45309; }
.subreq-status.approved { background: #f0fdf4; color: #16a34a; }
.subreq-status.rejected { background: #fef2f2; color: #dc2626; }
.sp-dark .subreq-status.pending { background: rgba(180,83,9,.15); }
.sp-dark .subreq-status.approved { background: rgba(22,163,74,.15); }
.sp-dark .subreq-status.rejected { background: rgba(220,38,38,.15); }

/* ---------- v19: bulk actions bar ---------- */
.bulk-bar { position: sticky; top: 8px; z-index: 60; display: none; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 15px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #fff; box-shadow: 0 12px 30px rgba(22,48,94,.35); margin-bottom: 14px; flex-wrap: wrap; animation: adminFade .25s ease; }
.bulk-bar.show { display: flex; }
.bulk-bar b { font-size: .84rem; }
.bulk-bar .bulk-count { background: #ffd166; color: #16305e; padding: 2px 11px; border-radius: 999px; font-size: .8rem; font-weight: 900; }
.bulk-bar button { border: 0; border-radius: 10px; padding: 8px 13px; font-family: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; transition: .16s; background: rgba(255,255,255,.14); color: #fff; }
.bulk-bar button:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.bulk-bar button.bb-danger { background: rgba(239,68,68,.85); }
.bulk-bar button.bb-danger:hover { background: #ef4444; }
.bulk-bar button.bb-close { background: transparent; font-size: .9rem; padding: 6px 9px; margin-inline-start: auto; }
.stu-check { width: 20px; height: 20px; accent-color: #f4791f; cursor: pointer; flex-shrink: 0; }

/* ---------- v19: أمان — أحداث قابلة للطي ---------- */
.sec-collapse-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; padding: 13px 16px; border-radius: 14px; background: #f4f6fc; font-weight: 900; font-size: .88rem; transition: .16s; }
.sp-dark .sec-collapse-head { background: #14203a; }
.sec-collapse-head:hover { background: #eceff9; }
.sp-dark .sec-collapse-head:hover { background: #1a2946; }
.sec-collapse-head i.chev { transition: .25s; font-size: .74rem; opacity: .6; }
.sec-collapse.open .sec-collapse-head i.chev { transform: rotate(-90deg); }
.sec-collapse-body { display: none; margin-top: 10px; }
.sec-collapse.open .sec-collapse-body { display: block; animation: adminFade .25s ease; }
.tl-event { display: flex; gap: 11px; padding: 11px 13px; border-radius: 13px; border: 1px solid #edf0f7; margin-bottom: 8px; background: #fff; align-items: flex-start; }
.sp-dark .tl-event { background: #0d1830; border-color: #1d2b47; }
.tl-event .tl-ic { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: .78rem; flex-shrink: 0; background: rgba(22,48,94,.08); color: #16305e; }
.sp-dark .tl-event .tl-ic { background: rgba(143,168,216,.12); color: #8fa8d8; }
.tl-event .tl-t { flex: 1; min-width: 0; }
.tl-event .tl-t b { display: block; font-size: .8rem; }
.tl-event .tl-t small { display: block; font-size: .7rem; opacity: .6; margin-top: 2px; line-height: 1.6; }
.tl-event .tl-time { font-size: .66rem; opacity: .5; white-space: nowrap; }

/* ---------- v19: أزرار مسماة ---------- */
.named-btn { display: inline-flex; align-items: center; gap: 7px; }
.named-btn .nb-txt { font-size: .78rem; }
@media (max-width: 480px) { .named-btn .nb-txt { display: none; } }

/* ---------- v19 §2: دوائر مستوى الطالب في ملف الطالب (إصلاح الرسوم المكسورة) ---------- */
.admin-prof-circles { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 8px 0 4px; }
.admin-circle-stat { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 96px; }
.admin-circle-wrap { position: relative; width: 92px; height: 92px; }
.admin-circle-wrap canvas { width: 92px !important; height: 92px !important; }
.admin-circle-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .82rem; pointer-events: none; }
.admin-circle-stat small { font-size: .72rem; font-weight: 800; opacity: .7; }
@media (max-width: 480px) {
  .admin-prof-circles { gap: 14px; }
  .admin-circle-wrap, .admin-circle-wrap canvas { width: 78px !important; height: 78px !important; }
}

/* ============================================================
   SP-V20-CSS — إعادة تصميم شاملة للوحة الإشراف (فخامة + 3D)
   ============================================================ */

/* ---------- v20 #4: عناوين الأقسام الرئيسية ---------- */
.admin-h2 { display: flex; align-items: center; gap: 12px; margin: 2px 0 20px; font-size: 1.32rem; font-weight: 900; color: #16305e; position: relative; padding-bottom: 14px; }
.sp-dark .admin-h2 { color: #e8eefc; }
.admin-h2 i { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #ffd166; background: linear-gradient(135deg,#16305e,#2a4a85); box-shadow: 0 8px 20px rgba(22,48,94,.3), inset 0 1px 0 rgba(255,255,255,.18); flex-shrink: 0; }
.admin-h2::after { content: ''; position: absolute; bottom: 0; right: 0; width: 130px; height: 4px; border-radius: 99px; background: linear-gradient(90deg,#f4791f,#ffd166 60%,transparent); }
@media (max-width: 480px) { .admin-h2 { font-size: 1.12rem; } .admin-h2 i { width: 38px; height: 38px; border-radius: 12px; font-size: .92rem; } }

/* ---------- v20 عام: سبينر تحميل ---------- */
.btn-spinner { width: 17px; height: 17px; border: 2.5px solid rgba(120,140,180,.3); border-top-color: #f4791f; border-radius: 50%; display: inline-block; animation: v20spin .7s linear infinite; flex-shrink: 0; }
@keyframes v20spin { to { transform: rotate(360deg); } }

/* ---------- v20 #1: كروت الإحصائيات — مربعات 3D بظلال ---------- */
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 13px; }
@media (max-width: 560px) { .admin-stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.admin-stat-grid .admin-stat-card,
.admin-stat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 148px; padding: 18px 12px 16px; text-align: center; background: linear-gradient(180deg,#ffffff,#f7f9fe); border: 1px solid #e4e9f4; border-radius: 20px; position: relative; overflow: hidden; transition: transform .22s, box-shadow .22s;
  box-shadow: 0 1px 2px rgba(15,25,50,.05), 0 10px 24px -10px rgba(15,25,50,.14), inset 0 1px 0 #fff; }
.sp-dark .admin-stat-card { background: linear-gradient(180deg,#111d36,#0d1830); border-color: #223354; box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 26px -10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04); }
.admin-stat-card::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--sc,#f4791f), transparent 140%); }
.admin-stat-card::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--sc,#f4791f); opacity: .05; top: -46px; left: -46px; pointer-events: none; }
.admin-stat-card:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(15,25,50,.08), 0 20px 38px -12px rgba(15,25,50,.22); }
.admin-stat-card.click { cursor: pointer; }
.admin-stat-card.click:active { transform: translateY(-1px) scale(.98); }
/* أيقونة الكارت — مربع متدرّج بظل ملوّن */
.admin-stat-ic { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--sc,#f4791f), color-mix(in srgb, var(--sc,#f4791f) 65%, #ffffff)); color: #fff; font-size: 1.15rem; box-shadow: 0 9px 20px -6px color-mix(in srgb, var(--sc,#f4791f) 55%, transparent), inset 0 1px 0 rgba(255,255,255,.35); flex-shrink: 0; }
.admin-stat-card .admin-stat-ic i { margin: 0; display: block; font-size: inherit; color: #fff; }
.admin-stat-card b { display: block; font-size: 1.5rem; line-height: 1.15; color: #16305e; font-weight: 900; }
.sp-dark .admin-stat-card b { color: #f1f5ff; }
.admin-stat-card small { font-size: .73rem; font-weight: 800; opacity: .62; line-height: 1.5; }
/* كروت الحلقات جوّه نفس الشبكة */
.admin-stat-card .dash-ring { flex-direction: column; gap: 7px; align-items: center; }
.admin-stat-card .dash-ring-txt { text-align: center; }
.admin-stat-card .dash-ring-txt b { font-size: 1.05rem; }
.admin-stat-card .dash-ring-txt small { font-size: .7rem; font-weight: 800; }

/* ---------- v20 #2: رأس الدرج الجانبي — تقييد اللوجو ---------- */
.admin-drawer-head { background: linear-gradient(135deg, rgba(22,48,94,.05), rgba(244,121,31,.05)); }
.sp-dark .admin-drawer-head { background: linear-gradient(135deg, rgba(42,74,133,.14), rgba(244,121,31,.07)); }
.admin-drawer-head img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 5px 9px rgba(22,48,94,.28)); }
.admin-drawer-head > div { min-width: 0; flex: 1; }
.admin-drawer-head b { font-size: .94rem; color: #16305e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-dark .admin-drawer-head b { color: #e8eefc; }
.admin-drawer-head small { font-weight: 800; letter-spacing: .4px; color: #f4791f; opacity: 1; }

/* ---------- v20 #3: قسم الطلاب — بحث وفلاتر وصفوف فاخرة ---------- */
.admin-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; background: #fff; border: 1.5px solid #e2e7f2; border-radius: 14px; transition: .2s; box-shadow: 0 2px 8px rgba(15,25,50,.04); }
.sp-dark .admin-search { background: #101c36; border-color: #26375a; }
.admin-search:focus-within { border-color: #f4791f; box-shadow: 0 0 0 3.5px rgba(244,121,31,.14), 0 2px 8px rgba(15,25,50,.05); }
.admin-search i { color: #f4791f; font-size: .88rem; flex-shrink: 0; }
.admin-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: .85rem; font-weight: 700; color: inherit; height: 100%; }
.admin-search input::placeholder { opacity: .45; font-weight: 600; }

.admin-rows { gap: 9px; }
.admin-row { background: linear-gradient(180deg,#fff,#fafbfe); border: 1px solid #e6eaf4; border-radius: 16px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(15,25,50,.04), 0 8px 18px -10px rgba(15,25,50,.1); cursor: pointer; }
.sp-dark .admin-row { background: linear-gradient(180deg,#111d36,#0d1830); border-color: #223354; box-shadow: 0 8px 18px -10px rgba(0,0,0,.4); }
.admin-row:hover { transform: translateY(-2px); border-color: rgba(244,121,31,.55); box-shadow: 0 4px 10px rgba(15,25,50,.06), 0 16px 30px -12px rgba(15,25,50,.18); }
.admin-row-avatar { width: 46px; height: 46px; border: 2.5px solid #fff; box-shadow: 0 0 0 2px rgba(244,121,31,.5), 0 5px 12px rgba(15,25,50,.14); }
.sp-dark .admin-row-avatar { border-color: #0d1830; }
.admin-row-main small { font-size: .72rem; opacity: .62; font-weight: 700; }
.admin-ban-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8.5px 14px; border-radius: 11px; border: 1px solid #fecaca; box-shadow: 0 3px 8px rgba(220,38,38,.1); }
.admin-ban-btn.unban { border-color: #bbf7d0; box-shadow: 0 3px 8px rgba(22,163,74,.1); }
.sp-dark .admin-ban-btn { border-color: rgba(220,38,38,.35); background: rgba(220,38,38,.13); color: #fca5a5; }
.sp-dark .admin-ban-btn.unban { border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.13); color: #86efac; }

/* دائرة التحديد المتعدد (span مش checkbox) */
.stu-check { width: 26px; height: 26px; border-radius: 9px; border: 2px solid #cdd6e8; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: .18s; accent-color: initial; }
.sp-dark .stu-check { background: #14203a; border-color: #34486e; }
.stu-check i { font-size: .68rem; color: #fff; opacity: 0; transform: scale(.4); transition: .18s; }
.stu-check:hover { border-color: #f4791f; }
.stu-check.on { background: linear-gradient(135deg,#f4791f,#f9a03f); border-color: #f4791f; box-shadow: 0 4px 10px rgba(244,121,31,.35); }
.stu-check.on i { opacity: 1; transform: scale(1); }
.admin-row:has(.stu-check.on) { border-color: #f4791f; background: linear-gradient(180deg,#fff8f1,#fff3e6); }
.sp-dark .admin-row:has(.stu-check.on) { background: linear-gradient(180deg,#1c2438,#171d2e); }

/* شريط الإجراءات الجماعية — يشتغل بـ hidden attribute */
.bulk-bar { display: flex; }
.bulk-bar[hidden] { display: none; }
.bulk-bar button.green { background: linear-gradient(135deg,#059669,#10b981); box-shadow: 0 4px 10px rgba(5,150,105,.3); }
.bulk-bar button.amber { background: linear-gradient(135deg,#d97706,#f59e0b); box-shadow: 0 4px 10px rgba(217,119,6,.3); }
.bulk-bar button.red { background: linear-gradient(135deg,#dc2626,#ef4444); box-shadow: 0 4px 10px rgba(220,38,38,.3); }
.bulk-bar button.ghost { background: transparent; font-size: .92rem; padding: 7px 10px; margin-inline-start: auto; }
.bulk-bar button.green:hover, .bulk-bar button.amber:hover, .bulk-bar button.red:hover { filter: brightness(1.1); }
#stuBulkToggle.active { background: linear-gradient(135deg,#16305e,#2a4a85); border-color: transparent; color: #ffd166; box-shadow: 0 6px 16px rgba(22,48,94,.3); }

/* ---------- v20 #5: ملف الطالب — كروت ومعلومات ---------- */
.admin-card { background: linear-gradient(180deg,#fff,#fbfcff); border: 1px solid #e4e9f4; border-radius: 20px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15,25,50,.04), 0 12px 26px -12px rgba(15,25,50,.12); }
.sp-dark .admin-card { background: linear-gradient(180deg,#101c36,#0d1830); border-color: #223354; box-shadow: 0 12px 26px -12px rgba(0,0,0,.45); }
.admin-card h3 { margin: 0 0 15px; font-size: 1rem; display: flex; align-items: center; gap: 9px; padding-bottom: 11px; border-bottom: 1.5px dashed #e8ecf5; }
.sp-dark .admin-card h3 { border-color: #1e2d4d; }
.admin-card h3 i { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; background: linear-gradient(135deg,#f4791f,#f9a03f); box-shadow: 0 5px 12px rgba(244,121,31,.3); flex-shrink: 0; }
.admin-card.danger-zone { border-color: #fecdd3; }
.sp-dark .admin-card.danger-zone { border-color: rgba(220,38,38,.4); }
.admin-card.danger-zone h3 i { background: linear-gradient(135deg,#dc2626,#f87171); box-shadow: 0 5px 12px rgba(220,38,38,.3); }

/* رأس ملف الطالب */
.admin-prof-head { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 20px; margin-bottom: 16px; background: linear-gradient(135deg,#16305e,#2a4a85 70%,#35578f); color: #fff; box-shadow: 0 14px 32px -10px rgba(22,48,94,.5); position: relative; overflow: hidden; }
.admin-prof-head::before { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(255,209,102,.22), transparent 70%); top: -70px; left: -50px; pointer-events: none; }
.admin-prof-avatar-wrap { position: relative; flex-shrink: 0; }
.admin-prof-avatar-wrap img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #ffd166; box-shadow: 0 8px 20px rgba(0,0,0,.3); background: #fff; display: block; }
.admin-prof-avatar-wrap .admin-mini-btn { position: absolute; bottom: -3px; left: -3px; }
.admin-prof-main { flex: 1; min-width: 0; }
.admin-prof-main h2 { margin: 0 0 5px; font-size: 1.22rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-prof-main small { font-size: .76rem; opacity: .8; font-weight: 700; }
@media (max-width: 480px) { .admin-prof-head { flex-direction: column; text-align: center; } .admin-prof-main h2 { justify-content: center; } }

/* شبكة معلومات الحساب */
.admin-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
@media (max-width: 540px) { .admin-info-grid { grid-template-columns: 1fr; } }
.admin-info-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #f7f9fd; border: 1px solid #e9edf6; transition: .18s; }
.sp-dark .admin-info-item { background: #0c1526; border-color: #1d2b47; }
.admin-info-item:hover { border-color: rgba(244,121,31,.45); }
.admin-info-item > i { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: .86rem; color: #16305e; background: linear-gradient(135deg,#e8eefc,#dbe6fb); flex-shrink: 0; box-shadow: inset 0 1px 0 #fff; }
.sp-dark .admin-info-item > i { color: #8fa8d8; background: linear-gradient(135deg,#1a2947,#152138); box-shadow: none; }
.admin-info-item > div { flex: 1; min-width: 0; }
.admin-info-item small { display: block; font-size: .68rem; opacity: .55; font-weight: 800; margin-bottom: 1px; }
.admin-info-item b { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* أزرار صغيرة */
.admin-mini-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7.5px 12px; border-radius: 10px; border: 1px solid #dfe4ef; background: #fff; color: #223; font-family: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; transition: .16s; text-decoration: none; box-shadow: 0 2px 6px rgba(15,25,50,.06); flex-shrink: 0; }
.sp-dark .admin-mini-btn { background: #14203a; border-color: #26375a; color: #dbe4ff; }
.admin-mini-btn:hover { transform: translateY(-1.5px); border-color: #f4791f; color: #f4791f; }
.admin-mini-btn.danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.sp-dark .admin-mini-btn.danger { background: rgba(220,38,38,.13); border-color: rgba(220,38,38,.35); color: #fca5a5; }
.admin-mini-btn.danger:hover { border-color: #dc2626; color: #dc2626; }
.admin-mini-btn.ok { background: linear-gradient(135deg,#059669,#10b981); border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(5,150,105,.3); }
.admin-mini-btn.ok:hover { color: #fff; filter: brightness(1.08); }
.admin-mini-btn.gold { background: linear-gradient(135deg,#f4791f,#f9a03f); border-color: transparent; color: #fff; box-shadow: 0 4px 10px rgba(244,121,31,.3); }
.admin-mini-btn.gold:hover { color: #fff; filter: brightness(1.08); }

/* كورسات الطالب */
.admin-prof-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 11px; }
.admin-prof-course { border-radius: 16px; padding: 14px 15px; background: linear-gradient(135deg, var(--c1,#16305e), var(--c2,#2a4a85)); color: #fff; box-shadow: 0 10px 22px -8px rgba(15,25,50,.35), inset 0 1px 0 rgba(255,255,255,.15); position: relative; overflow: hidden; transition: .2s; }
.admin-prof-course::before { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.09); top: -45px; left: -35px; pointer-events: none; }
.admin-prof-course:hover { transform: translateY(-2px); }
.admin-prof-course.inactive { background: #fff; color: #223; border: 1.5px dashed #d5dcea; box-shadow: 0 4px 12px rgba(15,25,50,.05); }
.sp-dark .admin-prof-course.inactive { background: #101c36; color: #e8eefc; border-color: #2a3d63; }
.admin-prof-course.inactive::before { background: linear-gradient(135deg, var(--c1,#16305e), var(--c2,#2a4a85)); opacity: .1; }
.apc-head { margin-bottom: 11px; position: relative; }
.apc-head b { display: block; font-size: .9rem; margin-bottom: 3px; }
.apc-head small { font-size: .72rem; opacity: .82; font-weight: 700; }
.apc-actions { display: flex; gap: 7px; flex-wrap: wrap; position: relative; }
.admin-prof-course:not(.inactive) .admin-mini-btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; box-shadow: none; }
.admin-prof-course:not(.inactive) .admin-mini-btn:hover { background: rgba(255,255,255,.28); color: #fff; border-color: rgba(255,255,255,.5); }
.admin-prof-course:not(.inactive) .admin-mini-btn.danger { background: rgba(220,38,38,.75); border-color: transparent; }
.admin-prof-course:not(.inactive) .admin-mini-btn.danger:hover { background: #dc2626; }

/* أزرار التحكم في الحساب */
.admin-actions-row { display: flex; gap: 9px; flex-wrap: wrap; }
.admin-act-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 17px; border-radius: 13px; border: 1px solid #dfe4ef; background: #fff; color: #223; font-family: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; transition: .18s; box-shadow: 0 3px 8px rgba(15,25,50,.06); }
.sp-dark .admin-act-btn { background: #14203a; border-color: #26375a; color: #dbe4ff; }
.admin-act-btn:hover { transform: translateY(-2px); }
.admin-act-btn.danger { background: linear-gradient(135deg,#dc2626,#ef4444); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(220,38,38,.3); }
.admin-act-btn.amber { background: linear-gradient(135deg,#d97706,#f59e0b); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(217,119,6,.3); }
.admin-act-btn.ok { background: linear-gradient(135deg,#059669,#10b981); border-color: transparent; color: #fff; box-shadow: 0 6px 14px rgba(5,150,105,.3); }
.admin-act-btn:hover { filter: brightness(1.07); }
.admin-note { margin-top: 12px; padding: 11px 14px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: .8rem; font-weight: 700; line-height: 1.7; }
.sp-dark .admin-note { background: rgba(180,83,9,.12); border-color: rgba(180,83,9,.35); color: #fcd34d; }

/* صفوف الدعم */
.support-row { align-items: flex-start; }

/* (v20 #7 اتشال — التصميم الجديد SP-V21 فولدرات ويندوز فوق) */

/* ---------- v20 #10: أزرار التقديم والرجوع 10 ثواني ---------- */
.sp-seek-btn { position: relative; }
.sp-seek-btn .seek-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .5rem; font-weight: 900; padding-top: 3px; pointer-events: none; }

/* ---------- v20 #8: أزرار صورة الطالب في ملف الإشراف ---------- */
.apc-avatar-btns { position: absolute; bottom: -6px; right: 50%; transform: translateX(50%); display: flex; gap: 5px; }
.apc-avatar-btns .admin-mini-btn { padding: 6px 9px; font-size: .68rem; border-radius: 9px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.admin-prof-avatar-wrap .admin-mini-btn { position: static; }

/* ---------- SP-V21 #3: صندوق رابط الكولباك بتاع يوتيوب ---------- */
.yt-uri-box { margin: 10px 0; padding: 13px 15px; border-radius: 14px; background: #f0f6ff; border: 1.5px dashed #93b4e8; font-size: .82rem; line-height: 1.8; }
.sp-dark .yt-uri-box { background: rgba(37,64,110,.25); border-color: #35507f; }
.yt-uri-box b { color: #16305e; }
.sp-dark .yt-uri-box b { color: #cfe0ff; }
.yt-uri-box a { color: #f4791f; font-weight: 800; }
.yt-uri-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.yt-uri-row code { flex: 1 1 200px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: #16305e; color: #ffd166; font-size: .74rem; font-weight: 700; overflow-wrap: anywhere; user-select: all; }

/* ============================================================
   SP-V21-DRAFT — بنوك المسودة + عرض الأسئلة + محرر MCQ/مقالي
   + لوحة رموز الفيزياء + استوديو رسم صورة السؤال
   ============================================================ */

/* ---------- تايلات المسودة (ألوان مميزة عن النهائي) ---------- */
.bank-tile .wfolder.draft::before { background: linear-gradient(180deg,#b8c4dd,#9aabce); }
.bank-tile .wfolder.draft::after { background: linear-gradient(180deg,#dde6f7 0%,#c3d1ec 40%,#9db1d6 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -4px 8px rgba(90,110,160,.3); }
.bank-tile .wfolder.draft { filter: drop-shadow(0 8px 14px rgba(90,110,160,.3)); }
.bank-tile .wbank.draft { background: linear-gradient(160deg,#5a6f96 0%,#42557c 55%,#2e3f61 100%); }
.bank-tile .wbank.draft::before { background: linear-gradient(90deg,#c9d6f0,#9db1d6); }
.bank-tile .wbank.draft i { color: #dbe6fb; }

/* البنك الصغير في هيدر عرض الأسئلة */
.wbank.sm { position: relative; width: 52px; height: 46px; flex-shrink: 0; border-radius: 12px; background: linear-gradient(160deg,#22437c 0%,#16305e 55%,#0e2143 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.16), inset 0 -4px 8px rgba(0,0,0,.3), 0 6px 12px rgba(14,28,58,.35); display: inline-flex; align-items: center; justify-content: center; }
.wbank.sm::before { content: ''; position: absolute; top: 6px; left: 7px; right: 7px; height: 2.5px; border-radius: 3px; background: linear-gradient(90deg,#ffd166,#f4a11f); opacity: .9; }
.wbank.sm i { font-size: 1.1rem; color: #ffd166; }
.wbank.sm.draft { background: linear-gradient(160deg,#5a6f96 0%,#42557c 55%,#2e3f61 100%); }
.wbank.sm.draft i { color: #dbe6fb; }

/* ---------- هيدر جوه البنك ---------- */
.bq-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 15px 17px; border-radius: 18px; background: linear-gradient(135deg,#ffffff,#f4f7fe); border: 1.5px solid #e4e9f5; box-shadow: 0 8px 22px rgba(15,28,60,.07); }
.sp-dark .bq-head { background: linear-gradient(135deg,#111c33,#0d1730); border-color: #22345a; }
.bq-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.bq-info h2 { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.bq-info small { font-size: .72rem; opacity: .6; font-weight: 700; }
.bq-head .admin-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* شريط التحديد الجماعي */
.bq-selbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 13px; padding: 11px 15px; border-radius: 14px; background: #fff7ed; border: 1.5px dashed #fdba74; font-size: .82rem; font-weight: 800; }
.sp-dark .bq-selbar { background: rgba(194,88,10,.1); border-color: #7c4a12; }
.bq-selbar b { color: #f4791f; font-size: 1rem; }

/* ---------- قائمة الأسئلة ---------- */
.bq-list { display: flex; flex-direction: column; gap: 11px; }
.bq-row { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border-radius: 16px; background: #fff; border: 1.5px solid #e6eaf4; box-shadow: 0 4px 14px rgba(15,28,60,.05); transition: .18s; }
.sp-dark .bq-row { background: #101b32; border-color: #22345a; }
.bq-row:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,28,60,.1); border-color: rgba(244,121,31,.45); }
.bq-check { display: flex; align-items: center; padding-top: 4px; }
.bq-check input { width: 19px; height: 19px; accent-color: #f4791f; cursor: pointer; }
.bq-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg,#16305e,#2a4a85); color: #ffd166; font-size: .78rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 9px rgba(22,48,94,.25); }
.bq-main { flex: 1; min-width: 0; }
.bq-qtext { margin: 2px 0 9px; font-size: .9rem; font-weight: 800; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.bq-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.bq-opt { padding: 6px 12px; border-radius: 10px; background: #f1f4fb; border: 1.5px solid #e2e7f2; font-size: .78rem; font-weight: 700; }
.sp-dark .bq-opt { background: #16233f; border-color: #26375a; }
.bq-opt.ok { background: #dcfce7; border-color: #86efac; color: #15803d; font-weight: 900; }
.sp-dark .bq-opt.ok { background: rgba(21,128,61,.16); border-color: rgba(34,197,94,.4); color: #86efac; }
.bq-opt.ok i { font-size: .66rem; }
.bq-ans { margin: 0; padding: 8px 12px; border-radius: 10px; background: #eff6ff; border: 1.5px solid #cfe0f8; font-size: .8rem; line-height: 1.8; white-space: pre-wrap; }
.sp-dark .bq-ans { background: rgba(29,78,216,.1); border-color: #26406e; }
.bq-ans i { color: #3b82f6; margin-left: 4px; font-size: .72rem; }
.bq-ans.muted { background: transparent; border-style: dashed; opacity: .55; font-weight: 700; }
.bq-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.bq-side .admin-btn.sm { padding: 6px 10px; }

@media (max-width: 620px) {
  .bq-head { padding: 12px 13px; gap: 10px; }
  .bq-head .admin-head-btns { width: 100%; }
  .bq-head .admin-head-btns .admin-btn { flex: 1; font-size: .72rem; padding: 9px 6px; }
  .bq-row { padding: 12px 11px; gap: 9px; flex-wrap: wrap; }
  .bq-side { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* ---------- محرر السؤال ---------- */
.bq-editor-ov { z-index: 12000; }
.qe-box { max-height: 92vh; overflow-y: auto; }
.qe-box .spm-head { position: sticky; top: 0; z-index: 2; background: inherit; }
.qe-body { padding: 4px 2px 8px; }
.qe-lbl { display: block; margin: 10px 0 7px; font-size: .78rem; font-weight: 900; color: #16305e; }
.sp-dark .qe-lbl { color: #9fb4dd; }
.qe-opts { display: flex; flex-direction: column; gap: 9px; margin-bottom: 6px; }
.qe-opt { display: flex; align-items: stretch; gap: 9px; }
.qe-correct { flex-shrink: 0; position: relative; width: 46px; border: 2px solid #dfe4ef; border-radius: 12px; background: #f5f7fc; font-family: inherit; font-size: .95rem; font-weight: 900; color: #556; cursor: pointer; transition: .18s; display: flex; align-items: center; justify-content: center; }
.sp-dark .qe-correct { background: #16233f; border-color: #26375a; color: #b9c8e8; }
.qe-correct:hover { border-color: #22c55e; color: #16a34a; }
.qe-correct i { display: none; }
.qe-opt.correct .qe-correct { background: linear-gradient(135deg,#16a34a,#22c55e); border-color: #16a34a; color: #fff; box-shadow: 0 5px 13px rgba(22,163,74,.35); }
.qe-opt.correct .qe-correct .qe-letter { display: none; }
.qe-opt.correct .qe-correct i { display: inline; font-size: 1rem; }
.qe-opt-in { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 12px; border: 1.5px solid #dfe4ef; background: #fff; font-family: inherit; font-size: .85rem; font-weight: 700; transition: .16s; }
.sp-dark .qe-opt-in { background: #0c1526; border-color: #26375a; color: #e8eefb; }
.qe-opt-in:focus { outline: none; border-color: #f4791f; box-shadow: 0 0 0 3px rgba(244,121,31,.13); }
.qe-opt.correct .qe-opt-in { border-color: #86efac; background: #f0fdf4; }
.sp-dark .qe-opt.correct .qe-opt-in { background: rgba(21,128,61,.08); border-color: rgba(34,197,94,.35); }
.qe-ai { width: 100%; justify-content: center; opacity: .55; cursor: not-allowed; margin-bottom: 4px; }
.qe-soon { padding: 2px 9px; border-radius: 999px; background: #ffedd5; color: #c2410c; font-size: .62rem; font-weight: 900; }
.sp-dark .qe-soon { background: rgba(194,65,12,.2); color: #fdba74; }

/* ---------- لوحة رموز الفيزياء ---------- */
.phys-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; padding: 12px; margin: 4px 0 10px; border-radius: 14px; background: #f4f7fe; border: 1.5px dashed #c6d3ea; max-height: 180px; overflow-y: auto; }
.sp-dark .phys-palette { background: #0e1830; border-color: #2b3f66; }
.pp-sym { min-height: 38px; border: 1.5px solid #dfe4ef; border-radius: 10px; background: #fff; font-family: inherit; font-size: .92rem; font-weight: 800; color: #16305e; cursor: pointer; transition: .14s; padding: 4px 2px; }
.sp-dark .pp-sym { background: #16233f; border-color: #26375a; color: #cfe0ff; }
.pp-sym:hover { background: #f4791f; border-color: #f4791f; color: #fff; transform: translateY(-2px) scale(1.06); box-shadow: 0 5px 12px rgba(244,121,31,.35); }
.pp-sym:active { transform: scale(.94); }

/* ============================================================
   استوديو رسم صورة السؤال (cs-*)
   ============================================================ */
.cs-overlay { position: fixed; inset: 0; z-index: 13000; background: rgba(9,15,30,.72); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 12px; opacity: 0; transition: opacity .22s; }
.cs-overlay.show { opacity: 1; }
.cs-studio { width: min(1120px, 100%); height: min(94vh, 100%); display: flex; flex-direction: column; border-radius: 22px; background: #f2f5fc; border: 1.5px solid #dfe6f5; box-shadow: 0 30px 80px rgba(5,12,30,.5); overflow: hidden; transform: translateY(14px) scale(.98); transition: transform .25s; }
.cs-overlay.show .cs-studio { transform: none; }
.sp-dark .cs-studio { background: #0d1730; border-color: #22345a; }
.cs-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 13px 17px; background: linear-gradient(135deg,#16305e,#20407a); color: #fff; }
.cs-top h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 9px; }
.cs-top h3 i { color: #ffd166; }
.cs-top-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-top-btns .admin-btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: #fff; }
.cs-top-btns .admin-btn:hover { background: rgba(255,255,255,.22); }
.cs-top-btns .admin-btn.gold { background: linear-gradient(135deg,#f4791f,#ffb62e); border-color: transparent; box-shadow: 0 6px 14px rgba(244,121,31,.4); }

/* التولبار */
.cs-toolbar { display: flex; align-items: stretch; gap: 5px; flex-wrap: wrap; padding: 9px 12px; background: #ffffff; border-bottom: 1.5px solid #e4e9f5; }
.sp-dark .cs-toolbar { background: #111c33; border-color: #22345a; }
.cs-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 58px; padding: 7px 9px; border: 1.5px solid transparent; border-radius: 12px; background: transparent; font-family: inherit; cursor: pointer; transition: .15s; color: #44507a; }
.sp-dark .cs-tool { color: #a9bade; }
.cs-tool i { font-size: .95rem; }
.cs-tool span { font-size: .6rem; font-weight: 900; white-space: nowrap; }
.cs-tool:hover { background: #f1f4fc; border-color: #dfe6f5; }
.sp-dark .cs-tool:hover { background: #16233f; border-color: #26375a; }
.cs-tool.active { background: linear-gradient(135deg,#16305e,#2a4a85); border-color: transparent; color: #ffd166; box-shadow: 0 5px 13px rgba(22,48,94,.3); }
.cs-tool.danger { color: #dc2626; }
.sp-dark .cs-tool.danger { color: #f87171; }
.cs-tool.danger:hover { background: #fee2e2; border-color: #fecaca; }
.sp-dark .cs-tool.danger:hover { background: rgba(185,28,28,.15); border-color: rgba(185,28,28,.3); }
.cs-sep { width: 1.5px; align-self: stretch; margin: 4px 3px; background: #e4e9f5; border-radius: 2px; }
.sp-dark .cs-sep { background: #22345a; }

/* قائمة عناصر الفيزياء */
.cs-phys-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; padding: 12px 14px; background: #fbfcff; border-bottom: 1.5px solid #e4e9f5; max-height: 240px; overflow-y: auto; }
.sp-dark .cs-phys-menu { background: #0e1830; border-color: #22345a; }
.cs-phys-menu[hidden] { display: none; }
.cs-phys-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 6px 8px; border: 1.5px solid #e2e8f4; border-radius: 13px; background: #fff; font-family: inherit; cursor: pointer; transition: .16s; }
.sp-dark .cs-phys-item { background: #16233f; border-color: #26375a; }
.cs-phys-item canvas { width: 90px; height: 46px; border-radius: 7px; background: #fdf9ee; }
.cs-phys-item span { font-size: .64rem; font-weight: 900; color: #2a3a60; text-align: center; line-height: 1.4; }
.sp-dark .cs-phys-item span { color: #c3d2ef; }
.cs-phys-item:hover { border-color: #f4791f; transform: translateY(-2px); box-shadow: 0 7px 16px rgba(244,121,31,.2); }
.cs-phys-item:active { transform: scale(.96); }

/* الورقة */
.cs-paper-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 14px; overflow: auto; background: repeating-conic-gradient(#e9edf6 0% 25%, #f2f5fc 0% 50%) 0 0 / 26px 26px; }
.sp-dark .cs-paper-wrap { background: repeating-conic-gradient(#101b33 0% 25%, #0d1730 0% 50%) 0 0 / 26px 26px; }
#csCanvas { max-width: 100%; max-height: 100%; aspect-ratio: 1000 / 700; border-radius: 12px; box-shadow: 0 14px 40px rgba(10,20,45,.28); background: #fdf9ee; touch-action: none; cursor: crosshair; }
.cs-hint { padding: 9px 15px; font-size: .72rem; font-weight: 800; text-align: center; color: #5a6a92; background: #eef2fb; border-top: 1.5px solid #e4e9f5; }
.sp-dark .cs-hint { background: #101b33; border-color: #22345a; color: #8fa3cd; }

@media (max-width: 640px) {
  .cs-overlay { padding: 0; }
  .cs-studio { height: 100%; border-radius: 0; }
  .cs-top { padding: 10px 12px; }
  .cs-top h3 { font-size: .84rem; }
  .cs-top-btns .admin-btn { padding: 8px 10px; font-size: .68rem; }
  .cs-toolbar { padding: 7px 8px; gap: 3px; overflow-x: auto; flex-wrap: nowrap; }
  .cs-tool { min-width: 50px; padding: 6px 6px; }
  .cs-tool span { font-size: .54rem; }
  .cs-phys-menu { grid-template-columns: repeat(3, 1fr); max-height: 200px; }
  .cs-paper-wrap { padding: 8px; }
  .cs-hint { font-size: .62rem; padding: 7px 10px; }
}

/* ---------- SP-V22 #3: أزرار ±10 عائمة على شاشة المشغل ---------- */
.sp-ov-seek { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); background: rgba(8,14,30,.38); backdrop-filter: blur(8px); color: rgba(255,255,255,.92); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s cubic-bezier(.22,.9,.3,1.3); opacity: .62; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.sp-ov-seek i { font-size: 1.15rem; }
.sp-ov-seek b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .52rem; font-weight: 900; padding-top: 3px; pointer-events: none; }
.sp-ov-seek:hover { background: rgba(244,121,31,.85); border-color: transparent; transform: translateY(-50%) scale(1.08); }
.sp-ov-seek:active { transform: translateY(-50%) scale(.92); }
.sp-ov-right { right: 18px; }
.sp-ov-left { left: 18px; }
.sp-chrome-hidden .sp-ov-seek { opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .sp-ov-seek { width: 46px; height: 46px; }
  .sp-ov-right { right: 10px; }
  .sp-ov-left { left: 10px; }
}

/* ============================================================
   SP-V22-EXAM — نظام الامتحانات (دخول البنك + الرنر + النتيجة)
   ============================================================ */
html.exm-lock { overflow: hidden; }
.exm-overlay {
  position: fixed; inset: 0; z-index: 15000;
  background: linear-gradient(160deg, #0e2247 0%, #16305e 45%, #1d3d76 100%);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  direction: rtl;
}
.exm-page {
  max-width: 900px; margin: 0 auto; padding: 18px 14px 60px;
  min-height: 100%; position: relative;
}
.exm-loading {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 70vh; color: #fff; font-weight: 800; font-size: 17px;
}
.exm-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: var(--orange);
  animation: exmSpin .8s linear infinite; display: inline-block;
}
@keyframes exmSpin { to { transform: rotate(360deg); } }

/* ---- الهيدر ---- */
.exm-head { position: relative; text-align: center; padding: 10px 44px 4px; color: #fff; }
.exm-head h2 { font-size: 24px; font-weight: 900; margin: 0; }
.exm-x {
  position: absolute; top: 6px; left: 0;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); color: #fff; font-size: 17px; cursor: pointer;
  transition: .2s;
}
.exm-x:hover { background: rgba(255,80,80,.25); border-color: rgba(255,120,120,.5); }
.exm-meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px;
}
.exm-meta span {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  color: #fff; font-size: 12px; font-weight: 800;
  padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
}
.exm-meta span i { color: var(--orange-light); }
.exm-mode-note { color: rgba(255,255,255,.75); font-size: 12px; font-weight: 700; margin: 8px 0 0; }

/* ---- منصة الأوائل ---- */
.exm-podium-wrap { margin-top: 22px; }
.exm-podium-wrap h3, .exm-ranks h3 {
  color: #ffd166; font-size: 15px; font-weight: 900; text-align: center; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.exm-podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 10px;
}
.exm-pod {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.18); border-radius: 18px 18px 8px 8px;
  padding: 14px 10px 12px; width: 30%; max-width: 170px; color: #fff;
  position: relative; backdrop-filter: blur(4px);
}
.exm-pod.me { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(244,121,31,.4), 0 10px 26px rgba(0,0,0,.3); }
.exm-pod1 { order: 2; padding-top: 20px; padding-bottom: 22px; transform: translateY(-14px);
  background: linear-gradient(180deg, rgba(255,209,102,.22), rgba(255,255,255,.06));
  border-color: rgba(255,209,102,.55); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.exm-pod2 { order: 1; }
.exm-pod3 { order: 3; }
.exm-pod-medal { font-size: 26px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.exm-pod1 .exm-pod-medal { font-size: 34px; }
.exm-pod-av {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12);
}
.exm-pod1 .exm-pod-av { width: 62px; height: 62px; border-color: #ffd166; }
.exm-pod-noav { display: inline-flex; align-items: center; justify-content: center; color: #cdd8ee; font-size: 20px; }
.exm-pod-name { font-size: 12px; font-weight: 900; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exm-pod-name b { color: var(--orange-light); }
.exm-pod-score { font-size: 19px; font-weight: 900; color: #ffd166; }
.exm-pod-time { font-size: 10.5px; font-weight: 800; color: rgba(255,255,255,.65); display: inline-flex; gap: 4px; align-items: center; }

/* ---- باقي المتصدرين ---- */
.exm-ranks { margin-top: 24px; }
.exm-rank-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; padding: 9px 14px; margin-bottom: 7px; color: #fff;
}
.exm-rank-row.me { border-color: var(--orange); background: rgba(244,121,31,.14); }
.exm-rank-no { font-weight: 900; color: #ffd166; font-size: 13px; min-width: 34px; }
.exm-rank-name { flex: 1; font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exm-rank-pct { font-weight: 900; font-size: 13px; color: #7ee8a2; }
.exm-rank-time { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.6); min-width: 48px; text-align: left; }
.exm-empty {
  text-align: center; color: rgba(255,255,255,.8); font-weight: 800; font-size: 14px;
  background: rgba(255,255,255,.06); border: 1px dashed rgba(255,255,255,.25);
  border-radius: 16px; padding: 26px 16px; margin-top: 22px;
}
.exm-empty i { color: #ffd166; margin-left: 6px; }
.exm-prev-score {
  margin-top: 16px; text-align: center; color: #fff; font-size: 13px; font-weight: 800;
  background: rgba(126,232,162,.12); border: 1px solid rgba(126,232,162,.3);
  border-radius: 12px; padding: 10px 14px;
}
.exm-prev-score i { color: #7ee8a2; margin-left: 5px; }
.exm-expelled-tag { color: #ff9c9c; font-size: 11.5px; }

/* ---- زر البدء ---- */
.exm-start-wrap { text-align: center; margin-top: 26px; }
.exm-start-btn {
  background: linear-gradient(135deg, var(--orange), #e05e00);
  color: #fff; border: none; border-radius: 16px; cursor: pointer;
  font-size: 17px; font-weight: 900; font-family: inherit;
  padding: 15px 44px; box-shadow: 0 10px 26px rgba(244,121,31,.45);
  transition: .2s; display: inline-flex; align-items: center; gap: 10px;
}
.exm-start-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(244,121,31,.55); }
.exm-start-btn:active { transform: translateY(0); }
.exm-anticheat-note {
  margin-top: 12px; color: rgba(255,255,255,.6); font-size: 11.5px; font-weight: 700;
}
.exm-anticheat-note i { color: #ffd166; }

/* ---- المودالات (تأكيد + اختيار وضع الإجابة) ---- */
.exm-modal-ov {
  position: fixed; inset: 0; z-index: 15500;
  background: rgba(8,16,34,.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  direction: rtl;
}
.exm-modal {
  background: #fff; border-radius: 20px; padding: 22px 20px;
  width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
  animation: exmPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes exmPop { from { transform: scale(.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.exm-modal h3 { margin: 0 0 14px; font-size: 16px; font-weight: 900; color: var(--navy); text-align: center; }
.exm-modal-text { margin: 0 0 16px; font-size: 14px; font-weight: 800; color: var(--navy); text-align: center; line-height: 1.8; }
.exm-modal-btns { display: flex; gap: 10px; }
.exm-mbtn {
  flex: 1; border: 1.5px solid #dbe3f0; background: #f4f7fc; color: var(--navy);
  border-radius: 12px; padding: 11px; font-size: 13.5px; font-weight: 900; font-family: inherit; cursor: pointer;
  transition: .15s;
}
.exm-mbtn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.exm-mbtn.danger { background: #e03131; border-color: #e03131; color: #fff; }
.exm-mbtn:hover { filter: brightness(1.08); }
.exm-mode-opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  border: 1.5px solid #dbe3f0; background: #f8fafd; border-radius: 14px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer; text-align: right;
  font-family: inherit; transition: .15s;
}
.exm-mode-opt:hover { border-color: var(--orange); background: #fff7f0; transform: translateY(-1px); }
.exm-mode-ic { font-size: 24px; line-height: 1; }
.exm-mode-opt b { display: block; font-size: 14px; color: var(--navy); }
.exm-mode-opt small { display: block; font-size: 11.5px; font-weight: 700; color: #6b7a95; line-height: 1.7; margin-top: 3px; }
.exm-modal-cancel {
  width: 100%; border: none; background: none; color: #8a97ad;
  font-size: 13px; font-weight: 800; font-family: inherit; cursor: pointer; padding: 8px;
}
.exm-modal-cancel:hover { color: #e03131; }

/* ---- الرنر (صفحة السؤال) ---- */
.exm-runner { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 20px; }
.exm-run-head {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 8px 0 8px 0; color: #fff;
}
.exm-run-head .exm-x { position: static; flex-shrink: 0; }
.exm-run-title { flex: 1; font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exm-timer {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  color: #ffd166; font-size: 13px; font-weight: 900; padding: 6px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums;
}
.exm-timer.danger { background: rgba(224,49,49,.25); border-color: #ff8787; color: #ffb3b3; animation: exmPulse 1s infinite; }
@keyframes exmPulse { 50% { opacity: .55; } }
.exm-progress {
  background: rgba(126,232,162,.15); border: 1px solid rgba(126,232,162,.3);
  color: #7ee8a2; font-size: 12.5px; font-weight: 900; padding: 6px 12px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* شريط أرقام الأسئلة */
.exm-strip {
  display: flex; gap: 7px; overflow-x: auto; padding: 8px 2px 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.exm-qn {
  min-width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08);
  color: #fff; font-size: 13.5px; font-weight: 900; font-family: inherit;
  transition: .15s; position: relative;
}
.exm-qn:hover { background: rgba(255,255,255,.18); }
.exm-qn.done { background: rgba(126,232,162,.2); border-color: rgba(126,232,162,.5); color: #7ee8a2; }
.exm-qn.cur { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(244,121,31,.5); transform: scale(1.08); }
.exm-qn.flagged::after {
  content: ''; position: absolute; top: -3px; left: -3px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #ffd166; border: 2px solid #16305e;
}

/* صندوق السؤال */
.exm-qbox {
  background: #fff; border-radius: 20px; padding: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.28); flex: 1;
  animation: exmFade .25s ease;
}
@keyframes exmFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.exm-qtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.exm-qno { font-size: 12.5px; font-weight: 900; color: #7c8aa5; }
.exm-qacts { display: flex; gap: 6px; }
.exm-qact {
  border: 1.5px solid #dbe3f0; background: #f6f9fd; color: var(--navy);
  border-radius: 10px; padding: 7px 11px; font-size: 11.5px; font-weight: 900; font-family: inherit;
  cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 5px;
}
.exm-qact:hover { border-color: var(--navy); }
.exm-qact.on { background: #fff4d6; border-color: #ffd166; color: #a06a00; }
.exm-qact.imp.on { background: #ffe9d6; border-color: var(--orange); color: #c25a00; }
.exm-qtext { font-size: 16px; font-weight: 900; color: var(--navy); line-height: 2; margin-bottom: 12px; white-space: pre-wrap; }

/* صورة السؤال + الزوم */
.exm-qimg-wrap {
  position: relative; margin-bottom: 14px; border: 1.5px solid #e8dcc4;
  border-radius: 14px; overflow: hidden; background: #fdf9ee;
}
.exm-qimg { display: block; width: 100%; height: auto; touch-action: pinch-zoom; }
.exm-qimg-zoom {
  position: absolute; bottom: 8px; left: 8px; z-index: 3;
  width: 44px; height: 44px; border-radius: 12px; border: none; cursor: pointer;
  background: rgba(22,48,94,.88); color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3); transition: .15s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.exm-qimg-zoom:hover { background: var(--orange); }
.exm-zoom-ov {
  position: fixed; inset: 0; z-index: 15600; background: rgba(8,16,34,.94);
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .2s;
}
.exm-zoom-ov.show { opacity: 1; }
/* v24 F4: شريط أدوات اللايت بوكس — إغلاق + تحكم تكبير */
.exm-zoom-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; flex-shrink: 0; }
.exm-zoom-x {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1); color: #fff; font-size: 17px; cursor: pointer;
  transition: .15s;
}
.exm-zoom-x:active, .exm-zoom-x:hover { background: rgba(255,255,255,.22); }
.exm-zoom-ctrls { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 5px 8px; }
.exm-zoom-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 14px; transition: .15s;
}
.exm-zoom-btn:active, .exm-zoom-btn:hover { background: var(--orange); }
.exm-zoom-pct { color: #fff; font-size: .78rem; font-weight: 900; min-width: 46px; text-align: center; }
.exm-zoom-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 12px 16px; text-align: center; }
.exm-zoom-cv { background: #fdf9ee; border-radius: 12px; max-width: none; display: inline-block; touch-action: pan-x pan-y pinch-zoom; }
@media (max-width: 640px) {
  .exm-zoom-bar { padding: 8px 10px; }
  .exm-zoom-x { width: 42px; height: 42px; }
}

/* الاختيارات */
.exm-opts { display: flex; flex-direction: column; gap: 9px; }
.exm-opt {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: right;
  border: 1.5px solid #dbe3f0; background: #f8fafd; border-radius: 13px;
  padding: 12px 13px; cursor: pointer; font-family: inherit; transition: .15s;
  position: relative;
}
.exm-opt:hover:not(:disabled) { border-color: var(--navy); background: #eef4ff; }
.exm-opt:disabled { cursor: default; }
.exm-opt-letter {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.exm-opt-txt { flex: 1; font-size: 14px; font-weight: 800; color: var(--navy); line-height: 1.8; }
.exm-opt.chosen { border-color: var(--orange); background: #fff4ea; box-shadow: 0 0 0 1.5px rgba(244,121,31,.35); }
.exm-opt.chosen .exm-opt-letter { background: var(--orange); }
.exm-opt.right { border-color: #2f9e44; background: #e9fbef; box-shadow: 0 0 0 1.5px rgba(47,158,68,.35); }
.exm-opt.right .exm-opt-letter { background: #2f9e44; }
.exm-opt.wrong { border-color: #e03131; background: #fff0f0; box-shadow: 0 0 0 1.5px rgba(224,49,49,.3); }
.exm-opt.wrong .exm-opt-letter { background: #e03131; }
.exm-opt-ic { font-size: 17px; flex-shrink: 0; }
.exm-opt-ic.ok { color: #2f9e44; }
.exm-opt-ic.no { color: #e03131; }
.exm-essay-note {
  background: #f2f6ff; border: 1.5px dashed #b9c9e8; color: var(--navy);
  border-radius: 13px; padding: 16px; font-size: 13px; font-weight: 800; text-align: center;
}
.exm-essay-note i { color: var(--orange); margin-left: 6px; }

/* التفسير */
.exm-expl {
  margin-top: 12px; background: #fffbea; border: 1.5px solid #ffe08a;
  border-radius: 13px; padding: 12px 14px; animation: exmFade .3s ease;
}
.exm-expl-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 900; color: #a06a00;
  background: #ffefbf; border-radius: 999px; padding: 4px 11px; margin-bottom: 7px;
}
.exm-expl p { margin: 0; font-size: 13px; font-weight: 800; color: #5a4a12; line-height: 1.9; white-space: pre-wrap; }

/* الفوتر: تنقل + تسليم */
.exm-run-foot { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.exm-nav {
  flex: 1; min-width: 110px; border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1);
  color: #fff; border-radius: 13px; padding: 13px; font-size: 14px; font-weight: 900; font-family: inherit;
  cursor: pointer; transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.exm-nav:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.exm-nav:disabled { opacity: .35; cursor: default; }
.exm-nav.primary { background: var(--orange); border-color: var(--orange); box-shadow: 0 6px 18px rgba(244,121,31,.4); }
.exm-nav.primary:hover { background: var(--orange-light); }
.exm-submit {
  flex: 1.4; min-width: 140px; border: none; border-radius: 13px; padding: 13px;
  font-size: 14px; font-weight: 900; font-family: inherit; cursor: pointer; transition: .15s;
  background: linear-gradient(135deg, #2f9e44, #237a34); color: #fff;
  box-shadow: 0 6px 18px rgba(47,158,68,.4);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.exm-submit:hover { filter: brightness(1.1); }
.exm-submit.ghost {
  flex: 0 0 auto; min-width: auto; background: rgba(47,158,68,.15);
  border: 1.5px solid rgba(126,232,162,.4); color: #7ee8a2; box-shadow: none;
  padding: 13px 16px;
}

/* ---- صفحة النتيجة: الدايرة المتحركة + الإحصائيات ---- */
.exm-results { text-align: center; }
.exm-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 15100; }
.exm-circle-wrap { position: relative; width: 210px; height: 210px; margin: 18px auto 6px; }
.exm-circle { width: 100%; height: 100%; transform: rotate(-90deg); }
.exm-circ-bg { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 14; }
.exm-circ-fill {
  fill: none; stroke-width: 14; stroke-linecap: round;
  transition: stroke-dashoffset 1.6s cubic-bezier(.4,0,.2,1);
}
.exm-circle-wrap.tier0 .exm-circ-fill { stroke: #ff6b6b; }
.exm-circle-wrap.tier1 .exm-circ-fill { stroke: #ff922b; }
.exm-circle-wrap.tier2 .exm-circ-fill { stroke: #ffd166; }
.exm-circle-wrap.tier3 .exm-circ-fill { stroke: #69db7c; }
.exm-circle-wrap.tier4 .exm-circ-fill { stroke: #ffd700; filter: drop-shadow(0 0 8px rgba(255,215,0,.7)); }
.exm-circle-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.exm-pct { font-size: 42px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; line-height: 1; }
.exm-frac { font-size: 13px; font-weight: 800; color: rgba(255,255,255,.6); }
.exm-tier-msg { font-size: 16px; font-weight: 900; margin: 10px auto 0; max-width: 480px; line-height: 1.9; }
.exm-tier-msg.tier0 { color: #ff9c9c; }
.exm-tier-msg.tier1 { color: #ffc078; }
.exm-tier-msg.tier2 { color: #ffe066; }
.exm-tier-msg.tier3 { color: #8ce99a; }
.exm-tier-msg.tier4 { color: #ffd700; text-shadow: 0 0 18px rgba(255,215,0,.5); }
.exm-stats {
  display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap;
}
.exm-stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 14px 18px; min-width: 108px; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.exm-stat i { color: var(--orange-light); font-size: 17px; }
.exm-stat b { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.exm-stat span { font-size: 11px; font-weight: 800; color: rgba(255,255,255,.6); }

/* مراجعة الأسئلة */
.exm-rev-title {
  color: #fff; font-size: 15px; font-weight: 900; margin: 30px 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.exm-rev-title i { color: var(--orange-light); }
.exm-rev-list { text-align: right; display: flex; flex-direction: column; gap: 12px; }
.exm-rev {
  background: #fff; border-radius: 16px; padding: 14px;
  border-right: 5px solid #b9c4d6;
}
.exm-rev.ok { border-right-color: #2f9e44; }
.exm-rev.no { border-right-color: #e03131; }
.exm-rev.skip { border-right-color: #f4b000; }
.exm-rev-q { font-size: 13.5px; font-weight: 900; color: var(--navy); line-height: 1.9; margin-bottom: 9px; }
.exm-rev-badge {
  display: inline-block; font-size: 10.5px; font-weight: 900;
  background: #f2f5fa; border-radius: 999px; padding: 3px 10px; margin-right: 6px; white-space: nowrap;
}
.exm-rev-opt {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #e4eaf3; background: #f9fbfe; border-radius: 10px;
  padding: 8px 11px; margin-bottom: 6px; font-size: 12.5px; font-weight: 800; color: var(--navy);
}
.exm-rev-opt span {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px;
  background: #dbe3f0; color: var(--navy); font-size: 11px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}
.exm-rev-opt.right { border-color: #2f9e44; background: #e9fbef; }
.exm-rev-opt.right span { background: #2f9e44; color: #fff; }
.exm-rev-opt.wrong { border-color: #e03131; background: #fff0f0; }
.exm-rev-opt.wrong span { background: #e03131; color: #fff; }

/* ---- التوست + بانر التحذير ---- */
.exm-toast {
  position: fixed; bottom: 24px; right: 50%; transform: translateX(50%);
  z-index: 16000; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 900; padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: exmToastIn .25s ease;
  max-width: 92vw; text-align: center; direction: rtl;
}
.exm-toast.bad { background: #c92a2a; }
@keyframes exmToastIn { from { opacity: 0; transform: translateX(50%) translateY(14px); } to { opacity: 1; transform: translateX(50%) translateY(0); } }
.exm-warn-banner {
  position: fixed; top: 14px; right: 50%; transform: translateX(50%);
  z-index: 16100; background: linear-gradient(135deg, #e8590c, #c92a2a);
  color: #fff; font-size: 13.5px; font-weight: 900; padding: 13px 22px; border-radius: 14px;
  box-shadow: 0 12px 34px rgba(201,42,42,.5); animation: exmWarnIn .3s cubic-bezier(.34,1.56,.64,1);
  max-width: 92vw; text-align: center; direction: rtl; line-height: 1.8;
}
.exm-warn-banner.final { background: linear-gradient(135deg, #862e9c, #c92a2a); font-size: 14.5px; }
@keyframes exmWarnIn { from { opacity: 0; transform: translateX(50%) translateY(-20px) scale(.9); } to { opacity: 1; transform: translateX(50%) translateY(0) scale(1); } }

/* ---- موبايل ---- */
@media (max-width: 640px) {
  .exm-page { padding: 12px 10px 46px; }
  .exm-head h2 { font-size: 19px; }
  .exm-podium { gap: 6px; }
  .exm-pod { padding: 11px 6px 10px; }
  .exm-pod-av { width: 44px; height: 44px; }
  .exm-pod1 .exm-pod-av { width: 52px; height: 52px; }
  .exm-pod-name { font-size: 10.5px; }
  .exm-pod-score { font-size: 16px; }
  .exm-start-btn { width: 100%; justify-content: center; padding: 15px 20px; font-size: 16px; }
  .exm-run-title { font-size: 13px; }
  .exm-timer, .exm-progress { font-size: 11.5px; padding: 5px 9px; }
  .exm-qbox { padding: 13px; border-radius: 16px; }
  .exm-qtext { font-size: 14.5px; }
  .exm-opt { padding: 11px 10px; }
  .exm-opt-txt { font-size: 13px; }
  .exm-qact { font-size: 10.5px; padding: 6px 8px; }
  .exm-run-foot { position: sticky; bottom: 0; padding: 10px 0 6px;
    background: linear-gradient(0deg, rgba(14,34,71,.96) 70%, transparent); }
  .exm-nav, .exm-submit { padding: 12px; font-size: 13px; }
  .exm-circle-wrap { width: 175px; height: 175px; }
  .exm-pct { font-size: 34px; }
  .exm-stat { min-width: 90px; padding: 11px 12px; }
  .exm-stat b { font-size: 16px; }
  .exm-tier-msg { font-size: 14px; padding: 0 8px; }
}

/* ============================================================
   SP-V23-EXAM-RETHEME — واجهة الامتحان بهوية المنصة
   (أبيض + كحلي + برتقالي بدل الأزرق الغامق) + بانر المستر + بوديوم المنصة
   ============================================================ */
.exm-overlay {
  background:
    radial-gradient(rgba(22,48,94,.05) 1.5px, transparent 1.5px),
    linear-gradient(180deg, #f7f9fd 0%, #ffffff 30%);
  background-size: 26px 26px, 100% 100%;
}
.exm-loading { color: var(--navy); }
.exm-spinner { border-color: rgba(22,48,94,.15); border-top-color: var(--orange); }

/* ---- بانر الهيرو بتاع الامتحان ---- */
.exm-hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, #1d3d76 100%);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(22,48,94,.28);
  margin-top: 4px;
}
.exm-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.07) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
.exm-hero .exm-x {
  position: absolute; top: 10px; left: 10px; z-index: 5;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff;
}
.exm-hero .exm-x:hover { background: rgba(255,80,80,.3); }
.exm-hero-inner {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 18px 18px 0 6px;
}
.exm-hero-txt { padding-bottom: 18px; min-width: 0; }
.exm-hero-brand {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--orange-light); font-size: 12.5px; font-weight: 900; letter-spacing: .3px;
}
.exm-hero-brand img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(0,0,0,.35)); }
.exm-hero-txt h2 { color: #fff; font-size: 21px; font-weight: 900; margin: 7px 0 4px; line-height: 1.45; }
.exm-hero-teacher-name { color: rgba(255,255,255,.85); font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.exm-hero-teacher-name i { color: var(--orange-light); }
.exm-hero-teacher {
  width: 118px; max-height: 150px; object-fit: contain; object-position: bottom;
  flex-shrink: 0; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35));
}
.exm-hero .exm-meta { justify-content: flex-start; margin-top: 12px; }
.exm-hero .exm-meta span { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); color: #fff; }
.exm-mode-note { color: #6b7a95; text-align: center; margin-top: 14px; font-size: 12.5px; }

/* ---- عناوين الأقسام على الخلفية الفاتحة ---- */
.exm-sec-title {
  color: var(--navy) !important; font-size: 16px; font-weight: 900; text-align: center;
  margin: 0 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.exm-sec-title i { color: var(--orange); }
.exm-podium-wrap { margin-top: 26px; }
.exm-podium-row { margin-top: 4px; }
.exm-me-card { outline: 2.5px solid var(--orange); outline-offset: 2px; }
.exm-me-tag { color: var(--orange); }

/* ---- صفوف الترتيب على الفاتح ---- */
.exm-ranks { margin-top: 24px; }
.exm-rank-row {
  background: rgba(248,250,252,.9); border: 1px solid #e6ecf5; color: var(--navy);
  box-shadow: 0 2px 8px rgba(22,48,94,.05);
}
.exm-rank-row.me { border-color: var(--orange); background: #fff7f0; }
.exm-rank-no { color: var(--orange); }
.exm-rank-name { color: var(--navy); }
.exm-rank-pct { color: #16a34a; }
.exm-rank-time { color: #8a97ad; }
.exm-empty { color: #6b7a95; background: #f8fafd; border-color: #cbd7e8; }
.exm-empty i { color: var(--orange); }
.exm-prev-score { color: var(--navy); background: #effaf3; border-color: #b7e4c7; }
.exm-prev-score i { color: #16a34a; }
.exm-expelled-tag { color: #d63031; }
.exm-anticheat-note { color: #8a97ad; }
.exm-anticheat-note i { color: var(--orange); }

/* ---- هيدر الرنر على الفاتح ---- */
.exm-run-head { color: var(--navy); }
.exm-run-head .exm-x { background: #f1f5fb; border-color: #dbe3f0; color: var(--navy); }
.exm-run-head .exm-x:hover { background: #ffe3e3; border-color: #ffa8a8; color: #d63031; }
.exm-run-title { color: var(--navy); }
.exm-timer { background: #fff7ed; border-color: #fed7aa; color: #c2540a; }
.exm-timer.danger { background: #ffe3e3; border-color: #ff8787; color: #d63031; }
.exm-progress { background: #effaf3; border-color: #b7e4c7; color: #16a34a; }

/* شريط الأرقام على الفاتح */
.exm-qn { border-color: #dbe3f0; background: #fff; color: var(--navy); box-shadow: 0 2px 6px rgba(22,48,94,.06); }
.exm-qn:hover { background: #f1f5fb; }
.exm-qn.done { background: #effaf3; border-color: #86dfa8; color: #16a34a; }
.exm-qn.cur { background: var(--orange); border-color: var(--orange); color: #fff; }
.exm-qn.flagged::after { border-color: #fff; }

/* صندوق السؤال */
.exm-qbox { border: 1px solid #e6ecf5; box-shadow: 0 10px 30px rgba(22,48,94,.09); }

/* فوتر الرنر */
.exm-run-foot { background: transparent; }
.exm-nav { background: #fff; border: 1.5px solid #dbe3f0; color: var(--navy); box-shadow: 0 2px 8px rgba(22,48,94,.06); }
.exm-nav:hover:not(:disabled) { border-color: var(--navy); }
.exm-nav.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.exm-nav.primary:hover { background: #1d3d76; }
.exm-submit.ghost { background: #fff; color: #c2540a; border: 1.5px solid #fed7aa; }

/* ---- النتيجة على الفاتح ---- */
.exm-results .exm-head h2 { color: var(--navy); }
.exm-results .exm-x { background: #f1f5fb; border-color: #dbe3f0; color: var(--navy); }
.exm-circ-bg { stroke: #e9eef7; }
.exm-frac { color: #8a97ad; }
.exm-pct { color: var(--navy); }
.exm-stat { background: #fff; border: 1px solid #e6ecf5; color: var(--navy); box-shadow: 0 4px 14px rgba(22,48,94,.07); }
.exm-stat i { color: var(--orange); }
.exm-stat b { color: var(--navy); }
.exm-stat span { color: #8a97ad; }
.exm-rev-title { color: var(--navy) !important; }
.exm-rev-title i { color: var(--orange); }
.exm-rev { background: #fff; border: 1px solid #e6ecf5; }
.exm-rev-q { color: var(--navy); }
.exm-tier-msg { color: var(--navy); }
.exm-tier-msg.tier4 { color: #b45309; }
.exm-tier-msg.tier0 { color: #d63031; }

/* موبايل: البانر يتظبط */
@media (max-width: 640px) {
  .exm-hero-teacher { width: 92px; max-height: 122px; }
  .exm-hero-txt h2 { font-size: 16.5px; }
  .exm-hero-inner { padding: 14px 12px 0 4px; }
  .exm-podium-row { gap: 8px; }
}


/* ====== SP-V23-QIMG: صور الأسئلة في المسودة + مراجعة النتيجة ====== */
.bq-qimg { margin: 8px 0 4px; border: 1.5px solid #e3e9f6; border-radius: 12px; overflow: hidden; background: #fff; max-width: 300px; }
.bq-qimg canvas { width: 100%; height: auto; display: block; }
.sp-dark .bq-qimg { border-color: #2a3f68; }
.exm-rev-img { margin: 10px 0; border: 1.5px solid #e3e9f6; border-radius: 14px; overflow: hidden; background: #fff; max-width: 380px; cursor: zoom-in; }
.exm-rev-img canvas { width: 100%; height: auto; display: block; }
@media (max-width: 640px) {
  .bq-qimg { max-width: 100%; }
  .exm-rev-img { max-width: 100%; }
}

/* ====== SP-V23-QE-MOBILE: بناء الأسئلة مناسب للموبايل ====== */
@media (max-width: 640px) {
  .bq-editor-ov { padding: 0 !important; align-items: stretch !important; }
  .bq-editor-ov .spm-box.qe-box { max-width: 100%; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 14px 14px 90px; display: flex; flex-direction: column; }
  .bq-editor-ov .qe-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .bq-editor-ov .spm-btns { position: fixed; bottom: 0; right: 0; left: 0; z-index: 5; margin: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1.5px solid #e6ebf7; box-shadow: 0 -8px 24px rgba(10,20,45,.08); display: flex; gap: 10px; }
  .sp-dark .bq-editor-ov .spm-btns { background: #101c36; border-top-color: #24365a; }
  .bq-editor-ov .spm-btns .spm-btn { flex: 1; padding: 14px 10px; font-size: .95rem; }
  .bq-editor-ov .qe-correct { width: 52px; min-height: 48px; }
  .bq-editor-ov .qe-opt-in { padding: 13px 12px; font-size: 16px; } /* 16px يمنع زوم iOS */
  .bq-editor-ov .admin-textarea { font-size: 16px; padding: 12px; }
  .bq-editor-ov .qe-lbl { font-size: .82rem; }
  .bq-editor-ov .spm-head { flex-wrap: wrap; gap: 8px; }
  .bq-editor-ov .spm-head #physPaletteBtn { width: 100%; justify-content: center; padding: 10px; }
  .bq-editor-ov .phys-palette { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 150px; }
  /* لوحة الأسئلة نفسها في البنك */
  .bq-row { flex-wrap: wrap; }
  .bq-side { width: 100%; justify-content: flex-end; }
}


/* ====== SP-V23-PLAYER: دبل تاب ±10 + لمسات أنعم ====== */
.sp-dbltap { position: absolute; top: 0; bottom: 0; width: 34%; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 900; font-size: .82rem; pointer-events: none; opacity: 0; transition: opacity .2s; }
.sp-dbltap i { font-size: 1.6rem; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.sp-dbltap-l { left: 0; background: radial-gradient(ellipse at left center, rgba(244,121,31,.35), transparent 72%); border-radius: 0 50% 50% 0; }
.sp-dbltap-r { right: 0; background: radial-gradient(ellipse at right center, rgba(244,121,31,.35), transparent 72%); border-radius: 50% 0 0 50%; }
.sp-dbltap.show { opacity: 1; animation: spDblPulse .65s ease; }
@keyframes spDblPulse { 0% { transform: scale(.92); } 45% { transform: scale(1.04); } 100% { transform: scale(1); } }
.sp-ov-seek:hover { background: rgba(244,121,31,.82); border-color: transparent; opacity: 1; transform: translateY(-50%) scale(1.1); }

/* ====== SP-V23-STEPS: خطوات الحل شرائط منسقة ====== */
.exm-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.exm-step { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 12px; background: #fff; border: 1.5px solid #e6ecf8; }
.exm-step p { margin: 0; font-size: .86rem; font-weight: 700; color: #24324e; line-height: 1.75; flex: 1; }
.exm-step-n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg,#f4791f,#ff9440); color: #fff; font-size: .72rem; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-top: 2px; box-shadow: 0 3px 8px rgba(244,121,31,.3); }

/* ============ SP-V23-N1: السؤال المقالي — إدخال الطالب + قسم الإجابات المقالية ============ */
.exm-essay-wrap { display: flex; flex-direction: column; gap: 10px; }
.exm-essay-input {
  width: 100%; min-height: 130px; resize: vertical;
  padding: 14px 16px; border-radius: 14px; font: inherit; font-size: 16px; line-height: 1.9;
  border: 2px solid rgba(22, 48, 94, .16); background: #fff; color: var(--navy);
  transition: border-color .2s, box-shadow .2s;
}
.exm-essay-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(244, 121, 31, .12); }
.exm-essay-hint { font-size: 12px; color: #7a8aa6; display: inline-flex; align-items: center; gap: 6px; }
.exm-rev-badge.essay { background: rgba(59, 130, 246, .12); color: #2563eb; }
.exm-expl.mine { border-color: rgba(59, 130, 246, .35); background: rgba(59, 130, 246, .05); }
.exm-expl.mine .exm-expl-tag { color: #2563eb; }
.exm-expl.mine.empty p { color: #96a3b8; font-style: italic; }

/* زر التصحيح الذكي المقفول */
.admin-btn.ai-locked {
  background: linear-gradient(135deg, #2b2350, #4c2a7a); color: #e9d8ff;
  border: 1px solid rgba(168, 85, 247, .45); cursor: pointer; position: relative;
  display: inline-flex; align-items: center; gap: 8px; opacity: .92;
}
.admin-btn.ai-locked:hover { opacity: 1; box-shadow: 0 6px 18px rgba(120, 60, 220, .3); }
.admin-btn.ai-locked .ai-soon {
  font-size: 10.5px; background: rgba(255, 255, 255, .16); border-radius: 20px; padding: 2px 8px;
}

/* شرائط الإجابات المقالية */
.es-row { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.es-row:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22, 48, 94, .1); }
.es-ic { color: var(--orange) !important; }
.es-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.es-meta .admin-chip { font-size: 10.5px; }
.es-score {
  font-weight: 800; color: var(--navy); background: rgba(244, 121, 31, .1);
  border-radius: 10px; padding: 4px 10px; font-size: 13px; white-space: nowrap;
}
.es-arrow { color: #b9c4d6; font-size: 12px; }

/* نافذة تفاصيل الإجابة المقالية */
.es-detail-ov {
  position: fixed; inset: 0; z-index: 1300; background: rgba(10, 18, 38, .55);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  padding: 18px; opacity: 0; transition: opacity .2s;
}
.es-detail-ov.show { opacity: 1; }
.es-detail-box {
  width: min(680px, 100%); max-height: 88vh; overflow: hidden auto; background: #fff;
  border-radius: 20px; box-shadow: 0 24px 70px rgba(8, 14, 30, .4);
  transform: translateY(14px); transition: transform .22s;
}
.es-detail-ov.show .es-detail-box { transform: none; }
.es-detail-head {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff; z-index: 2;
}
.es-detail-head b { font-size: 16px; display: block; }
.es-detail-head small { color: rgba(255, 255, 255, .65); font-size: 12px; }
.es-detail-x {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px; flex: none;
}
.es-detail-x:hover { background: rgba(255, 255, 255, .26); }
.es-detail-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.es-block { border: 1.5px solid rgba(22, 48, 94, .12); border-radius: 14px; padding: 13px 15px; }
.es-block p { margin: 6px 0 0; line-height: 1.9; color: var(--navy); font-size: 14.5px; white-space: pre-wrap; }
.es-block-tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; color: var(--navy);
}
.es-block.q { background: rgba(22, 48, 94, .04); }
.es-block.mine { border-color: rgba(59, 130, 246, .35); background: rgba(59, 130, 246, .05); }
.es-block.mine .es-block-tag { color: #2563eb; }
.es-block.model { border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .05); }
.es-block.model .es-block-tag { color: #16a34a; }
.es-block .exm-steps { margin-top: 8px; }

@media (max-width: 640px) {
  .es-row { flex-wrap: wrap; }
  .es-score { order: 5; }
}

/* ============ SP-V23-B1: أهم الأسئلة — صندوق الرئيسية + المودال ============ */
.kq-box {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #fff7ef 0%, #fff 55%), #fff;
  border: 1.5px solid rgba(244, 121, 31, .3); border-radius: 20px;
  padding: 18px 20px; box-shadow: 0 10px 30px rgba(244, 121, 31, .1);
  position: relative; overflow: hidden;
}
.kq-box::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 90% -20%, rgba(244, 121, 31, .14), transparent 55%);
}
.kq-ic {
  width: 54px; height: 54px; border-radius: 16px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 23px; color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  box-shadow: 0 8px 20px rgba(244, 121, 31, .35);
}
.kq-main { flex: 1; min-width: 0; }
.kq-title { font-size: 17px; font-weight: 900; color: var(--navy); display: flex; align-items: center; gap: 8px; margin: 0; }
.kq-badge {
  background: #e11d48; color: #fff; font-size: 11.5px; font-weight: 800;
  border-radius: 20px; padding: 2px 9px; min-width: 24px; text-align: center;
  animation: kqPop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes kqPop { from { transform: scale(0); } to { transform: scale(1); } }
.kq-sub { font-size: 12px; color: #7a8aa6; font-weight: 700; margin: 4px 0 0; }
.kq-btn {
  flex: none; border: none; cursor: pointer; font: inherit; font-weight: 800; font-size: 13.5px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: #fff;
  border-radius: 14px; padding: 11px 20px; transition: transform .15s, box-shadow .15s;
}
.kq-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(22, 48, 94, .3); }

.kq-ov {
  position: fixed; inset: 0; z-index: 1200; background: rgba(10, 18, 38, .55);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  padding: 14px; opacity: 0; transition: opacity .2s;
}
.kq-ov.show { opacity: 1; }
.kq-modal {
  width: min(760px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  background: #f4f7fc; border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 70px rgba(8, 14, 30, .4);
  transform: translateY(14px); transition: transform .22s;
}
.kq-ov.show .kq-modal { transform: none; }
.kq-head {
  display: flex; align-items: center; justify-content: space-between; padding: 15px 20px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: #fff;
}
.kq-head h3 { margin: 0; font-size: 16.5px; font-weight: 900; display: flex; align-items: center; gap: 9px; }
.kq-head h3 i { color: var(--orange-light); }
.kq-x {
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px;
}
.kq-x:hover { background: rgba(255, 255, 255, .26); }
.kq-tabs { display: flex; gap: 8px; padding: 12px 16px 0; background: #f4f7fc; }
.kq-tab {
  flex: 1; border: 1.5px solid rgba(22, 48, 94, .14); background: #fff; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 13px; color: #64748b;
  border-radius: 12px; padding: 10px 8px; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .18s;
}
.kq-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.kq-tab.active i { color: var(--orange-light); }
.kq-tab-n {
  background: rgba(244, 121, 31, .14); color: var(--orange); font-size: 11px;
  border-radius: 16px; padding: 1px 8px; font-weight: 800;
}
.kq-tab.active .kq-tab-n { background: rgba(255, 255, 255, .18); color: #fff; }
.kq-body { flex: 1; overflow-y: auto; padding: 14px 16px 20px; }
.kq-pane { display: none; flex-direction: column; gap: 12px; }
.kq-pane.active { display: flex; }
.kq-empty { text-align: center; padding: 46px 16px; color: #8a97ad; }
.kq-empty i { font-size: 42px; color: var(--orange); opacity: .5; }
.kq-empty p { margin: 12px 0 0; font-weight: 800; font-size: 13.5px; }

@media (max-width: 560px) {
  .kq-box { flex-wrap: wrap; }
  .kq-btn { width: 100%; }
  .kq-tabs { padding: 10px 10px 0; }
  .kq-body { padding: 12px 10px 16px; }
}

/* ============ SP-V23-B2: نتائج الطلاب — لوحة الأوائل + الأسئلة الأكثر خطأ ============ */
.rs-rank {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13.5px; color: var(--navy);
  background: rgba(22, 48, 94, .07);
}
.rs-rank.top {
  color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-light));
  box-shadow: 0 5px 14px rgba(244, 121, 31, .32);
}
.rs-hq { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.rs-hq:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22, 48, 94, .1); }
.rs-wrongpct {
  min-width: 52px; text-align: center; flex: none;
  font-weight: 900; font-size: 13.5px; border-radius: 11px; padding: 7px 6px;
  background: rgba(34, 197, 94, .12); color: #16a34a;
}
.rs-wrongpct.mid { background: rgba(245, 158, 11, .14); color: #d97706; }
.rs-wrongpct.bad { background: rgba(225, 29, 72, .12); color: #e11d48; }
.rs-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rs-opt {
  display: flex; align-items: center; gap: 9px;
  border: 1.5px solid rgba(22, 48, 94, .1); border-radius: 12px; padding: 8px 11px;
}
.rs-opt.ok { border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .06); }
.rs-opt.ok .fa-circle-check { color: #16a34a; }
.rs-opt-l {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 12px; background: rgba(22, 48, 94, .08); color: var(--navy);
}
.rs-opt.ok .rs-opt-l { background: #16a34a; color: #fff; }
.rs-opt-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: var(--navy); }
.rs-opt-bar {
  flex: none; width: 90px; height: 8px; border-radius: 8px; overflow: hidden;
  background: rgba(22, 48, 94, .08);
}
.rs-opt-bar i {
  display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light));
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.rs-opt.ok .rs-opt-bar i { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rs-opt-p { flex: none; font-size: 11.5px; font-weight: 800; color: #64748b; min-width: 56px; text-align: left; }
.rs-wstuds { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.rs-wstud {
  background: #fff; border: 1.5px solid rgba(59, 130, 246, .3); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; font-weight: 800; color: var(--navy);
}
.rs-wstud small { color: #e11d48; font-weight: 800; }
@media (max-width: 640px) {
  .rs-opt { flex-wrap: wrap; }
  .rs-opt-bar { width: 100%; order: 5; }
}

/* ============================================================
   SP-V23-B3: محرر صفحة البداية في لوحة الإشراف
   ============================================================ */
.hr-card { background: #fff; border: 1.5px solid #e9edf5; border-radius: 18px; padding: 18px 18px 16px; margin-bottom: 16px; }
.sp-dark .hr-card { background: #101b30; border-color: #223354; }
.hr-card h3 { font-size: .95rem; font-weight: 900; color: #16305e; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.sp-dark .hr-card h3 { color: #e8eefb; }
.hr-card h3 i { color: #f4791f; }
.hr-field { display: block; font-size: .78rem; font-weight: 800; color: #5b6a85; margin-bottom: 12px; }
.sp-dark .hr-field { color: #93a5c4; }
.hr-field .admin-input { margin-top: 6px; }
.hr-field textarea.admin-input { resize: vertical; min-height: 70px; line-height: 1.8; }
.hr-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 14px; }
.hr-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hr-stat { background: #f7f9fd; border: 1.5px solid #e9edf5; border-radius: 14px; padding: 12px 12px 4px; }
.sp-dark .hr-stat { background: #0c1526; border-color: #223354; }
.hr-toggle-row { margin-bottom: 12px; }
.hr-cardrows { display: flex; flex-direction: column; gap: 10px; }
.hr-cardrow { display: flex; align-items: center; gap: 12px; background: #f7f9fd; border: 1.5px solid #e9edf5; border-radius: 14px; padding: 10px 14px; }
.sp-dark .hr-cardrow { background: #0c1526; border-color: #223354; }
.hr-cardname { flex: 0 0 130px; font-size: .8rem; font-weight: 900; color: #16305e; }
.sp-dark .hr-cardname { color: #e8eefb; }
.hr-cardrow .hr-field { flex: 1; margin-bottom: 0; }
.hr-cardrow .hr-field .admin-input { margin-top: 0; }
.hr-tgl { flex: 0 0 auto; }
.hr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; position: sticky; bottom: 12px; z-index: 5; }
.hr-actions .admin-btn.gold { box-shadow: 0 8px 22px rgba(244, 121, 31, .3); }
@media (max-width: 640px) {
  .hr-grid2, .hr-grid3 { grid-template-columns: 1fr; }
  .hr-cardrow { flex-wrap: wrap; }
  .hr-cardname { flex-basis: 100%; }
}

/* ============================================================
   SP-V24-F1: حالة "لا توجد كورسات" على صفحة الهبوط
   ============================================================ */
.courses-empty { min-width: 320px; max-width: 480px; margin: 0 auto; background: #fff; border: 2px dashed #dfe4ef; border-radius: 24px; padding: 40px 26px; text-align: center; }
.courses-empty .ce-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: rgba(244, 121, 31, .1); color: #f4791f; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.courses-empty h3 { font-size: 1.05rem; font-weight: 900; color: #16305e; margin-bottom: 6px; }
.courses-empty p { font-size: .82rem; font-weight: 700; color: #9aa7bd; }

/* ============================================================
   SP-V24-F2 — محرر السناتر في لوحة التحكم + عداد العرض في /home
   ============================================================ */
.hr-center { background: #f8fafd; border: 1px solid #e3e9f4; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.hr-center-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hr-center-head b { font-size: .88rem; font-weight: 900; color: #16305e; display: flex; align-items: center; gap: 7px; }
.hr-center-head b i { color: #f4791f; }
.hr-center-del { width: 32px; height: 32px; border-radius: 10px; border: 1px solid #f3d1d1; background: #fff5f5; color: #d43c3c; cursor: pointer; font-size: .8rem; transition: all .18s; }
.hr-center-del:hover { background: #d43c3c; border-color: #d43c3c; color: #fff; }
.hr-center .hr-field { margin-bottom: 8px; }
#home-offer-section .offer-banner { max-width: 720px; margin: 0 auto; }
@media (max-width: 640px) {
  .hr-center { padding: 12px; border-radius: 14px; }
  .hr-center .hr-grid2 { grid-template-columns: 1fr; }
}

/* ============================================================
   SP-V24-B3: قسم API — مفاتيح Gemini + الموديلات + الذكاء المتعدد
   ============================================================ */
.ai-keys-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.ai-key-row {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #f8fafd, #eef3fa);
  border: 1px solid #dde6f2; border-radius: 14px;
  padding: 10px 14px; transition: box-shadow .2s, transform .2s;
}
.ai-key-row:hover { box-shadow: 0 6px 18px rgba(22, 48, 94, .08); transform: translateY(-1px); }
.ai-key-row.off { opacity: .55; filter: grayscale(.4); }
.ai-key-no {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: var(--navy, #16305e); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.ai-key-mask {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #16305e0d; border: 1px dashed #c6d3e6; border-radius: 8px;
  padding: 5px 10px; font-size: .82rem; color: #33507e; letter-spacing: .5px;
}
.ai-key-st { font-size: .78rem; font-weight: 700; color: #8a97ab; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ai-key-st.ok { color: #17934c; }
.ai-key-st.bad { color: #d33; }
.ai-key-acts { display: flex; gap: 6px; }
.ai-key-btn {
  border: 1px solid #d8e2f0; background: #fff; color: var(--navy, #16305e);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: all .18s;
}
.ai-key-btn:hover:not(:disabled) { background: var(--navy, #16305e); color: #fff; border-color: var(--navy, #16305e); }
.ai-key-btn:disabled { opacity: .35; cursor: default; }
.ai-key-btn.danger { color: #d33; border-color: #f3d0d0; }
.ai-key-btn.danger:hover { background: #d33; color: #fff; border-color: #d33; }
.ai-add-row { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.ai-add-row textarea { flex: 1; font-size: .82rem; resize: vertical; }
.ai-add-row .admin-btn { align-self: flex-end; white-space: nowrap; }
.ai-test-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ai-test-results { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.ai-test-item {
  display: flex; align-items: center; gap: 10px;
  border-radius: 10px; padding: 8px 12px; font-size: .84rem;
  border: 1px solid transparent;
}
.ai-test-item code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-test-item.ok { background: #ecf9f0; border-color: #cdecd8; color: #17603a; }
.ai-test-item.bad { background: #fdf0f0; border-color: #f3d4d4; color: #9c2c2c; }
.ai-test-item span { font-weight: 700; white-space: nowrap; }

/* الموديلات */
.ai-models-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ai-model-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid #e3eaf4; border-radius: 14px;
  padding: 8px 12px; transition: all .2s;
}
.ai-model-row.active {
  border-color: var(--orange, #f4791f);
  background: linear-gradient(135deg, #fff8f2, #fff);
  box-shadow: 0 4px 14px rgba(244, 121, 31, .12);
}
.ai-model-no {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px;
  background: #eef2f8; color: #5a6d8c;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem;
}
.ai-model-row.active .ai-model-no { background: var(--orange, #f4791f); color: #fff; }
.ai-model-pick {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; text-align: right;
  padding: 4px 2px; font-family: inherit; font-size: .9rem; color: var(--navy, #16305e);
  min-width: 0;
}
.ai-model-pick i { color: #b9c6da; font-size: .95rem; }
.ai-model-row.active .ai-model-pick i { color: var(--orange, #f4791f); }
.ai-model-pick b { font-weight: 800; }
.ai-model-tier {
  font-size: .68rem; font-weight: 800; padding: 2px 9px; border-radius: 20px;
  letter-spacing: .3px;
}
.ai-model-tier.flash { background: #e8f0fe; color: #1c4fb3; }
.ai-model-tier.lite { background: #f0ecfd; color: #6b46c1; }
.ai-model-act {
  font-size: .7rem; font-weight: 800; color: #fff;
  background: var(--orange, #f4791f); padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.ai-model-ord { display: flex; flex-direction: column; gap: 3px; }
.ai-model-ord .ai-key-btn { width: 28px; height: 22px; border-radius: 7px; font-size: .7rem; }

/* الذكاء المتعدد */
.ai-multi-toggle {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  background: linear-gradient(135deg, #f6f9ff, #fdf9f4);
  border: 1px solid #e2e9f4; border-radius: 14px; padding: 14px 16px;
  line-height: 1.7; font-size: .88rem; color: #33507e;
}
.ai-multi-toggle input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; accent-color: var(--orange, #f4791f); cursor: pointer; }

@media (max-width: 640px) {
  .ai-key-row { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .ai-key-mask { flex-basis: 100%; order: 3; font-size: .74rem; }
  .ai-key-acts { margin-inline-start: auto; }
  .ai-add-row { flex-direction: column; }
  .ai-add-row .admin-btn { align-self: stretch; }
  .ai-model-pick { flex-wrap: wrap; gap: 6px; font-size: .82rem; }
  .ai-model-act { font-size: .62rem; }
  .ai-test-item span { font-size: .72rem; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
}

/* ============================================================
   SP-V24-B1: صناعة الأسئلة — تبويبات + صناديق رفع + مواصفات
   ============================================================ */
.qm-tabs { display: flex; gap: 8px; margin-bottom: 18px; background: #eef2f8; border-radius: 14px; padding: 5px; width: fit-content; }
.qm-tab {
  border: 0; background: transparent; color: #5a6d8c; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: .9rem;
  padding: 9px 20px; border-radius: 10px; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.qm-tab.active { background: var(--navy, #16305e); color: #fff; box-shadow: 0 4px 12px rgba(22, 48, 94, .22); }
.qm-upbox {
  border: 2px dashed #c3d0e4; border-radius: 16px; padding: 26px 18px;
  text-align: center; cursor: pointer; transition: all .2s;
  background: linear-gradient(135deg, #fbfcfe, #f4f7fc);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.qm-upbox:hover, .qm-upbox.drag { border-color: var(--orange, #f4791f); background: #fff8f2; }
.qm-upbox.has-files { border-style: solid; border-color: #9fd3ae; background: #f4fbf6; }
.qm-upbox-ic { font-size: 2rem; color: var(--orange, #f4791f); margin-bottom: 4px; }
.qm-upbox b { color: var(--navy, #16305e); font-size: .95rem; }
.qm-upbox > span { color: #8a97ab; font-size: .78rem; }
.qm-files { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 8px; }
.qm-file {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #dbe5f1; border-radius: 20px;
  padding: 4px 12px; font-size: .76rem; color: #33507e; font-weight: 700;
  max-width: 100%; overflow: hidden;
}
.qm-file small { color: #97a5ba; font-weight: 600; }
.qm-file button { border: 0; background: none; color: #d33; cursor: pointer; font-size: .8rem; padding: 2px; }
.qm-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.qm-spec { display: flex; flex-direction: column; gap: 7px; }
.qm-spec > span { font-size: .82rem; font-weight: 800; color: var(--navy, #16305e); display: inline-flex; align-items: center; gap: 7px; }
.qm-spec > span i { color: var(--orange, #f4791f); }
.qm-modelmatch { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.qm-modelmatch .qm-spec { flex: 0 0 190px; }
.qm-cta { text-align: center; margin: 22px 0 8px; }
.qm-cta .admin-btn.lg { font-size: 1rem; padding: 13px 34px; border-radius: 14px; }
.qm-cta .admin-btn:disabled { opacity: .55; cursor: not-allowed; }
.qm-soon { margin-top: 10px; font-size: .78rem; color: #97a5ba; font-weight: 700; }
.qm-soon i { color: var(--orange, #f4791f); }

@media (max-width: 640px) {
  .qm-tabs { width: 100%; }
  .qm-tab { flex: 1; justify-content: center; padding: 9px 8px; font-size: .82rem; }
  .qm-upbox { padding: 20px 12px; }
  .qm-specs { grid-template-columns: 1fr; }
  .qm-modelmatch { flex-direction: column; align-items: stretch; }
  .qm-modelmatch .qm-spec { flex: 1 1 auto; }
  .qm-cta .admin-btn.lg { width: 100%; }
}

/* ============ SP-V25-A: profile quick tools + temp password ============ */
.prof-quick-tools{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.prof-quick-tools .admin-btn{flex:1 1 auto;min-width:150px;justify-content:center}
.admin-btn.warn{background:linear-gradient(135deg,#7a3b12,#a85618);color:#ffe3c2;border:1px solid rgba(255,180,90,.35)}
.admin-btn.warn:hover{filter:brightness(1.15);transform:translateY(-1px)}
.temp-pw-box{background:#0d1424;border:1px dashed rgba(240,200,90,.55);border-radius:12px;padding:12px 16px;font-family:'Courier New',monospace;font-size:1.25rem;font-weight:800;letter-spacing:2px;color:#ffd769;text-align:center;user-select:all;margin-top:6px;box-shadow:inset 0 0 18px rgba(240,200,90,.08)}
/* ============ /SP-V25-A ============ */

/* ============ SP-V25-B: support matched-account cards ============ */
.support-acc{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,rgba(56,120,255,.08),rgba(56,200,255,.04));border:1px solid rgba(90,150,255,.22);border-radius:12px;padding:8px 12px;margin-top:8px;flex-wrap:wrap}
.support-acc.none{color:#8b93a7;font-size:.8rem;border-style:dashed;background:rgba(255,255,255,.02)}
.support-acc-info{display:flex;align-items:center;gap:10px;flex:1;min-width:200px}
.support-acc-info>i{color:#4ade80;font-size:1.05rem}
.support-acc-txt{display:flex;flex-direction:column;gap:2px}
.support-acc-txt b{font-size:.85rem}
.support-acc-txt span{font-size:.75rem;color:#aab3c8}
.support-acc-flags{display:flex;gap:8px;font-size:1rem;margin-inline-start:auto}
.support-acc-flags .tg-on{color:#38bdf8}
.support-acc-flags .tg-off,.support-acc-flags .dev-off{opacity:.28}
.support-acc-flags .dev-on{color:#4ade80}
.support-acc-tools{display:flex;gap:6px}
.ac-mini.warn2{background:rgba(250,150,60,.14);color:#fbbf77;border-color:rgba(250,160,70,.35)}
.ac-mini.warn2:hover{background:rgba(250,150,60,.28)}
.ac-mini.gold2{background:rgba(240,200,90,.12);color:#ffd769;border-color:rgba(240,200,90,.35)}
.ac-mini.gold2:hover{background:rgba(240,200,90,.26)}
@media(max-width:640px){.support-acc{flex-direction:column;align-items:stretch}.support-acc-tools{justify-content:flex-end}}
/* ============ /SP-V25-B ============ */

/* ============ SP-V25-C: qmaker AI wiring — chatbox + results ============ */
.qm-chatbox{width:100%;resize:vertical;min-height:64px;font-family:inherit;line-height:1.7}
.qr-panel{border:1px solid rgba(240,200,90,.3);box-shadow:0 6px 24px rgba(20,40,90,.08)}
.qr-model-title{margin:18px 0 10px;color:var(--navy,#16305e);font-size:1rem;display:flex;align-items:center;gap:8px}
.qr-model-title i{color:var(--orange,#f4791f)}
.qr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.qr-card{background:#fff;border:1px solid #e6ebf4;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px;transition:box-shadow .2s}
.qr-card:hover{box-shadow:0 4px 18px rgba(20,40,90,.1)}
.qr-head{display:flex;justify-content:space-between;align-items:center}
.qr-q{font-weight:700;color:var(--navy,#16305e);font-size:.9rem;line-height:1.8;margin:0}
.qr-opts{margin:0;padding-inline-start:20px;display:flex;flex-direction:column;gap:4px;font-size:.84rem}
.qr-opts li{padding:4px 8px;border-radius:8px;background:#f7f9fd}
.qr-opts li.ok{background:#e9f9ef;color:#15803d;font-weight:700}
.qr-opts li.ok i{margin-inline-start:6px}
.qr-essay{background:#fff9ec;border:1px dashed rgba(240,200,90,.5);border-radius:10px;padding:8px 12px;font-size:.83rem;line-height:1.8}
.qr-exp{color:#8a97ab;font-size:.76rem;line-height:1.7;border-top:1px dashed #e6ebf4;padding-top:6px}
.qr-exp i{color:#fbbf24;margin-inline-start:4px}
.qr-save{text-align:center;margin-top:18px}
.qr-done{text-align:center;padding:28px;color:#15803d;font-weight:800;font-size:1.05rem}
.qr-done i{font-size:1.6rem;display:block;margin-bottom:8px}
@media(max-width:640px){.qr-grid{grid-template-columns:1fr}}
/* ============ /SP-V25-C ============ */
/* ============ SP-V25-D: v25 V6 «ارسملك» AI drawing panel ============ */
.cs-tool.ai{background:linear-gradient(135deg,#7c3aed,#a855f7);color:#fff;border-color:#7c3aed}
.cs-tool.ai:hover{background:linear-gradient(135deg,#6d28d9,#9333ea);color:#fff}
.cs-tool.ai i,.cs-tool.ai span{color:#fff}
.cs-ai-panel{padding:14px 16px;background:linear-gradient(135deg,#faf5ff,#f3e8ff);border-bottom:1.5px solid #e9d5ff;display:flex;flex-direction:column;gap:10px}
.sp-dark .cs-ai-panel{background:linear-gradient(135deg,#1a1030,#241540);border-color:#4c2a85}
.cs-ai-head{font-weight:800;color:#6d28d9;font-size:.95rem;display:flex;align-items:center;gap:8px}
.sp-dark .cs-ai-head{color:#c4b5fd}
.cs-ai-panel textarea{width:100%;border:1.5px solid #d8b4fe;border-radius:12px;padding:10px 12px;font-family:inherit;font-size:.92rem;resize:vertical;background:#fff;color:#1e2a4a;box-sizing:border-box}
.cs-ai-panel textarea:focus{outline:none;border-color:#a855f7;box-shadow:0 0 0 3px rgba(168,85,247,.15)}
.sp-dark .cs-ai-panel textarea{background:#0e1830;color:#e2e8f0;border-color:#4c2a85}
.cs-ai-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cs-ai-file{font-size:.85rem;color:#7c3aed;font-weight:700}
.sp-dark .cs-ai-file{color:#c4b5fd}
.cs-ai-status{font-size:.88rem;color:#6d28d9;font-weight:700;animation:spPulse 1.2s ease-in-out infinite}
.sp-dark .cs-ai-status{color:#c4b5fd}
@keyframes spPulse{0%,100%{opacity:1}50%{opacity:.45}}
@media(max-width:640px){.cs-ai-row{flex-direction:column;align-items:stretch}.cs-ai-row .admin-btn{width:100%}}
/* ============ /SP-V25-D ============ */
/* ============ SP-V25-E: v25 V9 النشاط والأمان — تبويبات وفئات ============ */
.sec-cat-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 12px}
.sec-cat-tab{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;border:1.5px solid #e2e8f0;background:#fff;color:#475569;font-family:inherit;font-size:.85rem;font-weight:800;cursor:pointer;transition:all .18s}
.sec-cat-tab:hover{border-color:#818cf8;color:#4338ca;transform:translateY(-1px)}
.sec-cat-tab.active{background:linear-gradient(135deg,#4f46e5,#7c3aed);border-color:transparent;color:#fff;box-shadow:0 4px 14px rgba(79,70,229,.35)}
.sec-cat-n{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:rgba(100,116,139,.14);font-size:.72rem;font-weight:900}
.sec-cat-tab.active .sec-cat-n{background:rgba(255,255,255,.25);color:#fff}
.sec-cat-chip{flex-shrink:0;padding:3px 10px;border-radius:999px;font-size:.7rem;font-weight:900;background:#f1f5f9;color:#64748b}
.sec-ic-security{color:#dc2626}.sec-cat-chip.sec-ic-security{background:#fee2e2;color:#b91c1c}
.sec-ic-access{color:#0891b2}.sec-cat-chip.sec-ic-access{background:#cffafe;color:#0e7490}
.sec-ic-edits{color:#d97706}.sec-cat-chip.sec-ic-edits{background:#fef3c7;color:#b45309}
.sec-ic-exams{color:#7c3aed}.sec-cat-chip.sec-ic-exams{background:#ede9fe;color:#6d28d9}
.sec-ic-subs{color:#059669}.sec-cat-chip.sec-ic-subs{background:#d1fae5;color:#047857}
.sec-ic-content{color:#db2777}.sec-cat-chip.sec-ic-content{background:#fce7f3;color:#be185d}
.sec-ic-other{color:#64748b}
.sp-dark .sec-cat-tab{background:#1e293b;border-color:#334155;color:#94a3b8}
.sp-dark .sec-cat-tab:hover{border-color:#818cf8;color:#c7d2fe}
.sp-dark .sec-cat-tab.active{color:#fff}
.sp-dark .sec-cat-chip{background:#334155;color:#cbd5e1}
.sp-dark .sec-cat-chip.sec-ic-security{background:#450a0a;color:#fca5a5}
.sp-dark .sec-cat-chip.sec-ic-access{background:#083344;color:#67e8f9}
.sp-dark .sec-cat-chip.sec-ic-edits{background:#451a03;color:#fcd34d}
.sp-dark .sec-cat-chip.sec-ic-exams{background:#2e1065;color:#c4b5fd}
.sp-dark .sec-cat-chip.sec-ic-subs{background:#022c22;color:#6ee7b7}
.sp-dark .sec-cat-chip.sec-ic-content{background:#500724;color:#f9a8d4}
@media(max-width:640px){.sec-cat-tabs{gap:6px}.sec-cat-tab{padding:6px 10px;font-size:.78rem}.sec-cat-chip{display:none}}
/* ============ /SP-V25-E ============ */
/* ============ SP-V25-F: v25 V8 التصحيح اليدوي للمقالي ============ */
.es-block.grade{border-right:4px solid #059669;background:linear-gradient(135deg,#ecfdf5,#f0fdf4)}
.sp-dark .es-block.grade{background:linear-gradient(135deg,#022c22,#052e16)}
.es-grade-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.admin-chip.green{background:#d1fae5;color:#047857;font-weight:900}
.sp-dark .admin-chip.green{background:#022c22;color:#6ee7b7}
/* ============ /SP-V25-F ============ */

/* ==================== SP-V26-A: قسم API — تعطيل الموديلات يدويًا (أحمر) + تنبيه الحصة ==================== */
.ai-model-row.disabled-model{background:linear-gradient(135deg,rgba(239,68,68,.08),rgba(127,29,29,.12));border-color:rgba(239,68,68,.45)}
.ai-model-row.disabled-model .ai-model-pick b{color:#fca5a5;text-decoration:line-through;text-decoration-color:rgba(239,68,68,.6)}
.ai-model-off{display:inline-flex;align-items:center;gap:5px;background:rgba(239,68,68,.18);color:#f87171;border:1px solid rgba(239,68,68,.4);border-radius:999px;padding:2px 10px;font-size:.72rem;font-weight:800}
.ai-key-btn.mdis-on{background:rgba(239,68,68,.2);color:#f87171;border-color:rgba(239,68,68,.5)}
.ai-key-btn.mdis-on:hover{background:rgba(239,68,68,.32)}
.ai-quota-note{border-color:rgba(245,158,11,.35);background:linear-gradient(135deg,rgba(245,158,11,.05),rgba(120,53,15,.08))}
.ai-quota-note h3{color:#fbbf24}
/* ==================== /SP-V26-A ==================== */

/* ==================== SP-V26-C: ارسملك v26 — صوت + توضيح ==================== */
#csAiMic.rec-on{background:linear-gradient(135deg,#dc2626,#991b1b)!important;color:#fff!important;animation:spRecPulse 1.2s ease-in-out infinite}
@keyframes spRecPulse{0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.5)}50%{box-shadow:0 0 0 8px rgba(220,38,38,0)}}
.cs-ai-clarify{background:linear-gradient(135deg,rgba(244,121,31,.1),rgba(30,42,74,.35));border:1px solid rgba(244,121,31,.4);border-radius:12px;padding:10px 12px;margin:8px 0;display:flex;flex-direction:column;gap:8px}
.cs-clar-q{color:#fbbf24;font-weight:800;font-size:.92rem;display:flex;align-items:center;gap:8px}
.cs-clar-input{background:rgba(10,16,32,.6);border:1px solid rgba(148,163,184,.3);border-radius:9px;padding:9px 12px;color:#e2e8f0;font-family:inherit;font-size:.9rem;outline:none}
.cs-clar-input:focus{border-color:#f4791f}
/* ==================== /SP-V26-C ==================== */
/* ==================== SP-V26-D: تقارير الذكاء — المحلل/الشرح/اقتراح الدرجة ==================== */
.ai-report-panel{border:1px solid rgba(244,121,31,.35);background:linear-gradient(160deg,rgba(244,121,31,.06),rgba(15,23,42,.4))}
.ai-report-body{margin-top:6px}
.ai-rep-h{color:#f4791f;font-size:1.02rem;font-weight:900;margin:14px 0 6px;display:flex;align-items:center;gap:8px}
.ai-rep-h:first-child{margin-top:0}
.ai-rep-p{color:#e2e8f0;font-size:.93rem;line-height:1.9;margin:4px 0}
.ai-rep-p.bullet{padding-right:18px;position:relative}
.ai-rep-p.bullet::before{content:'•';color:#f4791f;position:absolute;right:4px;font-weight:900}
.ai-rep-steps{margin:6px 0;padding-right:22px;display:flex;flex-direction:column;gap:6px;counter-reset:aistep}
.ai-rep-steps li{color:#e2e8f0;font-size:.93rem;line-height:1.85;list-style:none;position:relative;padding-right:30px;counter-increment:aistep}
.ai-rep-steps li::before{content:counter(aistep);position:absolute;right:0;top:3px;width:22px;height:22px;border-radius:50%;background:linear-gradient(135deg,#f4791f,#c2410c);color:#fff;font-size:.72rem;font-weight:900;display:flex;align-items:center;justify-content:center}
.ai-suggest-box{background:linear-gradient(135deg,rgba(244,121,31,.12),rgba(30,42,74,.4));border:1px solid rgba(244,121,31,.4);border-radius:12px;padding:12px 14px;margin-top:10px}
.ai-suggest-box b{color:#fbbf24;font-size:1rem}
.ai-suggest-box p{color:#e2e8f0;font-size:.9rem;line-height:1.8;margin:6px 0 0}
.qr-drawbtn{margin-top:10px;width:100%}
/* ==================== /SP-V26-D ==================== */

/* ==================== SP-V26-F: مساحة الكيبورد على الموبايل ==================== */
:root { --kb-space: 0px; }
html.kb-open body.admin-body { padding-bottom: var(--kb-space); }
/* المودالات: تتحرك لأعلى وتتقلص عشان الكيبورد */
html.kb-open .spm-overlay,
html.kb-open .es-detail-ov,
html.kb-open .kq-ov,
html.kb-open .exm-modal-ov,
html.kb-open .sub-modal-overlay { align-items: flex-start; padding-top: 10px; padding-bottom: calc(var(--kb-space) + 10px); }
html.kb-open .spm-box { max-height: calc(100dvh - var(--kb-space) - 24px); }
html.kb-open .es-detail-box,
html.kb-open .kq-modal { max-height: calc(100dvh - var(--kb-space) - 24px); }
/* استوديو الرسم: الورقة تتقلص بدل ما الكيبورد يغطي الإدخال */
html.kb-open .cs-studio { height: calc(100dvh - var(--kb-space)); }
html.kb-open .cs-overlay { align-items: flex-start; }
/* الدرج الجانبي مايتأثرش */
html.kb-open .admin-drawer { height: calc(100dvh - var(--kb-space)); }
/* ==================== /SP-V26-F ==================== */

/* ==================== SP-V26-G: إعادة تجسيد صفحات الإشراف للموبايل ==================== */
@media (max-width: 640px) {
  /* ---- الشريط العلوي ---- */
  .admin-topbar nav { padding: 8px 10px; }
  .admin-logo img { width: 34px; height: 34px; }
  .admin-badge { display: none; }
  .admin-exit-btn { padding: 8px 10px; }

  /* ---- الهيكل العام ---- */
  .admin-main { padding: 12px 10px calc(90px + var(--kb-space)); }
  .admin-sec-head { flex-direction: column; align-items: stretch; gap: 9px; margin-bottom: 13px; }
  .admin-sec-head h2 { font-size: 1.02rem; }
  .admin-head-btns { width: 100%; }
  .admin-head-btns .admin-btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }

  /* ---- الأزرار: مساحة لمس مريحة 42px+ ---- */
  .admin-btn { min-height: 42px; padding: 10px 13px; font-size: .8rem; }
  .admin-btn.sm { min-height: 36px; }
  .admin-mini-btn { min-width: 36px; min-height: 36px; }
  .admin-back-btn { min-height: 40px; }

  /* ---- الحقول: خط 16px يمنع زوم iOS التلقائي ---- */
  .admin-input, .admin-textarea, .spm-input, .spm-box select, .spm-box textarea { font-size: 16px !important; }
  .admin-form-row { flex-direction: column; align-items: stretch; }
  .admin-form-row > * { width: 100%; }
  .admin-form-row .admin-btn { justify-content: center; }

  /* ---- اللوحات والكروت ---- */
  .admin-panel { padding: 13px 11px; border-radius: 15px; }
  .admin-card { padding: 12px 11px; }
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .admin-stat-card { padding: 12px 8px; border-radius: 14px; }
  .admin-stat-card b { font-size: 1.12rem; }
  .admin-stat-card span { font-size: .66rem; }
  .admin-chart-card { padding: 12px 10px; }

  /* ---- الصفوف (طلاب / كورسات / بنوك ...) ---- */
  .admin-rows { gap: 8px; }
  .admin-row { padding: 11px 11px; gap: 9px; border-radius: 14px; }
  .admin-row-main { min-width: 0; flex: 1 1 140px; }
  .admin-row-main b { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .admin-row .admin-chip { font-size: .64rem; }
  .admin-row > .admin-btn, .admin-row > .admin-mini-btn { margin-right: auto; }

  /* ---- المودالات: bottom-sheet ستايل ---- */
  .spm-overlay { align-items: flex-end; padding: 0; }
  .spm-box { max-width: 100%; border-radius: 22px 22px 0 0; padding: 18px 15px calc(16px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 42px); }
  .spm-box::before { content: ''; display: block; width: 44px; height: 4.5px; border-radius: 3px; background: #d4dae8; margin: 0 auto 13px; }
  .sp-dark .spm-box::before { background: #2c3d61; }
  .spm-dt-grid { grid-template-columns: 1fr 1fr; }
  .es-detail-ov, .kq-ov { padding: 0; align-items: flex-end; }
  .es-detail-box, .kq-modal { width: 100%; max-height: calc(100dvh - 40px); border-radius: 22px 22px 0 0; }

  /* ---- طلبات الاشتراك ---- */
  #sec-subreq .admin-row { flex-direction: column; align-items: stretch; }
  #sec-subreq .admin-row .admin-btn { width: 100%; justify-content: center; }

  /* ---- نتائج الطلاب + التقارير الذكية ---- */
  .ai-report-panel { padding: 13px 11px; }
  .ai-rep-p { font-size: .82rem; }
  .ai-rep-steps li { font-size: .82rem; }
  .ai-suggest-box { padding: 11px 10px; }

  /* ---- المقالية ---- */
  .es-block { padding: 11px 10px; }
  .es-detail-head { padding: 13px 14px; }
  .es-detail-body { padding: 13px 12px; }

  /* ---- صناعة الأسئلة ---- */
  .qm-tab { padding: 9px 12px; font-size: .76rem; }
  .qm-chatbox { max-height: 46vh; }
  .qm-modelmatch { flex-direction: column; }
  .qm-modelmatch .qm-spec { flex: 1 1 auto; }
  .qr-drawbtn { width: 100%; justify-content: center; }

  /* ---- قسم API ---- */
  .ai-key-btn { min-height: 36px; }
  .ai-model-row { flex-wrap: wrap; }

  /* ---- الدعم والأمان والإشعارات ---- */
  .support-acc { border-radius: 14px; }
  .admin-info-grid { grid-template-columns: 1fr; }


  /* ---- استوديو الرسم: أدوات لمس أكبر ---- */
  .cs-tool { min-width: 54px; min-height: 46px; }
  .cs-ai-panel textarea { font-size: 16px !important; }
  .cs-clar-input input { font-size: 16px !important; }

  /* ---- التوست فوق الكيبورد ---- */
  .admin-toast { bottom: calc(18px + var(--kb-space)); max-width: 94vw; font-size: .78rem; }
}

/* شاشات صغيرة جدًا */
@media (max-width: 380px) {
  .admin-stats-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .admin-stat-card b { font-size: 1rem; }
  .admin-sec-head h2 { font-size: .94rem; }
  .admin-btn { font-size: .74rem; padding: 9px 10px; }
  .spm-dt-grid { grid-template-columns: 1fr; }
  .cs-phys-menu { grid-template-columns: repeat(2, 1fr); }
}

/* لاندسكيب موبايل: قلل الارتفاعات */
@media (max-height: 480px) and (max-width: 940px) {
  .spm-overlay { align-items: center; padding: 8px; }
  .spm-box { border-radius: 18px; max-height: calc(100dvh - 16px); }
  .spm-box::before { display: none; }
}
/* ==================== /SP-V26-G ==================== */

/* ==================== SP-V27-A: أنماط v27 — تبويبات قائمة الفيزياء + معاينات صور الذكاء + وضع التعديل + الرسم الجماعي ==================== */
/* تبويبات فئات المكوّنات الفيزيائية */
.cs-phys-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:10px 14px 0;background:#fbfcff;border-bottom:0}
.sp-dark .cs-phys-tabs{background:#0e1830}
.cs-phys-tab{font-family:inherit;font-size:.82rem;font-weight:800;padding:7px 13px;border-radius:99px;border:1.5px solid #e2e8f4;background:#fff;color:#475569;cursor:pointer;transition:.16s}
.cs-phys-tab:hover{border-color:#c7d5f0;transform:translateY(-1px)}
.cs-phys-tab.active{background:linear-gradient(135deg,#1d4ed8,#3b82f6);border-color:#1d4ed8;color:#fff;box-shadow:0 4px 12px rgba(29,78,216,.28)}
.sp-dark .cs-phys-tab{background:#16233f;border-color:#26375a;color:#94a3b8}
.sp-dark .cs-phys-tab.active{background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff}
.cs-phys-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:8px;padding:10px 14px 12px}
/* معاينات الصور المرفوعة للذكاء + زر × */
.cs-ai-thumbs{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0}
.cs-ai-thumb{position:relative;display:inline-block;border-radius:10px;overflow:visible}
.cs-ai-thumb img{width:64px;height:64px;object-fit:cover;border-radius:10px;border:2px solid #e2e8f4;display:block}
.sp-dark .cs-ai-thumb img{border-color:#26375a}
.cs-ai-thumb-x{position:absolute;top:-7px;inset-inline-start:-7px;width:20px;height:20px;border-radius:50%;border:none;background:#ef4444;color:#fff;font-weight:900;font-size:.8rem;line-height:1;cursor:pointer;box-shadow:0 2px 6px rgba(239,68,68,.4);transition:.15s}
.cs-ai-thumb-x:hover{transform:scale(1.15)}
.cs-ai-thumb-hint{font-size:.75rem;color:#94a3b8;font-weight:700}
/* خيار الأبيض/الأسود الحاد + وضع التعديل في المكان */
.cs-ai-bw{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;font-weight:800;color:#475569;cursor:pointer;user-select:none}
.sp-dark .cs-ai-bw{color:#94a3b8}
.cs-ai-editmode{display:flex;align-items:center;gap:8px;font-size:.82rem;font-weight:800;color:#92400e;background:#fef3c7;border:1.5px dashed #f59e0b;border-radius:12px;padding:8px 12px;margin:6px 0;cursor:pointer;user-select:none}
.cs-ai-editmode[hidden]{display:none}
.sp-dark .cs-ai-editmode{background:#3b2f10;color:#fcd34d;border-color:#b45309}
/* v27-H: شريط الرسم الجماعي + معاينة رسمة السؤال المتولدة */
.qr-drawall-bar{display:flex;flex-direction:column;gap:6px;align-items:flex-start;background:#fffbeb;border:1.5px dashed #f59e0b;border-radius:14px;padding:12px 14px;margin:10px 0}
.sp-dark .qr-drawall-bar{background:#2d2408;border-color:#b45309}
.qr-imgprev{margin:8px 0;text-align:center}
.qr-imgprev canvas{max-width:100%;border:1.5px solid #e2e8f4;border-radius:12px;background:#fff}
.sp-dark .qr-imgprev canvas{border-color:#26375a}
/* ==================== /SP-V27-A ==================== */

/* ==================== SP-V28-A: أنماط v28 — قائمة عناصر ريسبونسيف محسّنة (موبايل + كمبيوتر) ==================== */
/* v28-E: القائمة تتمدد بذكاء — سكرول ناعم + ارتفاع مناسب لكل شاشة */
.cs-phys-menu { max-height: min(300px, 34dvh); overscroll-behavior: contain; scrollbar-width: thin; }
.cs-phys-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.cs-phys-item { min-height: 74px; }
.cs-phys-item span { font-size: .64rem; line-height: 1.25; word-break: break-word; }
/* كمبيوتر واسع: أعمدة أكتر وقائمة أطول */
@media (min-width: 1100px) {
  .cs-phys-menu { max-height: min(340px, 40dvh); }
  .cs-phys-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
/* تابلت */
@media (max-width: 940px) {
  .cs-phys-menu { max-height: min(240px, 30dvh); }
  .cs-phys-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 10px 10px; }
  .cs-phys-tabs { padding: 8px 10px 0; gap: 4px; }
  .cs-phys-tab { font-size: .72rem; padding: 6px 10px; }
}
/* موبايل: 3 أعمدة + عناصر مضغوطة تلمس بسهولة */
@media (max-width: 640px) {
  .cs-phys-menu { max-height: min(210px, 28dvh); }
  .cs-phys-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 6px 8px 8px; }
  .cs-phys-item { min-height: 64px; padding: 4px 2px; }
  .cs-phys-item canvas { width: 72px; height: 38px; }
  .cs-phys-item span { font-size: .56rem; }
  .cs-phys-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .cs-phys-tabs::-webkit-scrollbar { display: none; }
  .cs-phys-tab { flex: 0 0 auto; font-size: .68rem; padding: 6px 9px; }
}
/* موبايل صغير جدًا */
@media (max-width: 380px) {
  .cs-phys-grid { grid-template-columns: repeat(3, 1fr); }
  .cs-phys-item { min-height: 58px; }
}
/* لاندسكيب موبايل: قائمة قصيرة عشان الورقة تبان */
@media (max-height: 480px) and (max-width: 940px) {
  .cs-phys-menu { max-height: 32dvh; }
}
/* ==================== /SP-V28-A ==================== */

/* v28-F: صندوق نتيجة التحقق من الرسمة */
.cs-ai-verify-out{margin:8px 0;padding:10px 14px;border-radius:12px;background:#fff;border:1.5px solid #e2e8f4;font-size:.86rem}
.cs-ai-verify-out[hidden]{display:none}
.sp-dark .cs-ai-verify-out{background:#16233f;border-color:#26375a}
.cs-verify-ok{color:#16a34a;font-weight:800}
.cs-verify-bad{color:#dc2626;font-weight:800;margin-bottom:6px}
.cs-verify-list{margin:0 18px 8px;padding:0;line-height:1.7}
.cs-verify-list li{margin-bottom:3px}

/* ==== SP-V29-A → v31-5: صورة غلاف الكورس (أكبر + بدون ضباب + بدون نص/مستر فوقها) ==== */
.course-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}
/* v31-5: لو في صورة مرفوعة — الكارت ياخد نسبة أكبر وتظهر الصورة كاملة أكبر */
.course-cover:has(.course-cover-img) {
  height: auto;
  aspect-ratio: 16 / 8.2;
  min-height: 176px;
}
/* v31-5: إخفاء اسم الكورس وصورة المستر فوق الصورة المرفوعة + إزالة الضباب الأسود نهائياً */
.course-cover:has(.course-cover-img) .course-cover-text,
.course-cover:has(.course-cover-img) .course-teacher {
  display: none;
}

/* ==== SP-V29-B: وميض تشغيل/إيقاف في منتصف المشغل (v29-2) ==== */
.sp-ctr-flash {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  z-index: 7;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(8,14,30,.55);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  pointer-events: none;
  opacity: 0;
}
.sp-ctr-flash.show { animation: spCtrPop .62s ease forwards; }
@keyframes spCtrPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

/* ==== SP-V29-C: إعادة تصميم قائمة أدوات الفيزياء (v29-6) — واسعة ومريحة للإصبع ==== */
.cs-phys-menu { max-height: min(52vh, 460px); grid-template-columns: 1fr; gap: 0; padding: 0; }
.cs-phys-top { position: sticky; top: 0; z-index: 3; background: #fbfcff; padding: 12px 16px 8px; border-bottom: 1px solid #edf1fa; }
.sp-dark .cs-phys-top { background: #0e1830; border-color: #1d2c4d; }
.cs-phys-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #dfe6f4; border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.cs-phys-search i { color: #94a3b8; font-size: .95rem; }
.cs-phys-search input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: 1rem; font-weight: 800; color: #1e293b; min-width: 0; }
.sp-dark .cs-phys-search { background: #16233f; border-color: #26375a; }
.sp-dark .cs-phys-search input { color: #e2e8f0; }
.cs-phys-tabs { padding: 0; }
.cs-phys-tab { font-size: .92rem; padding: 10px 18px; min-height: 44px; }
.cs-phys-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px 18px; }
.cs-phys-item { gap: 8px; padding: 13px 10px 12px; border-radius: 16px; min-height: 118px; }
.cs-phys-item canvas { width: 120px; height: 62px; border-radius: 9px; }
.cs-phys-item span { font-size: .78rem; }
.cs-phys-empty { grid-column: 1 / -1; text-align: center; padding: 26px 10px; font-weight: 900; color: #94a3b8; }
@media (max-width: 900px) {
  .cs-phys-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
}
@media (max-width: 640px) {
  .cs-phys-menu { max-height: 58vh; }
  .cs-phys-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
  .cs-phys-item { min-height: 112px; }
  .cs-phys-item canvas { width: 108px; height: 56px; }
  .cs-phys-item span { font-size: .74rem; }
  .cs-phys-tab { font-size: .84rem; padding: 9px 14px; }
}

/* ==== SP-V29-D: أقسام النماذج المتعددة في نتائج التوليد (v29-4) ==== */
.qr-model-sec { border: 2px solid #dbe4f6; border-radius: 18px; padding: 14px 14px 10px; margin: 16px 0; background: #fbfcff; }
.sp-dark .qr-model-sec { border-color: #26375a; background: #0e1830; }
.qr-model-sec .qr-model-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.05rem; }
.qr-model-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; font-weight: 900; font-size: 1rem; box-shadow: 0 4px 10px rgba(29,78,216,.3); flex: none; }
.qr-model-sec .qr-model-title small { color: #64748b; font-weight: 800; }

/* ============ SP-V29-E: ملف أهم الأسئلة — حذف + ابدأ امتحان ============ */
.kq-ov .exm-rev { position: relative; transition: opacity .18s, transform .18s; }
.kq-del {
  position: absolute; top: 10px; left: 10px; width: 32px; height: 32px;
  border: 1.5px solid #fecaca; background: #fff5f5; color: #dc2626;
  border-radius: 10px; font-size: 13px; cursor: pointer; display: grid; place-items: center;
  transition: all .15s; z-index: 2;
}
.kq-del:hover { background: #dc2626; color: #fff; transform: scale(1.06); }
.kq-del:disabled { opacity: .5; pointer-events: none; }
.kq-exam-btn {
  margin-right: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #16a34a, #059669); color: #fff;
  font-weight: 900; font-size: 13px; box-shadow: 0 4px 12px rgba(22,163,74,.3);
  transition: transform .15s, box-shadow .15s;
}
.kq-exam-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.4); }
.kq-exam-modal .kq-exam-q { font-weight: 900; font-size: 16px; color: #0f2447; line-height: 1.8; margin-bottom: 14px; }
.kq-exam-opts { display: grid; gap: 10px; }
.kq-exam-opt {
  display: flex; align-items: center; gap: 10px; text-align: right;
  padding: 12px 14px; border: 2px solid #e5e9f2; border-radius: 14px;
  background: #fff; cursor: pointer; font-weight: 800; font-size: 14px; color: #1e293b;
  transition: all .15s;
}
.kq-exam-opt span {
  width: 28px; height: 28px; border-radius: 9px; background: #eef2f9; color: #475569;
  display: grid; place-items: center; font-weight: 900; flex-shrink: 0;
}
.kq-exam-opt:hover:not(:disabled) { border-color: #93b4f4; background: #f6f9ff; }
.kq-exam-opt.right { border-color: #16a34a; background: #f0fdf4; }
.kq-exam-opt.right span { background: #16a34a; color: #fff; }
.kq-exam-opt.wrong { border-color: #dc2626; background: #fef2f2; }
.kq-exam-opt.wrong span { background: #dc2626; color: #fff; }
.kq-exam-opt:disabled { cursor: default; }
.kq-exam-score {
  text-align: center; padding: 18px; margin-bottom: 16px;
  background: linear-gradient(135deg, #f0f9ff, #eef7f1); border: 1.5px solid #d3e6f8; border-radius: 16px;
}
.kq-exam-score b { font-size: 34px; color: #0f2447; }
.kq-exam-score span { color: #64748b; font-weight: 800; }
.kq-exam-score p { margin-top: 6px; font-weight: 900; color: #0e7490; font-size: 14px; }
@media (max-width: 640px) {
  .kq-exam-btn { padding: 8px 12px; font-size: 12px; }
  .kq-del { width: 28px; height: 28px; font-size: 12px; }
}

/* ============ SP-V30-A: صانع الأسئلة — التفكير الذكي + استرجاع الشغل + تعديل الرسمة ============ */
.qm-think { border-inline-start: 4px solid var(--gold, #eab308); }
.qm-think-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.qm-think-step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(30, 42, 74, .05); opacity: .55; transition: all .3s; }
.qm-think-step.active { opacity: 1; background: rgba(234, 179, 8, .12); box-shadow: 0 0 0 1px rgba(234, 179, 8, .35) inset; }
.qm-think-step.done { opacity: .9; background: rgba(34, 197, 94, .1); }
.qm-think-step.done .qm-ts-st i { color: #16a34a; }
.qm-ts-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(30, 42, 74, .09); flex: none; }
.qm-ts-lb { flex: 1; font-size: .92rem; font-weight: 700; }
.qm-ts-st { flex: none; }
.qm-think-live { margin-top: 10px; font-size: .85rem; color: #64748b; min-height: 1.2em; }
.qr-restore-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-inline-start: 4px solid #0ea5e9; }
.qr-editimg { margin-top: 6px; width: 100%; }
.qr-imgprev { display: flex; flex-direction: column; gap: 4px; }

/* ============ SP-V30-B: تعديل درجات محاولة معينة ============ */
.rs-att-box { max-width: 560px; width: 94vw; }
.rs-att-list { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.rs-att-row { align-items: center; gap: 8px; }
.rs-att-score { display: flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.rs-att-inp { width: 74px; text-align: center; padding: 6px 8px; }
.rs-att-saved { box-shadow: 0 0 0 2px #16a34a inset; border-radius: 12px; transition: box-shadow .3s; }

/* ===== SP-V31-A: محرر العداد الموحّد (v31-3) ===== */
.sp-gauge-box { max-width: 560px; width: 100%; }
.sp-gauge-grid { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; margin: 14px 0 4px; }
.sp-gauge-prev { background: linear-gradient(145deg, #f8fafc, #eef2f7); border: 1px solid #e2e8f0; border-radius: 14px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.sp-gauge-prev canvas { max-width: 100%; height: auto; }
.sp-gauge-fields { display: flex; flex-direction: column; gap: 10px; }
.sp-gauge-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-gauge-range { width: 100%; accent-color: #f4791f; cursor: pointer; }
.sp-gauge-valnum { font-weight: 800; color: #f4791f; font-size: .85rem; text-align: center; margin-top: 2px; }
.sp-gauge-chk { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #334155; cursor: pointer; user-select: none; }
.sp-gauge-chk input { accent-color: #f4791f; width: 16px; height: 16px; }
@media (max-width: 560px) { .sp-gauge-grid { grid-template-columns: 1fr; } .sp-gauge-prev { order: -1; } }

/* ===== SP-V31-B: مودال تعديل الدرجات (v31-4) — الكلاسات ui-overlay/ui-box كانت ناقصة فالمودال كان بيظهر مكسور ===== */
.ui-overlay { position: fixed; inset: 0; background: rgba(8,14,28,.55); backdrop-filter: blur(6px); z-index: 14500; display: flex; align-items: center; justify-content: center; padding: 18px; overflow-y: auto; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.ui-overlay.show { opacity: 1; pointer-events: auto; }
.ui-box { background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(2,8,26,.35); width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; transform: translateY(14px) scale(.98); transition: transform .2s ease; }
.ui-overlay.show .ui-box { transform: none; }
.ui-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #eef1f6; background: linear-gradient(135deg, #16305e, #1e3f7d); }
.ui-box-head h3 { margin: 0; font-size: 1rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.ui-box-head h3 i { color: #f4a53f; }
.ui-x { background: rgba(255,255,255,.14); border: none; color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; flex: 0 0 auto; }
.ui-x:hover { background: rgba(255,255,255,.28); }
.rs-att-box .rs-att-list { padding: 12px 14px 16px; }
.rs-att-row { display: flex; background: #f8fafc; border: 1px solid #e6ebf3; border-radius: 12px; padding: 10px 12px; }
.rs-att-row .admin-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-att-row .admin-row-main b { font-size: .88rem; color: #16305e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-att-row .admin-row-main span { font-size: .74rem; color: #64748b; }
@media (max-width: 480px) {
  .rs-att-row { flex-wrap: wrap; }
  .rs-att-row .admin-row-main { flex: 1 1 100%; }
}

/* ==== SP-V31-C: القص الذكي + رفع صورة للسؤال (v31-6 / v31-7) ==== */
.qr-img-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.qr-crop-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px; padding: 3px 10px;
  background: #fff7ed; color: #b45309;
  border: 1px solid #fed7aa; border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  direction: ltr; unicode-bidi: plaintext;
}
.qr-foot-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.qr-foot-acts .admin-btn.sm { flex: 0 0 auto; }
@media (max-width: 480px) {
  .qr-img-acts, .qr-foot-acts { flex-direction: column; }
  .qr-img-acts .admin-btn, .qr-foot-acts .admin-btn { width: 100%; }
}

/* ==== SP-V31-D: منطقة الخطر + الشريط الإخباري + إيقاف الأنيميشن (v31-8) ==== */
.hr-danger { border: 2px solid #fecaca !important; background: #fff8f8 !important; }
.hr-danger h3 { color: #b91c1c !important; }
.hr-danger-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.hr-danger-btns .admin-btn.danger {
  background: #fff; color: #b91c1c;
  border: 2px solid #ef4444; border-radius: 14px;
  font-weight: 800; padding: 10px 16px;
  transition: all .2s;
}
.hr-danger-btns .admin-btn.danger:hover { background: #ef4444; color: #fff; }
@media (max-width: 560px) {
  .hr-danger-btns { flex-direction: column; }
  .hr-danger-btns .admin-btn.danger { width: 100%; }
}
/* v31-8: إيقاف كل الأنيميشن على صفحة الهبوط لما المستر يفعّله من الإشراف */
body.sp-noanim *, body.sp-noanim *::before, body.sp-noanim *::after {
  animation: none !important;
  transition: none !important;
}

/* ==== SP-V31-E: منطقة تيم التطوير (v31-9) ==== */
.dev-team-zone { border: 2px dashed #c7d2fe !important; background: #f8faff !important; }
.dev-team-zone h3 { color: #4338ca !important; }
.dev-team-empty { text-align: center; padding: 28px 16px; }
.dtz-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 20px;
  background: #eef2ff; color: #6366f1; font-size: 1.6rem;
  margin-bottom: 12px;
}
.dtz-title { font-weight: 900; color: #16305e; font-size: 1.05rem; margin: 0 0 6px; }
.dtz-sub { color: #64748b; font-weight: 600; font-size: .85rem; line-height: 1.9; max-width: 480px; margin: 0 auto; }

/* ==== SP-V32-A: مودال مراجعة الرسمة (v32-7a) — مقارنة القصاصة الأصلية برسمة الذكاء ==== */
.qr-review-ov {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10, 18, 40, .72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.qr-review-box {
  background: #fff; border-radius: 18px; padding: 18px 20px;
  width: min(980px, 96vw); max-height: 92vh; overflow: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.qr-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.qr-review-head h4 { margin: 0; font-weight: 900; color: #16305e; font-size: 1.05rem; }
.qr-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qr-review-col {
  border: 2px solid #e2e8f0; border-radius: 14px; padding: 10px; background: #f8fafc;
  display: flex; flex-direction: column; gap: 8px;
}
.qr-review-col h5 { margin: 0; font-weight: 800; color: #334155; font-size: .88rem; }
.qr-review-col img, .qr-review-col canvas {
  width: 100%; height: auto; border-radius: 10px; background: #fff;
  border: 1px solid #e2e8f0; object-fit: contain; max-height: 420px;
}
@media (max-width: 720px) { .qr-review-grid { grid-template-columns: 1fr; } }

/* ==== SP-V32-B: الوصف الكلامي المستخرج (v32-7d) ==== */
.qr-figdesc { margin-top: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 8px 12px; background: #f8fafc; }
.qr-figdesc summary { cursor: pointer; font-weight: 800; color: #334155; font-size: .85rem; }
.qr-figdesc pre { white-space: pre-wrap; font-family: inherit; font-size: .82rem; color: #475569; line-height: 1.9; margin: 8px 0 0; }

/* ===== SP-V33-A: مراجعة ذكية + شارات القص (v33-6) ===== */
.qr-review-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.qr-review-acts [data-rvout] { flex: 1; min-width: 200px; line-height: 1.7; }
.qr-review-acts [data-rvout] b { color: #f59e0b; }

/* ===== SP-V33-B: v33-1 — تجميل بوابة دخول الإشراف ===== */
.admin-gate-card.gate-v33 { position: relative; overflow: hidden; max-width: 430px; padding: 38px 30px 26px; border-radius: 26px; background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%); }
.sp-dark .admin-gate-card.gate-v33 { background: linear-gradient(180deg, #101a2e 0%, #0c1526 100%); }
.gate-glow { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5; pointer-events: none; }
.gate-glow-1 { width: 180px; height: 180px; top: -70px; left: -50px; background: radial-gradient(circle, rgba(244,121,31,.35), transparent 70%); }
.gate-glow-2 { width: 200px; height: 200px; bottom: -90px; right: -60px; background: radial-gradient(circle, rgba(22,48,94,.3), transparent 70%); }
.gate-v33 .admin-gate-ic { animation: gateIcFloat 3.2s ease-in-out infinite; }
@keyframes gateIcFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.gate-field { position: relative; }
.gate-field > i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #94a3c4; font-size: .9rem; pointer-events: none; transition: color .2s; }
.gate-field input { padding-right: 42px !important; text-align: right !important; }
.gate-field input:focus + i, .gate-field:focus-within > i { color: #f4791f; }
.gate-v33 form { position: relative; z-index: 1; }
.gate-v33 button[type="submit"] { background: linear-gradient(135deg, #f4791f, #ff9a4d); border: none; box-shadow: 0 10px 24px rgba(244,121,31,.35); transition: transform .15s, box-shadow .2s; }
.gate-v33 button[type="submit"]:active { transform: scale(.97); }
.gate-note { margin-top: 16px; font-size: .72rem; font-weight: 700; color: #7c8bb0; display: flex; align-items: center; justify-content: center; gap: 6px; position: relative; z-index: 1; }
.sp-dark .gate-note { color: #5a6a8f; }
.gate-note i { color: #f4791f; }

/* ===== SP-V33-C: v33-2 — صندوق المتواجدين الآن ===== */
.online-box { background: #fff; border: 1px solid #e6e9f2; border-radius: 20px; padding: 18px; margin-bottom: 22px; box-shadow: 0 8px 26px rgba(22,48,94,.06); }
.sp-dark .online-box { background: #101a2e; border-color: #23324e; }
.online-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.online-head h3 { margin: 0; font-size: 1rem; font-weight: 900; color: #16305e; display: flex; align-items: center; gap: 9px; }
.sp-dark .online-head h3 { color: #e8eefc; }
.online-dot { width: 11px; height: 11px; border-radius: 50%; background: #22c55e; position: relative; }
.online-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(34,197,94,.5); animation: onlinePulse 1.6s ease-out infinite; }
@keyframes onlinePulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.online-refresh { width: 34px; height: 34px; border-radius: 11px; border: 1px solid #e6e9f2; background: #f8faff; color: #16305e; cursor: pointer; transition: .2s; }
.sp-dark .online-refresh { background: #182642; border-color: #23324e; color: #cfe0ff; }
.online-refresh:hover { background: #16305e; color: #fff; }
.online-refresh.spin i { animation: onlineSpin .8s linear; }
@keyframes onlineSpin { to { transform: rotate(360deg); } }
.online-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .online-cols { grid-template-columns: 1fr; } }
.online-col { background: #f8faff; border: 1px solid #eef1f9; border-radius: 15px; padding: 12px; }
.sp-dark .online-col { background: #0c1526; border-color: #1c2a45; }
.online-count { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #16305e; margin-bottom: 10px; font-size: .85rem; }
.sp-dark .online-count { color: #cfe0ff; }
.online-count i { width: 34px; height: 34px; border-radius: 11px; background: rgba(34,197,94,.12); color: #16a34a; display: flex; align-items: center; justify-content: center; }
.online-count.sup i { background: rgba(244,121,31,.12); color: #f4791f; }
.online-count b { font-size: 1.35rem; font-weight: 900; }
.online-count span { opacity: .6; font-size: .75rem; }
.online-list { display: flex; flex-direction: column; gap: 7px; max-height: 250px; overflow-y: auto; }
.online-item { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid #eef1f9; border-radius: 12px; padding: 7px 10px; }
.sp-dark .online-item { background: #121e36; border-color: #1f2e4c; }
.online-item img, .online-av-fb { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.online-av-fb { background: #e5eaf6; color: #7c8bb0; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.online-av-fb.sup { background: rgba(244,121,31,.14); color: #f4791f; }
.sp-dark .online-av-fb { background: #1c2a45; }
.online-info { flex: 1; min-width: 0; line-height: 1.25; }
.online-info b { display: block; font-size: .78rem; font-weight: 800; color: #16305e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-dark .online-info b { color: #e8eefc; }
.online-info small { font-size: .66rem; color: #94a3c4; font-weight: 700; direction: ltr; display: block; text-align: right; }
.online-ago { font-size: .64rem; font-weight: 800; color: #16a34a; background: rgba(34,197,94,.1); border-radius: 8px; padding: 3px 7px; white-space: nowrap; }
.online-empty { text-align: center; padding: 16px 8px; font-size: .78rem; font-weight: 700; color: #94a3c4; }
.online-empty i { margin-left: 5px; }

/* ===== SP-V33-D: v33-3 — إصلاحات الشكل من فيديو المشاكل ===== */
/* 1) شاشات التحميل: طبقة معتمة خفيفة + سبينر أوضح بدل النص العائم */
.admin-loading { background: rgba(22,48,94,.04); border: 1.5px dashed #dde3f0; border-radius: 18px; margin: 8px 0; min-height: 130px; font-size: .9rem; }
.sp-dark .admin-loading { background: rgba(255,255,255,.03); border-color: #23324e; }
.admin-loading .btn-spinner { width: 22px; height: 22px; border-width: 3px; }

/* 2) مودال تعديل الدرجات: مساحات مريحة + صفوف متناسقة مش مزنوقة */
.rs-att-box { max-width: 640px !important; }
.rs-att-box .rs-att-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.rs-att-row { display: flex !important; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px !important; border-radius: 14px !important; }
.rs-att-row .admin-row-main { min-width: 150px; }
.rs-att-score { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.rs-att-inp { width: 74px !important; text-align: center; padding: 8px 6px !important; }
@media (max-width: 560px) {
  .rs-att-row .admin-row-main { flex: 1 1 100%; }
}

/* 3) مودال المراجعة: زر الإغلاق ثابت فوق ومش بيتغطى بالصور */
.qr-review-head { position: sticky; top: -18px; z-index: 5; background: #fff; padding: 10px 0; margin-top: -10px; }
.sp-dark .qr-review-head { background: #101a2e; }
.qr-review-head [data-rvclose] { width: 38px; height: 38px; border-radius: 12px; background: #fee2e2; color: #dc2626; border: none; font-size: 1rem; flex-shrink: 0; }
.qr-review-head [data-rvclose]:hover { background: #dc2626; color: #fff; }
.sp-dark .qr-review-box { background: #101a2e; }
.sp-dark .qr-review-col { background: #0c1526; border-color: #1c2a45; }
.sp-dark .qr-review-head h4 { color: #e8eefc; }

/* 4) سجل النشاط: محاذاة منتظمة بأعمدة ثابتة بدل التراص المائل */
#secLog .admin-row { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 10px; }
#secLog .admin-row .admin-row-main { min-width: 0; }
#secLog .admin-row .admin-row-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
#secLog .admin-row .admin-row-main span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; }
#secLog .sec-cat-chip { justify-self: end; }
#secLog .admin-muted { white-space: nowrap; font-size: .68rem; }
@media (max-width: 640px) {
  #secLog .admin-row { grid-template-columns: 30px 1fr auto; }
  #secLog .sec-cat-chip { display: none; }
}

/* 5) أزرار الحذف الصغيرة: مساحة لمس أكبر وأوضح */
.admin-mini-btn.danger, .ac-mini.danger, .ac-tag-del { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: .82rem; }
.admin-btn.sm.danger { min-height: 36px; }

/* 6) حالات الفراغ: شكل مصمم بدل السطر الباهت */
.admin-empty-note, .admin-muted:only-child, p.admin-muted {
  border-radius: 14px;
}
.admin-empty-note { background: #f8faff; border: 1.5px dashed #dde3f0; padding: 26px 16px !important; text-align: center; font-weight: 800; color: #7c8bb0; font-size: .85rem; }
.sp-dark .admin-empty-note { background: rgba(255,255,255,.03); border-color: #23324e; color: #5a6a8f; }

/* 7) شارات الحالة: موحدة الحجم وواضحة */
.admin-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 11px; border-radius: 999px; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.admin-chip.green::before, .admin-chip.red::before, .admin-chip.amber::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ===== SP-V34-A: دفعة v34 — أزرار طريقة استخراج الرسومات (v34-5) ===== */
.qm-figmode { display: flex; gap: 10px; flex-wrap: wrap; }
.qm-figmode .admin-btn.active { background: linear-gradient(135deg,#f4791f,#f9a03f); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(244,121,31,.3); }
.qm-figmode .admin-btn.active i { color: #fff; }

/* v36: PDF page ranges, extraction diagnostics and free rectangle crop. */
.ai-page-range, .ai-crop-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-block: 16px; }
.ai-page-range label, .ai-crop-fields label { display: grid; gap: 7px; font-weight: 700; font-size: 13px; }
.ai-extract-status { border-inline-start: 4px solid var(--orange); overflow-wrap: anywhere; }
.ai-extract-status ul { max-height: 230px; overflow: auto; padding-inline-start: 22px; font-size: 13px; line-height: 1.9; }
.ai-review-warning { background: #fff3df; color: #854707; border: 1px solid #efca8c; border-radius: 10px; padding: 10px; font-size: 13px; }
.ai-crop-dialog { border: 1px solid #ccd7e4; border-radius: 18px; padding: 22px; width: min(860px,94vw); max-height: 94vh; overflow: auto; color: #16305e; background: #fff; box-shadow: 0 24px 80px #07193255; margin: auto; }
.ai-crop-dialog::backdrop { background: #071932b3; }
.ai-crop-dialog h3 { font-size: 20px; font-weight: 800; }
.ai-crop-dialog p { margin-block: 10px; line-height: 1.8; font-size: 13px; }
.ai-crop-dialog canvas { display: block; max-width: 100%; height: auto; margin-inline: auto; border: 1px solid #dbe3ed; touch-action: none; cursor: crosshair; }
.ai-crop-dialog footer { display: flex; gap: 10px; justify-content: flex-end; }
.ai-crop-dialog input { direction: ltr; }
#qmExtractStop[hidden], #qmExtractRetry[hidden], #qmExtractStatus[hidden] { display: none !important; }
#qmResultsExtract[aria-busy="true"] .qr-panel { pointer-events: none; opacity: .85; }
@media(max-width:480px) { .ai-crop-dialog { padding: 14px; } .ai-page-range { grid-template-columns: 1fr; } }

/* ===== SP-V35-A: دفعة v35 — لوحة Xkiro + تنسيق الرموز الفيزيائية ===== */
.xk-panel { border: 1.5px dashed rgba(120, 90, 220, .4); border-radius: 14px; padding: 16px; background: linear-gradient(135deg, rgba(120,90,220,.05), rgba(60,120,255,.04)); }
.xk-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.05rem; }
.xk-title i { color: #7a5ada; }
.xk-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: .92rem; }
.xk-warn { color: #a5600a !important; background: rgba(249,160,63,.1); border-radius: 8px; padding: 8px 10px; }
.xk-usage-bar { height: 10px; border-radius: 6px; background: rgba(0,0,0,.08); overflow: hidden; margin-top: 10px; }
.xk-usage-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg,#4caf7a,#7a5ada); transition: width .4s; }
.xk-usage-fill.hot { background: linear-gradient(90deg,#f4791f,#e53935); }
.xk-models-wrap summary { cursor: pointer; font-weight: 800; font-size: .9rem; color: #555; }
.xk-models { max-height: 280px; overflow: auto; margin: 8px 0 0; padding-inline-start: 26px; font-size: .82rem; line-height: 1.9; }
.xk-models li.xk-dead code { opacity: .45; text-decoration: line-through; }
.xk-switch-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* v35-4/5: الرموز الفيزيائية — عزل اتجاهي + مقاسات سفلي/فوقي مقروءة */
.qr-q bdi, .qr-opts bdi, .qr-essay bdi, .qr-exp bdi,
.exm-qtext bdi, .exm-opt-txt bdi, .exm-steps bdi, .exm-rev-q bdi, .exm-rev-opt bdi,
.kq-exam-q bdi, .kq-exam-opt bdi { unicode-bidi: isolate; direction: ltr; display: inline-block; }
.qr-q sub, .qr-opts sub, .exm-qtext sub, .exm-opt-txt sub, .exm-steps sub, .exm-rev-q sub, .exm-rev-opt sub, .kq-exam-q sub, .kq-exam-opt sub, .qr-exp sub, .qr-essay sub { font-size: .68em; vertical-align: -0.25em; }
.qr-q sup, .qr-opts sup, .exm-qtext sup, .exm-opt-txt sup, .exm-steps sup, .exm-rev-q sup, .exm-rev-opt sup, .kq-exam-q sup, .kq-exam-opt sup, .qr-exp sup, .qr-essay sup { font-size: .68em; vertical-align: 0.45em; }
