/* ============================================================
   Web Genius — Student Dashboard Styles
   (Based on Admin Dashboard Styles)
   ============================================================ */

/* — LOGIN PAGE --------------------------------------------- */
:root {
    /* Primary Color Palette (Blue Shade) */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: var(--space-lg);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
}

.login-subtitle {
    text-align: center;
    font-size: .9rem;
    color: var(--gray-400);
    margin-bottom: var(--space-2xl);
    font-weight: 500;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.login-error {
    margin-top: var(--space-md);
    font-size: .85rem;
    color: #EF4444;
    text-align: center;
    min-height: 1.2em;
}

.login-back {
    display: block;
    text-align: center;
    margin-top: var(--space-lg);
    font-size: .85rem;
    color: var(--gray-400);
    transition: color var(--transition);
}

.login-back:hover {
    color: var(--blue);
}

/* — ADMIN LAYOUT (Used for Student too) -------------------- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--gray-900);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: var(--space-xl) var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-header .nav-logo {
    font-size: 1.3rem;
}

.sidebar-header .nav-logo span {
    -webkit-text-fill-color: var(--gray-400);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: .7rem var(--space-lg);
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-400);
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, .04);
}

.sidebar-nav a.active {
    color: var(--white);
    background: rgba(37, 99, 235, .12);
    border-left-color: var(--blue);
}

.sidebar-nav a .nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-section-label {
    padding: var(--space-lg) var(--space-lg) var(--space-sm);
    font-size: .7rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: .1em;
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-footer .admin-user {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
}

.admin-user-info .admin-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--white);
}

.admin-user-info .admin-role {
    font-size: .72rem;
    color: var(--gray-400);
}

.btn-logout {
    width: 100%;
    padding: .55rem;
    border-radius: var(--radius-sm);
    font-size: .82rem;
    font-weight: 600;
    color: var(--gray-400);
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: all var(--transition);
    text-align: center;
}

.btn-logout:hover {
    color: #EF4444;
    border-color: rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .06);
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--off-white);
    min-height: 100vh;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-2xl);
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--gray-900);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-content {
    padding: var(--space-2xl);
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    font-size: 1.3rem;
    color: var(--gray-800);
    margin-right: var(--space-md);
}

/* — STAT CARDS --------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.stat-card .stat-icon.blue {
    background: rgba(37, 99, 235, .1);
}

.stat-card .stat-icon.purple {
    background: rgba(124, 58, 237, .1);
}

.stat-card .stat-icon.green {
    background: rgba(16, 185, 129, .1);
}

.stat-card .stat-icon.amber {
    background: rgba(245, 158, 11, .1);
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
    font-size: .85rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* — DATA TABLES -------------------------------------------- */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.table-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gray-900);
}

.data-table-wrap {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: .8rem 1rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-400);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    white-space: nowrap;
}

.data-table tbody td {
    padding: .8rem 1rem;
    font-size: .9rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-50);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(37, 99, 235, .02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Action buttons */
.btn-sm {
    padding: .35rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 600;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }
}

/* — STUDENT SPECIFIC STYLES -------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.course-thumb {
    height: 160px;
    background: var(--gray-100);
    position: relative;
    overflow: hidden;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-body {
    padding: 1.5rem;
}

.course-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.progress-bar-wrap {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-500);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
    display: flex;
    justify-content: space-between;
}

/* Course Detail */
.course-header-banner {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-600);
}

.course-header-banner h1 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
}

.lesson-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.lesson-item:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.lesson-item.completed .lesson-status-icon {
    background: var(--green-100);
    color: var(--green-700);
    border-color: var(--green-200);
}

.lesson-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    color: var(--gray-400);
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.lesson-info {
    flex: 1;
}

.lesson-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.2rem;
}

.lesson-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.lesson-arrow {
    color: var(--gray-300);
}

/* Lesson Player */
.lesson-layout {
    max-width: 900px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    background: black;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1.5rem 0 2rem;
    box-shadow: var(--shadow-lg);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lesson-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.lesson-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.btn-secondary {
    background: var(--green-100);
    color: var(--green-800);
    border: 1px solid var(--green-200);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--green-200);
}


/* — SCHEDULE / CALENDAR ------------------------------------ */
.schedule-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--gray-600);
    transition: all var(--transition);
    border: 1px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-200);
}


.calendar-controls h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: var(--space-sm);
}

.calendar-grid-header div {
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    padding: .5rem 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.calendar-day {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
    padding: .4rem;
    font-size: .9rem;
    color: var(--gray-600);
    position: relative;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-day.empty {
    border: none;
    background: none;
    cursor: default;
}

.calendar-day:not(.empty):hover {
    border-color: var(--blue);
    background: var(--blue-50);
    color: var(--blue);
}

.calendar-day.today {
    font-weight: 700;
    color: var(--blue);
    border-color: var(--blue);
}

.calendar-day.has-session {
    background: #EFF6FF;
    /* blue-50 */
}

.calendar-day .session-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    margin-top: 4px;
}

.calendar-day.selected {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

.calendar-day.selected .session-dot {
    background: var(--white);
}

/* Session Cards List */
.sessions-list {
    border-top: 1px solid var(--gray-100);
    padding-top: var(--space-lg);
}

.session-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    padding: var(--space-md);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: box-shadow var(--transition);
}

.session-card:hover {
    box-shadow: var(--shadow-md);
}

.session-time {
    font-weight: 700;
    font-size: .9rem;
    color: var(--blue);
    white-space: nowrap;
    min-width: 120px;
}

.session-info {
    flex: 1;
}

.session-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
    margin-bottom: .2rem;
}

.session-lesson {
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: .4rem;
}

.session-desc {
    font-size: .9rem;
    color: var(--gray-600);
    line-height: 1.4;
}

/* =========================================
   ACHIEVEMENTS REDESIGN
   ========================================= */

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.achievement-badge-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    z-index: 2;
}

.achievement-content {
    flex: 1;
    z-index: 2;
}

.achievement-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.achievement-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.cohort-name {
    font-size: 0.9rem;
    color: var(--primary-600);
    font-weight: 500;
}

.issue-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.grade-badge {
    display: inline-block;
    background: var(--success-50);
    color: var(--success-700);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
}

.achievement-actions {
    margin-top: 0.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.85rem;
}

.decorative-circle {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-50);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 1;
}


/* =========================================
   PROFILE REDESIGN
   ========================================= */
.profile-layout {
    max-width: 800px;
}

.profile-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.profile-header-section {
    padding: 2rem;
    background: linear-gradient(to right, var(--primary-50), white);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.avatar-upload-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    background: var(--gray-200);
}

.profile-avatar-img,
.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gray-500);
    background: var(--gray-100);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    color: white;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.overlay-icon {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.overlay-text {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-title-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    color: var(--gray-900);
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-form {
    padding: 2rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group.half {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary-500);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input.disabled {
    background: var(--gray-50);
    color: var(--gray-500);
    cursor: not-allowed;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: var(--gray-500);
    pointer-events: none;
}

.form-input[type='select'] {
    appearance: none;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.form-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
    text-align: right;
}

/* =========================================
   SECTION HEADER & FILTERS
   ========================================= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.45rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
}

.filter-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

/* =========================================
   ASSIGNMENTS
   ========================================= */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.assignment-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.assign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.course-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    background: var(--primary-50);
    color: var(--primary-700);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 1rem;
}

.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-submitted {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-graded {
    background: #D1FAE5;
    color: #065F46;
}

.assign-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.25rem 0;
}

.assign-lesson {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0 0 0.75rem 0;
}

.assign-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-500);
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
    margin-bottom: 0.75rem;
}

.assign-feedback {
    background: var(--primary-50);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--primary-400);
}

.assign-actions {
    padding-top: 0.5rem;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 420px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.no-data {
    padding: 2rem;
    color: var(--gray-500);
    text-align: center;
}

/* =========================================
   ASSIGNMENT DETAIL MODAL
   ========================================= */
.assignment-detail {
    max-width: 800px;
    margin: 0 auto;
}

.assignment-detail .back-link {
    margin-bottom: 1.5rem;
}

.assignment-desc {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.assignment-desc h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.assignment-info-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.assignment-info-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.submission-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.submission-section h3 {
    font-size: 1.2rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.submission-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s;
    margin-bottom: 1rem;
}

.submission-form textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.file-upload-area:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.file-upload-area .upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.file-upload-area p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 0;
}

.file-upload-area .file-name {
    color: var(--primary-600);
    font-weight: 600;
}

.submission-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.existing-submission {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.existing-submission .sub-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.existing-submission .sub-text {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.6;
    white-space: pre-wrap;
}

.grade-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.grade-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.grade-circle.good {
    background: #D1FAE5;
    color: #065F46;
}

.grade-circle.ok {
    background: #FEF3C7;
    color: #92400E;
}

.grade-circle.bad {
    background: #FEE2E2;
    color: #991B1B;
}

.grade-info .grade-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.grade-info .grade-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
}

.feedback-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #EFF6FF;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-500);
}

.feedback-box .fb-label {
    font-weight: 600;
    color: var(--primary-700);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.feedback-box .fb-text {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================
   DASHBOARD OVERVIEW
   ========================================= */
.dashboard-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.dash-stat {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.dash-stat-icon.blue {
    background: rgba(37, 99, 235, .1);
}

.dash-stat-icon.green {
    background: rgba(16, 185, 129, .1);
}

.dash-stat-icon.amber {
    background: rgba(245, 158, 11, .1);
}

.dash-stat-icon.purple {
    background: rgba(124, 58, 237, .1);
}

.dash-stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--gray-900);
    margin-bottom: 0.2rem;
}

.dash-stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Continue Learning */
.continue-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.continue-card h3 {
    font-size: 1.1rem;
    color: var(--gray-900);
    margin: 0 0 1rem 0;
}

.continue-course {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.continue-course:hover {
    border-color: var(--primary-200);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.continue-course-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-50);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.continue-course-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-course-info {
    flex: 1;
    min-width: 0;
}

.continue-course-info .cc-title {
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.continue-course-info .cc-progress {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.continue-course .cc-arrow {
    font-size: 1.2rem;
    color: var(--gray-400);
}

/* Announcements */
.announcements-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.announcements-card h3 {
    font-size: 1.1rem;
    color: var(--gray-900);
    margin: 0 0 1rem;
}

.announcement-item {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

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

.announcement-item:hover {
    background: var(--gray-50);
}

.announcement-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-body {
    font-size: 0.85rem;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.announcement-date {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 0.3rem;
}

.priority-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.priority-urgent {
    background: #FEE2E2;
    color: #991B1B;
}

.priority-important {
    background: #FEF3C7;
    color: #92400E;
}

.dash-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .15);
    border-left: 4px solid var(--gray-400);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    transition: all 0.3s ease;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

.toast.toast-success {
    border-left-color: #10B981;
}

.toast.toast-error {
    border-left-color: #EF4444;
}

.toast.toast-info {
    border-left-color: #3B82F6;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--gray-700);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--gray-400);
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--gray-700);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =========================================
   PASSWORD CHANGE
   ========================================= */
.password-section {
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.password-section h4 {
    font-size: 1.05rem;
    color: var(--gray-900);
    margin: 0 0 0.75rem 0;
}

.password-section .form-row {
    margin-bottom: 0;
}

.password-section .form-actions {
    margin-top: 0.75rem;
    padding-top: 0;
    border-top: none;
}

.disabled-text {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-style: italic;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .dash-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {

    .assignments-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-header-section {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-stats {
        grid-template-columns: 1fr 1fr;
    }

    .toast {
        min-width: unset;
        max-width: calc(100vw - 3rem);
    }
}