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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.login-container h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.login-container button:hover {
    background: #5a6fd8;
}

.error {
    background: #ff6b6b;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    color: #333;
}

nav a {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    margin-left: 10px;
}

nav a:hover {
    background: #5a6fd8;
}

.add-class, .add-schedule {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.add-class form, .add-schedule form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.add-class input, .add-class select, .add-schedule input, .add-schedule select {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    flex: 1;
    min-width: 150px;
}

.add-class button, .add-schedule button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.classes-list, .timetable-view {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.timetable-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.day-column {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    min-height: 300px;
}

.day-column h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #667eea;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.schedule-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
    border-left: 4px solid #667eea;
}

.schedule-item .time {
    color: #666;
    font-size: 12px;
}

.schedule-item .room {
    color: #888;
    font-size: 11px;
}

.delete-btn-small {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

.student-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.student-link:hover {
    text-decoration: underline;
}

.student-details {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.detail-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.detail-section p {
    margin: 8px 0;
    line-height: 1.4;
}

.detail-section strong {
    color: #333;
    min-width: 120px;
    display: inline-block;
}

.logout {
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.content {
    display: block;
}

.students-list {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.students-list h3 {
    margin-bottom: 20px;
    color: #333;
}

.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

.subject-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background: #ff5252;
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .timetable-grid {
        grid-template-columns: 1fr;
    }
    
    .add-class form, .add-schedule form {
        flex-direction: column;
    }
}