/* Professional University Attendance System */
:root {
    /* Modern University Branding */
    --primary-color: hsl(220, 90%, 56%);
    --primary-hover: hsl(220, 90%, 50%);
    --primary-light: hsl(220, 90%, 96%);
    --secondary-color: hsl(262, 83%, 58%);
    --secondary-hover: hsl(262, 83%, 52%);
    --accent-color: hsl(142, 76%, 36%);
    --accent-hover: hsl(142, 76%, 30%);
    
    /* Professional Neutrals */
    --background: hsl(220, 7%, 97%);
    --surface: hsl(0, 0%, 100%);
    --surface-elevated: hsl(220, 14%, 99%);
    --border: hsl(220, 13%, 88%);
    --border-light: hsl(220, 13%, 94%);
    --muted: hsl(220, 14%, 95%);
    --muted-dark: hsl(220, 14%, 90%);
    
    /* Typography */
    --text-primary: hsl(220, 20%, 12%);
    --text-secondary: hsl(220, 12%, 40%);
    --text-muted: hsl(220, 9%, 58%);
    --text-inverse: hsl(0, 0%, 98%);
    
    /* Status System */
    --success: hsl(142, 76%, 36%);
    --success-light: hsl(142, 76%, 94%);
    --success-border: hsl(142, 76%, 80%);
    --warning: hsl(38, 92%, 50%);
    --warning-light: hsl(38, 92%, 95%);
    --warning-border: hsl(38, 92%, 75%);
    --error: hsl(0, 84%, 60%);
    --error-light: hsl(0, 84%, 96%);
    --error-border: hsl(0, 84%, 80%);
    --info: hsl(199, 89%, 48%);
    --info-light: hsl(199, 89%, 95%);
    
    /* Advanced Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 0 3px hsl(220, 90%, 56%, 0.15);
    
    /* Border Radius System */
    --radius-xs: 0.25rem;
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Animation & Transitions */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-surface: linear-gradient(135deg, var(--surface) 0%, var(--surface-elevated) 100%);
    --gradient-muted: linear-gradient(135deg, var(--muted) 0%, var(--border-light) 100%);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, var(--muted) 50%, var(--primary-light) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

/* Container styles */
.container {
    background: var(--gradient-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    margin: 2rem auto;
    position: relative;
    backdrop-filter: blur(10px);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.login-container {
    max-width: 420px;
}

/* Header styles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 400;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    background: var(--surface-elevated);
    transform: translateY(-1px);
}

.form-input:hover, .form-select:hover {
    border-color: var(--border);
    background: var(--surface-elevated);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-primary);
    background: var(--muted);
}

.eye-icon {
    width: 18px;
    height: 18px;
}

/* Button styles */
.submit-button, .primary-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.submit-button:hover, .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.submit-button:active, .primary-button:active {
    transform: translateY(0);
    transition: var(--transition-fast);
}

.submit-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.secondary-button {
    padding: 0.625rem 1rem;
    background: var(--muted);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-button:hover {
    background: var(--border);
}

.logout-button {
    padding: 0.5rem 1rem;
    background: var(--text-secondary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.logout-button:hover {
    background: var(--text-primary);
}

/* Action buttons */
.edit-button, .delete-button {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.edit-button {
    background: var(--secondary-color);
    color: var(--text-primary);
}

.edit-button:hover {
    background: var(--secondary-hover);
}

.delete-button {
    background: var(--error);
    color: white;
}

.delete-button:hover {
    background: hsl(0, 72%, 45%);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 2px solid white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message styles */
.message {
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.message {
    border-radius: var(--radius);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.message.success {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success-border);
}

.message.success::before {
    background: var(--success);
}

.message.error {
    background: var(--error-light);
    color: var(--error);
    border-color: var(--error-border);
}

.message.error::before {
    background: var(--error);
}

/* Footer */
.page-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.faculty-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.faculty-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Dashboard styles */
.dashboard-view {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.dashboard-header h1 {
    margin: 0;
    color: white;
}

/* Tabs */
.tabs-container {
    padding: 2rem;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab-link {
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-link:hover {
    color: var(--text-primary);
    background: var(--muted);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--surface);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tab-header .primary-button {
    width: auto;
}

/* Filters */
.filters-section {
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 200px;
    flex: 1;
}

.date-filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.date-filter-group .form-input {
    flex: 1;
}

.date-filter-group .secondary-button {
    white-space: nowrap;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.data-table th {
    background: var(--muted);
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--muted);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Percentage indicators */
.percentage {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
}

.percentage.excellent {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.percentage.good {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.percentage.poor {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error-border);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.close-button:hover {
    color: var(--text-primary);
    background: var(--border);
}

.modal-form {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
    width: auto;
    min-width: 100px;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--muted) 25%, var(--border-light) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Enhanced Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-scale-in { animation: scaleIn 0.2s ease-out; }

/* Focus States */
.form-input:focus-within,
.form-select:focus-within {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

/* Micro-interactions */
.tab-link,
.primary-button,
.secondary-button,
.edit-button,
.delete-button {
    position: relative;
    overflow: hidden;
}

.tab-link::before,
.primary-button::before,
.secondary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.tab-link:hover::before,
.primary-button:hover::before,
.secondary-button:hover::before {
    left: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    body { padding: 0.5rem; }
    
    .container, .dashboard-view {
        margin: 1rem auto;
        padding: 1.5rem;
        border-radius: var(--radius);
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem 1.5rem;
    }
    
    .tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-link {
        text-align: center;
        border-bottom: none;
        border-right: 3px solid transparent;
        border-radius: 0;
    }
    
    .tab-link.active {
        border-right-color: var(--primary-color);
        border-bottom: none;
    }
    
    .filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .date-filter-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
    }
}

/* Updated styles.css - Add visual indicators for different student types */

/* Add this to your existing styles.css file */

/* Style for students who only exist in attendance records (not formally registered) */
.attendance-only {
    font-style: italic;
    color: #666;
    background-color: #f9f9f9;
}

/* Add a small indicator for attendance-only students */
.attendance-only::after {
    content: " (Attendance Only)";
    font-size: 0.8em;
    color: #999;
    font-weight: normal;
}

/* Empty state styling */
.data-table tbody tr td[colspan] {
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Success/Error message improvements */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading state for buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .attendance-only::after {
        display: block;
        margin-top: 4px;
    }
    
    .message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Table improvements for better data display */
.data-table td {
    vertical-align: middle;
}

.data-table .actions {
    white-space: nowrap;
}

/* Highlight rows on hover */
.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Better styling for room filter */
.date-filter-group {
    display: flex;
    gap: 10px;
    align-items: end;
}

.date-filter-group .form-input {
    flex: 1;
}

.secondary-button {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.secondary-button:hover {
    background-color: #5a6268;
}

/* Status indicators for attendance percentages */
.percentage {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9em;
}

.percentage.excellent {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.percentage.good {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.percentage.poor {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Empty state styling improvements */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Animation for new data loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Dashboard header improvements */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.logout-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Tab improvements */
.tabs-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-link {
    flex: 1;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s;
}

.tab-link.active {
    background: white;
    color: #495057;
    border-bottom: 3px solid #667eea;
}

.tab-link:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

/* Tab content styling */
.tab-content {
    padding: 2rem;
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tab-header h2 {
    margin: 0;
    color: #495057;
    font-size: 1.25rem;
}

/* Filter section styling */
.filters-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Form styling improvements */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button styling improvements */
.primary-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.edit-button, .delete-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.edit-button {
    background: #ffc107;
    color: #212529;
}

.edit-button:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.delete-button {
    background: #dc3545;
    color: white;
}

.delete-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Modal improvements */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    color: #495057;
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-button:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-form {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}
/* Modal Styles - Add these to your existing styles.css */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-button:hover {
    background-color: #e2e8f0;
    color: #2d3748;
}

.modal-form {
    padding: 24px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form .form-group:last-of-type {
    margin-bottom: 24px;
}

.modal-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.modal-form .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-form .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-form .form-input:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
}

.primary-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.primary-button:hover {
    background-color: #2563eb;
}

.primary-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.secondary-button {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.secondary-button:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

/* Filter styles */
.filters-section {
    margin-bottom: 24px;
}

.filters {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.date-filter-group {
    display: flex;
    gap: 10px;
    align-items: end;
}

.form-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background-color: white;
    min-width: 150px;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Student type indicators */
.attendance-only {
    font-style: italic;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-filter-group {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
}

/* Add these missing CSS classes to your styles.css file */

/* Session Status Card Styles */
.session-status-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.active {
    background: var(--success);
    box-shadow: 0 0 0 3px var(--success-light);
}

.status-indicator.inactive {
    background: var(--text-muted);
    box-shadow: 0 0 0 3px var(--muted);
}

.status-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.status-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Active Session Container Styles */
.active-session-container {
    margin-bottom: 2rem;
}

.active-session-card {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-light) 100%);
    border: 2px solid var(--success-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.session-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-text {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.session-details h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.session-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.session-actions {
    flex-shrink: 0;
}

.danger-button {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.danger-button:hover {
    background: var(--error-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Status Badge Styles */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.status-badge.status-ended {
    background: var(--muted);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* Sessions Section */
.sessions-section {
    margin-top: 2rem;
}

.sessions-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Submit button disabled state */
.submit-button.disabled {
    background: var(--muted-dark);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.submit-button.disabled:hover {
    transform: none;
    box-shadow: none;
    filter: none;
}

/* Responsive adjustments for session cards */
@media (max-width: 768px) {
    .active-session-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .session-status,
    .session-details,
    .session-actions {
        width: 100%;
    }
    
    .session-status {
        justify-content: center;
    }
    
    .session-status-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}