/* =========================================================
   تصميم منصة قِمَّة - يدعم العربية (RTL) والإنجليزية (LTR)
   ========================================================= */

:root {
    --primary: var(--primary);      /* أخضر يوحي بالنمو والقمة */
    --primary-dark: var(--primary-dark);
    --accent: var(--accent);       /* ذهبي للقمة/التميز */
    --bg: var(--bg);
    --text: var(--text);
    --muted: var(--muted);
    --white: var(--surface);
    --border: var(--border);
    --danger: var(--danger);
    --success: #1f9d55;
    --radius: 12px;

    /* ====================================================================
       سلّم الحجم المرن الموحَّد للنص — المرحلة 1 من نظام التجاوب الموحَّد
       ====================================================================
       كل مستوى يستخدم clamp(الحد الأدنى, قيمة متدرجة مع عرض الشاشة, الحد
       الأقصى). الحد الأقصى هو نفس الحجم الحالي بالضبط على شاشة سطح المكتب
       (فلا يتغيّر المظهر الحالي إطلاقاً على الشاشات الكبيرة)، بينما يتقلّص
       تدريجياً وبسلاسة كل ما ضاقت الشاشة، بدل التجمّد عند حجم ثابت وحيد.
       عشرة مستويات فقط تغطي كل الأحجام المستخدمة حالياً بالمنصة. */
    --fs-2xs:  clamp(0.4375rem, 0.4rem + 0.15vw, 0.5rem);     /* 7 → 8px */
    --fs-xs:   clamp(0.59rem, 0.55rem + 0.2vw, 0.72rem);      /* 9.5 → 11.5px */
    --fs-sm:   clamp(0.72rem, 0.68rem + 0.2vw, 0.84rem);      /* 11.5 → 13.5px */
    --fs-base: clamp(0.81rem, 0.78rem + 0.2vw, 0.9375rem);    /* 13 → 15px */
    --fs-md:   clamp(0.9375rem, 0.9rem + 0.25vw, 1.0625rem);  /* 15 → 17px */
    --fs-lg:   clamp(1.03rem, 1rem + 0.3vw, 1.25rem);         /* 16.5 → 20px */
    --fs-xl:   clamp(1.19rem, 1.1rem + 0.4vw, 1.5rem);        /* 19 → 24px */
    --fs-2xl:  clamp(1.44rem, 1.3rem + 0.5vw, 1.75rem);       /* 23 → 28px */
    --fs-3xl:  clamp(1.625rem, 1.4rem + 0.7vw, 2.125rem);     /* 26 → 34px */
    --fs-4xl:  clamp(1.875rem, 1.6rem + 1vw, 2.875rem);       /* 30 → 46px */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: hidden; }
body {
    font-family: 'Cairo', 'Tahoma', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size:var(--fs-md);
    
    max-width: 100vw;
}

body.lang-en { font-family: 'Segoe UI', Arial, sans-serif; }

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* -------------------- الهيدر -------------------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-size:var(--fs-xl);
    font-weight: bold;
    color: var(--primary);
}

.logo span { color: var(--accent-text, var(--accent)); }

.main-nav ul {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    font-weight: 600;
    color: var(--text);
    transition: color .2s;
}

.main-nav a:hover { color: var(--primary); }

.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all .2s;
    font-size:var(--fs-base);
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 25%, transparent); }

.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-accent { background: var(--accent); color: var(--on-accent, var(--white)); }
.btn-accent:hover { opacity: .9; }

.lang-switch {
    font-size:var(--fs-sm);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--muted);
}

/* قائمة الجوال */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size:var(--fs-2xl);
    cursor: pointer;
    color: var(--primary);
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}


.hero-eyebrow-text {
    font-weight: 700;
    color: var(--accent);
    font-size:var(--fs-base);
    margin-bottom: 10px;
    letter-spacing: .2px;
}

.hero-subtitle-text {
    font-size:var(--fs-md);
    line-height: 1.8;
}



/* -------- الهيرو: عمودين حقيقيين عبر Grid (يمين=نص، يسار=صورة، بدون تلاعب flex مع RTL) -------- */
.hero-v4 {
    position: relative;
    overflow: hidden;
    padding: 40px 0 30px;
}

.hero-v4-bg-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* تدرج يضمن وضوح النص فوق الصورة أياً كان محتواها: صلب من جهة النص، شفاف تماماً بالجهة الأخرى */
.hero-v4-bg-fade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to left, var(--bg) 0%, var(--bg) 48%, rgba(247,249,247,.9) 58%, rgba(247,249,247,.35) 74%, rgba(247,249,247,0) 92%);
}

.hero-v4-grid {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 400px;
}

.hero-v4-text {
    max-width: 540px;
    padding: 10px 0;
}

.hero-v4-text h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.35;
    margin-bottom: 16px;
}

@media (max-width: 860px) {
    .hero-v4 { min-height: 0; }
    .hero-v4-bg-fade { background: rgba(247,249,247,.88); }
    .hero-v4-text { max-width: 100%; text-align: center; margin: 0 auto; }
    .hero-actions { justify-content: center; }
}

/* -------- الشريط الذهبي التفاعلي أسفل الهيرو -------- */
.hero-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--accent-light) 0%, var(--accent) 100%);
    border-radius: 40px;
    padding: 6px 28px;
    margin-top: 26px;
    gap: 10px;
}

.hero-strip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 30px;
    color: var(--primary-dark);
    transition: background .15s, transform .15s;
    flex: 1;
    justify-content: center;
}

.hero-strip-item:hover { background: rgba(255,255,255,.3); transform: translateY(-2px); }

.hero-strip-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-strip-text { display: flex; flex-direction: column; line-height: 1.3; text-align: start; }
.hero-strip-text strong { font-size:var(--fs-sm); font-weight: 800; }
.hero-strip-text small { font-size:var(--fs-xs); opacity: .85; }

.hero-strip-sep { width: 1px; height: 34px; background: rgba(9,74,53,.25); flex-shrink: 0; }

@media (max-width: 700px) {
    .hero-strip { flex-direction: column; border-radius: 20px; padding: 10px; gap: 4px; }
    .hero-strip-sep { display: none; }
    .hero-strip-item { width: 100%; }
}


.course-hero-banner {
    background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 40px 0;
}

.course-hero-thumb {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    flex-shrink: 0;
}


/* شاشات اللابتوب المتوسطة */
@media (max-width: 1180px) and (min-width: 861px) {
    .hero-v4-text h1 { font-size: clamp(24px, 3.4vw, 34px); }
}

@media (max-width: 860px) {
    .hero-actions { justify-content: center; }
}

/* الجوالات الصغيرة */
@media (max-width: 480px) {
    .hero-badges { grid-template-columns: 1fr; }
    .hero-badge { font-size:var(--fs-sm); padding: 10px 12px; }
    .hero-stat { font-size:var(--fs-xs); }
    .hero-photo { min-height: 220px; }
}

/* -------------------- الأقسام -------------------- */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(22px, 3vw, 30px);
    margin-bottom: 40px;
    color: var(--primary-dark);
    font-weight: 800;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 4px;
    border-radius: 4px;
    background: var(--accent);
}

/* -------- لماذا قِمّة (بطاقات أفقية) -------- */
.features-grid-h {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 780px;
    margin: 0 auto;
}

.feature-card-h {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}

.feature-card-h:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.06); }

.feature-card-h-highlight { border: 2px solid var(--accent); background: var(--accent-subtle); }

.feature-icon-h {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-xl);
    flex-shrink: 0;
}

.feature-card-h-highlight .feature-icon-h { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

.feature-card-h-text { flex: 1; }
.feature-card-h-text h3 { font-size:var(--fs-md); margin-bottom: 3px; color: var(--primary-dark); }
.feature-card-h-text p { font-size:var(--fs-sm); color: var(--muted); margin: 0; }

.feature-card-h-arrow { color: var(--muted); font-size:var(--fs-md); flex-shrink: 0; }

/* -------- شريط إحصائيات المنصة (أرقام حقيقية) -------- */
.platform-stats-bar {
    background: var(--primary-dark);
    padding: 28px 0;
}

.platform-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.platform-stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
}

.platform-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-lg);
    flex-shrink: 0;
}

.platform-stat-item strong { display: block; font-size:var(--fs-xl); font-weight: 800; }
.platform-stat-item span { font-size:var(--fs-sm); opacity: .85; }

@media (max-width: 700px) {
    .platform-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* -------- رأس قسم أحدث الدورات -------- */
.latest-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.latest-courses-viewall {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 18px;
    font-size:var(--fs-sm);
    font-weight: 700;
    color: var(--primary);
}
.latest-courses-viewall:hover { background: var(--bg); }

@media (max-width: 600px) {
    .latest-courses-header { flex-direction: column-reverse; gap: 14px; align-items: stretch; text-align: center; }
}

/* -------- إضافات بطاقة الدورة الجديدة -------- */
.course-fav-btn {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    color: var(--muted);
    font-size:var(--fs-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.course-fav-btn.is-fav { color: #e0455f; }

.course-play-overlay {
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(9,74,53,.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-sm);
    opacity: 0;
    transition: opacity .2s;
}
.course-cover-v2:hover .course-play-overlay { opacity: 1; }

.course-subject-badge {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    background: rgba(9,74,53,.75);
    color: #fff;
    font-size:var(--fs-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.course-meta-row {
    display: flex;
    gap: 14px;
    font-size:var(--fs-sm);
    color: var(--muted);
    margin-bottom: 8px;
}

.course-view-btn {
    display: block;
    text-align: center;
    background: #fdf3e0;
    color: var(--primary-dark);
    font-weight: 700;
    font-size:var(--fs-sm);
    padding: 9px;
    border-radius: 10px;
    margin-top: 10px;
}
.course-view-btn:hover { background: var(--accent); color: #fff; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--white);
    padding: 32px 24px 28px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    transition: transform .18s, box-shadow .18s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.features-grid .feature-card:nth-child(2) { border-top-color: var(--accent); }
.features-grid .feature-card:nth-child(3) { border-top-color: var(--primary-light); }

.features-grid .feature-card:nth-child(2) .feature-icon { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.features-grid .feature-card:nth-child(3) .feature-icon { background: rgba(47,143,122,.12); color: var(--primary-light); }

.feature-icon {
    width: 56px;
    height: 56px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-2xl);
    margin: 0 auto 16px;
}

.feature-card h3 { margin-bottom: 8px; font-size:var(--fs-md); }
.feature-card p { color: var(--muted); font-size:var(--fs-base); }

/* -------------------- بطاقات الدورات -------------------- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .courses-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .courses-grid { grid-template-columns: 1fr; }
}

.course-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.course-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.course-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size:var(--fs-md); margin-bottom: 8px; }
.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    font-size:var(--fs-sm);
    color: var(--muted);
}

.course-price { color: var(--primary); font-weight: 800; font-size:var(--fs-md); }
.course-price-free { font-size:var(--fs-lg); color: var(--success); }

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 46px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    font-size:var(--fs-base);
}

.empty-state::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7c76' stroke-width='1.6'%3E%3Cpath d='M3 7h18v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M3 7l3-4h12l3 4'/%3E%3Cpath d='M9 11h6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px;
}

/* -------------------- نماذج (تسجيل / دخول) -------------------- */
.auth-wrap {
    max-width: 460px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-wrap {
    padding: 50px 0;
    background: linear-gradient(180deg, var(--surface-muted) 0%, var(--bg) 100%);
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
}

.auth-card {
    background: var(--white);
    padding: 38px 32px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    box-shadow: 0 12px 32px rgba(9,74,53,.08);
    position: relative;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary-dark);
}


.lesson-back-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 16px;
}

.lesson-progress-bar-wrap { margin-bottom: 16px; }

.lesson-progress-bar-bg {
    background: var(--border);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.lesson-progress-bar-fill {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    height: 100%;
    border-radius: 20px;
    transition: width .4s ease;
}

.lesson-progress-bar-text {
    font-size:var(--fs-sm);
    font-weight: 700;
    color: var(--muted);
}

.lesson-video-frame {
    padding: 8px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 16px 36px rgba(0,0,0,.14);
}

.lesson-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 13px;
    background: #000;
}

.lesson-video-wrap iframe {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lesson-completed-banner {
    background: rgba(31,157,85,.1);
    color: var(--success);
    border: 1px solid rgba(31,157,85,.3);
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 700;
    font-size:var(--fs-base);
    display: inline-block;
}

/* -------------------- لوحة "دوراتي" للطالب -------------------- */
.student-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.student-dash-header h2 { color: var(--primary-dark); margin-bottom: 4px; }
.student-dash-header p { color: var(--muted); font-size:var(--fs-sm); }

.student-dash-guide-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.student-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.student-stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}

.student-stat-label { font-size:var(--fs-sm); color: var(--muted); font-weight: 700; margin-bottom: 12px; }

.student-stat-body { display: flex; align-items: center; gap: 14px; }

.student-donut {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    position: relative;
}

.student-donut svg { display: block; width: 100%; height: 100%; }

.student-donut-hole {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-base);
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
}

.student-donut-hole small { font-size:var(--fs-2xs); font-weight: 600; color: var(--muted); }

.student-donut-legend { display: flex; flex-direction: column; gap: 5px; font-size:var(--fs-xs); }
.student-donut-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.student-donut-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.student-donut-legend strong { color: var(--text); margin-inline-start: 2px; }

.student-stat-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.student-stat-big-num { font-size:var(--fs-2xl); font-weight: 800; color: var(--primary); }
.student-stat-sub { font-size:var(--fs-xs); color: var(--muted); margin-top: 4px; }

.student-progress-line-bg {
    background: var(--bg);
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
    margin-top: 10px;
}
.student-progress-line-fill { height: 100%; border-radius: 20px; }

.student-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.student-filter-bar select, .student-filter-bar input { max-width: 220px; }
.student-filter-reset { padding: 8px 18px; font-size:var(--fs-sm); }
.student-filter-apply { padding: 8px 18px; font-size:var(--fs-sm); }

.student-table-progress { display: flex; align-items: center; gap: 8px; }
.student-table-progress-bg { background: var(--bg); border-radius: 20px; height: 8px; width: 80px; overflow: hidden; }
.student-table-progress-fill { background: var(--primary); height: 100%; border-radius: 20px; }
.student-table-progress span { font-size:var(--fs-xs); font-weight: 700; color: var(--primary); }

@media (max-width: 960px) {
    .student-stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .student-stats-grid { grid-template-columns: 1fr; }
    .student-dash-header { flex-direction: column; }
}

.checkout-steps { margin-bottom: 22px; }

.checkout-step {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.checkout-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size:var(--fs-sm);
    flex-shrink: 0;
}

.bank-details-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 10px;
}

.bank-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size:var(--fs-sm);
    border-bottom: 1px solid var(--border);
}

.bank-detail-row:last-child { border-bottom: none; }
.bank-detail-row span:first-child { color: var(--muted); }

.btn-copy-iban {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 3px 10px;
    font-size:var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
}

.checkout-trust-note {
    text-align: center;
    color: var(--muted);
    font-size:var(--fs-sm);
    margin-top: 16px;
}

.auth-card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.auth-card-logo img, .auth-card-logo svg.q-brand { height: 44px; width: auto; }
.auth-card-logo span { font-size:var(--fs-xl); font-weight: 800; color: var(--primary); }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size:var(--fs-base);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size:var(--fs-base);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.role-choice {
    display: flex;
    gap: 12px;
}

.role-choice label {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.role-choice input { display: none; }
.role-choice input:checked + span { color: var(--primary); }
.role-choice label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }

.btn-block { width: 100%; padding: 13px; font-size:var(--fs-md); }

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size:var(--fs-base);
    color: var(--muted);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size:var(--fs-base);
}

.alert-error { background: #fdeaea; color: var(--danger); border: 1px solid #f6c6c6; }
.alert-success { background: #e9f8ee; color: var(--success); border: 1px solid #bfe9cc; }
.alert-info { background: #eaf3fd; color: var(--info); border: 1px solid #c6ddf6; }

/* -------------------- الفوتر -------------------- */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.85);
    padding: 30px 0;
    text-align: center;
    font-size:var(--fs-base);
    margin-top: 40px;
}

/* -------------------- الفوتر الشامل الجديد -------------------- */
.site-footer-v2 {
    background: var(--primary-dark);
    color: rgba(255,255,255,.85);
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 50px 20px 36px;
}

.footer-logo {
    font-size:var(--fs-xl);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img, .footer-logo svg.q-brand {
    height: 46px;
    width: auto;
    background: var(--white);
    padding: 4px;
    border-radius: 8px;
}

.footer-desc {
    font-size:var(--fs-sm);
    line-height: 1.8;
    color: rgba(255,255,255,.65);
    margin-bottom: 16px;
    max-width: 320px;
}

.footer-desc-short { max-width: 220px; font-size:var(--fs-sm); }

.footer-social {
    display: flex;
    gap: 14px;
    font-size:var(--fs-md);
}

.footer-social a {
    opacity: .85;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
}
.footer-social a:hover { opacity: 1; background: rgba(255,255,255,.22); }

.footer-col h4 {
    color: var(--white);
    font-size:var(--fs-base);
    margin-bottom: 16px;
    font-weight: 700;
}

.footer-col ul li { margin-bottom: 10px; font-size:var(--fs-sm); }
.footer-col ul li a { color: rgba(255,255,255,.7); }
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size:var(--fs-sm);
    color: rgba(255,255,255,.55);
}

.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.55); }
.footer-bottom-links a:hover { color: var(--white); }

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* -------------------- لوحات التحكم (أساس) -------------------- */
.dash-layout {
    display: flex;
    min-height: 100vh;
}

.dash-sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-deep) 100%);
    color: var(--white);
    padding: 0 0 16px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    /* ملاحظة مهمة: لا نستخدم height: 100vh هنا أبداً.
       height:100vh يحصر الصندوق الأخضر بطول الشاشة المرئية فقط،
       فيتوقف منتصف أي صفحة أطول من شاشة واحدة (بالضبط المشكلة
       اللي ظهرت بالصورة). بدلها: لا نحدد ارتفاعاً إطلاقاً، وندع
       Flexbox يمدّده تلقائياً ليطابق طول عمود المحتوى الفعلي مهما
       كانت الصفحة طويلة، مع إبقاء position:sticky عشان يبقى
       ثابتاً بمكانه أثناء التمرير بنفس الوقت. */
    align-self: stretch;
    min-height: 100vh;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
}

.dash-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.dash-sidebar-logo img, .dash-sidebar-logo svg.q-brand { height: 42px; width: auto; }
.dash-sidebar-logo span { color: var(--white); font-size:var(--fs-lg); font-weight: 800; }

.dash-nav { flex: 1; }

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,.8);
    font-weight: 600;
    font-size:var(--fs-sm);
    border-inline-start: 3px solid transparent;
}

.dash-nav-icon { display: flex; flex-shrink: 0; opacity: .85; }
.dash-nav-label { flex: 1; }
.dash-nav-badge { background: var(--accent); color: #fff; border-radius: 20px; padding: 1px 8px; font-size:var(--fs-xs); font-weight: 700; }

.dash-nav li:nth-child(odd) a { background: rgba(255,255,255,.04); }
.dash-nav li:nth-child(even) a { background: rgba(0,0,0,.12); }

.dash-nav a:hover {
    background: rgba(255,255,255,.06);
    color: var(--white);
}

.dash-nav a.active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent) 0%, color-mix(in srgb, var(--accent) 6%, transparent) 100%) !important;
    border-inline-start-color: var(--accent);
    border-radius: 0 20px 20px 0;
    color: var(--accent-on-dark, var(--accent)) !important;
    font-weight: 700;
}
.dash-nav a.active .dash-nav-icon { opacity: 1; }

.dash-nav-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 14px 16px 4px;
    padding: 11px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    color: rgba(255,255,255,.9);
    font-weight: 700;
    font-size:var(--fs-sm);
    cursor: pointer;
    font-family: inherit;
}
.dash-nav-logout:hover { background: rgba(255,255,255,.08); border-color: var(--accent); color: var(--accent); }

.logout-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9,74,53,.45);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.logout-modal-box {
    background: var(--white);
    border-radius: 18px;
    padding: 32px 30px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
}

.logout-modal-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    background: none;
    border: none;
    font-size:var(--fs-md);
    color: var(--muted);
    cursor: pointer;
}

.logout-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.logout-modal-box h3 { color: var(--primary-dark); margin-bottom: 8px; }
.logout-modal-box p { color: var(--muted); font-size:var(--fs-sm); margin-bottom: 22px; }
.logout-modal-actions { display: flex; gap: 10px; justify-content: center; }
.logout-modal-actions .btn { flex: 1; }

.dash-sidebar-backdrop { display: none; }

.dash-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dash-main {
    flex: 1;
    padding: 30px;
}

.dash-main h2, .dash-main h3 {
    color: var(--primary-dark);
    font-weight: 800;
}

.dash-top-strip {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.dash-top-strip-app .dash-top-strip-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
}

.dash-top-strip-app .dash-top-search {
    flex: 1;
    max-width: 420px;
}

.dash-top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 9px 16px;
    color: var(--muted);
}

.dash-top-search input {
    border: none;
    background: transparent;
    font-size:var(--fs-sm);
    width: 100%;
    outline: none;
    font-family: inherit;
    color: var(--text);
}

.dash-top-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-top-icon-btn:hover { background: var(--border); }

.dash-top-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-inline-start: 6px;
    border-inline-start: 1px solid var(--border);
}

.dash-top-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size:var(--fs-md);
    flex-shrink: 0;
}

.dash-top-profile-text { display: flex; flex-direction: column; line-height: 1.3; }
.dash-top-profile-text strong { font-size:var(--fs-sm); color: var(--text); }
.dash-top-profile-text small { font-size:var(--fs-xs); color: var(--muted); }

/* ------ الشريط العلوي لغير المسجّلين (زائر) ------ */
.dash-top-strip-guest .dash-top-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 20px;
}

.dash-top-guest-nav { display: flex; align-items: center; gap: 22px; }
.dash-top-guest-nav a { font-weight: 700; font-size:var(--fs-sm); color: var(--text); }
.dash-top-guest-nav a:hover { color: var(--primary); }

.dash-top-strip-guest .dash-top-search { flex: 1; max-width: 340px; }

@media (max-width: 900px) {

.dash-sidebar { position: fixed; inset-inline-start: -260px; top: 0; z-index: 300; transition: inset-inline-start .2s; box-shadow: 0 0 30px rgba(0,0,0,.25); }
    .dash-sidebar.open { inset-inline-start: 0; }
    .dash-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 290;
    }
    .dash-sidebar-backdrop.open { display: block; }
    .dash-top-guest-nav { display: none; }
    .dash-top-profile-text { display: none; }
}

@media (max-width: 560px) {
    .dash-top-strip-app .dash-top-search { display: none; }
    .dash-top-strip-guest .dash-top-search { display: none; }
}

.btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .6s linear infinite;
    vertical-align: -1px;
}

@keyframes btn-spin { to { transform: rotate(360deg); } }

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size:var(--fs-sm);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb-trail a { color: var(--muted); font-weight: 600; }
.breadcrumb-trail a:hover { color: var(--primary); }
.breadcrumb-trail span:not(.breadcrumb-sep) { color: var(--text); font-weight: 700; }
.breadcrumb-trail .breadcrumb-sep { color: var(--border); font-weight: 400; }

.dash-top-bell-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -8px;
    background: var(--danger);
    color: #fff;
    font-size:var(--fs-2xs);
    font-weight: 700;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-top-logo {
    font-size:var(--fs-md);
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
}

.dash-top-logo img, .dash-top-logo svg.q-brand { height: 46px; width: auto; display: block; }

.dash-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.dash-top-btn {
    font-size:var(--fs-sm);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text);
}

.dash-top-btn:hover { background: var(--bg); }

@media (max-width: 600px) {
    .dash-top-strip-guest .dash-top-strip-inner { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
    .dash-top-strip-guest .dash-top-search { order: 3; width: 100%; max-width: none; }
}

.dash-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: block;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-color: var(--primary);
}

.stat-card .stat-value {
    font-size:var(--fs-2xl);
    font-weight: 800;
    color: var(--primary);
}

.stats-grid .stat-card:nth-child(4n+2) .stat-value { color: var(--accent-text, var(--accent)); }
.stats-grid .stat-card:nth-child(4n+3) .stat-value { color: var(--primary-dark); }
.stats-grid .stat-card:nth-child(4n+4) .stat-value { color: #4a6fa5; }

.stats-grid .stat-card:nth-child(4n+2):hover { border-color: var(--accent); }
.stats-grid .stat-card:nth-child(4n+3):hover { border-color: var(--primary-light); }
.stats-grid .stat-card:nth-child(4n+4):hover { border-color: #4a6fa5; }

.stat-card .stat-label {
    color: var(--muted);
    font-size:var(--fs-sm);
    margin-top: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.data-table th, .data-table td {
    padding: 13px 16px;
    text-align: start;
    border-bottom: 1px solid var(--border);
    font-size:var(--fs-base);
}

.data-table th {
    background: var(--bg);
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary);
    font-size:var(--fs-sm);
}

.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 3.5%, transparent); }
.data-table tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size:var(--fs-sm);
    font-weight: 700;
}

.badge-pending { background: #fff4e0; color: var(--warning); }
.badge-active, .badge-paid, .badge-published { background: #e9f8ee; color: var(--success); }
.badge-rejected, .badge-cancelled, .badge-failed { background: #fdeaea; color: var(--danger); }
.badge-neutral { background: var(--surface-muted); color: var(--muted); }

/* -------------------- بطاقة الدورة المحسّنة (الصفحة الرئيسية) -------------------- */
.course-card-v2 { display: flex; flex-direction: column; }

.course-desc-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-hover { transition: transform .2s, box-shadow .2s; }
.course-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(0,0,0,.1);
    border-color: var(--primary);
}

.course-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.course-card-hover:hover .course-cover-img { transform: scale(1.06); }

.course-new-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    background: var(--accent);
    color: var(--white);
    font-size:var(--fs-xs);
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent);
}

.course-cover-v2 {
    background: radial-gradient(circle at 50% 40%, var(--border) 0%, var(--surface-muted) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    overflow: hidden;
    position: relative;
}

.course-cover-icon {
    font-size:var(--fs-4xl);
    opacity: .9;
    background: var(--white);
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 12%, transparent);
}

.course-teacher-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.home-countdowns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.home-countdowns .countdown-box { padding: 10px 8px; }
.home-countdowns .countdown-label { font-size:var(--fs-xs); margin-bottom: 4px; }
.home-countdowns .countdown-timer { font-size:var(--fs-sm); }

@media (max-width: 420px) {
    .home-countdowns { grid-template-columns: 1fr; }
}

/* -------------------- عدّادات بداية/نهاية الدورة -------------------- */
.hero-countdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.countdown-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.countdown-label { font-size:var(--fs-sm); font-weight: 600; opacity: .9; margin-bottom: 8px; }
.countdown-timer { font-size:var(--fs-xl); font-weight: 800; letter-spacing: 1px; direction: ltr; }

/* -------------------- صفحة الإعدادات المنظمة -------------------- */
.settings-form { padding-bottom: 90px; }

/* Two balanced columns: cards flow down each column, so a short card never
   leaves an empty gap next to a tall one (the old row grid did). */
.settings-grid {
    column-count: 2;
    column-gap: 20px;
}

.settings-card {
    max-width: 100%;
    width: 100%;
    margin: 0 0 20px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

@media (max-width: 600px) {
    .form-grid-2 { grid-template-columns: 1fr; }
}

.settings-card-title {
    margin-bottom: 18px;
    font-size:var(--fs-md);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.settings-save-bar {
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 14px 20px;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    box-shadow: 0 -4px 14px rgba(0,0,0,.06);
    border-radius: var(--radius) var(--radius) 0 0;
}

@media (max-width: 860px) {
    .settings-grid { column-count: 1; }
}

/* -------------------- الجوال -------------------- */
/* Phones: the side menu is ONLY the slide-out drawer opened by the three-line button
   (rules at max-width:900px). The old horizontal pill bar for narrow screens was removed
   because it fought with the drawer and turned the drawer's list into a sideways row. */

@media (max-width: 720px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; padding: 14px 0; }
    .header-inner { position: relative; }
    .hero-actions .btn { width: 100%; }
    .auth-card { padding: 26px 20px; }
}


/* =========================================================
   دوراتي التدريبية — واجهة المتابعة الجديدة
   ========================================================= */
.student-dash-header {
    max-width: 1320px;
    margin: 0 auto 22px;
    padding: 0 4px;
}
.student-dash-header h2 {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -.4px;
}
.student-dash-header p { font-size:var(--fs-sm); }

.student-stats-grid {
    max-width: 1320px;
    margin-inline: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.student-stat-card {
    min-height: 190px;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 3px 14px rgba(19, 55, 44, .045);
    overflow: hidden;
}

.student-stat-card-donut {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
}
.student-stat-card-completed {
    background: linear-gradient(135deg, var(--surface) 0%, #fbf8ff 100%);
}
.student-stat-card-chart {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.student-stat-label {
    color: var(--text);
    font-size:var(--fs-sm);
    font-weight: 800;
    margin-bottom: 8px;
}

.student-stat-body { min-height: 112px; }
.student-donut-lg { width: 92px; height: 92px; }
.student-donut-hole { font-size:var(--fs-lg); }
.student-donut-hole small { font-size:var(--fs-2xs); margin-top: 2px; }

.student-donut-legend { gap: 6px; font-size:var(--fs-xs); }
.student-donut-legend span { justify-content: space-between; min-width: 110px; }
.student-donut-legend strong { font-size:var(--fs-xs); }

.student-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.student-stat-top .student-stat-label { margin-bottom: 2px; }
.student-stat-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
}
.student-icon-green { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.student-icon-blue { background: rgba(74,111,165,.10); color: #4a6fa5; }
.student-stat-big-num {
    font-size:var(--fs-3xl);
    line-height: 1.1;
    font-weight: 900;
    color: var(--primary);
}
.student-blue-num { color: #4a6fa5; }
.student-stat-sub { font-size:var(--fs-xs); margin-top: 4px; }

.student-mini-chart {
    width: 100%;
    height: 86px;
    display: block;
    margin-top: 4px;
    overflow: visible;
}

.student-filter-bar {
    max-width: 1320px;
    margin-inline: auto;
    padding: 0 4px;
    gap: 10px;
    margin-bottom: 16px;
}
.student-filter-bar input {
    flex: 1;
    max-width: none;
    min-width: 220px;
}
.student-filter-bar select { min-width: 180px; max-width: 220px; }

.student-filter-reset,
.student-filter-apply {
    height: 42px;
    border-radius: 10px;
}

.student-filter-reset { order: 1; }
.student-filter-apply { order: 2; }
.student-filter-bar select[name="status"] { order: 3; }
.student-filter-bar input[name="q"] { order: 4; }

.data-table {
    width: 100%;
    max-width: 1320px;
    margin-inline: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(19,55,44,.04);
}
.data-table th {
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size:var(--fs-sm);
    font-weight: 800;
    white-space: nowrap;
}
.data-table td {
    padding: 14px 12px;
    font-size:var(--fs-sm);
    vertical-align: middle;
}
.student-table-progress { min-width: 125px; }
.student-table-progress-bg { width: 78px; height: 8px; }
.student-table-progress-fill { background: #2fbd82; }

@media (max-width: 1100px) {
    .student-stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .student-stats-grid { grid-template-columns: 1fr; }
    .student-stat-card { min-height: 160px; }
    .student-filter-bar { flex-direction: column; align-items: stretch; }
    .student-filter-bar input,
    .student-filter-bar select,
    .student-filter-reset,
    .student-filter-apply { width: 100%; max-width: none; }
    .student-filter-reset { order: 4; }
    .student-filter-apply { order: 3; }
    .student-filter-bar select[name="status"] { order: 2; }
    .student-filter-bar input[name="q"] { order: 1; }
}

/* =========================================================
   لوحات "دوراتي"/"إدارة الدورات" للمعلم والإدارة — q-modern-dashboard
   (نُقلت هنا من كتلة <style> مكررة داخل الصفحتين لتفادي التكرار)
   ========================================================= */
.q-modern-dashboard{direction:rtl}
.q-modern-dashboard .q-plain-header{margin:0 0 20px;padding:0 2px}
.q-modern-dashboard .q-plain-header h2{margin:0 0 4px;font-size:clamp(22px,3vw,28px);font-weight:800;color:var(--primary-dark)}
.q-modern-dashboard .q-plain-header p{margin:0;color:var(--muted);font-size:var(--fs-sm)}
.q-modern-dashboard .q-kpis{align-items:stretch}
.q-modern-dashboard .q-card{display:flex;flex-direction:column;transition:transform .15s,box-shadow .15s}
.q-modern-dashboard .q-card:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(20,55,45,.09)}
.q-modern-dashboard .q-card-chart{margin-top:auto;padding-top:10px}
.q-modern-dashboard .q-hero h2{margin:0 0 6px;font-size:var(--fs-xl);color:var(--primary-dark)}
.q-modern-dashboard .q-hero p{margin:0;color:var(--muted-2);font-size:var(--fs-sm)}
.q-modern-dashboard .q-hero-icon{width:54px;height:54px;border-radius:18px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:var(--fs-xl);box-shadow:0 8px 22px color-mix(in srgb, var(--primary) 16%, transparent)}
.q-modern-dashboard .q-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.q-modern-dashboard .q-card-compact{padding:14px}
.q-modern-dashboard .q-compact-title{font-size:var(--fs-xs);font-weight:700;color:var(--text-soft);margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.q-modern-dashboard .q-card-compact .q-mini-chart{height:auto;max-height:56px}
.q-modern-dashboard .q-card{background:var(--surface);border:1px solid var(--surface-muted);border-radius:18px;padding:18px 18px 15px;min-width:0;box-shadow:0 4px 18px rgba(20,55,45,.045)}
.q-modern-dashboard .q-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.q-modern-dashboard .q-label{font-size:var(--fs-sm);color:var(--text-soft);font-weight:700}
.q-modern-dashboard .q-number{font-size:var(--fs-2xl);line-height:1.1;font-weight:800;color:var(--primary);margin-top:7px}
.q-modern-dashboard .q-sub{font-size:var(--fs-xs);color:var(--muted);margin-top:5px}
.q-modern-dashboard .q-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:var(--fs-lg)}
.q-modern-dashboard .q-card-chart{margin-top:10px;height:76px;display:flex;align-items:center;gap:12px}
.q-modern-dashboard .q-donut-wrap{position:relative;width:76px;height:76px;flex:0 0 76px}
.q-modern-dashboard .q-donut-wrap svg{display:block}
.q-modern-dashboard .q-donut-center{position:absolute;inset:0;display:grid;place-items:center;text-align:center;font-weight:800;color:var(--primary-dark);font-size:var(--fs-md)}
.q-modern-dashboard .q-legend{display:grid;gap:4px;font-size:var(--fs-xs);color:var(--muted);min-width:0}
.q-modern-dashboard .q-legend span{display:flex;align-items:center;gap:5px;white-space:nowrap}
.q-modern-dashboard .q-legend i{width:7px;height:7px;border-radius:50%;display:inline-block}
.q-modern-dashboard .q-mini-chart{width:100%;height:auto;max-height:76px;overflow:visible}
.q-modern-dashboard .q-ring-wrap{display:flex;align-items:center;gap:12px}
.q-modern-dashboard .q-ring-box{position:relative;width:82px;height:82px;flex:0 0 82px}
.q-modern-dashboard .q-ring-box .q-ring{position:absolute;inset:0}
.q-modern-dashboard .q-ring-number{position:absolute;inset:0;display:grid;place-items:center;font-size:var(--fs-md);font-weight:800;color:var(--primary-dark)}
.q-modern-dashboard .q-analytics{display:grid;grid-template-columns:1.25fr 1fr;gap:14px;margin-bottom:18px}
.q-modern-dashboard .q-chart-panel{background:var(--surface);border:1px solid var(--surface-muted);border-radius:18px;padding:17px 18px;box-shadow:0 4px 18px rgba(20,55,45,.04)}
.q-modern-dashboard .q-chart-title{font-size:var(--fs-sm);font-weight:800;color:var(--primary-dark);margin:0}
.q-modern-dashboard .q-chart-desc{font-size:var(--fs-xs);color:var(--muted);margin:4px 0 10px}
.q-modern-dashboard .q-chart-panel .q-mini-chart{height:78px}
.q-modern-dashboard .q-chart-panel{max-height:180px;overflow:hidden}
.q-modern-dashboard .q-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:4px 0 14px}
.q-modern-dashboard .q-toolbar .q-search{flex:1 1 260px;min-width:200px}
.q-modern-dashboard .q-toolbar select,.q-modern-dashboard .q-toolbar input{height:42px;border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:0 13px;font:inherit;color:var(--text)}
.q-modern-dashboard .q-toolbar .btn{height:42px;border-radius:12px}
.q-modern-dashboard .q-table-wrap{background:var(--surface);border:1px solid var(--surface-muted);border-radius:18px;overflow:auto;box-shadow:0 4px 18px rgba(20,55,45,.035)}
.q-modern-dashboard .q-table-wrap .data-table{margin:0;min-width:880px}
.q-modern-dashboard .q-table-wrap .data-table thead th{background:var(--surface-soft);color:#356b5a;font-size:var(--fs-xs);border-bottom:1px solid var(--surface-muted)}
.q-modern-dashboard .q-table-wrap .data-table td{padding:13px 12px;border-bottom:1px solid var(--surface-muted);font-size:var(--fs-sm)}
.q-modern-dashboard .q-progress{display:flex;align-items:center;gap:8px;min-width:135px}
.q-modern-dashboard .q-progress-bar{height:8px;flex:1;background:var(--border);border-radius:99px;overflow:hidden}
.q-modern-dashboard .q-progress-fill{height:100%;background:linear-gradient(90deg,var(--primary),#27b98a);border-radius:99px}
@media(max-width:1050px){.q-modern-dashboard .q-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.q-modern-dashboard .q-kpis{grid-template-columns:1fr}.q-modern-dashboard .q-toolbar{align-items:stretch}.q-modern-dashboard .q-toolbar>*{width:100%}}

/* ================= Qimma Education V2 ================= */
.q-v2-page{padding-top:34px;padding-bottom:60px}.q-v2-hero{text-align:center;padding:24px 0 30px}.q-v2-hero h1{margin:0 0 10px;font-size:var(--fs-3xl)}.q-v2-hero p{margin:0;color:var(--muted);font-size:var(--fs-base)}.q-v2-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.q-v2-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:22px;box-shadow:0 8px 26px rgba(20,45,35,.05)}.q-v2-card h3{margin:10px 0 6px}.q-v2-card p{color:var(--muted);line-height:1.8;min-height:48px}.q-muted{color:var(--muted);font-size:var(--fs-sm)}.q-avatar{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary),#2e9d78);color:#fff;font-size:var(--fs-xl);font-weight:800}.q-avatar-lg{width:86px;height:86px;font-size:var(--fs-3xl)}.q-profile-hero{display:flex;align-items:center;gap:18px;margin-bottom:24px}.q-profile-hero h1{margin:2px 0 5px}.q-price{font-size:var(--fs-xl);font-weight:800;color:var(--primary);margin:15px 0}.q-certificate-result{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:30px;text-align:center;box-shadow:0 12px 35px rgba(20,45,35,.06)}.q-certificate-result.valid{border-color:#b7dfcb}.q-certificate-result.invalid{border-color:#f0c4c4}.q-cert-icon{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;background:var(--primary-soft);color:var(--primary);font-size:var(--fs-2xl);font-weight:800}.invalid .q-cert-icon{background:#fff0f0;color:#b33}.q-cert-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:22px 0;text-align:start}.q-cert-grid>div{background:var(--surface-soft);border-radius:12px;padding:14px}.q-cert-grid span{display:block;color:var(--muted);font-size:var(--fs-xs);margin-bottom:5px}.q-cert-grid strong{display:block}.q-qr-note{font-size:var(--fs-xs);color:var(--muted);word-break:break-all}.q-reviews-section{margin:30px 0}.q-reviews-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-end;flex-wrap:wrap}.q-review-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;max-width:620px}.q-review-form input{min-width:230px}.q-review-list{margin-top:14px;display:grid;gap:10px}.q-review-item{border:1px solid var(--border);border-radius:14px;padding:14px;background:var(--surface)}.q-review-item>div{display:flex;justify-content:space-between;gap:12px}.q-review-item p{margin:8px 0 0;color:var(--text);line-height:1.7}.q-stars{color:#d89500;letter-spacing:2px}
@media(max-width:900px){.q-v2-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.q-v2-grid{grid-template-columns:1fr}.q-v2-hero h1{font-size:var(--fs-2xl)}.q-profile-hero{align-items:flex-start}.q-cert-grid{grid-template-columns:1fr}.q-review-form{align-items:stretch}.q-review-form input{min-width:0;width:100%}}
.q-delivery-badge,.q-free-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:999px;font-size:var(--fs-xs);font-weight:800;background:var(--surface-muted);color:var(--primary)}.q-free-badge{background:#fff7e7;color:#9b6b00}.q-on-dark{background:rgba(255,255,255,.15);color:#fff;border:1px solid rgba(255,255,255,.25)}


/* =========================================================
   QIMMA DEFAULT LANDING DESIGN — supplied reference
   Responsive desktop / tablet / mobile
   ========================================================= */
body{background:var(--surface-soft)}
.dash-top-strip-guest{box-shadow:0 1px 0 rgba(15,70,55,.05)}
.dash-top-strip-guest .dash-top-strip-inner{min-height:70px;padding:10px 20px;gap:26px}
.dash-top-logo{order:1;display:flex;align-items:center;justify-content:center}
.dash-top-logo img, .dash-top-logo svg.q-brand{height:52px;width:auto;object-fit:contain}
.dash-top-guest-nav{order:2;gap:30px;white-space:nowrap}
.dash-top-guest-nav a{position:relative;padding:10px 0;color:var(--primary-dark);font-size:var(--fs-sm);font-weight:800}
.dash-top-guest-nav a.is-active:after{content:"";position:absolute;left:10%;right:10%;bottom:0;height:3px;border-radius:99px;background:var(--accent)}
.dash-top-strip-guest .dash-top-search{order:3;max-width:360px;height:42px;background:var(--surface-muted);border-color:var(--border);padding-inline:16px}
.dash-top-strip-guest .dash-top-search:focus-within{border-color:var(--border-strong);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent)}
.dash-top-strip-guest .dash-top-actions{order:4;gap:10px}
.dash-top-strip-guest .guest-login-btn{border:2px solid var(--border-strong);background:var(--surface);color:var(--primary-dark);border-radius:11px;padding:8px 17px;font-weight:800}
.dash-top-strip-guest .guest-register-btn{border-radius:11px;padding:9px 17px;font-size:var(--fs-sm);box-shadow:0 5px 14px color-mix(in srgb, var(--primary) 12%, transparent)}
.guest-register-icon{display:inline-block;margin-inline-end:6px;font-size:var(--fs-md);line-height:0;vertical-align:-1px}
.guest-menu-toggle{display:none;border:0;background:var(--surface-muted);color:var(--primary);width:42px;height:42px;border-radius:11px;cursor:pointer;align-items:center;justify-content:center;flex-direction:column;gap:4px}
.guest-menu-toggle span{width:19px;height:2px;background:currentColor;border-radius:9px}

.hero-v4{padding:0 0 28px;min-height:420px;background:var(--surface-soft)}
.hero-v4-bg-photo{object-position:left center}
.hero-v4-bg-fade{background:linear-gradient(to left,var(--surface-soft) 0%,rgba(247,250,248,.98) 39%,rgba(247,250,248,.78) 53%,rgba(247,250,248,.18) 72%,rgba(247,250,248,0) 100%)}
.hero-v4-grid{min-height:385px;justify-content:flex-start}
.hero-v4-text{max-width:560px;padding:0 8px 0 0;margin-inline-start:auto;text-align:right}
.hero-eyebrow-text{color:var(--text-soft);font-size:var(--fs-sm);font-weight:700;margin-bottom:8px}
.hero-v4-text h1{font-size:clamp(34px,4.4vw,52px);line-height:1.25;color:#0b3e31;margin-bottom:14px;letter-spacing:-.8px}
.hero-v4-text h1::first-line{font-weight:900}
.hero-subtitle-text{font-size:var(--fs-base);color:var(--text-soft);max-width:500px;margin-inline-start:auto;line-height:1.9}
.hero-actions{gap:12px;margin-top:22px;margin-bottom:0}
.hero-actions .btn{min-width:150px;border-radius:12px;padding:12px 22px;text-align:center}
.hero-actions .btn-primary{box-shadow:0 7px 18px color-mix(in srgb, var(--primary) 15%, transparent)}
.hero-actions .btn-outline{background:var(--surface)}
.hero-strip{position:relative;z-index:3;margin-top:-3px;background:linear-gradient(90deg,var(--accent-soft),#fff0bd,#ffe6a0);border:1px solid rgba(230,174,45,.25);box-shadow:0 4px 16px rgba(91,71,19,.07);border-radius:34px;padding:4px 22px}
.hero-strip-item{padding:12px 14px}
.hero-strip-text strong{font-size:var(--fs-sm)}
.hero-strip-text small{font-size:var(--fs-xs)}

.latest-courses-header{margin-bottom:22px}
.latest-courses-header .section-title{font-size:var(--fs-2xl);color:var(--primary-dark);position:relative}
.latest-courses-header .section-title:after{content:"";display:block;width:46px;height:3px;background:var(--accent);border-radius:99px;margin:7px auto 0}
.latest-courses-viewall{background:var(--surface);border-color:var(--border-strong);border-radius:20px;color:var(--primary-dark);padding:7px 16px}
.courses-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.course-card{border-color:var(--surface-muted);border-radius:14px;box-shadow:0 5px 18px rgba(17,58,46,.055)}
.course-card:hover{transform:translateY(-3px);box-shadow:0 12px 24px rgba(17,58,46,.09)}
.course-cover-v2{height:155px}
.course-body{padding:14px 13px 12px}
.course-body h3{font-size:var(--fs-base);line-height:1.6;color:#17483a;margin-bottom:6px}
.course-meta-row{font-size:var(--fs-xs);gap:10px}
.course-teacher-row{min-height:26px}
.course-price{font-size:var(--fs-sm)}
.course-view-btn{background:#fff2d5;border-radius:20px;padding:7px 10px;margin-top:8px}
.course-view-btn:hover{background:var(--accent)}
.course-new-badge{background:#f5a900!important}
.course-subject-badge{background:var(--primary-subtle);color:#0c6d50;bottom:8px;padding:4px 12px}

.section#why-us{padding-top:46px;padding-bottom:38px}
#why-us .section-title{font-size:var(--fs-2xl);text-align:center;color:var(--primary-dark)}
#why-us .section-title:after{content:"";display:block;width:42px;height:3px;background:var(--accent);border-radius:99px;margin:7px auto 0}
.features-grid-h{gap:18px}
.feature-card-h{border:1px solid var(--border);border-radius:14px;box-shadow:0 4px 14px rgba(18,61,48,.04);padding:18px}
.feature-card-h-highlight{border-color:#efd38c;box-shadow:0 5px 16px color-mix(in srgb, var(--accent) 7%, transparent)}

.platform-stats-bar{background:linear-gradient(90deg,var(--primary-deep),#075743,var(--primary-deep));padding:17px 0;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08)}
.platform-stats-grid{grid-template-columns:repeat(4,1fr);gap:10px}
.platform-stat-item{gap:9px;border-inline-start:1px solid rgba(255,255,255,.18);padding:2px 12px}
.platform-stat-item:first-child{border-inline-start:0}
.platform-stat-icon{width:38px;height:38px;font-size:var(--fs-md)}
.platform-stat-item strong{font-size:var(--fs-lg);line-height:1.1}
.platform-stat-item span{font-size:var(--fs-xs)}

.site-footer-v2{margin-top:0;background:var(--primary-deep);position:relative;overflow:hidden}
.site-footer-v2:before,.site-footer-v2:after{content:"";position:absolute;width:170px;height:170px;opacity:.08;background:repeating-linear-gradient(45deg,transparent 0 16px,var(--surface) 16px 19px,transparent 19px 32px);transform:rotate(45deg);pointer-events:none}
.site-footer-v2:before{inset-inline-start:-80px;bottom:-90px}.site-footer-v2:after{inset-inline-end:-80px;top:-90px}
.footer-grid{position:relative;z-index:1;grid-template-columns:1.4fr 1fr 1fr;padding:34px 20px 25px;gap:34px}
.footer-logo img, .footer-logo svg.q-brand{height:48px;background:transparent;padding:0}
.footer-desc-short{max-width:290px}
.footer-col h4{font-size:var(--fs-sm);margin-bottom:12px}
.footer-col ul li{font-size:var(--fs-xs);margin-bottom:7px}
.footer-bottom{position:relative;z-index:1;padding:12px 0}
.footer-bottom-inner{font-size:var(--fs-xs)}

@media (max-width:1100px){
 .courses-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .dash-top-strip-guest .dash-top-strip-inner{gap:16px}
 .dash-top-guest-nav{gap:18px}
 .dash-top-strip-guest .dash-top-search{max-width:290px}
}
@media (max-width:900px){
 .dash-top-strip-guest .dash-top-strip-inner{min-height:64px;gap:12px}
 .dash-top-guest-nav{display:none;position:absolute;top:64px;inset-inline:12px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:8px;box-shadow:0 14px 35px rgba(0,0,0,.10);flex-direction:column;align-items:stretch;gap:0;z-index:220}
 .dash-top-strip-guest.mobile-open .dash-top-guest-nav{display:flex}
 .dash-top-guest-nav a{padding:11px 13px;border-radius:10px}
 .dash-top-guest-nav a.is-active:after{display:none}
 .dash-top-guest-nav a:hover{background:var(--surface-muted)}
 .guest-menu-toggle{display:flex;order:5;margin-inline-start:auto}
 .dash-top-strip-guest .dash-top-search{max-width:300px}
 .hero-v4{min-height:390px}
 .hero-v4-bg-fade{background:linear-gradient(to left,var(--surface-soft) 0%,rgba(247,250,248,.94) 48%,rgba(247,250,248,.55) 72%,rgba(247,250,248,.1) 100%)}
 .hero-v4-text{max-width:54%;}
 .courses-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
 .container{padding-inline:14px}
 .dash-top-strip-guest .dash-top-strip-inner{padding:8px 14px}
 .dash-top-logo img, .dash-top-logo svg.q-brand{height:46px}
 .guest-lang-btn{display:none}
 .guest-login-btn,.guest-register-btn{display:none}
 .guest-menu-toggle{margin-inline-start:0}
 .dash-top-strip-guest .dash-top-search{display:none}
 .hero-v4{min-height:0;padding:0 0 18px}
 .hero-v4-bg-photo{position:relative;height:205px;object-position:center top;opacity:1}
 .hero-v4-bg-fade{inset:auto 0 0;height:260px;background:linear-gradient(to bottom,rgba(247,250,248,0) 0%,var(--surface-soft) 48%,var(--surface-soft) 100%)}
 .hero-v4-grid{min-height:0;margin-top:-42px}
 .hero-v4-text{max-width:100%;padding:28px 12px 0;text-align:center;margin:0 auto}
 .hero-eyebrow-text{font-size:var(--fs-xs)}
 .hero-v4-text h1{font-size:var(--fs-3xl);line-height:1.35;letter-spacing:-.4px}
 .hero-subtitle-text{font-size:var(--fs-sm);line-height:1.8}
 .hero-actions{justify-content:center;margin-top:17px;gap:8px}
 .hero-actions .btn{min-width:0;flex:1;padding:10px 12px;font-size:var(--fs-xs)}
 .hero-strip{margin-top:13px;border-radius:18px;padding:7px}
 .hero-strip-item{padding:9px 7px;justify-content:flex-start}
 .hero-strip-text strong{font-size:var(--fs-xs)}.hero-strip-text small{font-size:var(--fs-xs)}
 .hero-strip-icon{width:30px;height:30px}
 .latest-courses-header{margin-bottom:18px}
 .latest-courses-header .section-title{font-size:var(--fs-xl)}
 .latest-courses-viewall{font-size:var(--fs-xs)}
 .courses-grid{grid-template-columns:1fr;gap:14px}
 .course-cover-v2{height:180px}
 .platform-stats-grid{grid-template-columns:repeat(2,1fr);gap:0}
 .platform-stat-item{justify-content:flex-start;padding:10px 8px;border-inline-start:0;border-bottom:1px solid rgba(255,255,255,.12)}
 .platform-stat-item:nth-child(odd){border-inline-end:1px solid rgba(255,255,255,.12)}
 .platform-stat-item:nth-last-child(-n+2){border-bottom:0}
 .platform-stat-item strong{font-size:var(--fs-md)}
 .footer-grid{grid-template-columns:1fr 1fr;gap:22px;padding:28px 14px 22px}
 .footer-col-brand{grid-column:1/-1}
}
@media (max-width:480px){
 .hero-v4-bg-photo{height:175px}
 .hero-v4-grid{margin-top:-34px}
 .hero-v4-text h1{font-size:var(--fs-2xl)}
 .hero-strip{display:grid;grid-template-columns:1fr}
 .hero-strip-item{width:100%}
 .hero-strip-sep{display:none}
 .footer-grid{grid-template-columns:1fr;text-align:center}
 .footer-col-brand{grid-column:auto}.footer-desc-short{margin-inline:auto}.footer-social{justify-content:center}
 .footer-bottom-inner{justify-content:center;text-align:center}
 .footer-bottom-links{justify-content:center;width:100%}
}

/* =========================================================
   QIMMA REFERENCE DASHBOARD HEADER + SIDEBAR
   Matches the supplied dashboard reference and remains responsive.
   ========================================================= */
.dash-sidebar {
    width: 300px;
    min-width: 300px;
    background: linear-gradient(180deg, var(--theme-sidebar-start, var(--primary-dark)) 0%, var(--theme-primary-deep, var(--primary-deep)) 55%, var(--theme-sidebar-end, var(--primary-deep)) 100%);
    padding: 0 0 14px;
    border-inline-start: 1px solid rgba(255,255,255,.06);
}

.dash-sidebar-logo {
    height: 101px;
    padding: 14px 20px;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.015);
}
.dash-sidebar-logo img, .dash-sidebar-logo svg.q-brand { height: 57px; max-width: 185px; object-fit: contain; }
.dash-sidebar-logo span { font-size:var(--fs-xl); }

.dash-nav { padding-top: 10px; }
.dash-nav ul { margin: 0; padding: 0; }
.dash-nav li { margin: 0; }
.dash-nav li:nth-child(odd) a,
.dash-nav li:nth-child(even) a { background: rgba(255,255,255,.025); }

.dash-nav a {
    min-height: 57px;
    padding: 0 25px 0 20px;
    gap: 15px;
    color: rgba(255,255,255,.86);
    font-size:var(--fs-base);
    font-weight: 700;
    border-inline-start: 0;
    border-inline-end: 3px solid transparent;
    border-radius: 0;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.dash-nav-icon {
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    opacity: .88;
}
.dash-nav-icon svg { width: 20px; height: 20px; }
.dash-nav-label { text-align: right; }
.dash-nav a:hover { background: rgba(255,255,255,.075) !important; color: #fff; }
.dash-nav a.active {
    background: linear-gradient(90deg, rgba(255,255,255,.035), color-mix(in srgb, var(--accent) 16%, transparent)) !important;
    color: var(--accent-on-dark, var(--accent)) !important;
    border-inline-end: 3px solid var(--accent);
    border-inline-start: 0;
    border-radius: 0 22px 22px 0;
    font-weight: 800;
}
.dash-nav a.active .dash-nav-icon { opacity: 1; }
.dash-nav-badge { background: var(--accent); }

.dash-nav-logout {
    margin: 14px 16px 4px;
    min-height: 56px;
    padding: 10px 14px;
    border-color: rgba(255,255,255,.28);
    border-radius: 12px;
    color: rgba(255,255,255,.94);
    font-size:var(--fs-sm);
}
.dash-nav-logout:hover { background: rgba(255,255,255,.07); }

.dash-top-strip-app {
    min-height: 72px;
    box-shadow: 0 1px 0 rgba(15,70,55,.05);
}
.dash-top-strip-app .dash-top-strip-inner {
    min-height: 72px;
    padding: 8px 28px;
    gap: 18px;
    direction: rtl;
}
.dash-top-strip-app .dash-top-search {
    order: 1;
    flex: 0 1 510px;
    max-width: 510px;
    height: 46px;
    padding: 0 17px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 25px;
    color: var(--muted-2);
}
.dash-top-strip-app .dash-top-search input { font-size:var(--fs-sm); }
.dash-top-strip-app .dash-top-search:focus-within {
    background: var(--surface);
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 7%, transparent);
}
.dash-top-actions {
    order: 2;
    margin-inline-start: auto;
    gap: 12px;
    direction: rtl;
}
.dash-top-icon-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--surface-muted);
    background: var(--bg);
    color: var(--text);
}
.dash-top-icon-btn:hover { background: var(--border); }
.dash-top-profile {
    gap: 10px;
    padding-inline-start: 12px;
    margin-inline-start: 2px;
    border-inline-start: 1px solid var(--border);
    min-height: 46px;
}
.dash-top-avatar {
    width: 46px;
    height: 46px;
    background: var(--surface-muted);
    color: #59427e;
    border: 1px solid #ebe5f5;
    font-size:var(--fs-md);
}
.dash-top-profile-text { text-align: right; min-width: 95px; }
.dash-top-profile-text strong { font-size:var(--fs-sm); font-weight: 800; color: var(--text); }
.dash-top-profile-text small { font-size:var(--fs-xs); color: var(--muted); margin-top: 2px; }

@media (max-width: 1100px) {
    .dash-sidebar { width: 275px; min-width: 275px; }
    .dash-top-strip-app .dash-top-search { flex-basis: 390px; max-width: 390px; }
}

@media (max-width: 900px) {
    .dash-sidebar { width: 300px; min-width: 300px; }
    .dash-top-strip-app .dash-top-strip-inner { padding: 8px 16px; }

.dash-top-strip-app .dash-top-search { order: 1; flex: 1; max-width: none; }
    .dash-top-actions { order: 2; }
}

@media (max-width: 680px) {
    .dash-top-strip-app { min-height: 64px; }
    .dash-top-strip-app .dash-top-strip-inner { min-height: 64px; padding: 7px 10px; gap: 8px; }
    .dash-top-strip-app .dash-top-search { display: flex; height: 42px; min-width: 0; }
    .dash-top-actions { gap: 6px; margin-inline-start: 0; }
    .dash-top-icon-btn { width: 40px; height: 40px; }
    .dash-top-profile { padding-inline-start: 6px; border-inline-start: 0; }
    .dash-top-profile-text { display: none; }
    .dash-top-avatar { width: 40px; height: 40px; }
    .dash-top-actions .dash-top-icon-btn:nth-child(2) { display: none; }
    .dash-top-actions .dash-top-icon-btn { width: 40px; height: 40px; }

}

@media (max-width: 430px) {
    .dash-top-strip-app .dash-top-search { display: none; }
    .dash-top-actions { margin-inline-start: auto; }

.dash-top-actions { order: 2; }
}

@media (max-width: 900px) {
    .dash-sidebar {
        position: fixed;
        top: 0;
        inset-inline-start: -310px;
        height: 100vh;
        z-index: 300;
        transition: inset-inline-start .22s ease;
        box-shadow: 0 0 30px rgba(0,0,0,.25);
    }
    .dash-sidebar.open { inset-inline-start: 0; }
    .dash-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.42);
        z-index: 290;
    }
    .dash-sidebar-backdrop.open { display: block; }
}

/* =========================================================
   QIMMA REFERENCE POLISH — header / accent strip / why / stats / footer motif
   ========================================================= */
/* logged-in header: reference proportions */
.dash-top-strip-app .dash-top-strip-inner{min-height:70px;padding:9px 26px;gap:18px}
.dash-top-strip-app .dash-top-search{height:42px;max-width:430px;background:var(--surface-soft);border-color:var(--border)}
.dash-top-strip-app .dash-top-search svg{width:17px;height:17px}
.dash-top-actions{gap:12px}
.dash-top-icon-btn{width:42px;height:42px;background:var(--surface-muted);border:1px solid var(--surface-muted);color:var(--primary-dark)}
.dash-top-icon-btn:hover{background:var(--border)}
.dash-top-language{display:flex;align-items:center;gap:8px;color:var(--primary-dark);font-size:var(--fs-sm);font-weight:800;white-space:nowrap;padding-inline:10px}
.dash-top-language strong{font-size:var(--fs-sm)}
.dash-top-language svg{display:block}
.dash-top-profile{gap:9px;padding-inline-start:12px}
.dash-top-avatar{width:42px;height:42px;background:var(--surface-muted);color:var(--muted);border:1px solid var(--border)}
.dash-top-profile-text strong{font-size:var(--fs-sm)}
.dash-top-profile-text small{font-size:var(--fs-xs)}

/* gold benefit strip: reference with side lines */
.hero-strip{position:relative;max-width:880px;margin:24px auto 0;background:linear-gradient(90deg,var(--accent-soft) 0%,var(--accent-soft) 50%,var(--accent-soft) 100%);border:1px solid #f0c85b;border-radius:999px;padding:5px 30px;box-shadow:0 2px 0 rgba(170,115,0,.05)}
.hero-strip::before,.hero-strip::after{content:"";position:absolute;top:50%;width:54px;height:2px;background:#e9a90f;transform:translateY(-50%);opacity:.95}
.hero-strip::before{inset-inline-start:-76px}.hero-strip::after{inset-inline-end:-76px}
.hero-strip-item{padding:12px 14px;gap:12px}
.hero-strip-icon{width:40px;height:40px;background:rgba(255,255,255,.48);color:var(--primary-dark)}
.hero-strip-icon svg{width:24px;height:24px}
.hero-strip-text strong{font-size:var(--fs-sm)}.hero-strip-text small{font-size:var(--fs-xs)}
.hero-strip-sep{height:38px;background:rgba(30,75,60,.35)}

/* why Qimma: three compact cards like the reference */
.features-grid-h{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;max-width:none;margin:0}
.feature-card-h{min-height:112px;padding:18px 20px;gap:13px;border-radius:12px;box-shadow:0 3px 14px rgba(20,55,45,.045)}
.feature-icon-h{width:54px;height:54px;border:1px solid var(--border);background:var(--surface-muted);color:var(--primary);font-size:0}
.feature-icon-h svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.feature-card-h-highlight .feature-icon-h{background:#fff5da;border-color:#f2d68b;color:#e19a00}
.feature-card-h-text h3{font-size:var(--fs-base)}.feature-card-h-text p{font-size:var(--fs-xs);line-height:1.7}
.feature-card-h-arrow{width:28px;height:28px;border-radius:50%;background:var(--surface-muted);color:var(--primary);display:grid;place-items:center;font-size:var(--fs-base)}

/* stats bar: large outlined icon circles */
.platform-stats-bar{position:relative;overflow:hidden;padding:11px 0;background:linear-gradient(90deg,var(--primary-deep),#075846,var(--primary-deep))}
.platform-stats-grid{gap:0}
.platform-stat-item{min-height:62px;gap:12px;padding:4px 28px;border-inline-start:1px solid rgba(255,255,255,.22);justify-content:center}
.platform-stat-item:first-child{border-inline-start:0}
.platform-stat-icon{width:54px;height:54px;border:1.5px solid #17b89a;background:rgba(0,0,0,.08);color:#fff;font-size:0;box-shadow:inset 0 0 0 4px rgba(0,0,0,.08)}
.platform-stat-icon svg{width:27px;height:27px;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.platform-stat-item strong{font-size:var(--fs-lg);line-height:1.05;color:#fff}.platform-stat-item span{font-size:var(--fs-xs);color:rgba(255,255,255,.9)}

/* footer: reference compact three-column composition */
.site-footer-v2{background:var(--primary-deep)}
.footer-grid{grid-template-columns:1.25fr 1fr 1.25fr;padding:27px 20px 17px;gap:28px}
.footer-col-brand{display:flex;flex-direction:column;align-items:flex-start}
.footer-logo{margin-bottom:7px}.footer-logo img, .footer-logo svg.q-brand{height:42px}
.footer-desc-short{max-width:280px;margin-bottom:10px;font-size:var(--fs-xs);line-height:1.65}
.footer-col h4{font-size:var(--fs-sm);margin-bottom:7px}.footer-col ul li{font-size:var(--fs-xs);margin-bottom:4px}
.footer-social{gap:7px;margin-top:7px}.footer-social a{width:28px;height:28px}
.footer-social a svg{width:14px;height:14px}
.footer-bottom{padding:7px 0}.footer-bottom-inner{font-size:var(--fs-xs)}

@media(max-width:900px){
  .features-grid-h{grid-template-columns:1fr}
  .feature-card-h{min-height:96px}
  .hero-strip::before,.hero-strip::after{display:none}
  .dash-top-strip-app .dash-top-strip-inner{padding:8px 14px}
  .dash-top-strip-app .dash-top-search{max-width:360px}
}
@media(max-width:700px){
  .hero-strip{max-width:none;border-radius:18px;padding:7px;display:grid;grid-template-columns:1fr;gap:2px}
  .hero-strip-item{width:100%;justify-content:flex-start;padding:8px 9px}
  .hero-strip-sep{display:none}
  .platform-stats-grid{grid-template-columns:repeat(2,1fr)}
  .platform-stat-item{padding:8px 12px;border-inline-start:0;border-bottom:1px solid rgba(255,255,255,.15)}
  .platform-stat-item:nth-child(odd){border-inline-end:1px solid rgba(255,255,255,.15)}
  .platform-stat-icon{width:46px;height:46px}
  .footer-grid{grid-template-columns:1fr 1fr;gap:20px;padding:22px 16px 14px}
  .footer-col-brand{grid-column:1/-1}
}
@media(max-width:480px){
  .features-grid-h{gap:10px}
  .feature-card-h{padding:14px}
  .feature-icon-h{width:48px;height:48px}
  .footer-grid{grid-template-columns:1fr}.footer-col-brand{grid-column:auto}
  .dash-top-language{padding-inline:4px}.dash-top-language strong{font-size:var(--fs-xs)}
  .dash-top-icon-btn{width:38px;height:38px}.dash-top-avatar{width:38px;height:38px}
}

/* ==================== QIMMA PROFILE V2 ==================== */
.profile-page{max-width:1180px;margin:0 auto;padding:34px 0 10px}
.profile-hero-card{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px 30px;border:1px solid color-mix(in srgb, var(--primary) 10%, transparent);border-radius:22px;background:linear-gradient(135deg,var(--surface) 0%,var(--primary-subtle) 72%,var(--primary-soft) 100%);box-shadow:0 12px 35px rgba(9,74,53,.08)}
.profile-hero-card:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;inset-inline-end:-90px;top:-120px;background:color-mix(in srgb, var(--accent) 11%, transparent);pointer-events:none}
.profile-hero-main{display:flex;align-items:center;gap:20px;position:relative;z-index:1}.profile-avatar-wrap{position:relative;flex-shrink:0}.profile-avatar-lg{width:104px;height:104px;border-radius:28px;object-fit:cover;border:5px solid #fff;box-shadow:0 8px 25px rgba(9,74,53,.14)}
.profile-avatar-placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,var(--primary-soft),var(--surface-soft));color:#5b3d91}.profile-avatar-status{position:absolute;right:-2px;bottom:5px;width:18px;height:18px;background:#21a366;border:4px solid #fff;border-radius:50%}
.profile-hero-copy{direction:rtl}.profile-eyebrow,.profile-section-kicker{display:block;color:var(--primary);font-size:var(--fs-xs);font-weight:800;margin-bottom:5px}.profile-hero-copy h1{margin:0;color:var(--primary-dark);font-size:var(--fs-2xl);line-height:1.35}.profile-hero-copy p{margin:4px 0 10px;color:var(--muted);font-size:var(--fs-sm)}.profile-meta-row{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:var(--fs-xs)}.profile-role-pill{display:inline-flex;padding:5px 11px;border-radius:999px;background:color-mix(in srgb, var(--primary) 9%, transparent);color:var(--primary);font-weight:800}.profile-hero-actions{position:relative;z-index:1}.profile-secondary-btn{display:inline-flex;align-items:center;gap:8px;padding:11px 16px;border:1px solid color-mix(in srgb, var(--primary) 20%, transparent);border-radius:12px;color:var(--primary-dark);background:var(--surface);font-size:var(--fs-sm);font-weight:800}.profile-secondary-btn:hover{border-color:var(--primary);background:var(--primary-subtle)}
.profile-alert{margin-top:18px}.profile-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start;margin-top:22px}.profile-form-card,.profile-side-card{background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 10px 28px rgba(9,74,53,.06)}.profile-form-card{padding:28px}.profile-section-head{display:flex;justify-content:space-between;gap:18px;padding-bottom:22px;border-bottom:1px solid var(--surface-muted)}.profile-section-head h2{margin:2px 0 4px;font-size:var(--fs-lg);color:var(--primary-dark)}.profile-section-head p{margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.7}.profile-section-icon{width:50px;height:50px;border-radius:15px;background:var(--primary-soft);color:var(--primary);display:flex;align-items:center;justify-content:center;flex-shrink:0}.profile-block{padding:24px 0;border-bottom:1px solid var(--surface-muted)}.profile-block:last-of-type{border-bottom:0}.profile-block-title{display:flex;align-items:center;gap:10px;margin-bottom:17px;color:var(--primary-dark);font-size:var(--fs-sm);font-weight:900}.profile-block-title span{width:27px;height:27px;border-radius:8px;background:var(--accent-soft);color:var(--accent-dark);display:inline-flex;align-items:center;justify-content:center;font-size:var(--fs-xs)}.profile-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.profile-field label{display:block;margin-bottom:7px;font-size:var(--fs-xs);font-weight:800;color:var(--text-soft)}.profile-field .form-control{height:45px;padding:10px 13px;border-radius:11px;background:var(--surface);border-color:var(--border);font-size:var(--fs-sm)}.profile-field .form-control:focus{box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 8%, transparent);border-color:var(--primary)}.profile-field-muted .form-control{background:var(--surface-soft);color:var(--muted)}.profile-input-icon{position:relative}.profile-input-icon svg{position:absolute;right:13px;top:14px;color:var(--muted);z-index:1}.profile-input-icon input{padding-right:40px!important}.profile-upload-row{display:flex;align-items:center;gap:15px;padding:15px;border-radius:14px;background:var(--surface-soft);border:1px dashed var(--border-strong)}.profile-mini-avatar{width:58px;height:58px;border-radius:16px;background:var(--primary-soft);color:#5b3d91;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}.profile-mini-avatar img{width:100%;height:100%;object-fit:cover}.profile-upload-copy{display:flex;flex-direction:column;gap:4px;flex:1}.profile-upload-copy strong{font-size:var(--fs-sm);color:var(--primary-dark)}.profile-upload-copy span{font-size:var(--fs-xs);color:var(--muted)}.profile-upload-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid color-mix(in srgb, var(--primary) 18%, transparent);background:var(--surface);color:var(--primary);padding:10px 13px;border-radius:10px;font-size:var(--fs-xs);font-weight:800;cursor:pointer;white-space:nowrap}.profile-upload-btn:hover{background:var(--primary-soft)}.profile-upload-btn input{display:none}.profile-form-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:23px;color:var(--muted);font-size:var(--fs-xs)}.profile-save-btn{border:0;background:linear-gradient(135deg,var(--primary),#0a8a63);color:#fff;border-radius:12px;padding:12px 20px;font-family:inherit;font-size:var(--fs-sm);font-weight:900;display:inline-flex;align-items:center;gap:8px;cursor:pointer;box-shadow:0 8px 18px color-mix(in srgb, var(--primary) 18%, transparent)}.profile-save-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px color-mix(in srgb, var(--primary) 22%, transparent)}
.profile-side-column{display:flex;flex-direction:column;gap:18px}.profile-side-card{padding:21px}.profile-side-accent{background:linear-gradient(145deg,var(--primary),#063b2e);color:#fff;border:0}.profile-side-icon{width:42px;height:42px;border-radius:13px;background:color-mix(in srgb, var(--accent) 16%, transparent);color:var(--accent-light);display:flex;align-items:center;justify-content:center;margin-bottom:14px}.profile-side-accent h3{margin:0 0 6px;color:#fff;font-size:var(--fs-md)}.profile-side-accent p{margin:0;color:rgba(255,255,255,.9);font-size:var(--fs-xs);line-height:1.8}.profile-side-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;color:var(--primary)}.profile-side-head span{font-size:var(--fs-xs);color:var(--muted);font-weight:800}.profile-side-head h3{margin:2px 0 0;color:var(--primary-dark);font-size:var(--fs-md)}.profile-session-list{margin-top:16px;display:flex;flex-direction:column}.profile-session-item{display:flex;gap:11px;padding:12px 0;border-top:1px solid var(--surface-muted)}.profile-session-item:first-child{border-top:0}.profile-session-dot{width:8px;height:8px;border-radius:50%;background:#cbd5d1;margin-top:6px;flex-shrink:0}.profile-session-item.is-current .profile-session-dot{background:#22a66c;box-shadow:0 0 0 4px rgba(34,166,108,.10)}.profile-session-item div{display:flex;flex-direction:column;gap:3px}.profile-session-item strong{font-size:var(--fs-xs);color:var(--text-soft)}.profile-session-item small{font-size:var(--fs-xs);color:var(--muted)}.profile-empty-state{color:var(--muted);font-size:var(--fs-xs);margin:18px 0 0}.profile-page + .site-footer-v2{margin-top:30px}
/* اجعل تدفق الصفحة متسلسلاً: الهيدر ← المحتوى ← الفوتر */
.dash-main-col{min-height:100vh}.dash-main{min-height:calc(100vh - 72px);box-sizing:border-box}
@media(max-width:980px){.profile-content-grid{grid-template-columns:1fr}.profile-side-column{display:grid;grid-template-columns:1fr 1fr}.profile-hero-card{align-items:flex-start}.profile-side-accent{height:100%}}
@media(max-width:700px){.profile-page{padding:18px 12px 8px}.profile-hero-card{flex-direction:column;padding:22px 18px;border-radius:18px}.profile-hero-main{width:100%;gap:14px}.profile-avatar-lg{width:82px;height:82px;border-radius:22px}.profile-hero-copy h1{font-size:var(--fs-lg)}.profile-hero-actions{width:100%}.profile-secondary-btn{width:100%;justify-content:center}.profile-form-card{padding:19px 15px;border-radius:17px}.profile-section-head h2{font-size:var(--fs-md)}.profile-form-grid{grid-template-columns:1fr;gap:13px}.profile-upload-row{align-items:flex-start;flex-wrap:wrap}.profile-upload-copy{min-width:calc(100% - 75px)}.profile-upload-btn{margin-inline-start:73px}.profile-form-actions{flex-direction:column;align-items:stretch}.profile-save-btn{justify-content:center;width:100%}.profile-side-column{grid-template-columns:1fr}.dash-main{padding:16px 12px}}
@media(max-width:420px){.profile-hero-main{align-items:flex-start}.profile-meta-row{flex-wrap:wrap}.profile-form-card{padding:16px 12px}.profile-upload-btn{margin-inline-start:0}}

/* Profile refinements: clear home navigation, meaningful accent icon, and visible session duration */
.profile-secondary-btn{justify-content:center;min-width:190px;text-decoration:none}
.profile-side-icon svg{display:block}
.profile-session-main{min-width:0;flex:1}
.profile-session-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.profile-session-duration{font-size:var(--fs-xs);font-weight:900;color:var(--primary);background:var(--primary-soft);border:1px solid color-mix(in srgb, var(--primary) 10%, transparent);padding:4px 7px;border-radius:999px;white-space:nowrap}
.profile-session-item.is-current .profile-session-duration{color:var(--primary);background:var(--primary-soft)}
.profile-session-item small{display:block;line-height:1.7}
.profile-session-separator{margin:0 4px;color:#c2cbc7}
@media(max-width:700px){.profile-secondary-btn{min-width:0}.profile-session-title-row{align-items:flex-start}.profile-session-duration{flex-shrink:0}}

/* Profile sessions — compact professional activity timeline */
.profile-session-stats{display:grid;grid-template-columns:1.2fr 1fr .8fr;gap:8px;margin-top:16px;padding:10px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.profile-session-stat{min-width:0;padding:10px 9px;border-inline-end:1px solid var(--border)}
.profile-session-stat:last-child{border-inline-end:0}
.profile-session-stat-label{display:block;color:var(--muted-2);font-size:var(--fs-2xs);font-weight:800;margin-bottom:5px;white-space:nowrap}
.profile-session-stat strong{display:block;color:var(--primary);font-size:var(--fs-sm);font-weight:950;white-space:nowrap}
.profile-session-stat strong small{font-size:var(--fs-2xs);font-weight:800;color:var(--muted-2)}
.profile-session-stat-soft strong{color:var(--text-soft)}
.profile-session-list{margin-top:10px}
.profile-session-item{display:grid!important;grid-template-columns:8px 72px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 0!important;min-height:48px}
.profile-session-item:first-child{border-top:0}
.profile-session-dot{margin-top:0!important}
.profile-session-date{display:flex!important;flex-direction:column!important;gap:1px!important;min-width:0}
.profile-session-date strong{font-size:var(--fs-xs)!important;color:var(--text-soft)!important;white-space:nowrap}
.profile-session-date small{font-size:var(--fs-2xs)!important;color:var(--muted)!important;line-height:1.2!important}
.profile-session-range{display:flex!important;flex-direction:row!important;align-items:center;gap:7px;min-width:0;white-space:nowrap}
.profile-session-range span{font-size:var(--fs-2xs);color:var(--muted)}
.profile-session-range b{color:var(--text-soft);font-weight:900}
.profile-session-arrow{color:#aebbb6!important;font-size:var(--fs-xs)!important}
.profile-session-duration{font-size:var(--fs-2xs)!important;font-weight:900!important;color:var(--primary)!important;background:var(--primary-soft)!important;border:1px solid color-mix(in srgb, var(--primary) 10%, transparent)!important;padding:4px 7px!important;border-radius:999px!important;white-space:nowrap!important}
.profile-session-item.is-current .profile-session-duration{background:var(--primary-soft)!important}
@media(max-width:700px){
 .profile-session-stats{grid-template-columns:1fr 1fr;gap:0}
 .profile-session-stat{padding:9px 7px}
 .profile-session-stat-soft{grid-column:1/-1;border-inline-end:0;border-top:1px solid var(--border);margin-top:4px}
 .profile-session-item{grid-template-columns:7px 64px minmax(0,1fr) auto!important;gap:7px!important}
 .profile-session-range{gap:4px}
 .profile-session-range span{font-size:var(--fs-2xs)}
 .profile-session-duration{font-size:var(--fs-2xs)!important;padding:4px 6px!important}
}

/* =========================================================
   QIMMA LAYOUT DIRECTION — sidebar swaps side automatically
   between Arabic and English (no per-language order override
   needed: "order" is not set at all, so the sidebar — being
   the first element in the HTML — naturally renders on the
   START side, which the browser itself flips between right
   (Arabic/RTL) and left (English/LTR) based on the page's own
   dir attribute. A previous fix here explicitly forced
   order:2 on the sidebar for English, which pinned it to the
   right in BOTH languages instead of letting it flip — removed.
   ========================================================= */
@media (min-width: 901px) {
    .dash-layout { flex-direction: row; }

    /* Active item edge faces the content area */
    html[dir="rtl"] .dash-nav a.active,
    body.lang-ar .dash-nav a.active {
        border-inline-end: 3px solid var(--accent);
        border-inline-start: 0;
        border-radius: 0 22px 22px 0;
    }
    html[dir="ltr"] .dash-nav a.active,
    body.lang-en .dash-nav a.active {
        border-inline-start: 3px solid var(--accent);
        border-inline-end: 0;
        border-radius: 22px 0 0 22px;
    }
}

@media (max-width: 900px) {
    /* واحدة فقط تكفي: inset-inline-start يعكس نفسه تلقائياً
       (يمين بالعربي RTL، يسار بالإنجليزي LTR) بدون أي تفريق
       صريح بين اللغتين — هذا بالضبط ما كان يفشل بالنسخة السابقة
       بسبب استخدام inset-inline-end للإنجليزي بالخطأ. */
    .dash-sidebar {
        inset-inline-start: -310px;
        inset-inline-end: auto;
    }
    .dash-sidebar.open {
        inset-inline-start: 0;
        inset-inline-end: auto;
    }
}


/* QIMMA SIDEBAR COMPACT — keep all navigation visible and logout near the top */
@media (min-width: 901px) {
  .dash-sidebar {
    width: 235px;
    min-width: 235px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 10px;
  }
  .dash-sidebar-logo { height: 76px; padding: 10px 14px; flex: 0 0 76px; }
  .dash-sidebar-logo img, .dash-sidebar-logo svg.q-brand { height: 45px; max-width: 150px; }
  .dash-sidebar-logo span { font-size:var(--fs-lg); }
  .dash-nav-logout-top {
    order: 1;
    margin: 8px 10px 6px;
    min-height: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size:var(--fs-sm);
  }
  .dash-nav-logout-top svg { width: 16px; height: 16px; }
  .dash-nav { order: 2; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-top: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
  .dash-nav ul { padding-bottom: 8px; }
  .dash-nav a { min-height: 48px; height: 48px; padding: 0 15px 0 12px; gap: 10px; font-size:var(--fs-sm); }
  .dash-nav-icon { width: 20px; height: 20px; }
  .dash-nav-icon svg { width: 18px; height: 18px; }
  .dash-nav-label { white-space: nowrap; }
}
@media (max-width: 900px) {
  .dash-sidebar { width: 255px; min-width: 255px; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  .dash-sidebar-logo { flex: 0 0 72px; height: 72px; padding: 9px 13px; }
  .dash-sidebar-logo img, .dash-sidebar-logo svg.q-brand { height: 43px; max-width: 145px; }
  .dash-nav-logout-top { order: 1; margin: 7px 10px 5px; min-height: 40px; height: 40px; flex: 0 0 40px; font-size:var(--fs-sm); }
  .dash-nav { order: 2; flex: 1; min-height: 0; overflow-y: auto; }
  .dash-nav a { min-height: 48px; height: 48px; font-size:var(--fs-sm); padding-inline: 14px; gap: 9px; }
}

/* =========================================================
   HERO FINAL RESPONSIVE PASS — image-led, no gradient
   Direction/header/sidebar intentionally untouched.
   ========================================================= */
.hero-v4{
    position:relative;
    overflow:hidden;
    min-height:440px;
    padding:0 0 28px;
    background:var(--surface-soft);
}
.hero-v4-bg-photo{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center center;
    opacity:1;
    z-index:0;
}
.hero-v4-bg-fade{display:none!important}
.hero-v4-grid{
    position:relative;
    z-index:2;
    min-height:410px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
}
.hero-v4-text{
    width:min(560px,46%);
    max-width:560px;
    padding:24px 8px;
    margin-inline-start:auto;
    text-align:right;
}
.hero-eyebrow-text{font-size:var(--fs-sm);line-height:1.7;margin-bottom:8px}
.hero-v4-text h1{
    font-size:clamp(34px,3.8vw,52px);
    line-height:1.25;
    letter-spacing:-.7px;
    margin-bottom:14px;
}
.hero-subtitle-text{
    max-width:500px;
    font-size:var(--fs-base);
    line-height:1.9;
    margin-inline-start:auto;
}
.hero-actions{margin-top:20px;margin-bottom:0}
.hero-strip{position:relative;z-index:3;margin-top:-2px}

@media (max-width:1100px){
    .hero-v4{min-height:420px}
    .hero-v4-grid{min-height:390px}
    .hero-v4-text{width:min(520px,50%)}
    .hero-v4-text h1{font-size:clamp(32px,4vw,46px)}
}

@media (max-width:900px){
    .hero-v4{min-height:400px}
    .hero-v4-grid{min-height:370px}
    .hero-v4-text{width:min(500px,54%)}
}

@media (max-width:700px){
    .hero-v4{
        min-height:0;
        padding:0 0 18px;
        background:var(--surface-soft);
    }
    .hero-v4-bg-photo{
        position:relative;
        display:block;
        width:100%;
        height:220px;
        object-fit:cover;
        object-position:center top;
    }
    .hero-v4-grid{
        min-height:0;
        margin-top:0;
        display:block;
    }
    .hero-v4-text{
        width:100%;
        max-width:680px;
        margin:0 auto;
        padding:24px 14px 4px;
        text-align:center;
    }
    .hero-eyebrow-text{font-size:var(--fs-xs)}
    .hero-v4-text h1{font-size:clamp(27px,7vw,34px);line-height:1.35}
    .hero-subtitle-text{font-size:var(--fs-sm);line-height:1.8;margin:0 auto}
    .hero-actions{justify-content:center;margin-top:17px;gap:8px}
    .hero-actions .btn{min-width:0;flex:1;padding:10px 12px;font-size:var(--fs-xs)}
    .hero-strip{margin-top:14px}
}

@media (max-width:480px){
    .hero-v4-bg-photo{height:195px}
    .hero-v4-text{padding-top:20px}
    .hero-v4-text h1{font-size:var(--fs-2xl)}
}

/* HERO Arabic placement: keep the text block beside the right-side sidebar.
   English placement remains unchanged. */
@media (min-width: 701px) {
    html[dir="rtl"] .hero-v4-text,
    body.lang-ar .hero-v4-text {
        margin-inline-start: 0;
        margin-inline-end: auto;
        text-align: right;
    }
}

/* QIMMA — English sidebar icon/label proximity fix
   Scope: navigation labels only. No language direction, sidebar position,
   header, hero, or Arabic layout changes. */
@media (min-width: 901px) {
  html[dir="ltr"] .dash-sidebar .dash-nav a,
  body.lang-en .dash-sidebar .dash-nav a {
    justify-content: flex-start;
  }

  html[dir="ltr"] .dash-sidebar .dash-nav .dash-nav-label,
  body.lang-en .dash-sidebar .dash-nav .dash-nav-label {
    flex: 0 0 auto;
    text-align: left;
  }
}

/* ---- Popups: styled confirmations and the receipt viewer (see assets/js/script.js) ---- */
.logout-modal-overlay.q-pop-overlay { z-index: 1300; padding: 12px; }
.logout-modal-box p.q-pop-message { color: var(--text); font-size: var(--fs-md); font-weight: 700; line-height: 1.7; }
.logout-modal-icon.q-pop-icon-danger { background: rgba(217,56,56,.1); color: var(--danger); }
.btn.q-pop-danger { background: var(--danger); color: var(--white); border: 2px solid var(--danger); }
.btn.q-pop-danger:hover { background: var(--danger); border-color: var(--danger); }
.logout-modal-box.q-pop-wide { max-width: 940px; width: 94vw; padding: 24px 22px 18px; }
.logout-modal-box.q-pop-wide h3 { margin-bottom: 14px; }
.q-pop-stage { display: flex; justify-content: center; align-items: center; min-height: 120px; max-height: 76vh; overflow: auto; color: var(--muted); font-size: var(--fs-sm); }
.q-pop-stage img { max-width: 100%; max-height: 74vh; border-radius: 10px; display: block; }
.q-pop-stage iframe { width: 100%; height: 74vh; border: 0; border-radius: 10px; background: var(--surface); }
.q-pop-wide .logout-modal-actions { margin-top: 16px; }
.q-pop-wide .logout-modal-actions .btn { flex: 0 1 auto; }

/* ---- Sidebar groups: a short title opens and closes the pages that belong to it ---- */
.dash-nav-group-btn { display: flex; align-items: center; gap: 15px; width: 100%; min-height: 57px; padding: 0 20px; background: none; border: 0; border-inline-end: 3px solid transparent; color: rgba(255,255,255,.92); font: inherit; font-size: var(--fs-base); font-weight: 800; cursor: pointer; text-align: start; transition: background .18s ease; }
.dash-nav-group-btn:hover { background: rgba(255,255,255,.075); color: #fff; }
.dash-nav-group-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dash-nav-group-btn .dash-nav-label { text-align: start; }
/* a closed group that holds the page you are on: its title glows so you still know where you are */
.dash-nav-group.has-active:not(.open) > .dash-nav-group-btn { color: var(--accent); border-inline-end-color: var(--accent); background: linear-gradient(90deg, rgba(255,255,255,.03), color-mix(in srgb, var(--accent) 12%, transparent)); }
.dash-nav-chevron { flex: 0 0 auto; opacity: .75; transition: transform .2s ease; }
.dash-nav-group.open > .dash-nav-group-btn .dash-nav-chevron { transform: rotate(180deg); }
.dash-nav-sub { display: none; margin: 0; padding: 0; background: rgba(0,0,0,.14); }
.dash-nav-group.open > .dash-nav-sub { display: block; }
.dash-nav .dash-nav-sub a { min-height: 46px; height: auto; padding-inline-start: 46px; padding-inline-end: 18px; font-size: var(--fs-sm); font-weight: 600; }
.dash-nav .dash-nav-sub .dash-nav-icon { width: 18px; height: 18px; }
.dash-nav .dash-nav-sub .dash-nav-icon svg { width: 16px; height: 16px; }
@media (max-width: 900px) {
    .dash-nav-group-btn { min-height: 48px; height: 48px; font-size: var(--fs-sm); padding-inline: 14px; gap: 9px; }
    .dash-nav .dash-nav-sub a { min-height: 44px; height: 44px; }
}

/* ---- Settings: the logo is two parts (icon + name) ---- */
.brand-preview { display: flex; align-items: center; min-height: 58px; padding: 6px 12px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.brand-preview svg.q-brand, .brand-preview img { height: 50px; width: auto; max-width: 100%; display: block; }
.brand-part { text-align: start; }
.brand-part-preview { display: flex; align-items: center; justify-content: center; height: 84px; padding: 8px; margin-bottom: 8px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface); }
.brand-part-preview img { max-height: 66px; max-width: 100%; object-fit: contain; }

/* ---- User menu: the name chip in the top bar opens a small menu (dashboard, profile, log out) ---- */
.dash-user-menu { position: relative; flex-shrink: 0; }
.dash-user-menu > .dash-top-profile { background: none; border-top: 0; border-bottom: 0; border-inline-end: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; border-radius: 12px; -webkit-appearance: none; appearance: none; }
.dash-user-menu > .dash-top-profile:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.dash-user-menu > .dash-top-profile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.dash-user-dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 300; min-width: 230px; max-width: calc(100vw - 16px); padding: 8px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 38px rgba(15,70,55,.16); }
.dash-user-menu.open .dash-user-dropdown { display: block; }
body.lang-ar .dash-user-dropdown { direction: rtl; text-align: right; }
body.lang-en .dash-user-dropdown { direction: ltr; text-align: left; }
.dash-user-dropdown-head { display: flex; flex-direction: column; line-height: 1.4; padding: 8px 12px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.dash-user-dropdown-head strong { font-size: var(--fs-sm); color: var(--text); }
.dash-user-dropdown-head small { font-size: var(--fs-xs); color: var(--muted); }
.dash-user-dropdown a, .dash-user-dropdown button.dash-user-logout, .dash-user-dropdown-nav-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.dash-user-dropdown button.dash-user-logout { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: start; font-family: inherit; line-height: inherit; }
.dash-user-logout-form { margin: 0; }
.dash-user-dropdown a:hover, .dash-user-dropdown a:focus-visible, .dash-user-dropdown button.dash-user-logout:hover, .dash-user-dropdown button.dash-user-logout:focus-visible, .dash-user-dropdown-nav-toggle:hover, .dash-user-dropdown-nav-toggle:focus-visible { background: var(--bg); outline: none; }
.dash-user-dropdown a svg, .dash-user-dropdown button.dash-user-logout svg, .dash-user-dropdown-nav-toggle svg { flex: 0 0 auto; color: var(--primary); }
.dash-user-dropdown a.dash-user-logout, .dash-user-dropdown a.dash-user-logout svg, .dash-user-dropdown button.dash-user-logout, .dash-user-dropdown button.dash-user-logout svg { color: var(--danger); }
.logout-confirm-form { display: flex; flex: 1; margin: 0; }
.logout-confirm-form .btn { width: 100%; font: inherit; cursor: pointer; }

/* Keep the top bar and the sidebar in place while the page scrolls.
   `overflow-x: hidden` on <body> turned <body> into a scroll container, which silently disables `position: sticky` for everything
   inside it. Sideways scrolling is still blocked by <html>; `clip` is the equivalent for <body> without that side effect. */
@supports (overflow-x: clip) { body { overflow-x: clip; } }

/* ---- Notifications: the action button says where it leads (review = needs action, view = just look) ---- */
a.notif-view { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--primary); font-size: var(--fs-sm); font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
a.notif-view svg { flex: 0 0 auto; }
a.notif-view-view { background: transparent; color: var(--primary); }
a.notif-view-view:hover { background: var(--primary); color: var(--white); }
a.notif-view-review { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 22%, transparent); }
a.notif-view-review:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
a.notif-view:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* QIMMA V2.2 — professional unified green sidebar icons + hierarchy */
.dash-nav li:nth-child(odd) a,
.dash-nav li:nth-child(even) a { background: transparent; }
.dash-nav a {
    min-height: 58px;
    padding-inline: 22px 20px;
    gap: 14px;
    border-inline-end: 3px solid transparent;
    border-radius: 0 18px 18px 0;
}
.dash-nav-icon { width: 24px; height: 24px; flex: 0 0 24px; opacity: .92; }
.dash-nav-icon svg { width: 21px; height: 21px; stroke-linecap: round; stroke-linejoin: round; }
.dash-nav-label { font-weight: 750; letter-spacing: -.1px; }
.dash-nav a:hover { background: rgba(255,255,255,.06) !important; }
.dash-nav a.active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent), color-mix(in srgb, var(--accent) 18%, transparent)) !important;
    border-inline-end-color: var(--accent);
    border-radius: 0 20px 20px 0;
}
.dash-nav a.active .dash-nav-icon { color: var(--accent-on-dark, var(--accent)); transform: translateY(-.2px); }
@media (max-width:900px){
  .dash-nav a { min-height: 50px; height: 50px; padding-inline: 15px 13px; gap: 11px; }
  .dash-nav-icon { width: 22px; height: 22px; flex-basis: 22px; }
  .dash-nav-icon svg { width: 19px; height: 19px; }
}

.dash-sidebar > *,
.site-footer-v2 > *,
.logout-modal-box > * { position: relative; z-index: 1; }


/* Qimma account menu refinement: vertical-more trigger replaces the old chevron. */
.dash-top-profile { position:relative; gap:9px; }
.dash-user-more-icon { flex:0 0 auto; color:var(--muted); margin-inline-start:2px; }
.dash-top-profile:hover .dash-user-more-icon,
.dash-top-profile[aria-expanded="true"] .dash-user-more-icon { color:var(--primary); }
.dash-user-dropdown-nav-toggle { display:none; width:100%; align-items:center; gap:10px; min-height:44px; padding:0 12px; border:0; border-radius:10px; background:transparent; color:var(--text); font:inherit; font-size:var(--fs-sm); font-weight:700; text-align:start; cursor:pointer; }
.dash-user-dropdown-nav-toggle:hover,.dash-user-dropdown-nav-toggle:focus-visible { background:var(--bg); outline:none; }
.dash-user-dropdown-nav-toggle svg { flex:0 0 auto; color:var(--primary); }
.q-user-detail-name-row { display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap; }
.q-login-history-visibility-form { display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft, var(--bg));font-size:var(--fs-xs); }
.q-login-history-visibility-form label { display:flex;align-items:center;gap:7px;cursor:pointer;font-weight:700; }
.q-login-history-visibility-form input[type="checkbox"] { width:17px;height:17px;accent-color:var(--primary); }
.q-login-history-visibility-form .btn { padding:5px 11px;font-size:var(--fs-xs); }
@media(max-width:900px) {
  .dash-user-dropdown-nav-toggle { display:flex; }
  .q-user-detail-name-row { align-items:flex-start; }
  .q-login-history-visibility-form { max-width:100%; }
}
@media print {
  .q-login-history-visibility-form,.q-login-history-print-btn,.dash-sidebar,.dash-top-strip,.q-context-nav { display:none !important; }
}

/* Native <dialog> modals: the global "* { margin:0 }" reset removes the UA auto-margins, which pinned dialogs to a screen corner. Re-center every modal dialog on the platform. */
dialog:modal { margin: auto; inset: 0; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }



/* V5: theme-aware modal and popup surfaces.
   Prefer the active theme tokens; retain legacy fallbacks for older pages. */
:where(dialog, .modal, .modal-content, .modal-dialog, .popup, .popup-content,
       .logout-modal-box, .sc-modal, .ce-dlg, .q-modal, .q-popover, .swal2-popup) {
  color: var(--theme-text, var(--text, var(--text-color, #1f2937)));
  background-color: var(--theme-surface, var(--surface, var(--card, var(--white, #ffffff))));
  border-color: var(--theme-border, var(--border, #dbe2ea));
}
:where(dialog, .modal, .modal-content, .modal-dialog, .popup, .popup-content,
       .logout-modal-box, .sc-modal, .ce-dlg, .q-modal, .q-popover, .swal2-popup)
:where(h1, h2, h3, h4, p, label, li, small, strong, span:not(.badge):not(.btn)) {
  color: inherit;
}
:where(dialog, .modal, .modal-content, .popup-content, .logout-modal-box, .sc-modal, .ce-dlg, .q-modal, .swal2-popup)
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  color: var(--theme-text, var(--text, #1f2937));
  background-color: var(--theme-bg, var(--bg, var(--white, #ffffff)));
  border-color: var(--theme-border, var(--border, #dbe2ea));
}
:where(dialog, .modal, .modal-content, .popup-content, .logout-modal-box, .sc-modal, .ce-dlg, .q-modal, .swal2-popup)
:where(input, select, textarea)::placeholder {
  color: var(--theme-muted, var(--muted, #64748b));
  opacity: 1;
}
:where(dialog, .modal, .modal-content, .popup-content, .logout-modal-box, .sc-modal, .ce-dlg, .q-modal, .swal2-popup)
:where(.modal-header, .modal-footer, .sc-modal-head, .ce-dlg-head) {
  border-color: var(--theme-border, var(--border, #dbe2ea));
}
:where(dialog, .sc-modal, .ce-dlg)::backdrop {
  background: rgba(15, 23, 42, .52);
}
:where(.modal-backdrop, .popup-overlay, .q-modal-overlay) {
  background-color: var(--modal-backdrop, rgba(15, 23, 42, .52));
}
:where(.logout-modal-box) {
  background-color: var(--theme-surface, var(--surface, var(--white, #fff)));
  color: var(--theme-text, var(--text, #1f2937));
  border-color: var(--theme-border, var(--border, rgba(100,116,139,.2)));
}
:where(.logout-modal-box) :where(h3) {
  color: var(--theme-primary-dark, var(--primary-dark, var(--theme-primary, var(--primary, #334155))));
}
:where(.logout-modal-box) :where(p) {
  color: var(--theme-muted, var(--muted, #64748b));
}
:where(.logout-modal-box) :where(.btn:not(.btn-primary):not(.q-pop-danger)) {
  background-color: var(--theme-surface, var(--surface, #fff));
  color: var(--theme-primary, var(--primary, #334155));
  border-color: var(--theme-border, var(--border, #dbe2ea));
}
:where(.logout-modal-box) :where(.btn-primary) {
  background-color: var(--theme-primary, var(--primary, #334155));
  border-color: var(--theme-primary, var(--primary, #334155));
  color: var(--theme-primary-contrast, #fff);
}

/* Messaging contact presence indicators (text is available through title/aria-label). */
.qm-presence-indicator{display:inline-block;flex:0 0 9px;width:9px;height:9px;border-radius:50%;margin-inline-start:7px;vertical-align:middle;background:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.qm-presence-indicator.is-online{background:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.14)}
.qm-presence-indicator.is-offline{background:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.12)}


.qm-presence-indicator{position:relative;cursor:help}
.qm-presence-indicator:focus-visible{outline:2px solid currentColor;outline-offset:3px}
