/* ═══════════════════════════════════════════════════════════════
   IQ Fatma — أنماط المكونات الجديدة
   مبنية على هوية الموقع الحالية: نفس الألوان (كحلي/تركواز)،
   نفس الخطوط (Cairo/Tajawal)، نفس أنصاف الأقواس ونظام التباعد.
   لا تغيّر أي شيء في التصميم الأصلي — تضيف مكونات فقط.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --navy-50: #eef3fa;
  --navy-100: #d8e3f2;
  --navy-200: #b0c5e2;
  --navy-400: #4a72ab;
  --navy-500: #33568c;
  --navy-600: #7d9ecb;
  --navy-700: #16345e;
  --navy-800: #122a4c;
  --navy-900: #0c1e38;
  --navy-950: #071426;
  --teal-200: #99f6e4;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --brand-teal: #2fd4c4;
  --brand-teal-dark: #0f9187;
  --amber: #fbbf24;
  --green: #1eb85a;
  --radius: 0.875rem;
}

/* ── أزرار بنفس أسلوب الموقع ── */
.iq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: var(--radius); font-weight: 700; font-size: 0.875rem;
  padding: 0.55rem 1.25rem; cursor: pointer; border: 1px solid transparent;
  transition: all .2s ease; white-space: nowrap; text-decoration: none;
  font-family: Tajawal, Cairo, sans-serif; line-height: 1.5;
}
.iq-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.iq-btn-primary {
  background: #14b8a6; color: #fff;
  box-shadow: 0 4px 14px rgba(20, 184, 166, .25);
}
.iq-btn-primary:hover { background: #0d9488; }
.iq-btn-outline {
  border-color: var(--navy-200); color: var(--navy-700); background: #fff;
}
.iq-btn-outline:hover { background: var(--navy-50); border-color: var(--navy-400); }
.iq-btn-ghost { color: var(--navy-600); background: transparent; }
.iq-btn-ghost:hover { background: var(--navy-50); }
.iq-btn-danger { background: #e11d48; color: #fff; }
.iq-btn-danger:hover { background: #be123c; }
.iq-btn-light {
  border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.05);
}
.iq-btn-light:hover { background: rgba(255,255,255,.15); }
.iq-btn-sm { padding: .35rem .9rem; font-size: .8rem; border-radius: .7rem; }
.iq-btn-lg { padding: .8rem 2rem; font-size: 1rem; border-radius: 1rem; }
.iq-btn:disabled { opacity: .5; pointer-events: none; }

/* ── حقول الإدخال ── */
.iq-input, .iq-select, .iq-textarea {
  width: 100%; border: 1px solid var(--navy-200); border-radius: var(--radius);
  padding: .6rem 1rem; font-size: .9rem; font-family: Tajawal, sans-serif;
  color: var(--navy-800); background: #fff; transition: border-color .2s;
}
.iq-input:focus, .iq-select:focus, .iq-textarea:focus {
  outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(47,212,196,.18);
}
.iq-input::placeholder, .iq-textarea::placeholder { color: #9ca3af; }
.iq-label { display: block; font-size: .82rem; font-weight: 700; color: var(--navy-700); margin-bottom: .35rem; }
.iq-field { margin-bottom: 1rem; }

/* ── بطاقات ── */
.iq-card {
  background: #fff; border: 1px solid var(--navy-100); border-radius: 1.25rem;
  box-shadow: 0 1px 3px rgba(18,42,76,.05);
}
.iq-card-pad { padding: 1.25rem; }
@media (min-width: 768px) { .iq-card-pad { padding: 1.5rem; } }
.iq-card-title { font-family: Cairo, sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--navy-800); }

/* شارات */
.iq-badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700;
  padding: .2rem .65rem; border-radius: 999px; background: #e6faf7; color: var(--brand-teal-dark);
}
.iq-badge-navy { background: var(--navy-50); color: var(--navy-700); }
.iq-badge-amber { background: #fef3c7; color: #b45309; }
.iq-badge-red { background: #fee2e2; color: #b91c1c; }
.iq-badge-green { background: #dcfce7; color: #15803d; }

/* ── هيكل التطبيق: شريط جانبي + محتوى ── */
.iq-app { display: flex; min-height: 100vh; }
.iq-side {
  width: 250px; flex-shrink: 0; background: var(--navy-900); color: #fff;
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 40; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s ease;
  background-image: radial-gradient(600px 260px at 80% -5%, rgba(47,212,196,.12), transparent 60%);
}
.iq-side.open { transform: translateX(0); }
.iq-main { flex: 1; min-width: 0; padding: 1.25rem; }
.iq-side-link {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .9rem; margin: .15rem .75rem;
  border-radius: .8rem; font-size: .88rem; font-weight: 600; color: var(--navy-100);
  transition: all .2s; text-decoration: none; cursor: pointer;
}
.iq-side-link svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.iq-side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.iq-side-link.active { background: rgba(47,212,196,.15); color: var(--brand-teal); }
.iq-side-link.active svg { color: var(--brand-teal); }
@media (min-width: 1024px) {
  .iq-side { position: sticky; top: 0; height: 100vh; transform: none; }
  .iq-main { padding: 2rem; }
}
.iq-side-overlay { position: fixed; inset: 0; background: rgba(7,20,38,.5); z-index: 35; display: none; }
.iq-side-overlay.show { display: block; }
@media (min-width: 1024px) { .iq-side-overlay.show { display: none; } }

/* ── شبكات متجاوبة ── */
.iq-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .iq-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
  .iq-grid-md-2 { grid-template-columns: repeat(2, 1fr); }
  .iq-grid-md-3 { grid-template-columns: repeat(3, 1fr); }
  .iq-grid-md-4 { grid-template-columns: repeat(4, 1fr); }
}
.iq-grid-stats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .iq-grid-stats { grid-template-columns: repeat(4, 1fr); } }

/* ── جداول ── */
.iq-table-wrap { overflow-x: auto; border-radius: 1rem; border: 1px solid var(--navy-100); }
.iq-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 600px; }
.iq-table th {
  text-align: right; padding: .7rem 1rem; background: var(--navy-50);
  color: var(--navy-700); font-weight: 800; font-size: .78rem; white-space: nowrap;
}
.iq-table td { padding: .75rem 1rem; border-top: 1px solid var(--navy-100); color: var(--navy-800); vertical-align: middle; }
.iq-table tr:hover td { background: #f8fbfd; }

/* ── تبويبات ── */
.iq-tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--navy-100); margin-bottom: 1.25rem; }
.iq-tab {
  padding: .6rem 1.1rem; font-size: .88rem; font-weight: 700; color: var(--navy-600);
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; font-family: Tajawal, sans-serif;
}
.iq-tab:hover { color: var(--navy-800); }
.iq-tab.active { color: var(--brand-teal-dark); border-bottom-color: var(--brand-teal); }

/* ── بطاقة إحصائية ── */
.iq-stat { display: flex; align-items: center; gap: .9rem; }
.iq-stat-icon {
  width: 2.9rem; height: 2.9rem; border-radius: 1rem; display: grid; place-items: center; flex-shrink: 0;
  background: #e6faf7; color: var(--brand-teal-dark);
}
.iq-stat-icon svg { width: 1.4rem; height: 1.4rem; }
.iq-stat-icon.navy { background: var(--navy-50); color: var(--navy-700); }
.iq-stat-icon.amber { background: #fef3c7; color: #b45309; }
.iq-stat-icon.green { background: #dcfce7; color: #15803d; }
.iq-stat-num { font-family: Cairo, sans-serif; font-size: 1.4rem; font-weight: 900; color: var(--navy-800); line-height: 1.1; }
.iq-stat-label { font-size: .76rem; color: #64748b; font-weight: 600; }

/* ── أفاتار ── */
.iq-avatar {
  width: 2.6rem; height: 2.6rem; border-radius: 999px; display: inline-grid; place-items: center;
  color: #fff; font-weight: 800; font-size: .95rem; font-family: Cairo, sans-serif; flex-shrink: 0;
}
.iq-avatar-lg { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }

/* ── خيارات الاختبار ── */
.iq-option {
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: right;
  padding: .9rem 1.1rem; border: 1.5px solid var(--navy-100); border-radius: var(--radius);
  background: #fff; font-size: .95rem; font-weight: 600; color: var(--navy-800);
  cursor: pointer; transition: all .18s; font-family: Tajawal, sans-serif;
}
.iq-option:hover { border-color: var(--brand-teal); background: #f4fdfc; }
.iq-option.selected { border-color: var(--brand-teal); background: #e6faf7; }
.iq-option.correct { border-color: var(--green); background: #dcfce7; }
.iq-option.wrong { border-color: #e11d48; background: #fee2e2; }
.iq-option:disabled { cursor: default; }
.iq-option-key {
  width: 1.7rem; height: 1.7rem; border-radius: .55rem; background: var(--navy-50); color: var(--navy-700);
  display: grid; place-items: center; font-size: .78rem; font-weight: 800; flex-shrink: 0; font-family: Cairo, sans-serif;
}
.iq-option.selected .iq-option-key { background: var(--brand-teal); color: #fff; }
.iq-option.correct .iq-option-key { background: var(--green); color: #fff; }
.iq-option.wrong .iq-option-key { background: #e11d48; color: #fff; }

/* مؤشرات أسئلة الامتحان */
.iq-qdot {
  width: 2.4rem; height: 2.4rem; border-radius: .8rem; border: 1.5px solid var(--navy-100);
  background: #fff; font-size: .82rem; font-weight: 800; color: var(--navy-700);
  cursor: pointer; font-family: Cairo, sans-serif; transition: all .15s;
}
.iq-qdot:hover { border-color: var(--brand-teal); }
.iq-qdot.answered { background: #d1f5ef; border-color: var(--brand-teal); color: var(--brand-teal-dark); }
.iq-qdot.current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* مؤقت السؤال */
.iq-timer {
  display: inline-flex; align-items: center; gap: .45rem; font-family: Cairo, sans-serif;
  font-weight: 800; font-size: 1.05rem; color: var(--navy-800);
  background: var(--navy-50); padding: .35rem .9rem; border-radius: 999px;
}
.iq-timer.low { background: #fee2e2; color: #b91c1c; }
.iq-timer svg { width: 1.1rem; height: 1.1rem; }

/* ── المستوى ── */
.iq-level-chip {
  display: inline-flex; align-items: center; gap: .4rem; background: var(--navy-800); color: var(--brand-teal);
  font-weight: 800; font-family: Cairo, sans-serif; font-size: .85rem;
  padding: .35rem .95rem; border-radius: 999px;
}

/* ── نافذة منبثقة ── */
.iq-modal-overlay {
  position: fixed; inset: 0; background: rgba(7,20,38,.55); z-index: 60;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.iq-modal-overlay.show { display: flex; }
.iq-modal {
  background: #fff; border-radius: 1.25rem; width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto; padding: 1.5rem; animation: iq-pop .2s ease;
}
.iq-modal-lg { max-width: 720px; }
@keyframes iq-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── بطاقة تقييم ── */
.iq-review { display: flex; flex-direction: column; gap: .9rem; height: 100%; }
.iq-stars { color: var(--amber); display: inline-flex; gap: .15rem; }
.iq-stars svg { width: 1rem; height: 1rem; }
.iq-stars .off { color: var(--navy-100); }

/* ── الشهادة ── */
.iq-cert {
  position: relative; border-radius: 1.25rem; overflow: hidden;
  border: 1px solid var(--navy-100); background: #fff;
}
.iq-cert-inner { position: relative; padding: 2.5rem 2rem; }
@media (min-width: 768px) { .iq-cert-inner { padding: 3.5rem 3rem; } }
.iq-cert-frame {
  position: absolute; inset: .8rem; border: 2px solid rgba(18,42,76,.12); border-radius: .9rem; pointer-events: none;
}
.iq-cert-frame::after {
  content: ""; position: absolute; inset: .35rem; border: 1px solid rgba(47,212,196,.35); border-radius: .6rem;
}
.iq-cert-watermark {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: .05; pointer-events: none;
}
.iq-cert-watermark img { width: 320px; }
.iq-cert-qr { background: #fff; padding: .5rem; border-radius: .8rem; border: 1px solid var(--navy-100); display: inline-block; }
.iq-cert-qr img, .iq-cert-qr canvas { display: block; }

/* ── مشغل الفيديو داخل صدفة الموقع ── */
.iq-video-shell { border-radius: 1.25rem; overflow: hidden; }
.iq-video-shell video, .iq-video-shell iframe { width: 100%; aspect-ratio: 16/9; display: block; background: #000; border: 0; }

/* شريط فيديوهات الكورس */
.iq-vid-row {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: .9rem;
  transition: background .15s; cursor: pointer; text-decoration: none; color: inherit;
}
.iq-vid-row:hover { background: var(--navy-50); }
.iq-vid-row.active { background: #e6faf7; }
.iq-vid-row.done .iq-vid-num { background: var(--green); color: #fff; border-color: var(--green); }
.iq-vid-num {
  width: 1.9rem; height: 1.9rem; border-radius: .65rem; border: 1.5px solid var(--navy-200);
  display: grid; place-items: center; font-size: .75rem; font-weight: 800; color: var(--navy-700);
  flex-shrink: 0; font-family: Cairo, sans-serif; background: #fff;
}

/* شريط تقدم صغير */
.iq-progress { height: .55rem; width: 100%; overflow: hidden; border-radius: 999px; background: var(--navy-100); }
.iq-progress > div {
  height: 100%; border-radius: 999px; transition: width .6s ease;
  background: linear-gradient(to left, #2fd4c4, #0f9187);
}

/* تنبيهات صغيرة */
.iq-toast {
  position: fixed; bottom: 1.25rem; right: 50%; transform: translateX(50%); z-index: 80;
  background: var(--navy-800); color: #fff; padding: .7rem 1.4rem; border-radius: .9rem;
  font-size: .88rem; font-weight: 700; box-shadow: 0 8px 30px rgba(7,20,38,.35);
  display: none; align-items: center; gap: .5rem; max-width: 90vw;
}
.iq-toast.show { display: flex; animation: iq-pop .25s ease; }
.iq-toast.ok { background: #0f766e; }
.iq-toast.err { background: #be123c; }

/* أدوات مساعدة عامة */
.iq-flex { display: flex; }
.iq-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.iq-flex-center { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.iq-muted { color: #64748b; font-size: .84rem; }
.iq-section-title { font-family: Cairo, sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--navy-800); }
.iq-page-title { font-family: Cairo, sans-serif; font-weight: 900; font-size: 1.6rem; color: var(--navy-800); }
@media (min-width: 768px) { .iq-page-title { font-size: 1.9rem; } }
.iq-empty {
  text-align: center; padding: 3rem 1rem; color: #94a3b8; font-size: .92rem;
  border: 1.5px dashed var(--navy-200); border-radius: 1rem; background: #fbfdfe;
}
.iq-check { width: 1.05rem; height: 1.05rem; accent-color: var(--brand-teal-dark); }
.iq-icon-btn {
  width: 2rem; height: 2rem; border-radius: .6rem; display: inline-grid; place-items: center;
  border: 1px solid var(--navy-100); background: #fff; color: var(--navy-600); cursor: pointer; transition: all .15s;
}
.iq-icon-btn:hover { border-color: var(--brand-teal); color: var(--brand-teal-dark); }
.iq-icon-btn.danger:hover { border-color: #e11d48; color: #e11d48; background: #fff1f2; }
.iq-icon-btn svg { width: .95rem; height: .95rem; }
.iq-divider { height: 1px; background: var(--navy-100); margin: 1.25rem 0; }
.iq-num { font-family: Cairo, sans-serif; font-feature-settings: "tnum"; }

@media print {
  .iq-no-print { display: none !important; }
  body { background: #fff !important; }
  .iq-cert { box-shadow: none; border: none; }
}

/* ═══ الامتحان — النوع الأول (الأبسط) ═══ */
/* ═══ الامتحان: مقاسات ثابتة (مش بتتغير مع حجم الشاشة) ═══ */
.iq-exam-canvas { width: 1060px; max-width: 1060px; }   /* المساحة الثابتة */
.iq-qhead { margin-bottom: .85rem; }                        /* السؤال فوق بعرض المساحة */
.iq-qcard {
  display: flex; gap: 18px; align-items: flex-start; flex-wrap: nowrap;
  /* الجدول والبوكسات: بدايتهم على نفس الخط */
}
/* الصورة: عرضها % من المساحة الثابتة = بكسل ثابت */
.iq-qmedia { flex: 0 0 46%; max-width: 46%; min-width: 0; order: 1; }
.iq-qmedia img { width: 100%; height: auto; display: block; }
/* عمود الكتابة: الباقي من المساحة الثابتة */
.iq-qside {
  flex: 0 0 calc(54% - 18px); width: calc(54% - 18px); min-width: 0;
  display: flex; flex-direction: column; gap: .7rem; align-self: flex-start;
}
.iq-qcard .iq-choices { max-width: 100%; width: 100%; }
.iq-qcard .iq-qtext { margin: 0; }
/* بوكسات الاختيارات: ارتفاع وعرض ثابتين */
.iq-choices { display: grid; gap: .22rem; max-width: 100%; }
.iq-choices .iq-option {
  display: flex; flex-direction: row; align-items: center; gap: .5rem;
  height: 34px; padding: 0 .7rem; font-size: .82rem; border-radius: .45rem;
  line-height: 1; border-width: 1px; box-sizing: border-box;
}
.iq-choices .iq-option > span:last-child { text-align: right; flex: 1; }
.iq-choices .iq-option-key {
  width: 1.15rem; height: 1.15rem; border-radius: .35rem;
  font-size: .6rem; line-height: 1; flex: 0 0 auto;
}
/* على الشاشات الأصغر: نسحب أفقيًا بدل ما نصغّر */
.exam-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .iq-qmedia { flex: 1 1 100%; max-width: 100%; }
  .iq-qside { flex: 1 1 100%; min-width: 0; }
  .iq-qtext { font-size: 1rem; }
}

  .iq-qtext { font-size: 1.05rem; }
}

/* ═══ حركة الاختيارات: وقوف = لون أفتح | اختيار = وميض إطار فاتح ═══ */
.iq-choices .iq-option { transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.iq-choices .iq-option:hover { background: rgba(94,234,212,.10); border-color: rgba(94,234,212,.55); }
.iq-choices .iq-option:active { background: rgba(94,234,212,.16); }
.iq-choices .iq-option.selected { animation: iqPickFlash .8s ease-out; border-color: #5eead4; }
@keyframes iqPickFlash {
  0%   { box-shadow: 0 0 0 0 rgba(94,234,212,.85); border-color: #bff7ef; background: rgba(94,234,212,.22); }
  45%  { box-shadow: 0 0 0 6px rgba(94,234,212,.28); border-color: #5eead4; background: rgba(94,234,212,.14); }
  100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); border-color: rgba(94,234,212,.55); background: rgba(94,234,212,.07); }
}

/* ═══ مربع رقم الصفحة + توسيط شريط التنقل تحت ═══ */
.iq-pagebox{display:inline-block;min-width:74px;text-align:center;font-weight:800;font-size:.86rem;letter-spacing:.06em;
  color:#cfe0f0;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.22);border-radius:10px;padding:.28rem .7rem;direction:ltr}
.iq-exam-foot{display:flex!important;align-items:center;justify-content:center!important;gap:.6rem;flex-wrap:wrap}

/* ═══ الامتحان — النوع الثاني (المحرّك المتقدّم) ═══ */
/* ألوان الإجابة: أخضر (p1) ← بنفسجي (p2) */
.iq-choices .iq-option.p1 { background: rgba(34,197,94,.18); border-color: #22c55e; }
.iq-choices .iq-option.p2 { background: rgba(139,92,246,.20); border-color: #8b5cf6; }
.iq-choices .iq-option.p1::after { content: "✓"; font-weight: 900; color: #15803d; font-size: .78rem; }
.iq-choices .iq-option.p2::after { content: "★"; font-weight: 900; color: #6d28d9; font-size: .78rem; }
.iq-choices .iq-option.p1, .iq-choices .iq-option.p2 { animation: iqPickFlash .45s ease-out; }

/* زر التعليم للمراجعة + زر الإلغاء */
.iq-markbtn { padding: .34rem .85rem !important; font-size: .82rem !important; }
.iq-markbtn.on { background: rgba(245,158,11,.18) !important; border-color: #f59e0b !important; color: #b45309 !important; }
.iq-clearbtn { padding: .3rem .9rem !important; font-size: .8rem !important; }

/* مؤقّت الامتحان الكامل (دايرة) */
.iq-donut { position: relative; width: 62px; height: 62px; flex: 0 0 auto; }
.iq-donut svg { width: 62px; height: 62px; display: block; transform: rotate(-90deg); }
.iq-donut .d-bg { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 6; }
.iq-donut .d-fg { fill: none; stroke: #2fd4c4; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .5s linear; }
.iq-donut .d-t { position: absolute; inset: 0; display: grid; place-items: center;
  font-family: Cairo, sans-serif; font-weight: 800; font-size: .72rem; color: #dae6f2; direction: ltr; }
.iq-donut.low .d-fg { stroke: #e11d48; }
.iq-donut.low .d-t { color: #be123c; }

/* نبض المؤقّت لما الوقت يقرّب يخلص */
.iq-timer.low { animation: iqTimerPulse 1s ease-in-out infinite; }
@keyframes iqTimerPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(225,29,72,.55); }
  50%     { box-shadow: 0 0 0 6px rgba(225,29,72,0); }
}

/* تنبيه انتهاء وقت السؤال */
.iq-expired { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem;
  padding: .5rem .85rem; border-radius: .6rem; font-weight: 700; font-size: .84rem;
  background: rgba(225,29,72,.14); border: 1px solid rgba(225,29,72,.45); color: #b91c1c; }

/* ═══ كارت السؤال: خلفية بيضاء ═══ */
.iq-card.iv-white{background:#ffffff!important;border-color:#d7e0ea!important}
.iq-card.iv-white .iq-exam-canvas{color:#12233b}
.iq-card.iv-white .iq-qtext,
.iq-card.iv-white .iq-qhead p,
.iq-card.iv-white .iq-qhead div{color:#12233b!important}
.iq-card.iv-white .iq-muted{color:#5b7290!important}
.iq-card.iv-white .iq-choices .iq-option{
  background:#f7fafc!important;border-color:#d7e0ea!important;color:#12233b!important}
.iq-card.iv-white .iq-choices .iq-option:hover{
  background:#e9f7f5!important;border-color:#0f9187!important}
.iq-card.iv-white .iq-choices .iq-option.selected{
  background:#e2f5f2!important;border-color:#0f9187!important;color:#0b3a35!important}
.iq-card.iv-white .iq-choices .iq-option-key{
  background:#eaf1f7!important;color:#12233b!important;border-color:#c9d6e4!important}
.iq-card.iv-white .iq-expired{background:#fff1f2!important;color:#9f1239!important}

/* ═══ اختيارات بشكل الريفرنس: شريط رمادي فاتح + دايرة راديو ═══ */
.iq-card.iv-white .iq-choices .iq-option{
  background:#f1f3f6!important;border:1px solid #e2e7ee!important;color:#12233b!important;
  border-radius:6px!important;height:38px!important;padding:0 .85rem!important;gap:.7rem!important;
  box-shadow:none!important;font-size:.92rem!important}
.iq-card.iv-white .iq-choices .iq-option:hover{background:#e6eff3!important;border-color:#0f9187!important}
.iq-card.iv-white .iq-choices .iq-option.selected{background:#dff2ef!important;border-color:#0f9187!important}
.iq-radio{
  width:17px;height:17px;border-radius:50%;border:2px solid #9aa9bb;background:#fff;
  flex:0 0 auto;position:relative;display:inline-block}
.iq-choices .iq-option:hover .iq-radio{border-color:#0f9187}
.iq-choices .iq-option.selected .iq-radio{border-color:#0f9187}
.iq-choices .iq-option.selected .iq-radio::after{
  content:"";position:absolute;inset:2.5px;border-radius:50%;background:#0f9187}
/* مؤقّت دائري فوق (شكل الريفرنس) */
.iq-timer-ring{display:inline-flex;align-items:center;gap:.5rem}

/* ═══ حلقة مؤقّت السؤال ═══ */
.iq-qring{position:relative;width:46px;height:46px;flex:0 0 auto}
.iq-qring svg{width:46px;height:46px;transform:rotate(-90deg)}
.iq-qring .d-bg{fill:none;stroke:#dfe6ee;stroke-width:5}
.iq-qring .d-fg{fill:none;stroke:#0f9187;stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset .35s linear}
.iq-qring .d-t{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:.95rem;color:#12233b}
.iq-qring.low .d-fg{stroke:#e11d48}
.iq-qring.low .d-t{color:#be123c}
/* ═══ هيدر ملوّن فوق الأسئلة ═══ */
.iq-exhead{background:linear-gradient(135deg,#0b3a4a,#0f9187)!important;border-color:#0f9187!important}
.iq-exhead .iq-exhead-num{color:#ffffff!important}
.iq-exhead .iq-muted{color:#cdeae6!important}
.iq-exhead .iq-qring .d-bg{stroke:rgba(255,255,255,.28)}
.iq-exhead .iq-qring .d-fg{stroke:#5ff0e0}
.iq-exhead .iq-qring .d-t{color:#ffffff}
.iq-exhead .iq-progress{background:rgba(255,255,255,.22)}
.iq-exhead .iq-progress>div{background:#5ff0e0}
.iq-exhead .iq-donut .d-bg{stroke:rgba(255,255,255,.28)}
.iq-exhead .iq-donut .d-fg{stroke:#5ff0e0}
.iq-exhead .iq-donut .d-t{color:#fff}


/* ═══════ ورقة بيضاء في نص الصفحة (زي الريفرنس) ═══════ */
body.iq-exam-paper{background:#071528!important}
body.iq-exam-paper .iq-main{background:#071528!important}
body.iq-exam-paper #exam-root{
  background:#ffffff!important;
  max-width:1080px;margin:1.1rem auto 2.2rem;padding:1.2rem 1.4rem 1.4rem;
  border-radius:10px;box-shadow:0 6px 28px rgba(16,35,58,.14);
  border:1px solid #e6ebf1}
@media (max-width:820px){
  body.iq-exam-paper #exam-root{margin:0;border-radius:0;padding:.8rem;box-shadow:none;max-width:100%}
}
/* المحتوى الداخلي: ألوان الريفرنس */
body.iq-exam-paper #exam-root .iq-card{
  background:#ffffff!important;border:0!important;box-shadow:none!important}
body.iq-exam-paper #exam-root .iq-muted{color:#7a8797!important}
body.iq-exam-paper #exam-root .iq-page-title,
body.iq-exam-paper #exam-root h1,
body.iq-exam-paper #exam-root h2{color:#2f3a45!important}
/* الهيدر: بنفسجي الريفرنس */
.iq-exhead{background:#6159ec!important;border:0!important;border-radius:6px!important}
.iq-exhead .iq-exhead-num{color:#ffffff!important}
.iq-exhead .iq-muted{color:#e3e1ff!important}
.iq-exhead .iq-progress{background:rgba(255,255,255,.28)!important}
.iq-exhead .iq-progress>div{background:#ffffff!important}
.iq-exhead .iq-qring .d-bg{stroke:rgba(255,255,255,.3)}
.iq-exhead .iq-qring .d-fg{stroke:#ffffff}
.iq-exhead .iq-qring .d-t{color:#fff}
.iq-exhead .iq-donut .d-bg{stroke:rgba(255,255,255,.3)}
.iq-exhead .iq-donut .d-fg{stroke:#fff}
.iq-exhead .iq-donut .d-t{color:#fff}
/* نص السؤال: رمادي داكن زي الريفرنس */
body.iq-exam-paper .iq-qtext{color:#3c4450!important;font-weight:600!important}
/* الاختيارات: شريط رمادي دافي + دايرة */
body.iq-exam-paper .iq-card.iv-white .iq-choices .iq-option,
body.iq-exam-paper #exam-root .iq-choices .iq-option{
  background:#f1f1ee!important;border:1px solid #e9e9e4!important;color:#3c4450!important;
  border-radius:6px!important;height:40px!important;font-size:.95rem!important;box-shadow:none!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option:hover{background:#e8eef4!important;border-color:#6159ec!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected{
  background:#e7e5fd!important;border-color:#6159ec!important;color:#2c258f!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected .iq-radio::after{background:#6159ec}
body.iq-exam-paper #exam-root .iq-choices .iq-option:hover .iq-radio,
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected .iq-radio{border-color:#6159ec}

/* ═══ وضع التعديل أبيض زي صفحة الطالب ═══ */
body.iq-exam-paper .exam-scroll{overflow-x:hidden!important}
body.iq-exam-paper #exam-root .iq-option{
  background:#f1f1ee!important;border:1px solid #e9e9e4!important;color:#3c4450!important;
  border-radius:6px!important;box-shadow:none!important}
body.iq-exam-paper #exam-root .iq-option:hover{background:#eceff4!important;border-color:#6159ec!important}
body.iq-exam-paper #exam-root .iq-option-key{
  background:#e7e5fd!important;border-color:#c9c4fb!important;color:#3b32c9!important;border-radius:50%!important}
body.iq-exam-paper #exam-root .iq-option[contenteditable="true"]:focus{
  background:#fff!important;border-color:#6159ec!important;outline:none!important}
body.iq-exam-paper .iq-exhead .iq-btn{background:rgba(255,255,255,.16)!important;border-color:rgba(255,255,255,.35)!important;color:#fff!important}
body.iq-exam-paper .iq-exhead .iq-btn.primary{background:#ffffff!important;color:#4038d6!important;border-color:#fff!important}
body.iq-exam-paper .iq-exhead .iq-muted,
body.iq-exam-paper .iq-exhead .iq-num{color:#fff!important}
/* شريط حجم الصورة */
body.iq-exam-paper #exam-root input[type="range"]{width:100%!important;max-width:100%!important;accent-color:#6159ec!important}
body.iq-exam-paper #exam-root input[type="text"]{
  background:#fff!important;border:1px solid #d6dfe9!important;color:#3c4450!important;border-radius:6px!important}
body.iq-exam-paper #exam-root .iq-label{color:#5d7290!important}

/* ═══ مطابقة الريفرنس: ألوان النصوص ═══ */
/* الشريط العلوي بقى أبيض بنص داكن (مش بنفسجي) */
body.iq-exam-paper .iq-exhead,
body.iq-exam-paper #exam-root .iq-exhead{
  background:#ffffff!important;border:0!important;border-bottom:1px solid #ececec!important;
  border-radius:0!important;box-shadow:none!important;padding-bottom:.75rem!important}
body.iq-exam-paper .iq-exhead .iq-exhead-num{color:#4a4a4a!important;font-size:1rem!important;font-weight:700!important}
body.iq-exam-paper .iq-exhead .iq-muted{color:#8a8a8a!important;font-weight:400!important}
body.iq-exam-paper .iq-exhead .iq-btn{
  background:#ffffff!important;border:1px solid #d9d9d9!important;color:#4a4a4a!important;font-weight:600!important}
body.iq-exam-paper .iq-exhead .iq-btn.primary{
  background:#ffffff!important;color:#4a4a4a!important;border:1px solid #d9d9d9!important}
body.iq-exam-paper .iq-exhead .iq-progress{background:#f0f0f0!important;height:5px!important}
body.iq-exam-paper .iq-exhead .iq-progress>div{background:#6159ec!important}
/* دايرة الوقت: رمادي فاتح + قوس بنفسجي */
body.iq-exam-paper .iq-exhead .iq-qring .d-bg,
body.iq-exam-paper #exam-root .iq-qring .d-bg{stroke:#e8e8e8!important}
body.iq-exam-paper .iq-exhead .iq-qring .d-fg,
body.iq-exam-paper #exam-root .iq-qring .d-fg{stroke:#6159ec!important}
body.iq-exam-paper .iq-exhead .iq-qring .d-t,
body.iq-exam-paper #exam-root .iq-qring .d-t{color:#4a4a4a!important;font-weight:600!important;font-size:.9rem!important}
.iq-tlabel{display:block;font-size:.62rem;color:#8a8a8a;margin-bottom:.15rem;text-align:center;font-weight:400}
/* نص السؤال: رمادي داكن زي الريفرنس */
body.iq-exam-paper #exam-root .iq-qtext,
body.iq-exam-paper #exam-root .iq-qhead div{color:#3f3f3f!important;font-weight:600!important;font-size:1.02rem!important;line-height:1.75!important}
/* الاختيارات: تفاصيل الريفرنس بالظبط */
body.iq-exam-paper #exam-root .iq-choices .iq-option{
  background:#f1f1ee!important;border:1px solid #e4e4df!important;color:#3f3f3f!important;
  border-radius:5px!important;height:38px!important;font-size:.95rem!important;font-weight:400!important;
  padding:0 1rem!important;box-shadow:none!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option:hover{
  background:#ececea!important;border-color:#cfcfc9!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected{
  background:#eeedfd!important;border-color:#6159ec!important;color:#332c8f!important}
/* الدايرة: إطار رمادي رفيع */
body.iq-exam-paper #exam-root .iq-radio{
  width:16px!important;height:16px!important;border:2px solid #9aa0a6!important;background:#fff!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option:hover .iq-radio{border-color:#6159ec!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected .iq-radio{border-color:#6159ec!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option.selected .iq-radio::after{background:#6159ec!important}
/* النصوص الإرشادية */
body.iq-exam-paper #exam-root .iq-muted{color:#8a8a8a!important}

/* ═══ الشارة الغامقة (وضع التعديل) ═══ */
body.iq-exam-paper .iq-badge-green{
  background:#0e2340!important;border:1px solid #1d3a5f!important;color:#ffffff!important;font-weight:700!important}
body.iq-exam-paper .iq-badge-green svg{stroke:#ffffff!important}
body.iq-exam-paper .iq-badge-navy{background:#0e2340!important;color:#cfe0f2!important}
/* الكارت الأبيض يفضل أبيض ومرفوع عن الخلفية الغامقة */
body.iq-exam-paper #exam-root{box-shadow:0 10px 34px rgba(0,0,0,.45)!important;border:0!important}

/* ═══ قاعدة التباين: نص غامق على الفاتح، فاتح على الغامق ═══ */
body.iq-exam-paper #exam-root{color:#3f3f3f!important}
body.iq-exam-paper #exam-root h1,
body.iq-exam-paper #exam-root h2,
body.iq-exam-paper #exam-root h3,
body.iq-exam-paper #exam-root .iq-page-title{color:#2b2b2b!important}
body.iq-exam-paper #exam-root p,
body.iq-exam-paper #exam-root li,
body.iq-exam-paper #exam-root .iq-muted,
body.iq-exam-paper #exam-root .iq-stat-label,
body.iq-exam-paper #exam-root small{color:#5d6470!important}
body.iq-exam-paper #exam-root b,
body.iq-exam-paper #exam-root strong{color:#222!important}
body.iq-exam-paper #exam-root .iq-stat-num{color:#2b2b2b!important}
/* الشارات — كل شارة بنص يناسب خلفيتها */
body.iq-exam-paper #exam-root .iq-badge{
  background:#dff3ef!important;color:#0b6b61!important;border:1px solid #bfe6df!important;font-weight:700!important}
body.iq-exam-paper #exam-root .iq-badge svg{stroke:#0b6b61!important}
body.iq-exam-paper #exam-root .iq-badge-amber{
  background:#fdf1d6!important;color:#8a5a06!important;border:1px solid #f2dfae!important}
body.iq-exam-paper #exam-root .iq-badge-amber svg{stroke:#8a5a06!important}
body.iq-exam-paper #exam-root .iq-badge-navy{
  background:#0b2444!important;color:#ffffff!important;border:1px solid #16365c!important}
body.iq-exam-paper #exam-root .iq-badge-navy svg{stroke:#ffffff!important}
body.iq-exam-paper #exam-root .iq-badge-green{
  background:#0e2340!important;color:#ffffff!important;border:1px solid #1d3a5f!important}
body.iq-exam-paper #exam-root .iq-badge-green svg{stroke:#ffffff!important}
/* الأزرار */
body.iq-exam-paper #exam-root .iq-btn{
  background:#f2f4f7!important;border:1px solid #d8dee7!important;color:#2f3437!important;
  font-weight:700!important;box-shadow:none!important}
body.iq-exam-paper #exam-root .iq-btn:hover{background:#e9edf3!important;border-color:#c3ccd8!important}
body.iq-exam-paper #exam-root .iq-btn svg{stroke:#2f3437!important}
body.iq-exam-paper #exam-root .iq-btn-primary,
body.iq-exam-paper #exam-root .iq-btn.primary{
  background:#0fb5a3!important;border:1px solid #0fb5a3!important;color:#ffffff!important;
  box-shadow:0 6px 16px rgba(15,181,163,.28)!important}
body.iq-exam-paper #exam-root .iq-btn-primary:hover,
body.iq-exam-paper #exam-root .iq-btn.primary:hover{background:#0da18f!important;border-color:#0da18f!important}
body.iq-exam-paper #exam-root .iq-btn-primary svg,
body.iq-exam-paper #exam-root .iq-btn.primary svg{stroke:#ffffff!important}
body.iq-exam-paper #exam-root .iq-btn-ghost{
  background:transparent!important;border:1px solid #d8dee7!important;color:#3f3f3f!important}
/* المدخلات */
body.iq-exam-paper #exam-root input,
body.iq-exam-paper #exam-root select,
body.iq-exam-paper #exam-root textarea{
  background:#fff!important;color:#2b2b2b!important;border:1px solid #d8dee7!important}

/* ═══ شارات شاشة البداية: أصغر وأنظف ═══ */
body.iq-exam-paper #exam-root .iq-badge{
  font-size:.76rem!important;font-weight:600!important;line-height:1.5!important;
  padding:.34rem .78rem!important;border-radius:999px!important;border:0!important;
  display:inline-flex!important;align-items:center!important;gap:.32rem!important;
  letter-spacing:0!important}
body.iq-exam-paper #exam-root .iq-badge svg{width:13px!important;height:13px!important}
body.iq-exam-paper #exam-root .iq-badge-navy{background:#0b2444!important;color:#ffffff!important}
body.iq-exam-paper #exam-root .iq-badge-amber{background:#fbf0d6!important;color:#7a5205!important}
body.iq-exam-paper #exam-root .iq-badge-amber svg{stroke:#7a5205!important}
body.iq-exam-paper #exam-root .iq-badge-green{background:#0e2340!important;color:#ffffff!important}
/* كارت البداية نفسه */
body.iq-exam-paper #exam-root .iq-card[style*="max-width:580px"]{
  padding:2rem 1.6rem 2.1rem!important;border-radius:14px!important;border:1px solid #ececec!important}

/* ═══ كارت بداية الامتحان (التصميم الجديد) ═══ */
body.iq-exam-paper #exam-root .intro-card{
  max-width:800px;margin:1.2rem auto 2rem;background:#fff;border:1px solid #e9ecef;border-radius:18px;
  padding:1.6rem 1.75rem 1.45rem;box-shadow:0 10px 30px rgba(6,20,40,.10)}
body.iq-exam-paper #exam-root .intro-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
body.iq-exam-paper #exam-root .intro-title{margin:0;font-size:1.5rem;font-weight:800;color:#14263c!important;line-height:1.45}
body.iq-exam-paper #exam-root .intro-sub{margin-top:.25rem;font-size:.86rem;color:#6b7787!important}
body.iq-exam-paper #exam-root .intro-badge{
  flex:0 0 auto;width:56px;height:56px;border-radius:15px;background:#d8f1ec;
  display:flex;align-items:center;justify-content:center}
body.iq-exam-paper #exam-root .intro-badge svg{stroke:#0f9187!important}
body.iq-exam-paper #exam-root .intro-sep{height:1px;background:#eef1f4;margin:1.05rem 0 1.15rem}
body.iq-exam-paper #exam-root .intro-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}
body.iq-exam-paper #exam-root .intro-stat{background:#f1f3f6;border-radius:12px;padding:1rem .5rem .85rem;text-align:center}
body.iq-exam-paper #exam-root .intro-stat-ico{line-height:0;margin-bottom:.4rem}
body.iq-exam-paper #exam-root .intro-stat-ico svg{stroke:#0f9187!important}
body.iq-exam-paper #exam-root .intro-stat-num{font-size:1.5rem;font-weight:800;color:#14263c!important;line-height:1.2}
body.iq-exam-paper #exam-root .intro-stat-lbl{font-size:.8rem;color:#6b7787!important;margin-top:.2rem}
body.iq-exam-paper #exam-root .intro-panel{background:#eaf6f3;border-radius:14px;padding:1rem 1.15rem;margin-top:.95rem}
body.iq-exam-paper #exam-root .intro-phead{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.5rem}
body.iq-exam-paper #exam-root .intro-ptitle{font-weight:800;font-size:1rem;color:#14263c!important}
body.iq-exam-paper #exam-root .intro-pill{
  background:#fff;color:#0f9187!important;border:1px solid #cfeee7;border-radius:999px;
  padding:.3rem .8rem;font-size:.78rem;font-weight:700;white-space:nowrap}
body.iq-exam-paper #exam-root .intro-lines{list-style:none;margin:0;padding:0}
body.iq-exam-paper #exam-root .intro-lines li{
  display:flex;align-items:flex-start;gap:.55rem;padding:.36rem 0;font-size:.9rem;color:#3f4b5a!important;line-height:1.7}
body.iq-exam-paper #exam-root .intro-tick{
  flex:0 0 auto;width:20px;height:20px;border-radius:50%;border:1.5px solid #17a99a;
  display:flex;align-items:center;justify-content:center;margin-top:.18rem}
body.iq-exam-paper #exam-root .intro-tick svg{stroke:#17a99a!important}
body.iq-exam-paper #exam-root .intro-best{
  display:block;width:fit-content;margin:1rem auto .85rem;background:#e9eafb;color:#33338a!important;
  border-radius:999px;padding:.4rem 1rem;font-size:.82rem;font-weight:700}
body.iq-exam-paper #exam-root .intro-start{
  width:100%;display:flex;align-items:center;justify-content:center;gap:.5rem;
  background:#0f9187;color:#fff!important;border:0;border-radius:12px;padding:.95rem;
  font-size:1.05rem;font-weight:800;cursor:pointer;box-shadow:0 10px 22px rgba(15,145,135,.22);font-family:inherit}
body.iq-exam-paper #exam-root .intro-start:hover{background:#0c7d74}
body.iq-exam-paper #exam-root .intro-start svg{stroke:#fff!important}
body.iq-exam-paper #exam-root .intro-foot{text-align:center;color:#8a94a3!important;font-size:.78rem;margin-top:.75rem}
@media (max-width:560px){
  body.iq-exam-paper #exam-root .intro-stats{grid-template-columns:1fr}
  body.iq-exam-paper #exam-root .intro-title{font-size:1.25rem}
  body.iq-exam-paper #exam-root .intro-card{padding:1.15rem}
}

/* ═══ الحاوية شفافة: الكروت البيضاء تطفو على الخلفية الغامقة ═══ */
body.iq-exam-paper #exam-root{
  background:transparent!important;border:0!important;box-shadow:none!important;
  max-width:1100px;margin:0 auto;padding:1rem 1rem 2rem}
body.iq-exam-paper .intro-head{align-items:center!important}

/* ═══ حشو 1 سم داخل كل الكروت + ألوان واضحة على الأبيض ═══ */
body.iq-exam-paper #exam-root .iq-card{padding:36px!important}
body.iq-exam-paper #exam-root .iq-exam-foot{padding-top:1rem!important;margin-top:.4rem!important}
body.iq-exam-paper #exam-root .iq-donut .d-bg{stroke:#e6e8ec!important}
body.iq-exam-paper #exam-root .iq-donut .d-fg{stroke:#6159ec!important}
body.iq-exam-paper #exam-root .iq-donut .d-t{color:#14263c!important;font-weight:700!important;font-size:.86rem!important}
body.iq-exam-paper #exam-root .iq-exhead .iq-muted,
body.iq-exam-paper #exam-root .iq-muted{color:#55606e!important;font-weight:500!important}
body.iq-exam-paper #exam-root .iq-pagebox{color:#14263c!important;font-weight:700!important}
body.iq-exam-paper #exam-root .iq-qdot{background:#e9ecf1!important;color:#4a5563!important;border:1px solid #d7dce4!important}
body.iq-exam-paper #exam-root .iq-qdot.on{background:#6159ec!important;color:#fff!important}
body.iq-exam-paper #exam-root .iq-qdot.done{background:#dff3ef!important;color:#0b6b61!important}
@media (max-width:560px){body.iq-exam-paper #exam-root .iq-card{padding:18px!important}}

/* ═══ المساحة مرنة بدل العرض الثابت 1060 ═══ */
body.iq-exam-paper #exam-root .iq-exam-canvas{width:100%!important;max-width:100%!important;box-sizing:border-box}
body.iq-exam-paper #exam-root .exam-scroll{overflow-x:hidden!important;overflow-y:visible!important;height:auto!important}
body.iq-exam-paper #exam-root .iq-qmedia img{width:100%!important;height:auto!important;display:block!important;object-fit:contain}

/* ═══ نصوص غامقة وحجم واضح على الأبيض ═══ */
body.iq-exam-paper #exam-root{color:#1f2a37!important}
body.iq-exam-paper #exam-root .intro-title{color:#101d2e!important;font-size:1.55rem!important;font-weight:800!important}
body.iq-exam-paper #exam-root .intro-sub{color:#33415a!important;font-size:.95rem!important;font-weight:500!important}
body.iq-exam-paper #exam-root .intro-stat-num{color:#101d2e!important;font-size:1.6rem!important;font-weight:800!important}
body.iq-exam-paper #exam-root .intro-stat-lbl{color:#33415a!important;font-size:.9rem!important;font-weight:600!important}
body.iq-exam-paper #exam-root .intro-ptitle{color:#101d2e!important;font-size:1.05rem!important}
body.iq-exam-paper #exam-root .intro-pill{color:#0b6b61!important;font-size:.82rem!important;font-weight:700!important}
body.iq-exam-paper #exam-root .intro-lines li{color:#26313f!important;font-size:.95rem!important;font-weight:500!important}
body.iq-exam-paper #exam-root .intro-best{color:#2a2a76!important;font-size:.88rem!important;font-weight:700!important}
body.iq-exam-paper #exam-root .intro-foot{color:#40506a!important;font-size:.86rem!important;font-weight:500!important}
body.iq-exam-paper #exam-root .iq-qtext{color:#1b2530!important;font-size:1.08rem!important;font-weight:700!important}
body.iq-exam-paper #exam-root .iq-choices .iq-option{color:#1b2530!important;font-size:1rem!important;font-weight:500!important}
body.iq-exam-paper #exam-root .iq-exhead-num{color:#12233b!important;font-size:1.05rem!important;font-weight:800!important}
body.iq-exam-paper #exam-root .iq-muted{color:#3d4a5a!important;font-size:.82rem!important;font-weight:500!important}
body.iq-exam-paper #exam-root .iq-label{color:#33415a!important;font-size:.85rem!important;font-weight:700!important}
body.iq-exam-paper #exam-root .iq-empty{color:#33415a!important;font-size:.95rem!important}
body.iq-exam-paper #exam-root .iq-btn{font-size:.92rem!important}
body.iq-exam-paper #exam-root input[type="text"],
body.iq-exam-paper #exam-root textarea{color:#101d2e!important;font-size:.95rem!important}

/* ═══ تكبير الجدول + ليبل الوقت واضح ═══ */
body.iq-exam-paper #exam-root .iq-tlabel{
  color:#33415a!important;font-size:.8rem!important;font-weight:700!important;margin-bottom:.25rem!important}
/* العرض ييجي من إعداد img_w لكل سؤال (السلايدر) */
body.iq-exam-paper #exam-root .iq-qmedia img{width:100%!important;height:auto!important}
body.iq-exam-paper #exam-root .iq-qside{flex:1 1 0!important;min-width:0!important}
@media (max-width:820px){
  body.iq-exam-paper #exam-root .iq-qmedia{flex:1 1 100%!important;max-width:100%!important}
}

/* ═══ نصوص العدّاد الجانبية واضحة ═══ */
body.iq-exam-paper #exam-root .iq-exhead .iq-muted,
body.iq-exam-paper #exam-root .iq-exhead span{color:#33415a!important;font-weight:600!important}
body.iq-exam-paper #exam-root .iq-exhead .iq-muted{font-size:.85rem!important}
body.iq-exam-paper #exam-root .iq-tlabel{color:#33415a!important;font-size:.82rem!important;font-weight:700!important}

/* ═══ توزيع الهيدر: يمين مُجاب · وسط الوقت الكلي · شمال رقم السؤال ═══ */
body.iq-exam-paper #exam-root .iq-head-grid{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.6rem}
body.iq-exam-paper #exam-root .iq-head-cell{min-width:0}
body.iq-exam-paper #exam-root .iq-head-right{text-align:right}
body.iq-exam-paper #exam-root .iq-head-left{text-align:left;display:flex;justify-content:flex-end}
body.iq-exam-paper #exam-root .iq-head-center{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem}
body.iq-exam-paper #exam-root .iq-head-center .iq-donut{width:56px;height:56px}
body.iq-exam-paper #exam-root .iq-head-center .iq-donut svg{width:56px;height:56px}
/* شريط مؤقّت السؤال داخل كارت السؤال (شمال) */
body.iq-exam-paper #exam-root .iq-qtimebar{
  display:flex;justify-content:flex-start;margin-bottom:.7rem}
body.iq-exam-paper #exam-root .iq-qringwrap{display:inline-flex;align-items:center;gap:.45rem}
body.iq-exam-paper #exam-root .iq-qringwrap .iq-tlabel{margin:0!important}
@media (max-width:560px){
  body.iq-exam-paper #exam-root .iq-head-grid{grid-template-columns:1fr 1fr;row-gap:.6rem}
  body.iq-exam-paper #exam-root .iq-head-center{order:-1;grid-column:1 / -1}
}

/* ═══ توحيد كل شاشات الامتحان على نفس الشكل ═══ */
/* أي لون فاتح مكتوب داخل العنصر يبقى غامق على الأبيض */
body.iq-exam-paper #exam-root [style*="color:#93a9c4"],
body.iq-exam-paper #exam-root [style*="color:#dae6f2"],
body.iq-exam-paper #exam-root [style*="color:#cbd5e1"],
body.iq-exam-paper #exam-root [style*="color:#b9cbe0"],
body.iq-exam-paper #exam-root [style*="color:#eef4fb"],
body.iq-exam-paper #exam-root [style*="color:#5eead4"]{color:#33415a!important}
/* إحصاءات شاشة المراجعة والنتيجة */
body.iq-exam-paper #exam-root .iq-stat{background:#f4f6f9!important;border:1px solid #e6ebf1!important;border-radius:12px!important}
body.iq-exam-paper #exam-root .iq-stat-num{color:#101d2e!important;font-weight:800!important}
body.iq-exam-paper #exam-root .iq-stat-label{color:#33415a!important;font-weight:600!important}
/* أرقام الخيارات في وضع التعديل */
body.iq-exam-paper #exam-root .iq-option-key{font-weight:800!important}
/* شريط التمرير داخل الكروت */
body.iq-exam-paper #exam-root .iq-card::-webkit-scrollbar{height:8px;width:8px}
body.iq-exam-paper #exam-root .iq-card::-webkit-scrollbar-thumb{background:#c9d3df;border-radius:8px}
/* أي كارت جوه الامتحان: نفس الحشو والحدود */
body.iq-exam-paper #exam-root .iq-card{border-radius:14px!important}
/* الأزرار الصغيرة (السابق/التالي) بنفس المقاس */
body.iq-exam-paper #exam-root .iq-btn{min-height:38px!important;border-radius:10px!important}
body.iq-exam-paper #exam-root .iq-btn-primary{background:#0fb5a3!important;border-color:#0fb5a3!important;color:#fff!important}
body.iq-exam-paper #exam-root .iq-btn-primary svg{stroke:#fff!important}

/* ═══ سؤال السحب والإفلات: إجابات خارج الجدول ═══ */
body.iq-exam-paper #exam-root .iq-dropwrap{width:100%}
body.iq-exam-paper #exam-root .iq-dropstage{position:relative;display:block;max-width:100%}
body.iq-exam-paper #exam-root .iq-dropstage img{
  display:block;width:100%;height:auto;border-radius:12px;border:1px solid #dbe2ec}
body.iq-exam-paper #exam-root .iq-dropslot{
  position:absolute;right:4%;top:30%;min-width:215px;min-height:64px;padding:.55rem .9rem;
  border:2px dashed #6159ec;border-radius:12px;background:#f4f2ff;box-shadow:0 2px 8px rgba(97,89,236,.12);
  display:flex;align-items:center;justify-content:center;cursor:pointer}
body.iq-exam-paper #exam-root .iq-dropslot.filled{
  border:2px solid #6159ec;background:#eef0ff;color:#332c8f;font-weight:800}
body.iq-exam-paper #exam-root .iq-drophint{color:#5b6486;font-size:.85rem;font-weight:600}
body.iq-exam-paper #exam-root .iq-chips{display:flex;flex-wrap:wrap;gap:.55rem;margin-top:1rem}
body.iq-exam-paper #exam-root .iq-chip{
  background:#f1f1ee;border:1px solid #d9d9d2;border-radius:999px;padding:.5rem 1.05rem;
  font-size:.95rem;font-weight:600;color:#1b2530;cursor:grab;font-family:inherit;
  box-shadow:0 1px 2px rgba(16,35,58,.06)}
body.iq-exam-paper #exam-root .iq-chip:hover{background:#e9e9e4;border-color:#bfbfb6}
body.iq-exam-paper #exam-root .iq-chip.armed{border-color:#6159ec;background:#e9e7fd;color:#332c8f}
body.iq-exam-paper #exam-root .iq-chip.used{opacity:.45;border-style:dashed}

body.iq-exam-paper #exam-root .iq-drophint{white-space:nowrap!important}
body.iq-exam-paper #exam-root .iq-dropslot span{font-size:.92rem!important;white-space:nowrap!important}

/* ═══ تمييز نص السؤال: بلوك واضح بحد بنفسجي ═══ */
body.iq-exam-paper #exam-root .iq-qhead{
  background:#f5f4ff!important;border:1px solid #ddd9fb!important;border-right:5px solid #6159ec!important;
  border-radius:12px!important;padding:.95rem 1.1rem!important;margin:0 0 1.1rem!important}
body.iq-exam-paper #exam-root .iq-qhead .iq-qtext{
  font-size:1.14rem!important;font-weight:800!important;color:#111d2f!important;line-height:1.8!important;margin:0!important}
body.iq-exam-paper #exam-root .iq-qhead::before{
  content:"السؤال";display:inline-block;background:#6159ec;color:#fff;font-size:.7rem;font-weight:800;
  border-radius:6px;padding:.12rem .5rem;margin-bottom:.45rem}

body.iq-exam-paper #exam-root .iq-drophint{color:#4b3fc4!important;font-weight:700!important}

/* ═══ صندوق رفع الصورة ═══ */
body.iq-exam-paper #exam-root .iq-uploadbox{display:block}
body.iq-exam-paper #exam-root .iq-uploadbtn{
  display:inline-flex;align-items:center;gap:.45rem;cursor:pointer;
  background:#f5f4ff;border:1.5px dashed #a9a2f2;color:#4b3fc4;font-weight:700;
  border-radius:10px;padding:.55rem .95rem;font-size:.88rem}
body.iq-exam-paper #exam-root .iq-uploadbtn:hover{background:#ecebfe;border-color:#6159ec}
body.iq-exam-paper #exam-root .iq-uploadbtn svg{stroke:#4b3fc4!important}
body.iq-exam-paper #exam-root .iq-uploadbtn input[type="file"]{
  position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
#ed-upstatus{color:#4b5563!important}

/* ═══ شريط أدوات التنسيق (وورد مصغّر) ═══ */
body.iq-exam-paper #exam-root .iq-toolbar{
  display:flex;align-items:center;gap:.3rem;flex-wrap:wrap;
  background:#ffffff;border:1px solid #e6ebf1;border-radius:12px;
  padding:.45rem .6rem;margin-bottom:1rem;box-shadow:0 2px 8px rgba(16,35,58,.06)}
body.iq-exam-paper #exam-root .iq-toolbar .tb-lbl{
  font-size:.74rem;color:#5b6a80;font-weight:700;margin:0 .15rem}
body.iq-exam-paper #exam-root .iq-toolbar .tb{
  min-width:32px;height:30px;border:1px solid #dfe5ee;background:#f8fafc;border-radius:8px;
  font-size:.82rem;font-weight:700;color:#1b2530;cursor:pointer;display:inline-flex;
  align-items:center;justify-content:center;padding:0 .4rem;font-family:inherit}
body.iq-exam-paper #exam-root .iq-toolbar .tb:hover{background:#eef2f8;border-color:#c3ccd8}
body.iq-exam-paper #exam-root .iq-toolbar .tb:active{background:#e4ecf7}
body.iq-exam-paper #exam-root .iq-toolbar .tb-sw{
  width:22px;height:22px;border-radius:6px;border:2px solid #fff;cursor:pointer;
  box-shadow:0 0 0 1px #d5dce6;margin:0 .1rem}
body.iq-exam-paper #exam-root .iq-toolbar .tb-sw:hover{transform:scale(1.12)}
body.iq-exam-paper #exam-root .iq-toolbar .tb-sep{
  width:1px;height:22px;background:#e3e8f0;margin:0 .35rem}

/* ═══ شريط وضع المعاينة ═══ */
body.iq-exam-paper #exam-root .iq-previewbar{
  display:flex;align-items:center;justify-content:space-between;gap:.7rem;flex-wrap:wrap;
  background:#fff8e6;border:1px solid #f3e0a8;border-radius:12px;padding:.55rem .85rem;margin-bottom:1rem;
  color:#7a5205;font-weight:700;font-size:.9rem}
body.iq-exam-paper #exam-root .iq-previewbar svg{stroke:#7a5205!important;vertical-align:-2px}

/* ═══ كارت التوقيت في صفحة التعديل ═══ */
body.iq-exam-paper #exam-root .iq-timecard{
  display:flex;align-items:flex-end;gap:.9rem;flex-wrap:wrap;
  background:#ffffff;border:1px solid #e6ebf1;border-radius:12px;padding:.7rem .9rem;margin-bottom:1rem;
  box-shadow:0 2px 8px rgba(16,35,58,.06)}
body.iq-exam-paper #exam-root .iq-timecard .tgrp{display:flex;flex-direction:column;gap:.25rem;min-width:150px}
body.iq-exam-paper #exam-root .iq-timecard .tgrp label{
  font-size:.76rem;font-weight:700;color:#5b6a80}
body.iq-exam-paper #exam-root .iq-timecard input,
body.iq-exam-paper #exam-root .iq-timecard select{
  height:36px;border:1px solid #d8dee7;border-radius:9px;padding:0 .6rem;font-size:.92rem;
  color:#111d2f!important;background:#fff!important;font-family:inherit;min-width:110px}
body.iq-exam-paper #exam-root .iq-timecard input:focus,
body.iq-exam-paper #exam-root .iq-timecard select:focus{outline:2px solid #c9c4fb;border-color:#6159ec}
body.iq-exam-paper #exam-root .iq-timecard .tnote{
  font-size:.74rem;color:#7a8797;margin-inline-start:auto;font-weight:600}
