/* --- الإعدادات العامة وتحسين الخطوط --- */
body { 
    margin: 0; 
    background-color: #f4f7f6; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px; 
    line-height: 1.6;
    color: #333;
    padding-bottom: 75px; 
    direction: rtl; 
    text-align: right;
}

/* --- الكلاس المسؤول عن الإخفاء (يجب أن يبقى في الأعلى) --- */
.hidden { display: none !important; }

/* --- إصلاح القوائم المنسدلة (Dropdowns) --- */
select.form-select, 
.form-select-sm {
    font-size: 16px !important;
    padding: 10px 10px 10px 35px !important; 
    background-position: left 0.75rem center !important; 
    background-size: 14px 10px;
    height: auto;
    appearance: none; 
    -webkit-appearance: none;
    background-repeat: no-repeat;
    background-color: #fff;
}

/* تحسين حقول الإدخال ومنع الزוوم الآلي */
input[type="text"], 
input[type="password"], 
input[type="search"],
textarea {
    font-size: 16px !important; 
    padding: 12px !important;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* --- الهيدر (Header) --- */
.header {
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- شاشة تسجيل الدخول (حل مشكلة عدم الاختفاء) --- */
#login-screen {
    /* تمت إزالة !important من هنا للسماح لكلاس .hidden بالعمل */
    display: flex; 
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f4f7f6 0%, #e9ecef 100%);
    z-index: 3000;
}

.login-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
    width: 85%;
    max-width: 380px;
    margin: 0 auto; 
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container h3 {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 25px;
}

.login-container input {
    background-color: #f8f9fa;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    transition: border-color 0.3s;
}

.login-container button {
    width: 100%;
    padding: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

/* --- القائمة السفلية (Bottom Navigation) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    z-index: 1500;
}

.nav-item {
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #555;
    flex: 1;
}

.nav-item i { font-size: 24px; }
.nav-item span { font-size: 12px; }
.nav-item.active { color: #007bff !important; }

/* --- قائمة المزيد (More Menu Overlay) --- */
#more-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000 !important; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.more-menu-content {
    background: white;
    border-radius: 25px 25px 0 0;
    padding: 20px;
    padding-bottom: 40px;
}

.menu-item {
    width: 100%;
    padding: 18px;
    text-align: right;
    font-size: 18px;
    border: none;
    background: none;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

/* --- البطاقات والأكورديون --- */
.bene-item-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-right: 6px solid #007bff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-label {
    min-width: 120px;
    color: #777;
    font-weight: 600;
}