/* ============================================================
   أكاديمية منهال — هوية كحلية راقية بلمسات ذهبية
   نظام تصميم: كحلي عميق + ذهبي ناعم + زجاجية (glassmorphism)
   وضعان (فاتح/ليلي)
   ============================================================ */

:root {
    --primary: #16345F;          /* كحلي عميق — الهوية الأساسية */
    --primary-dark: #0F2544;
    --primary-light: #2A557F;
    --navy-950: #091428;         /* أعمق كحلي — أساس الهيرو */
    --gold: #C6A15B;             /* ذهبي ناعم — لمسة راقية */
    --gold-light: #E0C588;
    --gold-deep: #9C7C3C;
    --accent-soft: #EAF0F9;
    --bg: #F3F6FB;
    --surface: #FFFFFF;
    --surface-2: #ECF1F8;
    --text: #0F1E33;
    --text-2: #5B6987;
    --border: #E1E7F2;
    --success: #1E9E6A;
    --success-bg: #E6F5EE;
    --danger: #D14848;
    --danger-bg: #FBEAEA;
    --warning: #B58729;
    --warning-bg: #FAF2DC;
    --info-bg: #EAF0F9;
    --shadow: 0 4px 20px rgba(15, 37, 68, .06);
    --shadow-lg: 0 24px 60px rgba(9, 20, 40, .16);
    --shadow-gold: 0 8px 24px rgba(198, 161, 91, .28);
    --r-lg: 18px;
    --r-md: 13px;
    --r-sm: 9px;
    --tr: .24s cubic-bezier(.4, .12, .2, 1);
    --header-fg: #0F1E33;
    /* الزجاجية */
    --glass-bg: rgba(255, 255, 255, .72);
    --glass-brd: rgba(255, 255, 255, .65);
    --glass-blur: blur(16px) saturate(150%);
    /* ألوان بطاقات المجالات — كحلية/ذهبية هادئة */
    --tile-1: #EAF0F9; --tile-1i: #16345F;
    --tile-2: #F5EEDD; --tile-2i: #A5813F;
    --tile-3: #E7EEF7; --tile-3i: #2A557F;
    --tile-4: #F3EEE3; --tile-4i: #9C7C3C;
    --tile-5: #EDEFF6; --tile-5i: #3C4E74;
}

[data-theme="dark"] {
    --primary: #6E9BD6;
    --primary-dark: #0A1628;
    --primary-light: #8FB4E4;
    --navy-950: #05070E;
    --gold: #D9BC7E;
    --gold-light: #ECD59B;
    --gold-deep: #B9995A;
    --accent-soft: #15243D;
    --bg: #0A1120;
    --surface: #101D33;
    --surface-2: #16263F;
    --text: #E7EDF6;
    --text-2: #93A2BD;
    --border: #26374F;
    --success: #4FC59A;
    --success-bg: #123024;
    --danger: #E88787;
    --danger-bg: #3A1F1F;
    --warning: #E0B45E;
    --warning-bg: #33290F;
    --info-bg: #15243D;
    --shadow: 0 4px 20px rgba(0, 0, 0, .38);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
    --shadow-gold: 0 8px 24px rgba(217, 188, 126, .22);
    --header-fg: #E7EDF6;
    --glass-bg: rgba(16, 29, 51, .68);
    --glass-brd: rgba(255, 255, 255, .10);
    --glass-blur: blur(16px) saturate(140%);
    --tile-1: #15243D; --tile-1i: #8FB4E4;
    --tile-2: #2E2612; --tile-2i: #E0C588;
    --tile-3: #16283F; --tile-3i: #7FA8DC;
    --tile-4: #2B2513; --tile-4i: #D9BC7E;
    --tile-5: #1B2740; --tile-5i: #A9B8D6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
}

img, svg { vertical-align: middle; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; }

main.container { flex: 1; padding-top: 26px; padding-bottom: 48px; outline: none; }

/* ====== إمكانية الوصول ====== */
.skip-link {
    position: absolute; top: -48px; right: 16px;
    background: var(--gold); color: #1A2B3E; padding: 8px 18px;
    border-radius: var(--r-sm); z-index: 300; transition: top var(--tr);
    text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 10px; }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ====== الهيدر ====== */
.header {
    background: var(--surface);
    color: var(--header-fg);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 0 var(--border), var(--shadow);
}
[data-theme="dark"] .header { background: var(--surface); }

.header-inner {
    display: flex; align-items: center; gap: 18px;
    padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--header-fg); order: 0; margin-inline-end: 12px; }
.brand-logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.brand-logo { height: 46px; width: auto; max-width: 170px; object-fit: contain; display: block; }
[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); }
.brand-tagline { font-weight: 600; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.brand-fallback { display: flex; align-items: center; gap: 10px; }
.brand-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: 0 0 auto; }
.brand-icon svg { width: 24px; height: 24px; color: var(--primary); }
.brand-text { font-weight: 700; font-size: 18px; line-height: 1.25; display: flex; flex-direction: column; text-align: start; }
.brand-text small { font-weight: 600; font-size: 12px; color: var(--text-2); }

.search { flex: 1 1 200px; max-width: 300px; order: 1; }
.search input {
    width: 100%; padding: 10px 18px; border-radius: 50px;
    border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font-size: 14px; transition: var(--tr);
}
.search input::placeholder { color: var(--text-2); }
.search input:focus { background: var(--surface); border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; order: 2; margin-inline-start: auto; }
.nav a {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-2); text-decoration: none;
    font-size: 15px; font-weight: 700; padding: 8px 14px; border-radius: 50px;
    transition: var(--tr);
}
.nav a svg { width: 16px; height: 16px; }
.nav a:hover { background: var(--accent-soft); color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); }
.nav a[aria-current="page"]::after {
    content: ''; position: absolute; bottom: -14px; inset-inline: 14px; height: 3px;
    background: var(--primary); border-radius: 3px;
}

.header-actions { display: flex; align-items: center; gap: 8px; order: 3; }

.icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); cursor: pointer; display: grid; place-items: center;
    transition: var(--tr);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--accent-soft); color: var(--primary); border-color: var(--primary); }

/* قائمة المستخدم */
.user-menu { position: relative; }
.user-menu > button {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
    color: var(--header-fg); border-radius: 50px; padding: 5px 14px 5px 6px;
    cursor: pointer; font-size: 14px; font-weight: 700; transition: var(--tr);
}
.user-menu > button:hover { background: rgba(255,255,255,.2); }
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--gold); color: #1A2B3E; font-weight: 700; font-size: 14px;
    display: grid; place-items: center; flex: 0 0 auto;
}
.dropdown {
    position: absolute; top: calc(100% + 10px); inset-inline-start: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-lg); min-width: 240px; padding: 8px;
    display: none; z-index: 150;
}
.dropdown.open { display: block; animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown .dd-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown .dd-head strong { display: block; font-size: 15px; }
.dropdown .dd-head span { font-size: 13px; color: var(--text-2); display: block; }
.dropdown .dd-role {
    display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700;
    background: var(--info-bg); color: var(--primary); padding: 2px 10px; border-radius: 50px;
}
.dropdown a, .dropdown button.dd-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
    color: var(--text); text-decoration: none; background: none; border: none;
    cursor: pointer; text-align: start; transition: var(--tr);
}
.dropdown a:hover, .dropdown button.dd-item:hover { background: var(--surface-2); }
.dropdown svg { width: 16px; height: 16px; color: var(--text-2); }
.dropdown .danger { color: var(--danger); }
.dropdown .danger svg { color: var(--danger); }

/* ====== الأزرار ====== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 20px; border-radius: 50px; font-size: 14px; font-weight: 700;
    border: 1px solid transparent; cursor: pointer; transition: var(--tr);
    text-decoration: none; line-height: 1.5;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
[data-theme="dark"] .btn-primary { background: #2B5C8A; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-gold { background: linear-gradient(135deg, #C5A35A, #D4B87A); color: #1A2B3E; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ====== البطاقات والشبكات ====== */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h2 svg { width: 22px; height: 22px; color: var(--gold); }
.section-head .hint { font-size: 13px; color: var(--text-2); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 16px; text-align: center;
    transition: var(--tr);
}
.stat-card svg { width: 22px; height: 22px; color: var(--gold); margin-bottom: 6px; }
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--primary); }
.stat-card .lbl { font-size: 13px; color: var(--text-2); font-weight: 600; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 18px; }
.tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 18px; border-radius: 50px; font-size: 14px; font-weight: 700;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
    cursor: pointer; transition: var(--tr);
}
.tab svg { width: 15px; height: 15px; }
.tab .count { background: var(--surface-2); border-radius: 50px; padding: 0 9px; font-size: 12px; }
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab[aria-selected="true"] .count { background: rgba(255,255,255,.2); color: #fff; }
[data-theme="dark"] .tab[aria-selected="true"] { background: #2B5C8A; border-color: #2B5C8A; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

.course-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
    transition: transform var(--tr), box-shadow var(--tr);
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-cover { position: relative; aspect-ratio: 2 / 1; background: var(--surface-2); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 50px;
}
.badge svg { width: 12px; height: 12px; }
.badge.approved { background: var(--success-bg); color: var(--success); }
.badge.pending { background: var(--warning-bg); color: var(--warning); }
.badge.rejected { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--primary); }
.course-cover .badge { position: absolute; top: 10px; inset-inline-start: 10px; }
/* النشر باسم المادة: شريط المادة على غلاف البطاقة */
.subject-ribbon {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: color-mix(in srgb, var(--primary) 88%, #000);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.card-kicker {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: .2px;
    margin-bottom: 4px;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    background: var(--accent-soft, var(--surface-2));
    border-radius: 40px;
    padding: 5px 14px;
    margin-bottom: 10px;
}
.price-tag {
    position: absolute; bottom: 10px; inset-inline-end: 10px;
    background: rgba(18,42,68,.85); color: var(--gold-light);
    font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 50px;
}
.course-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.course-body h3 a { color: var(--text); text-decoration: none; }
.course-body h3 a:hover { color: var(--primary); }
.course-desc { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--text-2); flex-wrap: wrap; }
.course-meta span { display: inline-flex; align-items: center; gap: 4px; }
.course-meta svg { width: 13px; height: 13px; }
.stars { color: var(--gold); letter-spacing: 1px; font-size: 14px; }
.progress { height: 7px; background: var(--surface-2); border-radius: 50px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 50px; transition: width .4s ease; }
.progress-lbl { font-size: 12px; color: var(--text-2); font-weight: 600; }
.course-foot { margin-top: auto; display: flex; gap: 8px; padding-top: 6px; }
.course-foot .btn { flex: 1; }

.empty {
    background: var(--surface); border: 1px dashed var(--border);
    border-radius: var(--r-lg); padding: 44px 20px; text-align: center; color: var(--text-2);
}
.empty svg { width: 40px; height: 40px; color: var(--border); margin-bottom: 10px; }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 14px; }

/* ====== صفحة الدورة ====== */
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.back-link:hover { color: var(--primary); }
.back-link svg { width: 16px; height: 16px; }

.course-hero {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 22px; display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start;
}
.course-hero .cover { border-radius: var(--r-md); overflow: hidden; }
.course-hero .cover img { width: 100%; display: block; }
.course-hero h1 { font-size: 24px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.course-hero p { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-top: 20px; }
.panel > h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel > h2 svg { width: 18px; height: 18px; color: var(--gold); }

.lesson {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px;
    transition: var(--tr); background: var(--surface);
}
.lesson:hover { border-color: var(--primary); }
.lesson.watched { background: var(--success-bg); border-color: transparent; }
.lesson .l-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: 0 0 auto; }
.lesson.watched .l-icon { background: var(--success); color: #fff; }
.lesson .l-icon svg { width: 16px; height: 16px; }
.lesson .l-body { flex: 1; min-width: 0; }
.lesson .l-title { font-size: 13.5px; font-weight: 700; }
.lesson .l-sub { font-size: 11.5px; color: var(--text-2); display: flex; gap: 10px; align-items: center; }

.quiz-q { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; margin-bottom: 14px; }
.quiz-q h4 { font-size: 15px; margin-bottom: 10px; }
.quiz-opt {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    border: 1px solid var(--border); border-radius: var(--r-sm); margin-bottom: 8px;
    cursor: pointer; font-size: 14px; transition: var(--tr);
}
.quiz-opt:hover { border-color: var(--primary); }
.quiz-opt input { accent-color: var(--primary); }
.quiz-opt.correct { border-color: var(--success); background: var(--success-bg); }
.quiz-opt.wrong { border-color: var(--danger); background: var(--danger-bg); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; margin: 12px 0; }
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.warning { background: var(--warning-bg); color: var(--warning); }
.alert.info { background: var(--info-bg); color: var(--primary); }
.alert.danger { background: var(--danger-bg); color: var(--danger); }

/* ====== الجداول ====== */
.avatar.sm {
    width: 22px; height: 22px;
    font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    vertical-align: middle;
    margin-inline-end: 6px;
}
.private-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
    border-radius: 40px; padding: 3px 10px;
    margin-bottom: 6px;
}
.private-tag.lg { font-size: 12.5px; padding: 5px 14px; margin-bottom: 10px; }
.pledge-box {
    max-height: 46vh; overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 14px; line-height: 2;
    margin-bottom: 14px;
}
.pledge-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; font-weight: 700;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px;
    cursor: pointer;
}
.pledge-check input { margin-top: 3px; }
.table-wrap { overflow-x: auto; }
/* صف ملتحق يحتاج تدخلاً (متوقف / متعثر في الاختبار) */
.data tr.row-warn td { background: color-mix(in srgb, var(--danger) 7%, transparent); }
.data tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 11px 12px; text-align: start; border-bottom: 1px solid var(--border); }
table.data th { color: var(--text-2); font-size: 13px; font-weight: 700; white-space: nowrap; }
table.data td .btn { margin-inline-end: 6px; }
table.data select {
    padding: 5px 10px; border-radius: var(--r-sm); border: 1px solid var(--border);
    background: var(--surface); font-size: 13px;
}

/* ====== النقاشات ====== */
.discussion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; }
.discussion .d-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.discussion .d-head .avatar { background: var(--primary); color: #fff; }
[data-theme="dark"] .discussion .d-head .avatar { background: #2B5C8A; }
.discussion .d-meta { font-size: 11.5px; color: var(--text-2); }
.discussion h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.discussion .d-body { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; white-space: pre-wrap; }
.tag { display: inline-block; font-size: 12px; background: var(--surface-2); color: var(--text-2); padding: 2px 11px; border-radius: 50px; margin-inline-end: 6px; }
.d-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.chip-btn {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
    padding: 5px 14px; border-radius: 50px; border: 1px solid var(--border);
    background: none; color: var(--text-2); cursor: pointer; transition: var(--tr);
}
.chip-btn svg { width: 14px; height: 14px; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.chip-btn.active { background: var(--info-bg); border-color: var(--primary); color: var(--primary); }
.chip-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.replies { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; display: grid; gap: 10px; }
.reply { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; }
.reply .r-meta { font-size: 12px; color: var(--text-2); margin-bottom: 2px; font-weight: 700; }

/* ====== النماذج ====== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.form-group .req { color: var(--danger); }
.form-control {
    width: 100%; padding: 10px 14px; border-radius: var(--r-md);
    border: 1.5px solid var(--border); background: var(--surface); font-size: 13.5px;
    transition: var(--tr);
}
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(43,92,138,.15); }
textarea.form-control { min-height: 96px; resize: vertical; }
.form-hint { font-size: 11.5px; color: var(--text-2); margin-top: 4px; }
.form-error { font-size: 12.5px; color: var(--danger); background: var(--danger-bg); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 12px; display: none; }
.form-error.show { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.keep2 { grid-template-columns: 1fr 1fr; }

/* ====== النوافذ الحوارية ====== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(10, 20, 32, .62);
    backdrop-filter: blur(3px); z-index: 200;
    display: grid; place-items: center; padding: 20px;
    animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
    background: var(--surface); border-radius: var(--r-lg);
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    padding: 26px; position: relative; box-shadow: var(--shadow-lg);
    animation: slideUp .22s ease;
}
.modal.wide { max-width: 660px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } }
.modal .modal-close {
    position: absolute; top: 14px; inset-inline-start: 14px;
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: var(--surface-2); color: var(--text-2); cursor: pointer;
    display: grid; place-items: center;
}
.modal .modal-close svg { width: 15px; height: 15px; }
.modal .modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal h2 { font-size: 19px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; }
.modal h2 svg { width: 20px; height: 20px; color: var(--gold); }
.modal .modal-sub { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

.demo-accounts { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 12px; }
.demo-accounts p { font-size: 11.5px; color: var(--text-2); margin-bottom: 8px; }
.demo-accounts .chips { display: flex; gap: 6px; flex-wrap: wrap; }

.switch-auth { text-align: center; margin-top: 14px; font-size: 14px; color: var(--text-2); }
.switch-auth button { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 14px; }
.switch-auth button:hover { text-decoration: underline; }

/* ====== التنبيهات المنبثقة ====== */
.toast-root { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 300; display: grid; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-inline-start: 4px solid var(--primary);
    border-radius: var(--r-md); padding: 12px 18px; font-size: 14px; font-weight: 600;
    box-shadow: var(--shadow-lg); max-width: 340px;
    animation: toastIn .25s ease;
}
.toast svg { width: 17px; height: 17px; flex: 0 0 auto; }
.toast.success { border-inline-start-color: var(--success); }
.toast.success svg { color: var(--success); }
.toast.error { border-inline-start-color: var(--danger); }
.toast.error svg { color: var(--danger); }
.toast.warning { border-inline-start-color: var(--warning); }
.toast.warning svg { color: var(--warning); }
.toast.info svg { color: var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .3s ease; }

/* ====== الشهادة ====== */
.certificate {
    background: var(--surface);
    border: 3px solid var(--gold);
    border-radius: var(--r-md);
    padding: 34px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.certificate::before {
    content: ''; position: absolute; inset: 8px;
    border: 1px solid var(--gold-light); border-radius: 8px; pointer-events: none;
}
.certificate .c-org { font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: .5px; }
.certificate .c-title { font-size: 26px; font-weight: 700; color: var(--primary); margin: 6px 0 2px; }
.certificate .c-line { width: 70px; height: 3px; background: var(--gold); margin: 10px auto 16px; border-radius: 3px; }
.certificate .c-name { font-size: 23px; font-weight: 700; margin: 6px 0; }
.certificate .c-course { font-size: 16px; color: var(--primary); font-weight: 700; margin-bottom: 14px; }
.certificate .c-meta { font-size: 12px; color: var(--text-2); display: grid; gap: 3px; margin-top: 14px; direction: ltr; }
.certificate .c-meta bdi { direction: rtl; }
.certificate .c-seal {
    width: 62px; height: 62px; margin: 12px auto 0; border-radius: 50%;
    border: 2px solid var(--gold); display: grid; place-items: center; color: var(--gold);
}
.certificate .c-seal svg { width: 30px; height: 30px; }

.cert-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.cert-card .c-icon { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--warning-bg); color: var(--gold); display: grid; place-items: center; flex: 0 0 auto; }
.cert-card .c-icon svg { width: 22px; height: 22px; }
.cert-card .c-info { flex: 1; min-width: 180px; }
.cert-card .c-info h3 { font-size: 14.5px; }
.cert-card .c-info p { font-size: 11.5px; color: var(--text-2); }
.cert-card .c-serial { font-family: monospace; font-size: 12px; background: var(--surface-2); padding: 2px 8px; border-radius: 4px; direction: ltr; display: inline-block; }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { position: fixed; inset: 0; display: grid; place-items: center; padding: 30px; background: #fff; }
    .modal-overlay { background: none; backdrop-filter: none; }
    .no-print { display: none !important; }
}

/* ====== لوحات الإدارة ====== */
.action-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.action-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 18px; cursor: pointer; text-align: start; transition: var(--tr); font-family: inherit;
}
.action-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.action-card svg { width: 24px; height: 24px; color: var(--gold); margin-bottom: 8px; }
.action-card .t { font-size: 15px; font-weight: 700; color: var(--text); }
.action-card .d { font-size: 13px; color: var(--text-2); }

.list-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; flex-wrap: wrap;
    background: var(--surface);
}
.list-row .lr-body { flex: 1; min-width: 200px; }
.list-row .lr-title { font-size: 13.5px; font-weight: 700; }
.list-row .lr-sub { font-size: 11.5px; color: var(--text-2); }
.list-row .lr-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ====== الاستجابة ====== */
@media (max-width: 900px) {
    .course-hero { grid-template-columns: 1fr; }
    .search { order: 3; max-width: none; flex-basis: 100%; }
}
@media (max-width: 640px) {
    .header-inner { gap: 10px; }
    .brand-text small { display: none; }
    .nav a span { display: none; }
    .nav a { padding: 8px 10px; }
    .nav a svg { width: 18px; height: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .modal { padding: 20px; }
}

/* ====== البانر الرئيسي (Hero) ====== */
.hero {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1A3A5C 60%, #2B5C8A 100%);
    border-radius: var(--r-lg); padding: 44px 38px; color: #fff;
    position: relative; overflow: hidden; margin-bottom: 26px;
}
.hero::before, .hero::after {
    content: ''; position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(197,163,90,.22), transparent 65%);
}
.hero::before { width: 380px; height: 380px; top: -140px; inset-inline-end: -80px; }
.hero::after  { width: 260px; height: 260px; bottom: -120px; inset-inline-start: -60px; }
.hero-body { position: relative; z-index: 1; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--gold-light);
    background: rgba(197,163,90,.14); border: 1px solid rgba(197,163,90,.35);
    padding: 5px 14px; border-radius: 50px; margin-bottom: 14px;
}
.hero-kicker svg { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(26px, 4vw, 39px); font-weight: 700; line-height: 1.5; margin-bottom: 10px; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero p { font-size: 14.5px; color: rgba(255,255,255,.82); max-width: 480px; margin-bottom: 20px; }
.hero .hero-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.hero .hero-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.hero-art { position: relative; z-index: 1; min-height: 190px; display: none; }
@media (min-width: 900px) { .hero-art { display: block; } }
.hero-card {
    position: absolute; display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; font-size: 14px; font-weight: 700;
    padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
    animation: float 5s ease-in-out infinite;
}
.hero-card svg { width: 17px; height: 17px; color: var(--gold-light); }
.hero-card.f1 { top: 4%;  inset-inline-end: 6%; }
.hero-card.f2 { top: 42%; inset-inline-start: 2%; animation-delay: 1.2s; }
.hero-card.f3 { bottom: 2%; inset-inline-end: 18%; animation-delay: 2.4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ====== اقتراحات البحث الفوري ====== */
.search { position: relative; }
.suggest {
    position: absolute; top: calc(100% + 8px); inset-inline: 0;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-lg); overflow: hidden; z-index: 160; display: none;
}
.suggest.open { display: block; animation: pop .16s ease; }
.suggest .s-item {
    display: flex; gap: 10px; align-items: center; padding: 10px 14px;
    text-decoration: none; color: var(--text); transition: var(--tr);
}
.suggest .s-item:hover { background: var(--surface-2); }
.suggest .s-item svg { width: 16px; height: 16px; color: var(--gold); flex: 0 0 auto; }
.suggest .s-body { display: grid; }
.suggest .s-body strong { font-size: 14px; }
.suggest .s-body small { font-size: 12px; color: var(--text-2); }
.suggest .s-empty { padding: 14px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.suggest .s-empty svg { width: 15px; height: 15px; }

/* ====== شريط الفلاتر ====== */
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 10px 16px; margin-bottom: 18px;
}
.filter-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.filter-search { flex: 1 1 200px; }
.filter-search span { display: inline-flex; }
.filter-search span svg { width: 15px; height: 15px; color: var(--text-2); }
.filter-search input {
    flex: 1; padding: 8px 12px; border-radius: var(--r-sm);
    border: 1px solid var(--border); background: var(--surface);
    font-size: 14px; font-weight: 600; min-width: 0;
}
.filter-search input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-item select {
    padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--border);
    background: var(--surface); font-size: 12.5px; cursor: pointer;
}

/* ====== شارات الإنجاز ====== */
.badge-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, rgba(197,163,90,.14), rgba(212,184,122,.2));
    border: 1px solid var(--gold); color: var(--warning);
    font-size: 12.5px; font-weight: 700; padding: 7px 16px; border-radius: 50px;
}
[data-theme="dark"] .badge-chip { color: var(--gold-light); }
.badge-chip svg { width: 15px; height: 15px; }

/* ====== بطاقات المدربين والآراء ====== */
.instructor-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 22px; text-align: center; transition: var(--tr);
}
.instructor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.instructor-card .avatar { margin: 0 auto 10px; }
.instructor-card h3 { font-size: 14.5px; margin-bottom: 2px; }
.instructor-card p { font-size: 13px; color: var(--text-2); }

.testimonial {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 20px; margin: 0; position: relative; transition: var(--tr);
}
.testimonial:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.testimonial p { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; line-height: 1.9; }
.testimonial footer { display: grid; }
.testimonial footer strong { font-size: 14px; color: var(--text); }
.testimonial footer span { font-size: 11.5px; color: var(--gold); font-weight: 700; }

/* ====== الأسئلة الشائعة ====== */
details.faq { border-bottom: 1px solid var(--border); padding: 4px 0; }
details.faq:last-child { border-bottom: none; }
details.faq summary {
    cursor: pointer; font-size: 15px; font-weight: 700; padding: 12px 4px;
    list-style: none; display: flex; align-items: center; justify-content: space-between;
    transition: var(--tr);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-size: 22px; color: var(--gold); transition: transform var(--tr); }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq summary:hover { color: var(--primary); }
details.faq p { font-size: 14px; color: var(--text-2); padding: 0 4px 14px; line-height: 1.9; }

/* ====== حركات دقيقة ====== */
/* حركة دخول خفيفة للعناصر العلوية غير المشمولة بنظام الكشف */
#view > *:not(.revese):not(.reveal) { animation: viewIn .3s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* عند إعادة رسم نفس الصفحة (مزامنة بيانات): لا حركات دخول إطلاقاً — يمنع الرمش/الاهتزاز */
#view.view-noanim > * { animation: none !important; }
#view.view-noanim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ====== حركات الظهور عند التمرير (Scroll Reveal) ====== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
    animation: none !important;   /* يلغي viewIn لتفادي التعارض */
}
.reveal.reveal-in {
    opacity: 1;
    transform: translateY(0);
}
/* نبضة لطيفة للأيقونات داخل البطاقات عند ظهورها */
.reveal .domain-icon,
.reveal .feature-icon,
.reveal.stat-card > svg {
    transform: scale(.8);
    opacity: .4;
    transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .5s ease;
    transition-delay: calc(var(--reveal-delay, 0ms) + 120ms);
}
.reveal.reveal-in .domain-icon,
.reveal.reveal-in .feature-icon,
.reveal.reveal-in.stat-card > svg {
    transform: scale(1);
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
    .reveal .domain-icon, .reveal .feature-icon, .reveal.stat-card > svg { opacity: 1 !important; transform: none !important; }
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.continue-card { border-inline-start: 4px solid var(--gold); }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 30px 22px; }
}

/* ====== الاسم والصفة في الشريط العلوي ====== */
.user-menu .u-meta {
    display: grid; text-align: start; line-height: 1.35;
}
.user-menu .u-name {
    font-size: 12.5px; font-weight: 700;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu .u-role { font-size: 11px; font-weight: 600; color: var(--gold-light); }
@media (max-width: 640px) {
    .user-menu .u-name { max-width: 90px; }
}

/* ====== الفوتر ====== */
.footer {
    background: var(--primary-dark); color: rgba(255,255,255,.75);
    padding: 26px 0; margin-top: auto; text-align: center;
}
[data-theme="dark"] .footer { background: #0A141F; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-inner p { font-size: 14px; margin: 0; }
.footer-note { font-size: 12px; color: rgba(255,255,255,.5); }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 4px; }
.footer-link {
    background: none; border: none; color: var(--gold-light); cursor: pointer;
    font-family: inherit; font-size: 14px; font-weight: 700; padding: 4px 12px;
    border-radius: 50px; transition: var(--tr);
}
.footer-link:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ====== شارة عدّاد التنقل ====== */
.nav a { position: relative; }
.nav-badge {
    display: inline-grid; place-items: center; min-width: 18px; height: 18px;
    padding: 0 5px; margin-inline-start: 2px;
    background: var(--gold); color: #1A2B3E;
    border-radius: 50px; font-size: 11px; font-weight: 700; line-height: 1;
}
@media (max-width: 640px) {
    .nav-badge {
        position: absolute; top: 2px; inset-inline-end: 2px; margin: 0;
        min-width: 15px; height: 15px; font-size: 10px;
    }
}

/* ====== بطاقات طلبات الشرح ====== */
.help-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px;
    border-inline-start: 4px solid var(--gold);
}
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.help-head h3 { font-size: 16px; font-weight: 700; }
.help-body { font-size: 13.5px; color: var(--text-2); margin-bottom: 10px; white-space: pre-wrap; line-height: 1.8; }
.help-meta { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.help-meta svg { width: 13px; height: 13px; vertical-align: middle; }
.help-reply {
    margin-top: 12px; background: var(--success-bg); border-radius: var(--r-md);
    padding: 12px 14px; font-size: 14px;
}
.help-reply strong { color: var(--success); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.help-reply svg { width: 14px; height: 14px; }
.help-reply p { color: var(--text); white-space: pre-wrap; line-height: 1.8; margin: 0; }
.help-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ============================================================
   إعادة تصميم صفحة الهبوط — على غرار المرجع (هوية خضراء)
   ============================================================ */

/* ====== البانر الكبير ====== */
.hero-lg {
    display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 0; align-items: stretch;
    background: linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 100%);
    border-radius: 26px; margin-bottom: 34px;
    position: relative; overflow: hidden; min-height: 340px;
}
[data-theme="dark"] .hero-lg { background: linear-gradient(120deg, var(--surface-2), var(--primary-dark)); }
.hero-lg-body { position: relative; z-index: 2; padding: 44px 20px 44px 44px; align-self: center; order: 2; }
.hero-lg h1 {
    font-size: clamp(28px, 3.4vw, 43px); font-weight: 700; line-height: 1.45;
    color: var(--text); margin-bottom: 16px;
}
.hero-lg h1 .hl { color: var(--primary); }
.hero-lg p { font-size: 16px; color: var(--text-2); line-height: 1.9; max-width: 440px; margin-bottom: 26px; }
.hero-lg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.btn-lg { padding: 13px 30px; font-size: 14.5px; border-radius: 14px; }

.hero-social { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatars { display: flex; }
.mini-avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    border: 3px solid var(--surface); margin-inline-start: -12px; color: var(--primary-dark);
}
.mini-avatar:first-child { margin-inline-start: 0; }
.mini-avatar svg { width: 16px; height: 16px; }
.mini-avatar.more { background: var(--primary); color: #fff; font-weight: 700; font-size: 15px; }
.hero-count { font-size: 15px; color: var(--text-2); }
.hero-count strong { color: var(--primary); font-weight: 700; }

.hero-lg-art { position: relative; z-index: 0; align-self: stretch; order: 1; }
.hero-lg-art svg { width: 100%; max-width: 420px; height: auto; margin: 0 auto; display: block; padding: 20px; }
.hero-photo {
    position: absolute; inset-block: 0; inset-inline-end: 0; inset-inline-start: -28%;
    width: 128%; height: 100%;
    object-fit: cover; object-position: center; display: block;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.55) 24%, #000 42%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.55) 24%, #000 42%);
}
@media (max-width: 860px) {
    .hero-lg { grid-template-columns: 1fr; min-height: 0; }
    .hero-lg-body { padding: 30px 24px; order: 1; }
    .hero-lg-art { order: 2; min-height: 260px; }
    .hero-photo { position: relative; height: 260px; -webkit-mask-image: linear-gradient(to top, #000 82%, transparent 100%); mask-image: linear-gradient(to top, #000 82%, transparent 100%); }
    .hero-lg-art svg { max-width: 300px; }
}

/* ====== عنوان القسم الأوسط ====== */
.section-center { text-align: center; margin: 40px 0 22px; }
.section-center h2 { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.section-center p { font-size: 15px; color: var(--text-2); }

/* ====== شبكة مجالات التدريب ====== */
.domain-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px; margin-bottom: 34px;
}
.domain-card {
    border: none; cursor: pointer; font-family: inherit; text-align: start;
    border-radius: 20px; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px;
    transition: transform var(--tr), box-shadow var(--tr);
    position: relative; min-height: 190px;
}
.domain-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.domain-icon {
    width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
    background: var(--surface);
}
.domain-icon svg { width: 32px; height: 32px; }
.domain-title { font-size: 15.5px; font-weight: 700; color: var(--text); margin-top: auto; }
.domain-card.tile-1 { background: var(--tile-1); } .domain-card.tile-1 .domain-icon svg { color: var(--tile-1i); }
.domain-card.tile-2 { background: var(--tile-2); } .domain-card.tile-2 .domain-icon svg { color: var(--tile-2i); }
.domain-card.tile-3 { background: var(--tile-3); } .domain-card.tile-3 .domain-icon svg { color: var(--tile-3i); }
.domain-card.tile-4 { background: var(--tile-4); } .domain-card.tile-4 .domain-icon svg { color: var(--tile-4i); }
.domain-card.tile-5 { background: var(--tile-5); } .domain-card.tile-5 .domain-icon svg { color: var(--tile-5i); }

/* ====== مجموعات التخصصات في لوحة الطالب: إطار للمجموعة + رأس بخلفية ====== */
.spec-group {
    grid-column: 1 / -1;
    border: 1.5px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    padding: 14px 16px 18px;
    box-shadow: var(--shadow);
}
.spec-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: var(--surface-2);
}
.spec-group-head h2 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}
.spec-group-head .spec-count {
    margin-inline-start: auto;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    white-space: nowrap;
}
/* تلوين رأس كل مجموعة بلون تخصصها (نفس باستيل بطاقات المجالات — يعمل ليلاً ونهاراً) */
.spec-group.tile-1 .spec-group-head { background: var(--tile-1); } .spec-group.tile-1 .spec-group-head svg { color: var(--tile-1i); }
.spec-group.tile-2 .spec-group-head { background: var(--tile-2); } .spec-group.tile-2 .spec-group-head svg { color: var(--tile-2i); }
.spec-group.tile-3 .spec-group-head { background: var(--tile-3); } .spec-group.tile-3 .spec-group-head svg { color: var(--tile-3i); }
.spec-group.tile-4 .spec-group-head { background: var(--tile-4); } .spec-group.tile-4 .spec-group-head svg { color: var(--tile-4i); }
.spec-group.tile-5 .spec-group-head { background: var(--tile-5); } .spec-group.tile-5 .spec-group-head svg { color: var(--tile-5i); }
.subject-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 4px 2px 10px;
    padding-inline-start: 10px;
    border-inline-start: 3px solid var(--primary);
}
.subject-head .spec-count { margin-inline-start: 0; }
@media (max-width: 640px) {
    .spec-group { padding: 10px 10px 14px; }
    .spec-group-head { padding: 9px 12px; }
}
[data-theme="dark"] .domain-card { background: var(--surface-2); }
[data-theme="dark"] .domain-icon { background: var(--surface); }

/* ====== شريط المزايا ====== */
.features-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 26px 28px; margin-bottom: 20px;
}
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon {
    width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
    background: var(--accent-soft); display: grid; place-items: center;
}
.feature-icon svg { width: 24px; height: 24px; color: var(--primary); }
.feature-text { display: grid; gap: 2px; }
.feature-text strong { font-size: 15px; font-weight: 700; color: var(--text); }
.feature-text span { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ====== شريط تقدّم المشاهدة (سياسة المشاهدة الكاملة) ====== */
.watch-progress { margin-top: 14px; }
.wp-bar { height: 8px; border-radius: 50px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.wp-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 50px; transition: width .3s ease; }
.watch-progress .form-hint { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.watch-progress .form-hint svg { width: 13px; height: 13px; }

/* ====== لوحة إدارة أسئلة الاختبار (للمحاضر) ====== */
.qadmin { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.qadmin-head { display: flex; align-items: flex-start; gap: 10px; }
.qadmin-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--primary); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.qadmin-text { flex: 1; font-weight: 700; font-size: 15px; line-height: 1.6; }
.qadmin-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.qadmin-opts { list-style: none; margin: 10px 0 0; padding: 0 36px 0 0; display: grid; gap: 5px; }
.qadmin-opts li { font-size: 14px; color: var(--text-2); padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface-2); display: flex; align-items: center; gap: 5px; }
.qadmin-opts li.correct { background: var(--success-bg); color: var(--success); font-weight: 700; }
.qadmin-opts li.correct svg { width: 13px; height: 13px; }

/* ====== جرس الإشعارات ====== */
.notif-wrap { position: relative; }
.notif-btn { position: relative; }
.notif-count {
    position: absolute; top: -3px; inset-inline-end: -3px;
    min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--danger); color: #fff; border-radius: 50px;
    font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
    border: 2px solid var(--header-bg);
}
.notif-panel {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
    width: 340px; max-width: 90vw; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg); z-index: 200;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.notif-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.notif-head strong { font-size: 15px; }
.notif-clear {
    background: none; border: none; color: var(--primary); cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 700;
}
.notif-clear:hover { text-decoration: underline; }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 11px; align-items: flex-start; width: 100%;
    padding: 12px 16px; background: none; border: none; cursor: pointer;
    text-align: start; font-family: inherit; border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: var(--accent-soft); filter: brightness(0.97); }
.notif-ic { flex: 0 0 auto; margin-top: 2px; }
.notif-ic svg { width: 16px; height: 16px; }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; color: var(--text); }
.notif-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.notif-time { font-size: 12px; color: var(--text-3, var(--text-2)); margin-top: 1px; }
.notif-empty { padding: 36px 16px; text-align: center; color: var(--text-2); }
.notif-empty svg { color: var(--border); margin-bottom: 8px; }
.notif-empty p { font-size: 14px; }

/* ====== زر صلاحية الخصم في جدول المستخدمين ====== */
.chip-btn.on { background: var(--success-bg); color: var(--success); border-color: var(--success); }

/* ====== عرض الأسعار والخصومات ====== */
.price-old { text-decoration: line-through; opacity: .55; font-size: .85em; margin-inline-end: 4px; }
.price-new { font-weight: 700; }
.price-off {
    display: inline-block; margin-inline-start: 5px; padding: 1px 6px;
    background: var(--danger); color: #fff; border-radius: 50px;
    font-size: 11px; font-weight: 700; vertical-align: middle;
}
.price-free { font-weight: 700; color: var(--success); }
.discount-box {
    border: 1px dashed var(--border); border-radius: var(--r-md);
    padding: 14px 16px; margin-bottom: 16px; background: var(--surface-2);
}
.discount-box h3 {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px; color: var(--text);
}
.discount-box h3 svg { width: 16px; height: 16px; color: var(--gold); }

/* ====== تبويبات لوحة الإدارة ====== */
.admin-tabs {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
    border-bottom: 1px solid var(--border); padding-bottom: 12px;
}
.admin-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: var(--r-md);
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-2); font-family: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.admin-tab:hover { background: var(--accent-soft); color: var(--primary); border-color: var(--primary); }
.admin-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-tab svg { width: 15px; height: 15px; }
.tab-count {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 50px;
    background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.admin-tab.active .tab-count { background: rgba(255,255,255,.28); }

/* ====== لوحات الإعدادات الفارغة (بانتظار الربط) ====== */
.setup-placeholder { text-align: center; padding: 40px 20px; }
.setup-placeholder svg { color: var(--border); margin-bottom: 14px; }
.setup-placeholder h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.setup-placeholder p { font-size: 14px; color: var(--text-2); line-height: 1.8; max-width: 460px; margin: 0 auto 14px; }

/* ====== بطاقة حالة تفعيل الخصم (لوحة المحاضر) ====== */
.action-card.static { cursor: default; }
.action-card.static:hover { transform: none; }
.action-card.static.ok { border-color: var(--success); background: var(--success-bg); }
.action-card.static.ok svg { color: var(--success); }
.action-card.static.ok .t { color: var(--success); }
.action-card.static.off { opacity: .75; }
.action-card.static.off svg { color: var(--text-2); }

/* ====== بطاقات الإشعارات العائمة ====== */
.ntoast-root {
    position: fixed;
    top: 76px;
    inset-inline-end: 20px;
    z-index: 320;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.ntoast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--ntoast-color, var(--primary));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
    cursor: pointer;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    transition: opacity .28s ease, transform .28s cubic-bezier(.2, .8, .3, 1);
}
.ntoast.in { opacity: 1; transform: translateY(0) scale(1); }
.ntoast.out { opacity: 0; transform: translateY(-8px) scale(.98); }
.ntoast.no-anim { transition: none; }
.ntoast:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, .2); }
.ntoast-ic { flex: 0 0 auto; color: var(--ntoast-color, var(--primary)); display: flex; }
.ntoast-body { flex: 1; min-width: 0; }
.ntoast-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ntoast-text {
    font-size: 12.5px; color: var(--text-2); line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ntoast-time { font-size: 11px; color: var(--text-3, var(--text-2)); margin-top: 4px; opacity: .8; }
.ntoast-x {
    flex: 0 0 auto; background: none; border: 0; cursor: pointer;
    color: var(--text-2); padding: 2px; border-radius: 6px; line-height: 0;
}
.ntoast-x:hover { background: var(--surface-2); color: var(--text); }
.ntoast-bar {
    position: absolute; inset-block-end: 0; inset-inline: 0;
    height: 3px; background: var(--ntoast-color, var(--primary));
    transform-origin: right; transform: scaleX(1); opacity: .55;
}
.ntoast.more { border-inline-start-color: var(--text-2); }

/* شارة العاجل وتجميع القائمة */
.notif-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--danger); vertical-align: middle; margin-inline-start: 4px;
}
.notif-group {
    font-size: 11px; font-weight: 800; color: var(--text-2);
    padding: 8px 14px 4px; letter-spacing: .3px;
}
.notif-item { border-inline-start: 3px solid transparent; transition: background .15s, border-color .15s; }
.notif-item.unread { border-inline-start-color: var(--nc, var(--primary)); }

@media (max-width: 640px) {
    .ntoast-root { top: auto; bottom: 16px; inset-inline: 16px; width: auto; }
    .ntoast { transform: translateY(10px) scale(.98); }
    .ntoast.out { transform: translateY(10px) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
    .ntoast { transition: none; opacity: 1; transform: none; }
    .ntoast-bar { transition: none !important; }
}

/* ============================================================
   طبقة إعادة التصميم — كحلي راقٍ + ذهبي ناعم + زجاجية
   (تُطبَّق فوق النظام الأساسي بنفس الـ selectors)
   ============================================================ */

:root { --font-display: 'Sora', 'IBM Plex Sans Arabic', sans-serif; }

/* --- خلفية بعمق هادئ --- */
body {
    background:
        radial-gradient(1100px 620px at 88% -8%, rgba(198,161,91,.10), transparent 60%),
        radial-gradient(1000px 640px at -6% 4%, rgba(22,52,95,.09), transparent 58%),
        var(--bg);
    background-attachment: fixed;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* --- الهيدر الزجاجي --- */
.header {
    background: color-mix(in srgb, var(--surface) 74%, transparent);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 1px 0 var(--glass-brd), 0 8px 30px rgba(9, 20, 40, .05);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .header { background: color-mix(in srgb, var(--surface) 66%, transparent); }
.brand-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); box-shadow: var(--shadow); }
.brand-icon svg { color: var(--gold-light); }
.brand-text { letter-spacing: -.2px; }

/* --- التنقّل: حبّة نشطة ذهبية --- */
.nav a { font-weight: 600; }
.nav a:hover { background: var(--accent-soft); color: var(--primary); }
.nav a[aria-current="page"] { color: var(--primary); background: var(--accent-soft); }
.nav a[aria-current="page"]::after {
    inset-inline: 14px; bottom: -13px; height: 2.5px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 3px;
}

/* --- الأزرار --- */
.btn { font-weight: 600; letter-spacing: .1px; transition: transform var(--tr), box-shadow var(--tr), filter var(--tr); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; box-shadow: 0 6px 18px rgba(15, 37, 68, .22);
}
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #22406b, #2f5a90); color: #fff; }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(15, 37, 68, .30); transform: translateY(-1px); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold-deep), var(--gold) 55%, var(--gold-light));
    color: #17233b; box-shadow: var(--shadow-gold); font-weight: 700;
}
.btn-gold:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 12px 30px rgba(198,161,91,.36); }

/* --- بطاقات زجاجية عامة --- */
.panel, .course-card, .stat-card, .list-row, .lesson, .empty, .course-hero, .quiz-q {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-brd);
    box-shadow: var(--shadow);
}
.panel, .course-hero { position: relative; }
/* شعرة ذهبية علوية للألواح الرئيسية */
.panel::before, .course-hero::before {
    content: ''; position: absolute; inset-inline: 20px; top: 0; height: 2px; border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-light) 70%, transparent);
    opacity: .55;
}
.stat-card { border-radius: var(--r-md); transition: transform var(--tr), box-shadow var(--tr); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card .num { font-family: var(--font-display); color: var(--primary); letter-spacing: -.5px; }
.stat-card svg, .section-head h2 svg, .panel > h2 svg, .modal h2 svg { color: var(--gold); }
/* احترازي: أي أيقونة SVG بلا أبعاد صريحة (width) تأخذ حجماً افتراضياً بدل التمدّد */
svg[viewBox="0 0 24 24"]:not([width]) { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: middle; }

.course-card:hover { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--gold) 40%, var(--glass-brd)); }
.course-cover { background: linear-gradient(135deg, var(--primary), var(--navy-950)); }
.price-tag { background: rgba(9,20,40,.82); color: var(--gold-light); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.subject-ribbon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }

.lesson:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--border)); box-shadow: var(--shadow); }
.stars { color: var(--gold); }
.progress > span { background: linear-gradient(90deg, var(--gold-deep), var(--gold-light)); }

/* --- عناوين الأقسام: كحلي محكم --- */
.section-head h2, .course-hero h1, .hero h1 { letter-spacing: -.4px; }

/* --- تبويبات الإدارة --- */
.admin-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(15,37,68,.20);
}
.admin-tab:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }

/* --- الحقول --- */
.form-control:focus, .search input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(198,161,91,.18);
}
.search input:focus { background: var(--surface); }

/* --- النوافذ الزجاجية --- */
.modal-overlay { background: rgba(6, 14, 28, .58); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-brd);
}

/* --- البانر الرئيسي: مشهد كحلي سينمائي بلمسة ذهبية --- */
.hero {
    background:
        radial-gradient(120% 130% at 82% -20%, rgba(198,161,91,.20), transparent 46%),
        linear-gradient(140deg, var(--navy-950) 0%, var(--primary-dark) 48%, var(--primary) 100%);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.06);
    padding: 52px 44px;
}
.hero::before {
    background: radial-gradient(circle, rgba(198,161,91,.26), transparent 62%);
    width: 420px; height: 420px;
}
.hero::after { background: radial-gradient(circle, rgba(120,160,210,.16), transparent 65%); }
.hero h1 { font-weight: 800; line-height: 1.35; }
.hero h1 em { color: var(--gold-light); position: relative; }
/* شعرة ذهبية أسفل العنوان */
.hero-body h1 + p { position: relative; padding-top: 14px; }
.hero-body h1 + p::before {
    content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 56px; height: 3px;
    border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light));
}
.hero p { color: rgba(255,255,255,.80); }
.hero-kicker {
    color: var(--gold-light);
    background: rgba(198,161,91,.12); border: 1px solid rgba(198,161,91,.38);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero-card {
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,.22);
}
.hero-card svg { color: var(--gold-light); }

/* --- الفوتر --- */
.footer { background: linear-gradient(180deg, var(--primary-dark), var(--navy-950)); }
[data-theme="dark"] .footer { background: linear-gradient(180deg, #0A1628, var(--navy-950)); }

/* --- بطاقات المجالات: حدّ رفيع + رفعة عند المرور --- */
.domain-card { transition: transform var(--tr), box-shadow var(--tr); border: 1px solid transparent; }
.domain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }

/* --- احترام تقليل الحركة --- */
@media (prefers-reduced-motion: reduce) {
    .btn:hover, .stat-card:hover, .course-card:hover, .domain-card:hover { transform: none; }
}

/* --- البانر الرئيسي للصفحة الأولى: راقٍ مضيء بلمسة ذهبية --- */
.hero-lg {
    background:
        radial-gradient(90% 120% at 92% 0%, rgba(198,161,91,.14), transparent 55%),
        linear-gradient(120deg, var(--accent-soft) 0%, var(--surface) 62%);
    border: 1px solid var(--glass-brd);
    box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .hero-lg {
    background:
        radial-gradient(90% 120% at 92% 0%, rgba(217,188,126,.14), transparent 55%),
        linear-gradient(120deg, var(--surface-2), var(--primary-dark));
}
.hero-lg h1 { font-weight: 800; letter-spacing: -.5px; }
.hero-lg h1 .hl {
    background: linear-gradient(120deg, var(--gold-deep), var(--gold-light));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    position: relative;
}
/* شعرة ذهبية أسفل الكلمة المميّزة */
.hero-lg h1 .hl::after {
    content: ''; position: absolute; inset-inline: 0; bottom: 2px; height: 5px;
    background: rgba(198,161,91,.20); border-radius: 4px; z-index: -1;
}
.hero-count strong { color: var(--gold-deep); }
.mini-avatar.more { background: linear-gradient(135deg, var(--gold-deep), var(--gold)); color: #17233b; }

/* ============================================================
   طبقة التفاعلات الدقيقة (Micro-interactions)
   حركات إضافية بحتة — لا تمسّ أي وظيفة
   ============================================================ */

/* خط سفلي ينمو تحت روابط التنقّل (لغير النشط) */
.nav a:not([aria-current="page"])::after {
    content: ''; position: absolute; bottom: 2px; inset-inline-start: 50%;
    width: 0; height: 2px; background: var(--gold);
    transition: width .3s var(--tr); transform: translateX(50%);
}
.nav a:not([aria-current="page"]):hover::after { width: 55%; }

/* شريط ذهبي ينمو على حافة البطاقة عند التحويم */
.domain-card, .course-card { position: relative; }
.domain-card::after, .course-card::after {
    content: ''; position: absolute; top: 0; inset-inline-end: 0;
    width: 4px; height: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(180deg, var(--gold), var(--gold-light));
    transition: height .5s var(--tr);
}
.domain-card:hover::after, .course-card:hover::after { height: 100%; }

/* تعويم هادئ لأيقونات المجالات + دوران خفيف عند التحويم */
.domain-icon { transition: transform .5s var(--tr), background .5s var(--tr); }
.domain-card:nth-child(4n+1) .domain-icon { animation: mn-float 4s ease-in-out infinite; }
.domain-card:nth-child(4n+2) .domain-icon { animation: mn-float 4.4s ease-in-out infinite .3s; }
.domain-card:nth-child(4n+3) .domain-icon { animation: mn-float 4.8s ease-in-out infinite .6s; }
.domain-card:nth-child(4n)   .domain-icon { animation: mn-float 5.2s ease-in-out infinite .9s; }
@keyframes mn-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.domain-card:hover .domain-icon { transform: scale(1.07) rotate(-4deg); }

/* لمعة تمرّ على الأزرار الذهبية عند التحويم */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
    content: ''; position: absolute; inset: 0; transform: translateX(-130%);
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.38), transparent);
    transition: transform .6s var(--tr); pointer-events: none;
}
.btn-gold:hover::after { transform: translateX(130%); }

@media (prefers-reduced-motion: reduce) {
    .domain-icon { animation: none !important; }
    .domain-card::after, .course-card::after, .btn-gold::after, .nav a::after { transition: none !important; }
}

/* ===== إدارة المستخدمين — شريط الإحصاء والبحث ===== */
.ustats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:6px 0 18px}
.ustat{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:14px 16px;position:relative;overflow:hidden}
.ustat .n{font-size:26px;font-weight:800;letter-spacing:-1px;line-height:1;color:var(--primary)}
.ustat .l{color:var(--text-2);font-size:12.5px;margin-top:5px;font-weight:600}
.ustat::before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:var(--primary)}
.ustat.s-stu::before{background:var(--gold)} .ustat.s-stu .n{color:var(--gold-deep)}
.ustat.s-ins::before{background:var(--success)} .ustat.s-ins .n{color:var(--success)}
.ustat.s-staff::before{background:var(--primary-light)}
.user-search{position:relative;flex:1;min-width:200px;display:flex;align-items:center}
.user-search svg{position:absolute;inset-inline-start:12px;color:var(--text-2);pointer-events:none}
.user-search input{width:100%;font-family:inherit;font-size:14px;padding:9px 38px 9px 14px;border:1px solid var(--border);border-radius:11px;background:var(--bg);color:var(--text)}
.user-search input:focus{outline:none;border-color:var(--gold);background:var(--surface)}
@media(max-width:640px){.ustats{grid-template-columns:repeat(2,1fr)}}

/* ============================================================
   جداول عرض المواد (تسجيل الطالب + تقرير المدير) — تصميم محسّن
   ============================================================ */
.register-table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
}
.register-table thead th,
.data-table thead th {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    color: var(--text);
    font-weight: 700;
    font-size: 12.5px;
    text-align: start;
    padding: 12px 14px;
    border-bottom: 2px solid color-mix(in srgb, var(--gold) 40%, var(--border));
    white-space: nowrap;
}
.register-table tbody td,
.data-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    vertical-align: middle;
}
.register-table tbody tr:last-child td,
.data-table tbody tr:last-child td { border-bottom: none; }
.register-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.register-table tbody tr:hover,
.data-table tbody tr:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); transition: background .15s ease; }
.register-table tbody td:nth-child(2),
.data-table tbody td:nth-child(2) { color: var(--text); font-weight: 600; }
/* عمود الترقيم والأرقام: محاذاة وسط ولون خافت */
.register-table tbody td:first-child,
.data-table tbody td:first-child { color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; width: 44px; }
/* رقاقة رقم المادة والساعات */
.register-table .cell-num,
.data-table .cell-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 24px; padding: 0 8px;
    border-radius: 999px; font-size: 12.5px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: color-mix(in srgb, var(--gold) 16%, transparent);
    color: color-mix(in srgb, var(--gold) 62%, var(--text));
}
.data-table .cell-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 26px; padding: 0 10px; border-radius: 999px;
    font-weight: 800; font-variant-numeric: tabular-nums;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}
.cell-levels { display: flex; flex-wrap: wrap; gap: 4px; }
.cell-levels .lv {
    font-size: 11px; padding: 2px 8px; border-radius: 999px;
    background: var(--surface-2); color: var(--text-2);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* زر الحذف داخل جدول الطالب */
.register-table td .btn-danger.btn-sm { padding: 5px 9px; border-radius: var(--r-sm); }
/* تغليف قابل للتمرير أفقياً على الجوال */
.reg-table-wrap { border-radius: var(--r-md); overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
    .register-table, .data-table { font-size: 13px; min-width: 460px; }
    .register-table thead th, .data-table thead th { padding: 10px; }
    .register-table tbody td, .data-table tbody td { padding: 9px 10px; }
}

/* نافذة تسجيل المواد: أوسع لعرض الجدول كاملاً */
.modal.wide-subjects { max-width: 880px; }
@media (max-width: 920px) { .modal.wide-subjects { max-width: 96vw; } }

/* ===== إعلان الخصم المنبثق ===== */
.promo-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px;
  background:rgba(9,20,40,.55);backdrop-filter:blur(6px);opacity:0;pointer-events:none;transition:opacity .25s ease}
.promo-overlay.show{opacity:1;pointer-events:auto}
.promo-card{position:relative;max-width:430px;width:100%;background:var(--surface);border:1px solid var(--border,#e8eef5);
  border-radius:26px;padding:30px 26px;box-shadow:0 24px 60px rgba(22,52,95,.28);text-align:center;
  transform:scale(.9);transition:transform .25s ease}
.promo-overlay.show .promo-card{transform:scale(1)}
.promo-close{position:absolute;top:18px;left:18px;width:38px;height:38px;border-radius:50%;border:none;cursor:pointer;
  background:#eef2f7;color:#64748b;display:flex;align-items:center;justify-content:center;transition:.2s}
.promo-close:hover{background:#e2e8f0;color:var(--primary)}
.promo-badge{display:inline-flex;align-items:center;gap:6px;background:#fbf6ea;border:1px solid var(--gold-light);
  color:var(--gold-deep);font-size:12px;font-weight:700;padding:6px 15px;border-radius:999px;margin-bottom:14px}
.promo-title{font-size:22px;font-weight:800;color:var(--primary);margin:0 0 14px}
.promo-amount-wrap{background:#fbf7ec;border:1px solid var(--gold-light);border-radius:20px;padding:16px;margin-bottom:14px;
  animation:promoPulse 1.9s infinite ease-in-out}
.promo-amount{font-size:52px;line-height:1.05;font-weight:900;letter-spacing:-1px;
  background:linear-gradient(90deg,var(--gold-deep),var(--gold),var(--gold-light));-webkit-background-clip:text;
  background-clip:text;-webkit-text-fill-color:transparent}
@keyframes promoPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
.promo-sub{font-size:15px;font-weight:700;color:var(--primary);margin:0 0 12px;display:flex;align-items:center;justify-content:center;gap:6px}
.promo-sub svg{color:var(--gold)}
.promo-desc{font-size:13px;color:var(--text-2,#64748b);line-height:1.8;margin:0 0 18px}
.promo-status{background:#f6f9fc;border:1px solid var(--border,#e2e8f0);border-radius:18px;padding:13px 15px;margin-bottom:18px;
  display:flex;align-items:center;justify-content:space-between;gap:10px}
.promo-status-l{display:flex;align-items:center;gap:11px;text-align:right}
.promo-check{width:30px;height:30px;border-radius:50%;background:var(--primary);color:#fff;
  display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.promo-status-t{font-size:13px;font-weight:700;color:var(--primary)}
.promo-status-d{font-size:11px;color:var(--text-2,#94a3b8)}
.promo-status-badge{background:linear-gradient(90deg,var(--gold),var(--gold-light));color:#fff;font-size:13px;font-weight:800;
  padding:7px 13px;border-radius:12px;white-space:nowrap}
.promo-cta{margin-bottom:14px;font-size:15px}
.promo-foot{font-size:12px;color:var(--text-2,#64748b);font-weight:600;margin:0}

/* قائمة منسدلة قابلة للبحث (فلتر الجامعات) */
.ss-opt:hover { background: var(--bg-2, #f1f4f9); }
.ss-panel::-webkit-scrollbar { width: 8px; }
.ss-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* بطاقة التذكيرات (مهام المدير المعلّقة) */
.reminder-box { background: linear-gradient(135deg, rgba(198,161,91,.08), rgba(22,52,95,.05)); border: 1px solid var(--gold-light, #E0C588); border-radius: 16px; padding: 14px 16px; margin: 4px 0 18px; }
.reminder-head { display: flex; align-items: center; gap: 8px; color: var(--primary); font-size: 15px; margin-bottom: 10px; }
.reminder-head svg { color: var(--gold); }
.reminder-list { display: flex; flex-direction: column; gap: 8px; }
.reminder-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: right; background: var(--surface); border: 1px solid var(--border, #e8eef5); border-radius: 12px; padding: 10px 14px; cursor: pointer; transition: .18s; font-family: inherit; font-size: 14px; color: var(--text-1, #1e293b); }
.reminder-item:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(22,52,95,.08); transform: translateY(-1px); }
.reminder-ic { display: flex; color: var(--gold-deep, #9C7C3C); flex: 0 0 auto; }
.reminder-label { flex: 1; font-weight: 600; }
.reminder-arrow { opacity: .4; flex: 0 0 auto; }

/* ====== تصميم الصفحة الرئيسية V2 — معزول تحت .landing-v2 ====== */
.landing-v2 {
  
  --navy-950: #0A1A33;
  --navy-900: #0F2544;
  --navy-800: #16345F;
  --navy-700: #1E4478;
  --navy-600: #2A557F;
  --navy-500: #3E6DA0;
  --navy-400: #6E9BD6;

  --gold-600: #9C7C3C;
  --gold-500: #C6A15B;
  --gold-400: #D9BC7E;
  --gold-300: #E8D2A0;
  --gold-100: #F5EEDD;

  --ink: #0F1E33;
  --ink-2: #4A5878;
  --ink-3: #7B8AAB;
  --line: #E5EAF2;
  --line-2: #EEF2F8;

  --bg: #F5F7FB;
  --paper: #FFFFFF;
  --paper-2: #FAFBFD;

  --ok: #1E9E6A;
  --warn: #B58729;
  --err: #D14848;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15,37,68,.06);
  --shadow-sm: 0 2px 8px rgba(15,37,68,.06), 0 1px 3px rgba(15,37,68,.04);
  --shadow-md: 0 8px 24px rgba(15,37,68,.08), 0 2px 6px rgba(15,37,68,.04);
  --shadow-lg: 0 24px 60px rgba(9,20,40,.14);
  --shadow-gold: 0 10px 30px rgba(198,161,91,.25);

  --tr-fast: .18s cubic-bezier(.4,.12,.2,1);
  --tr: .28s cubic-bezier(.4,.12,.2,1);
  --tr-slow: .5s cubic-bezier(.16,.84,.3,1);

  --container: 1240px;
  --header-h: 76px;

  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', system-ui, Tahoma, sans-serif;
  --font-num: 'Sora', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

[data-theme="dark"] .landing-v2 {
  --ink: #E7EDF6;
  --ink-2: #A8B7D0;
  --ink-3: #7A88A6;
  --line: #22334F;
  --line-2: #1A2A45;

  --bg: #070E1D;
  --paper: #101D33;
  --paper-2: #16263F;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.6);
}

.landing-v2 .hero {
  position: relative;
  padding: 60px 0 90px;
  overflow: hidden;
}
.landing-v2 .hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(198,161,91,.10), transparent 60%),
    radial-gradient(600px 500px at 0% 100%, rgba(22,52,95,.06), transparent 60%);
  pointer-events: none;
}
[data-theme="dark"] .landing-v2 .hero::before {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(217,188,126,.08), transparent 60%),
    radial-gradient(600px 500px at 0% 100%, rgba(110,155,214,.08), transparent 60%);
}
.landing-v2 .hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.landing-v2 .hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 18px 0 22px;
}
.landing-v2 .hero h1 .hl {
  color: var(--navy-800);
  background: linear-gradient(120deg, var(--navy-800) 0%, var(--gold-500) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}
[data-theme="dark"] .landing-v2 .hero h1 .hl {
  background: linear-gradient(120deg, var(--navy-400) 0%, var(--gold-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.landing-v2 .hero p.lede {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.9;
  max-width: 540px;
  margin-bottom: 32px;
}
.landing-v2 .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.landing-v2 .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.landing-v2 .hero-stat .num {
  font-family: var(--font-num);
  font-size: 34px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -.02em;
  line-height: 1;
}
[data-theme="dark"] .landing-v2 .hero-stat .num { color: var(--gold-400); }
.landing-v2 .hero-stat .lbl { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.landing-v2 .hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background:
    linear-gradient(135deg, rgba(22,52,95,.5), rgba(10,26,51,.85)),
    url('assets/img/medical-lab.jpg') center / cover;
}
.landing-v2 .hero-visual::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(198,161,91,.35), transparent 60%);
  mix-blend-mode: overlay;
}
.landing-v2 .floating-card {
  position: absolute;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  animation: float 6s ease-in-out infinite;
}
[data-theme="dark"] .landing-v2 .floating-card { border-color: rgba(255,255,255,.08); }
.landing-v2 .fc-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-950);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.landing-v2 .fc-icon svg { width: 22px; height: 22px; }
.landing-v2 .fc-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.landing-v2 .fc-sub { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.landing-v2 .fc-1 { top: 40px; inset-inline-start: -30px; animation-delay: 0s; }
.landing-v2 .fc-2 { bottom: 80px; inset-inline-end: -30px; animation-delay: -2s; }
.landing-v2 .fc-3 { top: 45%; inset-inline-end: -20px; animation-delay: -4s; }
.landing-v2 .deco-ring {
  position: absolute;
  border: 1.5px dashed var(--gold-500);
  border-radius: 50%;
  opacity: .3;
  pointer-events: none;
}
.landing-v2 .deco-ring-1 { width: 340px; height: 340px; top: -80px; inset-inline-end: -80px; animation: rotate 60s linear infinite; }
.landing-v2 .deco-ring-2 { width: 220px; height: 220px; bottom: -60px; inset-inline-start: -40px; animation: rotate 40s linear infinite reverse; }
.landing-v2 .marquee-strip {
  padding: 44px 0;
  background: var(--paper);
  border-block: 1px solid var(--line);
}
.landing-v2 .marquee-label {
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.landing-v2 .marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.landing-v2 .marquee-track {
  display: flex; gap: 48px; align-items: center;
  animation: marquee-rtl 40s linear infinite;
  width: max-content;
}
.landing-v2 .marquee-item {
  font-family: var(--font-num);
  font-size: 22px; font-weight: 700;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
  opacity: .7;
  transition: opacity var(--tr);
}
.landing-v2 .marquee-item:hover { opacity: 1; color: var(--navy-800); }
.landing-v2 .marquee-item svg { width: 24px; height: 24px; }
.landing-v2 .spec-section { padding: 100px 0; }
.landing-v2 .spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
}
.landing-v2 .spec-card {
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  transition: transform var(--tr), box-shadow var(--tr);
  border: 1px solid var(--line);
  background: var(--paper);
}
.landing-v2 .spec-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.landing-v2 .spec-card .sc-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--line-2);
  color: var(--navy-800);
}
[data-theme="dark"] .landing-v2 .spec-card .sc-icon { color: var(--gold-400); }
.landing-v2 .spec-card .sc-icon svg { width: 26px; height: 26px; }
.landing-v2 .spec-card h3 {
  font-size: 18px; font-weight: 700; line-height: 1.35;
  margin-bottom: 4px;
}
.landing-v2 .spec-card .sc-meta { font-size: 12.5px; color: var(--ink-2); }
.landing-v2 .spec-card .sc-arrow {
  position: absolute;
  top: 24px; inset-inline-end: 24px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--line-2);
  display: grid; place-items: center;
  transition: all var(--tr);
}
.landing-v2 .spec-card:hover .sc-arrow { background: var(--gold-500); color: var(--navy-950); transform: rotate(-45deg); }
.landing-v2 [dir="rtl"] .spec-card:hover .sc-arrow { transform: rotate(45deg); }
.landing-v2 .spec-card .sc-arrow svg { width: 16px; height: 16px; }
.landing-v2 .spec-card.big { grid-column: span 2; grid-row: span 2; }
.landing-v2 .spec-card.wide { grid-column: span 2; }
.landing-v2 .spec-card.featured {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
  color: #fff; border: none;
  overflow: hidden;
}
.landing-v2 .spec-card.featured::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(198,161,91,.2), transparent 55%);
}
.landing-v2 .spec-card.featured .sc-icon { background: rgba(198,161,91,.2); color: var(--gold-400); }
.landing-v2 .spec-card.featured .sc-meta { color: rgba(255,255,255,.7); }
.landing-v2 .spec-card.featured .sc-arrow { background: rgba(255,255,255,.15); color: #fff; }
.landing-v2 .spec-card.featured h3 { font-size: 26px; max-width: 240px; }
.landing-v2 .spec-card.featured p { font-size: 14px; line-height: 1.7; opacity: .85; margin-top: 8px; max-width: 320px; position: relative; z-index: 1; }
.landing-v2 .spec-card.gold {
  background: linear-gradient(135deg, var(--gold-100), #FFFBF0);
  border-color: transparent;
}
[data-theme="dark"] .landing-v2 .spec-card.gold {
  background: linear-gradient(135deg, rgba(198,161,91,.12), rgba(198,161,91,.04));
}
.landing-v2 .features { padding: 100px 0; background: var(--paper); border-block: 1px solid var(--line); }
.landing-v2 .features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.landing-v2 .feature {
  padding: 32px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  position: relative;
  transition: all var(--tr);
}
.landing-v2 .feature:hover { border-color: var(--gold-500); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.landing-v2 .feature .f-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--gold-400);
  display: grid; place-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.landing-v2 .feature .f-icon svg { width: 28px; height: 28px; }
.landing-v2 .feature h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.landing-v2 .feature p { font-size: 14.5px; color: var(--ink-2); line-height: 1.85; }
.landing-v2 .feature .f-num {
  position: absolute;
  top: 24px; inset-inline-end: 24px;
  font-family: var(--font-num);
  font-size: 40px; font-weight: 800;
  color: var(--line);
  line-height: 1;
}
[data-theme="dark"] .landing-v2 .feature .f-num { color: var(--paper-2); }
.landing-v2 .courses-section { padding: 100px 0; }
.landing-v2 .courses-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 44px; flex-wrap: wrap;
}
.landing-v2 .tabs-row { display: flex; gap: 8px; flex-wrap: wrap; }
.landing-v2 .tab {
  padding: 9px 18px; border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  transition: all var(--tr-fast);
}
.landing-v2 .tab:hover { border-color: var(--navy-800); color: var(--navy-800); }
.landing-v2 .tab.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
[data-theme="dark"] .landing-v2 .tab.active { background: var(--navy-500); border-color: var(--navy-500); }
.landing-v2 .courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.landing-v2 .course {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--tr);
  display: flex; flex-direction: column;
}
.landing-v2 .course:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.landing-v2 .course-cover {
  aspect-ratio: 16 / 10;
  position: relative;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  overflow: hidden;
}
.landing-v2 .course-cover::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(198,161,91,.3), transparent 60%),
    repeating-linear-gradient(-45deg, transparent 0 20px, rgba(255,255,255,.03) 20px 21px);
}
.landing-v2 .course-cover.c2 { background: linear-gradient(135deg, #2A557F, #16345F); }
.landing-v2 .course-cover.c3 { background: linear-gradient(135deg, #9C7C3C, #C6A15B); }
.landing-v2 .course-cover .c-emblem {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-num);
  font-size: 80px; font-weight: 800;
  color: rgba(255,255,255,.08);
  letter-spacing: -.05em;
}
.landing-v2 .course-cover .c-tag {
  position: absolute; top: 14px; inset-inline-start: 14px;
  padding: 5px 12px;
  background: rgba(255,255,255,.95);
  color: var(--navy-800);
  font-size: 11.5px; font-weight: 700;
  border-radius: var(--r-pill);
  z-index: 1;
}
.landing-v2 .course-cover .c-price {
  position: absolute; top: 14px; inset-inline-end: 14px;
  padding: 5px 12px;
  background: rgba(10,26,51,.7);
  backdrop-filter: blur(8px);
  color: var(--gold-400);
  font-family: var(--font-num);
  font-size: 13px; font-weight: 700;
  border-radius: var(--r-pill);
  z-index: 1;
}
.landing-v2 .course-body { padding: 22px; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.landing-v2 .course-body .c-cat {
  font-size: 12px; font-weight: 700; color: var(--gold-600);
  letter-spacing: .05em;
}
[data-theme="dark"] .landing-v2 .course-body .c-cat { color: var(--gold-400); }
.landing-v2 .course-body h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }
.landing-v2 .course-body p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.landing-v2 .course-meta {
  display: flex; gap: 18px; margin-top: auto;
  padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.landing-v2 .course-meta span { display: inline-flex; align-items: center; gap: 5px; }
.landing-v2 .course-meta svg { width: 14px; height: 14px; color: var(--gold-500); }
.landing-v2 .instructors-section { padding: 100px 0; background: var(--paper); border-block: 1px solid var(--line); }
.landing-v2 .instructors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.landing-v2 .instructor {
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  transition: all var(--tr);
  position: relative;
}
.landing-v2 .instructor:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.landing-v2 .inst-photo {
  aspect-ratio: 1;
  position: relative;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  overflow: hidden;
}
.landing-v2 .inst-photo.i2 { background: linear-gradient(135deg, #A5813F, #9C7C3C); }
.landing-v2 .inst-photo.i3 { background: linear-gradient(135deg, #2A557F, #16345F); }
.landing-v2 .inst-photo.i4 { background: linear-gradient(135deg, #3E6DA0, #2A557F); }
.landing-v2 .inst-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,.03) 20px 21px);
}
.landing-v2 .inst-initial {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-num);
  font-size: 96px; font-weight: 800;
  color: rgba(255,255,255,.15);
}
.landing-v2 .inst-badge {
  position: absolute; top: 14px; inset-inline-end: 14px;
  padding: 5px 12px;
  background: var(--gold-500);
  color: var(--navy-950);
  font-size: 11px; font-weight: 700;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px;
}
.landing-v2 .inst-badge svg { width: 12px; height: 12px; }
.landing-v2 .inst-body { padding: 18px 20px 22px; }
.landing-v2 .inst-body h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.landing-v2 .inst-body .inst-role { font-size: 13px; color: var(--ink-2); }
.landing-v2 .inst-body .inst-stats {
  display: flex; gap: 16px; margin-top: 14px;
  font-size: 12px; color: var(--ink-2);
}
.landing-v2 .inst-body .inst-stats span { display: inline-flex; align-items: center; gap: 5px; }
.landing-v2 .inst-body .inst-stats svg { width: 13px; height: 13px; color: var(--gold-500); }
.landing-v2 .test-section { padding: 100px 0; overflow: hidden; }
.landing-v2 .test-slider { position: relative; max-width: 780px; margin: 0 auto; overflow: hidden; }
.landing-v2 .t-track {
  display: flex;
  transition: transform .7s cubic-bezier(.16,.84,.3,1);
  width: 100%;
}
.landing-v2 .t-card {
  min-width: 100%;
  padding: 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  position: relative;
}
.landing-v2 .t-quote {
  font-size: 60px; font-weight: 800;
  color: var(--gold-500);
  line-height: 1;
  font-family: 'Sora', serif;
  margin-bottom: 6px;
}
.landing-v2 .t-text {
  font-size: 19px; line-height: 1.9;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 24px;
}
.landing-v2 .t-person { display: flex; align-items: center; justify-content: center; gap: 14px; }
.landing-v2 .t-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--gold-500));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 20px;
}
.landing-v2 .t-info { text-align: start; }
.landing-v2 .t-name { font-weight: 700; font-size: 15px; }
.landing-v2 .t-role { font-size: 12.5px; color: var(--ink-2); }
.landing-v2 .t-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.landing-v2 .t-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: all var(--tr-fast);
}
.landing-v2 .t-dot.on { width: 26px; background: var(--gold-500); border-radius: 4px; }
.landing-v2 .faq-section { padding: 100px 0; background: var(--paper); border-block: 1px solid var(--line); }
.landing-v2 .faq-wrap { max-width: 800px; margin: 0 auto; }
.landing-v2 .faq-item {
  border-bottom: 1px solid var(--line);
}
.landing-v2 .faq-q {
  width: 100%;
  padding: 22px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 17px; font-weight: 600;
  text-align: start;
  color: var(--ink);
}
.landing-v2 .faq-q .faq-plus {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--line-2);
  display: grid; place-items: center;
  flex: 0 0 auto;
  color: var(--navy-800);
  transition: all var(--tr);
}
[data-theme="dark"] .landing-v2 .faq-q .faq-plus { color: var(--gold-400); }
.landing-v2 .faq-q .faq-plus svg { width: 16px; height: 16px; transition: transform var(--tr); }
.landing-v2 .faq-item.open .faq-q .faq-plus { background: var(--navy-800); color: #fff; transform: rotate(45deg); }
[data-theme="dark"] .landing-v2 .faq-item.open .faq-q .faq-plus { background: var(--gold-500); color: var(--navy-950); }
.landing-v2 .faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height var(--tr-slow), padding var(--tr);
  padding: 0 8px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.9;
}
.landing-v2 .faq-item.open .faq-a { max-height: 300px; padding: 0 8px 24px; }
.landing-v2 .request-section { padding: 100px 0; }
.landing-v2 .request-card {
  border-radius: 28px;
  padding: 60px 48px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.landing-v2 .request-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(198,161,91,.3), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(110,155,214,.25), transparent 50%);
}
.landing-v2 .request-card::after {
  content: "";
  position: absolute;
  top: -100px; inset-inline-end: -100px;
  width: 400px; height: 400px;
  border: 2px dashed rgba(198,161,91,.3);
  border-radius: 50%;
  animation: rotate 40s linear infinite;
}
.landing-v2 .request-content { position: relative; z-index: 1; }
.landing-v2 .request-content h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.landing-v2 .request-content p { font-size: 16px; opacity: .85; line-height: 1.9; max-width: 480px; margin-bottom: 28px; }
.landing-v2 .request-content .btn-white { padding: 15px 32px; font-size: 16px; }
.landing-v2 .request-visual {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.landing-v2 .request-icon-lg {
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(198,161,91,.15);
  border: 1px solid rgba(198,161,91,.3);
  display: grid; place-items: center;
  backdrop-filter: blur(20px);
  color: var(--gold-400);
  animation: float 6s ease-in-out infinite;
}
.landing-v2 .request-icon-lg svg { width: 90px; height: 90px; }
@media (max-width: 1000px) {
.landing-v2 .hero-grid { grid-template-columns: 1fr; gap: 40px; }
.landing-v2 .hero-visual { max-width: 500px; margin: 0 auto; }
.landing-v2 .spec-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
.landing-v2 .spec-card.big { grid-column: span 2; }
.landing-v2 .spec-card.wide { grid-column: span 2; }
.landing-v2 .features-grid { grid-template-columns: 1fr; }
.landing-v2 .courses-grid { grid-template-columns: repeat(2, 1fr); }
.landing-v2 .instructors-grid { grid-template-columns: repeat(2, 1fr); }
.landing-v2 .request-card { grid-template-columns: 1fr; text-align: center; padding: 44px 28px; }
.landing-v2 .request-content p { margin-inline: auto; }
}
@media (max-width: 600px) {
.landing-v2 .hero { padding: 40px 0 60px; }
.landing-v2 .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px; }
.landing-v2 .hero-stats > :nth-child(3) { grid-column: span 2; }
.landing-v2 .floating-card { display: none; }
.landing-v2 .courses-grid { grid-template-columns: 1fr; }
.landing-v2 .instructors-grid { grid-template-columns: 1fr 1fr; }
.landing-v2 .spec-grid { grid-template-columns: 1fr; }
.landing-v2 .spec-card.big, .landing-v2 .spec-card.wide { grid-column: span 1; }
.landing-v2 .request-card { padding: 36px 22px; }
.landing-v2 .request-icon-lg { width: 140px; height: 140px; }
.landing-v2 .t-card { padding: 32px 22px; }
.landing-v2 .t-text { font-size: 16px; }
}


/* ═══ بطاقة ملخّص الباقة (تصميم داكن أنيق) ═══ */
.bundle-bar { padding: 0 12px 12px; pointer-events: none; }
.bundle-card-dark {
    pointer-events: auto;
    background: linear-gradient(160deg, #16233c, #0f1b30 70%, #0b1526);
    color: #E7EDF6; border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px; padding: 18px 20px;
    box-shadow: 0 -6px 30px rgba(9,20,40,.35), 0 10px 40px rgba(9,20,40,.4);
    max-height: 76vh; overflow-y: auto;
}
.bcd-empty, .bcd-access { color: #A8B7D0; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.bcd-empty { justify-content: center; padding: 6px 0; }
.bcd-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bcd-head strong { font-size: 18px; }
.bcd-count { background: rgba(198,161,91,.16); color: #D9BC7E; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.bcd-tiers { margin-bottom: 14px; }
.bcd-tiers-head { display: flex; justify-content: space-between; font-size: 14px; color: #C9D3E7; margin-bottom: 8px; }
.bcd-tier-val { color: #4FBE8E; font-weight: 700; }
.bcd-steps { display: flex; gap: 6px; }
.bcd-step { flex: 1; text-align: center; }
.bcd-step .bcd-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255,255,255,.10); transition: background .25s; }
.bcd-step.on .bcd-bar { background: linear-gradient(90deg, #D9BC7E, #C6A15B); }
.bcd-step-lbl { display: block; font-size: 11.5px; color: #7B89A5; margin-top: 5px; }
.bcd-step.on .bcd-step-lbl { color: #C9D3E7; }
.bcd-lines { margin-bottom: 12px; }
.bcd-line { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: #C9D3E7; }
.bcd-line.save { color: #4FBE8E; font-weight: 600; }
.bcd-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 12px; margin-top: 4px; }
.bcd-total > span { font-size: 16px; font-weight: 700; }
.bcd-total strong { font-size: 34px; font-weight: 800; font-family: 'Sora', sans-serif; letter-spacing: -.01em; }
.bcd-total strong span { font-size: 15px; font-weight: 600; color: #A8B7D0; }
.bcd-saved { background: rgba(79,190,142,.14); color: #6FD3A6; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.bcd-maxed { background: rgba(255,255,255,.05); color: #C9D3E7; border-radius: 12px; padding: 11px 14px; font-size: 13.5px; margin-top: 10px; text-align: center; }
.bcd-cta { margin-top: 14px; background: linear-gradient(135deg, #A9B8FF, #8FA2F5); color: #16233c; font-size: 17px; font-weight: 800; padding: 15px; border-radius: 14px; }
.bcd-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.bcd-tabby { text-align: center; margin-top: 12px; font-size: 13px; color: #A8B7D0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.bcd-chip { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 4px 10px; font-weight: 700; font-size: 12.5px; color: #E7EDF6; }
.bcd-access { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); align-items: flex-start; line-height: 1.7; }
.bcd-access strong { color: #E7EDF6; }
@media (max-width: 560px) { .bundle-card-dark { padding: 15px 16px; max-height: 82vh; } .bcd-total strong { font-size: 28px; } }

/* ═══ تخطيط صفحة الباقات (عمودان: ملخّص يساري + مواد) ═══ */
.bundles-layout { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.bundles-aside { position: sticky; top: 84px; order: 2; }
.bundles-main { order: 1; }
.bundles-head { margin-bottom: 16px; }
.bundle-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.bf-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border, #e2e8f0); background: var(--surface, #fff); color: var(--text-2, #5b6b82); font-size: 14px; font-weight: 600; cursor: pointer; transition: .18s; }
.bf-tab:hover { border-color: var(--gold, #C6A15B); color: var(--text, #16233c); }
.bf-tab.active { background: var(--gold, #C6A15B); border-color: var(--gold, #C6A15B); color: #16233c; font-weight: 700; box-shadow: 0 4px 14px rgba(198,161,91,.28); }
.bundle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bundle-card { border: 2px solid var(--border, #e8eef5); border-radius: 14px; padding: 14px; cursor: pointer; transition: .18s; background: var(--surface, #fff); }
.bundle-card:hover { border-color: var(--gold-light, #E0C588); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,37,68,.08); }
.bundle-card.picked { border-color: var(--gold, #C6A15B); background: var(--gold-tint, #FBF7EE); }
.bc-top { display: flex; align-items: flex-start; gap: 10px; }
.bc-check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--border, #cbd5e1); background: var(--surface, #fff); color: #fff; display: grid; place-items: center; flex: 0 0 auto; transition: .18s; }
.bundle-card.picked .bc-check { background: var(--gold, #C6A15B); border-color: var(--gold, #C6A15B); }
.bc-titles { flex: 1; min-width: 0; }
.bc-name { font-weight: 700; font-size: 15px; color: var(--text, #16233c); line-height: 1.4; }
.bc-spec { font-size: 12.5px; color: var(--text-3, #8595ab); margin-top: 2px; }
.bc-price { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border, #e8eef5); }
.bc-after { font-weight: 800; font-size: 20px; color: var(--gold-deep, #9C7C3C); font-family: 'Sora', sans-serif; }
.bc-base { text-decoration: line-through; opacity: .45; font-size: 13px; }
.bc-cur { font-size: 12px; color: var(--text-2, #5b6b82); }

/* البطاقة الداكنة داخل التخطيط الجانبي (تُلغي التثبيت السفلي على الكمبيوتر) */
.bundles-aside .bundle-card-dark { position: static; max-width: none; max-height: none; box-shadow: 0 10px 40px rgba(9,20,40,.16); }

/* الجوال: عمود واحد + البطاقة تصير شريطاً سفلياً ثابتاً */
@media (max-width: 860px) {
    .bundles-layout { grid-template-columns: 1fr; padding-bottom: 40px; }
    .bundles-aside { position: static; inset-inline: auto; bottom: auto; top: auto; z-index: auto; padding: 0; margin-top: 16px; }
    .bundles-aside .bundle-card-dark { max-width: 640px; margin: 0 auto; max-height: none; overflow: visible; box-shadow: 0 10px 40px rgba(9,20,40,.16); }
    .bundles-main { order: -1; }
}

/* ═══ بانر إعلان الباقات (الصفحة الرئيسية — فوق التخصصات) ═══ */
.bundle-promo {
    display: block; width: 100%; text-align: center; cursor: pointer;
    background: linear-gradient(150deg, #16233c 0%, #12203a 55%, #0d1a30 100%);
    border: 1px solid rgba(198,161,91,.28); border-radius: 22px;
    padding: 34px 28px; margin: 10px 0 40px; position: relative; overflow: hidden;
    transition: transform .2s, box-shadow .2s; box-shadow: 0 12px 40px rgba(9,20,40,.18);
}
.bundle-promo::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 200px at 80% 0%, rgba(198,161,91,.14), transparent 60%),
                radial-gradient(500px 240px at 15% 100%, rgba(42,85,127,.22), transparent 60%);
}
.bundle-promo:hover { transform: translateY(-2px); box-shadow: 0 18px 50px rgba(9,20,40,.28); }
.bp-badge {
    display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
    color: #D9BC7E; font-size: 13.5px; font-weight: 700; padding: 8px 18px; border-radius: 999px;
}
.bp-title {
    display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
    position: relative; z-index: 1; margin: 18px 0 12px;
    font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: #fff; letter-spacing: -.01em;
}
.bp-off {
    background: linear-gradient(135deg, #E8D2A0, #C6A15B); color: #16233c;
    font-family: 'Sora', sans-serif; font-size: clamp(30px, 4.6vw, 48px); font-weight: 800;
    padding: 6px 18px; border-radius: 16px; box-shadow: 0 10px 26px rgba(198,161,91,.34);
    transform: rotate(-3deg); display: inline-block;
}
.bp-sub {
    display: block; position: relative; z-index: 1; max-width: 680px; margin: 0 auto;
    color: #A8B7D0; font-size: 15px; line-height: 1.9;
}
.bp-sub strong { color: #D9BC7E; }
@media (max-width: 560px) {
    .bundle-promo { padding: 26px 18px; border-radius: 18px; }
    .bp-title { gap: 10px; }
}

/* ═══ الباقات المُدرجة في الصفحة الرئيسية (تحت البانر) ═══ */
.bundles-inline { margin-bottom: 40px; }
.bundles-inline .bundles-layout { padding: 0; max-width: none; }
.bundles-inline .bundles-head { display: none; }           /* البانر فوقه يُغني عن العنوان */
.bundles-inline .bundles-aside { position: sticky; top: 84px; }
/* على الجوال: لا تثبيت سفلي داخل الرئيسية — البطاقة تتدفّق طبيعياً */
@media (max-width: 860px) {
    .bundles-inline .bundles-aside { position: static; padding: 0; margin-top: 16px; }
    .bundles-inline .bundles-aside .bundle-card-dark { max-height: none; box-shadow: 0 10px 40px rgba(9,20,40,.16); }
    .bundles-inline .bundles-layout { padding-bottom: 0; }
}

/* زر الفيديو التعريفي داخل بطاقة الباقة */
.bc-intro {
    margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px;
    background: rgba(198,161,91,.12); color: var(--gold-deep, #9C7C3C);
    border: 1px solid rgba(198,161,91,.3); border-radius: 8px;
    padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s;
}
.bc-intro:hover { background: var(--gold, #C6A15B); color: #fff; border-color: var(--gold, #C6A15B); }

/* فلتر الجامعة في الباقات */
.bundle-uni-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.buf-label { font-weight: 700; font-size: 14px; color: var(--text, #16233c); display: inline-flex; align-items: center; gap: 6px; }
.bundle-uni-filter select { max-width: 320px; min-width: 200px; }

/* زر تفريغ السلة + شطب الإجمالي */
.bcd-clear { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; margin-top:8px; padding:8px; background:transparent; border:1px solid rgba(255,255,255,.18); border-radius:10px; color:#cbd5e1; font-size:13px; font-weight:700; cursor:pointer; transition:.15s; }
.bcd-clear:hover { background:rgba(239,68,68,.15); border-color:rgba(239,68,68,.5); color:#fff; }
.bcd-strike { opacity:.55; font-size:.72em; font-weight:600; text-decoration:line-through; }

/* زر الطي غير مستخدم — البطاقة تنساب تحت المواد على الجوال */
.bcd-toggle { display: none !important; }
.bcd-body { display: block !important; }


/* ═══ بطاقات الخطوات الثلاث (الباقات) ═══ */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0 20px; }
.step-card { position: relative; background: var(--surface, #fff); border: 1px solid var(--border, #e8eef5); border-radius: 14px; padding: 18px 16px 16px; transition: .18s; }
.step-card:hover { border-color: var(--gold-light, #E0C588); box-shadow: 0 6px 18px rgba(15,37,68,.07); transform: translateY(-2px); }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #E8D2A0, #C6A15B); color: #16233c; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 17px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(198,161,91,.3); }
.step-card h4 { margin: 0 0 6px; font-size: 15.5px; font-weight: 800; color: var(--text, #16233c); }
.step-card p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-2, #5b6b82); }
@media (max-width: 720px) { .steps-row { grid-template-columns: 1fr; } }

/* زر معرض العروض التعريفية + المعرض */
.intro-gallery-btn { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; background: rgba(198,161,91,.12); color: var(--gold-deep,#9C7C3C); border: 1px solid rgba(198,161,91,.3); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .15s; }
.intro-gallery-btn:hover { background: var(--gold,#C6A15B); color: #fff; border-color: var(--gold,#C6A15B); }
.intro-gallery { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.intro-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border,#e8eef5); border-radius: 12px; background: var(--surface,#fff); }
.intro-row-spec { font-size: 12px; color: var(--text-3,#8595ab); display: inline-flex; align-items: center; gap: 5px; }
.intro-row-subj { font-weight: 700; font-size: 15px; color: var(--text,#16233c); margin-top: 2px; }
.intro-play-btn { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--gold,#C6A15B); color: #fff; display: grid; place-items: center; cursor: pointer; transition: .15s; }
.intro-play-btn:hover { background: var(--gold-deep,#9C7C3C); transform: scale(1.08); }

/* شارات تابي وتمارا */
.pay-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 8px; font-weight: 800; font-size: 13px; letter-spacing: .3px; }
.pay-tabby { background: #3fe0c5; color: #04263b; }
.pay-tamara { background: linear-gradient(135deg, #E8D2A0 0%, #C6A15B 55%, #9C7C3C 100%); color: #1A2B3E; box-shadow: 0 3px 10px rgba(198,161,91,.32); }

/* صندوق طلب مادة غير مدرجة */
.missing-material { display: block; width: 100%; text-align: center; cursor: pointer; margin-top: 18px; padding: 20px 18px; background: var(--surface-2,#f4f6fa); border: 2px dashed var(--border,#cbd5e1); border-radius: 14px; transition: .15s; }
.missing-material:hover { border-color: var(--gold,#C6A15B); background: var(--gold-tint,#FBF7EE); }
.mm-title { font-weight: 800; font-size: 16px; color: var(--text,#16233c); display: inline-flex; align-items: center; gap: 8px; }
.mm-sub { font-size: 13.5px; color: var(--text-2,#5b6b82); margin-top: 6px; }

/* نص توضيحي أسفل بطاقة الباقة */
.bcd-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11.5px; line-height: 1.7; color: rgba(203,213,225,.7); }

/* شروط أسفل مواد الباقة */
.bundle-terms { margin: 18px 2px 0; padding: 14px 16px; background: var(--surface-2,#f4f6fa); border-radius: 12px; font-size: 12.5px; line-height: 1.8; color: var(--text-2,#5b6b82); }

/* الحالة الفارغة المصمّمة لبطاقة باقتك */
.bcd-empty-hero { text-align: center; padding: 22px 8px 18px; color: #fff; }
.bcd-empty-hero svg { color: var(--gold, #C6A15B); opacity: .9; }
.bcd-empty-title { font-size: 17px; font-weight: 800; margin-top: 10px; }
.bcd-empty-sub { font-size: 13px; color: #A8B7D0; margin-top: 6px; line-height: 1.7; }
.bcd-empty-perks { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.bcd-perk { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #CBD5E1; }
.bcd-perk svg { color: var(--gold, #C6A15B); flex: 0 0 auto; }
.bcd-perk b { color: #fff; }

/* تحسين بطاقات الخطوات ١-٢-٣ */
.step-card { padding-top: 20px; text-align: center; overflow: hidden; }
.step-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; background: linear-gradient(150deg, #FBF7EE, #F2E6CB); color: var(--gold-deep, #9C7C3C); }
.step-card .step-num { position: absolute; top: 12px; inset-inline-end: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold, #C6A15B); color: #fff; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 14px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(198,161,91,.35); }
.step-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold-light,#E0C588), var(--gold,#C6A15B)); opacity: 0; transition: .2s; }
.step-card:hover::after { opacity: 1; }

/* بطاقة لا تجد مادتك — أفقية بأيقونة */
.missing-material { display: flex; align-items: center; gap: 16px; text-align: start; }
.mm-ico { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface,#fff); border: 2px dashed var(--gold-light,#E0C588); color: var(--gold-deep,#9C7C3C); }
.mm-text { flex: 1; }
.missing-material .mm-title { justify-content: flex-start; }
.mm-arrow { flex: 0 0 auto; color: var(--gold,#C6A15B); opacity: .7; transition: .2s; }
.missing-material:hover .mm-arrow { opacity: 1; transform: translateX(-4px); }
.missing-material:hover .mm-ico { border-style: solid; background: var(--gold,#C6A15B); color: #fff; border-color: var(--gold,#C6A15B); }
