@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;600;700;800&display=swap');

/* --- 1. المتغيرات العامة --- */
:root {
    --side-bg: #09576a;
    --accent-glow: #4ae3f0;
    --ai-gold: #ffd700;
    --text-light: #e0e0e0;
    --hover-bg: rgba(12, 97, 104, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* --- 2. الإعدادات الأساسية --- */
html {
    overflow-y: auto; 
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    color: white;
    overflow-x: hidden; 
}

/* --- 3. المحتوى الرئيسي (سنترة اللابتوب المثالية) --- */
.main {
    margin: 0 auto !important; 
    padding: 130px 20px 40px 20px; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    min-height: 100vh;
    width: 95%;
    max-width: 1000px; 
    box-sizing: border-box;
}

/* --- 4. الكروت والحاويات الشفافة --- */
.profile-card, .card, .glass-panel, .semester-card, .schedule-panel, .progress-container, .announcement-box {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    margin-bottom: 30px;
}

/* --- 5. الصور والجداول --- */
img { max-width: 100%; height: auto; }

.profile-img {
    width: 150px; height: 150px; 
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-glow);
    margin-bottom: 20px;
}

.logo-img-top { 
    width: 80px; 
    height: auto; 
    object-fit: contain;
}

/* =========================================
   📱 إعدادات الهواتف الشاملة (Responsive)
   ========================================= */
@media screen and (max-width: 768px) {
    
    .main {
        width: 100% !important;
        padding: 100px 15px 20px !important; 
    }

    .profile-card, .card, .glass-panel, .semester-card, .schedule-panel, .progress-container, .announcement-box {
        padding: 20px 15px !important;
        border-radius: 15px !important;
    }

    /* 🌟 إصلاح شريط التنقل العلوي (Navbar) في الهاتف 🌟 */
    .top-navbar { 
        padding: 0 15px !important; 
        height: 70px !important; 
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    /* جعل الأقسام الثلاثة متساوية لتوسيط الشعار بدقة */
    .nav-left, .nav-center, .nav-right { flex: 1 !important; display: flex !important; }
    
    .nav-left { justify-content: flex-start !important; } /* الجرس على اليسار */
    .nav-center { justify-content: center !important; }   /* الشعار في المنتصف */
    .nav-right { justify-content: flex-end !important; }  /* القائمة على اليمين */
    
    /* إخفاء صورة واسم الحساب لترك مساحة نظيفة */
    .student-name-top, .avatar-container { display: none !important; } 
    
    /* تكبير الشعار والاسم ليصبح بارزاً في الهاتف */
    .logo-img-top { width: 55px !important; margin-left: 5px !important; } 
    .brand-title { font-size: 20px !important; letter-spacing: 2px !important; }
    
    .dropdown-content { top: 70px !important; right: 10px !important; width: 250px !important; }

    /* إصلاح الجداول في الهواتف */
    table, .table-container {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 🌟 إصلاح كروت الإحصائيات والمعاملات المالية في الهاتف 🌟 */
    .stats-grid, 
    .finance-cards-container, 
    .cards-row {
        display: flex !important;
        flex-direction: column !important; /* إجبار الكروت على الاصطفاف عمودياً */
        gap: 15px !important;
        width: 100% !important;
    }
    
    .stats-grid > div, 
    .finance-cards-container > div,
    .cards-row > div {
        width: 100% !important; /* أخذ عرض الشاشة بالكامل */
        box-sizing: border-box !important;
    }
}