/* =====================================================================
   Manuels Digital - Classroom (LMS)
   Course pages, My learning, the watch page with its playlist, the video
   player, and the admin LMS. Works inside the dashboard and on the
   standalone visitor pages (which don't load app.css), so every colour
   has a fallback here.
   ===================================================================== */

:root {
    --lms-navy: #102A56;
    --lms-navy-deep: #0B1E42;
    --lms-gold: #D9A52E;
    --lms-gold-ink: #8A6612;
    --lms-gold-soft: #FBF4E2;
    --lms-gold-grad: linear-gradient(135deg, #F0CF7A 0%, #D9A52E 48%, #BE8C1E 100%);
    --lms-navy-grad: linear-gradient(135deg, #163A73 0%, #102A56 48%, #0B1E42 100%);
    --lms-text: var(--color-text, #0F1E3A);
    --lms-muted: var(--muted, #5E6B85);
    --lms-line: var(--color-border, #E3E8F1);
    --lms-card: var(--card-bg, #FFFFFF);
    --lms-soft: #F4F6FB;
    --lms-hover: #EEF2F9;
    --lms-current: rgba(217, 165, 46, .14);
    --lms-success: #15803D;
    --lms-danger: #DC2626;
    --lms-radius: 18px;
    --lms-shadow: 0 1px 2px rgba(16, 42, 86, .05), 0 8px 26px rgba(16, 42, 86, .07);
    --lms-shadow-lg: 0 24px 60px rgba(16, 42, 86, .16);
    --lms-head: 'Sora', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html[data-theme="dark"] {
    --lms-text: #E8EDF7;
    --lms-muted: #9AA8C3;
    --lms-line: #1D3059;
    --lms-card: #0C1A38;
    --lms-soft: #0A1733;
    --lms-hover: #10224A;
    --lms-current: rgba(229, 184, 74, .14);
    --lms-gold-ink: #E5B84A;
    --lms-gold-soft: rgba(217, 165, 46, .12);
    --lms-success: #4ADE80;
    --lms-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 26px rgba(0, 0, 0, .35);
}

.lms { color: var(--lms-text); }
.lms h1, .lms h2, .lms h3, .lms h4 { font-family: var(--lms-head); letter-spacing: -.01em; color: var(--lms-text); }
.lms .muted { color: var(--lms-muted); }
.lms a.lms-link { color: var(--lms-gold-ink); font-weight: 700; text-decoration: none; }
.lms a.lms-link:hover { text-decoration: underline; }

.lms-card { background: var(--lms-card); border: 1px solid var(--lms-line); border-radius: var(--lms-radius); box-shadow: var(--lms-shadow); }
.lms-card-pad { padding: 1.4rem; }
.lms-section-title { font-size: 1.28rem; font-weight: 800; margin: 0 0 .9rem; }

.lms-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 0; border-radius: 12px; padding: .78rem 1.25rem; font-weight: 800; font-size: .95rem;
    text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}
.lms-btn:active { transform: translateY(1px); }
.lms-btn-gold { background: var(--lms-gold-grad); color: var(--lms-navy); box-shadow: 0 10px 24px rgba(217, 165, 46, .3); }
.lms-btn-gold:hover { color: var(--lms-navy); box-shadow: 0 14px 30px rgba(217, 165, 46, .38); }
.lms-btn-navy { background: var(--lms-navy-grad); color: #fff; }
.lms-btn-navy:hover { color: #fff; box-shadow: 0 12px 26px rgba(16, 42, 86, .3); }
.lms-btn-ghost { background: transparent; color: var(--lms-text); border: 1px solid var(--lms-line); }
.lms-btn-ghost:hover { background: var(--lms-hover); color: var(--lms-text); }
.lms-btn-sm { padding: .5rem .85rem; font-size: .85rem; border-radius: 10px; }
.lms-btn-block { width: 100%; }
.lms-btn[disabled] { opacity: .55; cursor: not-allowed; }

.lms-pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .28rem .7rem; font-size: .76rem; font-weight: 800; letter-spacing: .02em; }
.lms-pill-gold { background: var(--lms-gold-soft); color: var(--lms-gold-ink); }
.lms-pill-navy { background: rgba(16, 42, 86, .08); color: var(--lms-navy); }
html[data-theme="dark"] .lms-pill-navy { background: rgba(255, 255, 255, .08); color: #DCE4F5; }
.lms-pill-green { background: rgba(21, 128, 61, .1); color: var(--lms-success); }
.lms-pill-red { background: rgba(220, 38, 38, .1); color: var(--lms-danger); }
.lms-pill-muted { background: var(--lms-soft); color: var(--lms-muted); }

.lms-stars { color: #E5A00D; letter-spacing: 1px; white-space: nowrap; }
.lms-stars .off { color: rgba(229, 160, 13, .28); }
.lms-rating-num { color: #B27C07; font-weight: 800; }
html[data-theme="dark"] .lms-rating-num { color: #F0C766; }

.lms-progress { height: 6px; border-radius: 999px; background: var(--lms-soft); overflow: hidden; }
html[data-theme="dark"] .lms-progress { background: rgba(255, 255, 255, .08); }
.lms-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--lms-gold-grad); }

.lms-empty { text-align: center; padding: 3.2rem 1.5rem; }
.lms-empty .ico { width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; background: var(--lms-gold-soft); color: var(--lms-gold-ink); margin-bottom: 1rem; }

/* ------------------------------------------------------------------ course cards */
.lms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; }
.lms-course-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.lms-course-card:hover { transform: translateY(-3px); box-shadow: var(--lms-shadow-lg); color: inherit; }
.lms-cover { position: relative; aspect-ratio: 16 / 9; background: var(--lms-navy-grad); overflow: hidden; }
.lms-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lms-cover-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #fff; padding: 1rem; text-align: center; }
.lms-cover-fallback i { font-size: 2.2rem; color: var(--lms-gold); }
.lms-cover-fallback b { font-family: var(--lms-head); font-size: 1rem; margin-top: .4rem; line-height: 1.25; }
.lms-cover .lms-cover-badge { position: absolute; top: .7rem; left: .7rem; }
.lms-course-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.lms-course-body h3 { font-size: 1.02rem; font-weight: 800; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lms-course-body .by { font-size: .82rem; color: var(--lms-muted); }
.lms-course-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .78rem; color: var(--lms-muted); }
.lms-course-meta i { color: var(--lms-gold-ink); }
.lms-course-foot { margin-top: auto; padding-top: .55rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.lms-price { font-family: var(--lms-head); font-weight: 800; font-size: 1.12rem; color: var(--lms-text); }

/* ------------------------------------------------------------------ page heading */
.lms-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.lms-page-head h2 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .25rem; }
.lms-page-head p { margin: 0; color: var(--lms-muted); }

/* ------------------------------------------------------------------ course landing */
.lms-landing { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
.lms-hero {
    position: relative; overflow: hidden; border-radius: 24px; padding: 2.2rem 2.2rem 2rem;
    background: radial-gradient(1200px 400px at 110% -40%, rgba(217, 165, 46, .32), transparent 60%), var(--lms-navy-grad);
    color: #fff; box-shadow: var(--lms-shadow);
}
.lms-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .04); }
.lms-hero .crumbs { font-size: .82rem; font-weight: 700; color: rgba(255, 255, 255, .7); margin-bottom: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.lms-hero .crumbs a { color: #F0CF7A; text-decoration: none; }
.lms-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 800; line-height: 1.18; margin: 0 0 .7rem; }
.lms-hero .sub { color: rgba(255, 255, 255, .86); font-size: 1.05rem; line-height: 1.55; margin: 0 0 1rem; max-width: 760px; }
.lms-hero .row-meta { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; align-items: center; font-size: .88rem; color: rgba(255, 255, 255, .85); }
.lms-hero .row-meta i { color: #F0CF7A; margin-right: .3rem; }
.lms-hero .lms-stars .off { color: rgba(240, 207, 122, .35); }
.lms-hero .lms-rating-num { color: #F0CF7A; }
.lms-hero .by a { color: #F0CF7A; font-weight: 700; text-decoration: none; }

.lms-buy { position: sticky; top: 92px; overflow: hidden; }
.lms-buy .lms-cover { aspect-ratio: 16 / 9; }
.lms-buy .preview-btn { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; border: 0; background: linear-gradient(180deg, rgba(7, 20, 51, .05), rgba(7, 20, 51, .62)); color: #fff; font-weight: 800; cursor: pointer; }
.lms-buy .preview-btn .play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--lms-navy); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transition: transform .2s ease; }
.lms-buy .preview-btn:hover .play { transform: scale(1.07); }
.lms-buy-body { padding: 1.3rem; }
.lms-buy .price-big { font-family: var(--lms-head); font-size: 2rem; font-weight: 800; line-height: 1; }
.lms-buy .includes { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: .55rem; font-size: .88rem; }
.lms-buy .includes li { display: flex; gap: .6rem; align-items: flex-start; }
.lms-buy .includes i { color: var(--lms-gold-ink); width: 1.1rem; }
.lms-packages { display: grid; gap: .5rem; margin: 1rem 0; }
.lms-package { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid var(--lms-line); border-radius: 12px; padding: .7rem .85rem; cursor: pointer; font-weight: 700; }
.lms-package input { accent-color: var(--lms-gold); margin-right: .5rem; }
.lms-package:has(input:checked) { border-color: var(--lms-gold); background: var(--lms-gold-soft); }

.lms-learn-box { border: 1px solid var(--lms-line); border-radius: var(--lms-radius); padding: 1.4rem; background: var(--lms-card); }
.lms-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .65rem 1.4rem; }
.lms-checklist li { display: flex; gap: .6rem; font-size: .93rem; line-height: 1.45; }
.lms-checklist li i { color: var(--lms-success); margin-top: .12rem; }
.lms-bullets { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }

.lms-curriculum-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; font-size: .88rem; color: var(--lms-muted); }
.lms-acc { border: 1px solid var(--lms-line); border-radius: var(--lms-radius); overflow: hidden; background: var(--lms-card); }
.lms-acc details + details { border-top: 1px solid var(--lms-line); }
.lms-acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem; background: var(--lms-soft); font-weight: 800; }
.lms-acc summary::-webkit-details-marker { display: none; }
.lms-acc summary .chev { transition: transform .2s ease; color: var(--lms-muted); }
.lms-acc details[open] summary .chev { transform: rotate(180deg); }
.lms-acc summary .s-meta { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--lms-muted); white-space: nowrap; }
.lms-acc .lesson-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.15rem; font-size: .92rem; }
.lms-acc .lesson-row + .lesson-row { border-top: 1px dashed var(--lms-line); }
.lms-acc .lesson-row i.kind { color: var(--lms-muted); }
.lms-acc .lesson-row .t { flex: 1; min-width: 0; }
.lms-acc .lesson-row a.t { color: inherit; text-decoration: none; }
.lms-acc .lesson-row a.t:hover { color: var(--lms-gold-ink); }
.lms-acc .lesson-row .d { color: var(--lms-muted); font-size: .82rem; white-space: nowrap; }
.lms-acc .lesson-row .pv { font-size: .8rem; font-weight: 800; color: var(--lms-gold-ink); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.lms-acc .lesson-row .done { color: var(--lms-success); }

.lms-desc { line-height: 1.75; font-size: .97rem; }
.lms-desc p { margin: 0 0 1rem; }
.lms-clamp { position: relative; max-height: 260px; overflow: hidden; }
.lms-clamp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(180deg, transparent, var(--lms-page-bg, var(--color-light, #F4F6FB))); }
.lms-clamp.is-open { max-height: none; }
.lms-clamp.is-open::after { display: none; }

.lms-instructor { display: grid; grid-template-columns: 112px 1fr; gap: 1.2rem; align-items: start; }
.lms-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--lms-navy-grad); color: #F0CF7A; display: flex; align-items: center; justify-content: center; font-family: var(--lms-head); font-weight: 800; font-size: 2rem; }
.lms-avatar-sm { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; background: var(--lms-navy-grad); color: #F0CF7A; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; overflow: hidden; }
.lms-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

.lms-rating-summary { display: grid; grid-template-columns: 170px 1fr; gap: 1.5rem; align-items: center; }
.lms-rating-big { text-align: center; }
.lms-rating-big b { display: block; font-family: var(--lms-head); font-size: 3.4rem; line-height: 1; color: #B27C07; }
html[data-theme="dark"] .lms-rating-big b { color: #F0C766; }
.lms-dist { display: grid; gap: .45rem; }
.lms-dist-row { display: grid; grid-template-columns: 1fr 96px 46px; gap: .7rem; align-items: center; font-size: .82rem; color: var(--lms-muted); }
.lms-dist-row .lms-progress { height: 8px; }
.lms-review { padding: 1.1rem 0; border-top: 1px solid var(--lms-line); }
.lms-review .who { display: flex; gap: .75rem; align-items: center; margin-bottom: .45rem; }
.lms-star-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.lms-star-input input { position: absolute; opacity: 0; pointer-events: none; }
.lms-star-input label { font-size: 1.7rem; color: rgba(229, 160, 13, .3); cursor: pointer; transition: color .12s ease; }
.lms-star-input label:hover, .lms-star-input label:hover ~ label, .lms-star-input input:checked ~ label { color: #E5A00D; }

/* preview modal */
.lms-modal-backdrop { position: fixed; inset: 0; z-index: 2050; background: rgba(4, 10, 26, .82); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 1rem; }
.lms-modal-backdrop.is-open { display: flex; }
.lms-modal { width: min(960px, 100%); background: #0B1328; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); color: #fff; }
.lms-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.2rem; }
.lms-modal-head small { color: rgba(255, 255, 255, .65); font-weight: 700; display: block; }
.lms-modal-head b { font-family: var(--lms-head); }
.lms-modal-close { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.1rem; }
.lms-modal-close:hover { background: rgba(255, 255, 255, .16); }
.lms-modal .lms-player { border-radius: 0; }
.lms-modal-list { max-height: 210px; overflow: auto; padding: .4rem .6rem .8rem; }
.lms-modal-list button { display: flex; align-items: center; gap: .75rem; width: 100%; border: 0; background: transparent; color: #fff; text-align: left; padding: .55rem .6rem; border-radius: 10px; font-weight: 700; font-size: .9rem; }
.lms-modal-list button:hover, .lms-modal-list button.is-current { background: rgba(255, 255, 255, .08); }
.lms-modal-list button .d { margin-left: auto; color: rgba(255, 255, 255, .6); font-weight: 600; font-size: .8rem; }

/* ------------------------------------------------------------------ My learning */
.lms-mine-card .lms-course-body { gap: .55rem; }
.lms-mine-card .pct { display: flex; justify-content: space-between; font-size: .8rem; color: var(--lms-muted); font-weight: 700; }
.lms-continue { display: grid; grid-template-columns: 300px 1fr; gap: 1.4rem; overflow: hidden; margin-bottom: 1.6rem; }
.lms-continue .lms-cover { aspect-ratio: auto; min-height: 100%; }
.lms-continue-body { padding: 1.4rem 1.4rem 1.4rem 0; display: flex; flex-direction: column; gap: .6rem; justify-content: center; }

/* ------------------------------------------------------------------ watch page */
.lms-watch {
    display: grid; gap: 0 1.5rem;
    grid-template-columns: minmax(0, 1fr) 402px;
    grid-template-areas: "player side" "info side" "tabs side";
    align-items: start;
}
.lms-watch > .lw-player { grid-area: player; }
.lms-watch > .lw-info { grid-area: info; }
.lms-watch > .lw-tabs { grid-area: tabs; }
.lms-watch > .lw-side { grid-area: side; align-self: stretch; }
.lms-watch.is-theater { grid-template-columns: minmax(0, 1fr) 402px; grid-template-areas: "player player" "info side" "tabs side"; }
.lms-watch.is-theater .lms-player { max-height: calc(100vh - 120px); }

.lw-info h1 { font-size: 1.32rem; font-weight: 800; margin: 1rem 0 .7rem; line-height: 1.3; }
.lw-channel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem; }
.lw-channel .ch { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.lw-channel .ch b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.lw-channel .ch small { color: var(--lms-muted); font-size: .8rem; }
.lw-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.lw-chip { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--lms-line); background: var(--lms-card); color: var(--lms-text); font-weight: 800; font-size: .86rem; text-decoration: none; cursor: pointer; transition: background .15s ease; }
.lw-chip:hover { background: var(--lms-hover); color: var(--lms-text); }
.lw-chip.is-done { background: rgba(21, 128, 61, .1); border-color: rgba(21, 128, 61, .3); color: var(--lms-success); }
.lw-chip.gold { background: var(--lms-gold-grad); border: 0; color: var(--lms-navy); }
.lw-chip[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.lw-desc-box { margin-top: 1rem; border-radius: 14px; background: var(--lms-card); border: 1px solid var(--lms-line); padding: .95rem 1.1rem; font-size: .92rem; }
.lw-desc-box .stats { font-weight: 800; margin-bottom: .35rem; }

.lw-tabs { margin-top: 1.3rem; }
.lw-tablist { display: flex; gap: .3rem; border-bottom: 1px solid var(--lms-line); overflow-x: auto; scrollbar-width: none; }
.lw-tablist::-webkit-scrollbar { display: none; }
.lw-tab { border: 0; background: transparent; padding: .75rem 1rem; font-weight: 800; font-size: .92rem; color: var(--lms-muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.lw-tab.is-active { color: var(--lms-text); border-bottom-color: var(--lms-gold); }
.lw-tab .n { font-size: .74rem; background: var(--lms-soft); border-radius: 999px; padding: .08rem .45rem; margin-left: .3rem; color: var(--lms-muted); }
.lw-panel { display: none; padding: 1.2rem 0; }
.lw-panel.is-active { display: block; }

.lw-resource { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--lms-line); border-radius: 14px; background: var(--lms-card); margin-bottom: .6rem; text-decoration: none; color: inherit; }
.lw-resource:hover { border-color: var(--lms-gold); color: inherit; }
.lw-resource .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--lms-gold-soft); color: var(--lms-gold-ink); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: 0 0 auto; }
.lw-resource .nm { flex: 1; min-width: 0; font-weight: 700; }
.lw-resource .nm small { display: block; color: var(--lms-muted); font-weight: 600; }

.lw-note-form { display: flex; gap: .6rem; align-items: flex-start; }
.lw-note-form .at { flex: 0 0 auto; height: 42px; display: inline-flex; align-items: center; padding: 0 .8rem; border-radius: 10px; background: var(--lms-navy); color: #fff; font-weight: 800; font-size: .82rem; }
.lw-note-form textarea { flex: 1; min-height: 42px; resize: vertical; }
.lw-note { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .9rem 0; border-bottom: 1px solid var(--lms-line); }
.lw-time { border: 0; border-radius: 999px; background: var(--lms-navy); color: #fff; font-weight: 800; font-size: .78rem; padding: .25rem .65rem; cursor: pointer; }
.lw-time:hover { background: #1E4A8C; }
.lw-note .body { white-space: pre-wrap; word-break: break-word; font-size: .93rem; }
.lw-icon-btn { border: 0; background: transparent; color: var(--lms-muted); width: 32px; height: 32px; border-radius: 8px; }
.lw-icon-btn:hover { background: var(--lms-hover); color: var(--lms-danger); }

.lw-qa-form textarea { min-height: 84px; }
.lw-qa { display: grid; grid-template-columns: 40px 1fr; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--lms-line); }
.lw-qa.is-reply { padding: .8rem 0 0; border: 0; }
.lw-qa .meta { font-size: .82rem; color: var(--lms-muted); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.lw-qa .meta b { color: var(--lms-text); font-size: .88rem; }
.lw-qa .text { white-space: pre-wrap; word-break: break-word; font-size: .93rem; margin: .25rem 0 .35rem; }
.lw-qa .reply-link { border: 0; background: none; padding: 0; font-size: .82rem; font-weight: 800; color: var(--lms-gold-ink); }
.lw-qa .replies { margin-top: .3rem; }
.lw-instructor-badge { background: var(--lms-navy); color: #F0CF7A; border-radius: 6px; font-size: .7rem; font-weight: 800; padding: .1rem .4rem; }

/* playlist (the YouTube-style panel) */
.lw-side { position: relative; }
.lms-playlist { position: sticky; top: 88px; display: flex; flex-direction: column; max-height: calc(100vh - 110px); overflow: hidden; }
.lpl-head { padding: 1rem 1.1rem .85rem; border-bottom: 1px solid var(--lms-line); background: var(--lms-card); }
.lpl-head .t { font-family: var(--lms-head); font-weight: 800; font-size: 1.05rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lpl-head .s { font-size: .8rem; color: var(--lms-muted); margin-top: .2rem; display: flex; justify-content: space-between; gap: .5rem; }
.lpl-head .lms-progress { margin-top: .6rem; }
.lpl-toggle { border: 0; background: transparent; color: var(--lms-muted); width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; }
.lpl-toggle:hover { background: var(--lms-hover); }
.lpl-body { overflow-y: auto; padding: .35rem .35rem .6rem; overscroll-behavior: contain; scrollbar-width: thin; }
.lms-playlist.is-collapsed .lpl-body { display: none; }
.lpl-section { margin-top: .25rem; }
.lpl-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: 10px; font-size: .8rem; font-weight: 800; color: var(--lms-muted); text-transform: uppercase; letter-spacing: .04em; }
.lpl-section > summary::-webkit-details-marker { display: none; }
.lpl-section > summary:hover { background: var(--lms-hover); }
.lpl-section > summary .chev { margin-left: auto; transition: transform .2s ease; }
.lpl-section[open] > summary .chev { transform: rotate(180deg); }
.lpl-item { display: grid; grid-template-columns: 24px 128px minmax(0, 1fr); gap: .6rem; align-items: center; padding: .45rem .5rem .45rem .2rem; border-radius: 12px; text-decoration: none; color: inherit; }
.lpl-item:hover { background: var(--lms-hover); color: inherit; }
.lpl-item.is-current { background: var(--lms-current); }
.lpl-num { font-size: .78rem; font-weight: 700; color: var(--lms-muted); text-align: center; }
.lpl-item.is-current .lpl-num { color: var(--lms-gold-ink); }
.lpl-thumb { position: relative; width: 128px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--lms-navy-grad); }
.lpl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lpl-thumb .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(240, 207, 122, .9); font-size: 1.4rem; }
.lpl-dur { position: absolute; right: 4px; bottom: 5px; background: rgba(0, 0, 0, .82); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; padding: .2rem .3rem; border-radius: 4px; }
.lpl-watched { position: absolute; left: 0; bottom: 0; height: 3px; background: #E8B23A; }
.lpl-lock { position: absolute; inset: 0; background: rgba(7, 20, 51, .55); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }
.lpl-title { font-weight: 700; font-size: .86rem; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lpl-meta { font-size: .74rem; color: var(--lms-muted); margin-top: .2rem; display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.lpl-meta .done { color: var(--lms-success); font-weight: 800; }
.lpl-meta .pv { color: var(--lms-gold-ink); font-weight: 800; }
.lpl-item.is-locked .lpl-title { color: var(--lms-muted); }

/* ------------------------------------------------------------------ the player */
.lms-player {
    position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; color: #fff;
    box-shadow: 0 18px 50px rgba(7, 20, 51, .28);
}
.lms-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lms-player video::-webkit-media-controls, .lms-player video::-webkit-media-controls-enclosure { display: none !important; }
.lms-player:fullscreen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.lms-player:-webkit-full-screen { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.lms-player.is-pseudo-fs { position: fixed; inset: 0; z-index: 3000; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
body.lms-noscroll { overflow: hidden; }
.lms-player.is-idle { cursor: none; }

.lp-poster { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: center; transition: opacity .4s ease; pointer-events: none; }
.lp-surface { position: absolute; inset: 0; z-index: 2; }
.lms-player.has-started .lp-poster { opacity: 0; pointer-events: none; }
.lp-watermark { position: absolute; z-index: 3; pointer-events: none; font-weight: 800; font-size: clamp(10px, 1.45vw, 15px); color: rgba(255, 255, 255, .34); text-shadow: 0 1px 3px rgba(0, 0, 0, .55); white-space: nowrap; transition: opacity 1s ease; letter-spacing: .02em; }
.lp-center { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.lp-bigplay { pointer-events: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(16, 42, 86, .78); color: #fff; font-size: 2.3rem; display: flex; align-items: center; justify-content: center; padding-left: 6px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .08); transition: transform .18s ease, background .18s ease; backdrop-filter: blur(4px); }
.lp-bigplay:hover { transform: scale(1.06); background: rgba(217, 165, 46, .92); color: var(--lms-navy); }
.lms-player.is-playing .lp-bigplay { display: none; }
.lms-player.is-touch.is-playing:not(.is-idle):not(.is-waiting) .lp-bigplay { display: flex; padding-left: 0; }
.lp-spinner { display: none; width: 58px; height: 58px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: #F0CF7A; animation: lms-spin .8s linear infinite; }
.lms-player.is-waiting .lp-spinner { display: block; }
.lms-player.is-waiting .lp-bigplay { display: none; }
@keyframes lms-spin { to { transform: rotate(360deg); } }
.lp-flash { position: absolute; left: 50%; top: 50%; z-index: 5; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; opacity: 0; pointer-events: none; }
.lp-flash.go { animation: lms-flash .55s ease-out; }
@keyframes lms-flash { 0% { opacity: .95; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.35); } }
.lp-seekhint { position: absolute; top: 50%; z-index: 5; transform: translateY(-50%); background: rgba(0, 0, 0, .55); padding: .5rem .9rem; border-radius: 999px; font-weight: 800; font-size: .9rem; opacity: 0; transition: opacity .2s; pointer-events: none; }
.lp-seekhint.left { left: 8%; }
.lp-seekhint.right { right: 8%; }
.lp-seekhint.show { opacity: 1; }

.lp-toast { position: absolute; left: 1rem; bottom: 74px; z-index: 6; background: rgba(11, 19, 40, .92); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: .55rem .6rem .55rem .9rem; font-size: .86rem; font-weight: 700; display: flex; align-items: center; gap: .75rem; opacity: 0; transform: translateY(8px); transition: all .25s ease; pointer-events: none; }
.lp-toast.show { opacity: 1; transform: none; pointer-events: auto; }
.lp-toast button { border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 8px; padding: .3rem .65rem; font-weight: 800; font-size: .8rem; }
.lp-toast button:hover { background: rgba(255, 255, 255, .22); }
.lp-unmute { position: absolute; left: 1rem; top: 1rem; z-index: 6; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #0B1328; font-weight: 800; padding: .5rem .9rem; display: none; }
.lms-player.is-muted-auto .lp-unmute { display: inline-flex; gap: .4rem; align-items: center; }

.lp-message { position: absolute; inset: 0; z-index: 7; display: none; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: radial-gradient(600px 300px at 50% 0%, rgba(217, 165, 46, .18), transparent 70%), #0B1328; }
.lp-message.show { display: flex; }
.lp-message .ico { font-size: 2.4rem; color: #F0CF7A; }
.lp-message p { color: rgba(255, 255, 255, .8); max-width: 440px; margin: .6rem auto 1rem; }

.lp-end { position: absolute; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; background: rgba(4, 10, 26, .86); padding: 1.5rem; }
.lp-end.show { display: flex; }
.lp-end-card { width: min(520px, 100%); text-align: center; }
.lp-end small { color: rgba(255, 255, 255, .7); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.lp-end .next { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; align-items: center; text-align: left; background: rgba(255, 255, 255, .06); border-radius: 14px; padding: .75rem; margin: .7rem 0 1rem; }
.lp-end .next .lpl-thumb { width: 180px; }
.lp-end .next b { font-family: var(--lms-head); display: block; line-height: 1.3; }
.lp-end .ring { width: 40px; height: 40px; transform: rotate(-90deg); }
.lp-end .ring circle { fill: none; stroke-width: 4; }
.lp-end .ring .ring-bg { stroke: rgba(255, 255, 255, .18); }
.lp-end .ring .ring-fg { stroke: #F0CF7A; stroke-linecap: round; transition: stroke-dashoffset 1s linear; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; }
.lp-end .btns { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.lp-end .btns button, .lp-end .btns a { border: 0; border-radius: 999px; padding: .6rem 1.2rem; font-weight: 800; text-decoration: none; }
.lp-end .btns .ghost { background: rgba(255, 255, 255, .1); color: #fff; }
.lp-end .btns .ghost:hover { background: rgba(255, 255, 255, .2); }
.lp-end .btns .solid { background: var(--lms-gold-grad); color: var(--lms-navy); }

.lp-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 2.2rem .85rem .55rem; background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .45) 45%, rgba(0, 0, 0, .78) 100%); transition: opacity .25s ease; }
.lms-player.is-idle.is-playing .lp-controls { opacity: 0; pointer-events: none; }
.lp-progress { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin-bottom: .15rem; }
.lp-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); transition: height .12s ease; }
.lp-progress:hover .lp-track, .lp-progress.is-dragging .lp-track { height: 6px; }
.lp-buffered { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .42); border-radius: inherit; }
.lp-played { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #F0CF7A, #D9A52E); border-radius: inherit; }
.lp-handle { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #F0CF7A; box-shadow: 0 0 0 4px rgba(240, 207, 122, .25); transform: scale(0); transition: transform .12s ease; }
.lp-progress:hover .lp-handle, .lp-progress.is-dragging .lp-handle { transform: scale(1); }
.lp-hovertime { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(11, 19, 40, .94); padding: .22rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 800; white-space: nowrap; opacity: 0; pointer-events: none; }
.lp-progress:hover .lp-hovertime, .lp-progress.is-dragging .lp-hovertime { opacity: 1; }
.lp-row { display: flex; align-items: center; gap: .15rem; }
.lp-row .grow { flex: 1; }
.lp-btn { width: 42px; height: 40px; border: 0; background: transparent; color: #fff; border-radius: 8px; font-size: 1.28rem; display: inline-flex; align-items: center; justify-content: center; opacity: .92; flex: 0 0 auto; }
.lp-btn:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.lp-btn[disabled] { opacity: .35; }
.lp-time { font-size: .86rem; font-weight: 700; padding: 0 .55rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-volume { display: flex; align-items: center; }
.lp-volume input { width: 0; opacity: 0; transition: width .2s ease, opacity .2s ease; accent-color: #F0CF7A; height: 4px; }
.lp-volume:hover input, .lp-volume:focus-within input { width: 78px; opacity: 1; margin-right: .4rem; }
.lp-switch { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: #fff; font-size: .74rem; font-weight: 800; padding: 0 .4rem; height: 40px; opacity: .92; }
.lp-switch .knob { width: 34px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, .3); position: relative; transition: background .15s; }
.lp-switch .knob::after { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.lp-switch.is-on .knob { background: #D9A52E; }
.lp-switch.is-on .knob::after { transform: translateX(16px); }
.lp-menu { position: absolute; right: .85rem; bottom: 58px; z-index: 9; min-width: 180px; background: rgba(11, 19, 40, .96); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: .35rem; display: none; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.lp-menu.show { display: block; }
.lp-menu .h { font-size: .72rem; font-weight: 800; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .07em; padding: .4rem .6rem .25rem; }
.lp-menu button { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: transparent; color: #fff; padding: .45rem .6rem; border-radius: 8px; font-weight: 700; font-size: .88rem; }
.lp-menu button:hover { background: rgba(255, 255, 255, .08); }
.lp-menu button.is-on::after { content: '\2713'; color: #F0CF7A; font-weight: 800; }

@media (max-width: 640px) {
    .lp-btn { width: 36px; font-size: 1.15rem; }
    .lp-time { font-size: .76rem; padding: 0 .3rem; }
    .lp-switch .lbl, .lp-volume input { display: none; }
    .lp-bigplay { width: 64px; height: 64px; font-size: 1.9rem; }
    .lp-hide-sm { display: none !important; }
    .lp-end .next { grid-template-columns: 1fr; }
    .lp-end .next .lpl-thumb { width: 100%; }
}

/* ------------------------------------------------------------------ certificate link card */
.lms-cert-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border-radius: 16px; background: var(--lms-gold-soft); border: 1px solid rgba(217, 165, 46, .35); }
.lms-cert-card i { font-size: 1.8rem; color: var(--lms-gold-ink); }

/* ------------------------------------------------------------------ admin LMS */
.lms-admin .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.lms-kpi { padding: 1.1rem 1.2rem; }
.lms-kpi small { display: block; color: var(--lms-muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.lms-kpi b { display: block; font-family: var(--lms-head); font-size: 1.65rem; font-weight: 800; margin-top: .25rem; color: var(--lms-text); }
.lms-kpi span { font-size: .8rem; color: var(--lms-muted); }
.lms-admin-course { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1rem; }
.lms-admin-course .lms-cover { border-radius: 12px; }
.lms-admin-course h3 { font-size: 1.08rem; font-weight: 800; margin: 0 0 .35rem; }
.lms-admin-course .nums { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .84rem; color: var(--lms-muted); margin-top: .5rem; }
.lms-admin-course .nums b { color: var(--lms-text); }
.lms-admin-head { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; padding: 1.1rem; margin-bottom: 1rem; }
.lms-admin-head .lms-cover { border-radius: 12px; }
.lms-admin-head h2 { font-size: 1.35rem; font-weight: 800; margin: 0 0 .3rem; }
.lms-admin-tabs { display: flex; gap: .3rem; overflow-x: auto; border-bottom: 1px solid var(--lms-line); margin-bottom: 1.3rem; scrollbar-width: none; }
.lms-admin-tabs a { padding: .75rem 1rem; font-weight: 800; color: var(--lms-muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; font-size: .92rem; }
.lms-admin-tabs a.is-active { color: var(--lms-text); border-bottom-color: var(--lms-gold); }
.lms-admin-tabs a .n { font-size: .72rem; background: var(--lms-danger); color: #fff; border-radius: 999px; padding: .05rem .4rem; margin-left: .3rem; }

.lms-sec { margin-bottom: 1rem; overflow: hidden; }
.lms-sec-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; background: var(--lms-soft); border-bottom: 1px solid var(--lms-line); }
.lms-sec-head .grip, .lms-row .grip { cursor: grab; color: var(--lms-muted); font-size: 1.1rem; padding: .2rem; }
.lms-sec-head .name { font-weight: 800; flex: 1; min-width: 0; }
.lms-sec-head .name small { color: var(--lms-muted); font-weight: 600; margin-left: .4rem; }
.lms-sec-body { min-height: 14px; }
.lms-row { display: grid; grid-template-columns: 24px 112px minmax(0, 1fr) auto; gap: .85rem; align-items: center; padding: .65rem 1rem; border-bottom: 1px solid var(--lms-line); background: var(--lms-card); }
.lms-row:last-child { border-bottom: 0; }
.lms-row .lpl-thumb { width: 112px; }
.lms-row .ttl { font-weight: 800; text-decoration: none; color: var(--lms-text); }
.lms-row .ttl:hover { color: var(--lms-gold-ink); }
.lms-row .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.lms-row.sortable-ghost { opacity: .4; }
.lms-row.sortable-chosen { box-shadow: var(--lms-shadow-lg); }
.lms-sec-foot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem 1rem; }
.lms-sec-foot form { display: flex; gap: .5rem; flex: 1; min-width: 240px; }

.lms-dropzone { border: 2px dashed rgba(217, 165, 46, .55); border-radius: 18px; background: var(--lms-gold-soft); padding: 2.4rem 1.5rem; text-align: center; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.lms-dropzone:hover, .lms-dropzone.is-over { background: rgba(217, 165, 46, .2); border-color: var(--lms-gold); }
.lms-dropzone .ico { font-size: 2.4rem; color: var(--lms-gold-ink); }
.lms-upload { border: 1px solid var(--lms-line); border-radius: 14px; padding: .9rem 1rem; background: var(--lms-card); }
.lms-upload + .lms-upload { margin-top: .6rem; }
.lms-upload .top { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; font-weight: 700; }
.lms-upload .top span:last-child { color: var(--lms-muted); white-space: nowrap; }
.lms-upload .lms-progress { height: 8px; margin-top: .55rem; }
.lms-upload.is-done .lms-progress > span { background: linear-gradient(90deg, #22C55E, #15803D); }
.lms-upload.is-error { border-color: rgba(220, 38, 38, .45); }
.lms-upload .err { color: var(--lms-danger); font-size: .82rem; margin-top: .4rem; }

.lms-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.lms-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lms-muted); font-weight: 800; padding: .8rem 1rem; background: var(--lms-soft); white-space: nowrap; text-align: left; }
.lms-table td { padding: .8rem 1rem; border-top: 1px solid var(--lms-line); vertical-align: middle; }
.lms-table .pbar { display: flex; align-items: center; gap: .6rem; min-width: 140px; }
.lms-table .pbar .lms-progress { flex: 1; }
.lms-thread { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--lms-line); }
.lms-thread:last-child { border-bottom: 0; }
.lms-thread.is-hidden { opacity: .6; }
.lms-chart { --bar: #2A5BA8; --meter-track: #E6EDF8; display: flex; align-items: flex-end; gap: 2px; height: 190px; padding: 1.4rem .25rem 0; border-bottom: 1px solid var(--lms-line); }
html[data-theme="dark"] .lms-chart { --bar: #5B8DEF; --meter-track: rgba(91, 141, 239, .18); }
.lms-chart .col { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; outline: none; border-radius: 6px; }
.lms-chart .col:hover, .lms-chart .col:focus-visible { background: var(--lms-soft); }
.lms-chart .bar { width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--bar); min-height: 2px; transition: filter .12s ease; }
.lms-chart .col:hover .bar, .lms-chart .col:focus-visible .bar { filter: brightness(1.18); }
.lms-chart .val { font-size: .72rem; font-weight: 800; color: var(--lms-text); margin-bottom: .2rem; font-variant-numeric: tabular-nums; }
.lms-chart .tip { position: absolute; top: 0; left: 50%; transform: translate(-50%, -105%); z-index: 2; background: #0B1328; color: #fff; font-size: .74rem; padding: .3rem .5rem; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s ease; text-align: center; line-height: 1.3; }
.lms-chart .tip b { display: block; font-size: .86rem; }
.lms-chart .col:hover .tip, .lms-chart .col:focus-visible .tip { opacity: 1; }
.lms-chart-axis { display: flex; gap: 2px; padding: .4rem .25rem 0; }
.lms-chart-axis span { flex: 1; min-width: 0; text-align: center; font-size: .66rem; color: var(--lms-muted); white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .lms-chart-axis span.minor { visibility: hidden; } }
.lms-meter { --fill: #2A5BA8; --track: #E6EDF8; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
html[data-theme="dark"] .lms-meter { --fill: #5B8DEF; --track: rgba(91, 141, 239, .18); }
.lms-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--fill); }

/* ------------------------------------------------------------------ text on dark parts
   The dashboard stylesheet gives every span, div, p and link the page text colour
   (navy in light mode). Inside the dark parts of the classroom (the player, the
   course hero, the preview window) text has to stay light, so those parts set
   their own colour and their plain children follow it. */
.lp-seekhint, .lp-toast, .lp-hovertime, .lp-time, .lp-switch, .lp-switch .lbl, .lp-rate-label,
.lp-end-card, .lp-message, .lms-modal-head, .lms-modal-list { color: #fff; }
.lms-player :is(span, div, p, small, b):not([class]),
.lms-player .lp-end-card .count-wrap, .lms-player .lp-end-card .count,
.lms-hero :is(span, div, small, b):not([class]),
.lms-modal :is(span, div, b):not([class]),
.lms-buy .preview-btn span:not([class]),
.lms-cover-fallback b { color: inherit; }
.lms-hero .row-meta span.ms-1 { color: inherit; }
.lms-hero .crumbs span:not([class]) { color: rgba(255, 255, 255, .7); }

html[data-theme="dark"] .lms-pill-gold, html[data-theme="dark"] .lpl-meta .pv { color: #E5B84A; }
html[data-theme="dark"] .lms-pill-navy { color: #DCE4F5; }
html[data-theme="dark"] .lms-pill-green, html[data-theme="dark"] .lpl-meta .done, html[data-theme="dark"] .lms-acc .lesson-row .done { color: #4ADE80; }
html[data-theme="dark"] .lms-pill-red { color: #F87171; }
html[data-theme="dark"] .lms-pill-muted, html[data-theme="dark"] .lms-course-meta span, html[data-theme="dark"] .lpl-meta span:not([class]) { color: #9AA8C3; }
html[data-theme="dark"] .lms-stars { color: #E5A00D; }
html[data-theme="dark"] .lms-avatar, html[data-theme="dark"] .lms-avatar-sm, html[data-theme="dark"] .lw-instructor-badge { color: #F0CF7A; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1199.98px) {
    .lms-watch, .lms-watch.is-theater { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "info" "side" "tabs"; }
    .lms-playlist { position: static; max-height: 520px; margin-top: 1.2rem; }
}
@media (max-width: 991.98px) {
    .lms-landing { grid-template-columns: minmax(0, 1fr); }
    .lms-buy { position: static; }
    .lms-landing > aside { order: -1; }
    .lms-admin-course, .lms-admin-head { grid-template-columns: 120px minmax(0, 1fr); }
    .lms-admin-course > :last-child, .lms-admin-head > :last-child { grid-column: 1 / -1; }
    .lms-continue { grid-template-columns: 1fr; }
    .lms-continue-body { padding: 0 1.2rem 1.3rem; }
}
@media (max-width: 640px) {
    .lms-hero { padding: 1.5rem 1.25rem; border-radius: 18px; }
    .lms-checklist { grid-template-columns: 1fr; }
    .lms-instructor { grid-template-columns: 1fr; }
    .lms-rating-summary { grid-template-columns: 1fr; }
    .lms-player { border-radius: 12px; }
    .lw-channel .ch b { max-width: 220px; }
    .lms-row { grid-template-columns: 22px 84px minmax(0, 1fr); }
    .lms-row .lpl-thumb { width: 84px; }
    .lms-row > :last-child { grid-column: 2 / -1; }
    .lpl-item { grid-template-columns: 20px 112px minmax(0, 1fr); }
    .lpl-thumb { width: 112px; }
}

/* One save button for the whole lesson page, kept in reach while scrolling */
.lms-savebar { position: sticky; bottom: 12px; z-index: 20; margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 16px; background: var(--lms-card, #fff); border: 1px solid var(--lms-line, #E5E7EB); border-radius: 14px; box-shadow: 0 10px 30px rgba(16, 42, 86, .12); }

/* Course page for visitors: the YouTube-style lesson list, locked until they enroll */
.lms-locked-list { border: 1px solid var(--lms-line); border-radius: var(--lms-radius); background: var(--lms-card); overflow: hidden; }
.lms-locked-list .ll-section { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .75rem; padding: .85rem 1.1rem; background: var(--lms-soft); font-weight: 800; border-bottom: 1px solid var(--lms-line); }
.lms-locked-list .ll-row + .ll-section { border-top: 1px solid var(--lms-line); }
.lms-locked-list .ll-section small { font-weight: 600; color: var(--lms-muted); }
.lms-locked-list .ll-row { display: flex; align-items: center; gap: .85rem; padding: .7rem 1.1rem; }
.lms-locked-list .ll-row + .ll-row { border-top: 1px dashed var(--lms-line); }
.lms-locked-list .ll-num { width: 1.4rem; flex: none; text-align: center; font-size: .8rem; font-weight: 700; color: var(--lms-muted); font-variant-numeric: tabular-nums; }
.lms-locked-list .ll-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 0; padding: 0; display: grid; place-items: center; background: linear-gradient(135deg, #163A73, #102A56); color: rgba(255, 255, 255, .75); font-size: 1.4rem; }
.lms-locked-list button.ll-thumb { cursor: pointer; }
.lms-locked-list .ll-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lms-locked-list .is-locked .ll-thumb img, .lms-locked-list .is-locked .ll-thumb > i { filter: blur(6px) saturate(.7); transform: scale(1.1); }
.lms-locked-list .ll-dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.lms-locked-list .ll-lock, .lms-locked-list .ll-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.15rem; }
.lms-locked-list .ll-lock { background: rgba(16, 42, 86, .45); }
.lms-locked-list .ll-play i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
.lms-locked-list .ll-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.lms-locked-list .ll-title { font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lms-locked-list .ll-blur { filter: blur(5px); color: var(--lms-muted); letter-spacing: -.12em; user-select: none; white-space: nowrap; display: block; }
.lms-locked-list .ll-text small { font-size: .78rem; color: var(--lms-muted); }
.lms-locked-list .ll-free { color: var(--lms-gold-ink); font-weight: 700; }
.lms-locked-list .pv { flex: none; border: 0; background: none; padding: 0; font-weight: 700; font-size: .85rem; color: var(--lms-gold-ink); text-decoration: underline; }
@media (max-width: 575.98px) {
    .lms-locked-list .ll-row { gap: .65rem; padding: .65rem .8rem; }
    .lms-locked-list .ll-section { padding: .75rem .8rem; }
    .lms-locked-list .ll-num { display: none; }
    .lms-locked-list .ll-thumb { width: 104px; }
    .lms-locked-list .pv { display: none; }
}

/* Certificate signature: the draw pad and the saved signature on the course details tab */
.lms-sig-pad { position: relative; height: 150px; border: 1.5px dashed var(--lms-line); border-radius: 12px; background: #fff; }
.lms-sig-pad canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; border-radius: 12px; }
.lms-sig-pad .hint { position: absolute; left: 16px; right: 16px; bottom: 28px; border-top: 1px solid #CBD5E1; padding-top: 4px; font-size: .75rem; color: #94A3B8; pointer-events: none; }
.lms-sig-current { padding: 10px; border: 1px solid var(--lms-line); border-radius: 12px; background: #fff; }
.lms-sig-current img { display: block; max-width: 100%; max-height: 90px; margin: 0 auto; }
.lms-sig-current .form-check { color: #475569; }

/* Next-course suggestions shown when a student finishes a course */
.lms-upsell { border: 1px solid var(--lms-line); border-radius: var(--lms-radius); background: var(--lms-card); overflow: hidden; }
.lms-upsell-head { padding: .9rem 1.1rem; background: var(--lms-navy-grad); color: #fff; display: flex; flex-direction: column; gap: .15rem; }
.lms-upsell-head span { font-weight: 800; color: #fff; }
.lms-upsell-head span i { color: #F0CF7A; }
.lms-upsell-head small { color: rgba(255, 255, 255, .8); }
.lms-upsell-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lms-upsell-card { display: flex; align-items: center; gap: .8rem; padding: .85rem 1.1rem; text-decoration: none; color: inherit; border-top: 1px solid var(--lms-line); }
.lms-upsell-card:hover { background: var(--lms-soft); }
.lms-upsell-card .cv { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--lms-navy-grad); color: #F0CF7A; }
.lms-upsell-card .cv img { width: 100%; height: 100%; object-fit: cover; }
.lms-upsell-card .tx { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.lms-upsell-card .tx b { line-height: 1.25; }
.lms-upsell-card .tx small { color: var(--lms-muted); }
.lms-upsell-card .tx .pr { font-weight: 800; color: var(--lms-gold-ink); }
.lms-upsell-card .go { color: var(--lms-muted); }

/* Course page: share link that earns a referral commission */
.lms-share { margin-top: 1rem; padding: 1rem; border: 1px dashed var(--lms-gold, #D9A52E); border-radius: var(--lms-radius); background: var(--lms-card); }
.lms-share-head { font-weight: 800; margin-bottom: .35rem; }
.lms-share-head i { color: var(--lms-gold-ink); }
.lms-share-wa { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; font-size: .85rem; font-weight: 700; color: #15803D; text-decoration: none; }
html[data-theme="dark"] .lms-share-wa { color: #4ADE80; }
