/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Page */
#loginPage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: fixed;  /* ADD THIS LINE */
    top: 0;           /* ADD THIS */
    left: 0;          /* ADD THIS */
    width: 100%;      /* ADD THIS */
    height: 100%; 
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.logo i {
    font-size: 50px;
    color: #667eea;
    margin-bottom: 15px;
}

.logo h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.input-group i {
    color: #777;
    margin-right: 10px;
}

.input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.demo {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* Main Portal */
.hidden {
    display: none;
}

/* Header */
header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #333;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user i {
    font-size: 36px;
    color: #667eea;
}

.logout-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* Main Layout */
main {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

/* Content */
.content {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Dashboard */
.welcome-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-card i {
    font-size: 40px;
}

.stat-card.blue i { color: #3498db; }
.stat-card.green i { color: #2ecc71; }
.stat-card.purple i { color: #9b59b6; }

.stat-card p {
    font-size: 32px;
    font-weight: bold;
    margin-top: 5px;
}

.quick-actions, .deadlines {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-btn {
    background: #f8f9fa;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.deadline-list {
    margin-top: 15px;
}

.deadline-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.deadline-item.urgent {
    color: #e74c3c;
    font-weight: bold;
}

/* Forms */
.form-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.upload-zone {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    background: #f8f9ff;
}

.upload-zone i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.submit-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
}

/* Assignments */
.filters {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.filter {
    padding: 8px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
}

.filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.assignment-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Grades */
.grade-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    display: flex;
    gap: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.grade-circle {
    text-align: center;
    padding: 30px;
}

.grade {
    font-size: 48px;
    font-weight: bold;
    color: #2ecc71;
    margin: 10px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.status.completed {
    background: #d4edda;
    color: #155724;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-card {
        flex-direction: column;
    }
}
/* Assignment Items */
.assignment-item {
    background: white;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    border-left: 5px solid #3498db;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.assignment-item h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.assignment-item p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

/* Status Badges */
.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
    display: inline-block;
}

.status-badge.submitted {
    background: #3498db;
}

.status-badge.graded {
    background: #2ecc71;
}

.status-badge.pending {
    background: #f39c12;
}

/* Filter Buttons */
.filter {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Assignment List Container */
#assignmentList {
    margin-top: 20px;
}