/* قشرة التصميم الجديد للصفحات الداخلية (الحساب، عرض السؤال، المراجعة، القدرات).
   تعيد تعريف ألوان tokens.css بقيم النموذج المعتمد (index.html) وتصيّر المكوّنات القديمة بنفس الشكل. فاتح فقط. */
:root[data-theme="light"], :root {
  color-scheme: light;
}
html[data-skin] {
  --bg: #f8f7fb;
  --surface: #ffffff;
  --surface-2: #f2f0f6;
  --text: #252536;
  --text-2: #787687;
  --border: #e9e6ef;
  --brand: #6550d8;
  --brand-ink: #ffffff;
  --brand-soft: #efebfc;
  --ok: #25886e;
  --ok-soft: #edf7f2;
  --bad: #b8693f;
  --bad-soft: #fdf4ef;
  --shadow: none;
  --radius-s: 11px;
  --radius-m: 17px;
  --radius-l: 24px;
  --font: Th, "Thmanyah Sans", Arial, sans-serif;
}
@font-face { font-family: Th; src: url("/misbah-dashboard/thmanyahsans-Regular.woff2"); }
@font-face { font-family: Th; src: url("/misbah-dashboard/thmanyahsans-Bold.woff2"); font-weight: 700; }

body.space-skin { background: var(--bg); color: var(--text); font-family: var(--font); }

/* ترويسة النموذج */
.space-header { height: 88px; border-bottom: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; gap: 25px; }
.space-header .brand { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 700; text-decoration: none; color: var(--text); }
.space-header .brand small { display: block; font-size: 11px; font-weight: 400; color: var(--text-2); }
.space-header .brand img { width: 45px; height: 53px; }
.space-header__links { display: flex; gap: 18px; align-items: center; }
.space-header__links a { color: var(--brand); font-size: 13px; text-decoration: none; padding: 6px; }
@media (max-width: 760px) { .space-header { height: 72px; padding: 0 18px; } .space-header .brand { font-size: 23px; } .space-header .brand small { display: none; } }

/* الحاوية والعناوين */
body.space-skin .wrap { max-width: 900px; padding-top: 28px; }
body.space-skin .student-page__nav { border-bottom: 0; padding-bottom: 0; }
body.space-skin .student-eyebrow { color: var(--brand); font-size: 12px; font-weight: 700; }
body.space-skin .train-title { font-size: 30px; font-weight: 700; }
body.space-skin .back { color: var(--brand); font-size: 13px; font-weight: 400; }

/* البطاقات والأزرار */
body.space-skin .card { border-radius: 17px; box-shadow: none; padding: 21px; }
body.space-skin .btn { border-radius: 11px; min-height: 48px; border-width: 1px; font-weight: 700; }
body.space-skin .btn:hover:not(:disabled) { background: #5540c4; }
body.space-skin .btn--ghost { background: #fff; color: var(--text); border-color: var(--border); }
body.space-skin .btn--ghost:hover:not(:disabled) { background: #faf8ff; border-color: var(--brand); }
body.space-skin .chip { background: var(--brand-soft); color: var(--brand); font-size: 11px; padding: 6px 12px; }
body.space-skin .input, body.space-skin .card select, body.space-skin input[type="text"], body.space-skin input[type="email"] { border: 1px solid var(--border); border-radius: 11px; background: #fff; }
body.space-skin .bar { height: 5px; background: #efedf4; }

/* شاشة السؤال (نفس .qcard و.option في النموذج) */
body.space-skin .qtop { border-radius: 14px; }
body.space-skin .student-page .qcard, body.space-skin .qcard { padding: 32px; border-radius: 17px; }
body.space-skin .qtitle, body.space-skin .qtext { font-size: 25px; line-height: 1.8; font-weight: 700; }
body.space-skin .opt { border: 1.5px solid var(--border); border-radius: 12px; background: #fff; padding: 16px; }
body.space-skin .opt:hover:not(:disabled) { border-color: var(--brand); }
body.space-skin .opt__key { border-radius: 8px; width: 28px; height: 28px; background: #f5f3f9; color: var(--text); font-size: 12px; }
body.space-skin .opt--picked { border-color: var(--brand); background: #f7f4ff; }
body.space-skin .opt--picked .opt__key { background: var(--brand); color: #fff; }
body.space-skin .opt--correct { border-color: var(--ok); background: #edf7f2; }
body.space-skin .opt--wrong { border-color: #ca8c74; background: #fdf4ef; }
body.space-skin .opt--wrong .opt__key { background: #ca8c74; }
body.space-skin .feedback { background: #eef7f2; border-radius: 13px; }
body.space-skin .hint-btn, body.space-skin .question-hint { background: #fbf6e8; color: var(--text); border-radius: 12px; border-color: transparent; }
body.space-skin .result { border-radius: 24px; background: #fff; }
body.space-skin .review__start { background: #eee9fc; border: 1px solid #e1d9fa; border-radius: 24px; }
body.space-skin footer, body.space-skin .muted.small { color: #9993a6; }
