/* Student Panel - Professional Dashboard */
:root {
    --primary-color: #2a7fba;
    --primary-dark: #1e6b9f;
    --secondary-color: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-active: #334155;
    --sidebar-hover: #334155;
    --text-dark: #1e293b;
    --text-medium: #64748b;
    --text-light: #94a3b8;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-dark);
    line-height: 1.6;
}

.student-panel-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--white);
}

.student-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.student-id {
    font-size: 0.75rem;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.sidebar-nav li a i {
    margin-right: 0.8rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-nav li a:hover {
    background-color: var(--sidebar-hover);
}

.sidebar-nav li.active a {
    background-color: var(--sidebar-active);
    color: var(--white);
    border-left: 3px solid var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.logout-btn:hover {
    color: var(--white);
}

.logout-btn i {
    margin-right: 0.8rem;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
    min-height: 100vh;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 90;
}

.nav-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-right: 1rem;
    cursor: pointer;
    display: none;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-medium);
    font-size: 1.2rem;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.5rem 0;
    display: none; /* hidden by default */
    flex-direction: column;
    min-width: 160px;
    z-index: 1000;
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

.dropdown-menu.show {
    display: flex; /* show when .show is added */
}
.user-dropdown {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative; /* Required for absolute dropdown */
}
.dropdown-menu {
    transition: opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    pointer-events: auto;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}



/* Content Area Styles */
.content-area {
    padding: 1.5rem;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius);
    padding: 2rem;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.welcome-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.welcome-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.welcome-image {
    width: 200px;
}

.welcome-image img {
    width: 100%;
    height: auto;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--white);
    font-size: 1.2rem;
}

.bg-blue {
    background-color: #3b82f6;
}

.bg-green {
    background-color: #10b981;
}

.bg-orange {
    background-color: #f59e0b;
}

.bg-purple {
    background-color: #8b5cf6;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.stat-info p {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Current Courses */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.course-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.course-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
}

.progress-text {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.course-details {
    padding: 1.5rem;
}

.course-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.course-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.course-meta span {
    display: flex;
    align-items: center;
}

.course-meta i {
    margin-right: 0.3rem;
}

.btn-continue {
    display: block;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.6rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-continue:hover {
    background-color: var(--primary-dark);
}

/* Recent Activity */
.activity-list {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: #f8fafc;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.activity-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.activity-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.activity-action {
    margin-left: auto;
}

.btn-review {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-review:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Upcoming Deadlines */
.deadlines-list {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.deadline-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.deadline-item:last-child {
    border-bottom: none;
}

.deadline-date {
    text-align: center;
    margin-right: 1rem;
    min-width: 50px;
}

.deadline-date .day {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.deadline-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 1px;
}

.deadline-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.deadline-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.deadline-action {
    margin-left: auto;
}

.btn-start {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-start:hover {
    background-color: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 240px;
    }
    .main-content {
        margin-left: 240px;
    }
    .welcome-banner {
        flex-direction: column;
        text-align: center;
    }
    .welcome-image {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        height: 100vh;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .welcome-content h1 {
        font-size: 1.5rem;
    }
    .welcome-image {
        display: none;
    }
}