/* ===========================================
   COLLOQUIUM ATTENDANCE SYSTEM - STYLESHEET
   
   This CSS file styles all pages of the system:
   - Login page (index.html)
   - Attendance form (attendance.php)
   - Professor Dashboard (prof_dashboard.php)
   - Student Dashboard (stud_dashboard.php)
   
   Color Scheme:
   - Primary Blue: #003366 (Gettysburg College blue)
   - Accent Orange: #ff6600 (Gettysburg College orange)
   - Success Green: #28a745
   - Error Red: #dc3545
   - Warning Orange: #fd7e14
   =========================================== */

/* Logo styling */
.logo {
    display: block;
    margin: 0 auto 1.5rem auto;
    width: 120px;
    height: auto;
}

/* ===========================================
   CSS RESET & BASE STYLES
   Normalizes default browser styles
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #003366;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===========================================
   LOGIN PAGE CONTAINER
   White card centered on blue background
   =========================================== */
.container {
    background: #ffffff;
    color: #333;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* ===========================================
   FORM STYLES
   Used across login and attendance forms
   =========================================== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type='text'] {
    padding: 0.875rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    width: 100%;
}

input[type='text']:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

button[type='submit'] {
    padding: 0.75rem 1.5rem;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button[type='submit']:hover {
    background-color: #e55a00;
}

/* ===========================================
   RESULT/MESSAGE DISPLAY STYLES
   For login results and form feedback
   =========================================== */
#result {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

#result div[style*='green'] {
    color: #28a745;
}

#result div[style*='red'] {
    color: #dc3545;
}

#result div[style*='orange'] {
    color: #fd7e14;
}

#result a {
    color: #ff6600;
    text-decoration: none;
}

#result a:hover {
    text-decoration: underline;
}

/* ===========================================
   ATTENDANCE PAGE STYLES
   Specific styles for attendance.php
   =========================================== */
.attendance-page {
    flex-direction: column;
    padding: 2rem;
}

.attendance-container {
    background: #ffffff;
    color: #333;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
}

/* Header with icon and title */
.attendance-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.attendance-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #003366;
}

.attendance-header h1 i {
    color: #ff6600;
}

.subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Active event banner - shows current event status */
.active-event-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.active-event-banner.event-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.active-event-banner.no-event {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

/* Feedback messages (success, error, info) */
.message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Form styling */
.attendance-form {
    margin-bottom: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

/* Primary button with icon */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #e55a00;
}

.help-text {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Database error display */
.db-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Event details card */
.event-details {
    background: #f5f5f5;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.event-details h3 {
    color: #003366;
    margin-bottom: 0.75rem;
}

.event-details p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.event-details p i {
    color: #ff6600;
    width: 20px;
}

/* Multiple events styling */
.event-item {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.event-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.event-item h4 {
    color: #003366;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* ===========================================
   DASHBOARD PAGE STYLES
   Shared styles for professor and student dashboards
   =========================================== */
.dashboard-page {
    display: block;
    background: #f0f2f5;
    color: #333;
}

/* Navigation bar */
.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #003366;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-brand i {
    color: #ff6600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main content area */
.dashboard-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.dashboard-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #003366;
    text-align: left;
}

.dashboard-header h1 i {
    color: #ff6600;
}

/* ===========================================
   STATISTICS CARDS GRID
   Displays key metrics at top of dashboard
   =========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

/* Individual stat card */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Colored icon circles */
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.blue {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-icon.green {
    background: #e8f5e9;
    color: #388e3c;
}

.stat-icon.orange {
    background: #fff3e0;
    color: #f57c00;
}

.stat-icon.red {
    background: #ffebee;
    color: #d32f2f;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.stat-value small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
    display: block;
}

/* ===========================================
   COURSE CARDS GRID
   Grid of courses on professor dashboard
   =========================================== */
.courses-section h2,
.students-section h2,
.events-section h2,
.history-section h2 {
    color: #003366;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Individual course card - clickable */
.course-card {
    display: block;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.course-card.selected {
    border-color: #ff6600;
}

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

.course-code {
    font-weight: 700;
    color: #003366;
    font-size: 1.1rem;
}

.course-semester {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.course-name {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.course-stats {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.85rem;
}

.course-stats i {
    color: #ff6600;
    margin-right: 0.25rem;
}

/* ===========================================
   STUDENT TABLE
   Lists students in professor dashboard
   =========================================== */
.students-section {
    margin-top: 2rem;
}

.requirement-note {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.requirement-note i {
    color: #1976d2;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.students-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table th,
.students-table td,
.history-table th,
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.students-table th,
.history-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.students-table tr:hover,
.history-table tr:hover {
    background: #fafafa;
}

.attendance-count {
    font-weight: 700;
    color: #003366;
}

/* Status badges (Complete, In Progress, Partial) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.incomplete,
.status-badge.partial {
    background: #fff3e0;
    color: #e65100;
}

.type-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.no-data {
    text-align: center;
    color: #888;
    padding: 3rem;
    background: white;
    border-radius: 12px;
}

.no-data i {
    margin-right: 0.5rem;
}

/* ===========================================
   TAB NAVIGATION
   For student dashboard tabs
   =========================================== */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
}

.tab-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-link:hover {
    color: #003366;
}

.tab-link.active {
    color: #003366;
    border-bottom-color: #ff6600;
}

.tab-link i {
    color: #ff6600;
}

/* ===========================================
   EVENT CARDS
   For upcoming events on student dashboard
   =========================================== */
.event-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.event-type-badge {
    display: inline-block;
    background: #ff6600;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.event-title {
    color: #003366;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-meta p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.event-meta i {
    color: #ff6600;
    width: 16px;
}

/* ===========================================
   RESPONSIVE DESIGN
   Adjustments for smaller screens
   =========================================== */
@media (max-width: 768px) {
    .dashboard-nav {
        padding: 1rem;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .students-table,
    .history-table {
        font-size: 0.85rem;
    }
    
    .students-table th,
    .students-table td,
    .history-table th,
    .history-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* ===========================================
   LOGIN PAGE ENHANCEMENTS
   Improved styling for login form
   =========================================== */
.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

input[type='email'],
input[type='password'] {
    padding: 0.875rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    width: 100%;
}

input[type='email']:focus,
input[type='password']:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #e55a00;
}

/* Login result messages */
#loginResult {
    margin-top: 1rem;
    text-align: center;
}

.login-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
}

.login-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
}

.login-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: #666;
}

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.login-footer a {
    color: #003366;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-footer a:hover {
    color: #ff6600;
}

/* ===========================================
   ADMIN DASHBOARD STYLES
   Sidebar layout and admin-specific components
   =========================================== */
.admin-page {
    display: block;
}

.admin-nav {
    background: linear-gradient(135deg, #003366 0%, #001a33 100%);
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Admin Sidebar */
.admin-sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #f5f5f5;
    color: #003366;
}

.sidebar-link.active {
    background: #fff3e0;
    color: #003366;
    border-left-color: #ff6600;
}

.sidebar-link i {
    width: 20px;
    color: #888;
}

.sidebar-link.active i,
.sidebar-link:hover i {
    color: #ff6600;
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    padding: 2rem;
    background: #f0f2f5;
    overflow-y: auto;
}

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

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-actions h2 {
    color: #003366;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #003366;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #004080;
}

.action-btn i {
    color: #ff6600;
}

/* Data Section (admin tables) */
.data-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.data-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #003366;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.data-section h2 i {
    color: #ff6600;
}

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

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.data-table tr:hover {
    background: #fafafa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.green {
    background: #e8f5e9;
    color: #388e3c;
}

.badge.orange {
    background: #fff3e0;
    color: #f57c00;
}

/* Small button */
.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #f0f2f5;
    color: #003366;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #e0e0e0;
}

/* Status badges for events */
.status-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.upcoming {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.past {
    background: #f5f5f5;
    color: #666;
}

/* Responsive Admin Layout */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 0.5rem 0;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .sidebar-link {
        padding: 0.75rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }
    
    .sidebar-link.active {
        border-left: none;
        border-bottom-color: #ff6600;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.625rem 0.5rem;
    }
}

/* ===========================================
   SIMPLIFIED ADMIN DASHBOARD STYLES
   Top navigation with Events and Rosters tabs
   =========================================== */

/* Top Navigation Bar */
.admin-topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #003366;
    padding: 0 2rem;
    height: 60px;
}

.nav-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-tabs {
    display: flex;
    height: 100%;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    height: 100%;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    color: white;
    border-bottom-color: #ff6600;
}

.nav-logout {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-logout:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Admin Content Area */
.admin-content {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #003366;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    color: #666;
    font-size: 0.9rem;
}

/* Event List */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.event-info h3 {
    color: #003366;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.event-info .event-meta {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.event-info .event-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.event-info .event-meta i {
    color: #ff6600;
}

/* Delete Button */
.btn-delete {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

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

.delete-form {
    margin: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: #003366;
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-content form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: #f0f2f5;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Course Selector */
.course-selector {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.course-selector label {
    font-weight: 600;
    color: #333;
}

.course-selector select {
    flex: 1;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

/* Add Student Form */
.add-student-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.inline-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form select {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.inline-form .btn-primary {
    width: auto;
    padding: 0.75rem 1.5rem;
}

/* Roster Table */
.roster-list {
    margin-top: 1.5rem;
}

.roster-list h3 {
    color: #003366;
    margin-bottom: 1rem;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.roster-table th,
.roster-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.roster-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.roster-table tr:hover {
    background: #fafafa;
}

.btn-delete-small {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
}

.btn-delete-small:hover {
    background: #ffebee;
}

.inline {
    display: inline;
}

/* Uploaded roster JSON files */
.uploaded-rosters {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #ececec;
    border-radius: 8px;
}

.uploaded-rosters h3 {
    color: #003366;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.uploaded-empty {
    color: #777;
    font-size: 0.9rem;
}

.roster-file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.roster-file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.roster-file-list a {
    color: #003366;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.roster-file-list a:hover {
    color: #ff6600;
    text-decoration: underline;
}

.roster-file-list span {
    color: #777;
    white-space: nowrap;
}

/* CSV upload card */
.upload-card {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fcfcfc;
}

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

.upload-card-header h3 {
    color: #003366;
    font-size: 1rem;
}

.json-link {
    color: #003366;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.json-link:hover {
    color: #ff6600;
}

.upload-form {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.upload-input {
    display: none;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 130px;
    padding: 1.25rem;
    border: 2px dashed #bfd3e6;
    border-radius: 10px;
    background: #f8fbff;
    color: #003366;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    text-align: center;
}

.upload-dropzone i {
    font-size: 1.5rem;
    color: #003366;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
    background: #eef6ff;
    border-color: #5e9bd3;
    transform: translateY(-1px);
}

.upload-selected {
    font-size: 0.9rem;
    color: #555;
}

.upload-hint {
    color: #666;
    font-size: 0.85rem;
}

/* Upload summary and parsed preview */
.upload-summary {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f7fbff;
    border: 1px solid #d8ebff;
    border-radius: 8px;
}

.upload-summary h4,
.parsed-preview h4 {
    color: #003366;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.summary-grid div {
    padding: 0.625rem 0.75rem;
    background: white;
    border: 1px solid #e7eef5;
    border-radius: 6px;
}

.summary-grid strong {
    display: block;
    color: #003366;
    font-size: 1.1rem;
}

.summary-grid span {
    font-size: 0.8rem;
    color: #666;
}

.summary-note {
    font-size: 0.9rem;
    color: #444;
    margin-top: 0.4rem;
}

.parsed-preview {
    margin-bottom: 1.5rem;
}

/* Select Prompt */
.select-prompt {
    text-align: center;
    color: #888;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.select-prompt i {
    margin-right: 0.5rem;
    color: #ff6600;
}

/* Toast Messages */
.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.toast.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Simplified Admin */
@media (max-width: 768px) {
    .admin-topnav {
        padding: 0 1rem;
    }
    
    .nav-title {
        display: none;
    }
    
    .nav-tabs {
        flex: 1;
        justify-content: center;
    }
    
    .nav-tab {
        padding: 0 1rem;
        font-size: 0.9rem;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header .btn-primary {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .inline-form {
        flex-direction: column;
    }
    
    .inline-form select,
    .inline-form .btn-primary {
        width: 100%;
    }
    
    .event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .event-info .event-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .course-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .course-selector select {
        max-width: 100%;
    }

    .upload-card-header,
    .roster-file-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .upload-dropzone {
        min-height: 110px;
    }
}