/* ============================================================
   E-Learning LMS — User Side Design System
   Modern, production-ready UI/UX
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Legacy aliases */
    --primary-color: var(--primary);
    --secondary-color: var(--secondary);
    --success-color: var(--success);
    --danger-color: var(--danger);
    --warning-color: var(--warning);
    --dark-color: var(--gray-800);
    --light-bg: var(--gray-50);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--gray-50);
    color: var(--gray-800);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.main-content, .user-content {
    flex: 1;
    padding: 0 0 3rem;
}

.container-narrow { max-width: 960px; margin: 0 auto; }

/* ============================================================
   NAVBAR — Public & User
   ============================================================ */
.site-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow var(--transition);
}

.site-navbar.scrolled { box-shadow: var(--shadow); }

.site-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--gray-900) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-navbar .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.site-navbar .nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.site-navbar .nav-link .badge {
    font-size: 0.65rem;
    padding: 0.2em 0.5em;
}

.site-navbar .btn-nav-primary {
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius-sm);
    padding: 0.45rem 1.1rem !important;
    font-weight: 600;
}

.site-navbar .btn-nav-primary:hover {
    background: var(--primary-dark);
    color: #fff !important;
}

.site-navbar .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.site-navbar .dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.site-navbar .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.site-navbar .dropdown-item:hover { background: var(--gray-100); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
}

.site-footer h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.site-footer a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition);
    font-size: 0.9rem;
}

.site-footer a:hover { color: #fff; }

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.site-footer .footer-links li { margin-bottom: 0.6rem; }

.site-footer .footer-bottom {
    border-top: 1px solid var(--gray-700);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.user-footer {
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, var(--primary) 40%, var(--secondary) 100%);
    color: #fff;
    padding: 5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section .container { position: relative; z-index: 1; }

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 560px;
    margin: 0 auto 2rem;
}

.hero-section .btn-light {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-section .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.5);
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
}

.hero-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page-section {
    padding: 3rem 0;
}

.page-section--gray { background: var(--gray-100); }

.ui-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ui-page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    margin: 0;
}

.ui-page-subtitle {
    color: var(--gray-500);
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
}

.ui-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ui-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.ui-section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.ui-section-link:hover { color: var(--primary-dark); }

.ui-breadcrumb { margin-bottom: 1.25rem; }

.ui-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.ui-breadcrumb .breadcrumb-item a {
    color: var(--gray-500);
    text-decoration: none;
}

.ui-breadcrumb .breadcrumb-item a:hover { color: var(--primary); }

.ui-breadcrumb .breadcrumb-item.active { color: var(--gray-700); font-weight: 500; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.ui-stat-card,
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.35rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}

.ui-stat-card:hover,
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.ui-stat-card__icon,
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.ui-stat-card--primary .ui-stat-card__icon,
.stat-card .stat-icon { background: var(--primary-light); color: var(--primary); }

.ui-stat-card--success .ui-stat-card__icon { background: var(--success-light); color: var(--success); }
.ui-stat-card--warning .ui-stat-card__icon { background: var(--warning-light); color: var(--warning); }
.ui-stat-card--danger .ui-stat-card__icon { background: var(--danger-light); color: var(--danger); }

.ui-stat-card__value,
.stat-card h3 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin: 0;
}

.ui-stat-card__label,
.stat-card p {
    font-size: 0.825rem;
    color: var(--gray-500);
    margin: 0;
    font-weight: 500;
}

/* ============================================================
   CARDS
   ============================================================ */
.ui-card,
.dashboard-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ui-card__header,
.dashboard-card .card-header {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.ui-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.ui-card__body { padding: 1.35rem; }

.course-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.course-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.course-thumbnail-placeholder {
    width: 100%;
    height: 190px;
    background: linear-gradient(135deg, var(--primary-light), #ede9fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
}

.course-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card h5 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.course-card .price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.category-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    color: inherit;
}

.category-card .cat-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin: 0 auto 1rem;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    height: 100%;
    transition: box-shadow var(--transition);
}

.feature-card:hover { box-shadow: var(--shadow); }

.feature-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.feature-card__icon--primary { background: var(--primary-light); color: var(--primary); }
.feature-card__icon--success { background: var(--success-light); color: var(--success); }
.feature-card__icon--warning { background: var(--warning-light); color: var(--warning); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.15rem;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.ui-btn { border-radius: var(--radius-sm); font-weight: 600; }

.btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
    position: relative;
}

.btn.is-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORMS
   ============================================================ */
.ui-form-group { margin-bottom: 1.15rem; }

.ui-label,
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.ui-input,
.form-control,
.form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.925rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.ui-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ui-field-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

.ui-password-field { position: relative; }

.ui-password-field .ui-input,
.ui-password-field .form-control {
    padding-right: 2.75rem;
    width: 100%;
}

.ui-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.ui-password-toggle:hover { color: var(--gray-600); }

.ui-filter-bar,
.filter-bar {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.15rem 1.35rem;
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   TABLES
   ============================================================ */
.ui-table-wrap {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.ui-table-wrap .table {
    margin: 0;
    font-size: 0.9rem;
}

.ui-table-wrap .table thead th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.ui-table-wrap .table tbody td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-color: var(--gray-100);
}

.ui-table-wrap .table tbody tr:hover { background: var(--gray-50); }

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.ui-badge,
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.75em;
    border-radius: 999px;
}

.ui-badge--success, .badge-success, .badge.bg-success { background: var(--success-light) !important; color: #047857 !important; }
.ui-badge--warning, .badge-warning { background: var(--warning-light) !important; color: #b45309 !important; }
.ui-badge--danger, .badge-danger { background: var(--danger-light) !important; color: #b91c1c !important; }
.ui-badge--info, .badge-info { background: var(--info-light) !important; color: #1d4ed8 !important; }
.ui-badge--default { background: var(--gray-100); color: var(--gray-600); }

.badge-beginner { background: var(--success-light) !important; color: #047857 !important; }
.badge-intermediate { background: var(--warning-light) !important; color: #b45309 !important; }
.badge-advanced { background: var(--danger-light) !important; color: #b91c1c !important; }

.stars { color: #fbbf24; letter-spacing: 1px; }

/* ============================================================
   PROGRESS
   ============================================================ */
.ui-progress { margin-bottom: 0.5rem; }

.ui-progress__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}

.ui-progress__track,
.progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
}

.ui-progress__bar,
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 999px;
    transition: width 0.5s ease;
}

.progress-bar-custom { height: 8px; border-radius: 999px; }

/* ============================================================
   LEARNING PAGE
   ============================================================ */
.lesson-sidebar {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.lesson-sidebar .chapter-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    padding: 0.85rem 1rem 0.5rem;
}

.lesson-sidebar .lesson-item {
    display: block;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition);
}

.lesson-sidebar .lesson-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.lesson-sidebar .lesson-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.lesson-sidebar .lesson-item.completed { color: var(--success); }

.lesson-content-area {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.lesson-video-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-900);
    margin-bottom: 1.5rem;
}

.lesson-video-wrap video { width: 100%; display: block; }

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-question {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 1.35rem;
    margin-bottom: 1rem;
}

.quiz-option {
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.quiz-option input[type="radio"] { margin: 0; accent-color: var(--primary); }

.quiz-result-card {
    text-align: center;
    padding: 2.5rem;
}

.quiz-result-card.passed { border-top: 4px solid var(--success); }
.quiz-result-card.failed { border-top: 4px solid var(--danger); }

/* ============================================================
   PAYMENT
   ============================================================ */
.payment-method-card {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.15rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    height: 100%;
}

.payment-method-card:hover,
.payment-method-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.payment-summary {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
}

/* ============================================================
   REVIEWS & NOTIFICATIONS
   ============================================================ */
.review-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    margin-bottom: 0.85rem;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
}

.notification-item {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
}

.notification-item:last-child { border-bottom: none; }

.notification-item.unread {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.ui-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
}

.ui-empty-state__icon {
    width: 72px;
    height: 72px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--gray-400);
}

.ui-empty-state__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.ui-empty-state__message {
    color: var(--gray-500);
    max-width: 360px;
    margin: 0 auto 1.5rem;
    font-size: 0.925rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success { background: var(--success-light); color: #047857; }
.alert-danger { background: var(--danger-light); color: #b91c1c; }
.alert-warning { background: var(--warning-light); color: #b45309; }
.alert-info { background: var(--info-light); color: #1d4ed8; }

.ui-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: var(--gray-50);
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-layout__brand {
    background: linear-gradient(135deg, #1e40af, var(--primary) 50%, var(--secondary));
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-layout__brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-layout__logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

.auth-layout__logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-layout__hero { position: relative; z-index: 1; }

.auth-layout__hero h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.auth-layout__hero p { opacity: 0.9; font-size: 1.05rem; margin-bottom: 2rem; }

.auth-layout__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-layout__features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.auth-layout__form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.auth-card__header { margin-bottom: 1.75rem; }

.auth-card__header h1,
.auth-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.35rem;
}

.auth-card__header p { color: var(--gray-500); margin: 0; font-size: 0.925rem; }

.auth-card__footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 0.9rem;
}

.auth-card__footer a { color: var(--primary); font-weight: 600; text-decoration: none; }

.auth-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-step {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 999px;
}

.auth-step.active { background: var(--primary); }
.auth-step.done { background: var(--success); }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-sidebar {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    text-align: center;
}

.profile-sidebar__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin-bottom: 1rem;
}

.profile-sidebar__avatar--placeholder {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--gray-400);
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-light);
}

.profile-tabs .nav-link {
    color: var(--gray-600);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
}

.profile-tabs .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

/* ============================================================
   CERTIFICATE & RECEIPT
   ============================================================ */
.certificate-container {
    background: #fff;
    border: 3px solid #d4af37;
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.certificate-container .cert-title {
    font-size: 2.25rem;
    color: var(--gray-900);
    font-family: Georgia, serif;
    margin-bottom: 1rem;
}

.certificate-container .cert-border {
    border-top: 2px solid #d4af37;
    border-bottom: 2px solid #d4af37;
    padding: 2rem 0;
    margin: 1rem 0;
}

.certificate-container .student-name {
    font-size: 1.85rem;
    color: var(--primary);
    font-weight: 800;
}

.receipt-page {
    max-width: 720px;
    margin: 2rem auto;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ui-pagination .pagination { gap: 0.25rem; }

.ui-pagination .page-link {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.45rem 0.85rem;
}

.ui-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

.modal-header { border-bottom: 1px solid var(--gray-200); }

.modal-footer { border-top: 1px solid var(--gray-200); }

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   MISC LEGACY
   ============================================================ */
.dashboard-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-icon-primary { background: var(--primary-light); color: var(--primary); }
.bg-icon-success { background: var(--success-light); color: var(--success); }
.bg-icon-warning { background: var(--warning-light); color: var(--warning); }
.bg-icon-danger { background: var(--danger-light); color: var(--danger); }

.content-page { padding: 2rem 0; }

.detail-hero {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.detail-sidebar {
    position: sticky;
    top: 90px;
}

.enroll-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.enroll-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-layout__brand { display: none; }
    .auth-layout__form { padding: 1.5rem; min-height: 100vh; }
}

@media (max-width: 768px) {
    .hero-section { padding: 3.5rem 0 4rem; }
    .ui-page-header { flex-direction: column; }
    .detail-sidebar { position: static; margin-top: 1.5rem; }
    .lesson-content-area { padding: 1.25rem; }
}

@media print {
    .no-print, .site-navbar, .site-footer, .user-footer { display: none !important; }
    .certificate-container { border: 3px solid #000; }
    body { background: #fff; }
}
