/*********************** ستايل مربع البحث (عصري ورسمي) ********************************************/

/* ستايل اهتزاز ناعم ودقيق */
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    15%, 45%, 75% { transform: rotate(-12deg); }
    30%, 60% { transform: rotate(12deg); }
}

.shake {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) infinite;
}

.searchInput {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

/* حقل إدخال ناعم بألوان نقية */
.searchInput input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 30px; /* شكل بيضوي عصري */
    border: 2px solid transparent;
    background-color: #f1f3f5;
    color: #333;
    font-size: 15px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.searchInput input:focus {
    background-color: #ffffff;
    border-color: #2a5298; /* إطار أزرق رسمي يتماشى مع الشريط العلوي */
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.15);
    outline: none;
}

/* القائمة المنسدلة (تم الحفاظ على خاصية الإخفاء display: none) */
.dropdown-content {
    display: none; /* <<-- منطقة إخفاء قديمة */
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    border: none;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 250px;
    overflow-y: auto;
}

.searchInput input:focus + .dropdown-content {
    display: block;
    animation: slideIn 0.2s ease-out; /* حركة ظهور سلسة */
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .searchInput input {
        font-size: 16px;
        padding: 10px 16px;
    }
}
/*********************** انتهاء ستايل مربع البحث ********************************************/

/* أنيميشن لتغيير التدرج اللوني تلقائياً (يبدأ بالأزرق الرسمي) */
@keyframes corporateBgAnimation {
    0%, 100% {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* 1. الأزرق الكحلي الرسمي الأساسي */
    }
    10% {
        background: linear-gradient(135deg, #141e30 0%, #243b55 100%); /* 2. Midnight Blue */
    }
    20% {
        background: linear-gradient(135deg, #232526 0%, #414345 100%); /* 3. Charcoal Minimalist */
    }
    30% {
        background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%); /* 4. Modern Slate & Teal */
    }
    40% {
        background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); /* 5. Deep Emerald */
    }
    50% {
        background: linear-gradient(135deg, #1f1c2c 0%, #928dab 100%); /* 6. Deep Indigo */
    }
    60% {
        background: linear-gradient(135deg, #283e51 0%, #485563 100%); /* 7. Steel Corporate */
    }
    70% {
        background: linear-gradient(135deg, #093028 0%, #237a57 100%); /* 8. Deep Forest */
    }
    80% {
        background: linear-gradient(135deg, #2c2a29 0%, #534f4d 100%); /* 9. Rich Espresso */
    }
    90% {
        background: linear-gradient(135deg, #1f4068 0%, #162447 100%); /* 10. Royal Navy Tech */
    }
}

.topbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #FFFFFF;
    font-size: 18px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    padding: 12px 20px;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    animation: corporateBgAnimation 1200s ease infinite; /* 1200 ثانية إجمالي الدورة (دقيقتين لكل لون) */
}
/* الأزرار العلوية بخلفيات زجاجية شفافة */
.openbtn, .closebtn, .notification-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    border-radius: 50%; /* شكل دائري متناسق */
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 2;
}

.openbtn {
    font-size: 22px;
}

.openbtn:hover, .notification-btn:hover {
  background-color: rgba(255, 255, 255, 0.1); 
    transform: translateY(-2px);
}

/* زر الإغلاق (تم الحفاظ على خاصية الإخفاء display: none) */
.closebtn {
    display: none; /* <<-- منطقة إخفاء قديمة */
    font-size: 26px;
    background-color: rgba(255, 255, 255, 0.2);
}

.closebtn:hover {
    background-color: #ffffff;
    color: #e63946; /* لون أحمر رسمي للإغلاق */
    transform: rotate(90deg); /* دوران مميز للإغلاق */
}

.profile-picture {
    margin-left: auto;
    float: right;
    margin-left: 12px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, border-color 0.3s;
    object-fit: cover;
}

.profile-picture:hover {
    transform: scale(1.1);
    border-color: #ffffff;
}

.back-button {
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.back-button img {
    width: 42px;
    height: 42px; 
    direction: ltr;
    margin-right: 8px;
    border-radius: 50%;
    transition: transform 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1); /* إطار شفاف للسهم */
    padding: 5px;
} 

.back-button img:hover {
    transform: translateX(-5px); /* تحريك لليسار */
    background-color: rgba(255, 255, 255, 0.2);
}

/* زر وجرس الإشعارات */
.notification-btn {
    font-size: 20px;
    position: relative;
    background-color: transparent; /* التعديل هنا: جعل الدائرة شفافة لتأخذ لون التوب بار تماماً */
}

/* تنبيه الإشعارات (تم الحفاظ على خاصية الإخفاء display: none) */
.notification-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #e63946; /* لون أحمر معياري رسمي للتنبيهات */
    color: #ffffff; /* نص أبيض */
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: none; /* <<-- منطقة إخفاء قديمة */
    align-items: center;
    justify-content: center;
    border: 2px solid #2a5298; /* إطار بلون الشريط ليفصل البادج عن أيقونة الجرس */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}