/* public/css/style.css */
:root {
    --primary-color: #1a2a6c; /* كحلي عميق */
    --secondary-color: #b21f1f; /* أحمر داكن */
    --accent-color: #fdbb2d; /* ذهبي */
    --light-bg: #f4f6f9;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
}

/* الشريط العلوي */
.navbar {
    background: linear-gradient(to left, var(--primary-color), #2a4085);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    border-right: 4px solid var(--accent-color);
    padding-right: 15px;
}

/* الحاوية الرئيسية */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

/* النماذج والمدخلات */
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}
input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* الأزرار */
.btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}
.btn:hover {
    background-color: #132055;
}



/* --- تحسينات خاصة للجوال (Mobile Responsive) --- */
@media (max-width: 768px) {
    /* 1. تحسين عرض الشجرة */
    #chart_div {
        overflow-x: scroll; /* السماح بالتمرير الأفقي */
        -webkit-overflow-scrolling: touch; /* تمرير ناعم في الآيفون */
        padding: 10px;
        min-height: 500px;
    }

    /* 2. تكبير النصوص والأزرار للمس */
    .btn, .btn-action {
        padding: 15px; /* أزرار أكبر للإصبع */
        font-size: 1.1rem;
    }

    /* 3. ترتيب البطاقات عمودياً */
    .profile-container, .edit-grid, .doc-grid {
        grid-template-columns: 1fr !important; /* عمود واحد فقط */
        padding: 10px;
    }

    /* 4. القائمة العلوية */
    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .navbar div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    /* 5. إخفاء العناصر غير المهمة في الجوال */
    .cover-bg { height: 80px; } /* تصغير الغلاف */
}


/* --- تصميم النافبار الاحترافي --- */
.navbar {
    background: linear-gradient(to right, #0f172a, #1a2a6c);
    padding: 0 30px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
}

.nav-links {
    display: flex;
    gap: 5px;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

/* الرابط النشط (الصفحة الحالية) */
.nav-links a.active {
    background: rgba(212, 175, 55, 0.2); /* خلفية ذهبية شفافة */
    color: var(--accent-color);
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
}

.btn-logout {
    background: #d32f2f;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(211, 47, 47, 0.3);
}

.btn-logout:hover {
    background: #b71c1c;
    transform: scale(1.05);
}

/* التجاوب مع الجوال */
@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .user-menu {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-top: 10px;
    }
}

/* حاوية الأزرار لضمان الترتيب */
.header-nav-group {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

/* التنسيق العام للأزرار */
.nav-btn {
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px; /* حواف دائرية ناعمة */
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* مسافة بين الأيقونة والنص */
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* تنسيق زر الرئيسية (لون فاتح وهادئ) */
.btn-home {
    background-color: #f8f9fa;
    color: #4a5568;
    border-color: #e2e8f0;
}

.btn-home:hover {
    background-color: #edf2f7;
    color: #2d3748;
    transform: translateY(-2px); /* حركة خفيفة للأعلى */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* تنسيق زر لوحة التحكم (لون مميز وجذاب) */
.btn-dash {
    background: linear-gradient(135deg, #3498db, #2980b9); /* تدرج أزرق */
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-dash:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

/* تحسين الظهور على الجوال */
@media (max-width: 600px) {
    .nav-btn span { display: none; } /* إخفاء النص والإبقاء على الأيقونة في الشاشات الصغيرة جداً */
    .nav-btn { padding: 8px 10px; }
}




