/* =====================================================
   DASHBOARD STYLING
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F9FAFB;
    color: #1F2937;
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #6B7280;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 18px;
}

.nav-item:hover {
    background: #F3F4F6;
    color: #2563EB;
}

.nav-item.active {
    background: #EFF6FF;
    color: #2563EB;
    border-left-color: #2563EB;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 0;
}

/* ===== TOPBAR ===== */
.topbar {
    background: #FFFFFF;
    padding: 20px 32px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Menu Button - HIDDEN on desktop */
.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: #F3F4F6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #374151;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: #E5E7EB;
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E5E7EB;
}

.profile-info span {
    font-size: 14px;
    font-weight: 600;
    color: #4B5563;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 32px;
}

.stat-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FFFFFF;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.stat-details h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 4px;
}

.stat-details p {
    font-size: 14px;
    color: #6B7280;
}

/* ===== CONTENT GRID ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 32px 32px 32px;
}

/* ===== CARD ===== */
.card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
}

.btn-link {
    color: #2563EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #1D4ED8;
}

.card-body {
    padding: 24px;
}

/* ===== COURSE LIST ===== */
.course-list {
    display: grid;
    gap: 16px;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.course-item:hover {
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.course-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.course-details {
    flex: 1;
}

.course-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.teacher-name {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #6B7280;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: #FFFFFF;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== TEST RESULTS ===== */
.test-results {
    display: grid;
    gap: 16px;
}

.test-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.test-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.test-info p {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 4px;
}

.test-info small {
    font-size: 12px;
    color: #9CA3AF;
}

.test-score {
    text-align: center;
}

.test-score .score {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.test-score .status {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.test-score.pass .score {
    color: #10B981;
}

.test-score.pass .status {
    color: #059669;
}

.test-score.fail .score {
    color: #EF4444;
}

.test-score.fail .status {
    color: #DC2626;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {

    /* Show hamburger on tablet */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 16px 20px;
    }

    .topbar-left h1 {
        font-size: 18px;
    }

    .topbar-left h1 i {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .content-grid {
        padding: 0 20px 20px 20px;
    }

    .course-item {
        flex-direction: column;
        text-align: center;
    }

    .course-item img {
        width: 100%;
        height: 150px;
    }
}

/* Sidebar Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}