/* =========================================================
   Codex — design system
   ========================================================= */
:root {
  --cx-primary: #4f46e5;
  --cx-primary-600: #4338ca;
  --cx-primary-50: #eef2ff;
  --cx-accent: #06b6d4;
  --cx-pink: #ec4899;
  --cx-success: #10b981;
  --cx-warning: #f59e0b;
  --cx-danger: #ef4444;
  --cx-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --cx-grad-soft: linear-gradient(135deg, rgba(79,70,229,.10), rgba(6,182,212,.10));
  --cx-bg: #f6f7fb;
  --cx-surface: #ffffff;
  --cx-surface-2: #f1f3f9;
  --cx-border: #e5e7ef;
  --cx-text: #0f172a;
  --cx-muted: #64748b;
  --cx-radius: 16px;
  --cx-radius-sm: 10px;
  --cx-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --cx-shadow-lg: 0 20px 50px rgba(79,70,229,.18);
  --cx-sidebar-w: 270px;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79,70,229;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79,70,229;
  --bs-link-hover-color: #4338ca;
  --bs-body-bg: var(--cx-bg);
  --bs-body-color: var(--cx-text);
  --bs-border-color: var(--cx-border);
}

[data-bs-theme="dark"] {
  --cx-bg: #0b1020;
  --cx-surface: #121a2e;
  --cx-surface-2: #1a2340;
  --cx-border: #253052;
  --cx-text: #e2e8f0;
  --cx-muted: #94a3b8;
  --cx-primary-50: rgba(99,102,241,.15);
  --cx-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --bs-body-bg: var(--cx-bg);
  --bs-body-color: var(--cx-text);
  --bs-border-color: var(--cx-border);
  --bs-link-color: #a5b4fc;
  --bs-link-color-rgb: 165,180,252;
}

html[lang="ar"] body { font-family: "Cairo", "Segoe UI", Tahoma, sans-serif; }
html[lang="en"] body { font-family: "Inter", "Segoe UI", Roboto, sans-serif; }

body { background: var(--cx-bg); color: var(--cx-text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
.text-muted, .form-text { color: var(--cx-muted) !important; }
.fw-800 { font-weight: 800; }
.text-gradient { background: var(--cx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bg-gradient-cx { background: var(--cx-grad) !important; color: #fff; }
.bg-soft-primary { background: var(--cx-primary-50) !important; color: var(--cx-primary) !important; }
[data-bs-theme="dark"] .bg-soft-primary { color: #a5b4fc !important; }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: .6rem 1.15rem; transition: all .2s ease; }
.btn-sm { border-radius: 9px; padding: .35rem .75rem; }
.btn-lg { padding: .8rem 1.6rem; border-radius: 14px; }
.btn-primary { --bs-btn-bg: var(--cx-primary); --bs-btn-border-color: var(--cx-primary); --bs-btn-hover-bg: var(--cx-primary-600); --bs-btn-hover-border-color: var(--cx-primary-600); --bs-btn-active-bg: var(--cx-primary-600); }
.btn-gradient { background: var(--cx-grad); color: #fff; border: 0; box-shadow: 0 8px 20px rgba(79,70,229,.3); }
.btn-gradient:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(79,70,229,.4); }
.btn-soft { background: var(--cx-primary-50); color: var(--cx-primary); border: 0; }
.btn-soft:hover { background: var(--cx-primary); color: #fff; }
.btn-outline-primary { --bs-btn-color: var(--cx-primary); --bs-btn-border-color: var(--cx-primary); --bs-btn-hover-bg: var(--cx-primary); --bs-btn-hover-border-color: var(--cx-primary); }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }

/* ---------- Cards ---------- */
.cx-card { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); box-shadow: var(--cx-shadow); }
.cx-card-header { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--cx-border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.cx-card-body { padding: 1.4rem; }
.cx-card h5, .cx-card h6 { margin: 0; font-weight: 700; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: 12px; border-color: var(--cx-border); padding: .7rem .95rem; background-color: var(--cx-surface); color: var(--cx-text); }
.form-control:focus, .form-select:focus { border-color: var(--cx-primary); box-shadow: 0 0 0 .25rem rgba(79,70,229,.15); background-color: var(--cx-surface); color: var(--cx-text); }
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-check-input:checked { background-color: var(--cx-primary); border-color: var(--cx-primary); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: var(--cx-muted); pointer-events: none; }
.input-icon > .form-control { padding-inline-start: 2.6rem; }
.password-toggle { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 8px; border: 0; background: none; color: var(--cx-muted); padding: .25rem .5rem; }
.input-icon.has-toggle > .form-control { padding-inline-end: 2.6rem; }
.invalid-feedback { display: block; }

/* ---------- Public navbar ---------- */
.cx-navbar { background: rgba(255,255,255,.8); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--cx-border); }
[data-bs-theme="dark"] .cx-navbar { background: rgba(11,16,32,.8); }
.cx-navbar .nav-link { font-weight: 600; color: var(--cx-text); padding: .5rem .9rem !important; border-radius: 10px; }
.cx-navbar .nav-link:hover, .cx-navbar .nav-link.active { color: var(--cx-primary); background: var(--cx-primary-50); }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.4rem; color: var(--cx-text); letter-spacing: -.5px; font-family: "Inter", sans-serif; }
.brand:hover { color: var(--cx-text); }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--cx-grad); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; box-shadow: 0 6px 16px rgba(79,70,229,.35); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 6rem 0 5rem; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 620px; height: 620px; background: radial-gradient(circle, rgba(124,58,237,.22), transparent 65%); filter: blur(10px); z-index: 0; }
.hero::after { content: ""; position: absolute; inset: auto auto -30% -10%; width: 520px; height: 520px; background: radial-gradient(circle, rgba(6,182,212,.2), transparent 65%); z-index: 0; }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { font-weight: 800; font-size: clamp(2.1rem, 4.5vw, 3.6rem); line-height: 1.25; letter-spacing: -.5px; }
.hero .lead { color: var(--cx-muted); font-size: 1.15rem; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: var(--cx-surface); border: 1px solid var(--cx-border); font-size: .85rem; font-weight: 600; box-shadow: var(--cx-shadow); }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-success); box-shadow: 0 0 0 4px rgba(16,185,129,.2); }
.hero-visual { position: relative; }
.hero-card { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 22px; box-shadow: var(--cx-shadow-lg); padding: 1.4rem; }
.hero-float { position: absolute; background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: 16px; padding: .8rem 1rem; box-shadow: var(--cx-shadow); display: flex; align-items: center; gap: .7rem; animation: float 5s ease-in-out infinite; }
.hero-float.f1 { top: -18px; inset-inline-end: -10px; }
.hero-float.f2 { bottom: -22px; inset-inline-start: -14px; animation-delay: 1.5s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.progress-thin { height: 8px; border-radius: 99px; background: var(--cx-surface-2); }
.progress-thin .progress-bar { background: var(--cx-grad); border-radius: 99px; }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-title { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.eyebrow { color: var(--cx-primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: .8rem; }
html[lang="ar"] .eyebrow { letter-spacing: 0; }
.feature-card { height: 100%; padding: 1.75rem; transition: transform .25s ease, box-shadow .25s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--cx-shadow-lg); }
.icon-box { width: 54px; height: 54px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.45rem; }
.icon-box.sm { width: 42px; height: 42px; border-radius: 12px; font-size: 1.1rem; }
.ib-primary { background: rgba(79,70,229,.12); color: #4f46e5; }
.ib-cyan { background: rgba(6,182,212,.12); color: #0891b2; }
.ib-pink { background: rgba(236,72,153,.12); color: #db2777; }
.ib-green { background: rgba(16,185,129,.12); color: #059669; }
.ib-amber { background: rgba(245,158,11,.14); color: #d97706; }
.ib-red { background: rgba(239,68,68,.12); color: #dc2626; }
.ib-violet { background: rgba(124,58,237,.12); color: #7c3aed; }
.stat-strip { background: var(--cx-grad); border-radius: 24px; color: #fff; padding: 2.5rem; box-shadow: var(--cx-shadow-lg); }
.stat-strip .num { font-size: 2.2rem; font-weight: 800; }
.role-card { position: relative; overflow: hidden; height: 100%; padding: 2rem; }
.role-card .role-num { position: absolute; inset-inline-end: 1.25rem; top: .5rem; font-size: 4.5rem; font-weight: 800; color: var(--cx-primary); opacity: .07; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: .35rem 0; display: flex; gap: .55rem; align-items: flex-start; }
.check-list li i { color: var(--cx-success); margin-top: .2rem; }
.cta { background: var(--cx-grad); border-radius: 28px; padding: 3.5rem 2rem; color: #fff; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.08); top: -150px; inset-inline-end: -80px; }

/* ---------- Footer ---------- */
.cx-footer { background: var(--cx-surface); border-top: 1px solid var(--cx-border); padding: 3.5rem 0 1.5rem; }
.cx-footer a { color: var(--cx-muted); }
.cx-footer a:hover { color: var(--cx-primary); }
.social a { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--cx-surface-2); color: var(--cx-text); }
.social a:hover { background: var(--cx-primary); color: #fff; }

/* ---------- Auth pages (simple centered card) ---------- */
.auth-page { background:
  radial-gradient(600px 300px at 100% 0%, rgba(124,58,237,.08), transparent 70%),
  radial-gradient(600px 300px at 0% 100%, rgba(6,182,212,.08), transparent 70%), var(--cx-bg); }
.auth-top { padding: 1rem 0; }
.auth-top .brand { font-size: 1.25rem; }
.auth-top .brand-mark { width: 34px; height: 34px; font-size: .95rem; }
.auth-center { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem 3rem; }
.auth-card { width: 100%; max-width: 440px; padding: 2rem; border-radius: 20px; }
.auth-card.wide { max-width: 620px; }
.auth-card .icon-box { margin-inline: auto; display: flex; }
.auth-card .btn-primary { padding: .7rem 1rem; }
@media (max-width: 575.98px) { .auth-card { padding: 1.4rem; border-radius: 16px; } }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--cx-muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--cx-border); }
.btn-google { background: var(--cx-surface); border: 1px solid var(--cx-border); color: var(--cx-text); border-radius: 999px; }
.btn-google:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.g-btn-wrap { width: 100%; min-height: 44px; display: flex; justify-content: center; }
.choice-row { display: flex; align-items: center; gap: .9rem; padding: 1rem; border: 1px solid var(--cx-border); border-radius: 14px; color: var(--cx-text); transition: all .15s ease; }
.choice-row:hover { border-color: var(--cx-primary); background: var(--cx-primary-50); color: var(--cx-text); }
.form-section-title { font-weight: 700; font-size: .85rem; color: var(--cx-primary); margin: .5rem 0 .9rem; padding-top: .9rem; border-top: 1px dashed var(--cx-border); }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.role-toggle .btn { border: 1px solid var(--cx-border); background: var(--cx-surface); color: var(--cx-text); font-weight: 600; }
.role-toggle .btn-check:checked + .btn { border-color: var(--cx-primary); background: var(--cx-primary-50); color: var(--cx-primary); }

/* ---------- App shell (dashboard) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--cx-sidebar-w); flex-shrink: 0; background: var(--cx-surface); border-inline-end: 1px solid var(--cx-border); position: fixed; top: 0; bottom: 0; inset-inline-start: 0; display: flex; flex-direction: column; z-index: 1040; transition: transform .3s ease; }
.sidebar-head { padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--cx-border); }
.sidebar-nav { padding: 1rem .9rem; overflow-y: auto; flex: 1; }
.nav-section { font-size: .72rem; font-weight: 700; color: var(--cx-muted); text-transform: uppercase; letter-spacing: 1px; padding: 1rem .75rem .45rem; }
html[lang="ar"] .nav-section { letter-spacing: 0; font-size: .78rem; }
.side-link { display: flex; align-items: center; gap: .8rem; padding: .65rem .85rem; border-radius: 12px; color: var(--cx-muted); font-weight: 600; margin-bottom: 2px; transition: all .15s ease; }
.side-link i { font-size: 1.12rem; width: 22px; text-align: center; }
.side-link:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.side-link.active { background: var(--cx-primary-50); color: var(--cx-primary); }
[data-bs-theme="dark"] .side-link.active { color: #a5b4fc; }
.side-link .badge { margin-inline-start: auto; }
.side-link.disabled { opacity: .5; pointer-events: none; }
.side-link .soon { margin-inline-start: auto; font-size: .65rem; background: var(--cx-surface-2); color: var(--cx-muted); padding: .15rem .45rem; border-radius: 6px; }
.sidebar-foot { padding: 1rem; border-top: 1px solid var(--cx-border); }
.role-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.role-admin { background: rgba(239,68,68,.12); color: #dc2626; }
.role-instructor { background: rgba(124,58,237,.12); color: #7c3aed; }
.role-student { background: rgba(6,182,212,.12); color: #0891b2; }
.app-main { flex: 1; margin-inline-start: var(--cx-sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 1030; background: rgba(246,247,251,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--cx-border); padding: .8rem 1.75rem; display: flex; align-items: center; gap: 1rem; }
[data-bs-theme="dark"] .topbar { background: rgba(11,16,32,.85); }
.topbar .search { max-width: 380px; flex: 1; }
.topbar .search .form-control { background: var(--cx-surface); }
.content { padding: 1.75rem; flex: 1; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.breadcrumb { margin: .25rem 0 0; font-size: .85rem; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.show { transform: translateX(0) !important; }
  .app-main { margin-inline-start: 0; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
  .content { padding: 1.1rem; }
  .topbar { padding: .75rem 1rem; }
}

/* ---------- Avatars ---------- */
.avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--cx-grad); color: #fff; flex-shrink: 0; font-size: .95rem; font-family: "Inter", sans-serif; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: .8rem; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.4rem; }
.avatar.xl { width: 120px; height: 120px; border-radius: 28px; font-size: 2.5rem; border: 4px solid var(--cx-surface); box-shadow: var(--cx-shadow); }

/* ---------- Stats ---------- */
.stat-card { padding: 1.35rem; display: flex; align-items: center; gap: 1rem; height: 100%; }
.stat-card .value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; }
.stat-card .label { color: var(--cx-muted); font-size: .88rem; font-weight: 600; }
.welcome-banner { background: var(--cx-grad); border-radius: var(--cx-radius); color: #fff; padding: 1.8rem 2rem; position: relative; overflow: hidden; }
.welcome-banner::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.1); inset-inline-end: -80px; top: -120px; }
.welcome-banner > * { position: relative; z-index: 1; }

/* ---------- Tables ---------- */
.table-cx { margin: 0; --bs-table-bg: transparent; }
.table-cx thead th { background: var(--cx-surface-2); color: var(--cx-muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border: 0; padding: .85rem 1rem; white-space: nowrap; }
html[lang="ar"] .table-cx thead th { letter-spacing: 0; font-size: .85rem; }
.table-cx td { padding: .9rem 1rem; vertical-align: middle; border-color: var(--cx-border); }
.table-cx tbody tr:hover { background: var(--cx-surface-2); }
.status-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-active, .st-approved { background: rgba(16,185,129,.12); color: #059669; }
.st-pending { background: rgba(245,158,11,.14); color: #b45309; }
.st-rejected { background: rgba(239,68,68,.12); color: #dc2626; }
.st-suspended { background: rgba(100,116,139,.15); color: #475569; }
[data-bs-theme="dark"] .st-suspended { color: #cbd5e1; }
.st-login { background: rgba(16,185,129,.12); color: #059669; }
.st-logout { background: rgba(100,116,139,.15); color: #64748b; }
.st-failed { background: rgba(239,68,68,.12); color: #dc2626; }

/* ---------- Profile ---------- */
.profile-cover { height: 160px; border-radius: var(--cx-radius) var(--cx-radius) 0 0; background: var(--cx-grad); position: relative; overflow: hidden; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 120%, rgba(255,255,255,.25), transparent 50%); }
.profile-head { padding: 0 1.75rem 1.5rem; margin-top: -60px; position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.25rem; }
.avatar-edit { position: relative; display: inline-block; }
.avatar-edit .cam { position: absolute; bottom: 6px; inset-inline-end: 6px; width: 34px; height: 34px; border-radius: 10px; background: var(--cx-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--cx-surface); cursor: pointer; }
.info-row { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px dashed var(--cx-border); }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--cx-muted); font-weight: 600; }
.info-row .v { font-weight: 600; text-align: end; word-break: break-word; }

/* ---------- Timeline / states ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 2.2rem; padding-bottom: 1.25rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 11px; top: 26px; bottom: 0; width: 2px; background: var(--cx-border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; inset-inline-start: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; color: #fff; background: var(--cx-border); }
.timeline .done .tl-dot { background: var(--cx-success); }
.timeline .current .tl-dot { background: var(--cx-warning); box-shadow: 0 0 0 5px rgba(245,158,11,.2); }
.timeline .failed .tl-dot { background: var(--cx-danger); }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--cx-muted); }
.empty-state i { font-size: 2.6rem; opacity: .5; display: block; margin-bottom: .5rem; }

/* ---------- Alerts / toasts ---------- */
.alert { border-radius: 14px; border: 0; font-weight: 500; }
.toast-stack { position: fixed; top: 1rem; inset-inline-end: 1rem; z-index: 2000; display: flex; flex-direction: column; gap: .6rem; max-width: 380px; }
.toast-stack .alert { box-shadow: var(--cx-shadow-lg); animation: slideIn .35s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Misc ---------- */
.dropdown-menu { border-radius: 14px; border-color: var(--cx-border); box-shadow: var(--cx-shadow-lg); padding: .5rem; background: var(--cx-surface); }
.dropdown-item { border-radius: 9px; padding: .5rem .75rem; font-weight: 500; }
.dropdown-item i { width: 20px; }
.pagination .page-link { border-radius: 10px !important; margin: 0 2px; border: 1px solid var(--cx-border); color: var(--cx-text); background: var(--cx-surface); }
.pagination .active .page-link { background: var(--cx-primary); border-color: var(--cx-primary); color: #fff; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 160px; }
.nav-pills-cx .nav-link { border-radius: 10px; font-weight: 600; color: var(--cx-muted); }
.nav-pills-cx .nav-link.active { background: var(--cx-primary); color: #fff; }
.err-page { min-height: 80vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.err-page .code { font-size: 7rem; font-weight: 800; line-height: 1; }
.pw-meter { height: 5px; border-radius: 99px; background: var(--cx-surface-2); overflow: hidden; margin-top: .45rem; }
.pw-meter > span { display: block; height: 100%; width: 0; transition: all .3s ease; }

/* ---------- Courses ---------- */
.course-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; color: var(--cx-text); transition: transform .2s ease, box-shadow .2s ease; }
.course-card:hover { transform: translateY(-5px); box-shadow: var(--cx-shadow-lg); color: var(--cx-text); }
.course-cover { position: relative; aspect-ratio: 16 / 9; background: var(--cx-surface-2); overflow: hidden; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-cover-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--cx-grad); color: rgba(255,255,255,.9); font-size: 3rem; }
.course-price { position: absolute; top: .75rem; inset-inline-end: .75rem; background: var(--cx-surface); color: var(--cx-text); font-weight: 800; font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; box-shadow: var(--cx-shadow); }
.course-price.free { background: #10b981; color: #fff; }
.course-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.course-title { font-weight: 700; line-height: 1.5; margin-bottom: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 8px; font-size: .75rem; font-weight: 700; background: var(--cx-primary-50); color: var(--cx-primary); }
[data-bs-theme="dark"] .chip { color: #a5b4fc; }
.chip-muted { background: var(--cx-surface-2); color: var(--cx-muted) !important; }
.page-hero { background: var(--cx-grad); color: #fff; padding: 2.75rem 0 2.5rem; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.08); top: -200px; inset-inline-end: -100px; }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero .search-big { background: var(--cx-surface); border-radius: 16px; padding: .4rem; display: flex; gap: .4rem; max-width: 640px; box-shadow: var(--cx-shadow-lg); }
.page-hero .search-big input { border: 0; background: transparent; box-shadow: none !important; }
.filter-card .form-check { padding-top: .2rem; padding-bottom: .2rem; }
.filter-title { font-weight: 700; font-size: .9rem; margin-bottom: .6rem; }
.cat-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 12px; background: var(--cx-surface); border: 1px solid var(--cx-border); color: var(--cx-text); font-weight: 600; transition: all .15s ease; }
.cat-pill:hover, .cat-pill.active { border-color: var(--cx-primary); color: var(--cx-primary); background: var(--cx-primary-50); }
.cat-pill i { color: var(--cx-primary); }
.course-hero { background: #0f172a; color: #fff; padding: 2.75rem 0; }
[data-bs-theme="dark"] .course-hero { background: #070b16; }
.course-hero .breadcrumb a { color: rgba(255,255,255,.7); }
.course-hero .breadcrumb-item.active, .course-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.course-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .9rem; color: rgba(255,255,255,.85); }
.course-meta i { color: #a5b4fc; }
.buy-card { position: sticky; top: 90px; overflow: hidden; }
.buy-card .video-box { aspect-ratio: 16/9; background: #000; }
.buy-card .video-box iframe, .buy-card .video-box video, .buy-card .video-box img { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.big-price { font-size: 2rem; font-weight: 800; }
@media (min-width: 992px) { .buy-card-wrap { margin-top: -220px; } }
.objectives { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.objectives li { display: flex; gap: .55rem; }
.objectives li i { color: var(--cx-success); margin-top: .2rem; }
.preview-banner { background: rgba(245,158,11,.14); color: #b45309; border-bottom: 1px solid rgba(245,158,11,.3); padding: .6rem 0; font-weight: 600; font-size: .9rem; }
.instructor-card { text-align: center; padding: 1.75rem 1.25rem; height: 100%; color: var(--cx-text); display: block; transition: transform .2s ease, box-shadow .2s ease; }
.instructor-card:hover { transform: translateY(-4px); box-shadow: var(--cx-shadow-lg); color: var(--cx-text); }
/* course status colors */
.cs-draft { background: rgba(100,116,139,.15); color: #64748b; }
.cs-pending { background: rgba(245,158,11,.14); color: #b45309; }
.cs-changes_requested { background: rgba(249,115,22,.14); color: #c2410c; }
.cs-rejected, .cs-suspended { background: rgba(239,68,68,.12); color: #dc2626; }
.cs-approved { background: rgba(6,182,212,.14); color: #0e7490; }
.cs-published { background: rgba(16,185,129,.12); color: #059669; }
.cs-closed, .cs-archived { background: rgba(100,116,139,.15); color: #475569; }
[data-bs-theme="dark"] .cs-closed, [data-bs-theme="dark"] .cs-archived, [data-bs-theme="dark"] .cs-draft { color: #cbd5e1; }
.decision-toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: .5rem; }
.decision-toggle .btn { border: 1px solid var(--cx-border); background: var(--cx-surface); color: var(--cx-text); font-weight: 600; font-size: .9rem; }
.decision-toggle .btn-check:checked + .btn.d-approve { border-color: #10b981; background: rgba(16,185,129,.12); color: #059669; }
.decision-toggle .btn-check:checked + .btn.d-changes { border-color: #f97316; background: rgba(249,115,22,.12); color: #c2410c; }
.decision-toggle .btn-check:checked + .btn.d-reject { border-color: #ef4444; background: rgba(239,68,68,.12); color: #dc2626; }
.course-thumb { width: 72px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--cx-grad); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.log-list { list-style: none; padding: 0; margin: 0; }
.log-list li { display: flex; gap: .75rem; padding: .7rem 0; border-bottom: 1px dashed var(--cx-border); }
.log-list li:last-child { border-bottom: 0; }

/* ---------- Enrollments & notifications ---------- */
.es-pending { background: rgba(245,158,11,.14); color: #b45309; }
.es-waitlisted { background: rgba(124,58,237,.12); color: #7c3aed; }
.es-approved { background: rgba(16,185,129,.12); color: #059669; }
.es-rejected, .es-suspended { background: rgba(239,68,68,.12); color: #dc2626; }
.es-cancelled, .es-expired { background: rgba(100,116,139,.15); color: #64748b; }
.enroll-row { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--cx-border); flex-wrap: wrap; }
.enroll-row:last-child { border-bottom: 0; }
.enroll-row .thumb { width: 120px; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.enroll-row .thumb img, .enroll-row .thumb .course-cover-ph { width: 100%; height: 100%; object-fit: cover; font-size: 1.6rem; }
@media (max-width: 575.98px) { .enroll-row .thumb { width: 100%; } }
.notif-menu { width: 360px; max-width: calc(100vw - 2rem); padding: 0; overflow: hidden; }
.notif-menu .head { padding: .85rem 1rem; border-bottom: 1px solid var(--cx-border); display: flex; justify-content: space-between; align-items: center; }
.notif-item { display: flex; gap: .7rem; padding: .8rem 1rem; color: var(--cx-text); border-bottom: 1px solid var(--cx-border); }
.notif-item:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.notif-item.unread { background: var(--cx-primary-50); }
.notif-item .t { font-weight: 600; font-size: .88rem; line-height: 1.45; }
.notif-item .m { font-size: .8rem; color: var(--cx-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-dot { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--cx-danger); color: #fff; font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--cx-surface); }
.nk-success { background: rgba(16,185,129,.12); color: #059669; }
.nk-warning { background: rgba(245,158,11,.14); color: #d97706; }
.nk-danger { background: rgba(239,68,68,.12); color: #dc2626; }
.nk-info { background: rgba(79,70,229,.12); color: #4f46e5; }

/* ---------- Course builder ---------- */
.lesson-list { list-style: none; margin: 0; padding: .5rem; min-height: 48px; }
.lesson-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; background: var(--cx-surface); border: 1px solid transparent; }
.lesson-row:hover { background: var(--cx-surface-2); border-color: var(--cx-border); }
.lesson-empty { padding: .9rem; text-align: center; border: 1px dashed var(--cx-border); border-radius: 12px; }
.drag-handle { cursor: grab; font-size: 1.1rem; }
.sortable-ghost { opacity: .4; background: var(--cx-primary-50) !important; }

/* ---------- Lesson player ---------- */
.player-app { min-height: 100vh; display: flex; flex-direction: column; }
.player-top { position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem; padding: .65rem 1.25rem; background: var(--cx-surface); border-bottom: 1px solid var(--cx-border); }
.player-body { display: flex; flex: 1; min-height: 0; }
.outline { width: 340px; flex-shrink: 0; background: var(--cx-surface); border-inline-end: 1px solid var(--cx-border); overflow-y: auto; height: calc(100vh - 58px); position: sticky; top: 58px; }
.outline-head { padding: 1rem 1.1rem; border-bottom: 1px solid var(--cx-border); }
.outline-module-title { display: flex; justify-content: space-between; gap: .5rem; padding: .85rem 1.1rem .5rem; font-weight: 700; font-size: .9rem; }
.outline-item { display: flex; gap: .7rem; padding: .6rem 1.1rem; color: var(--cx-text); font-size: .88rem; border-inline-start: 3px solid transparent; }
.outline-item:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.outline-item.active { background: var(--cx-primary-50); border-inline-start-color: var(--cx-primary); font-weight: 600; }
.outline-item.locked { opacity: .55; cursor: not-allowed; }
.oi-icon { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--cx-border); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; flex-shrink: 0; color: var(--cx-muted); }
.oi-icon.done { background: var(--cx-success); border-color: var(--cx-success); color: #fff; }
.player-main { flex: 1; min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 2.5rem); max-width: 1100px; }
.video-shell { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--cx-shadow); }
.video-shell video, .video-shell iframe, .video-shell #ytPlayer { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.speed-group .btn { padding: .25rem .6rem; }
.speed-group .btn.active { background: var(--cx-primary); color: #fff; }
.lesson-content { line-height: 1.9; }
.lesson-content p { margin-bottom: .9rem; }
.outline-backdrop { display: none; }
@media (max-width: 991.98px) {
  .outline { position: fixed; top: 0; bottom: 0; height: 100vh; inset-inline-start: 0; z-index: 1050; transform: translateX(-100%); transition: transform .3s ease; }
  html[dir="rtl"] .outline { transform: translateX(100%); }
  .outline.show { transform: none !important; }
  .outline-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1045; }
}
/* course page agenda */
.agenda .accordion-button { font-weight: 700; background: var(--cx-surface); color: var(--cx-text); box-shadow: none; }
.agenda .accordion-button:not(.collapsed) { background: var(--cx-primary-50); color: var(--cx-text); }
.agenda .accordion-item { border-color: var(--cx-border); background: var(--cx-surface); }
.agenda-lesson { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; font-size: .9rem; border-bottom: 1px dashed var(--cx-border); }
.agenda-lesson:last-child { border-bottom: 0; }
.upload-progress { margin-top: .5rem; }

/* ---------- Exams ---------- */
.exam-app { min-height: 100vh; }
.exam-timer { font-family: "Inter", monospace; font-weight: 800; font-size: 1.1rem; padding: .35rem .9rem; border-radius: 12px; background: var(--cx-primary-50); color: var(--cx-primary); display: inline-flex; gap: .4rem; align-items: center; direction: ltr; }
.exam-timer.warn { background: rgba(245,158,11,.15); color: #b45309; }
.exam-timer.danger { background: rgba(239,68,68,.15); color: #dc2626; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.option { display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border: 1.5px solid var(--cx-border); border-radius: 12px; margin-bottom: .5rem; cursor: pointer; transition: all .15s ease; }
.option:hover { border-color: var(--cx-primary); background: var(--cx-primary-50); }
.option:has(input:checked) { border-color: var(--cx-primary); background: var(--cx-primary-50); font-weight: 600; }
.option .form-check-input { margin: 0; flex-shrink: 0; }
.option.static { cursor: default; }
.option.static:hover { border-color: var(--cx-border); background: transparent; }
.option.correct, .option.correct:hover { border-color: #10b981; background: rgba(16,185,129,.1); color: #047857; font-weight: 600; }
.option.wrong, .option.wrong:hover { border-color: #ef4444; background: rgba(239,68,68,.08); color: #b91c1c; }
.option.picked { border-color: var(--cx-primary); }
.exam-nav { position: sticky; top: 80px; }
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: .4rem; }
.q-dot { height: 38px; border-radius: 10px; border: 1.5px solid var(--cx-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--cx-text); }
.q-dot.done { background: var(--cx-primary); border-color: var(--cx-primary); color: #fff; }
.q-card { scroll-margin-top: 80px; }
.dq-easy { color: #059669 !important; }
.dq-hard { color: #dc2626 !important; }
.choice-input .input-group-text { background: var(--cx-surface-2); border-color: var(--cx-border); }

/* ---------- Certificates ---------- */
.cert-mini { background: var(--cx-grad); color: #fff; text-align: center; padding: 1.6rem 1rem; }
.cert-mini > i { font-size: 2.4rem; }
.verify-ok { background: rgba(16,185,129,.12); color: #047857; }
.verify-bad { background: rgba(239,68,68,.1); color: #b91c1c; }

/* ---------- Community ---------- */
.stars { color: #f59e0b; letter-spacing: 1px; white-space: nowrap; }
.thread-row:hover { background: var(--cx-surface-2); color: var(--cx-text); }
.staff-reply { border-inline-start: 4px solid var(--cx-primary); }
.post-body { line-height: 1.85; word-break: break-word; }
.review-reply { background: var(--cx-primary-50); border-radius: 10px; padding: .6rem .8rem; }
.star-input { display: inline-flex; gap: .15rem; font-size: 1.6rem; }
.star-input button { border: 0; background: none; color: #cbd5e1; padding: 0; line-height: 1; }
.star-input button.on { color: #f59e0b; }

/* ---------- Admin tools ---------- */
.internal-note { background: rgba(245,158,11,.08); border-style: dashed; }
.settings-nav .side-link { margin-bottom: 0; }

/* ---------- Logo ---------- */
.brand { gap: .6rem; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 18px rgba(79,70,229,.35); transition: transform .3s ease; flex-shrink: 0; }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.05); }
.brand-word { font-family: "Inter", sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: -1px; line-height: 1; direction: ltr; }
.brand-x { background: linear-gradient(135deg, #7C3AED, #06B6D4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-top .brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.auth-top .brand-word { font-size: 1.3rem; }
.sidebar-head .brand-logo { width: 36px; height: 36px; }

/* =========================================================
   Landing page (course-first)
   ========================================================= */
/* course card v2 */
.course-card { border-radius: 18px; }
.course-cover { border-radius: 18px 18px 0 0; }
.course-cover img, .course-cover .course-cover-ph { transition: transform .5s ease; }
.course-card:hover .course-cover img, .course-card:hover .course-cover .course-cover-ph { transform: scale(1.06); }
.course-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,23,42,.55), transparent 55%); pointer-events: none; }
.cover-chip { position: absolute; bottom: .7rem; inset-inline-start: .7rem; z-index: 2; background: rgba(255,255,255,.18); backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255,255,255,.3); font-size: .72rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; }
.course-price { z-index: 2; }
.cover-cta { position: absolute; z-index: 2; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.92); color: #4f46e5; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; opacity: 0; transform: scale(.7); transition: all .25s ease; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.course-card:hover .cover-cta { opacity: 1; transform: scale(1); }
.course-meta-row { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-bottom: .8rem; }
.course-meta-row i { color: var(--cx-primary); }
[data-bs-theme="dark"] .course-meta-row i { color: #a5b4fc; }
.course-instructor { display: flex; align-items: center; gap: .5rem; padding-top: .8rem; border-top: 1px dashed var(--cx-border); }
.card-arrow { color: var(--cx-primary); opacity: 0; transform: translateX(6px); transition: all .2s ease; }
html[dir="rtl"] .card-arrow { transform: translateX(-6px); }
.course-card:hover .card-arrow { opacity: 1; transform: none; }
/* placeholder covers: six vivid gradients + soft pattern */
.course-cover-ph { position: relative; font-size: 3.2rem; }
.course-cover-ph::before { content: ""; position: absolute; inset: 0; opacity: .18;
  background-image: radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, #fff 0 1.5px, transparent 2.5px);
  background-size: 28px 28px, 36px 36px; }
.course-cover-ph i { position: relative; filter: drop-shadow(0 8px 18px rgba(0,0,0,.25)); }
.ph-0 { background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #06b6d4); }
.ph-1 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.ph-2 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
.ph-3 { background: linear-gradient(135deg, #059669, #06b6d4); }
.ph-4 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.ph-5 { background: linear-gradient(135deg, #0f172a, #4f46e5); }

/* hero */
.lp-hero { position: relative; overflow: hidden; color: #fff; padding: 4.5rem 0 5rem; background: #0b1020; }
.lp-aurora { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 85% 10%, rgba(124,58,237,.55), transparent 60%),
    radial-gradient(520px 360px at 10% 90%, rgba(6,182,212,.45), transparent 60%),
    radial-gradient(500px 300px at 50% 50%, rgba(79,70,229,.35), transparent 70%); }
.lp-aurora::after { content: ""; position: absolute; inset: 0; opacity: .14;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.lp-badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); }
.lp-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.25); animation: pulse 2s infinite; }
.lp-title { font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.2; margin: 1.1rem 0; letter-spacing: -.5px; }
.lp-grad { background: linear-gradient(135deg, #a5b4fc, #c4b5fd 40%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 560px; margin-bottom: 1.6rem; }
.lp-search { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 18px; padding: .45rem; max-width: 600px; box-shadow: 0 25px 60px rgba(0,0,0,.35); }
.lp-search > i { color: #64748b; font-size: 1.15rem; padding-inline-start: .7rem; }
.lp-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 1.02rem; color: #0f172a; min-width: 0; padding: .55rem .2rem; }
.lp-search .btn { padding: .7rem 1.5rem; }
[data-bs-theme="dark"] .lp-search { background: #121a2e; }
[data-bs-theme="dark"] .lp-search input { color: #e2e8f0; }
.lp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: 1rem; font-size: .85rem; color: rgba(255,255,255,.65); }
.lp-quick a { display: inline-flex; align-items: center; gap: .35rem; color: #fff; padding: .3rem .75rem; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: all .2s ease; }
.lp-quick a:hover { background: rgba(255,255,255,.2); color: #fff; }
.lp-stats { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.2rem; }
.lp-stats b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.lp-stats span { color: rgba(255,255,255,.6); font-size: .85rem; }
/* spotlight card */
.lp-spot { display: block; position: relative; z-index: 1; background: var(--cx-surface); color: var(--cx-text); border-radius: 26px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.45); transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); transition: transform .4s ease; max-width: 520px; margin-inline: auto; }
html[dir="rtl"] .lp-spot { transform: perspective(1200px) rotateY(4deg) rotateX(2deg); }
.lp-spot:hover { transform: none !important; color: var(--cx-text); }
.lp-spot-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.lp-spot-cover img, .lp-spot-cover .course-cover-ph { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 4.5rem; }
.lp-spot-tag { position: absolute; top: 1rem; inset-inline-start: 1rem; background: rgba(15,23,42,.65); color: #fff; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .8rem; backdrop-filter: blur(6px); }
.lp-spot-tag i { color: #fb923c; }
.lp-play { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(255,255,255,.95); color: #4f46e5; display: flex; align-items: center; justify-content: center; font-size: 2.3rem; box-shadow: 0 0 0 12px rgba(255,255,255,.18); animation: ring 2.4s infinite; }
@keyframes ring { 0%,100% { box-shadow: 0 0 0 8px rgba(255,255,255,.22); } 50% { box-shadow: 0 0 0 18px rgba(255,255,255,.08); } }
.lp-spot-body { padding: 1.4rem 1.5rem 1.5rem; }
.lp-spot-title { font-weight: 800; font-size: 1.35rem; margin-bottom: .4rem; }
.lp-price { font-size: 1.6rem; font-weight: 800; }
.lp-price small { font-size: .9rem; color: var(--cx-muted); }
.lp-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: .6rem; background: var(--cx-surface); color: var(--cx-text); border-radius: 16px; padding: .7rem .9rem; box-shadow: 0 18px 40px rgba(0,0,0,.3); animation: float 5s ease-in-out infinite; }
.lp-float.f1 { top: -14px; inset-inline-end: 0; }
.lp-float.f2 { bottom: -18px; inset-inline-start: 0; animation-delay: 1.6s; }
.lp-empty { text-align: center; padding: 3rem; }
@media (max-width: 991.98px) { .lp-float { display: none; } .lp-spot, html[dir="rtl"] .lp-spot { transform: none; } .lp-hero { padding: 3rem 0 3.5rem; } }

/* sections */
.lp-section { padding: 4rem 0; }
.lp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.lp-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1.6rem; scrollbar-width: none; }
.lp-tabs::-webkit-scrollbar { display: none; }
.lp-tab { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; border: 1px solid var(--cx-border); background: var(--cx-surface); color: var(--cx-text); padding: .6rem 1.05rem; border-radius: 14px; font-weight: 700; font-size: .9rem; transition: all .2s ease; }
.lp-tab i { color: var(--cx-primary); }
.lp-tab span { font-size: .72rem; background: var(--cx-surface-2); color: var(--cx-muted); border-radius: 999px; padding: .05rem .5rem; }
.lp-tab:hover { border-color: var(--cx-primary); }
.lp-tab.active { background: var(--cx-grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px rgba(79,70,229,.3); }
.lp-tab.active i, .lp-tab.active span { color: #fff; background: rgba(255,255,255,.2); }
.lp-tab.active i { background: none; }
/* horizontal rows */
.lp-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 1.25rem) / 4); gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem .1rem 1rem; scrollbar-width: none; }
.lp-row::-webkit-scrollbar { display: none; }
.lp-row-item { scroll-snap-align: start; }
@media (max-width: 1199.98px) { .lp-row { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); } }
@media (max-width: 767.98px) { .lp-row { grid-auto-columns: 78%; } }
.lp-arrows { display: flex; gap: .4rem; }
/* free band */
.lp-free { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; align-items: center; background: linear-gradient(135deg, #059669, #06b6d4); border-radius: 28px; padding: 2rem; color: #fff; overflow: hidden; }
.lp-free .lp-row { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); }
.lp-badge.light { background: rgba(255,255,255,.2); }
@media (max-width: 991.98px) { .lp-free { grid-template-columns: 1fr; } .lp-free .lp-row { grid-auto-columns: 78%; } }
/* instructors */
.lp-ins { display: block; text-align: center; padding: 1.4rem .8rem; border-radius: 20px; background: var(--cx-surface); border: 1px solid var(--cx-border); color: var(--cx-text); transition: all .2s ease; height: 100%; }
.lp-ins:hover { transform: translateY(-5px); box-shadow: var(--cx-shadow-lg); color: var(--cx-text); }
.lp-ins .avatar { margin-inline: auto; }
/* steps */
.lp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lp-step { position: relative; display: flex; gap: .9rem; align-items: flex-start; padding: 1.4rem; border-radius: 20px; background: var(--cx-surface); border: 1px solid var(--cx-border); }
.lp-step p { color: var(--cx-muted); font-size: .88rem; margin: .3rem 0 0; }
.lp-step-n { position: absolute; top: .6rem; inset-inline-end: 1rem; font-size: 2.6rem; font-weight: 800; color: var(--cx-primary); opacity: .1; font-family: "Inter", sans-serif; }
@media (max-width: 991.98px) { .lp-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575.98px) { .lp-steps { grid-template-columns: 1fr; } }
/* reviews & cta */
.lp-review { position: relative; display: flex; flex-direction: column; }
.lp-quote { position: absolute; top: .6rem; inset-inline-end: 1rem; font-size: 2.6rem; color: var(--cx-primary); opacity: .12; }
.lp-cta { padding: 3rem 2.5rem; }
.lp-cta-logo { position: absolute; width: 220px; inset-inline-end: -40px; bottom: -60px; opacity: .15; transform: rotate(-15deg); }
/* reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0s), transform .6s ease var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .lp-play, .lp-float { animation: none; } }
.hero-in { animation: heroIn .55s ease both; }
@keyframes heroIn { from { transform: translateY(12px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-in { animation: none; } }
.lp-cta .btn-light { background: #fff; color: #4f46e5; border-color: #fff; }
.lp-cta .btn-light:hover { background: #eef2ff; color: #4338ca; }
