/**
 * lms-bundle.css — premium design system shared by every front-end surface
 * (login, admin dashboard, affiliate portal, course player, checkout).
 * One CSS file, one set of tokens, so a change here is consistent
 * everywhere without touching JS. Tailwind-naming-inspired utility classes
 * (no Tailwind CLI/build step in this deploy — Hostinger, no Node
 * pipeline) plus a small set of branded components.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
	/* Brand — matched to the Aslam Kureshi "A" mark (light blue to deep navy) */
	--lms-primary: #1D6FB8;
	--lms-primary-2: #1465AD;
	--lms-primary-dark: #0B2C52;
	--lms-primary-grad: linear-gradient(135deg, #3B9FE0 0%, #0F2C52 100%);
	--lms-primary-soft: #EAF3FB;

	/* Neutrals */
	--lms-bg: #F6F8FA;
	--lms-surface: #FFFFFF;
	--lms-surface-2: #F8FAFC;
	--lms-border: #E7ECF1;
	--lms-border-strong: #D6DEE6;
	--lms-text: #101B2D;
	--lms-text-muted: #64748B;
	--lms-text-faint: #A3AEBC;

	/* Semantic */
	--lms-success: #059669;
	--lms-success-bg: #ECFDF5;
	--lms-warning: #D97706;
	--lms-warning-bg: #FFFBEB;
	--lms-danger: #DC2626;
	--lms-danger-bg: #FEF2F2;

	/* Dark sidebar (Kajabi/Linear/Vercel-style hierarchy: dark nav, light content) */
	--lms-ink: #0B1B30;
	--lms-ink-2: #12233C;
	--lms-ink-border: #1E3352;
	--lms-ink-text: #93A6C0;
	--lms-ink-text-bright: #F3F7FB;

	/* Shape & depth */
	--lms-radius: 14px;
	--lms-radius-sm: 10px;
	--lms-radius-lg: 20px;
	--lms-shadow-sm: 0 1px 2px rgba(21, 18, 31, 0.04), 0 1px 1px rgba(21, 18, 31, 0.04);
	--lms-shadow-md: 0 4px 16px rgba(21, 18, 31, 0.06), 0 1px 3px rgba(21, 18, 31, 0.05);
	--lms-shadow-lg: 0 12px 32px rgba(21, 18, 31, 0.10), 0 2px 6px rgba(21, 18, 31, 0.05);
	--lms-shadow-glow: 0 8px 24px rgba(17, 91, 158, 0.25);
	--lms-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------------------------------------------
 * Dark mode — three-state: explicit choice (data-theme, set by the
 * toggle + persisted to localStorage), OS preference (media query,
 * only when no explicit choice overrides it), default light.
 * Every component below is built from these tokens via var(), so
 * redefining them here re-skins the whole app with no other changes.
 * --------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--lms-primary-soft: #16324F;
		--lms-bg: #0B1220; --lms-surface: #131C2E; --lms-surface-2: #1A2436;
		--lms-border: #253148; --lms-border-strong: #33415C;
		--lms-text: #EAF0F8; --lms-text-muted: #94A3B8; --lms-text-faint: #64748B;
		--lms-success-bg: #0F2A22; --lms-warning-bg: #2E2410; --lms-danger-bg: #331419;
		--lms-shadow-sm: 0 1px 2px rgba(0,0,0,.3); --lms-shadow-md: 0 4px 16px rgba(0,0,0,.35);
		--lms-shadow-lg: 0 12px 32px rgba(0,0,0,.45);
	}
}
:root[data-theme="dark"] {
	--lms-primary-soft: #16324F;
	--lms-bg: #0B1220; --lms-surface: #131C2E; --lms-surface-2: #1A2436;
	--lms-border: #253148; --lms-border-strong: #33415C;
	--lms-text: #EAF0F8; --lms-text-muted: #94A3B8; --lms-text-faint: #64748B;
	--lms-success-bg: #0F2A22; --lms-warning-bg: #2E2410; --lms-danger-bg: #331419;
	--lms-shadow-sm: 0 1px 2px rgba(0,0,0,.3); --lms-shadow-md: 0 4px 16px rgba(0,0,0,.35);
	--lms-shadow-lg: 0 12px 32px rgba(0,0,0,.45);
}
.lms-theme-toggle {
	display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
	border-radius: 50%; border: 1px solid var(--lms-border-strong); background: var(--lms-surface);
	color: var(--lms-text); cursor: pointer; font-size: 15px; transition: background .15s var(--lms-ease);
}
.lms-theme-toggle:hover { background: var(--lms-surface-2); }
.lms-theme-toggle.is-on-dark { background: rgba(255,255,255,0.06); border-color: var(--lms-ink-border); color: var(--lms-ink-text-bright); }
.lms-theme-toggle.is-on-dark:hover { background: rgba(255,255,255,0.12); }

/* Honeypot: off-screen (not display:none — some bots skip fields hidden
   that way) rather than visually collapsed, so it never occupies layout
   space or gets focused by keyboard/tab order for a real visitor. */
.lms-honeypot { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lms-app, .lms-app * { box-sizing: border-box; }

.lms-app {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--lms-text);
	background: var(--lms-bg);
	min-height: 100vh;
	line-height: 1.55;
	font-size: 14px;
	-webkit-font-smoothing: antialiased;
}

.lms-app a { color: var(--lms-primary-2); text-decoration: none; }
.lms-app a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
 * Layout
 * --------------------------------------------------------------- */
.lms-shell { display: flex; min-height: 100vh; }

.lms-sidebar {
	width: max-content;
	min-width: 180px;
	flex-shrink: 0;
	background: var(--lms-ink);
	background-image: radial-gradient(circle at 0% 0%, rgba(59, 159, 224, 0.18), transparent 55%);
	border-right: 1px solid var(--lms-ink-border);
	padding: 22px 22px;
	display: flex;
	flex-direction: column;
}
.lms-main { flex: 1; min-width: 0; padding: 32px 36px; }

.lms-brand {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
	color: var(--lms-ink-text-bright);
	padding: 6px 10px 22px;
}
.lms-brand-mark {
	width: 30px; height: 30px; border-radius: 9px;
	background: var(--lms-primary-grad);
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 14px; color: #fff;
	box-shadow: 0 4px 12px rgba(17, 91, 158, 0.4);
	flex-shrink: 0;
}
/* The real logo file has a near-white background — on a dark sidebar/auth
   panel it needs a white chip under it to read as intentional, not a
   stray box. On light backgrounds (login card) it's used bare. */
.lms-brand-logo-chip {
	background: #fff; border-radius: 10px; padding: 6px 8px;
	display: inline-flex; align-items: center;
	box-shadow: var(--lms-shadow-sm);
	flex-shrink: 0;
}
.lms-brand-logo-chip img { display: block; height: 22px; width: auto; }
.lms-brand-logo-bare { display: block; height: 34px; width: auto; margin: 0 auto; }

.lms-nav-item {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: center; white-space: nowrap;
	color: var(--lms-ink-text); font-weight: 500; font-size: 13.5px; margin-bottom: 2px;
	transition: background .15s var(--lms-ease), color .15s var(--lms-ease);
}
.lms-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--lms-ink-text-bright); }
.lms-nav-item:focus-visible, .lms-lesson-item:focus-visible, .lms-course-card:focus-visible, .lms-search-result:focus-visible { outline: 2px solid #6FC3F7; outline-offset: -2px; }
.lms-nav-item.is-active {
	background: linear-gradient(135deg, rgba(59,159,224,0.35), rgba(15,44,82,0.45));
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(96, 172, 224, 0.35);
}

.lms-container { max-width: 1120px; margin: 0 auto; padding: 32px 24px; }
.lms-topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--lms-border); flex-wrap: wrap; gap: 12px; }
.lms-course-card { display: flex; flex-direction: column; }
.lms-course-card .lms-btn { align-self: flex-start; }
.lms-two-pane { display: flex; min-height: 100vh; }
.lms-two-pane .lms-pane-sidebar { width: 330px; flex-shrink: 0; background: var(--lms-surface); border-right: 1px solid var(--lms-border); overflow-y: auto; }
.lms-two-pane .lms-pane-main { flex: 1; min-width: 0; background: #050507; display: flex; flex-direction: column; }

.lms-player-header {
	background: var(--lms-surface); border-bottom: 1px solid var(--lms-border);
	padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
	flex-wrap: wrap; position: sticky; top: 0; z-index: 5;
}
.lms-player-breadcrumb { font-size: 12.5px; color: var(--lms-text-muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.lms-player-breadcrumb-sep { color: var(--lms-text-faint); }
.lms-player-breadcrumb-lesson { color: var(--lms-text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-player-progress { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lms-player-progress .lms-progress-track { width: 120px; }

/* ------------------------------------------------------------------
 * Grid / flex utilities
 * --------------------------------------------------------------- */
.lms-flex { display: flex; }
.lms-flex-col { display: flex; flex-direction: column; }
.lms-items-center { align-items: center; }
.lms-justify-between { justify-content: space-between; }
.lms-justify-end { justify-content: flex-end; }
.lms-flex-wrap { flex-wrap: wrap; }
.lms-flex-1 { flex: 1; }
.lms-gap-1 { gap: 4px; } .lms-gap-2 { gap: 8px; } .lms-gap-3 { gap: 12px; } .lms-gap-4 { gap: 16px; } .lms-gap-6 { gap: 24px; }
.lms-grid { display: grid; gap: 18px; }
.lms-grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lms-grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lms-grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .lms-grid-cols-2, .lms-grid-cols-3, .lms-grid-cols-4 { grid-template-columns: 1fr 1fr; } }
/* Below 600px the admin sidebar was previously display:none with no
   fallback — an admin on a phone had no way to switch sections at all.
   Now it collapses into a horizontal scrolling tab strip above the
   content instead of disappearing. */
@media (max-width: 600px) {
	.lms-grid-cols-2, .lms-grid-cols-3, .lms-grid-cols-4 { grid-template-columns: 1fr; }
	.lms-shell { flex-direction: column; }
	.lms-sidebar {
		width: 100%; min-width: 0; flex-direction: row; align-items: center;
		overflow-x: auto; padding: 10px 12px; gap: 4px; -webkit-overflow-scrolling: touch;
	}
	.lms-sidebar .lms-brand { padding: 0 10px 0 0; flex-shrink: 0; }
	.lms-sidebar .lms-nav-item { flex-shrink: 0; margin-bottom: 0; }
	.lms-sidebar > div[style*="margin-top"] { margin-top: 0 !important; padding-top: 0 !important; margin-left: auto; flex-shrink: 0; }
	.lms-main { padding: 20px 16px; }
	.lms-two-pane { flex-direction: column; }
	.lms-two-pane .lms-pane-sidebar { width: 100%; max-height: 40vh; }
}

.lms-w-full { width: 100%; }
.lms-mt-2 { margin-top: 8px; } .lms-mt-4 { margin-top: 16px; } .lms-mt-6 { margin-top: 24px; }
.lms-mb-2 { margin-bottom: 8px; } .lms-mb-4 { margin-bottom: 16px; } .lms-mb-6 { margin-bottom: 24px; }
.lms-p-0 { padding: 0; }

/* ------------------------------------------------------------------
 * Typography
 * --------------------------------------------------------------- */
.lms-text-sm { font-size: 12.5px; }
.lms-text-lg { font-size: 17px; }
.lms-text-xl { font-size: 23px; letter-spacing: -0.015em; }
.lms-text-2xl { font-size: 30px; letter-spacing: -0.02em; }
.lms-font-bold { font-weight: 700; }
.lms-font-medium { font-weight: 500; }
.lms-text-muted { color: var(--lms-text-muted); }
.lms-text-danger { color: var(--lms-danger); }
.lms-text-success { color: var(--lms-success); }
.lms-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------
 * Card
 * --------------------------------------------------------------- */
.lms-card {
	background: var(--lms-surface);
	border: 1px solid var(--lms-border);
	border-radius: var(--lms-radius);
	box-shadow: var(--lms-shadow-sm);
	padding: 22px;
	transition: box-shadow .2s var(--lms-ease);
}
.lms-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }

/* ------------------------------------------------------------------
 * Stat tiles
 * --------------------------------------------------------------- */
.lms-stat-tile {
	position: relative;
	background: var(--lms-surface);
	border: 1px solid var(--lms-border);
	border-radius: var(--lms-radius);
	padding: 20px;
	box-shadow: var(--lms-shadow-sm);
	overflow: hidden;
}
.lms-stat-tile::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
	background: var(--lms-primary-grad);
}
.lms-stat-label { color: var(--lms-text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.lms-stat-value { font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; }

/* ------------------------------------------------------------------
 * Buttons
 * --------------------------------------------------------------- */
.lms-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 10px 18px; border-radius: var(--lms-radius-sm); border: 1px solid var(--lms-border-strong);
	font-size: 13.5px; font-weight: 600; cursor: pointer;
	transition: transform .15s var(--lms-ease), box-shadow .15s var(--lms-ease), background .15s var(--lms-ease), border-color .15s var(--lms-ease);
	background: var(--lms-surface); color: var(--lms-text);
	font-family: inherit;
}
.lms-btn:hover { background: var(--lms-surface-2); transform: translateY(-1px); box-shadow: var(--lms-shadow-sm); }
.lms-btn:active { transform: translateY(0); }
.lms-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.lms-btn-primary {
	background: var(--lms-primary-grad); border-color: transparent; color: #fff;
	box-shadow: 0 2px 10px rgba(17, 91, 158, 0.28);
}
/* .lms-btn:hover sets a light background for the default/outline button —
   .lms-btn-primary:hover must re-assert its own gradient background here,
   otherwise the generic rule's light background wins (it's the only rule
   touching that property) while the white text stays, going illegible. */
.lms-btn-primary:hover { background: var(--lms-primary-grad); color: #fff; box-shadow: var(--lms-shadow-glow); transform: translateY(-1px); filter: brightness(1.05); }
.lms-btn-danger { background: var(--lms-surface); border-color: var(--lms-danger); color: var(--lms-danger); }
/* Same leak, inverted: .lms-btn:hover's light background is what
   .lms-btn-danger actually wants, but must keep the danger text color
   which the generic rule doesn't set (it inherits from .lms-btn's dark
   text otherwise). */
.lms-btn-danger:hover { background: var(--lms-danger-bg); color: var(--lms-danger); }
.lms-btn-sm { padding: 6px 12px; font-size: 12.5px; }
.lms-btn-icon { padding: 7px; }

/* ------------------------------------------------------------------
 * Forms
 * --------------------------------------------------------------- */
.lms-label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--lms-text-muted); }
.lms-input, .lms-textarea, .lms-select {
	width: 100%; padding: 10px 13px; border: 1.5px solid var(--lms-border); border-radius: var(--lms-radius-sm);
	font-size: 13.5px; background: var(--lms-surface); color: var(--lms-text); font-family: inherit;
	transition: border-color .15s var(--lms-ease), box-shadow .15s var(--lms-ease);
}
.lms-input:focus, .lms-textarea:focus, .lms-select:focus {
	outline: none; border-color: var(--lms-primary-2);
	box-shadow: 0 0 0 4px var(--lms-primary-soft);
}
.lms-textarea { resize: vertical; min-height: 90px; }
.lms-field { margin-bottom: 16px; }

/* ------------------------------------------------------------------
 * Badges
 * --------------------------------------------------------------- */
.lms-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.lms-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lms-badge-success { background: var(--lms-success-bg); color: var(--lms-success); }
.lms-badge-warning { background: var(--lms-warning-bg); color: var(--lms-warning); }
.lms-badge-danger { background: var(--lms-danger-bg); color: var(--lms-danger); }
.lms-badge-neutral { background: var(--lms-bg); color: var(--lms-text-muted); border: 1px solid var(--lms-border); }

/* ------------------------------------------------------------------
 * Tabs
 * --------------------------------------------------------------- */
.lms-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--lms-border); margin-bottom: 22px; }
.lms-tab { padding: 10px 4px; margin-right: 24px; font-weight: 600; font-size: 13.5px; color: var(--lms-text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: color .15s var(--lms-ease), border-color .15s var(--lms-ease); }
.lms-tab:hover { color: var(--lms-text); }
.lms-tab.is-active { color: var(--lms-primary-2); border-bottom-color: var(--lms-primary-2); }

/* ------------------------------------------------------------------
 * Table
 * --------------------------------------------------------------- */
/* display:block lets the table itself become the horizontal-scroll
   container on narrow screens (rows/cells keep their table layout —
   only the outer <table> element's box behaves like a block) rather
   than every render site needing its own overflow-x wrapper div. */
.lms-table { width: 100%; border-collapse: collapse; font-size: 13.5px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lms-table thead, .lms-table tbody, .lms-table tr { display: table; width: 100%; table-layout: fixed; }
@media (max-width: 700px) { .lms-table thead, .lms-table tbody, .lms-table tr { width: max-content; min-width: 100%; } }
.lms-table th { text-align: left; color: var(--lms-text-muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--lms-border); background: var(--lms-surface-2); }
.lms-table th:first-child { border-top-left-radius: var(--lms-radius-sm); }
.lms-table th:last-child { border-top-right-radius: var(--lms-radius-sm); }
.lms-table td { padding: 13px 14px; border-bottom: 1px solid var(--lms-border); vertical-align: middle; }
.lms-table tr:last-child td { border-bottom: none; }
.lms-table tbody tr { transition: background .12s var(--lms-ease); }
.lms-table tbody tr:hover { background: var(--lms-surface-2); }

/* ------------------------------------------------------------------
 * Progress bar
 * --------------------------------------------------------------- */
.lms-progress-track { background: var(--lms-border); border-radius: 999px; height: 6px; overflow: hidden; }
.lms-progress-fill { background: var(--lms-primary-grad); height: 100%; transition: width .2s ease; }

/* ------------------------------------------------------------------
 * Spinner
 * --------------------------------------------------------------- */
.lms-spinner { width: 20px; height: 20px; border: 2.5px solid var(--lms-border); border-top-color: var(--lms-primary-2); border-radius: 50%; animation: lms-spin .7s linear infinite; }
@keyframes lms-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------
 * Empty state
 * --------------------------------------------------------------- */
.lms-empty { text-align: center; padding: 56px 20px; color: var(--lms-text-muted); }
.lms-empty-state {
	text-align: center; padding: 56px 24px; margin-top: 8px; background: var(--lms-surface);
	border: 1px dashed var(--lms-border-strong); border-radius: var(--lms-radius-lg);
}
.lms-empty-icon {
	width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--lms-primary-soft);
	display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.lms-empty-title { font-size: 16px; font-weight: 700; color: var(--lms-text); margin: 0 0 6px; }

/* ------------------------------------------------------------------
 * Toasts
 * --------------------------------------------------------------- */
.lms-toast-stack { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.lms-toast { background: var(--lms-ink); color: #fff; padding: 13px 18px; border-radius: var(--lms-radius-sm); box-shadow: var(--lms-shadow-lg); font-size: 13.5px; max-width: 340px; }
.lms-toast.is-error { background: var(--lms-danger); }
.lms-toast.is-success { background: var(--lms-success); }

/* ------------------------------------------------------------------
 * Modal
 * --------------------------------------------------------------- */
.lms-modal-overlay { position: fixed; inset: 0; background: rgba(11, 10, 19, .55); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.lms-modal { background: var(--lms-surface); border-radius: var(--lms-radius-lg); padding: 26px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; box-shadow: var(--lms-shadow-lg); }

/* ------------------------------------------------------------------
 * Curriculum / drag-and-drop
 * --------------------------------------------------------------- */
.lms-module { border: 1px solid var(--lms-border); border-radius: var(--lms-radius); margin-bottom: 12px; background: var(--lms-surface); box-shadow: var(--lms-shadow-sm); overflow: hidden; }
.lms-module-header { display: flex; align-items: center; gap: 8px; padding: 13px 14px; cursor: grab; }
.lms-module.is-drag-over { border-color: var(--lms-primary-2); background: var(--lms-primary-soft); }
.lms-lesson-row { display: flex; align-items: center; gap: 8px; padding: 9px 14px 9px 34px; border-top: 1px solid var(--lms-border); cursor: grab; }
.lms-lesson-row.is-drag-over { background: var(--lms-primary-soft); }
.lms-drag-handle { color: var(--lms-text-faint); cursor: grab; user-select: none; letter-spacing: -1px; }
.lms-lesson-extras-editor { padding: 14px 14px 14px 34px; background: var(--lms-surface-2); border-top: 1px solid var(--lms-border); }

/* ------------------------------------------------------------------
 * Course player
 * --------------------------------------------------------------- */
.lms-lesson-item { display: flex; align-items: center; gap: 10px; padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--lms-border); color: var(--lms-text); transition: background .12s var(--lms-ease); }
.lms-lesson-item:hover { background: var(--lms-surface-2); }
.lms-lesson-item.is-active { background: var(--lms-primary-soft); border-left: 3px solid var(--lms-primary-2); }
.lms-lesson-item.is-locked { color: var(--lms-text-faint); cursor: not-allowed; }
.lms-course-card-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--lms-primary-soft); }

.lms-announcements-feed { display: flex; flex-direction: column; gap: 10px; }
.lms-announcement-card {
	background: var(--lms-primary-soft); border: 1px solid var(--lms-border); border-radius: var(--lms-radius);
	padding: 14px 18px;
}
.lms-announcement-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13.5px; margin-bottom: 4px; color: var(--lms-primary-dark); }
.lms-announcement-card p { margin: 0; font-size: 13.5px; color: var(--lms-text); }

/* ------------------------------------------------------------------
 * Resume card, search box, leaderboard — My Courses page
 * --------------------------------------------------------------- */
.lms-resume-card {
	display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--lms-radius-lg);
	background: var(--lms-primary-grad); color: #fff; text-decoration: none; box-shadow: var(--lms-shadow-md);
	transition: transform .15s var(--lms-ease);
}
.lms-resume-card:hover { transform: translateY(-2px); }
.lms-resume-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.lms-resume-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; opacity: .85; font-weight: 700; }
.lms-resume-title { font-size: 16px; font-weight: 700; margin: 2px 0; }

.lms-search-box { position: relative; }
.lms-search-results {
	position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
	background: var(--lms-surface); border: 1px solid var(--lms-border); border-radius: var(--lms-radius);
	box-shadow: var(--lms-shadow-lg); max-height: 340px; overflow-y: auto;
}
.lms-search-result {
	display: flex; align-items: center; gap: 10px; padding: 11px 16px; text-decoration: none; color: var(--lms-text);
	font-size: 13.5px; border-bottom: 1px solid var(--lms-border);
}
.lms-search-result:last-child { border-bottom: none; }
.lms-search-result:hover { background: var(--lms-surface-2); }

.lms-leaderboard { display: flex; flex-direction: column; gap: 2px; }
.lms-leaderboard-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; font-size: 13.5px; border-radius: var(--lms-radius-sm); }
.lms-leaderboard-row.is-you { background: var(--lms-primary-soft); font-weight: 700; }
.lms-leaderboard-rank { width: 28px; color: var(--lms-text-muted); font-weight: 700; font-size: 12.5px; }
.lms-video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.lms-video-wrap video { width: 100%; height: 100%; display: block; }
.lms-watermark {
	position: absolute; pointer-events: none; color: rgba(255,255,255,0.4);
	font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.6);
	transition: top 1s linear, left 1s linear; white-space: nowrap;
}

/* ------------------------------------------------------------------
 * Text-based lessons (book-derived content, no video) + discussion
 * --------------------------------------------------------------- */
.lms-text-lesson-wrap { position: relative; background: var(--lms-bg); flex: 1; display: flex; justify-content: center; padding: 48px 32px; }
.lms-text-lesson {
	max-width: 720px; width: 100%; background: var(--lms-surface); border: 1px solid var(--lms-border);
	border-radius: var(--lms-radius-lg); padding: 40px 44px; box-shadow: var(--lms-shadow-sm);
}
.lms-lesson-content { color: var(--lms-text); font-size: 15.5px; line-height: 1.75; }
.lms-lesson-content p { margin: 0 0 16px; }
.lms-lesson-content h3, .lms-lesson-content h4 { margin: 28px 0 12px; color: var(--lms-primary-dark); }
.lms-lesson-content ul, .lms-lesson-content ol { margin: 0 0 16px; padding-left: 22px; }
.lms-lesson-content li { margin-bottom: 6px; }
.lms-lesson-content .lms-activity-box {
	margin: 24px 0 4px; padding: 18px 20px; background: var(--lms-primary-soft);
	border-left: 3px solid var(--lms-primary-2); border-radius: var(--lms-radius-sm);
}
.lms-lesson-content .lms-activity-box strong { color: var(--lms-primary-dark); }

.lms-comments {
	max-width: 720px; width: 100%; margin: 0 auto; padding: 32px; background: var(--lms-surface);
	border-top: 1px solid var(--lms-border);
}
.lms-two-pane .lms-pane-main:has(.lms-text-lesson-wrap) { overflow-y: auto; }
.lms-video-wrap + .lms-comments { max-width: none; background: var(--lms-bg); }
.lms-comment-form textarea { resize: vertical; }
.lms-comment { padding: 14px 0; border-bottom: 1px solid var(--lms-border); }
.lms-comment.is-reply { margin-left: 28px; border-bottom: none; padding-bottom: 6px; }
.lms-comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.lms-comment-author { font-weight: 700; font-size: 13.5px; color: var(--lms-text); }
.lms-comment-time { font-size: 12px; color: var(--lms-text-faint); }
.lms-comment-body { font-size: 14px; color: var(--lms-text); line-height: 1.6; margin: 0; }
.lms-comment-reply-btn {
	background: none; border: none; color: var(--lms-primary-2); font-size: 12.5px; font-weight: 600;
	cursor: pointer; padding: 4px 0; margin-top: 2px;
}
.lms-comment-replying-to {
	display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--lms-text-muted);
	margin-bottom: 8px;
}
.lms-comment-replying-to button { background: none; border: none; color: var(--lms-primary-2); cursor: pointer; font-weight: 600; }

/* ------------------------------------------------------------------
 * Lesson extras: resources, assignment, quiz, notes — sidecar blocks
 * shown beneath any lesson (video or text) that has them.
 * --------------------------------------------------------------- */
.lms-lesson-extras { max-width: 720px; width: 100%; margin: 0 auto; padding: 0 32px; display: flex; flex-direction: column; gap: 20px; }
.lms-video-wrap + .lms-lesson-extras, .lms-video-wrap ~ .lms-lesson-extras { max-width: none; background: var(--lms-bg); padding: 32px; }
.lms-lesson-side-block { background: var(--lms-surface); border: 1px solid var(--lms-border); border-radius: var(--lms-radius); padding: 20px 22px; }
.lms-lesson-side-title { margin: 0 0 12px; font-size: 14.5px; font-weight: 700; }

.lms-resource-list { display: flex; flex-direction: column; gap: 8px; }
.lms-resource-item {
	display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--lms-radius-sm);
	background: var(--lms-surface-2); font-size: 13.5px; color: var(--lms-text); border: 1px solid var(--lms-border);
}
.lms-resource-item:hover { background: var(--lms-primary-soft); }

.lms-assignment-remark {
	background: var(--lms-primary-soft); border-left: 3px solid var(--lms-primary-2); border-radius: var(--lms-radius-sm);
	padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px;
}
.lms-assignment-remark strong { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--lms-primary-dark); margin-bottom: 4px; }
.lms-assignment-remark p { margin: 0; color: var(--lms-text); }

.lms-quiz-question { margin-bottom: 16px; }
.lms-quiz-q-text { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.lms-quiz-option {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--lms-radius-sm);
	border: 1px solid var(--lms-border); margin-bottom: 6px; font-size: 13.5px; cursor: pointer;
}
.lms-quiz-option.is-selected { border-color: var(--lms-primary-2); background: var(--lms-primary-soft); }
.lms-quiz-option.is-correct { border-color: var(--lms-success); background: var(--lms-success-bg); }
.lms-quiz-option.is-wrong { border-color: var(--lms-danger); background: var(--lms-danger-bg); }
.lms-quiz-result { font-weight: 700; padding: 10px 14px; border-radius: var(--lms-radius-sm); display: inline-block; }
.lms-quiz-result.is-pass { background: var(--lms-success-bg); color: var(--lms-success); }
.lms-quiz-result.is-fail { background: var(--lms-warning-bg); color: var(--lms-warning); }

/* ------------------------------------------------------------------
 * Checkout
 * --------------------------------------------------------------- */
.lms-checkout-card { max-width: 440px; margin: 64px auto; padding: 0 20px; }
.lms-price, .lms-sales-price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.lms-price-period { color: var(--lms-text-muted); font-size: 13px; font-weight: 500; }

/* ------------------------------------------------------------------
 * Course sales page (checkout.js) — hero, curriculum, instructor,
 * testimonials, final CTA. A real landing page, not a bare price card.
 * --------------------------------------------------------------- */
.lms-sales-wrap { max-width: 900px; margin: 0 auto; padding: 32px 24px 80px; }
.lms-sales-hero {
	display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
	max-width: 1120px; margin: 0 auto; padding: 44px 24px 24px;
}
.lms-sales-hero-media { border-radius: var(--lms-radius-lg); overflow: hidden; box-shadow: var(--lms-shadow-lg); }
.lms-sales-hero-media img { width: 100%; display: block; }
.lms-sales-title { font-family: 'Georgia', 'Cambria', serif; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; font-weight: 700; color: var(--lms-text); margin: 0 0 12px; }
.lms-sales-subtitle { color: var(--lms-text-muted); font-size: 16px; line-height: 1.6; margin: 0 0 20px; }
@media (max-width: 760px) { .lms-sales-hero { grid-template-columns: 1fr; } }

.lms-sales-section { max-width: 780px; margin: 0 auto; padding: 36px 24px; border-top: 1px solid var(--lms-border); }
.lms-sales-desc { color: var(--lms-text); line-height: 1.75; font-size: 15px; }
.lms-sales-h2 { font-size: 21px; font-weight: 700; margin: 0 0 20px; }

.lms-curriculum { display: flex; flex-direction: column; gap: 12px; }
.lms-curr-module { border: 1px solid var(--lms-border); border-radius: var(--lms-radius); overflow: hidden; background: var(--lms-surface); }
.lms-curr-module-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 700; background: var(--lms-surface-2); }
.lms-curr-module-num {
	display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
	border-radius: 50%; background: var(--lms-primary-grad); color: #fff; font-size: 12px; flex-shrink: 0;
}
.lms-curr-lesson { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 48px; border-top: 1px solid var(--lms-border); font-size: 14px; }

.lms-instructor-section { display: flex; gap: 28px; align-items: flex-start; }
.lms-instructor-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; flex-shrink: 0; box-shadow: var(--lms-shadow-md); }
@media (max-width: 560px) { .lms-instructor-section { flex-direction: column; align-items: center; text-align: center; } }

.lms-testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .lms-testimonial-grid { grid-template-columns: 1fr; } }
.lms-testimonial-card { background: var(--lms-surface-2); border: 1px solid var(--lms-border); border-radius: var(--lms-radius); padding: 18px 20px; }
.lms-testimonial-quote { font-size: 14px; line-height: 1.65; color: var(--lms-text); margin: 0 0 12px; }
.lms-testimonial-author { font-weight: 700; font-size: 13px; }
.lms-testimonial-place { display: block; font-weight: 500; color: var(--lms-text-muted); font-size: 12px; margin-top: 2px; }

.lms-sales-final-cta { text-align: center; border-top: 1px solid var(--lms-border); }

/* ------------------------------------------------------------------
 * Auth (login / register) — split-screen brand panel + form
 * --------------------------------------------------------------- */
.lms-auth-shell { display: flex; min-height: 100vh; }
.lms-auth-brand {
	flex: 1; min-width: 0; display: none;
	background:
		linear-gradient(180deg, rgba(6,17,33,.55) 0%, rgba(6,17,33,.72) 55%, rgba(6,17,33,.94) 100%),
		var(--lms-auth-photo, none) center 20% / cover no-repeat,
		var(--lms-ink);
	color: var(--lms-ink-text-bright);
	padding: 56px;
	flex-direction: column;
	justify-content: space-between;
}
.lms-auth-brand-tagline { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; max-width: 420px; }
.lms-auth-brand-sub { color: var(--lms-ink-text); font-size: 14px; margin-top: 14px; max-width: 380px; }
@media (min-width: 900px) { .lms-auth-brand { display: flex; } }

.lms-auth-form-side { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--lms-bg); }
.lms-auth-card { width: 100%; max-width: 400px; }

.lms-auth-brand { position: relative; overflow: hidden; }
@keyframes lms-glow-drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(-3%, 2%) scale(1.06); }
}
.lms-auth-brand-glow {
	position: absolute; inset: -10%; pointer-events: none; z-index: 0;
	background:
		radial-gradient(circle at 20% 25%, rgba(59, 159, 224, 0.4), transparent 42%),
		radial-gradient(circle at 82% 78%, rgba(15, 44, 82, 0.4), transparent 48%);
	animation: lms-glow-drift 14s ease-in-out infinite;
}
/* Everything else in the brand panel must out-stack the animated glow
   since an absolutely-positioned element paints above static siblings
   regardless of DOM order or its own z-index. */
.lms-auth-brand > *:not(.lms-auth-brand-glow) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .lms-auth-brand-glow { animation: none; } }
.lms-auth-value-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lms-auth-value-list li {
	position: relative; padding-left: 26px; font-size: 14px; color: var(--lms-ink-text-bright); opacity: .92;
}
.lms-auth-value-list li::before {
	content: "✓"; position: absolute; left: 0; top: 0; color: #6FC3F7; font-weight: 700;
}

/* ------------------------------------------------------------------
 * Motion — entrance + hover polish. One place to gate everything
 * behind prefers-reduced-motion instead of scattering the media query.
 * --------------------------------------------------------------- */
@keyframes lms-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.lms-enter { animation: lms-fade-up .35s var(--lms-ease) both; }
.lms-course-card { transition: transform .18s var(--lms-ease), box-shadow .18s var(--lms-ease); }
.lms-course-card:hover { transform: translateY(-3px); box-shadow: var(--lms-shadow-md); }
@media (prefers-reduced-motion: reduce) {
	.lms-enter { animation: none; }
	.lms-course-card, .lms-btn, .lms-lesson-item, .lms-watermark { transition: none !important; }
}

/* ------------------------------------------------------------------
 * Skeleton loaders — replaces a bare spinner with a shape-matched
 * placeholder so a slow connection reads as "loading your content",
 * not "something is broken."
 * --------------------------------------------------------------- */
@keyframes lms-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.lms-skeleton {
	background: linear-gradient(90deg, var(--lms-border) 25%, var(--lms-surface-2) 37%, var(--lms-border) 63%);
	background-size: 200% 100%;
	animation: lms-shimmer 1.4s ease-in-out infinite;
	border-radius: var(--lms-radius-sm);
}
@media (prefers-reduced-motion: reduce) { .lms-skeleton { animation: none; background: var(--lms-border-strong); } }
.lms-skeleton-card { padding: 22px; border: 1px solid var(--lms-border); border-radius: var(--lms-radius); background: var(--lms-surface); }
.lms-skeleton-line { height: 14px; margin-bottom: 10px; }
.lms-skeleton-line.is-title { height: 20px; width: 60%; }
.lms-skeleton-line.is-short { width: 40%; }
.lms-skeleton-line.is-bar { height: 6px; border-radius: 999px; margin-top: 18px; margin-bottom: 18px; }
.lms-skeleton-line.is-btn { height: 38px; width: 130px; border-radius: var(--lms-radius-sm); margin-top: 4px; margin-bottom: 0; }

/* ------------------------------------------------------------------
 * Dashboard greeting + streak + founding-member badge
 * --------------------------------------------------------------- */
.lms-greeting { margin-bottom: 28px; }
.lms-greeting-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lms-greeting-name { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; color: var(--lms-text); }
.lms-streak-badge {
	display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
	font-size: 12px; font-weight: 700; background: var(--lms-warning-bg); color: var(--lms-warning);
}
.lms-founding-badge {
	display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
	font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
	background: var(--lms-primary-grad); color: #fff;
}

/* ------------------------------------------------------------------
 * Video bumper / outro overlay — branded moments bracketing a lesson
 * instead of a bare spinner (in) and an instant cut (out).
 * --------------------------------------------------------------- */
@keyframes lms-bumper-mark { 0% { opacity: 0; transform: scale(.85); } 60% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: scale(1); } }
.lms-bumper {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	background: linear-gradient(160deg, #0B1B30 0%, #0F2C52 100%); color: #fff; z-index: 2;
}
.lms-bumper-mark { height: 46px; width: auto; animation: lms-bumper-mark .5s var(--lms-ease) both; }
.lms-bumper-text { font-size: 13px; color: var(--lms-ink-text); letter-spacing: .02em; }
.lms-outro {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	background: rgba(11, 27, 48, .92); color: #fff; z-index: 2; text-align: center; padding: 20px;
}
.lms-outro-mark { height: 32px; width: auto; margin-bottom: 6px; }
.lms-outro-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--lms-ink-text); }
.lms-outro-next { font-size: 19px; font-weight: 700; max-width: 420px; }
@media (prefers-reduced-motion: reduce) { .lms-bumper-mark { animation: none; } }
