/* ================================================================
   مختبر كاوزا — التنسيقات الرئيسية
   Causa Lab — Main Stylesheet
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700;800;900&family=Cinzel:wght@400;500;600&display=swap');

:root {
    --navy: #1C3F60;
    --navy-dark: #142D45;
    --blue: #28709E;
    --gold: #C19447;
    --gold-light: #E6C77C;
    --ink: #1F2937;
    --muted: #6B7280;
    --light: #F4F6F9;
    --lighter: #FAFBFC;
    --white: #FFFFFF;
    --border: #D6DCE4;
    --green: #16A34A;
    --red: #DC2626;
    --amber: #D97706;

    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(28,63,96,0.08);
    --shadow-lg: 0 8px 24px rgba(28,63,96,0.12);

    --font: 'Tajawal', -apple-system, system-ui, sans-serif;
}

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

html { font-size: 15px; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--light);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }

/* ================================================================
   شريط التنقل العلوي
   ================================================================ */
.navbar {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 76px;
}
.navbar-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--white);
    text-decoration: none;
}
.brand-logo {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand-name {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--white);
}
.brand-sub {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--gold-light);
    font-weight: 500;
    margin-top: 0.2rem;
}
.brand-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    margin: 0 0.4rem;
    flex-shrink: 0;
}
.brand-madayn {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-light);
    white-space: nowrap;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    flex: 1;
}
.navbar-menu a {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.15s;
}
.navbar-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}
.navbar-menu .nav-cta {
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
}
.navbar-menu .nav-cta:hover {
    background: var(--gold-light);
    color: var(--navy-dark);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
}
.user-name { font-weight: 600; }
.user-role {
    background: rgba(193,148,71,0.2);
    color: var(--gold-light);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
}
.btn-logout {
    color: rgba(255,255,255,0.7);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}
.btn-logout:hover { background: rgba(255,255,255,0.08); color: var(--white); }

/* ================================================================
   الحاوية الرئيسية
   ================================================================ */
.main-container {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0;
}
.page-subtitle {
    color: var(--muted);
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* ================================================================
   البطاقات الإحصائية
   ================================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px;
    height: 100%;
    background: var(--gold);
}
.stat-card .label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}
.stat-card .value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}
.stat-card .delta {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--muted);
}
.stat-card .delta.positive { color: var(--green); }
.stat-card .delta.negative { color: var(--red); }
.stat-card.accent::before { background: var(--blue); }
.stat-card.alert::before { background: var(--amber); }

/* ================================================================
   البطاقات العامة
   ================================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.card-header {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}
.card-body { padding: 1.25rem 1.4rem; }

/* ================================================================
   الجداول
   ================================================================ */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.table th {
    background: var(--lighter);
    text-align: right;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 2px solid var(--border);
    font-size: 0.85rem;
}
.table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:hover { background: var(--lighter); }
.table .case-code {
    font-family: 'Calibri', monospace;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ================================================================
   الشارات (Badges)
   ================================================================ */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-draft  { background: #F3F4F6; color: #6B7280; }
.badge-active { background: #DBEAFE; color: #1E40AF; }
.badge-closed { background: #D1FAE5; color: #065F46; }
.badge-archived { background: #E5E7EB; color: #4B5563; }
.badge-sensitive { background: #FEE2E2; color: #991B1B; }

.phase-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    background: var(--light);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
}
.phase-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}

/* ================================================================
   الأزرار
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    border: none;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: var(--navy);
    color: var(--white);
}
.btn-primary:hover { background: var(--navy-dark); color: var(--white); }
.btn-gold {
    background: var(--gold);
    color: var(--navy);
}
.btn-gold:hover { background: var(--gold-light); }
.btn-outline {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--light); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.82rem; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #B91C1C; color: var(--white); }

/* ================================================================
   الفورمات
   ================================================================ */
.form-group { margin-bottom: 1.1rem; }
.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.45rem;
}
.form-label .required { color: var(--red); }
.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(40,112,158,0.12);
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-help { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: flex-start;
    padding-top: 1rem;
    margin-top: 1.2rem;
    border-top: 1px solid var(--border);
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* ================================================================
   التنبيهات
   ================================================================ */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-error   { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

/* ================================================================
   صفحة تسجيل الدخول
   ================================================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 1rem;
}
.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.login-brand {
    text-align: center;
    margin-bottom: 1.8rem;
}
.login-brand .mark {
    width: 60px;
    height: 60px;
    background: var(--navy);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 0.7rem;
}
.login-brand h1 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 0.3rem;
}
.login-brand .subtitle {
    font-size: 0.9rem;
    color: var(--muted);
}
.login-demo {
    background: var(--lighter);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.login-demo strong { color: var(--navy); }

/* ================================================================
   مخطط دورة الحياة (Lifecycle Stepper)
   ================================================================ */
.lifecycle {
    display: flex;
    gap: 0;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}
.lifecycle-step {
    flex: 1;
    padding: 1rem 1.2rem;
    text-align: center;
    background: var(--lighter);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    position: relative;
    border-left: 1px solid var(--border);
}
.lifecycle-step:last-child { border-left: 0; }
.lifecycle-step.completed {
    background: var(--green);
    color: var(--white);
}
.lifecycle-step.current {
    background: var(--gold);
    color: var(--navy);
}
.lifecycle-step .step-num {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    line-height: 24px;
    margin-left: 0.4rem;
    font-size: 0.8rem;
}

/* ================================================================
   الفلاتر
   ================================================================ */
.filter-bar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar .form-control { padding: 0.45rem 0.75rem; font-size: 0.88rem; }
.filter-bar label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }

/* ================================================================
   الفوتر
   ================================================================ */
.footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.7);
    padding: 1rem 0;
    margin-top: auto;
    font-size: 0.85rem;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ================================================================
   الاستجابة للأجهزة
   ================================================================ */
@media (max-width: 900px) {
    .navbar-inner { flex-wrap: wrap; }
    .navbar-menu { order: 3; width: 100%; overflow-x: auto; }
    .form-row { grid-template-columns: 1fr; }
    .lifecycle { flex-direction: column; }
    .lifecycle-step { border-left: 0; border-bottom: 1px solid var(--border); }
}

/* مكونات إضافية */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.empty-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 0.8rem;
    display: block;
}
.empty-state h3 {
    color: var(--navy);
    margin-bottom: 0.4rem;
}

/* قائمة الأسباب في صفحة الحالة */
.cause-item {
    background: var(--lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem 1.1rem;
    margin-bottom: 0.6rem;
    border-right: 4px solid var(--gold);
}
.cause-item.is-root { border-right-color: var(--green); background: #F0FDF4; }
.cause-item .meta {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}
.cause-item .type-tag {
    background: var(--navy);
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
}
.cause-item .category-tag {
    background: var(--white);
    color: var(--navy);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
}

/* رسم بياني صغير للأسباب */
.dist-bar {
    background: var(--lighter);
    border-radius: var(--radius);
    height: 28px;
    overflow: hidden;
    margin-top: 0.3rem;
    position: relative;
}
.dist-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy), var(--blue));
    border-radius: var(--radius);
    transition: width 0.4s;
}
.dist-row {
    display: grid;
    grid-template-columns: 200px 1fr 50px;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}
.dist-row .label { color: var(--ink); font-weight: 500; }
.dist-row .count { text-align: left; color: var(--muted); font-weight: 600; }

/* ================================================================
   إضافات الإصدار 0.3: إدارة المستخدمين، الفريق، متطلبات المرحلة
   ================================================================ */

/* تحسين عرض شريط المراحل للحالات المغلقة والحالية */
.lifecycle-step.completed::after,
.lifecycle-step.current::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
}

/* details/summary — تحسين عرض البوتنات القابلة للطي */
details summary {
    list-style: none;
    user-select: none;
}
details summary::-webkit-details-marker {
    display: none;
}
details[open] summary {
    margin-bottom: 0.3rem;
}

/* جدول المستخدمين — تحسين العرض داخل الخلايا */
.table code {
    background: var(--lighter);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--blue);
}

/* بطاقة الفريق في صفحة الحالة */
#team .form-control {
    margin-top: 0.3rem;
}

/* تحسين البادج للمالك في قائمة الفريق */
#team .badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

/* رسائل التنبيه داخل شريط المتطلبات */
.alert.requirements-bar {
    border-right: 4px solid var(--gold);
    background: #FFFBEB;
}

/* تحسين عرض الفلتر على الشاشات الصغيرة */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar label {
        margin-top: 0.5rem;
    }
}

/* ================================================================
   إضافات الإصدار 0.4: صفحة الترسية + زر خروج بارز
   ================================================================ */

/* ===== زر الخروج البارز ===== */
.btn-logout-prominent {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(220, 38, 38, 0.15);
    color: #FCA5A5;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-logout-prominent:hover {
    background: rgba(220, 38, 38, 0.3);
    color: #FFFFFF;
    border-color: #FCA5A5;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    line-height: 1;
}
.navbar-user {
    gap: 1rem;
}

/* ===== الترسية: عام ===== */
.landing-body {
    background: #FFFFFF;
    display: block;
    min-height: 100vh;
}

/* الشريط العلوي */
.landing-header {
    background: var(--navy);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.landing-brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.landing-brand-logo {
    width: 78px;
    height: 78px;
    flex-shrink: 0;
}
.landing-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.landing-brand-name {
    font-family: 'Cairo', sans-serif;
    font-size: 1.7rem;
    font-weight: 900;
    color: white;
}
.landing-brand-en {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--gold-light);
    margin-top: 0.35rem;
}
.landing-brand-tagline {
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
    margin-top: 0.45rem;
}
.landing-brand-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    margin: 0 0.5rem;
    flex-shrink: 0;
}
.landing-brand-madayn {
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-light);
    align-self: center;
    white-space: nowrap;
}
.landing-actions {
    display: flex;
    gap: 0.6rem;
}
.btn-outline-light {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
}

/* البطل */
.landing-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: white;
    padding: 4.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px;
    height: 8px;
    background: var(--gold);
}
.landing-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
}
.hero-label {
    display: inline-block;
    background: rgba(193, 148, 71, 0.15);
    color: var(--gold-light);
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(193, 148, 71, 0.3);
}
.hero-title {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: white;
}
.gold-text { color: var(--gold); }
.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    max-width: 540px;
}
.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
}
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-visual svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* الأقسام */
.landing-section {
    padding: 4rem 0;
    background: white;
}
.landing-section-dark {
    background: var(--navy);
    color: white;
}
.landing-section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-label {
    display: inline-block;
    background: rgba(193, 148, 71, 0.12);
    color: var(--gold);
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.3;
    max-width: 800px;
    margin: 0 auto;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 0.8rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* بطاقات النطاق (ما يفعله / لا يفعله) */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.scope-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 2px solid;
}
.scope-yes {
    background: #F0FDF4;
    border-color: var(--green);
}
.scope-no {
    background: #FEF2F2;
    border-color: var(--red);
}
.scope-card-header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.scope-card-header i {
    font-size: 1.8rem;
}
.scope-yes .scope-card-header i { color: var(--green); }
.scope-no  .scope-card-header i { color: var(--red); }
.scope-card-header h3 {
    font-size: 1.3rem;
    color: var(--navy);
    margin: 0;
}
.scope-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.scope-card ul li {
    padding: 0.5rem 0;
    line-height: 1.7;
    color: var(--ink);
    position: relative;
    padding-right: 1.6rem;
}
.scope-card ul li::before {
    position: absolute;
    right: 0;
    top: 0.65rem;
    font-family: 'bootstrap-icons';
    font-size: 0.95rem;
}
.scope-yes ul li::before { content: '\F26B'; color: var(--green); }
.scope-no  ul li::before { content: '\F659'; color: var(--red); }
.scope-note {
    background: var(--lighter);
    border-right: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: var(--ink);
    line-height: 1.8;
}
.scope-note strong { color: var(--navy); }

/* المبررات */
.rationale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.rationale-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    backdrop-filter: blur(10px);
}
.rationale-tag {
    display: inline-block;
    background: var(--gold);
    color: var(--navy);
    padding: 0.25rem 0.7rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.9rem;
}
.rationale-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}
.rationale-card p {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* الخصائص */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: all 0.2s;
    border-right: 3px solid var(--gold);
}
.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(193, 148, 71, 0.12);
    color: var(--gold);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-card h3 {
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.feature-card p {
    color: var(--ink);
    line-height: 1.7;
    font-size: 0.92rem;
}

/* الركائز */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.pillar-card {
    background: var(--lighter);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
    position: relative;
    border-top: 4px solid var(--navy);
}
.pillar-num {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    font-family: 'Calibri', sans-serif;
    opacity: 0.4;
}
.pillar-role {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.pillar-card h3 {
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}
.pillar-card p {
    color: var(--ink);
    line-height: 1.8;
}

/* CTA */
.landing-cta {
    background: linear-gradient(135deg, var(--gold) 0%, #D4A862 100%);
    color: var(--navy);
    padding: 4rem 0;
    text-align: center;
}
.landing-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: var(--navy);
}
.landing-cta p {
    font-size: 1.1rem;
    margin-bottom: 1.8rem;
    color: var(--navy-dark);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.landing-cta .btn-gold {
    background: var(--navy);
    color: white;
    border: 2px solid var(--navy);
}
.landing-cta .btn-gold:hover {
    background: var(--navy-dark);
    color: white;
}

/* الفوتر */
.landing-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.7);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.7rem;
}
.footer-desc {
    line-height: 1.8;
    font-size: 0.92rem;
}
.footer-desc-small {
    line-height: 1.8;
    font-size: 0.88rem;
}
.footer-section-title {
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.landing-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.landing-footer ul li {
    padding: 0.3rem 0;
}
.landing-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.15s;
    font-size: 0.92rem;
}
.landing-footer a:hover {
    color: var(--gold-light);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* استجابة الجوال */
@media (max-width: 900px) {
    .landing-hero-inner { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.4rem; }
    .two-col-grid { grid-template-columns: 1fr; }
    .pillars-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .hero-visual { order: -1; max-width: 280px; margin: 0 auto; }
    .section-title { font-size: 1.7rem; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .landing-header-inner { flex-wrap: wrap; }
    .landing-actions { width: 100%; justify-content: stretch; }
    .landing-actions .btn { flex: 1; justify-content: center; }
    .hero-title { font-size: 2rem; }
}

/* ================================================================
   إضافات الإصدار 0.8: زر المساعدة في الشريط العلوي
   ================================================================ */

.btn-help-toggle {
    background: rgba(193, 148, 71, 0.15);
    border: 1px solid rgba(193, 148, 71, 0.3);
    color: var(--gold-light);
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.15s;
}
.btn-help-toggle:hover {
    background: rgba(193, 148, 71, 0.25);
    color: var(--white);
}

/* ================================================================
   الجلسة ٢: تمييز الأعضاء + نظام التأييد
   ================================================================ */

/* أيقونة العضو الملوّنة */
.member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    flex-shrink: 0;
    cursor: help;
    box-shadow: 0 0 0 2px white, 0 0 0 3px rgba(0,0,0,0.06);
    line-height: 1;
    vertical-align: middle;
}

/* صف نسبة المساهمة */
.contributor-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.contributor-row .timeago {
    color: var(--muted);
}

/* بطاقات حالة الدليل (مقترح / معتمد / مرفوض) */
.evidence-card {
    position: relative;
    transition: all 0.2s;
}
.evidence-card.status-proposed {
    border-right-color: #F59E0B;
    background: linear-gradient(to right, #FFFBEB 0%, var(--lighter) 60%);
}
.evidence-card.status-approved {
    border-right-color: #059669;
}
.evidence-card.status-rejected {
    opacity: 0.55;
    border-right-color: #6B7280;
    background: #F4F6F9;
}
.evidence-card.status-rejected .evidence-title-text {
    text-decoration: line-through;
}

/* شارة حالة الدليل */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}
.status-badge.proposed {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FBBF24;
}
.status-badge.approved {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}
.status-badge.rejected {
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid #D1D5DB;
}

/* شريط تقدم التأييد */
.endorsement-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}
.endorsement-bar {
    flex: 1;
    height: 6px;
    background: #FEF3C7;
    border-radius: 99px;
    overflow: hidden;
    max-width: 120px;
}
.endorsement-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B, #10B981);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* أزرار التأييد */
.btn-endorse {
    background: white;
    color: #065F46;
    border: 1px solid #10B981;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all 0.15s;
}
.btn-endorse:hover {
    background: #D1FAE5;
}
.btn-endorse:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-reject {
    background: white;
    color: #991B1B;
    border: 1px solid #DC2626;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}
.btn-reject:hover {
    background: #FEE2E2;
}

.btn-approve {
    background: #059669;
    color: white;
    border: 1px solid #059669;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}
.btn-approve:hover {
    background: #065F46;
}

/* قائمة المؤيدين */
.endorsers-list {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: 0.3rem;
}
.endorsers-list .member-avatar {
    margin-right: -8px;
    box-shadow: 0 0 0 2px white;
}
.endorsers-list .member-avatar:first-child {
    margin-right: 0;
}

/* مؤشر التحديث للمنهجيات */
.method-activity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #FEF3C7;
    border: 1px solid #FBBF24;
    color: #92400E;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}
.method-activity-indicator.fresh {
    background: #DBEAFE;
    border-color: #3B82F6;
    color: #1E40AF;
}
