:root {
  --v3-bg: #f4f7fb;
  --v3-surface: #ffffff;
  --v3-ink: #14243b;
  --v3-muted: #64748b;
  --v3-line: #dfe7f1;
  --v3-blue: #2563d9;
  --v3-blue-dark: #1649a5;
  --v3-blue-soft: #eaf1ff;
  --v3-cyan: #21b7c6;
  --v3-green: #16845b;
  --v3-yellow: #f5c451;
  --v3-shadow: 0 14px 40px rgba(28, 54, 92, .08);
}

body.lms-v3 { background: var(--v3-bg); color: var(--v3-ink); }
body.lms-v3 main { min-width: 0; }
body.lms-v3 .top-header { margin-bottom: 26px; }
body.lms-v3 .top-header h1 { color: var(--v3-ink); font-size: clamp(26px, 3vw, 38px); }
body.lms-v3 .mini-text { color: var(--v3-blue); }
body.lms-v3 .sub-text { color: var(--v3-muted); max-width: 720px; }
body.lms-v3 .profile-badge { background: var(--v3-blue-soft); color: var(--v3-blue); border-color: #fff; }
body.lms-v3 .section-head h3 { color: var(--v3-ink); }
body.lms-v3 .btnPrimary,
body.lms-v3 .primary-btn,
body.lms-v3 .btn-primary,
body.lms-v3 .btn-outline,
body.lms-v3 .edit-btn { background: var(--v3-blue); color: #fff; border-color: var(--v3-blue); box-shadow: none; }
body.lms-v3 .btnPrimary:hover,
body.lms-v3 .primary-btn:hover,
body.lms-v3 .btn-primary:hover { background: var(--v3-blue-dark); }

/* My courses */
body.page-my-courses .courses-app { max-width: 1180px; }
body.page-my-courses .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.page-my-courses .summary-card { text-align: left; padding: 20px; border-radius: 16px; box-shadow: none; }
body.page-my-courses .summary-card p { font-size: 12px; }
body.page-my-courses .summary-card h3 { font-size: 30px; color: var(--v3-blue); }
body.page-my-courses .courses-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
body.page-my-courses .course-card { position: relative; display: flex; flex-direction: column; min-height: 330px; overflow: hidden; padding: 0; border-radius: 20px; box-shadow: var(--v3-shadow); }
body.page-my-courses .course-card::before { content: ""; display: block; height: 112px; background: radial-gradient(circle at 82% 15%, #63a4ff 0 8%, transparent 9%), linear-gradient(135deg, #173d7a, #3177df 65%, #63c7d8); }
body.page-my-courses .course-card::after { content: "▶"; position: absolute; top: 34px; left: 24px; display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--v3-blue); font-size: 15px; }
body.page-my-courses .course-head { margin: 0; padding: 20px 20px 12px; }
body.page-my-courses .course-left { min-width: 0; }
body.page-my-courses .course-icon { display: none; }
body.page-my-courses .course-title { font-size: 20px; line-height: 1.3; }
body.page-my-courses .course-status { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.92); color: var(--v3-green); }
body.page-my-courses .fee-details { margin: auto 20px 14px; }
body.page-my-courses .course-actions { padding: 0 20px 20px; }
body.page-my-courses .course-actions .btn { border-radius: 10px; }
body.page-my-courses .btn-icon { width: 46px; background: var(--v3-blue-soft); color: var(--v3-blue); }

/* Catalog */
body.page-courses .courses-page-app { max-width: 1180px; }
body.page-courses .search-box-wrap { max-width: 680px; }
body.page-courses .lms-hero-card { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-radius: 16px; background: #fff; border-color: var(--v3-line); box-shadow: none; }
body.page-courses .lms-hero-card h3 { font-size: 19px; }
body.page-courses .lms-stat-grid { display: flex; min-width: 300px; }
body.page-courses .lms-stat-box { flex: 1; background: var(--v3-blue-soft); border: 0; padding: 12px 16px; }
body.page-courses .courses-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
body.page-courses .course-card { display: flex; flex-direction: column; min-height: 360px; padding: 20px; border-radius: 20px; box-shadow: none; transition: transform .2s, box-shadow .2s; }
body.page-courses .course-card:hover { transform: translateY(-4px); box-shadow: var(--v3-shadow); }
body.page-courses .course-icon { border-radius: 14px; background: var(--v3-blue-soft); }
body.page-courses .course-desc { color: var(--v3-muted); }
body.page-courses .course-plan-note { margin-top: auto; background: #f7f9fc; border-color: var(--v3-line); }
body.page-courses .course-price strong { color: var(--v3-blue); }

/* Course home */
body.page-course-home .dash-app { max-width: 1080px; }
body.page-course-home .course-hero-card { position: relative; overflow: hidden; padding: 30px; border: 0; border-radius: 22px; background: linear-gradient(130deg, #102c58, #215bb4 58%, #2aa8b6); color: #fff; box-shadow: 0 20px 50px rgba(18, 54, 105, .2); }
body.page-course-home .course-hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -95px; border-radius: 50%; border: 45px solid rgba(255,255,255,.08); }
body.page-course-home .course-chip,
body.page-course-home .course-status { position: relative; z-index: 1; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); color: #fff; }
body.page-course-home .course-hero-title { position: relative; z-index: 1; max-width: 700px; color: #fff; font-size: clamp(26px, 4vw, 42px); }
body.page-course-home .course-hero-meta { position: relative; z-index: 1; color: #dbe9ff; max-width: 700px; }
body.page-course-home .course-hero-bottom { position: relative; z-index: 1; grid-template-columns: minmax(0, 1fr) 84px; max-width: 760px; }
body.page-course-home .progress-row { color: #e4edfb; }
body.page-course-home .progress-track { background: rgba(255,255,255,.2); }
body.page-course-home .progress-track > div { background: var(--v3-yellow); }
body.page-course-home .course-percent-badge { background: #fff; color: var(--v3-blue); }
body.page-course-home .learning-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
body.page-course-home .learning-card { position: relative; display: block; min-height: 190px; padding: 22px; background: #fff; border-radius: 18px; }
body.page-course-home .learning-card::after { content: "→"; position: absolute; right: 20px; bottom: 18px; color: var(--v3-blue); font-size: 20px; }
body.page-course-home .learning-icon { width: 52px; height: 52px; margin-bottom: 24px; border-radius: 14px; background: var(--v3-blue-soft); }
body.page-course-home .learning-card h4 { font-size: 16px; }

/* Combined course workspace */
body.page-learn .learn-app { max-width: 1120px; }
body.page-learn .course-hero-card { border-radius: 20px; background: linear-gradient(135deg, #102d59, #2363bc); color: #fff; }
body.page-learn .course-hero-card h3,
body.page-learn .course-hero-card p { color: inherit; }
body.page-learn .tab-nav { position: sticky; top: 8px; z-index: 20; padding: 7px; border: 1px solid var(--v3-line); border-radius: 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
body.page-learn .filter-chip.active { background: var(--v3-blue); color: #fff; border-color: var(--v3-blue); }

/* Streaming-style recorded course */
body.page-recorded { background: #07111f; color: #fff; }
body.page-recorded .recorded-screen { background: radial-gradient(circle at 72% 0%, #17345f 0, #081321 34%, #050b13 72%); }
body.page-recorded .recorded-app { display: grid; max-width: 1180px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
body.page-recorded .top-header { order: 0; margin: 0; }
body.page-recorded .player-shell { order: 1; display: flex; flex-direction: column; padding: 0; overflow: hidden; background: #0b182a; border-color: #203755; border-radius: 18px; box-shadow: 0 28px 90px rgba(0,0,0,.38); }
body.page-recorded .recorded-hero { order: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 30px; margin: 0; padding: 26px 28px; color: #fff; background: linear-gradient(135deg, rgba(18,47,91,.88), rgba(14,34,61,.9)); border-color: #223b5e; border-radius: 18px; box-shadow: none; }
body.page-recorded .section-block { order: 3; align-self: start; }
body.page-recorded .top-header h1,
body.page-recorded .section-head h3,
body.page-recorded .recorded-hero h3 { color: #fff; }
body.page-recorded .sub-text,
body.page-recorded .section-mini { color: #8da6c6; }
body.page-recorded .profile-badge { background: #172944; color: #fff; border-color: #243b5d; }
body.page-recorded .recorded-hero h3 { max-width: 720px; font-size: clamp(25px, 4vw, 40px); }
body.page-recorded .hero-text { max-width: 720px; color: #b5c6da; }
body.page-recorded .course-overview-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 10px 0 12px; color: #b8c8da; font-size: 12px; }
body.page-recorded .overview-rating { padding: 4px 7px; border: 1px solid #6181ad; border-radius: 4px; color: #d9e8fa; font-size: 9px; font-weight: 800; }
body.page-recorded .recorded-resume-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 18px; padding: 13px 20px; border: 0; border-radius: 9px; background: #fff; color: #091525; font-weight: 800; }
body.page-recorded .hero-stats { min-width: 310px; }
body.page-recorded .hero-stat { background: rgba(7,18,33,.72); border-color: #274261; border-radius: 12px; }
body.page-recorded .hero-stat strong { color: #fff; }
body.page-recorded .player-stage { order: 1; position: relative; padding: 0; background: #03070d; border-radius: 0; }
body.page-recorded .video-wrap { aspect-ratio: 16 / 8.1; border: 0; border-radius: 0; }
body.page-recorded .player-badge-row { position: absolute; z-index: 6; inset: 14px 14px auto; pointer-events: none; }
body.page-recorded .player-header { order: 2; align-items: center; margin: 0; padding: 18px 20px 10px; }
body.page-recorded .player-header h3 { color: #fff; font-size: 22px; }
body.page-recorded .player-sub { color: #91a5c0; }
body.page-recorded .back-inline-btn { background: #172944; color: #dce9fa; }
body.page-recorded .player-disclaimer { display: none; }
body.page-recorded .player-bottom { order: 3; padding: 0 20px 20px; }
body.page-recorded .player-controls { flex: 1; }
body.page-recorded .control-btn { background: #172944; border-color: #284260; color: #e8f1ff; }
body.page-recorded #playPauseBtn { min-width: 135px; background: #fff; border-color: #fff; color: #07111f; }
body.page-recorded .primary-btn { background: var(--v3-blue); color: #fff; }
body.page-recorded .section-head { padding: 8px 2px 13px; border-bottom: 2px solid #1f3652; }
body.page-recorded .episode-lock-note { color: #8297b2; font-size: 11px; }
body.page-recorded .lesson-list { display: grid; max-height: none; overflow: visible; gap: 4px; }
body.page-recorded .lesson-card { padding: 16px 10px; background: transparent; border: 0; border-bottom: 1px solid #17263a; border-radius: 0; color: #fff; box-shadow: none; transition: background .2s; }
body.page-recorded .lesson-card:hover,
body.page-recorded .lesson-card.active { background: rgba(35,78,132,.18); }
body.page-recorded .lesson-card.locked { background: transparent; opacity: .52; }
body.page-recorded .lesson-head { align-items: center; }
body.page-recorded .lesson-left { align-items: center; gap: 17px; }
body.page-recorded .episode-thumb-wrap { position: relative; flex: 0 0 190px; }
body.page-recorded .lesson-thumb { width: 190px; height: 106px; border-radius: 8px; background: linear-gradient(135deg, #173d79, #1c8d9d); }
body.page-recorded .episode-placeholder { display: flex; align-items: flex-end; justify-content: space-between; padding: 12px; color: #fff; }
body.page-recorded .episode-placeholder span { font-size: 13px; font-weight: 900; letter-spacing: .12em; }
body.page-recorded .episode-placeholder small { font-size: 30px; font-weight: 900; opacity: .28; }
body.page-recorded .episode-play-icon { position: absolute; inset: 50% auto auto 50%; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%; background: rgba(3,10,18,.72); color: #fff; transform: translate(-50%,-50%); font-size: 12px; }
body.page-recorded .episode-copy { min-width: 0; }
body.page-recorded .lesson-title { color: #fff; font-size: 17px; }
body.page-recorded .lesson-meta { display: -webkit-box; max-width: 680px; overflow: hidden; color: #8fa2b9; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
body.page-recorded .lesson-day { padding: 0; background: transparent; color: #73a7ed; }
body.page-recorded .episode-side { display: flex; align-items: center; gap: 12px; }
body.page-recorded .btnGhost { width: 42px; height: 42px; padding: 0; border-radius: 50%; background: #172944; border-color: #29486e; color: #fff; }
body.page-recorded .lesson-status.open { background: #173a70; color: #cfe1ff; }

/* Live classroom */
body.page-live .page-app { max-width: 1120px; }
body.page-live .live-hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: center; gap: 24px; padding: 28px; background: linear-gradient(135deg, #102d59, #2363bc); border: 0; border-radius: 22px; color: #fff; }
body.page-live .live-hero h3 { color: #fff; font-size: 26px; }
body.page-live .live-hero > p { color: #d9e8ff; }
body.page-live .live-meta-grid { margin: 0; }
body.page-live .live-meta-box { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); }
body.page-live .live-meta-box p,
body.page-live .live-meta-box h4 { color: #fff; }
body.page-live #liveList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.page-live .live-card { position: relative; padding: 22px; border-radius: 18px; box-shadow: none; }
body.page-live .live-card h4 { font-size: 19px; }
body.page-live .live-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.page-live .live-detail { display: block; background: #f7f9fc; }
body.page-live .live-detail span,
body.page-live .live-detail strong { display: block; }
body.page-live .live-detail strong { margin-top: 5px; }
body.page-live .live-card .btnPrimary { min-width: 130px; }
body.page-live .attendance-confirmed { color: var(--v3-green); font-size: 12px; font-weight: 700; }
body.page-live .live-eyebrow { margin: 0 0 8px; color: var(--v3-blue); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
body.page-live .live-join-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid #cfe8df; border-radius: 12px; background: #f1fbf7; color: var(--v3-green); }
body.page-live .live-join-note > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #d9f4e9; font-weight: 900; }
body.page-live .live-join-note strong,
body.page-live .live-join-note small { display: block; }
body.page-live .live-join-note small { margin-top: 2px; color: #5f7d72; }
body.page-live .btn-join-live.joined { background: var(--v3-green); border-color: var(--v3-green); }

/* Materials */
body.page-materials .page-app { max-width: 1080px; }
body.page-materials #materialList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
body.page-materials .material-card { position: relative; display: flex; min-height: 230px; flex-direction: column; padding: 24px; border-radius: 18px; box-shadow: none; }
body.page-materials .material-card::before { content: "↗"; display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 14px; background: var(--v3-blue-soft); color: var(--v3-blue); font-size: 20px; }
body.page-materials .material-card h4 { font-size: 18px; }
body.page-materials .material-card .card-row { margin-top: auto; }
body.page-materials .material-number { position: absolute; right: 20px; top: 18px; color: #d6e1ef; font-size: 24px; font-weight: 900; }
body.page-materials .material-badge { width: max-content; margin-bottom: 14px; text-transform: capitalize; }
body.page-materials .material-card small { color: var(--v3-muted); }

body.material-viewer-page { min-height: 100vh; overflow: hidden; background: var(--v3-bg); }
.material-viewer-app { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(1180px, 100%); height: 100vh; height: 100dvh; margin: 0 auto; padding: 18px; gap: 12px; }
.material-viewer-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--v3-line); border-radius: 18px; background: var(--v3-surface); }
.material-viewer-header h1 { margin: 2px 0; color: var(--v3-ink); font-size: clamp(18px, 3vw, 25px); }
.material-viewer-header p { margin: 0; }
.viewer-back { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--v3-line); border-radius: 12px; background: var(--v3-surface); color: var(--v3-ink); font-size: 20px; cursor: pointer; }
.viewer-protected { padding: 8px 11px; border-radius: 999px; background: var(--v3-blue-soft); color: var(--v3-blue); font-size: 12px; font-weight: 800; }
.material-viewer-stage { min-height: 0; overflow: hidden; border: 1px solid var(--v3-line); border-radius: 18px; background: #dfe5ec; box-shadow: var(--v3-shadow); }
.material-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.viewer-loading, .material-viewer-stage > .empty-state { display: grid; place-items: center; height: 100%; padding: 24px; text-align: center; }
.viewer-note { margin: 0; color: var(--v3-muted); font-size: 12px; text-align: center; }
.demo-material-sheet { width: min(720px, calc(100% - 28px)); min-height: calc(100% - 28px); margin: 14px auto; padding: clamp(24px, 5vw, 54px); background: #fff; color: #1d2b3d; box-shadow: 0 16px 50px rgba(17, 36, 61, .18); }
.demo-material-sheet > span { color: #1e63d7; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.demo-material-sheet h2 { margin: 14px 0 8px; font-size: clamp(24px, 5vw, 38px); }
.demo-material-sheet p, .demo-material-sheet li { color: #526176; line-height: 1.65; }
.demo-material-box { margin-top: 24px; padding: 18px; border-radius: 14px; background: #eaf2ff; color: #174f9d; font-weight: 800; }
html[data-theme="dark"] .material-viewer-stage { background: #111d2c; }
@media (max-width: 640px) {
  .material-viewer-app { padding: 8px; gap: 8px; }
  .material-viewer-header { grid-template-columns: auto minmax(0, 1fr); padding: 10px; border-radius: 14px; }
  .viewer-protected { display: none; }
  .material-viewer-stage { border-radius: 14px; }
}

/* Tests */
body.page-tests .page-app { max-width: 1000px; }
body.page-tests #testList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.page-tests .test-card { padding: 24px; border-radius: 18px; box-shadow: none; }
body.page-tests .test-box { padding: 28px; border-radius: 20px; }
body.page-tests .test-toolbar { position: sticky; top: 10px; z-index: 10; display: flex; justify-content: space-between; gap: 14px; margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--v3-line); border-radius: 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
body.page-tests .test-toolbar span { font-size: 12px; color: var(--v3-muted); }
body.page-tests .question { padding: 22px; background: #fff; border-radius: 16px; }
body.page-tests .opt { display: flex; gap: 10px; padding: 13px 14px; border-radius: 10px; cursor: pointer; }
body.page-tests .opt:hover { background: var(--v3-blue-soft); border-color: #b7cdf7; }
body.page-tests .opt:has(input:checked) { background: var(--v3-blue-soft); border-color: var(--v3-blue); color: var(--v3-blue-dark); }
body.page-tests .test-card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px; background: var(--v3-blue-soft); color: var(--v3-blue); font-size: 22px; font-weight: 900; }
body.page-tests .test-meta { display: flex; gap: 14px; margin: 18px 0 8px; color: var(--v3-muted); font-size: 12px; font-weight: 700; }
body.page-tests .test-heading { margin-bottom: 22px; }
body.page-tests .question { border: 1px solid var(--v3-line); margin-bottom: 16px; }
body.page-tests .question-title { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-bottom: 14px; }
body.page-tests .question-title > span { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--v3-blue-soft); color: var(--v3-blue); font-size: 12px; }
body.page-tests .opt > span { display: flex; gap: 10px; }
body.page-tests .opt b { color: var(--v3-blue); }
body.page-tests .test-form-error { min-height: 20px; color: #b42318; font-size: 13px; font-weight: 700; }
body.page-tests .result-card { display: flex; gap: 16px; margin-top: 22px; padding: 22px; border: 1px solid #bfded2; border-radius: 16px; background: #f1fbf7; }
body.page-tests .result-card.retry { border-color: #f1d09c; background: #fff9ed; }
body.page-tests .result-icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--v3-green); color: #fff; font-size: 22px; }
body.page-tests .result-card.retry .result-icon { background: #cb8122; }
body.page-tests .test-locked-state { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; padding: 28px; border: 1px solid var(--v3-line); border-radius: 18px; background: #fff; }
body.page-tests .test-locked-state h3 { margin: 3px 0 8px; }
body.page-tests .test-locked-state p:not(.section-mini) { margin: 0 0 18px; color: var(--v3-muted); }
body.page-tests .test-lock-icon { display: grid; flex: 0 0 72px; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: var(--v3-blue-soft); font-size: 28px; }

/* Dashboard attendance */
body.page-index .attendance-open-live { display: inline-flex; width: auto; margin-top: 12px; text-decoration: none; }

/* Profile */
body.page-profile .profile-app { max-width: 1050px; }
body.page-profile .profile-card { padding: 28px; border-radius: 20px; box-shadow: none; }
body.page-profile .avatar-circle { width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(135deg, #225fc1, #22a9b6); }
body.page-profile .profile-info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.page-profile .info-box { background: #f7f9fc; border-radius: 12px; }
body.page-profile .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.page-profile .summary-card { text-align: left; box-shadow: none; }
body.page-profile .course-progress-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.page-profile .progress-card { margin: 0; border-radius: 16px; box-shadow: none; }
body.page-profile .theme-settings { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
body.page-profile .theme-copy h3 { margin: 3px 0 6px; color: var(--v3-ink); font-size: 19px; }
body.page-profile .theme-copy > p:last-child { margin: 0; color: var(--v3-muted); font-size: 12px; }
body.page-profile .theme-options { display: grid; grid-template-columns: repeat(3, minmax(88px, 1fr)); gap: 8px; }
body.page-profile .theme-options button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--v3-line); border-radius: 10px; background: #f7f9fc; color: var(--v3-muted); font-weight: 700; }
body.page-profile .theme-options button.active { border-color: var(--v3-blue); background: var(--v3-blue-soft); color: var(--v3-blue); box-shadow: 0 0 0 2px rgba(37,99,217,.1); }

/* Login */
body.page-auth { background: linear-gradient(135deg, #eef4ff, #f7f9fc 55%, #eaf8f7); }
body.page-auth .auth-screen { padding: 32px; align-items: center; }
body.page-auth .auth-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 480px); max-width: 1040px; align-items: stretch; border: 1px solid var(--v3-line); border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 25px 80px rgba(28,54,92,.14); }
body.page-auth .auth-brand-panel { align-items: flex-start; justify-content: center; padding: 54px; margin: 0; text-align: left; color: #fff; background: radial-gradient(circle at 80% 18%, rgba(45,190,203,.45), transparent 24%), linear-gradient(145deg, #102d59, #205db8); }
body.page-auth .auth-brand-mark { display: grid; place-items: center; width: 180px; height: 76px; padding: 8px 12px; border-radius: 16px; background: #fff; color: var(--v3-blue); font-size: 25px; font-weight: 900; }
body.page-auth .auth-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
body.page-auth .auth-brand-kicker { margin: 26px 0 10px; color: #bcd4f7; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
body.page-auth .auth-brand-panel h2 { max-width: 470px; margin: 0 0 16px; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; }
body.page-auth .auth-brand-panel > p:not(.auth-brand-kicker) { max-width: 460px; color: #d8e7fb; line-height: 1.7; }
body.page-auth .auth-trust-list { display: grid; gap: 12px; margin-top: 30px; color: #eaf3ff; font-size: 13px; }
body.page-auth .login-card { margin: 0; padding: 42px 36px; border: 0; border-radius: 0; box-shadow: none; }
body.page-auth .brand-title,
body.page-auth .brand-subtitle,
body.page-auth .brand-mini { text-align: left; }
body.page-auth .mode-switch { background: #f1f5fa; border-color: var(--v3-line); }
body.page-auth .mode-btn.active { background: #fff; color: var(--v3-blue); box-shadow: 0 4px 15px rgba(28,54,92,.08); }
body.page-auth .country-code { color: var(--v3-blue); }
body.page-auth .phone-input-wrapper,
body.page-auth .text-input,
body.page-auth .select-input,
body.page-auth .otp-digit { border-radius: 10px; background: #f8fafc; }

/* Course details */
body.page-course-view .course-view-app { max-width: 1060px; }
body.page-course-view .view-topbar { align-items: center; }
body.page-course-view .course-hero-card { padding: 34px; border: 0; border-radius: 22px; background: radial-gradient(circle at 84% 15%, rgba(68,204,211,.42), transparent 24%), linear-gradient(135deg,#102d59,#2363bc); color: #fff; box-shadow: 0 20px 55px rgba(24,69,135,.2); }
body.page-course-view .course-hero-card h2 { max-width: 720px; color: #fff; font-size: clamp(28px,4vw,44px); }
body.page-course-view .course-hero-card > p { max-width: 700px; color: #dbe9fb; }
body.page-course-view .hero-badge { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); color: #fff; }
body.page-course-view .hero-info-grid { max-width: 720px; }
body.page-course-view .hero-info-box { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.17); }
body.page-course-view .hero-info-box span,
body.page-course-view .hero-info-box strong { color: #fff; }
body.page-course-view .content-card { padding: 24px; border-color: var(--v3-line); border-radius: 18px; box-shadow: none; }
body.page-course-view .variant-tab { border-radius: 14px; }
body.page-course-view .variant-tab.active { border-color: var(--v3-blue); background: var(--v3-blue-soft); }
body.page-course-view .variant-summary-card { background: #f6f9fd; border-color: var(--v3-line); border-radius: 14px; }
body.page-course-view .variant-price { color: var(--v3-blue); }
body.page-course-view .variant-point,
body.page-course-view .feature-item,
body.page-course-view .include-item { background: #f7f9fc; border-color: var(--v3-line); border-radius: 12px; }
body.page-course-view .enroll-card { border-color: #bdd3f3; background: var(--v3-blue-soft); }
body.page-course-view .secondary-btn { background: var(--v3-blue); color: #fff; border-radius: 10px; }
body.page-course-view .tab-panel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
body.page-course-view .tab-panel > .content-card { margin: 0; }
body.page-course-view .sticky-buybar { background: rgba(255,255,255,.96); border-color: var(--v3-line); backdrop-filter: blur(14px); }

/* Payment */
body.page-checkout .checkout-app { max-width: 920px; }
body.page-checkout .checkout-topbar { margin-bottom: 24px; }
body.page-checkout .checkout-hero-card { padding: 28px; border: 0; border-radius: 20px; background: linear-gradient(135deg,#102d59,#2363bc 70%,#2ba8b5); color: #fff; box-shadow: 0 18px 50px rgba(24,69,135,.18); }
body.page-checkout .checkout-hero-copy h2 { color: #fff; font-size: 29px; }
body.page-checkout .checkout-hero-copy p:last-child,
body.page-checkout .hero-mini { color: #dce9fb; }
body.page-checkout .checkout-card { padding: 24px; border-color: var(--v3-line); border-radius: 18px; box-shadow: none; }
body.page-checkout .pay-summary-box { border-color: var(--v3-line); border-radius: 12px; background: #f7f9fc; text-align: left; }
body.page-checkout .pay-summary-box strong { color: var(--v3-blue); }
body.page-checkout .variant-tab { border-radius: 13px; }
body.page-checkout .variant-tab.active { border-color: var(--v3-blue); background: var(--v3-blue-soft); }
body.page-checkout .variant-summary-card { border-color: var(--v3-line); border-radius: 13px; background: #f7f9fc; }
body.page-checkout .variant-price { color: var(--v3-blue); }
body.page-checkout .payment-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
body.page-checkout .payment-option { min-height: 112px; border-radius: 13px; }
body.page-checkout .payment-option.active-option { border-color: var(--v3-blue); background: var(--v3-blue-soft); box-shadow: 0 0 0 2px rgba(37,99,217,.08); }
body.page-checkout .form-group input { border-color: var(--v3-line); border-radius: 10px; }
body.page-checkout .apply-offer-btn,
body.page-checkout .helper-btn { border-radius: 10px; background: var(--v3-blue); color: #fff; }
body.page-checkout .sticky-buybar { background: rgba(255,255,255,.96); border-color: var(--v3-line); backdrop-filter: blur(14px); }
body.page-checkout .subscribe-btn { background: var(--v3-blue); }

/* Context-aware study assistant */
.study-assistant-toggle { position: fixed; right: 22px; bottom: 22px; z-index: 180; display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 17px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #225fd0, #20a8b7); box-shadow: 0 12px 36px rgba(25,72,145,.3); font-weight: 700; }
.study-assistant-toggle .spark { color: #ffe18b; }
.study-assistant { position: fixed; right: 22px; bottom: 82px; z-index: 190; display: none; width: min(380px, calc(100vw - 28px)); max-height: min(650px, calc(100vh - 110px)); overflow: auto; border: 1px solid #cddbec; border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(18,45,84,.25); }
.study-assistant.open { display: block; }
.assistant-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 14px; color: #fff; background: linear-gradient(135deg, #163d7b, #2876d2); }
.assistant-head strong { display: block; }
.assistant-head small { color: #d5e5fb; }
.assistant-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; }
.assistant-body { padding: 18px; }
.assistant-welcome { margin: 0 0 14px; color: var(--v3-muted); font-size: 13px; line-height: 1.6; }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-chip { padding: 9px 11px; border: 1px solid var(--v3-line); border-radius: 9px; color: var(--v3-blue-dark); background: #f6f9ff; font-size: 12px; }
.assistant-output { min-height: 78px; margin: 16px 0; padding: 14px; border-radius: 12px; background: #f6f8fb; color: #42536a; white-space: pre-wrap; font-size: 13px; line-height: 1.65; }
.assistant-form { display: flex; gap: 8px; }
.assistant-form input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid var(--v3-line); border-radius: 10px; }
.assistant-form button { padding: 0 14px; border: 0; border-radius: 10px; background: var(--v3-blue); color: #fff; }
.assistant-note { margin: 12px 0 0; color: #8794a7; font-size: 10px; }

/* Persisted app theme */
html[data-theme="dark"] {
  color-scheme: dark;
  --v3-bg: #091321;
  --v3-surface: #111f31;
  --v3-ink: #edf4ff;
  --v3-muted: #9aacc2;
  --v3-line: #24364c;
  --v3-blue-soft: #142c50;
  --bg: #091321;
  --panel: #111f31;
  --panel-soft: #152438;
  --text: #edf4ff;
  --muted: #9aacc2;
  --line: #24364c;
  --navy: #edf4ff;
  --navy-deep: #ffffff;
  --blue-soft: #142c50;
}
html[data-theme="dark"] body.lms-v3,
html[data-theme="dark"] body.lms-v3 .dash-screen,
html[data-theme="dark"] body.lms-v3 .courses-screen,
html[data-theme="dark"] body.lms-v3 .courses-page-screen,
html[data-theme="dark"] body.lms-v3 .learn-screen,
html[data-theme="dark"] body.lms-v3 .profile-screen,
html[data-theme="dark"] body.lms-v3 .page-screen { background: var(--v3-bg); color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .course-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .learning-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .profile-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .summary-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .progress-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .attendance-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .live-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .material-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .test-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .test-box,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .lms-hero-card,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) .info-box { background: var(--v3-surface); border-color: var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3:not(.page-recorded) h1,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) h2,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) h3,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) h4,
html[data-theme="dark"] body.lms-v3:not(.page-recorded) strong { color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3 .student-sidebar,
html[data-theme="dark"] body.lms-v3 .bottom-nav,
html[data-theme="dark"] body.lms-v3 .study-assistant,
html[data-theme="dark"] body.page-auth .auth-app,
html[data-theme="dark"] body.page-auth .login-card { background: #0f1d2e; border-color: var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3 input,
html[data-theme="dark"] body.lms-v3 textarea,
html[data-theme="dark"] body.lms-v3 select,
html[data-theme="dark"] body.lms-v3 .theme-options button,
html[data-theme="dark"] body.lms-v3 .live-detail,
html[data-theme="dark"] body.lms-v3 .question,
html[data-theme="dark"] body.lms-v3 .opt,
html[data-theme="dark"] body.lms-v3 .assistant-output { background: #152438; border-color: var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3 .theme-options button.active { background: #183762; border-color: #4d86dc; color: #a9cbff; }
html[data-theme="dark"] body.lms-v3 .sidebar-note,
html[data-theme="dark"] body.lms-v3 .course-plan-note,
html[data-theme="dark"] body.lms-v3 .fee-details { background: #132235; border-color: var(--v3-line); }
html[data-theme="dark"] body.page-profile .profile-modal-card { background: var(--v3-surface); border: 1px solid var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.page-profile .danger-zone { background: linear-gradient(135deg,#111f31,#261b25); border-color: #6c3438; }
html[data-theme="dark"] body.page-profile .delete-account-btn { background: #2b1a22; border-color: #7d3d42; color: #ffaaa6; }
html[data-theme="dark"] body.page-profile .cancel-delete-btn { background: #1b2c42; color: var(--v3-ink); }

/* Recorded courses use the light learning theme by default; the profile preference can switch it. */
html[data-theme="light"] body.page-recorded { background: #f4f7fb; color: var(--v3-ink); }
html[data-theme="light"] body.page-recorded .recorded-screen { background: radial-gradient(circle at 78% 0%,#dceaff 0,transparent 30%),#f4f7fb; }
html[data-theme="light"] body.page-recorded .top-header h1,
html[data-theme="light"] body.page-recorded .section-head h3,
html[data-theme="light"] body.page-recorded .recorded-hero h3,
html[data-theme="light"] body.page-recorded .player-header h3,
html[data-theme="light"] body.page-recorded .lesson-title { color: #14243b; }
html[data-theme="light"] body.page-recorded .sub-text,
html[data-theme="light"] body.page-recorded .hero-text,
html[data-theme="light"] body.page-recorded .player-sub,
html[data-theme="light"] body.page-recorded .lesson-meta,
html[data-theme="light"] body.page-recorded .episode-lock-note,
html[data-theme="light"] body.page-recorded .course-overview-meta { color: #64748b; }
html[data-theme="light"] body.page-recorded .profile-badge { background: #eaf1ff; border-color: #fff; color: var(--v3-blue); }
html[data-theme="light"] body.page-recorded .player-shell,
html[data-theme="light"] body.page-recorded .recorded-hero { background: #fff; border-color: #dfe7f1; box-shadow: var(--v3-shadow); }
html[data-theme="light"] body.page-recorded .recorded-hero { background: linear-gradient(135deg,#fff,#edf4ff); }
html[data-theme="light"] body.page-recorded .overview-rating { border-color: #b8c9df; color: #47617f; }
html[data-theme="light"] body.page-recorded .recorded-resume-btn { background: var(--v3-blue); color: #fff; }
html[data-theme="light"] body.page-recorded .hero-stat { background: #f6f9fd; border-color: #dfe7f1; }
html[data-theme="light"] body.page-recorded .hero-stat strong { color: #14243b; }
html[data-theme="light"] body.page-recorded .player-header { background: #fff; }
html[data-theme="light"] body.page-recorded .player-bottom { background: #fff; }
html[data-theme="light"] body.page-recorded .control-btn { background: #edf3fb; border-color: #dbe5f2; color: #203957; }
html[data-theme="light"] body.page-recorded #playPauseBtn { background: var(--v3-blue); border-color: var(--v3-blue); color: #fff; }
html[data-theme="light"] body.page-recorded .back-inline-btn { background: #edf3fb; color: #31567f; }
html[data-theme="light"] body.page-recorded .section-head { border-color: #dfe7f1; }
html[data-theme="light"] body.page-recorded .lesson-card { border-color: #dfe7f1; color: #14243b; }
html[data-theme="light"] body.page-recorded .lesson-card:hover,
html[data-theme="light"] body.page-recorded .lesson-card.active { background: #eaf1ff; }
html[data-theme="light"] body.page-recorded .btnGhost { background: #eaf1ff; border-color: #c8d9f0; color: var(--v3-blue); }
html[data-theme="light"] body.page-recorded .lesson-status.open { background: #dce9ff; color: var(--v3-blue-dark); }
html[data-theme="dark"] body.page-checkout .checkout-card,
html[data-theme="dark"] body.page-course-view .content-card,
html[data-theme="dark"] body.page-course-view .variant-summary-card,
html[data-theme="dark"] body.page-checkout .variant-summary-card,
html[data-theme="dark"] body.page-checkout .pay-summary-box,
html[data-theme="dark"] body.page-course-view .variant-point,
html[data-theme="dark"] body.page-course-view .feature-item,
html[data-theme="dark"] body.page-course-view .include-item { background: var(--v3-surface); border-color: var(--v3-line); color: var(--v3-ink); }

@media (max-width: 1050px) {
  body.page-courses .courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-course-home .learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-materials #materialList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body.page-my-courses .courses-list,
  body.page-courses .courses-grid,
  body.page-live #liveList,
  body.page-materials #materialList,
  body.page-tests #testList,
  body.page-profile .course-progress-list { grid-template-columns: 1fr; }
  body.page-recorded .recorded-app { display: flex; flex-direction: column; }
  body.page-recorded .top-header { order: 0; }
  body.page-recorded .player-shell { order: 1; }
  body.page-recorded .recorded-hero { order: 2; }
  body.page-recorded .section-block { order: 3; }
  body.page-recorded .lesson-list { max-height: none; }
  body.page-recorded .recorded-hero { grid-template-columns: 1fr; padding: 22px; }
  body.page-recorded .hero-stats { min-width: 0; }
  body.page-recorded .episode-thumb-wrap { flex-basis: 142px; }
  body.page-recorded .lesson-thumb { width: 142px; height: 80px; }
  body.page-recorded .lesson-meta { -webkit-line-clamp: 2; }
  body.page-recorded .episode-side .lesson-status { display: none; }
  body.page-recorded .episode-lock-note { display: none; }
  body.page-live .live-hero { grid-template-columns: 1fr; padding: 22px; }
  body.page-live .live-detail-list { grid-template-columns: 1fr 1fr; }
  body.page-profile .profile-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-profile .theme-settings { display: block; }
  body.page-profile .theme-options { margin-top: 18px; }
  body.page-auth .auth-screen { padding: 0; align-items: stretch; }
  body.page-auth .auth-app { display: block; border: 0; border-radius: 0; }
  body.page-auth .auth-brand-panel { padding: 30px 24px; }
  body.page-auth .auth-brand-panel h2 { font-size: 30px; }
  body.page-auth .auth-trust-list { display: none; }
  body.page-auth .login-card { padding: 30px 22px 36px; }
  body.page-courses .lms-hero-card { display: block; }
  body.page-courses .lms-stat-grid { min-width: 0; margin-top: 18px; }
  body.page-course-view .tab-panel { grid-template-columns: 1fr; }
  body.page-course-view .course-hero-card { padding: 24px; }
  body.page-checkout .payment-options { grid-template-columns: 1fr; }
  body.page-checkout .payment-option { min-height: 0; }
  .study-assistant-toggle { right: 14px; bottom: 78px; }
  .study-assistant-toggle span:not(.spark) { display: none; }
  .study-assistant { right: 14px; bottom: 136px; }
}

@media (max-width: 430px) {
  body.page-my-courses .summary-strip,
  body.page-profile .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  body.page-my-courses .summary-card,
  body.page-profile .summary-card { padding: 12px 9px; }
  body.page-my-courses .summary-card h3,
  body.page-profile .summary-card h3 { font-size: 21px; }
  body.page-course-home .learning-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  body.page-course-home .learning-card { min-height: 160px; padding: 16px; }
  body.page-course-home .course-hero-card { padding: 22px; }
  body.page-live .live-detail-list { grid-template-columns: 1fr; }
  body.page-profile .profile-info-grid { grid-template-columns: 1fr; }
  body.page-recorded .recorded-hero { display: block; }
  body.page-recorded .top-header { margin-bottom: 2px; }
  body.page-recorded .player-shell { margin-inline: -18px; border-left: 0; border-right: 0; border-radius: 0; }
  body.page-recorded .video-wrap { aspect-ratio: 16 / 9; }
  body.page-recorded .player-header { align-items: flex-start; padding: 16px 18px 9px; }
  body.page-recorded .player-header-actions { width: auto; }
  body.page-recorded .back-inline-btn { flex: none; }
  body.page-recorded .player-bottom { padding: 0 18px 18px; }
  body.page-recorded .player-controls { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); }
  body.page-recorded .control-btn { min-width: 0; padding: 10px 6px; }
  body.page-recorded .recorded-resume-btn { width: 100%; }
  body.page-recorded .hero-stats { display: none; }
  body.page-recorded .lesson-card { padding-inline: 0; }
  body.page-recorded .episode-thumb-wrap { flex-basis: 122px; }
  body.page-recorded .lesson-thumb { width: 122px; height: 69px; }
  body.page-recorded .episode-copy .lesson-meta { font-size: 11px; }
  body.page-recorded .episode-side { align-self: center; }
  body.page-recorded .btnGhost { width: 36px; height: 36px; }
  body.page-profile .theme-options { grid-template-columns: repeat(3, 1fr); }
  body.page-profile .theme-options button { min-width: 0; padding-inline: 7px; font-size: 11px; }
  body.page-tests .test-locked-state { display: block; }
  body.page-tests .test-lock-icon { margin-bottom: 18px; }
}

/* Recorded library: streaming-style browsing with a separate protected player. */
body.page-recorded .recorded-screen { min-height: 100vh; background: var(--v3-bg); }
body.page-recorded .recorded-app { display: block; max-width: 1060px; }
body.page-recorded .top-header { margin-bottom: 22px; }
body.page-recorded .recorded-feature { overflow: hidden; margin-bottom: 18px; border: 1px solid var(--v3-line); border-radius: 22px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
body.page-recorded .feature-preview { position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; min-height: min(52vw, 500px); padding: 28px; overflow: hidden; border: 0; border-radius: 0; color: #fff; background: radial-gradient(circle at 72% 22%, rgba(40,153,190,.44), transparent 24%), linear-gradient(145deg,#06101e 0%,#102c52 56%,#137e93 100%); text-align: center; }
body.page-recorded .feature-preview::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,transparent 35%,rgba(2,8,16,.82)); }
body.page-recorded .feature-player-label { position: absolute; top: 20px; left: 22px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(4,13,25,.42); color: #e6f2ff; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
body.page-recorded .feature-preview-copy { position: absolute; left: 24px; right: 24px; bottom: 22px; display: grid; gap: 3px; text-align: left; }
body.page-recorded .feature-preview-copy small { color: #86d7e2; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
body.page-recorded .feature-preview-copy strong { color: #fff; font-size: clamp(18px,3vw,28px); }
body.page-recorded .feature-preview-copy span { color: #b9c9dd; font-size: 12px; }
body.page-recorded .feature-play-icon { display: grid; place-items: center; width: 72px; height: 72px; padding-left: 5px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(2,10,21,.4); color: #fff; font-size: 25px; box-shadow: 0 12px 35px rgba(0,0,0,.3); }
body.page-recorded .feature-preview:hover .feature-play-icon { transform: scale(1.06); background: var(--v3-blue); }
body.page-recorded .recorded-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 28px; margin: 0; padding: 28px; border: 0; border-radius: 0; background: var(--v3-surface); box-shadow: none; }
body.page-recorded .recorded-hero h2 { margin: 0 0 8px; color: var(--v3-ink); font-size: clamp(25px,4vw,38px); line-height: 1.12; }
body.page-recorded .course-overview-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 10px 0; color: var(--v3-muted); font-size: 12px; }
body.page-recorded .overview-rating { padding: 4px 7px; border: 1px solid var(--v3-line); border-radius: 5px; color: var(--v3-blue-dark); font-size: 9px; font-weight: 800; }
body.page-recorded .hero-text { max-width: 720px; margin: 0 0 18px; color: var(--v3-muted); line-height: 1.65; }
body.page-recorded .recorded-resume-btn { min-height: 46px; padding: 0 20px; border: 0; border-radius: 9px; background: var(--v3-blue); color: #fff; font-weight: 800; }
body.page-recorded .hero-stats { display: grid; grid-template-columns: repeat(3,92px); gap: 9px; min-width: 0; margin: 0; }
body.page-recorded .hero-stat { padding: 12px; border: 1px solid var(--v3-line); border-radius: 11px; background: var(--v3-blue-soft); }
body.page-recorded .hero-stat span { margin: 0 0 5px; color: var(--v3-muted); font-size: 10px; }
body.page-recorded .hero-stat strong { color: var(--v3-ink); font-size: 22px; }
body.page-recorded .recorded-tabs { display: flex; gap: 26px; overflow-x: auto; margin-bottom: 24px; border-bottom: 1px solid var(--v3-line); }
body.page-recorded .recorded-tabs a { flex: 0 0 auto; padding: 13px 2px 11px; border-bottom: 3px solid transparent; color: var(--v3-muted); font-size: 12px; font-weight: 700; }
body.page-recorded .recorded-tabs a.active { border-color: var(--v3-blue); color: var(--v3-ink); }
body.page-recorded .section-head { padding-bottom: 12px; border-bottom: 1px solid var(--v3-line); }
body.page-recorded .section-head h3 { color: var(--v3-ink); }
body.page-recorded .lesson-list { gap: 0; }
body.page-recorded .lesson-card { padding: 15px 8px; border: 0; border-bottom: 1px solid var(--v3-line); border-radius: 0; background: transparent; color: var(--v3-ink); box-shadow: none; }
body.page-recorded .lesson-card:hover,
body.page-recorded .lesson-card.active { background: var(--v3-blue-soft); }
body.page-recorded .lesson-card.locked { background: transparent; opacity: .58; }
body.page-recorded .episode-thumb-wrap { flex: 0 0 176px; }
body.page-recorded .lesson-thumb { width: 176px; height: 99px; border-radius: 8px; }
body.page-recorded .episode-placeholder { background: linear-gradient(135deg,#153f77,#1590a0); color: #fff; }
body.page-recorded .lesson-title { color: var(--v3-ink); font-size: 15px; }
body.page-recorded .lesson-day { padding: 0; background: transparent; color: var(--v3-blue); }
body.page-recorded .lesson-meta,
body.page-recorded .episode-lock-note { color: var(--v3-muted); }
body.page-recorded .btnGhost { border-color: var(--v3-line); background: var(--v3-blue-soft); color: var(--v3-blue); }

body.page-recorded.lesson-player-open { overflow: hidden; }
.lesson-player-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; background: #03070d; color: #fff; }
.lesson-player-dialog[open] { display: grid; place-items: center; }
.lesson-player-dialog::backdrop { background: #03070d; }
.lesson-player-dialog .player-shell { width: min(1180px,100vw); margin: 0; padding: 18px; border: 0; border-radius: 0; background: #07111f; color: #fff; box-shadow: none; }
.lesson-player-dialog .player-header { align-items: center; margin: 0 0 12px; }
.lesson-player-dialog .player-header h3 { color: #fff; }
.lesson-player-dialog .player-sub,
.lesson-player-dialog .section-mini { color: #9db0c8; }
.lesson-player-dialog .player-header-actions { flex-wrap: nowrap; }
.lesson-player-dialog .back-inline-btn { border: 1px solid #34475e; background: #15263a; color: #dbe8f8; }
.lesson-player-dialog .back-inline-btn.accent { display: inline-flex; background: #fff; color: #10223b; }
.lesson-player-dialog .player-stage { padding: 0; border-radius: 12px; background: #000; }
.lesson-player-dialog .player-badge-row { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; pointer-events: none; }
.lesson-player-dialog .video-wrap { border: 0; border-radius: 12px; }
.lesson-player-dialog .player-bottom { margin-top: 12px; }
.lesson-player-dialog .control-btn { border-color: #34475e; background: #15263a; color: #e8f1fc; }
.lesson-player-dialog .primary-btn { background: var(--v3-blue); box-shadow: none; }
.lesson-player-dialog .player-shell:fullscreen { width: 100vw; height: 100vh; padding: 10px; display: flex; flex-direction: column; justify-content: center; background: #000; }
.lesson-player-dialog .player-shell:fullscreen .player-header { position: absolute; z-index: 8; top: 12px; left: 14px; right: 14px; }
.lesson-player-dialog .player-shell:fullscreen .player-stage { width: 100%; }
.lesson-player-dialog .player-shell:fullscreen .player-bottom { position: absolute; z-index: 8; left: 14px; right: 14px; bottom: 12px; }
.lesson-player-dialog .player-shell:fullscreen .player-badge-row { top: 86px; justify-content: flex-end; }
.lesson-player-dialog .player-shell:fullscreen .player-badge:first-child { display: none; }
html[data-theme] body.page-recorded .lesson-player-dialog .player-shell { background: #07111f; border: 0; color: #fff; box-shadow: none; }
html[data-theme] body.page-recorded .lesson-player-dialog .player-header,
html[data-theme] body.page-recorded .lesson-player-dialog .player-bottom { background: transparent; }
html[data-theme] body.page-recorded .lesson-player-dialog .player-header h3 { color: #fff; }
html[data-theme] body.page-recorded .lesson-player-dialog .control-btn { border-color: #34475e; background: #15263a; color: #e8f1fc; }
html[data-theme] body.page-recorded .lesson-player-dialog #playPauseBtn { border-color: #356fd2; background: #2865c5; color: #fff; }
html[data-theme] body.page-recorded .lesson-player-dialog .back-inline-btn { border-color: #34475e; background: #15263a; color: #dbe8f8; }
html[data-theme] body.page-recorded .lesson-player-dialog .back-inline-btn.accent { background: #fff; color: #10223b; }

/* Complete dark-theme contrast across legacy cards, labels and controls. */
html[data-theme="dark"] body.lms-v3 .recorded-screen,
html[data-theme="dark"] body.lms-v3 .course-view-screen,
html[data-theme="dark"] body.lms-v3 .checkout-screen { background: var(--v3-bg); color: var(--v3-ink); }
html[data-theme="dark"] body.lms-v3 .tenant-brandbar img,
html[data-theme="dark"] body.lms-v3 .student-brand img { padding: 4px; border-radius: 8px; background: #fff; }
html[data-theme="dark"] body.lms-v3 .sub-text,
html[data-theme="dark"] body.lms-v3 .course-meta,
html[data-theme="dark"] body.lms-v3 .course-desc,
html[data-theme="dark"] body.lms-v3 .profile-field span,
html[data-theme="dark"] body.lms-v3 .info-box span,
html[data-theme="dark"] body.lms-v3 .material-meta,
html[data-theme="dark"] body.lms-v3 .test-meta,
html[data-theme="dark"] body.lms-v3 .live-meta,
html[data-theme="dark"] body.lms-v3 .buy-note { color: var(--v3-muted); }
html[data-theme="dark"] body.lms-v3 .nav-item,
html[data-theme="dark"] body.lms-v3 .section-link { color: #afc2da; }
html[data-theme="dark"] body.lms-v3 .nav-item.active { color: #bcd7ff; background: #18345a; }
html[data-theme="dark"] body.lms-v3 .search-box,
html[data-theme="dark"] body.lms-v3 .search-box input,
html[data-theme="dark"] body.lms-v3 .filter-chip,
html[data-theme="dark"] body.lms-v3 .carousel-dots button,
html[data-theme="dark"] body.lms-v3 .btn-outline { background: #152438; border-color: var(--v3-line); color: #d8e6f7; }
html[data-theme="dark"] body.lms-v3 .filter-chip.active { background: #326fd1; border-color: #4c84dc; color: #fff; }
html[data-theme="dark"] body.lms-v3 .category-card { background: #152438 !important; border-color: var(--v3-line); color: #c6d8ed !important; }
html[data-theme="dark"] body.lms-v3 .course-chip,
html[data-theme="dark"] body.lms-v3 .track-pill { background: #18345a; color: #bcd7ff; }
html[data-theme="dark"] body.lms-v3 .course-status { background: #17392e; color: #8ee0b8; }
html[data-theme="dark"] body.lms-v3 .course-status.is-pending { background: #463719; color: #f5cf78; }
html[data-theme="dark"] body.lms-v3 .sticky-buybar { background: rgba(12,25,41,.97); border-color: var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.page-recorded .recorded-feature,
html[data-theme="dark"] body.page-recorded .recorded-hero { background: var(--v3-surface); border-color: var(--v3-line); }
html[data-theme="dark"] body.page-recorded .overview-rating { color: #b7d3fa; }
html[data-theme="dark"] body.page-recorded .lesson-card:hover,
html[data-theme="dark"] body.page-recorded .lesson-card.active { background: #142c50; }
html[data-theme="dark"] body.page-recorded .hero-stat,
html[data-theme="dark"] body.page-recorded .btnGhost { background: #152b48; border-color: #2d4665; color: #b9d6ff; }

@media (max-width: 760px) {
  body.page-recorded .recorded-feature { margin-inline: -18px; border-left: 0; border-right: 0; border-radius: 0; }
  body.page-recorded .feature-preview { min-height: 56vw; }
  body.page-recorded .recorded-hero { grid-template-columns: 1fr; padding: 22px 18px; }
  body.page-recorded .hero-stats { display: none; }
  body.page-recorded .episode-thumb-wrap { flex-basis: 142px; }
  body.page-recorded .lesson-thumb { width: 142px; height: 80px; }
  .lesson-player-dialog .player-shell { width: 100vw; height: 100dvh; padding: 10px; display: flex; flex-direction: column; justify-content: center; }
  .lesson-player-dialog .player-header { position: absolute; z-index: 8; top: 10px; left: 12px; right: 12px; padding: 0; }
  .lesson-player-dialog .player-header .section-mini,
  .lesson-player-dialog .player-sub,
  .lesson-player-dialog #goCourseHome { display: none; }
  .lesson-player-dialog .player-stage { width: 100%; }
  .lesson-player-dialog .player-badge-row { top: 68px; justify-content: flex-end; }
  .lesson-player-dialog .player-badge:first-child { display: none; }
  .lesson-player-dialog .player-bottom { position: absolute; z-index: 8; left: 12px; right: 12px; bottom: 10px; padding: 0; flex-wrap: nowrap; }
  .lesson-player-dialog .player-controls { flex-wrap: nowrap; }
  .lesson-player-dialog .control-btn { padding: 9px 10px; font-size: 11px; }
  .lesson-player-dialog .primary-btn { white-space: nowrap; font-size: 11px; }
}

@media (max-width: 430px) {
  body.page-recorded .feature-preview { min-height: 220px; }
  body.page-recorded .feature-play-icon { width: 62px; height: 62px; font-size: 21px; }
  body.page-recorded .recorded-tabs { gap: 22px; }
  body.page-recorded .lesson-card { padding-inline: 0; }
  body.page-recorded .episode-thumb-wrap { flex-basis: 122px; }
  body.page-recorded .lesson-thumb { width: 122px; height: 69px; }
  .lesson-player-dialog .player-shell { margin: 0; }
}

/* Course detail: concise marketplace hierarchy, fully populated from the course API. */
body.page-course-view .course-view-app { max-width: 1080px; }
body.page-course-view .view-topbar { margin-bottom: 18px; }
body.page-course-view .course-preview-card { overflow: hidden; margin-bottom: 0; border: 1px solid var(--v3-line); border-radius: 20px 20px 0 0; background: #08172a; }
body.page-course-view .course-preview-media { position: relative; isolation: isolate; display: grid; place-items: center; min-height: min(47vw,430px); overflow: hidden; color: #fff; background: radial-gradient(circle at 72% 18%,rgba(41,179,192,.42),transparent 27%),linear-gradient(145deg,#071321,#153c70 68%,#168694); }
body.page-course-view .course-preview-media::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,transparent 40%,rgba(2,8,16,.72)); }
body.page-course-view .course-preview-media iframe { width: 100%; height: 100%; min-height: min(47vw,430px); border: 0; }
body.page-course-view .preview-label { position: absolute; top: 18px; left: 18px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(4,14,27,.48); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
body.page-course-view .preview-play { display: grid; place-items: center; width: 76px; height: 76px; padding-left: 5px; border: 2px solid #fff; border-radius: 50%; background: rgba(5,17,34,.48); font-size: 27px; }
body.page-course-view .course-preview-media > strong { position: absolute; right: 22px; bottom: 20px; left: 22px; color: #fff; font-size: clamp(17px,3vw,25px); text-align: center; }
body.page-course-view .course-hero-card { margin: 0 0 22px; padding: 28px; border: 1px solid var(--v3-line); border-top: 0; border-radius: 0 0 20px 20px; background: var(--v3-surface); color: var(--v3-ink); box-shadow: var(--v3-shadow); }
body.page-course-view .course-hero-card h2 { max-width: 860px; color: var(--v3-ink); font-size: clamp(28px,4vw,44px); }
body.page-course-view .course-hero-card > p { max-width: 820px; color: var(--v3-muted); }
body.page-course-view .hero-badge { border: 0; background: var(--v3-blue); color: #fff; }
body.page-course-view .hero-badge.light { border: 1px solid var(--v3-line); background: var(--v3-blue-soft); color: var(--v3-blue-dark); }
body.page-course-view .course-faculty { margin: -5px 0 18px; font-size: 12px; }
body.page-course-view .course-faculty strong { color: var(--v3-blue-dark); }
body.page-course-view .hero-info-grid { max-width: 720px; }
body.page-course-view .hero-info-box { padding: 13px 14px; border-color: var(--v3-line); border-radius: 10px; background: var(--v3-blue-soft); }
body.page-course-view .hero-info-box span { color: var(--v3-muted); }
body.page-course-view .hero-info-box strong { color: var(--v3-ink); }
body.page-course-view .course-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; grid-template-areas: "content purchase"; gap: 22px; align-items: start; }
body.page-course-view .course-detail-content { grid-area: content; display: grid; gap: 16px; }
body.page-course-view .course-purchase-card { grid-area: purchase; position: sticky; top: 18px; padding: 22px; border: 1px solid var(--v3-line); border-radius: 16px; background: var(--v3-surface); box-shadow: var(--v3-shadow); }
body.page-course-view .purchase-label { margin: 0 0 5px; color: var(--v3-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
body.page-course-view .purchase-price-row { display: flex; align-items: baseline; gap: 9px; margin-bottom: 2px; }
body.page-course-view .purchase-price-row .buy-price { color: var(--v3-ink); font-size: 31px; }
body.page-course-view .buy-old-price { color: var(--v3-muted); text-decoration: line-through; }
body.page-course-view .buy-note { margin: 0 0 16px; color: var(--v3-muted); font-size: 12px; }
body.page-course-view .variant-toggle { gap: 8px; margin-bottom: 10px; }
body.page-course-view .variant-tab { padding: 11px; border-radius: 10px; }
body.page-course-view .variant-summary-card { display: block; margin-bottom: 12px; padding: 13px; border-radius: 10px; }
body.page-course-view .variant-summary-card .variant-price { margin-top: 8px; font-size: 21px; }
body.page-course-view .variant-points { display: none; }
body.page-course-view .course-main-cta { width: 100%; min-height: 50px; border: 0; border-radius: 9px; background: var(--v3-blue); color: #fff; font-weight: 800; }
body.page-course-view .purchase-assurance { margin: 10px 0 16px; color: var(--v3-muted); font-size: 10px; text-align: center; }
body.page-course-view .enroll-card { display: block; margin: 0 0 14px; padding: 14px; border: 1px solid var(--v3-line); border-radius: 10px; background: var(--v3-blue-soft); }
body.page-course-view .enroll-card p { margin: 0 0 10px; color: var(--v3-muted); font-size: 12px; }
body.page-course-view .enroll-card .secondary-btn { width: 100%; min-width: 0; height: 42px; }
body.page-course-view .fee-breakdown { border-top: 1px solid var(--v3-line); padding-top: 13px; }
body.page-course-view .fee-breakdown summary { cursor: pointer; color: var(--v3-ink); font-size: 12px; font-weight: 700; }
body.page-course-view .fee-breakdown .pay-summary-grid { grid-template-columns: 1fr; gap: 7px; margin-top: 11px; }
body.page-course-view .fee-breakdown .pay-summary-box { display: flex; justify-content: space-between; padding: 9px 10px; border-color: var(--v3-line); border-radius: 8px; background: var(--v3-blue-soft); }
body.page-course-view .content-card { margin: 0; padding: 24px; border-radius: 16px; }
body.page-course-view .section-title-row h3 { color: var(--v3-ink); font-size: 22px; }
body.page-course-view .feature-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; }
body.page-course-view .feature-item { padding: 10px 0; border: 0; background: transparent; }
body.page-course-view .feature-icon { width: 24px; min-width: 24px; height: 24px; border-radius: 50%; background: var(--v3-blue-soft); color: var(--v3-blue); font-size: 13px; }
body.page-course-view .feature-text { color: var(--v3-ink); font-size: 13px; }
body.page-course-view .include-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
body.page-course-view .include-item { align-items: center; padding: 11px; border-radius: 9px; }
body.page-course-view .include-icon { width: 25px; min-width: 25px; height: 25px; border-radius: 7px; }
body.page-course-view .include-text { color: var(--v3-ink); font-size: 12px; }
body.page-course-view .curriculum-heading p { margin: 5px 0 0; color: var(--v3-muted); font-size: 12px; }
body.page-course-view .curriculum-list details { border: 1px solid var(--v3-line); border-radius: 10px; overflow: hidden; }
body.page-course-view .curriculum-list summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px; cursor: pointer; background: var(--v3-blue-soft); color: var(--v3-ink); font-size: 13px; font-weight: 700; }
body.page-course-view .curriculum-list summary strong { color: var(--v3-muted); font-size: 11px; }
body.page-course-view .curriculum-items { padding: 4px 14px; }
body.page-course-view .curriculum-item { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--v3-line); color: var(--v3-ink); font-size: 12px; }
body.page-course-view .curriculum-item:last-child { border-bottom: 0; }
body.page-course-view .curriculum-item small { color: var(--v3-muted); }
body.page-course-view .curriculum-icon { color: var(--v3-blue); }

html[data-theme="dark"] body.page-course-view .course-hero-card,
html[data-theme="dark"] body.page-course-view .course-purchase-card,
html[data-theme="dark"] body.page-course-view .content-card { background: var(--v3-surface); border-color: var(--v3-line); color: var(--v3-ink); }
html[data-theme="dark"] body.page-course-view .hero-badge.light,
html[data-theme="dark"] body.page-course-view .hero-info-box,
html[data-theme="dark"] body.page-course-view .enroll-card,
html[data-theme="dark"] body.page-course-view .fee-breakdown .pay-summary-box,
html[data-theme="dark"] body.page-course-view .curriculum-list summary { background: #152b48; border-color: #2d4665; color: #dceaff; }

@media (max-width: 800px) {
  body.page-course-view .course-preview-card { margin-inline: -18px; border-right: 0; border-left: 0; border-radius: 0; }
  body.page-course-view .course-preview-media,
  body.page-course-view .course-preview-media iframe { min-height: 56vw; }
  body.page-course-view .course-hero-card { margin-inline: -18px; padding: 24px 18px; border-right: 0; border-left: 0; border-radius: 0; }
  body.page-course-view .course-detail-grid { grid-template-columns: 1fr; grid-template-areas: "purchase" "content"; }
  body.page-course-view .course-purchase-card { position: static; }
}

@media (max-width: 500px) {
  body.page-course-view .course-preview-media,
  body.page-course-view .course-preview-media iframe { min-height: 230px; }
  body.page-course-view .course-hero-card h2 { font-size: 29px; }
  body.page-course-view .hero-info-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  body.page-course-view .hero-info-box { padding: 10px 8px; }
  body.page-course-view .hero-info-box strong { font-size: 12px; }
  body.page-course-view .feature-list,
  body.page-course-view .include-list { grid-template-columns: 1fr; }
  body.page-course-view .content-card,
  body.page-course-view .course-purchase-card { padding: 18px; }
  body.page-course-view .curriculum-item { grid-template-columns: 20px minmax(0,1fr); }
  body.page-course-view .curriculum-item small { grid-column: 2; }
}
