* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Dashboard page shouldn't have padding */
body:not(.dashboard-container) {
    padding: 20px;
}

header, footer {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    color: #1976D2;
    margin-bottom: 10px;
}

.timetable-section {
    margin-bottom: 50px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.timetable-header {
    background-color: #1976D2;
    color: white;
    padding: 15px 20px;
}

.timetable-header h2 {
    margin-bottom: 5px;
}

.timetable-header p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.timetable-grid {
    position: relative;
    overflow-x: auto;
    margin: 15px;
    width: 100%;
    transform: translateZ(0); /* Force hardware acceleration */
}

.timetable-row {
    display: flex;
    height: 90px;
    min-width: fit-content;
}

.timetable-cell {
    flex: 0 0 auto;
    width: 80px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    padding: 5px;
}

.day-cell {
    width: 70px;
    background-color: #f5f5f5;
}

.header-cell {
    background-color: #f5f5f5;
    font-size: 12px;
}

.timetable-event {
    position: absolute;
    border-radius: 6px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    cursor: pointer;
    transition: transform 0.2s;
}

.timetable-event:hover {
    transform: scale(1.02);
    z-index: 20;
}

.event-course {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
    color: black;
}

.event-venue {
    font-size: 12px;
    color: black;
}

.event-status {
    font-size: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
}

.event-status.cancelled {
    background-color: #F44336;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .timetable-cell {
        width: 60px;
        font-size: 12px;
    }
    
    .day-cell {
        width: 50px;
    }
    
    .timetable-event {
        font-size: 90%;
    }
}

.loading, .no-timetables {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #757575;
}

/* Ride Management Styles */
.ride-item {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.ride-item h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.ride-item p {
    margin: 4px 0;
    color: #666;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.card h3 {
    margin: 0 0 16px 0;
    color: #2c3e50;
}

.mt-4 {
    margin-top: 24px;
}

/* Class Representative Styles */
.class-reps-section {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.class-reps-title {
    color: #1976D2;
    font-size: 16px;
    margin-bottom: 10px;
}

.class-reps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.class-rep-card {
    display: flex;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.class-rep-card:hover {
    transform: translateY(-2px);
}

.class-rep-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.class-rep-info {
    flex: 1;
}

.class-rep-role {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.class-rep-name {
    font-weight: 500;
    color: #333;
}

.class-rep-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.class-rep-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.class-rep-dropdown.active {
    display: block;
}

.class-rep-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
}

.class-rep-option:hover {
    background-color: #f5f5f5;
}

.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
}

.confirmation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.confirmation-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.btn-confirm {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-cancel {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}