/* ===== FINAL UNIFIED CSS SYSTEM ===== */
/* Clean, consistent styling for the entire site */

/* ===== CSS VARIABLES ===== */
:root {
    /* Bright Stars Brand Colors - Extracted from official materials */
    --primary-purple: #8B5FC7;
    --bright-orange: #FF9B47;
    --sunny-yellow: #FFD93D;
    --grass-green: #6BCF7F;
    --sky-blue: #4ECDC4;
    --coral-pink: #FF6B9D;
    --soft-lavender: #C8A8E9;
    --light-purple: #E8DCFF;

    /* Functional colors */
    --primary: var(--primary-purple);
    --secondary: var(--bright-orange);
    --success-green: #10B981;
    --white: #FFFFFF;

    /* Text colors */
    --text-primary: #2D3748;
    --text-dark: #2D3748;
    --text-medium: #4A5568;
    --text-light: #718096;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-xxl: 28px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-index hierarchy */
    --z-dropdown: 1000;
    --z-modal: 5000;
    --z-lesson-viewer: 10000;
    --z-secure-viewer: 15000;
    --z-tooltip: 20000;
}

/* ===== BASE STYLES ===== */
body {
    background: linear-gradient(135deg, var(--soft-lavender) 0%, var(--sky-blue) 50%, var(--sunny-yellow) 100%);
    min-height: 100vh;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Ensure body scroll is restored when no modals are active */
body:not(:has(.modal.active)):not(:has(.modal.show)) {
    overflow: auto;
    position: static;
}

/* ===== UNIVERSAL CARD SYSTEM ===== */
/* Works for ALL cards - .content-card and .card */
.content-card,
.card {
    background: var(--white);
    border-radius: 24px;
    padding: var(--spacing-xxl);
    box-shadow: 0 8px 32px rgba(139, 95, 199, 0.12);
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    background-image: linear-gradient(white, white),
                      linear-gradient(135deg, var(--primary-purple), var(--bright-orange));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 250px;
}

.content-card:hover,
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(139, 95, 199, 0.18);
    animation: pulse 1s ease-in-out infinite;
}

/* Top accent line on hover */
.content-card::before,
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--bright-orange));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover::before,
.card:hover::before {
    opacity: 1;
}

/* ===== CARD CONTENT COMPONENTS ===== */
/* Icons - universal styling */
.content-card .card-icon,
.card .card-icon,
.card__icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    display: block;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.content-card:hover .card-icon,
.card:hover .card-icon,
.card:hover .card__icon {
    animation: bounce 0.6s ease-in-out;
}

/* Card headers */
.card__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Titles - universal styling */
.content-card .card-title,
.card .card-title,
.card__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    flex: 1;
    margin: 0;
}

/* Descriptions */
.content-card .card-description,
.card .card-description {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
}

/* ===== STATS COMPONENTS - UNIVERSAL AND CONSISTENT ===== */
.student-stats,
.homework-stats,
.messages-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    flex: 1;
    padding: 15px;
    background: rgba(139, 95, 191, 0.05);
    border-radius: var(--radius-md);
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat__number {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    color: var(--primary-purple);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.stat__label {
    font-size: 0.75rem;
    color: var(--text-light);
    display: block;
    font-weight: 500;
}

/* ===== BUTTON COMPONENTS ===== */
.btn {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    min-width: 160px;
    width: 160px;
    height: 48px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-radius: var(--radius-md);
    border: none;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn--primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7C4DFF 100%);
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.3);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #7C4DFF 0%, #6A1B9A 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(139, 95, 191, 0.4);
}

.btn--success {
    background: linear-gradient(135deg, var(--success-green) 0%, #45A049 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn--success:hover {
    background: linear-gradient(135deg, #45A049 0%, #388E3C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn--secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn--secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Header Layout */
.header {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    padding: 25px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--soft-lavender), var(--sky-blue));
    opacity: 0.1;
    pointer-events: none;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.logo-image {
    height: 120px;
    object-fit: contain;
}

.banner-image {
    height: 120px;
    object-fit: contain;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    flex: 0 0 auto;
    justify-content: flex-end;
}

/* Dashboard Layout */
.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    min-height: calc(100vh - 180px);
    margin-top: 20px;
}

/* Sidebar Layout */
.sidebar {
    background: var(--white);
    border-radius: 20px;
    padding: 30px 20px;
    color: var(--text-dark);
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-purple), var(--coral-pink));
    opacity: 0.8;
    pointer-events: none;
}

.sidebar-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #F7FAFC;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 8px;
}

.sidebar-subtitle {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 400;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-medium);
}

.nav-item:hover {
    background: rgba(139, 95, 191, 0.1);
    color: var(--primary-purple);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--coral-pink));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

.nav-item-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* Student Dashboard Sidebar */
.student-dashboard-sidebar {
    background: linear-gradient(135deg, var(--primary-purple), var(--coral-pink));
    border-radius: 20px;
    padding: 30px 20px;
    color: var(--white);
    height: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.student-dashboard-sidebar .sidebar-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.student-dashboard-sidebar .sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.student-dashboard-sidebar .sidebar-subtitle {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 400;
    color: var(--white);
}

/* Content Area */
.content-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    min-height: 500px;
}

.content-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F7FAFC;
}

.content-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.content-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Back to Clubs Button */
.back-to-clubs,
.sidebar .back-to-clubs,
.student-dashboard-sidebar .back-to-clubs {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    text-decoration: none;
    display: block;
}

.back-to-clubs:hover,
.sidebar .back-to-clubs:hover,
.student-dashboard-sidebar .back-to-clubs:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: var(--white);
}

/* For regular sidebar (non-student dashboard) */
.sidebar .back-to-clubs {
    background: rgba(139, 95, 191, 0.1);
    border: 1px solid rgba(139, 95, 191, 0.3);
    color: var(--primary-purple);
}

.sidebar .back-to-clubs:hover {
    background: rgba(139, 95, 191, 0.2);
    color: var(--primary-purple);
}

/* Back to Portal button in subscription and other pages */
button[onclick*="goBackToClubSelection"],
.header .user-info button[onclick*="goBackToClubSelection"] {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7C4DFF 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.3);
}

button[onclick*="goBackToClubSelection"]:hover,
.header .user-info button[onclick*="goBackToClubSelection"]:hover {
    background: linear-gradient(135deg, #7C4DFF 0%, #6A1B9A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.4);
}

.grid {
    display: grid;
    gap: var(--spacing-xl);
}

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

.grid--three-cols {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.flex {
    display: flex;
}

.flex--center {
    align-items: center;
    justify-content: center;
}

.flex--between {
    justify-content: space-between;
    align-items: center;
}

.flex--gap-sm { gap: var(--spacing-sm); }
.flex--gap-md { gap: var(--spacing-md); }
.flex--gap-lg { gap: var(--spacing-lg); }

/* ===== MY STUDENTS PAGE SPECIFIC ===== */
.search-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 95, 191, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.search-icon {
    color: var(--primary-purple);
    font-size: 1.2rem;
    opacity: 0.7;
}

.search-container input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    flex: 1;
    color: var(--text-dark);
    font-family: inherit;
}

.search-container input::placeholder {
    color: var(--text-light);
    opacity: 0.8;
}

.student-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.actions-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.no-students-message {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 32px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 95, 191, 0.1);
}

.no-students-message h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.no-students-message p {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== HOMEWORK COMPONENTS ===== */
.homework-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
    margin: var(--spacing-md) 0 0 0;
}

.homework-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin: 0;
    border-left: 4px solid var(--primary-purple);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    width: 100%;
    box-sizing: border-box;
}

.homework-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.homework-item.status-assigned {
    border-left-color: #f59e0b;
}

.homework-item.status-submitted {
    border-left-color: var(--success-green);
}

.homework-item.status-overdue {
    border-left-color: #ef4444;
}

.homework-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.homework-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.homework-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.homework-subject {
    background: rgba(139, 95, 191, 0.1);
    color: var(--primary-purple);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.homework-due {
    color: var(--text-medium);
    font-size: 0.875rem;
}

.no-homework {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-medium);
    font-style: italic;
}

/* ===== BADGE COMPONENTS ===== */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: rgba(139, 95, 191, 0.1);
    color: var(--primary-purple);
}

.badge.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* ===== ANIMATIONS ===== */
@keyframes iconSubtle {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1.05); }
}

/* Playful animations matching Bright Stars brand */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes rainbow {
    0% { border-color: var(--primary-purple); }
    25% { border-color: var(--bright-orange); }
    50% { border-color: var(--sunny-yellow); }
    75% { border-color: var(--grass-green); }
    100% { border-color: var(--sky-blue); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== LOGIN AND AUTH COMPONENTS ===== */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.login-header {
    margin-bottom: 30px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
}

/* ===== MODAL COMPONENTS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    display: none;
}

/* Removed duplicate modal styles - using consolidated version later in file */

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

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ===== ENHANCED CLUB SELECTION ===== */
.club-selection {
    text-align: center;
    padding: 40px 20px;
}

.club-selection-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.club-selection-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    margin-bottom: 40px;
}

.club-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.club-box {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 155, 71, 0.3);
    text-align: center;
}

.club-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.club-box.year4 {
    background: linear-gradient(135deg, rgba(255, 155, 71, 0.1), rgba(255, 217, 61, 0.1));
    border-color: rgba(255, 155, 71, 0.3);
}

.club-box.year5 {
    background: linear-gradient(135deg, rgba(107, 207, 127, 0.1), rgba(78, 205, 196, 0.1));
    border-color: rgba(107, 207, 127, 0.3);
}

.club-box.locked {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-color: #ccc;
}

.club-box.locked:hover {
    transform: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.club-icon {
    font-size: 64px;
    margin-bottom: 20px;
    filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
}

.club-box.year4 .club-icon {
    color: var(--bright-orange);
}

.club-box.year5 .club-icon {
    color: var(--success-green);
}

.club-box:hover .club-icon {
    animation: rotate 0.6s ease;
}

.club-title {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.club-description {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 20px;
}

.club-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.club-meta span {
    background: rgba(139, 95, 191, 0.1);
    color: var(--primary-purple);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.locked-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--coral-pink), #FF4D4F);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Logout Button - Proper CSS Hierarchy */
.header .user-info button[onclick*="signOut"],
.user-info button[onclick*="signOut"].btn.btn-secondary,
button[onclick*="signOut"].btn.btn-secondary {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.header .user-info button[onclick*="signOut"]:hover,
.user-info button[onclick*="signOut"].btn.btn-secondary:hover,
button[onclick*="signOut"].btn.btn-secondary:hover {
    background: linear-gradient(135deg, #ff3838, #e74c3c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

/* ===== FORM COMPONENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== ERROR AND SUCCESS STATES ===== */
.error-message {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.success-message {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #059669;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-medium);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* ===== STUDENT AND USER CARDS ===== */
.student-card {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(139, 95, 191, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-purple);
}

.student-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.student-card-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
}

.student-card-content {
    margin-bottom: 15px;
}

.student-card-body {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.student-card-body p {
    margin: 0.5rem 0;
}

.student-card-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    border-top: 1px solid #F7FAFC;
    padding-top: 15px;
    flex-wrap: wrap;
}

.user-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.user-card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.user-card.pending {
    border-left: 4px solid var(--sunny-yellow);
}

.user-card.approved {
    border-left: 4px solid var(--grass-green);
}

.user-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.user-info {
    flex: 1;
}

.user-details {
    color: var(--text-medium);
    margin-bottom: 15px;
}

/* ===== STATUS AND ROLE BADGES ===== */
.status-badge,
.role-badge,
.admin-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.azure {
    background: linear-gradient(135deg, var(--grass-green), var(--sky-blue));
    color: var(--white);
}

.status-badge.pending,
.user-status.status-pending {
    background: rgba(255, 217, 61, 0.2);
    color: #D4AC0D;
}

.status-badge.accepted,
.user-status.status-approved {
    background: rgba(107, 207, 127, 0.2);
    color: var(--grass-green);
}

.status-badge.expired {
    background: #dc3545;
    color: white;
}

.role-badge.tutor {
    background: var(--primary-purple);
    color: var(--white);
}

.badge.status-active {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.badge.status-inactive {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* ===== APPROVAL BANNER ===== */
.approval-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin: 20px 0;
    background: rgba(255, 155, 71, 0.1);
    border: 2px solid var(--bright-orange);
    border-radius: 12px;
    animation: fadeInDown 0.5s ease-out;
}

.approval-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.approval-text h3 {
    color: var(--bright-orange);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.approval-text p {
    color: var(--text-medium);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SUBSCRIPTION PAGE ===== */
.subscription-status-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--grass-green);
    margin-bottom: 20px;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subscription-plan {
    background: linear-gradient(135deg, var(--primary-purple), var(--bright-orange));
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(139, 95, 191, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(139, 95, 191, 0.1);
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-medium);
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.detail-value.status-active {
    color: var(--grass-green);
    font-weight: 600;
}

/* Subscription Plans Grid */
.subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.plan-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-purple);
}

.plan-card.recommended {
    border-color: var(--primary-purple);
    position: relative;
}

.plan-card.recommended::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: 15px;
    right: -25px;
    background: var(--primary-purple);
    color: var(--white);
    padding: 4px 45px;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
    white-space: nowrap;
}

.plan-header {
    margin-bottom: 20px;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-purple);
    margin-bottom: 4px;
}

/* Subscription Plan Change Buttons */
.plan-card .btn,
.plan-card button[onclick*="change"],
.plan-card button[onclick*="Change"],
button[onclick*="changePlan"] {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7C4DFF 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.3);
    font-size: 14px;
    width: 100%;
    margin-top: 16px;
}

.plan-card .btn:hover,
.plan-card button[onclick*="change"]:hover,
.plan-card button[onclick*="Change"]:hover,
button[onclick*="changePlan"]:hover {
    background: linear-gradient(135deg, #7C4DFF 0%, #6A1B9A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.4);
}

.plan-period {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.plan-features li {
    padding: 8px 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: '✓';
    color: var(--success-green);
    font-weight: bold;
    font-size: 1.1rem;
}

.plan-cta {
    margin-top: 20px;
}

.plan-cta .btn {
    width: 100%;
    justify-content: center;
}

/* ===== ENHANCED YEAR AHEAD CALENDAR ===== */
.year-ahead-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.year-column {
    background: #F7FAFC;
    border-radius: 12px;
    padding: 20px;
    min-height: 600px;
}

.year-column h3 {
    color: var(--primary-purple);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

/* Calendar Weekly View - Proper Format */
.calendar-weekly-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

/* Removed duplicate week-card styles - using complete version later in file */

.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.week-header h4 {
    margin: 0;
    color: var(--primary-purple);
    font-size: 1.1rem;
}

.lesson-count {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.week-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.subject-column h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lesson-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lesson-item:hover {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.lesson-title {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.lesson-type {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.no-lessons {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
    padding: 1rem 0;
}

/* ===== MY STUDENTS ENHANCED LAYOUT ===== */
.student-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    margin-top: 20px;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Student Card Button Styling */
.student-card-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Communication Actions Buttons */
.communication-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.communication-actions .btn,
.communication-actions button {
    flex: 1;
    min-width: 120px;
}

.student-card-buttons .btn,
.student-card-buttons button,
.student-card-actions .btn,
.student-card-actions button,
.communication-actions .btn,
.communication-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: linear-gradient(135deg, var(--primary-purple) 0%, #7C4DFF 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 95, 191, 0.3);
}

.student-card-buttons .btn:hover,
.student-card-buttons button:hover,
.student-card-actions .btn:hover,
.student-card-actions button:hover,
.communication-actions .btn:hover,
.communication-actions button:hover {
    background: linear-gradient(135deg, #7C4DFF 0%, #6A1B9A 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.4);
}

/* Second button in different color */
.student-card-buttons .btn:nth-child(2),
.student-card-actions .btn:nth-child(2),
.communication-actions .btn:nth-child(2) {
    background: linear-gradient(135deg, var(--bright-orange) 0%, #FF7A33 100%);
    box-shadow: 0 2px 8px rgba(255, 155, 71, 0.3);
}

.student-card-buttons .btn:nth-child(2):hover,
.student-card-actions .btn:nth-child(2):hover,
.communication-actions .btn:nth-child(2):hover {
    background: linear-gradient(135deg, #FF7A33 0%, #FF6B1F 100%);
    box-shadow: 0 4px 12px rgba(255, 155, 71, 0.4);
}

.students-section {
    margin-top: 30px;
}

/* Student Detail View - Hidden by default, shown when student is clicked */
.student-detail-view {
    display: none;
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.student-detail-view.hidden {
    display: none;
}

.student-detail-view:not(.hidden) {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide students list when detail view is active */
.students-section.detail-active {
    display: none;
}

.overview-section {
    margin-bottom: 40px;
}

/* My Students page specific grid layout */
.student-management-overview .grid--three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Ensure stats cards display horizontally within each card */
.student-management-overview .card__stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
    flex-wrap: nowrap;
}

.student-management-overview .stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: rgba(139, 95, 191, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F7FAFC;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-controls select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.875rem;
}

/* Student Management Actions */
.actions-section {
    margin-bottom: 30px;
    text-align: center;
}

.actions-container {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* ===== HOMEWORK OVERVIEW AS CARDS ===== */
.homework-overview {
    margin-top: 2rem;
}

/* ===== COMPLETE SECURE LESSON VIEWER ===== */
.secure-lesson-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.98) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.secure-lesson-container {
    width: 95vw;
    height: 95vh;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lesson-header {
    background: linear-gradient(135deg, #8B5FC7, #9C6CD3);
    color: white;
    padding: 0;
    flex-shrink: 0;
}

.lesson-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.lesson-title-bar h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.lesson-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.security-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.close-lesson-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.close-lesson-btn:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.lesson-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
}

.viewer-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.lesson-actions .worksheet-btn {
    background: #2ed573;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.worksheet-btn:hover {
    background: #1dd362;
    transform: translateY(-1px);
}

.lesson-content-area {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
}

.content-watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
}

.watermark-text {
    background: rgba(139, 95, 199, 0.1);
    color: #8B5FC7;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(139, 95, 199, 0.3);
}

.pdf-viewer-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* FULLSCREEN PDF MODAL STYLES */
.fullscreen-pdf-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 10001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.fullscreen-pdf-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 0;
}

.pdf-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    border-radius: 0;
    flex-shrink: 0;
}

.pdf-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

.pdf-title-bar h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.pdf-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.close-pdf-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.close-pdf-btn:hover {
    background: #ff3838;
    transform: translateY(-1px);
}

.pdf-content-area {
    flex: 1;
    position: relative;
    background: #f5f5f5;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.pdf-viewer-container {
    flex: 1;
    width: 100%;
    position: relative;
    background: white;
    overflow: auto;
}

.pdf-viewer-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.pdf-footer {
    background: #2c3e50;
    color: white;
    padding: 10px 25px;
    flex-shrink: 0;
}

.security-notice {
    text-align: center;
}

.security-notice small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.content-watermark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(0, 0, 0, 0.02) 100px,
        rgba(0, 0, 0, 0.02) 102px
    );
}

/* LESSON VIEWER MODAL IMPROVEMENTS */
.modal-content.extra-large {
    max-width: 1200px;
    width: 95%;
    min-height: 600px;
}

.lesson-overview-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    padding: 20px;
    min-height: 500px;
}

.lesson-info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.lesson-info-section h4 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.lesson-metadata {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.lesson-files-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-selection-group h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.file-item {
    margin-bottom: 10px;
}

.file-actions-row {
    display: flex;
    width: 100%;
}

.btn-file-select {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 50px;
}

.btn-file-select:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-file-select .file-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.btn-file-select .file-name {
    flex: 1;
    text-align: left;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-file-select .file-action {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 12px;
}

.security-notice {
    margin-top: 20px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.security-notice small {
    color: #333 !important;
    font-size: 13px;
    line-height: 1.4;
}

.no-files-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content.extra-large {
        width: 95%;
        max-width: none;
    }

    .lesson-overview-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .btn-file-select .file-name {
        font-size: 14px;
    }
}

/* FILE REMOVAL INTERFACE FOR LESSON EDITING */
.current-files-list {
    margin: 10px 0 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.file-item-removable {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    background: white;
    margin-bottom: 1px;
}

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

.file-item-removable .file-name {
    flex: 1;
    font-weight: 500;
    color: #333;
    word-break: break-word;
    margin-right: 10px;
}

.btn-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.btn-remove-file:hover {
    background: #c82333;
}

.no-files {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
}

/* ===== DISCOUNT CODE INPUT FIX ===== */
/* Override anti-copy protection for discount code input */
.discount-code-section,
.discount-code-section *,
.discount-code-input-group,
.discount-code-input-group * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    pointer-events: auto !important;
    -webkit-touch-callout: default !important;
}

.discount-code-input {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    pointer-events: auto !important;
    cursor: text !important;
    -webkit-touch-callout: default !important;
    -webkit-user-modify: read-write-plaintext-only !important;
}

.discount-code-input:focus {
    outline: 2px solid var(--primary-purple) !important;
    border-color: var(--primary-purple) !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text !important;
}

/* Ensure the discount section is fully interactive */
.discount-code-section .content-card {
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
}

/* ===== SECURE CONTENT VIEWER PROTECTION ===== */
/* Block any "open in new window" or popup buttons in iframes */
iframe[sandbox] {
    /* Additional security - block navigation attempts */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Hide any potential "open in new window" buttons that might appear */
iframe[sandbox]::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: transparent;
    z-index: 1000;
    pointer-events: none;
}

/* Block external navigation in lesson viewer */
#lesson-viewer-container iframe,
#pdf-viewer iframe {
    -webkit-user-select: none !important;
    user-select: none !important;
    /* Prevent any attempts to open new windows */
    sandbox: allow-scripts allow-same-origin allow-forms !important;
}
