/* ==========================================================================
   1. QLOBLAL VƏ ORTAQ ÜSLUBLAR (HƏM MÜƏLLİM, HƏM ŞAGİRD ÜÇÜN)
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }
body { background-color: #f4f6f9; color: #333; display: flex; min-height: 100vh; }

/* Panel Ümumi Qutuları */
.panel-box { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 30px; }
.panel-box h2 { font-size: 18px; margin-bottom: 20px; color: #1e293b; }

/* Statistika Şəbəkəsi (Stats Grid) */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-left: 5px solid #3b82f6; }
.stat-card h3 { font-size: 14px; color: #64748b; text-transform: uppercase; }
.stat-card p { font-size: 24px; font-weight: bold; color: #1e293b; margin-top: 5px; }

/* Form Elementləri */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-control { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }
.form-control:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

/* Düymələr və Keçidlər */
.btn-submit { background: #10b981; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.btn-submit:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: 12px; }
.btn-danger:hover { background: #dc2626; }
.btn-link { color: #3b82f6; text-decoration: none; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* Cədvəllər üçün Mobil Sürüşdürmə Konteyneri */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 15px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e2e8f0; font-size: 14px; white-space: nowrap; }
th { background-color: #f8fafc; color: #64748b; font-weight: 600; }
.badge { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; background: #e0f2fe; color: #0369a1; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.alert-success { color: #10b981; font-weight: bold; margin-bottom: 15px; }

/* ==========================================================================
   2. MÜƏLLİM PANELİNƏ ÖZƏL ÜSLUBLAR
   ========================================================================== */
.sidebar { width: 260px; background: #1e293b; color: white; padding: 25px 20px; flex-shrink: 0; transition: 0.3s; }
.sidebar h2 { font-size: 18px; margin-bottom: 30px; text-align: center; color: #3b82f6; font-weight: 700; }
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-menu a, .sidebar-menu button { color: #cbd5e1; text-decoration: none; display: block; padding: 12px 15px; border-radius: 8px; transition: 0.3s; width: 100%; text-align: left; background: none; border: none; font-size: 15px; cursor: pointer; font-weight: 500; }
.sidebar-menu a:hover, .sidebar-menu a.active, .sidebar-menu button:hover, .sidebar-menu button.active { background: #3b82f6; color: white; }
.btn-sidebar-logout:hover { background: #ef4444 !important; color: white !important; }
.main-content { flex-grow: 1; padding: 30px; overflow-y: auto; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid #e2e8f0; padding-bottom: 15px; }
.header h1 { font-size: 24px; color: #1e293b; }
.user-info { font-weight: bold; color: #475569; }

/* ==========================================================================
   3. ŞAGİRD PANELİNƏ ÖZƏL ÜSLUBLAR
   ========================================================================== */
.student-body { display: block; background-color: #f8fafc; color: #334155; }
.student-body .navbar { background: #ffffff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); width: 100%; }
.student-body .navbar .logo { font-size: 20px; font-weight: bold; color: #3b82f6; text-decoration: none; }
.student-body .navbar .user-badge { background: #eff6ff; color: #1e40af; padding: 6px 15px; border-radius: 50px; font-weight: 600; font-size: 14px; }
.student-body .btn-logout { color: #ef4444; text-decoration: none; font-weight: bold; font-size: 14px; margin-left: 20px; }
.student-body .btn-logout:hover { text-decoration: underline; }

/* Şagird Konteyner və Xoş gəldiniz kartı */
.student-body .student-container { width: 90%; max-width: 1200px; margin: 40px auto; display: block; }
.student-body .welcome-card { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); color: white; padding: 30px; border-radius: 16px; box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2); margin-bottom: 25px; }
.student-body .welcome-card h1 { font-size: 26px; margin-bottom: 5px; color: white; }
.student-body .welcome-card p { font-size: 16px; opacity: 0.9; color: white; line-height: 1.6; }
.student-body .welcome-card .info-tag { display: inline-block; background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 4px; font-size: 13px; margin-top: 15px; font-weight: bold; color: white; }

/* Şagird Grid Mexanizmi */
.student-body .dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 30px; width: 100%; }
.student-body .lesson-list { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.student-body .lesson-row { background: #f8fafc; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #3b82f6; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.student-body .lesson-row:hover { background: #f1f5f9; transform: translateX(3px); }
.student-body .lesson-title { font-weight: 600; color: #1e293b; font-size: 15px; }

/* Video və Kviz düymələri */
.student-body .btn-watch { background: #3b82f6; color: white; text-decoration: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: bold; display: inline-flex; align-items: center; gap: 5px; }
.student-body .btn-watch:hover { background: #2563eb; }
.student-body .no-video { color: #94a3b8; font-size: 13px; font-weight: 500; }
.student-body .task-card { background: #fffbeb; border: 1px solid #fde68a; padding: 20px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 15px; }
.student-body .task-info h4 { color: #b45309; font-size: 15px; font-weight: 600; }
.student-body .task-info p { color: #78350f; font-size: 13px; margin-top: 2px; }
.student-body .btn-quiz { background: #d97706; color: white; text-decoration: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: bold; display: inline-block; }
.student-body .btn-quiz:hover { background: #b45309; }

@media (min-width: 992px) {
    .student-body .dashboard-grid { grid-template-columns: 2fr 1fr; }
}
/* ==========================================================================
   4. MOBİL CİHAZLAR ÜÇÜN XÜSUSİ RESPONSIVE DÜZƏLİŞLƏR (Maksimum 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Qlobal struktur tənzimləmələri */
    body { flex-direction: column; } 
    .main-content { padding: 15px; }
    .panel-box { padding: 15px; margin-bottom: 20px; }
    
    /* Müəllim Paneli: Üfüqi (Sağa-Sola) Müasir Sürüşən Menyu */
    .sidebar { width: 100%; min-height: auto; padding: 15px; text-align: left; position: sticky; top: 0; z-index: 999; }
    .sidebar h2 { font-size: 16px; margin-bottom: 12px; text-align: left; }
    .sidebar-menu { display: flex; flex-direction: row; overflow-x: auto; white-space: nowrap; padding-bottom: 5px; gap: 8px; -webkit-overflow-scrolling: touch; }
    .sidebar-menu::-webkit-scrollbar { height: 4px; }
    .sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
    .sidebar-menu li { margin-bottom: 0; flex: 0 0 auto; }
    .sidebar-menu a, .sidebar-menu button { padding: 8px 14px; font-size: 13px; text-align: center; width: auto; }
    
    /* Müəllim Paneli Başlıq Hissəsi */
    .header { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
    .header h1 { font-size: 20px; }
    
    /* Statistika Kartları (Tək sütun) */
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    
    /* Şagird Paneli Üst Menyusu */
    .student-body .navbar { padding: 15px; flex-direction: column; gap: 10px; text-align: center; }
    .student-body .navbar .user-badge { margin-left: 0; margin-top: 5px; display: inline-block; }
    .student-body .btn-logout { margin-left: 0; margin-top: 10px; display: block; }
    
    /* Şagird Məzmun Konteyneri */
    .student-body .student-container { width: 100%; padding: 0 15px; margin: 20px auto; }
    .student-body .welcome-card { padding: 20px; border-radius: 12px; }
    .student-body .welcome-card h1 { font-size: 20px; }
    .student-body .welcome-card p { font-size: 14px; }
    
    /* Şagird Dərs Sətirləri (Şaquli nizam) */
    .student-body .lesson-row { flex-direction: column; align-items: flex-start; gap: 12px; padding: 15px; }
    .student-body .lesson-action { width: 100% !important; text-align: left !important; }
    .student-body .btn-watch { width: 100%; justify-content: center; padding: 10px; display: flex; }
    
    /* Şagird Tapşırıq Kartları (Şaquli nizam) */
    .student-body .task-card { flex-direction: column; align-items: flex-start; gap: 15px; padding: 15px; }
    .student-body .btn-quiz { width: 100%; text-align: center; display: block; padding: 10px; }
}

/* ==========================================================================
   5. GİRİŞ (LOGIN) SƏHİFƏSİ ÜÇÜN MOBİL RESPONSIVE DÜZƏLİŞLƏR (Maksimum 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .login-body { padding: 15px; }
    .login-box { padding: 25px 20px; border-radius: 12px; }
    .login-box h2 { font-size: 22px; }
    .login-box p { font-size: 13px; margin-bottom: 20px; }
    .login-box .form-control { padding: 11px; font-size: 15px; }
    .btn-block { padding: 13px; font-size: 15px; }
}
