/**
 * Teacher Portal Styles - Carolina Language Academy
 * Maintains branding consistency with student portal
 * Designed for teacher-focused dashboard experience
 */

/* ==========================================================================
   CSS Variables - Brand Colors & Design Tokens
   ========================================================================== */
:root {
    /* Primary Brand Colors */
    --primary: #222E66;
    --primary-dark: #1a2452;
    --primary-light: #2d3a7a;
    --primary-lighter: #f0f4ff;

    /* Accent Colors */
    --accent: #F16C13;
    --accent-dark: #d85a0a;
    --accent-light: #fff7ed;
    --accent-hover: #e05d08;

    /* Secondary */
    --secondary: #2EA3F2;
    --secondary-light: #e8f4fd;

    /* Status Colors */
    --success: #15803d;
    --success-light: #dcfce7;
    --warning: #ca8a04;
    --warning-light: #fef9c3;
    --error: #dc2626;
    --error-light: #fee2e2;
    --info: #0284c7;
    --info-light: #e0f2fe;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #1e293b;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Borders */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Language Colors */
    --lang-spanish: #c2410c;
    --lang-french: #1d4ed8;
    --lang-german: #1f2937;
    --lang-italian: #15803d;
    --lang-portuguese: #0f766e;
    --lang-english: #7c3aed;
    --lang-chinese: #dc2626;
    --lang-japanese: #be123c;
    --lang-korean: #4f46e5;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ==========================================================================
   Layout - Main App Container
   ========================================================================== */
.teacher-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.teacher-header {
    background: var(--primary);
    color: var(--text-inverse);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.brand-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Navigation Tabs */
.header-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-tab-link {
    text-decoration: none;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-inverse);
}

.nav-tab i {
    font-size: 1rem;
}

/* User Menu */
.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info,
.user-info-expanded {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.user-info-expanded:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-inverse);
}

.user-contact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.125rem;
}

.user-email {
    font-size: 0.75rem;
    opacity: 0.8;
    color: var(--text-inverse);
}

.user-phone {
    font-size: 0.75rem;
    opacity: 0.8;
    color: var(--text-inverse);
}

.user-phone:not(:empty)::before {
    content: "•";
    margin-right: 0.75rem;
    opacity: 0.5;
}

.btn-logout {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-inverse);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-logout:hover {
    background: var(--error);
}

/* Header Actions Container */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Portal navigation link (Student Portal switch) */
.nav-portal-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 0;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-portal-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    color: white;
}

.nav-portal-link i {
    font-size: 1.1rem;
}

/* Login Button */
.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--text-inverse);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: white;
    border-color: white;
    color: var(--primary);
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.teacher-content {
    flex: 1;
    padding: 1.5rem;
    padding-top: calc(60px + 1.5rem);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
}

/* Tab content should fill available space */
#tabClasses {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Welcome Screen
   ========================================================================== */
.welcome-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 3rem);
}

.welcome-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 8px 30px rgba(34, 46, 102, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--text-inverse);
}

.welcome-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.welcome-card > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.feature i {
    width: 40px;
    height: 40px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

/* Test Mode Banner */
.test-mode-banner {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.test-mode-banner i {
    color: #d97706;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.test-mode-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.test-mode-text strong {
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 700;
}

.test-mode-text span {
    color: #78350f;
    font-size: 0.8125rem;
}

.test-mode-text code {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #92400e;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    border: none;
    color: var(--text-inverse);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background: var(--accent-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    border: none;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-danger-outline:hover {
    background: #dc3545;
    color: #fff;
}

/* Schedule Confirmation Modal */
.schedule-confirm-modal {
    max-width: 420px;
    width: 90%;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.sched-confirm-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.sched-confirm-header i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.8;
}

.sched-confirm-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.sched-confirm-header p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.sched-confirm-details {
    padding: 1.25rem 1.5rem;
}

.sched-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8125rem;
}

.sched-confirm-row:last-child {
    border-bottom: none;
}

.sched-confirm-label {
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.sched-confirm-label i {
    width: 14px;
    text-align: center;
    font-size: 0.7rem;
}

.sched-confirm-value {
    font-weight: 600;
    color: var(--text-primary);
}

.sched-confirm-remaining {
    margin: 0.75rem 1.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.sched-confirm-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.sched-confirm-actions button {
    flex: 1;
    padding: 0.625rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sched-confirm-actions .btn-confirm-cancel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.sched-confirm-actions .btn-confirm-cancel:hover {
    background: var(--bg-tertiary);
}

.sched-confirm-actions .btn-confirm-ok {
    background: var(--accent);
    border: none;
    color: white;
}

.sched-confirm-actions .btn-confirm-ok:hover {
    background: var(--accent-hover, #d85a0a);
}

.sched-confirm-actions .btn-confirm-ok:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-link:hover {
    color: var(--primary);
}

/* ==========================================================================
   KPI Status Bar
   ========================================================================== */
.kpi-bar {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    gap: 0;
}

.kpi-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    padding: 0.25rem 0.5rem;
}

.kpi-item i {
    font-size: 0.875rem;
}

.kpi-primary i {
    color: var(--primary);
}

.kpi-accent i {
    color: var(--accent);
}

.kpi-info i {
    color: var(--info);
}

.kpi-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
    flex-shrink: 0;
}

.kpi-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Dashboard Grid
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.dashboard-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i {
    color: var(--primary);
}

.header-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.header-link {
    font-size: 0.8125rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
}

.header-link:hover {
    text-decoration: underline;
}

.card-body {
    padding: 1rem 1.25rem;
    min-height: 200px;
}

/* ==========================================================================
   Schedule Items
   ========================================================================== */
.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
}

.schedule-item:hover {
    background: var(--bg-secondary);
}

.schedule-item + .schedule-item {
    margin-top: 0.5rem;
}

.schedule-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 0.5rem 0.75rem;
    background: var(--primary-lighter);
    border-radius: var(--radius-md);
    text-align: center;
}

.schedule-time .time-start {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

.schedule-time .time-end {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.schedule-time .time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.schedule-time .duration {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.schedule-info {
    flex: 1;
    min-width: 0;
}

.schedule-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    display: block;
}

.schedule-location {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.schedule-location i {
    color: var(--text-muted);
}

.schedule-course {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.schedule-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.schedule-meta i {
    margin-right: 0.25rem;
}

.schedule-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-online {
    background: var(--info-light);
    color: var(--info);
}

.badge-inperson {
    background: var(--success-light);
    color: var(--success);
}

/* Zoom Button */
.btn-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.btn-zoom:hover {
    background: #1a8cd8;
}

.btn-zoom-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-zoom-small:hover {
    background: #1a8cd8;
}

/* ==========================================================================
   Upcoming Classes (Dashboard Card)
   ========================================================================== */
.upcoming-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.upcoming-item:hover {
    background: var(--bg-secondary);
}

.upcoming-item + .upcoming-item {
    border-top: 1px solid var(--border-light);
}

.upcoming-date {
    min-width: 50px;
    text-align: center;
    padding: 0.5rem;
    background: var(--accent-light);
    border-radius: var(--radius-md);
}

.upcoming-date .date-day {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.upcoming-date .date-month {
    display: block;
    font-size: 0.6875rem;
    color: var(--accent);
    text-transform: uppercase;
    margin-top: 0.125rem;
}

.upcoming-info {
    flex: 1;
    min-width: 0;
}

.upcoming-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upcoming-time {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 300px;
}

.empty-state.small {
    padding: 1.5rem 1rem;
}

.empty-state.small i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.empty-state.small p {
    font-size: 0.8125rem;
}

/* ==========================================================================
   Course Cards
   ========================================================================== */
.courses-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.course-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-bottom: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.course-list-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.course-list-item:last-child {
    border-bottom: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.course-list-item:only-child {
    border-bottom: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.course-list-item:hover {
    background: var(--bg-secondary);
}

.course-list-main {
    flex: 1;
    min-width: 0;
}

.course-list-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.course-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.course-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.course-list-meta i {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.course-next-class {
    color: #0369a1;
    font-weight: 500;
}

.course-next-class i {
    font-size: 0.625rem;
}

.btn-request-room-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #ea580c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-request-room-inline:hover {
    background: #c2410c;
}

.course-list-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
    flex-shrink: 0;
}

.course-list-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.course-list-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.course-list-stats i {
    color: var(--primary);
    font-size: 0.6875rem;
}

.course-list-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Course Status Section Headers */
.course-status-section {
    margin-top: 1rem;
}

.course-status-section:first-child {
    margin-top: 0;
}

.course-status-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-light);
}

.course-status-header i {
    font-size: 0.75rem;
}

.course-status-count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.status-header-in-progress {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.status-header-upcoming {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.status-header-completed {
    color: #6b7280;
    border-bottom-color: #d1d5db;
}

.course-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition-fast);
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.course-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Course card header - used in JS rendering */
.course-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.course-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-type.group {
    background: var(--info-light);
    color: var(--info);
}

.course-type.private {
    background: var(--accent-light);
    color: var(--accent);
}

.course-hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: #eff6ff;
    color: #2563eb;
}

.course-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: #f0fdf4;
    color: #16a34a;
}

/* Disabled room request tooltip */
.btn-room-disabled-wrap {
    position: relative;
    display: inline-flex;
}
.btn-room-disabled-wrap .room-disabled-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}
.btn-room-disabled-wrap .room-disabled-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
}
.btn-room-disabled-wrap:hover .room-disabled-tooltip {
    display: block;
}

.btn-request-room-class {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
}
.btn-request-room-class:hover { background: var(--accent-hover); }
.btn-request-room-class i { font-size: 0.625rem; }

.class-room-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: auto;
}
.class-room-status.pending { background: #fef3c7; color: #92400e; }
.class-room-status.approved { background: #d1fae5; color: #065f46; }
.class-room-status.online { background: #f1f5f9; color: #64748b; }

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1rem 1.25rem 0.75rem;
    line-height: 1.3;
}

.course-details {
    padding: 0 1.25rem 1rem;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-row i {
    width: 16px;
    color: var(--text-muted);
}

.course-footer {
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.course-stat i {
    color: var(--primary);
}

.course-language {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.lang-spanish { background: #fef2f2; color: var(--lang-spanish); }
.lang-french { background: #eff6ff; color: var(--lang-french); }
.lang-german { background: #f3f4f6; color: var(--lang-german); }
.lang-italian { background: #f0fdf4; color: var(--lang-italian); }
.lang-portuguese { background: #f0fdfa; color: var(--lang-portuguese); }
.lang-english { background: #faf5ff; color: var(--lang-english); }

.course-status {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active,
.status-open {
    background: var(--success-light);
    color: var(--success);
}

.status-upcoming {
    background: var(--info-light);
    color: var(--info);
}

.status-completed,
.status-closed {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.status-coming-soon {
    background: var(--warning-light);
    color: var(--warning);
}

.status-started,
.status-in-progress {
    background: #e0f2fe;
    color: #0369a1;
}

.status-open-for-registration {
    background: var(--success-light);
    color: var(--success);
}

.course-card-body {
    padding: 0 1.25rem 1rem;
}

.course-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.course-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.course-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.course-detail i {
    color: var(--text-muted);
    width: 16px;
}

.course-card-footer {
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-students {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.course-students i {
    color: var(--primary);
}

.course-students strong {
    color: var(--text-primary);
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    padding-right: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    width: 220px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ==========================================================================
   Classes Layout
   ========================================================================== */
.classes-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    height: calc(100vh - 160px);
    max-height: calc(100vh - 160px);
}

.classes-calendar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

/* Calendar Navigation - matches student portal */
.calendar-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-bottom: 2px solid #e2e8f0;
    gap: 1rem;
}

.calendar-nav-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(34, 46, 102, 0.2);
}

.calendar-nav-btn i {
    font-size: 0.875rem;
    color: white;
}

.calendar-nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 46, 102, 0.3);
}

.calendar-month-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    flex: 1;
    text-align: center;
}

.calendar-today-btn {
    background: var(--accent);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.8125rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(241, 108, 19, 0.3);
}

.calendar-today-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(241, 108, 19, 0.4);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto repeat(6, minmax(0, 1fr));
    gap: 1px;
    padding: 0.5rem;
    background: #e2e8f0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Weekday headers - dark blue like student portal */
.calendar-day-header {
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--primary);
}

.calendar-day {
    background: #ffffff;
    padding: 0.25rem;
    min-height: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-day:hover {
    background: #f0f4ff;
}

.calendar-day.empty {
    background: #f8fafc;
}

.calendar-day.today {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.calendar-day.other-month {
    background: #f1f5f9;
}

.calendar-day.other-month .day-number {
    color: #94a3b8;
}

.day-number {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1;
}

.calendar-day.today .day-number {
    background: var(--accent);
    color: white;
    border-radius: 50%;
    font-size: 0.625rem;
}

/* Calendar day states */
.calendar-day.past {
    background: #fafafa;
}

.calendar-day.past .day-number {
    color: #94a3b8;
}

.calendar-day.has-classes {
    background: #ffffff;
}

.calendar-day.has-classes:hover {
    background: #f0f4ff;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event {
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
    font-size: 0.625rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event.event-spanish { background: #fecaca; color: var(--lang-spanish); }
.calendar-event.event-french { background: #bfdbfe; color: var(--lang-french); }
.calendar-event.event-german { background: #e5e7eb; color: var(--lang-german); }
.calendar-event.event-italian { background: #bbf7d0; color: var(--lang-italian); }

/* Day events (in calendar) - chip style like student portal */
.day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    margin-top: 0.1875rem;
}

.day-event {
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    overflow: hidden;
    font-weight: 600;
    border-left: 3px solid var(--primary);
    text-align: left;
    background: #eef4ff;
    color: var(--primary);
    display: flex;
    gap: 0.375rem;
    line-height: 1.3;
}

.day-event .event-time {
    font-weight: 700;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.day-event .event-name {
    font-weight: 500;
    font-size: 0.6875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.day-event:hover {
    background: #e0e7ff;
}

/* Cancelled class event styling */
.day-event.cancelled {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    border-left-color: #ef4444;
    opacity: 0.7;
}

.day-event.cancelled .event-name {
    text-decoration: line-through;
}

/* Past day events - completed/muted styling */
.calendar-day.past .day-event {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    border-left-color: #cbd5e1;
    opacity: 0.7;
}

.calendar-day.past .day-event.cancelled {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    border-left-color: #ef4444;
    opacity: 0.5;
}

/* Today's classes - orange highlight */
.calendar-day.today .day-event {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    border-color: #fed7aa;
    border-left-color: var(--accent);
    box-shadow: 0 1px 3px rgba(241, 108, 19, 0.15);
}

.more-events {
    font-size: 0.625rem;
    color: var(--secondary);
    text-align: center;
    padding: 0.125rem 0.25rem;
    cursor: pointer;
    font-weight: 700;
    background: rgba(46, 163, 242, 0.1);
    border-radius: 3px;
    margin-top: 2px;
    position: relative;
}

.more-events:hover {
    background: rgba(46, 163, 242, 0.2);
    color: var(--primary);
}

.more-events-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 0.375rem;
    margin-top: 4px;
}

.more-events.open .more-events-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.more-event-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    text-align: left;
    color: var(--text-primary);
}

.more-event-item:hover {
    background: var(--primary-lighter);
}

.more-event-item .event-time {
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}

.more-event-item .event-name {
    color: var(--text-secondary);
}

.more-event-item.cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 1.5rem;
    border-top: 2px solid #e2e8f0;
    background: #ffffff;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 600;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.legend-dot.upcoming {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.legend-dot.completed {
    background: #cbd5e1;
}

.legend-dot.cancelled {
    background: #ef4444;
}

.legend-dot.today {
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
}

/* Classes Sidebar */
.classes-sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
}

.sidebar-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-tabs {
    display: flex;
    gap: 0.375rem;
}

.sidebar-tab {
    flex: 1;
    padding: 0.375rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-tab:hover {
    background: var(--bg-tertiary);
}

.sidebar-tab.active {
    background: var(--primary);
    color: var(--text-inverse);
}

.classes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.class-item {
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.class-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.class-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.125rem;
}

.class-date {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.class-time {
    font-size: 0.625rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.0625rem 0.25rem;
    border-radius: var(--radius-sm);
}

.class-course {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-students-count,
.class-location {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Cancelled class item */
.class-item.cancelled {
    opacity: 0.7;
    border-color: #fecaca;
    background: #fef2f2;
}

.class-item.cancelled:hover {
    border-color: #f87171;
    background: #fee2e2;
}

.class-item.cancelled .class-course {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.class-cancelled-badge {
    font-size: 0.5625rem;
    font-weight: 600;
    padding: 0.0625rem 0.375rem;
    background: #dc2626;
    color: white;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

/* Time logged in sidebar */
.class-time-logged {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--success);
    margin-top: 0.375rem;
    padding-top: 0.375rem;
    border-top: 1px dashed var(--border-light);
}

.class-time-logged i {
    font-size: 0.75rem;
}

/* Log time button in sidebar */
.btn-log-time-sidebar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--primary);
    background: var(--primary-lighter);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    margin-top: 0.375rem;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    justify-content: center;
}

.btn-log-time-sidebar:hover {
    background: var(--primary);
    color: white;
    border-style: solid;
}

.btn-log-time-sidebar i {
    font-size: 0.875rem;
}

/* View more button in sidebar */
.btn-view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-view-more:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-view-more i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.btn-view-more:hover i {
    transform: translateY(2px);
}

/* ==========================================================================
   Class List View
   ========================================================================== */
.class-date-group {
    margin-bottom: 1.5rem;
}

.class-date-group:last-child {
    margin-bottom: 0;
}

.date-header {
    padding: 0.625rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
}

.date-header .date-full {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.class-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.class-list-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.class-list-item:last-child {
    margin-bottom: 0;
}

.class-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    padding: 0.5rem;
    background: var(--primary-lighter);
    border-radius: var(--radius-md);
    text-align: center;
}

.class-time span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}

.class-time .time-separator {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.class-info {
    flex: 1;
    min-width: 0;
}

.class-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.class-course {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.class-location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    min-width: 120px;
}

.class-location i {
    color: var(--text-muted);
}

/* ==========================================================================
   Students Table
   ========================================================================== */
.students-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.student-stats {
    display: flex;
    gap: 2rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.students-table-wrapper {
    overflow-x: auto;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.students-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
}

.students-table tbody tr:hover {
    background: var(--bg-secondary);
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.student-name {
    font-weight: 500;
    color: var(--text-primary);
}

.student-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Students Grid */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.student-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.student-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.student-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.student-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.student-card-info {
    min-width: 0;
    flex: 1;
}

.student-card-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-card-email {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-card-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Course tags */
.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.course-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.attendance-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.attendance-good {
    background: var(--success-light);
    color: var(--success);
}

.attendance-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.attendance-poor {
    background: var(--error-light);
    color: var(--error);
}

.btn-view {
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-view:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

/* Progress Cell (for student table) */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-cell .progress-bar {
    width: 60px;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-cell .progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: var(--radius-full);
}

.progress-cell .progress-bar.progress-blue .progress-fill {
    background: var(--secondary);
}

.progress-cell span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 36px;
}

/* Icon Button */
.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

/* Empty table cell */
.empty-cell {
    padding: 2rem !important;
    text-align: center;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--error-light);
    color: var(--error);
}

/* Auth Modal */
.auth-modal {
    padding: 2.5rem;
}

.auth-step {
    text-align: center;
}

.auth-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: var(--primary-lighter);
    color: var(--primary);
}

.auth-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.auth-icon.error {
    background: var(--error-light);
    color: var(--error);
}

.auth-step h2 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-step > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: var(--transition-fast);
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
}

/* Code Inputs */
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    transition: var(--transition-fast);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
}

/* Auth Error */
.auth-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--error-light);
    color: var(--error);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Welcome Info */
.welcome-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.avatar {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.welcome-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.welcome-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Not Found Info */
.not-found-info {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.not-found-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Auth Loading */
.auth-loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Profile Modal */
.profile-modal {
    padding: 0;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary);
}

.profile-content {
    padding: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.info-row label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.info-row span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   Course Detail Modal
   ========================================================================== */
.course-detail-modal {
    max-width: 720px;
    padding: 0;
    overflow-y: auto;
    max-height: 90vh;
}

.course-detail-modal .course-detail-close {
    position: sticky;
    top: 0.75rem;
    float: right;
    margin: 0.75rem 0.75rem -2.5rem 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 10;
    backdrop-filter: blur(4px);
}

.course-detail-modal .course-detail-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.course-detail-content {
    padding: 0;
}

.course-detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem;
    color: white;
    position: relative;
}

.course-detail-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.course-detail-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.course-detail-stage {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.course-detail-stage.stage-open {
    background: var(--success);
}

.course-detail-stage.stage-closed {
    background: var(--text-muted);
}

.course-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.course-detail-subtitle {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 1rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.course-detail-subtitle span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.course-detail-body {
    padding: 1.5rem;
}

.course-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.detail-stat-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1rem;
}

.detail-stat-card.accent .detail-stat-icon {
    background: var(--accent-light);
    color: var(--accent);
}

.detail-stat-card.success .detail-stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.detail-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.detail-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.course-detail-section {
    margin-bottom: 1rem;
}

.course-detail-section:last-child {
    margin-bottom: 0;
}

.detail-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-section-title i {
    color: var(--primary);
}

.course-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.course-info-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.course-info-item i {
    width: 18px;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.course-info-item .info-content {
    flex: 1;
}

.course-info-item .info-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.course-info-item .info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 0.125rem;
}

.course-hours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.hours-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.hours-card.highlight {
    background: var(--primary-lighter);
    border-color: var(--primary);
}

.hours-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hours-card.highlight .hours-value {
    color: var(--primary);
}

.hours-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.course-detail-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.course-detail-actions .btn-primary,
.course-detail-actions .btn-secondary,
.course-detail-actions .btn-accent {
    flex: 1;
}

/* ==========================================================================
   Enhanced Course Detail - Progress & Timeline
   ========================================================================== */

/* Progress Ring in Header */
.course-detail-header.enhanced {
    padding-bottom: 1.5rem;
    position: relative;
}

/* Entire progress section positioned top-right */
.progress-section-topright {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-lg);
    z-index: 1;
}

.progress-section-topright .progress-ring-container {
    width: 70px;
    height: 70px;
}

.progress-section-topright .progress-ring-value .percent {
    font-size: 1.125rem;
}

.progress-section-topright .progress-ring-value .label {
    font-size: 0.5rem;
}

.progress-section-topright .progress-summary {
    flex: 1;
}

.progress-section-topright .progress-message {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.progress-section-topright .progress-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.progress-section-topright .stat-mini {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    opacity: 0.9;
}

.progress-section-topright .stat-mini i {
    font-size: 0.625rem;
    opacity: 0.8;
}

/* Legacy - keep for backward compatibility */
.course-progress-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-ring-container {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-container.completed .progress-ring-fill {
    stroke: var(--success);
}

.progress-ring-container.almost-done .progress-ring-fill {
    stroke: #ffd700;
}

.progress-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-ring-value .percent {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.progress-ring-value .label {
    display: block;
    font-size: 0.625rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-summary {
    flex: 1;
}

.progress-message {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.progress-message.completed {
    color: var(--success);
}

.progress-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.stat-mini i {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Enhanced Tabs */
.detail-tabs.enhanced {
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-light);
}

.detail-tabs.enhanced .detail-tab {
    padding: 1rem 1rem;
}

/* Quick Stats Grid */
.course-quick-stats {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-stat {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.quick-stat.clickable {
    cursor: pointer;
}

.quick-stat.clickable:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.quick-stat-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-size: 1rem;
}

.quick-stat-icon.completed {
    background: var(--success-light);
    color: var(--success);
}

.quick-stat-icon.upcoming {
    background: var(--primary-lighter);
    color: var(--primary);
}

.quick-stat-icon.students {
    background: var(--secondary-light);
    color: var(--secondary);
}

.quick-stat-icon.hours {
    background: var(--accent-light);
    color: var(--accent);
}

.quick-stat-data {
    flex: 1;
}

.quick-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.quick-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Next Class Highlight */
.next-class-highlight {
    margin-bottom: 1.5rem;
}

.next-class-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.next-class-card {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.next-class-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 86, 179, 0.15);
}

.next-class-date {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 60px;
}

.next-class-date .date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.next-class-date .date-month {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.next-class-info {
    flex: 1;
}

.next-class-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.next-class-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
}

.next-class-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.next-class-meta i {
    color: var(--primary);
    font-size: 0.75rem;
}

.next-class-arrow {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Missing Time Entries Alert in Course Modal */
.missing-time-section {
    margin-bottom: 1.5rem;
}

.missing-time-alert {
    background: var(--warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.missing-time-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fef3c7 0%, var(--warning-light) 100%);
    border-bottom: 1px solid #fcd34d;
}

.missing-time-icon {
    width: 40px;
    height: 40px;
    background: var(--warning);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.missing-time-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.missing-time-info p {
    font-size: 0.8125rem;
    color: #a16207;
    margin: 0;
}

.missing-time-list {
    padding: 0.5rem;
}

.missing-time-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.missing-time-item:last-child {
    margin-bottom: 0;
}

.missing-time-class-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.missing-time-date {
    text-align: center;
    min-width: 40px;
}

.missing-time-date .day {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.missing-time-date .month {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.missing-time-details {
    display: flex;
    flex-direction: column;
}

.missing-time-details .class-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.missing-time-details .class-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-log-time-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-log-time-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-log-time-small i {
    font-size: 0.6875rem;
}

.missing-time-more {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Course Info Grid Compact */
.course-info-grid.compact {
    grid-template-columns: repeat(2, 1fr);
}

/* Hours Progress Bar */
.hours-progress-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    border: 1px solid var(--border-light);
}

.hours-progress-bar {
    height: 12px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.hours-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.hours-progress-fill.reserved {
    position: absolute;
    background: repeating-linear-gradient(
        45deg,
        #ea580c,
        #ea580c 3px,
        #f97316 3px,
        #f97316 6px
    );
    border-radius: var(--radius-full);
    opacity: 0.7;
}

.hours-progress-bar {
    position: relative;
}

.hours-progress-labels .reserved {
    color: #ea580c;
    font-weight: 600;
}

.hours-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.hours-progress-labels .used {
    color: var(--primary);
    font-weight: 600;
}

.hours-progress-labels .remaining {
    color: var(--success);
}

.hours-progress-labels .total {
    color: var(--text-muted);
}

/* Package Hours Warning/Exhausted States */
.hours-progress-container.warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--bg-secondary) 100%);
}

.hours-progress-container.warning .hours-progress-fill {
    background: linear-gradient(90deg, var(--warning) 0%, #f59e0b 100%);
}

.hours-progress-container.warning .hours-progress-labels .used {
    color: var(--warning);
}

.hours-progress-container.warning .hours-progress-labels .remaining {
    color: var(--warning);
    font-weight: 600;
}

.hours-progress-container.exhausted {
    border-color: var(--error);
    background: linear-gradient(135deg, var(--error-light) 0%, var(--bg-secondary) 100%);
}

.hours-progress-container.exhausted .hours-progress-fill {
    background: linear-gradient(90deg, var(--error) 0%, #ef4444 100%);
}

.hours-progress-container.exhausted .hours-progress-labels .used {
    color: var(--error);
}

.hours-progress-labels .remaining.exhausted {
    color: var(--error);
    font-weight: 700;
}

/* Course Reservations List (in course detail modal) */
.course-reservations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-res-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 0.775rem;
    transition: var(--transition-fast);
}

.course-res-item:hover {
    border-color: var(--primary-light);
    background: var(--bg-tertiary);
}

.course-res-date {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 110px;
}

.course-res-date i,
.course-res-time i,
.course-res-room i {
    margin-right: 0.25rem;
    font-size: 0.7rem;
    opacity: 0.5;
}

.course-res-time {
    color: var(--text-secondary);
    min-width: 100px;
}

.course-res-room {
    flex: 1;
    color: var(--text-primary);
}

.course-res-status {
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Zoom Quick Join */
.zoom-quick-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #2d8cff 0%, #0066cc 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.zoom-quick-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 140, 255, 0.3);
}

.zoom-quick-join i:first-child {
    font-size: 1.25rem;
}

.zoom-quick-join i:last-child {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Classes Progress Overview */
.classes-progress-overview {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.classes-progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    position: relative;
    margin-bottom: 0.75rem;
}

.classes-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.classes-progress-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.classes-progress-marker::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--success);
}

.classes-progress-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.75rem;
}

.legend-completed {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-upcoming {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Classes Timeline */
.classes-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.timeline-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.timeline-section.upcoming .timeline-section-header {
    color: var(--primary);
}

.timeline-section.upcoming .timeline-section-header i {
    color: var(--primary);
}

.timeline-section.completed .timeline-section-header {
    color: var(--success);
}

.timeline-section.completed .timeline-section-header i {
    color: var(--success);
}

.timeline-section-count {
    background: var(--border-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    margin-left: auto;
}

.timeline-items {
    padding: 0.5rem;
}

.timeline-class-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.timeline-class-item:hover {
    background: var(--bg-primary);
}

.timeline-class-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 100%;
    width: 2px;
    height: 0.5rem;
    background: var(--border-light);
}

.timeline-marker {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.timeline-class-item.completed .timeline-marker {
    background: var(--success-light);
    color: var(--success);
}

.timeline-class-item.next .timeline-marker {
    background: var(--primary);
    color: white;
    animation: pulse-marker 2s infinite;
}

.timeline-class-item.upcoming .timeline-marker {
    background: var(--border-light);
    color: var(--text-muted);
}

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(0, 86, 179, 0); }
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.75rem;
    margin-top: 0.125rem;
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.timeline-meta i {
    font-size: 0.625rem;
}

.timeline-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.timeline-more {
    text-align: center;
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Time Entries Tab */
.time-entries-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.time-summary-stat {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.time-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.time-summary-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.25rem;
}

.time-entries-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.time-entry-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.time-entry-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.time-entry-date {
    width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.time-entry-date .entry-day {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.time-entry-date .entry-month {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.time-entry-content {
    flex: 1;
    min-width: 0;
}

.time-entry-content .entry-class {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-entry-content .entry-notes {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-entry-hours {
    text-align: right;
    flex-shrink: 0;
}

.time-entry-hours .hours-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.time-entry-hours .hours-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.time-entries-more {
    text-align: center;
    padding: 1rem;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.time-entries-more:hover {
    color: var(--primary-dark);
}

/* Responsive adjustments for enhanced course detail */
@media (max-width: 600px) {
    .progress-section-topright {
        position: static;
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
        padding: 1rem;
    }

    .progress-section-topright .progress-ring-container {
        width: 60px;
        height: 60px;
    }

    .progress-section-topright .progress-ring-value .percent {
        font-size: 1rem;
    }

    .progress-section-topright .progress-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .course-progress-header {
        flex-direction: column;
        text-align: center;
    }

    .progress-stats {
        justify-content: center;
    }

    .course-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .next-class-card {
        flex-direction: column;
        text-align: center;
    }

    .next-class-meta {
        justify-content: center;
    }

    .time-entries-summary {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Student Detail Modal
   ========================================================================== */
.student-detail-modal {
    max-width: 580px;
    padding: 0;
    overflow-y: auto;
    max-height: 90vh;
}

.student-detail-modal .modal-close {
    position: sticky;
    top: 0.75rem;
    float: right;
    margin: 0.75rem 0.75rem 0 0;
    z-index: 10;
}

.student-detail-content {
    padding: 0;
    clear: both;
}

.student-detail-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.student-detail-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.student-detail-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.student-detail-email {
    font-size: 0.9375rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.student-detail-body {
    padding: 1.5rem;
}

.student-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
    border: 1px solid var(--border-light);
}

.contact-card:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.contact-card i {
    width: 36px;
    height: 36px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.contact-card:hover i {
    background: var(--primary);
    color: white;
}

.contact-info .contact-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.contact-info .contact-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.student-courses-section {
    margin-top: 1.5rem;
}

.student-courses-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.student-courses-title i {
    color: var(--primary);
}

.student-course-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition-fast);
}

.student-course-card:hover {
    border-color: var(--primary);
}

.student-course-card:last-child {
    margin-bottom: 0;
}

.student-course-info {
    flex: 1;
}

.student-course-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.student-course-details {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-course-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.student-course-arrow {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Class Detail Modal
   ========================================================================== */
.class-detail-modal {
    max-width: 620px;
    width: calc(100% - 2rem);
    padding: 0;
    overflow-y: auto;
    max-height: calc(100vh - 2rem);
    height: auto;
}

.class-detail-modal .modal-close {
    position: sticky;
    top: 0.75rem;
    float: right;
    margin: 0.75rem 0.75rem 0 0;
    z-index: 10;
}

.class-detail-content {
    padding: 0;
    clear: both;
}

.class-detail-header {
    background: var(--primary);
    padding: 1.5rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.class-detail-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.class-detail-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 1rem;
}

.class-detail-name {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.class-detail-course-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    opacity: 0.9;
    cursor: pointer;
    transition: var(--transition-fast);
}

.class-detail-course-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.class-detail-body {
    padding: 1.5rem;
}

.class-time-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.class-time-block {
    text-align: center;
}

.class-time-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.class-time-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.class-time-separator {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.class-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.class-info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border-light);
}

.class-info-card i {
    width: 36px;
    height: 36px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.class-info-card.location i {
    background: var(--success-light);
    color: var(--success);
}

.class-info-card.language i {
    background: var(--accent-light);
    color: var(--accent);
}

.class-info-card .card-content {
    flex: 1;
}

.class-info-card .card-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.class-info-card .card-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 0.125rem;
}

.class-zoom-section {
    background: var(--secondary-light);
    border: 1px solid var(--secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.class-zoom-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.class-zoom-info i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.class-zoom-text {
    font-weight: 500;
    color: var(--text-primary);
}

.class-zoom-text span {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.btn-zoom-large {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-zoom-large:hover {
    background: #1a8cd8;
}

.class-status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.class-status-banner.status-scheduled {
    background: var(--info-light);
    color: var(--info);
}

.class-status-banner.status-completed {
    background: var(--success-light);
    color: var(--success);
}

.class-status-banner.status-cancelled {
    background: var(--error-light);
    color: var(--error);
}

.class-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.class-detail-actions .btn-primary,
.class-detail-actions .btn-secondary,
.class-detail-actions .btn-danger-outline,
.class-detail-actions .btn-accent {
    flex: none;
    white-space: nowrap;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1200px) {
    .kpi-bar {
        flex-wrap: wrap;
    }

    .kpi-divider {
        display: none;
    }

    .kpi-item {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .classes-layout {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .classes-calendar {
        min-height: 400px;
        height: auto;
    }

    .classes-sidebar {
        height: auto;
        max-height: 350px;
    }
}

/* Medium screens - hide contact info, show name only */
@media (max-width: 900px) {
    .user-contact {
        display: none;
    }
}

@media (max-width: 768px) {
    .teacher-header {
        padding: 0 1rem;
        height: auto;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .nav-tab span {
        display: none;
    }

    .user-info,
    .user-info-expanded {
        display: none;
    }

    .nav-portal-link span {
        display: none;
    }

    .nav-portal-link {
        padding: 0.5rem 0.75rem;
    }

    .btn-login span {
        display: none;
    }

    .btn-login {
        padding: 0.5rem 0.75rem;
    }

    .teacher-content {
        padding: 1rem;
        padding-top: calc(60px + 1rem);
    }

    .kpi-item {
        flex: 0 0 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-bar {
        width: 100%;
        flex-wrap: wrap;
    }

    .course-list-item {
        flex-wrap: wrap;
    }

    .course-list-badges {
        flex-direction: row;
        align-items: center;
    }

    .course-list-stats {
        width: 100%;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-light);
    }

    .course-list-arrow {
        display: none;
    }

    .students-table {
        font-size: 0.8125rem;
    }

    .students-table th,
    .students-table td {
        padding: 0.625rem 0.75rem;
    }
}

/* ==========================================================================
   Time Tracking
   ========================================================================== */
.time-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.time-stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.time-stat-card .time-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-lighter);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.time-stat-card.pending .time-stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.time-stat-card.total .time-stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.time-stat-data {
    display: flex;
    flex-direction: column;
}

.time-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.time-stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.time-tracking-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.time-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.time-section-header {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.time-section-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-section-header h3 i {
    color: var(--primary);
}

.time-section-header .badge {
    background: var(--warning);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Pending Classes List */
.pending-classes-list {
    max-height: 400px;
    overflow-y: auto;
}

.pending-class-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: background var(--transition-fast);
}

.pending-class-item:last-child {
    border-bottom: none;
}

.pending-class-item:hover {
    background: var(--bg-secondary);
}

.pending-class-info {
    flex: 1;
}

.pending-class-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pending-class-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pending-class-meta i {
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.btn-log-time {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-log-time:hover {
    background: var(--accent-hover);
}

/* Time Entries List */
.time-entries-list {
    max-height: 400px;
    overflow-y: auto;
}

.time-entry-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-entry-item:last-child {
    border-bottom: none;
}

.time-entry-date {
    text-align: center;
    min-width: 50px;
}

.time-entry-date .day {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.time-entry-date .month {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.time-entry-info {
    flex: 1;
}

.time-entry-class {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.time-entry-course {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.time-entry-attendance {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.2rem;
}
.time-entry-attendance i {
    margin-right: 0.25rem;
}

.time-entry-hours {
    text-align: right;
}

.time-entry-hours .hours {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.time-entry-hours .label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    display: block;
}

.time-entry-item.clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}
.time-entry-item.clickable:hover {
    background: var(--primary-lighter);
    border-left: 3px solid var(--primary);
}
.time-entry-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Time Entry Status Badges */
.te-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.te-status-pending { background: #fef3c7; color: #d97706; }
.te-status-approved { background: #dcfce7; color: #16a34a; }
.te-status-rejected { background: #fee2e2; color: #dc2626; }

/* Time Entry Detail Modal */
.time-entry-detail-modal { max-width: 520px; }
.te-detail-body { padding: 1.5rem; }
.te-detail-header { margin-bottom: 1rem; }
.te-detail-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.te-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}
.te-detail-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.te-detail-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
}
.te-detail-section {
    margin-top: 1rem;
    padding-top: 0.75rem;
}
.te-detail-section h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.te-attendance-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.te-att-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}
.te-att-item.present { background: #dcfce7; color: #16a34a; }
.te-att-item.absent { background: #fee2e2; color: #dc2626; }
.te-detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.te-detail-actions button { flex: 1; }

/* Time Entry Actions (Edit/Delete) */
.time-entry-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 0.75rem;
}

.time-entry-actions .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 0.8125rem;
}

.time-entry-actions .btn-edit {
    background: var(--primary-lighter);
    color: var(--primary);
}

.time-entry-actions .btn-edit:hover {
    background: var(--primary);
    color: white;
}

.time-entry-actions .btn-delete {
    background: var(--error-light);
    color: var(--error);
}

.time-entry-actions .btn-delete:hover {
    background: var(--error);
    color: white;
}

/* Today's entries badge */
.time-entry-today-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--success-light);
    color: var(--success);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

/* Request Correction Modal */
.correction-modal {
    width: 100%;
    max-width: 480px;
}

.correction-modal .modal-header {
    padding: 1.5rem;
    background: var(--primary);
    color: white;
    text-align: center;
}

.correction-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
}

.correction-modal .modal-header h2 i {
    color: var(--accent);
}

.correction-modal .modal-close {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.correction-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.correction-form {
    padding: 1.5rem;
}

.correction-form .form-group {
    margin-bottom: 1.25rem;
}

.correction-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.correction-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast);
    font-family: inherit;
    resize: vertical;
}

.correction-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.correction-form .class-info-display {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.correction-dev-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: #92400e;
}

.correction-dev-notice i {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #b45309;
}

.correction-dev-notice strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #92400e;
}

.correction-dev-notice p {
    margin: 0;
    line-height: 1.5;
    color: #78350f;
}

.btn-correction {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-correction:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* Time entries edit restriction notice in list */
.time-entry-locked {
    opacity: 0.7;
}

.time-entry-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    margin-left: 0.5rem;
}

.time-entry-locked-badge i {
    font-size: 0.5rem;
}

/* Same-day edit notice in time entries list */
.same-day-edit-notice {
    background: var(--bg-secondary);
    border-left: 3px solid var(--info);
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.same-day-edit-notice i {
    color: var(--info);
    flex-shrink: 0;
}

/* Time Summary Section */
.time-summary-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    padding: 1.25rem;
}

.time-summary-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-summary-section h3 i {
    color: var(--primary);
}

.time-by-course {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.course-time-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-time-info {
    flex: 1;
}

.course-time-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.course-time-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
}

.course-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width var(--transition-normal);
}

.course-time-hours {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.course-time-hours small {
    display: block;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Empty States */
.empty-time-state {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-time-state i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.empty-time-state p {
    font-size: 0.875rem;
}

/* ==========================================================================
   Log Time Modal
   ========================================================================== */
.log-time-modal {
    width: 100%;
    max-width: 480px;
}

.log-time-modal .modal-header {
    padding: 1.5rem;
    background: var(--primary);
    color: white;
    text-align: center;
}

.log-time-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
}

.log-time-modal .modal-header h2 i {
    color: var(--accent);
}

.log-time-modal .modal-close {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.log-time-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.log-time-form {
    padding: 1.5rem;
}

.log-time-form .form-group {
    margin-bottom: 1.25rem;
}

.log-time-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.log-time-form select,
.log-time-form input[type="number"],
.log-time-form input[type="time"],
.log-time-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast);
}

.log-time-form select:focus,
.log-time-form input:focus,
.log-time-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.class-info-display {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.class-info-display .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.class-info-display .info-label {
    color: var(--text-secondary);
}

.class-info-display .info-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Toggle Buttons */
/* Hours Input */
.hours-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hours-input-wrapper input {
    padding-right: 4rem;
}

.hours-suffix {
    position: absolute;
    right: 0.875rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.quick-hours {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.quick-hour-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-hour-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-lighter);
}

/* Attendance Section */
.attendance-section {
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-secondary);
}
.attendance-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.attendance-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.attendance-actions {
    display: flex;
    gap: 0.5rem;
}
.btn-attendance-toggle {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-attendance-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.attendance-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.attendance-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.attendance-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}
.attendance-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}
.attendance-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.form-actions button {
    flex: 1;
}

.btn-secondary {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-medium);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Time Tracking Responsive */
@media (max-width: 1024px) {
    .time-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .time-tracking-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .time-stats-grid {
        grid-template-columns: 1fr;
    }

    .time-stat-card {
        padding: 1rem;
    }

    .time-stat-value {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Additional UI Polish
   ========================================================================== */

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Scrollbar styling */
.classes-list::-webkit-scrollbar,
.pending-classes-list::-webkit-scrollbar,
.time-entries-list::-webkit-scrollbar {
    width: 6px;
}

.classes-list::-webkit-scrollbar-track,
.pending-classes-list::-webkit-scrollbar-track,
.time-entries-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.classes-list::-webkit-scrollbar-thumb,
.pending-classes-list::-webkit-scrollbar-thumb,
.time-entries-list::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.classes-list::-webkit-scrollbar-thumb:hover,
.pending-classes-list::-webkit-scrollbar-thumb:hover,
.time-entries-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Card hover effects */
.dashboard-card {
    transition: var(--transition-fast);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Transition animations */
.tab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid var(--info);
}

/* Print styles */
@media print {
    .teacher-header,
    .btn-primary,
    .btn-secondary,
    .modal-overlay {
        display: none !important;
    }

    .teacher-content {
        padding: 0;
    }
}

/* ==========================================================================
   Detail Modal Tabs Navigation
   ========================================================================== */
.detail-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1rem;
}

.detail-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-bottom: -1px;
}

.detail-tab:hover {
    color: var(--primary);
    background: var(--primary-lighter);
}

.detail-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.detail-tab i {
    font-size: 0.875rem;
}

.tab-count {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-tab.active .tab-count {
    background: var(--primary-lighter);
    color: var(--primary);
}

/* Tab Content */
.detail-tab-content,
.student-tab-content {
    display: none;
}

.detail-tab-content.active,
.student-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ==========================================================================
   Linked Items (Navigation between records)
   ========================================================================== */
.linked-section {
    margin-bottom: 1.5rem;
}

.linked-section:last-child {
    margin-bottom: 0;
}

.linked-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.linked-section-title i {
    color: var(--primary);
    font-size: 0.75rem;
}

.linked-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.linked-items-list.compact-list {
    gap: 0.375rem;
}

.linked-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.linked-item:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    transform: translateX(4px);
}

.linked-item.compact {
    padding: 0.625rem 0.875rem;
}

.linked-item.past {
    opacity: 0.7;
}

.linked-item.past:hover {
    opacity: 1;
}

.linked-item-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.linked-item-icon.small {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.linked-item-avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary-light);
    color: var(--secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.linked-item-avatar.small {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.linked-item-content {
    flex: 1;
    min-width: 0;
}

.linked-item-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.linked-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.linked-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.linked-item-meta i {
    color: var(--text-muted);
    font-size: 0.625rem;
}

.linked-item-badge {
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.linked-item-badge.upcoming {
    background: var(--success-light);
    color: var(--success);
}

.linked-item-badge.past {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.linked-item-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.linked-item:hover .linked-item-arrow {
    color: var(--primary);
    transform: translateX(2px);
}

/* Student selection in course detail */
.student-selectable {
    gap: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.student-selectable .linked-item-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
    padding: 0.875rem 1rem 0.875rem 0;
    cursor: pointer;
}

.student-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.student-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.students-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.students-toolbar .linked-section-title {
    margin-bottom: 0;
}

.students-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-toolbar:hover {
    background: var(--primary-dark);
}

.student-select-all-row {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--bg-tertiary);
}

.student-select-all-row + .linked-items-list {
    gap: 0;
}

.student-select-all-row + .linked-items-list .linked-item {
    border-radius: 0;
    border-bottom: none;
}

.student-select-all-row + .linked-items-list .linked-item:last-child {
    border-bottom: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.linked-items-more {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.linked-items-more:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary);
}

.linked-items-more i {
    margin-right: 0.375rem;
}

/* Clickable Stat Cards */
.detail-stat-card.clickable {
    cursor: pointer;
    transition: var(--transition-fast);
}

.detail-stat-card.clickable:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Class Students Section */
.class-students-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Time Logged Badge */
.time-logged-badge {
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 500;
}

.time-logged-badge i {
    margin-right: 0.25rem;
}

/* Student Quick Stats */
.student-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.quick-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.quick-stat.clickable {
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-stat.clickable:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Student Detail Tabs Styling */
.student-tabs {
    background: var(--bg-primary);
}

/* Student contact grid fix for single item */
.student-contact-grid {
    margin-bottom: 0;
}

/* Responsive adjustments for detail modals */
@media (max-width: 640px) {
    .detail-tabs {
        padding: 0 0.5rem;
        overflow-x: auto;
    }

    .detail-tab {
        padding: 0.75rem 0.875rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .detail-tab .tab-count {
        display: none;
    }

    .linked-item {
        padding: 0.75rem;
    }

    .linked-item-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .course-info-grid {
        grid-template-columns: 1fr;
    }

    .student-quick-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .quick-stat {
        padding: 0.75rem 0.5rem;
    }

    .quick-stat-value {
        font-size: 1.25rem;
    }

    .quick-stat-label {
        font-size: 0.6875rem;
    }

    .course-detail-stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Missing Time Entries Alert
   ========================================================================== */
/* Dashboard Alerts Row - side by side on wide screens */
.dashboard-alerts-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-alerts-row > #missingTimeAlert,
.dashboard-alerts-row > #missingRoomAlert {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.dashboard-alerts-row > #missingTimeAlert[style*="display: none"] + #missingRoomAlert,
.dashboard-alerts-row > #missingTimeAlert:only-child,
.dashboard-alerts-row > #missingRoomAlert:only-child {
    flex: 1;
}

@media (max-width: 1024px) {
    .dashboard-alerts-row {
        flex-direction: column;
    }
}

#missingTimeAlert {
    margin-bottom: 0;
}

.missing-time-alert {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border-left: 4px solid var(--info);
}

.missing-time-alert.alert-info {
    border-left-color: var(--info);
}

.missing-time-alert.alert-warning {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, #fffbeb 0%, var(--bg-primary) 50%);
}

.missing-time-alert.alert-danger {
    border-left-color: var(--error);
    background: linear-gradient(135deg, #fef2f2 0%, var(--bg-primary) 50%);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-light);
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.alert-info .alert-icon {
    background: var(--info-light);
    color: var(--info);
}

.alert-warning .alert-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.alert-danger .alert-icon {
    background: var(--error-light);
    color: var(--error);
}

.alert-title {
    flex: 1;
}

.alert-title h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-title p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-log-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-log-all:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.alert-classes {
    padding: 0.5rem;
}

.alert-class-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-class-item:hover {
    background: var(--bg-tertiary);
}

.alert-class-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
    padding: 0.5rem;
    background: var(--primary-lighter);
    border-radius: var(--radius-sm);
}

.alert-class-date .date-day {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1;
}

.alert-class-date .date-month {
    font-size: 0.6875rem;
    color: var(--primary);
    text-transform: uppercase;
    margin-top: 2px;
}

.alert-class-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.alert-class-info .class-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-class-info .class-course {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-class-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.btn-quick-log {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.9);
}

.alert-class-item:hover .btn-quick-log {
    opacity: 1;
    transform: scale(1);
}

.btn-quick-log:hover {
    background: var(--accent-dark);
    transform: scale(1.1) !important;
}

.alert-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alert-more:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Tab badge for missing time count */
.nav-tab {
    position: relative;
}

.tab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .alert-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .alert-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .btn-log-all {
        width: 100%;
        justify-content: center;
    }

    .alert-class-item {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }

    .alert-class-time {
        width: 100%;
        padding-left: 60px;
    }

    .btn-quick-log {
        opacity: 1;
        transform: scale(1);
    }

    .tab-badge {
        top: -2px;
        right: -2px;
        min-width: 16px;
        height: 16px;
        font-size: 0.625rem;
    }
}

/* ==========================================================================
   Profile Page
   ========================================================================== */
.profile-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.profile-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.profile-icon {
    font-size: 4rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.profile-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.profile-details {
    padding: 1.5rem;
}

.profile-field {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-field:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.field-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.field-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* Profile Page Responsive */
@media (max-width: 640px) {
    .profile-page {
        padding: 1rem 0.5rem;
    }

    .profile-header {
        padding: 1.5rem;
    }

    .profile-icon {
        font-size: 3rem;
    }

    .profile-header h2 {
        font-size: 1.25rem;
    }

    .profile-details {
        padding: 1rem;
    }

    .profile-field {
        padding: 0.875rem;
    }

    .field-icon {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Package Hours Tracking
   ========================================================================== */

/* Course Card Package Indicator */
.course-package-indicator {
    margin: 0.75rem 0 0;
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.course-package-indicator .package-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.course-package-indicator .package-fill {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.course-package-indicator.warning .package-fill {
    background: var(--warning);
}

.course-package-indicator.danger .package-fill {
    background: var(--error);
}

.course-package-indicator .package-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.course-package-indicator .package-text i {
    font-size: 0.625rem;
    color: var(--primary);
}

.course-package-indicator.warning .package-text i {
    color: var(--warning);
}

.course-package-indicator.danger .package-text i {
    color: var(--error);
}

/* Course Detail Modal - Package Section */
.package-hours-section {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0 1.5rem 1rem;
}

.package-hours-section.warning {
    background: linear-gradient(135deg, var(--warning-light) 0%, var(--bg-primary) 100%);
    border-color: var(--warning);
}

.package-hours-section.exhausted {
    background: linear-gradient(135deg, var(--error-light) 0%, var(--bg-primary) 100%);
    border-color: var(--error);
}

.package-hours-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 0.75rem;
}

.package-hours-section.warning .package-hours-header {
    color: var(--warning);
}

.package-hours-section.exhausted .package-hours-header {
    color: var(--error);
}

.package-hours-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.package-progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.package-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.package-hours-section.warning .package-progress-fill {
    background: var(--warning);
}

.package-hours-section.exhausted .package-progress-fill {
    background: var(--error);
}

.package-hours-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.pkg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
}

.pkg-stat .pkg-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.pkg-stat .pkg-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pkg-stat.highlight {
    background: var(--success);
    color: white;
}

.pkg-stat.highlight .pkg-value,
.pkg-stat.highlight .pkg-label {
    color: white;
}

.package-hours-section.warning .pkg-stat.highlight {
    background: var(--warning);
}

.package-hours-section.exhausted .pkg-stat.highlight {
    background: var(--error);
}

/* Log Time Modal - Package Warning */
.package-hours-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.package-hours-warning.info {
    background: var(--info-light);
    border: 1px solid var(--info);
    color: var(--info);
}

.package-hours-warning.warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.package-hours-warning.exhausted {
    background: var(--error-light);
    border: 1px solid var(--error);
    color: var(--error);
}

.package-hours-warning i {
    font-size: 1rem;
    flex-shrink: 0;
}

.pkg-warning-text {
    flex: 1;
}

.pkg-warning-text strong {
    font-weight: 600;
}

.pkg-overage {
    color: var(--error);
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .package-hours-section {
        margin: 0 1rem 1rem;
        padding: 0.875rem;
    }

    .package-hours-stats {
        flex-wrap: wrap;
    }

    .pkg-stat {
        min-width: calc(50% - 0.25rem);
    }

    .pkg-stat .pkg-value {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--primary);
    min-width: 300px;
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--error);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-info {
    border-left-color: var(--primary);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.toast-info .toast-icon {
    background: rgba(34, 46, 102, 0.1);
    color: var(--primary);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-line;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    margin: -4px -4px -4px 0;
    font-size: 16px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .toast {
        min-width: 0;
    }
}

/* ============================================================================
   ROOM RESERVATIONS
   ============================================================================ */

/* Room Stats Grid */
.room-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.room-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--border-medium);
}

.room-stat-card.stat-pending { border-left-color: var(--warning); }
.room-stat-card.stat-approved { border-left-color: var(--success); }
.room-stat-card.stat-upcoming { border-left-color: var(--info); }

.room-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.stat-pending .room-stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-approved .room-stat-icon { background: var(--success-light); color: var(--success); }
.stat-upcoming .room-stat-icon { background: var(--info-light); color: var(--info); }

.room-stat-data { display: flex; flex-direction: column; }
.room-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.room-stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

/* Room Availability Card */
.room-avail-card .card-header { flex-wrap: wrap; gap: 0.75rem; }
.room-avail-nav { display: flex; align-items: center; gap: 0.5rem; }
.room-avail-date { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); min-width: 200px; text-align: center; }
.room-avail-body { padding: 0; overflow-x: auto; }

/* Timeline */
.tl-timeline { min-width: 900px; }
.tl-header-row {
    display: grid;
    grid-template-columns: 120px repeat(28, 1fr);
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.tl-corner { padding: 0.5rem; font-size: 0.7rem; color: var(--text-muted); }
.tl-header-cell {
    padding: 0.5rem 0;
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-align: center;
    border-left: 1px solid var(--border-light);
}

.tl-header-cell.tl-hour { font-weight: 600; border-left: 1px solid var(--border-medium); }
.tl-header-cell.tl-half { border-left: 1px dashed #eee; }

.tl-body { position: relative; }

.tl-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-bottom: 1px solid var(--border-light);
    min-height: 44px;
}

.tl-room-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border-right: 2px solid var(--border-light);
    position: sticky;
    left: 0;
    z-index: 1;
}

.tl-room-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.tl-room-cap { font-size: 0.65rem; color: var(--text-muted); }
.tl-room-cap i { margin-right: 2px; }

.tl-slot {
    border-left: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    min-height: 44px;
}

.tl-slot.tl-free:hover { background: var(--primary-lighter); }

.tl-slot.tl-approved-mine {
    background: var(--success-light);
    border-top: 3px solid var(--success);
}

.tl-slot.tl-pending-mine {
    background: var(--warning-light);
    border-top: 3px solid var(--warning);
}

.tl-slot.tl-approved {
    background: var(--bg-tertiary);
    border-top: 3px solid var(--border-medium);
}

.tl-slot.tl-pending {
    background: #fef3e2;
    border-top: 3px solid #f0c070;
}

.tl-booking-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 2px;
}

.tl-now-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    z-index: 3;
}

.tl-now-marker::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* Timeline Legend */
.tl-legend {
    display: flex;
    gap: 1.25rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.tl-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tl-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid var(--border-light);
}

.tl-legend-dot.tl-approved-mine { background: var(--success-light); border-color: var(--success); }
.tl-legend-dot.tl-pending-mine { background: var(--warning-light); border-color: var(--warning); }
.tl-legend-dot.tl-approved { background: var(--bg-tertiary); border-color: var(--border-medium); }
.tl-legend-dot.tl-free { background: white; }
.tl-legend-dot.tl-block-approved-mine { background: var(--success-light); border-color: var(--success); }
.tl-legend-dot.tl-block-pending-mine { background: var(--warning-light); border-color: var(--warning); }
.tl-legend-dot.tl-block-approved { background: var(--bg-tertiary); border-color: var(--border-medium); }
.tl-legend-dot.tl-block-free { background: white; }

/* Block-based Gantt layout (absolutely-positioned blocks per room row) */
.tl-row-slots {
    position: relative;
    min-height: 44px;
}

.tl-bg-grid {
    display: grid;
    grid-template-columns: repeat(28, 1fr);
    height: 100%;
}

.tl-bg-cell {
    border-left: 1px solid #f0f0f0;
    min-height: 44px;
}

.tl-bg-cell.tl-hour-line {
    border-left: 1px solid var(--border-medium);
}

.tl-blocks-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.tl-block {
    position: absolute;
    top: 4px;
    bottom: 4px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
    overflow: hidden;
    pointer-events: all;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    z-index: 1;
}

.tl-block:hover {
    box-shadow: var(--shadow-md);
    z-index: 5;
    transform: translateY(-1px);
}

.tl-block-approved-mine {
    background: var(--success-light);
    border: 2px solid var(--success);
    color: var(--success);
}

.tl-block-pending-mine {
    background: var(--warning-light);
    border: 2px solid var(--warning);
    color: var(--warning);
}

.tl-block-approved {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-medium);
    color: var(--text-secondary);
}

.tl-block-pending {
    background: #fef3e2;
    border: 2px solid #f0c070;
    color: #b8860b;
}

.tl-block-name {
    font-size: 0.6875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tl-block-time {
    font-size: 0.575rem;
    font-weight: 600;
    opacity: 0.8;
    white-space: nowrap;
}

.tl-block-loc {
    font-size: 0.55rem;
    font-weight: 500;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-block-room {
    font-size: 0.55rem;
    font-weight: 500;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-block-room i {
    font-size: 0.5rem;
    margin-right: 2px;
}

/* Teacher portal: no room label column */
.tl-no-room-col {
    grid-template-columns: repeat(28, 1fr) !important;
}

.tl-no-room-col + .tl-body .tl-row {
    grid-template-columns: 1fr !important;
}

.tl-row-slots-full {
    position: relative;
    min-height: 76px;
}

.tl-no-room-col + .tl-body .tl-bg-cell {
    min-height: 76px;
}

.tl-no-room-col + .tl-body .tl-block {
    top: 4px;
    bottom: 4px;
    padding: 6px 10px;
    justify-content: center;
    gap: 1px;
}

.tl-no-room-col + .tl-body .tl-block-name {
    font-size: 0.75rem;
}

.tl-no-room-col + .tl-body .tl-block-time {
    font-size: 0.6875rem;
}

.tl-no-room-col + .tl-body .tl-block-room {
    font-size: 0.625rem;
}

.tl-no-room-col + .tl-body .tl-block-loc {
    font-size: 0.6rem;
}

/* Reservation Cards */
.reservations-list { display: flex; flex-direction: column; gap: 0.5rem; }

.reservation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-fast);
    border-left: 4px solid var(--border-light);
}

.reservation-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.reservation-card.res-pending { border-left-color: var(--warning); }
.reservation-card.res-approved { border-left-color: var(--success); }
.reservation-card.res-denied { border-left-color: var(--error); }
.reservation-card.res-cancelled { border-left-color: var(--text-muted); opacity: 0.7; }

.res-card-left { display: flex; flex-direction: column; gap: 0.25rem; }
.res-card-room { font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); }
.res-card-room i { color: var(--primary); margin-right: 0.375rem; }
.res-card-course { font-size: 0.8125rem; color: var(--text-secondary); }
.res-card-meta { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-muted); }
.res-card-meta i { margin-right: 0.25rem; }

.res-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.375rem; }

.res-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.res-status-badge.status-pending { background: var(--warning-light); color: var(--warning); }
.res-status-badge.status-approved { background: var(--success-light); color: var(--success); }
.res-status-badge.status-denied { background: var(--error-light); color: var(--error); }
.res-status-badge.status-cancelled { background: var(--bg-tertiary); color: var(--text-muted); }

.res-admin-note { color: var(--info); font-size: 0.8rem; }

.res-card-loc { font-weight: 400; color: var(--text-muted); font-size: 0.8125rem; }
.res-card-type { font-size: 0.6875rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-left: 0.375rem; }

/* =================== ROOM AVAILABILITY - VIEW CONTROLS =================== */

.room-avail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.room-avail-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.room-avail-view-toggle {
    display: inline-flex;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.room-avail-view-toggle .view-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: var(--bg-primary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border-right: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.room-avail-view-toggle .view-btn:last-child { border-right: none; }

.room-avail-view-toggle .view-btn.active {
    background: var(--primary);
    color: white;
}

.room-avail-view-toggle .view-btn:hover:not(.active) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* =================== ROOM AVAILABILITY - WEEK VIEW =================== */

.ra-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ra-week-day {
    background: var(--bg-primary);
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.ra-week-day.ra-today { background: #fffef7; }

.ra-week-day-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.ra-day-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ra-day-num {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ra-day-num.ra-today-num {
    background: var(--primary);
    color: white;
}

.ra-week-day-body {
    flex: 1;
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow-y: auto;
}

.ra-no-events {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    padding: 1rem 0;
    opacity: 0.35;
}

.ra-event {
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    font-size: 0.6875rem;
    line-height: 1.4;
}

.ra-event:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.ra-event.ra-ev-approved-mine  { background: var(--success-light); border-left-color: var(--success); color: #1a6b3c; }
.ra-event.ra-ev-pending-mine   { background: var(--warning-light); border-left-color: var(--warning); color: #8a6d00; }
.ra-event.ra-ev-approved       { background: var(--bg-tertiary); border-left-color: var(--border-medium); color: var(--text-secondary); }
.ra-event.ra-ev-pending        { background: #fef3e2; border-left-color: #f0c070; color: #b8860b; }

.ra-ev-time {
    font-weight: 700;
    font-size: 0.625rem;
    opacity: 0.9;
}

.ra-ev-course {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ra-ev-detail {
    font-size: 0.6rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ra-ev-detail i { margin-right: 2px; font-size: 0.55rem; }

/* =================== ROOM AVAILABILITY - MONTH VIEW =================== */

.ra-month-grid {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ra-month-hdr-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.ra-month-hdr {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ra-month-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-light);
}

.ra-month-cell {
    background: var(--bg-primary);
    min-height: 90px;
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
}

.ra-month-cell.ra-month-blank {
    background: var(--bg-secondary);
    min-height: 40px;
}

.ra-month-cell.ra-today { background: #fffef7; }

.ra-month-day-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ra-month-day-num.ra-today-num {
    background: var(--primary);
    color: white;
}

.ra-month-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ra-month-ev {
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.625rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition-fast);
    border-left: 2px solid transparent;
}

.ra-month-ev:hover { opacity: 0.85; box-shadow: var(--shadow-sm); }

.ra-month-ev.ra-ev-approved-mine { background: var(--success-light); border-left-color: var(--success); color: #1a6b3c; }
.ra-month-ev.ra-ev-pending-mine  { background: var(--warning-light); border-left-color: var(--warning); color: #8a6d00; }
.ra-month-ev.ra-ev-approved      { background: var(--bg-tertiary); border-left-color: var(--border-medium); color: var(--text-secondary); }
.ra-month-ev.ra-ev-pending       { background: #fef3e2; border-left-color: #f0c070; color: #b8860b; }

.ra-month-ev-time {
    font-weight: 700;
    margin-right: 3px;
}

.ra-month-more {
    font-size: 0.6rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 1px 4px;
}

/* Room Request Modal */
.room-request-modal { max-width: 580px; padding: 0; overflow: hidden; max-height: 90vh; display: flex; flex-direction: column; }

/* Room Request Hero */
.room-req-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-inverse);
    padding: 1.75rem 2rem 1.5rem;
    text-align: center;
}

.room-req-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
}

.room-req-hero h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.room-req-hero p {
    font-size: 0.8125rem;
    opacity: 0.8;
}

.room-request-modal .room-request-form {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.room-request-modal .modal-close {
    color: var(--text-secondary);
    z-index: 10;
}

.room-request-modal .modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Room Request Steps */
.room-req-step {
    margin-bottom: 1.25rem;
}

.room-req-step-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.room-req-step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
}

.room-req-step-text h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.room-req-step-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.room-req-step select {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition-fast);
    font-family: inherit;
}

.room-req-step select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 46, 102, 0.1);
}

.room-req-step textarea {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    transition: var(--transition-fast);
}

.room-req-step textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 46, 102, 0.1);
}

/* Room Request Class Card */
.room-req-class-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.room-req-class-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    margin-bottom: 0.625rem;
}

.room-req-class-card-header i { font-size: 0.875rem; }

.room-req-class-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.room-req-class-detail {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.room-req-class-detail i {
    font-size: 0.75rem;
    color: var(--accent);
    width: 14px;
    text-align: center;
}

/* Room request type toggle */
.room-req-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.room-req-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.room-req-type-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.room-req-type-btn.active {
    border-color: var(--accent);
    background: #e8f0fe;
    color: var(--accent);
}

.room-req-type-btn i {
    font-size: 1rem;
}

/* Private class room request form */
.room-req-private-details {
    margin-top: 1rem;
}

.room-req-private-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.room-req-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.room-req-field label .required {
    color: #dc2626;
}

.room-req-field input[type="date"],
.room-req-field select,
.room-req-field textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.room-req-field input[type="date"] {
    cursor: pointer;
}

.room-req-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.room-req-field input[type="date"] {
    position: relative;
}

.room-req-field textarea {
    resize: vertical;
}

.room-req-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.room-req-radio-group {
    display: flex;
    gap: 1rem;
}

.room-req-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
}

.room-req-radio input[type="radio"] {
    margin: 0;
}

/* Submit button disabled state */
.room-request-form .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-muted);
}

/* Missing Room Alert on Dashboard */
.missing-room-alert {
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 0;
}

.missing-room-alert-header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.missing-room-alert-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: var(--radius-full);
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.missing-room-alert-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.missing-room-alert-text h3 .missing-room-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.missing-room-alert-text p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.missing-room-classes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.missing-room-class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    gap: 1rem;
}

.missing-room-class-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.missing-room-class-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.missing-room-class-meta i {
    margin-right: 0.25rem;
    color: var(--text-muted);
}

.btn-request-room-quick {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.btn-request-room-quick:hover {
    background: var(--accent-hover);
}

/* Class Detail - Room Banner */
.class-room-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.class-room-banner-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.class-room-banner-info {
    flex: 1;
}

.class-room-banner-info strong {
    display: block;
    font-size: 0.8125rem;
    margin-bottom: 0.125rem;
}

.class-room-banner-info span {
    font-size: 0.725rem;
}

.class-room-banner-row {
    display: flex;
    align-items: center;
}

.room-banner-approved {
    background: var(--success-light);
    border: 1px solid rgba(21, 128, 61, 0.2);
}

.room-banner-approved .class-room-banner-icon {
    background: rgba(21, 128, 61, 0.1);
    color: var(--success);
}

.room-banner-approved .class-room-banner-info strong { color: var(--success); }
.room-banner-approved .class-room-banner-info span { color: #166534; }

.room-banner-pending {
    background: var(--warning-light);
    border: 1px solid rgba(202, 138, 4, 0.2);
}

.room-banner-pending .class-room-banner-icon {
    background: rgba(202, 138, 4, 0.1);
    color: var(--warning);
}

.room-banner-pending .class-room-banner-info strong { color: var(--warning); }
.room-banner-pending .class-room-banner-info span { color: #854d0e; }

.room-banner-missing {
    background: var(--accent-light);
    border: 1px solid rgba(241, 108, 19, 0.2);
}

.room-banner-missing .class-room-banner-icon {
    background: rgba(241, 108, 19, 0.1);
    color: var(--accent);
}

.room-banner-missing .class-room-banner-info strong { color: var(--accent); }
.room-banner-missing .class-room-banner-info span { color: var(--text-secondary); }

/* Accent button for Request Room in class detail */
.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-accent:hover { background: var(--accent-hover); }

.room-pkg-warning {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(202, 138, 4, 0.2);
    margin-bottom: 1rem;
}

.room-pkg-warning.info {
    background: var(--info-light);
    color: var(--info);
    border-color: rgba(2, 132, 199, 0.2);
}

.room-pkg-warning.exhausted {
    background: #fef2f2;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

.room-pkg-warning i { flex-shrink: 0; align-self: flex-start; margin-top: 2px; }

.room-pkg-warning div { line-height: 1.4; }

/* Room Selection Grid */
.room-selection-grid {
    margin-bottom: 1.25rem;
}

.room-grid-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.room-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.625rem;
}

.room-grid-title {
    grid-column: 1 / -1;
}

.room-select-card {
    padding: 0.875rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    background: var(--bg-primary);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.room-select-card.available {
    cursor: pointer;
    border-color: var(--success);
    background: #f0fdf4;
}

.room-select-card.available:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.room-select-card.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}

.room-select-card.selected {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(241, 108, 19, 0.15);
}

.room-select-header { display: flex; justify-content: space-between; align-items: center; }
.room-select-name { font-weight: 700; font-size: 0.875rem; color: var(--text-primary); }
.room-select-size {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.room-select-size.size-small { background: var(--info-light); color: var(--info); }
.room-select-size.size-medium { background: var(--warning-light); color: var(--warning); }
.room-select-size.size-large { background: var(--success-light); color: var(--success); }

.room-select-capacity { font-size: 0.75rem; color: var(--text-secondary); }
.room-select-capacity i { margin-right: 0.25rem; }


.room-select-status {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.room-select-card.available .room-select-status { color: var(--success); }
.room-select-card.unavailable .room-select-status { color: var(--text-muted); }

.room-booking-notice {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    background: var(--primary-lighter);
    color: var(--primary);
    border: 1px solid rgba(34, 46, 102, 0.15);
    margin-bottom: 1.25rem;
}

.room-booking-notice i { flex-shrink: 0; }

/* Room Detail Modal */
.room-detail-modal { max-width: 500px; padding: 2rem; }

.room-detail-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.room-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

.room-detail-icon.status-pending { background: var(--warning-light); color: var(--warning); }
.room-detail-icon.status-approved { background: var(--success-light); color: var(--success); }
.room-detail-icon.status-denied { background: var(--error-light); color: var(--error); }
.room-detail-icon.status-cancelled { background: var(--bg-tertiary); color: var(--text-muted); }

.room-detail-header h2 { margin: 0.5rem 0; }
.room-detail-header .res-status-badge { margin-top: 0.25rem; }

.room-detail-info { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-note-row .detail-value { color: var(--info); font-style: italic; }

.room-detail-actions { text-align: center; }
.btn-cancel-res {
    color: var(--error);
    border-color: var(--error-light);
}
.btn-cancel-res:hover { background: var(--error-light); }

.btn-cancel-res-inline {
    background: none;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.35rem;
}
.btn-cancel-res-inline:hover {
    background: var(--error);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .room-avail-body { -webkit-overflow-scrolling: touch; }
    .room-stats-grid { grid-template-columns: 1fr; }
    .reservation-card { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .res-card-right { align-items: flex-start; }
}

/* ============================================================================
   ANNOUNCEMENTS NOTICE BOARD
   ============================================================================ */
.announcements-board {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.notice-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notice-info { border-left-color: #3b82f6; background: #eff6ff; }
.notice-warning { border-left-color: #f59e0b; background: #fffbeb; }
.notice-urgent { border-left-color: #ef4444; background: #fef2f2; }
.notice-closure { border-left-color: #8b5cf6; background: #f5f3ff; }

.notice-pinned { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.notice-icon {
    font-size: 1rem;
    flex-shrink: 0;
}
.notice-info .notice-icon { color: #3b82f6; }
.notice-warning .notice-icon { color: #f59e0b; }
.notice-urgent .notice-icon { color: #ef4444; }
.notice-closure .notice-icon { color: #8b5cf6; }

.notice-content {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.notice-pin-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* dismiss button removed — announcements controlled by date range */
