/* ============================================================
   Proten LMS — Main Frontend Stylesheet
   Brand: Primary #FFD53F | Secondary #167DC0 | Accent #DC2626
          Dark #09324D | Light #FFFFFF
   Design: Minimal, clean, mobile-first
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

/*
 * TGS Perfect (brand display/heading font) is not available on any
 * public font CDN (Google Fonts, Adobe Fonts, etc.) — it's distributed
 * as a personal/commercial-licensed font through third-party foundries
 * (MyFonts, AZFonts and similar), designed by Danny Aldana. To actually
 * use it here, get a properly licensed copy of the font files and drop
 * them into assets/fonts/, then uncomment this @font-face block:
 *
 * @font-face {
 *   font-family: 'TGS Perfect';
 *   src: url('../fonts/TGSPerfect-Bold.woff2') format('woff2'),
 *        url('../fonts/TGSPerfect-Bold.woff')  format('woff');
 *   font-weight: 700;
 *   font-display: swap;
 * }
 *
 * Until then, --proten-font-display falls back to Oswald (a free,
 * Google-Fonts-hosted condensed sans with a similar bold/tight-tracking
 * feel) so headings still get the right general look.
 */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap');

/* ── RESET / BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.proten-wrap {
    font-family: var(--proten-font);
    color: var(--proten-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.proten-wrap h1, .proten-wrap h2, .proten-wrap h3,
.proten-heading, .proten-display {
    font-family: var(--proten-font-display);
    letter-spacing: .2px;
}

/* ── UTILITIES ───────────────────────────────────────────────── */
.proten-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.proten-grid { display: grid; gap: 24px; }
.proten-grid-3 { grid-template-columns: repeat(3, 1fr); }
.proten-grid-4 { grid-template-columns: repeat(4, 1fr); }
.proten-flex   { display: flex; }
.proten-gap    { gap: 16px; }
.proten-align-center { align-items: center; }
.proten-justify-between { justify-content: space-between; }
.proten-text-center  { text-align: center; }
.proten-mt-1 { margin-top: 8px; }
.proten-mt-2 { margin-top: 16px; }
.proten-mt-3 { margin-top: 24px; }
.proten-mt-4 { margin-top: 32px; }
.proten-mb-2 { margin-bottom: 16px; }
.proten-mb-4 { margin-bottom: 32px; }
.proten-hidden { display: none !important; }

/* ── BADGES / TAGS ───────────────────────────────────────────── */
.proten-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.proten-badge-primary   { background: var(--proten-primary); color: var(--proten-dark); }
.proten-badge-secondary { background: var(--proten-secondary); color: var(--proten-dark); }
.proten-badge-accent    { background: var(--proten-accent); color: #fff; }
.proten-badge-dark      { background: var(--proten-dark); color: #fff; }
.proten-badge-free      { background: var(--proten-secondary); color: var(--proten-dark); }
.proten-badge-paid      { background: var(--proten-accent); color: #fff; }
.proten-badge-new       { background: var(--proten-primary); color: var(--proten-dark); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.proten-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--proten-radius-sm);
    font-family: var(--proten-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: var(--proten-transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.proten-btn:focus-visible { outline: 3px solid var(--proten-primary); outline-offset: 2px; }
.proten-btn-sm  { padding: 8px 16px; font-size: 13px; }
.proten-btn-lg  { padding: 16px 32px; font-size: 16px; }
.proten-btn-full{ width: 100%; }

.proten-btn-primary {
    background: var(--proten-primary);
    color: var(--proten-dark);
    border-color: var(--proten-primary);
}
.proten-btn-primary:hover {
    background: var(--proten-primary-dark);
    border-color: var(--proten-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,213,63, .35);
}

.proten-btn-secondary {
    background: var(--proten-secondary);
    color: var(--proten-dark);
    border-color: var(--proten-secondary);
}
.proten-btn-secondary:hover {
    background: var(--proten-secondary-dark);
    border-color: var(--proten-secondary-dark);
    transform: translateY(-1px);
}

.proten-btn-accent {
    background: var(--proten-accent);
    color: #fff;
    border-color: var(--proten-accent);
}
.proten-btn-accent:hover {
    background: var(--proten-accent-dark);
    border-color: var(--proten-accent-dark);
    transform: translateY(-1px);
}

.proten-btn-outline {
    background: transparent;
    color: var(--proten-dark);
    border-color: var(--proten-gray-300);
}
.proten-btn-outline:hover {
    border-color: var(--proten-dark);
    background: var(--proten-dark);
    color: #fff;
}

.proten-btn-ghost {
    background: transparent;
    color: var(--proten-dark);
    border-color: transparent;
}
.proten-btn-ghost:hover { background: var(--proten-gray-100); }

.proten-btn[disabled],
.proten-btn.loading {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}
.proten-btn.loading::after {
    content: '';
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: proten-spin .6s linear infinite;
    margin-left: 6px;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.proten-card {
    background: var(--proten-light);
    border-radius: var(--proten-radius);
    box-shadow: var(--proten-shadow);
    overflow: hidden;
    transition: var(--proten-transition);
    border: 1px solid var(--proten-gray-200);
}
.proten-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--proten-shadow-lg);
}
.proten-card-body { padding: 20px; }
.proten-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--proten-gray-200);
    background: var(--proten-gray-100);
}

/* ── COURSE CARD ─────────────────────────────────────────────── */
.proten-course-card {
    background: #fff;
    border-radius: var(--proten-radius);
    overflow: hidden;
    box-shadow: var(--proten-shadow);
    border: 1px solid var(--proten-gray-200);
    transition: var(--proten-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.proten-course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,.12);
    border-color: var(--proten-primary);
}
.proten-course-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--proten-gray-200);
}
.proten-course-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.proten-course-card:hover .proten-course-thumb img { transform: scale(1.05); }

.proten-course-thumb-badges {
    position: absolute;
    top: 12px; left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.proten-course-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    opacity: 0;
    transition: var(--proten-transition);
}
.proten-course-card:hover .proten-course-thumb-play { opacity: 1; }
.proten-course-thumb-play svg { width: 48px; height: 48px; fill: #fff; }

.proten-course-info { padding: 16px 20px 0; flex: 1; display: flex; flex-direction: column; }
.proten-course-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--proten-secondary-dark);
    margin-bottom: 6px;
}
.proten-course-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--proten-dark);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.proten-course-instructor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--proten-gray-700);
    margin-bottom: 12px;
}
.proten-course-instructor img {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.proten-course-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
}
.proten-stars { display: flex; gap: 2px; }
.proten-star { color: #FFB800; font-size: 14px; }
.proten-star.empty { color: var(--proten-gray-300); }
.proten-rating-score { font-weight: 700; font-size: 13px; color: var(--proten-dark); }
.proten-rating-count { font-size: 12px; color: var(--proten-gray-500); }

.proten-course-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--proten-gray-700);
    margin-bottom: 0;
    flex-wrap: wrap;
}
.proten-course-meta-item { display: flex; align-items: center; gap: 4px; }

.proten-course-footer {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--proten-gray-200);
    margin-top: auto;
    gap: 12px;
}
.proten-course-price { display: flex; align-items: baseline; gap: 6px; }
.proten-price-current { font-size: 20px; font-weight: 800; color: var(--proten-dark); }
.proten-price-original { font-size: 13px; color: var(--proten-gray-500); text-decoration: line-through; }
.proten-price-free { font-size: 20px; font-weight: 800; color: var(--proten-secondary-dark); }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.proten-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--proten-gray-200);
    border-radius: 999px;
    overflow: hidden;
}
.proten-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--proten-primary) 0%, var(--proten-secondary) 100%);
    border-radius: 999px;
    transition: width .6s cubic-bezier(.4,0,.2,1);
}
.proten-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--proten-gray-700);
    margin-top: 4px;
}

/* ── COURSE GRID / LISTING PAGE ──────────────────────────────── */
.proten-courses-section { padding: 40px 0; }
.proten-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}
.proten-section-title { font-size: 28px; font-weight: 800; color: var(--proten-dark); }
.proten-section-sub   { font-size: 15px; color: var(--proten-gray-700); margin-top: 4px; }

/* Filters */
.proten-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--proten-gray-100);
    border-radius: var(--proten-radius);
    border: 1px solid var(--proten-gray-200);
}
.proten-filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.proten-filter-search input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--proten-gray-300);
    border-radius: var(--proten-radius-sm);
    font-family: var(--proten-font);
    font-size: 14px;
    transition: var(--proten-transition);
    background: #fff;
}
.proten-filter-search input:focus { outline: none; border-color: var(--proten-primary); box-shadow: 0 0 0 3px rgba(255,213,63,.2); }
.proten-filter-search::after {
    content: '🔍';
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

.proten-filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--proten-gray-300);
    border-radius: var(--proten-radius-sm);
    font-family: var(--proten-font);
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2309324D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    transition: var(--proten-transition);
}
.proten-filter-select:focus { outline: none; border-color: var(--proten-primary); }

/* Category tabs */
.proten-category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    margin-bottom: 28px;
}
.proten-category-tabs::-webkit-scrollbar { display: none; }
.proten-category-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid var(--proten-gray-300);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--proten-transition);
    font-family: var(--proten-font);
}
.proten-category-tab:hover,
.proten-category-tab.active {
    background: var(--proten-primary);
    border-color: var(--proten-primary);
    color: var(--proten-dark);
}

/* ── COURSE SINGLE PAGE ──────────────────────────────────────── */
.proten-course-single { padding: 0 0 60px; }
.proten-course-hero {
    background: var(--proten-dark);
    color: #fff;
    padding: 48px 0;
}
.proten-course-hero-inner {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}
.proten-course-hero-breadcrumb { font-size: 13px; opacity: .7; margin-bottom: 12px; }
.proten-course-hero-breadcrumb a { color: var(--proten-primary); text-decoration: none; }
.proten-course-hero h1 { font-size: 32px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.proten-course-hero-desc { font-size: 16px; opacity: .85; line-height: 1.7; margin-bottom: 20px; }
.proten-course-hero-meta { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 14px; opacity: .8; }

/* Sticky sidebar */
.proten-course-sidebar {
    position: sticky;
    top: 20px;
    background: #fff;
    border-radius: var(--proten-radius);
    box-shadow: var(--proten-shadow-lg);
    overflow: hidden;
    border: 1px solid var(--proten-gray-200);
}
.proten-course-sidebar-preview { aspect-ratio: 16/9; overflow: hidden; position: relative; background: #000; }
.proten-course-sidebar-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.proten-course-sidebar-preview-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.proten-play-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: var(--proten-transition);
}
.proten-play-icon:hover { transform: scale(1.1); }
.proten-play-icon svg { width: 24px; height: 24px; margin-left: 3px; }

.proten-course-sidebar-body { padding: 20px; }
.proten-sidebar-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.proten-sidebar-price-current { font-size: 28px; font-weight: 800; color: var(--proten-dark); }
.proten-sidebar-price-original { font-size: 16px; color: var(--proten-gray-500); text-decoration: line-through; }
.proten-sidebar-price-free { font-size: 28px; font-weight: 800; color: var(--proten-secondary-dark); }
.proten-sidebar-discount {
    font-size: 13px; font-weight: 700;
    background: var(--proten-accent); color: #fff;
    padding: 3px 10px; border-radius: 4px;
}

.proten-sidebar-includes { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--proten-gray-200); }
.proten-sidebar-includes h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 12px; }
.proten-sidebar-include-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--proten-gray-700); margin-bottom: 8px; }
.proten-sidebar-include-item svg { width: 16px; height: 16px; color: var(--proten-secondary-dark); flex-shrink: 0; }

/* Course body */
.proten-course-body { padding: 40px 0; }
.proten-course-body-inner { display: grid; grid-template-columns: 1fr 380px; gap: 40px; }
.proten-course-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--proten-gray-200); margin-bottom: 28px; overflow-x: auto; }
.proten-course-tab {
    padding: 12px 24px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--proten-transition);
    font-family: var(--proten-font);
    background: none; border-top: none; border-left: none; border-right: none;
}
.proten-course-tab.active { border-bottom-color: var(--proten-primary); color: var(--proten-dark); }
.proten-course-tab:hover  { color: var(--proten-dark); }
.proten-tab-pane { display: none; }
.proten-tab-pane.active { display: block; }

/* Curriculum */
.proten-curriculum-section { margin-bottom: 12px; }
.proten-section-header-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: var(--proten-gray-100);
    border: 1px solid var(--proten-gray-200);
    border-radius: var(--proten-radius-sm);
    cursor: pointer;
    transition: var(--proten-transition);
    font-weight: 700; font-size: 14px;
}
.proten-section-header-bar:hover { background: var(--proten-primary-light); }
.proten-section-items { border: 1px solid var(--proten-gray-200); border-top: none; border-radius: 0 0 var(--proten-radius-sm) var(--proten-radius-sm); }
.proten-curriculum-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    font-size: 14px; color: var(--proten-gray-700);
    border-bottom: 1px solid var(--proten-gray-200);
    transition: var(--proten-transition);
    text-decoration: none;
}
.proten-curriculum-item:last-child { border-bottom: none; }
.proten-curriculum-item:hover { background: var(--proten-primary-light); color: var(--proten-dark); }
.proten-curriculum-item.completed { color: var(--proten-secondary-dark); }
.proten-curriculum-item.locked { opacity: .5; cursor: default; }
.proten-curriculum-item-icon { width: 20px; height: 20px; flex-shrink: 0; }
.proten-curriculum-item-title { flex: 1; }
.proten-curriculum-item-meta { font-size: 12px; color: var(--proten-gray-500); }

/* ── LESSON PAGE ─────────────────────────────────────────────── */
.proten-lesson-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 100vh;
}
.proten-lesson-sidebar {
    background: var(--proten-dark);
    color: #fff;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}
.proten-lesson-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.proten-lesson-sidebar-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.proten-lesson-progress-bar { height: 4px; background: rgba(255,255,255,.2); border-radius: 999px; }
.proten-lesson-progress-fill { height: 100%; background: var(--proten-primary); border-radius: 999px; transition: width .5s ease; }

.proten-lesson-nav-section { padding: 12px 0; }
.proten-lesson-nav-section-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    color: rgba(255,255,255,.5);
    padding: 8px 20px 4px;
}
.proten-lesson-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    font-size: 13px; color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: var(--proten-transition);
}
.proten-lesson-nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.proten-lesson-nav-item.active { background: var(--proten-primary); color: var(--proten-dark); }
.proten-lesson-nav-item.completed .proten-check { color: var(--proten-secondary); }

.proten-lesson-main { padding: 32px 40px; max-width: 860px; }
.proten-lesson-topbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 16px;
}
.proten-lesson-title { font-size: 26px; font-weight: 800; }
.proten-lesson-video { aspect-ratio: 16/9; background: #000; border-radius: var(--proten-radius); overflow: hidden; margin-bottom: 28px; }
.proten-lesson-video iframe, .proten-lesson-video video { width: 100%; height: 100%; border: none; }
.proten-lesson-content { font-size: 16px; line-height: 1.8; color: var(--proten-gray-700); }
.proten-lesson-content h2, .proten-lesson-content h3 { color: var(--proten-dark); margin: 24px 0 12px; }
.proten-lesson-content p { margin-bottom: 16px; }
.proten-lesson-complete-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 32px; padding: 16px 24px;
    background: var(--proten-gray-100);
    border-radius: var(--proten-radius);
    border: 1px solid var(--proten-gray-200);
}

/* ── STUDENT DASHBOARD ───────────────────────────────────────── */
.proten-dashboard { padding: 32px 0; }
.proten-dashboard-header {
    background: linear-gradient(135deg, var(--proten-dark) 0%, #2c2a2a 100%);
    padding: 40px;
    border-radius: var(--proten-radius-lg);
    color: #fff;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.proten-dashboard-header::before {
    content: '';
    position: absolute; top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: var(--proten-primary);
    border-radius: 50%; opacity: .1;
}
.proten-dashboard-greeting { font-size: 13px; opacity: .7; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.proten-dashboard-name { font-size: 28px; font-weight: 800; margin-bottom: 20px; }
.proten-dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.proten-stat-card {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--proten-radius);
    padding: 16px;
    backdrop-filter: blur(4px);
}
.proten-stat-value { font-size: 28px; font-weight: 800; color: var(--proten-primary); }
.proten-stat-label { font-size: 12px; opacity: .7; margin-top: 2px; }

/* XP / Level bar */
.proten-xp-bar-wrap { margin-top: 20px; }
.proten-xp-label { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; margin-bottom: 6px; }
.proten-xp-bar { height: 8px; background: rgba(255,255,255,.15); border-radius: 999px; overflow: hidden; }
.proten-xp-fill { height: 100%; background: linear-gradient(90deg, var(--proten-primary), var(--proten-secondary)); border-radius: 999px; }

.proten-dashboard-content { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.proten-dashboard-nav {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-bottom: 24px;
    background: var(--proten-gray-100);
    padding: 4px; border-radius: var(--proten-radius-sm);
    border: 1px solid var(--proten-gray-200);
}
.proten-dashboard-nav-item {
    padding: 8px 16px; border-radius: 6px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: var(--proten-transition);
    font-family: var(--proten-font);
    background: none; border: none; color: var(--proten-gray-700);
}
.proten-dashboard-nav-item.active { background: #fff; color: var(--proten-dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* My course row */
.proten-my-course {
    display: grid; grid-template-columns: 120px 1fr auto;
    gap: 16px; align-items: center;
    padding: 16px; border-radius: var(--proten-radius);
    border: 1px solid var(--proten-gray-200);
    margin-bottom: 12px;
    transition: var(--proten-transition);
    background: #fff;
    text-decoration: none; color: inherit;
}
.proten-my-course:hover { border-color: var(--proten-primary); box-shadow: var(--proten-shadow); }
.proten-my-course-thumb { aspect-ratio: 16/9; border-radius: var(--proten-radius-sm); overflow: hidden; background: var(--proten-gray-200); }
.proten-my-course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proten-my-course-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.proten-my-course-instructor { font-size: 12px; color: var(--proten-gray-700); margin-bottom: 8px; }

/* ── GAMIFICATION WIDGETS ────────────────────────────────────── */
.proten-gamification-panel { display: flex; flex-direction: column; gap: 20px; }

.proten-streak-widget {
    background: linear-gradient(135deg, var(--proten-accent) 0%, #c0392b 100%);
    color: #fff; border-radius: var(--proten-radius); padding: 20px;
    text-align: center;
}
.proten-streak-icon { font-size: 40px; margin-bottom: 4px; }
.proten-streak-count { font-size: 40px; font-weight: 800; line-height: 1; }
.proten-streak-label { font-size: 12px; opacity: .8; margin-top: 4px; }

.proten-level-widget {
    background: linear-gradient(135deg, var(--proten-primary) 0%, var(--proten-secondary) 100%);
    color: var(--proten-dark); border-radius: var(--proten-radius); padding: 20px;
}
.proten-level-display { display: flex; align-items: center; gap: 16px; }
.proten-level-circle {
    width: 60px; height: 60px;
    background: var(--proten-dark); color: var(--proten-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; flex-shrink: 0;
}
.proten-level-info h4 { font-size: 16px; font-weight: 800; }
.proten-level-info span { font-size: 13px; opacity: .7; }

.proten-badges-widget { background: #fff; border: 1px solid var(--proten-gray-200); border-radius: var(--proten-radius); padding: 20px; }
.proten-badges-widget h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.proten-badges-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.proten-badge-item { text-align: center; }
.proten-badge-item .badge-icon {
    font-size: 28px; display: block;
    background: var(--proten-gray-100); border-radius: var(--proten-radius-sm);
    padding: 10px; margin-bottom: 4px;
}
.proten-badge-item .badge-icon.earned { background: var(--proten-primary-light); }
.proten-badge-item .badge-name { font-size: 10px; font-weight: 600; color: var(--proten-gray-700); }
.proten-badge-item.locked .badge-icon { opacity: .3; filter: grayscale(1); }

.proten-leaderboard-widget { background: #fff; border: 1px solid var(--proten-gray-200); border-radius: var(--proten-radius); padding: 20px; }
.proten-leaderboard-widget h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.proten-leaderboard-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--proten-gray-200);
    font-size: 13px;
}
.proten-leaderboard-row:last-child { border-bottom: none; }
.proten-leaderboard-rank { width: 24px; font-weight: 800; color: var(--proten-gray-500); }
.proten-leaderboard-rank.gold   { color: #FFB800; }
.proten-leaderboard-rank.silver { color: #9EA0A3; }
.proten-leaderboard-rank.bronze { color: #CD7F32; }
.proten-leaderboard-avatar img  { width: 28px; height: 28px; border-radius: 50%; }
.proten-leaderboard-name { flex: 1; font-weight: 600; }
.proten-leaderboard-xp  { font-weight: 700; color: var(--proten-secondary-dark); font-size: 12px; }

/* ── QUIZ INTERFACE ──────────────────────────────────────────── */
.proten-quiz-wrap { max-width: 720px; margin: 0 auto; padding: 32px 0; }
.proten-quiz-header { margin-bottom: 28px; }
.proten-quiz-title  { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.proten-quiz-meta   { display: flex; gap: 20px; font-size: 14px; color: var(--proten-gray-700); }
.proten-quiz-question {
    background: #fff; border: 1px solid var(--proten-gray-200);
    border-radius: var(--proten-radius); padding: 24px; margin-bottom: 16px;
}
.proten-question-number { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--proten-secondary-dark); margin-bottom: 8px; }
.proten-question-text   { font-size: 17px; font-weight: 700; margin-bottom: 20px; line-height: 1.5; }
.proten-question-options { display: flex; flex-direction: column; gap: 10px; }
.proten-option-label {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--proten-gray-300);
    border-radius: var(--proten-radius-sm);
    cursor: pointer; transition: var(--proten-transition);
    font-size: 14px;
}
.proten-option-label:hover { border-color: var(--proten-primary); background: var(--proten-primary-light); }
.proten-option-label input[type=radio],
.proten-option-label input[type=checkbox] { display: none; }
.proten-option-label.selected { border-color: var(--proten-primary); background: var(--proten-primary-light); font-weight: 600; }
.proten-option-label.correct  { border-color: var(--proten-secondary); background: rgba(22,125,192, .15); color: var(--proten-secondary-dark); }
.proten-option-label.wrong    { border-color: var(--proten-accent); background: rgba(220,38,38,.08); color: var(--proten-accent); }
.proten-option-key {
    width: 28px; height: 28px; flex-shrink: 0;
    border: 2px solid currentColor; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.proten-quiz-result {
    text-align: center; padding: 40px;
    background: #fff; border-radius: var(--proten-radius-lg);
    border: 1px solid var(--proten-gray-200);
    box-shadow: var(--proten-shadow-lg);
}
.proten-quiz-score { font-size: 64px; font-weight: 900; margin: 16px 0; }
.proten-quiz-score.passed { color: var(--proten-secondary-dark); }
.proten-quiz-score.failed { color: var(--proten-accent); }

/* ── FORUM ───────────────────────────────────────────────────── */
.proten-forum-thread { margin-bottom: 16px; }
.proten-forum-post {
    display: grid; grid-template-columns: 44px 1fr;
    gap: 14px; padding: 16px;
    background: #fff; border: 1px solid var(--proten-gray-200); border-radius: var(--proten-radius);
    margin-bottom: 2px;
}
.proten-forum-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.proten-forum-author { font-weight: 700; font-size: 14px; }
.proten-forum-date   { font-size: 12px; color: var(--proten-gray-500); }
.proten-forum-content { font-size: 14px; line-height: 1.7; margin-top: 6px; color: var(--proten-gray-700); }
.proten-forum-reply  { background: var(--proten-gray-100); margin-left: 24px; }
.proten-forum-actions { display: flex; gap: 10px; margin-top: 10px; }
.proten-forum-vote { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--proten-gray-700); }
.proten-forum-vote:hover { color: var(--proten-primary); }
.proten-forum-composer { background: var(--proten-gray-100); border: 1px solid var(--proten-gray-200); border-radius: var(--proten-radius); padding: 20px; margin-top: 20px; }
.proten-forum-composer textarea {
    width: 100%; min-height: 100px; padding: 14px;
    border: 1px solid var(--proten-gray-300); border-radius: var(--proten-radius-sm);
    font-family: var(--proten-font); font-size: 14px;
    resize: vertical; transition: var(--proten-transition);
}
.proten-forum-composer textarea:focus { outline: none; border-color: var(--proten-primary); box-shadow: 0 0 0 3px rgba(255,213,63,.2); }

/* ── AI ASSISTANT WIDGET ─────────────────────────────────────── */
.proten-ai-widget {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
}
.proten-ai-toggle {
    width: 56px; height: 56px;
    background: var(--proten-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 4px 20px rgba(255,213,63,.4);
    font-size: 24px; transition: var(--proten-transition);
    border: none;
}
.proten-ai-toggle:hover { transform: scale(1.1); }
.proten-ai-panel {
    position: absolute; bottom: 68px; right: 0;
    width: 340px; background: #fff;
    border-radius: var(--proten-radius-lg);
    box-shadow: var(--proten-shadow-lg);
    border: 1px solid var(--proten-gray-200);
    overflow: hidden;
    display: none;
}
.proten-ai-panel.open { display: flex; flex-direction: column; }
.proten-ai-header {
    background: var(--proten-dark); color: #fff;
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: 14px;
}
.proten-ai-header span { display: flex; align-items: center; gap: 8px; }
.proten-ai-close { cursor: pointer; opacity: .7; font-size: 18px; background: none; border: none; color: #fff; }
.proten-ai-messages { height: 280px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.proten-ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.proten-ai-msg.user { background: var(--proten-primary); align-self: flex-end; color: var(--proten-dark); font-weight: 500; }
.proten-ai-msg.bot  { background: var(--proten-gray-100); align-self: flex-start; color: var(--proten-dark); }
.proten-ai-input { display: flex; padding: 12px; border-top: 1px solid var(--proten-gray-200); gap: 8px; }
.proten-ai-input input {
    flex: 1; padding: 10px 14px;
    border: 1px solid var(--proten-gray-300); border-radius: 999px;
    font-family: var(--proten-font); font-size: 13px;
}
.proten-ai-input input:focus { outline: none; border-color: var(--proten-primary); }
.proten-ai-send {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--proten-primary); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ── INSTRUCTOR DASHBOARD ────────────────────────────────────── */
.proten-instructor-dash { padding: 32px 0; }
.proten-instructor-header {
    background: linear-gradient(135deg, var(--proten-secondary-dark) 0%, var(--proten-secondary) 100%);
    padding: 36px 40px; border-radius: var(--proten-radius-lg);
    color: var(--proten-dark); margin-bottom: 32px;
}
.proten-instructor-header h2 { font-size: 26px; font-weight: 800; }
.proten-analytics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.proten-analytics-card {
    background: #fff; border: 1px solid var(--proten-gray-200);
    border-radius: var(--proten-radius); padding: 20px;
}
.proten-analytics-icon { font-size: 28px; margin-bottom: 10px; }
.proten-analytics-value { font-size: 28px; font-weight: 800; }
.proten-analytics-label { font-size: 12px; color: var(--proten-gray-700); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }

/* ── CERTIFICATE MODAL ───────────────────────────────────────── */
.proten-cert-wrap {
    max-width: 800px; margin: 40px auto;
    background: #fff; border-radius: var(--proten-radius-lg);
    box-shadow: var(--proten-shadow-lg); overflow: hidden;
}
.proten-cert-top  { background: var(--proten-dark); padding: 40px; text-align: center; position: relative; }
.proten-cert-top::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0;
    height: 32px;
    background: #fff;
    clip-path: ellipse(60% 100% at 50% 100%);
}
.proten-cert-logo { height: 50px; margin-bottom: 16px; }
.proten-cert-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: var(--proten-primary); }
.proten-cert-body { padding: 40px; text-align: center; }
.proten-cert-recipient-label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--proten-gray-500); }
.proten-cert-recipient { font-size: 36px; font-weight: 900; color: var(--proten-dark); margin: 8px 0; }
.proten-cert-course-label { font-size: 14px; color: var(--proten-gray-700); }
.proten-cert-course { font-size: 22px; font-weight: 800; color: var(--proten-dark); margin: 6px 0 24px; }
.proten-cert-divider {
    width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--proten-primary), var(--proten-secondary));
    border-radius: 999px; margin: 0 auto 24px;
}
.proten-cert-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; padding-top: 24px; border-top: 2px solid var(--proten-gray-200); }
.proten-cert-qr { width: 80px; height: 80px; }
.proten-cert-number { font-size: 11px; color: var(--proten-gray-500); font-family: monospace; }
.proten-cert-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────── */
.proten-toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 99999;
    display: flex; flex-direction: column; gap: 10px;
}
.proten-toast {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-radius: var(--proten-radius-sm);
    background: var(--proten-dark); color: #fff;
    box-shadow: var(--proten-shadow-lg); font-size: 14px; font-weight: 500;
    animation: proten-slide-in .3s ease;
    max-width: 320px;
}
.proten-toast-icon { font-size: 18px; flex-shrink: 0; }
.proten-toast.success { background: var(--proten-secondary-dark); color: #fff; }
.proten-toast.error   { background: var(--proten-accent); }
.proten-toast.info    { background: var(--proten-dark); }
.proten-toast.xp      { background: linear-gradient(135deg, var(--proten-primary), var(--proten-secondary)); color: var(--proten-dark); }

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.proten-form-group { margin-bottom: 20px; }
.proten-label {
    display: block; font-size: 13px; font-weight: 700;
    margin-bottom: 6px; color: var(--proten-dark);
}
.proten-input,
.proten-textarea,
.proten-select {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--proten-gray-300);
    border-radius: var(--proten-radius-sm);
    font-family: var(--proten-font); font-size: 14px; color: var(--proten-dark);
    background: #fff; transition: var(--proten-transition);
}
.proten-input:focus,
.proten-textarea:focus,
.proten-select:focus {
    outline: none; border-color: var(--proten-primary);
    box-shadow: 0 0 0 3px rgba(255,213,63,.2);
}
.proten-input.error { border-color: var(--proten-accent); }
.proten-form-error { font-size: 12px; color: var(--proten-accent); margin-top: 4px; }
.proten-textarea { min-height: 120px; resize: vertical; }

/* ── MODAL ───────────────────────────────────────────────────── */
.proten-modal-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(9,50,77,.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.proten-modal-overlay.open { display: flex; }
.proten-modal {
    background: #fff; border-radius: var(--proten-radius-lg);
    max-width: 560px; width: 100%; max-height: 90vh;
    overflow-y: auto; box-shadow: var(--proten-shadow-lg);
    animation: proten-modal-in .3s cubic-bezier(.4,0,.2,1);
}
.proten-modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--proten-gray-200);
    display: flex; align-items: center; justify-content: space-between;
}
.proten-modal-title { font-size: 18px; font-weight: 800; }
.proten-modal-close { cursor: pointer; font-size: 22px; background: none; border: none; opacity: .5; }
.proten-modal-close:hover { opacity: 1; }
.proten-modal-body { padding: 24px; }

/* ── STAR RATING INPUT ───────────────────────────────────────── */
.proten-star-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.proten-star-input input { display: none; }
.proten-star-input label {
    font-size: 28px; cursor: pointer; color: var(--proten-gray-300);
    transition: color .15s; line-height: 1;
}
.proten-star-input label:hover,
.proten-star-input label:hover ~ label,
.proten-star-input input:checked ~ label { color: #FFB800; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.proten-empty {
    text-align: center; padding: 60px 20px;
    color: var(--proten-gray-500);
}
.proten-empty-icon { font-size: 64px; display: block; margin-bottom: 16px; opacity: .5; }
.proten-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--proten-dark); }
.proten-empty p  { font-size: 14px; }

/* ── SKELETON LOADER ─────────────────────────────────────────── */
.proten-skeleton {
    background: linear-gradient(90deg, var(--proten-gray-200) 25%, var(--proten-gray-100) 50%, var(--proten-gray-200) 75%);
    background-size: 200% 100%;
    animation: proten-shimmer 1.4s infinite;
    border-radius: var(--proten-radius-sm);
}

/* ── LOCKED MESSAGE ──────────────────────────────────────────── */
.proten-locked-message {
    background: var(--proten-gray-100); border: 2px solid var(--proten-primary);
    border-radius: var(--proten-radius); padding: 28px; text-align: center; margin: 20px 0;
}
.proten-locked-message p { font-size: 16px; margin: 0; }
.proten-locked-message a { color: var(--proten-dark); font-weight: 700; text-decoration: underline; }

/* ── KEYFRAMES ───────────────────────────────────────────────── */
@keyframes proten-spin {
    to { transform: rotate(360deg); }
}
@keyframes proten-slide-in {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes proten-modal-in {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes proten-shimmer {
    to { background-position: -200% 0; }
}
@keyframes proten-bounce-in {
    0%   { transform: scale(.3);   opacity: 0; }
    50%  { transform: scale(1.05); opacity: 1; }
    80%  { transform: scale(.97); }
    100% { transform: scale(1); }
}
