/* TradeWithFarhan — dark trading theme (navy + green + gold) */

:root {
  --bg: #070d1a;
  --bg-2: #0a1222;
  --card: #0f1a2e;
  --card-2: #13203a;
  --border: #1e2d4a;
  --border-2: #2a3c60;
  --text: #e7edf7;
  --muted: #8d9bb7;
  --green: #16c784;
  --green-2: #0fa36b;
  --green-soft: rgba(22, 199, 132, 0.12);
  --gold: #f5b942;
  --gold-2: #d99a1e;
  --gold-soft: rgba(245, 185, 66, 0.12);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(22, 199, 132, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(245, 185, 66, 0.06), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  background-attachment: fixed;
}
body::before {
  /* faint chart grid */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
  z-index: -1;
}
main { flex: 1; }
a { color: var(--green); text-decoration: none; }
a:hover { color: #3ee0a3; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .85em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 28px; padding-bottom: 48px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 13, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand b { color: var(--gold); font-weight: 700; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-bg { fill: #0f1a33; stroke: var(--border-2); }
.wick-red { stroke: var(--red); stroke-width: 1.5; } .body-red { fill: var(--red); }
.wick-green { stroke: var(--green); stroke-width: 1.5; } .body-green { fill: var(--green); }
.wick-gold { stroke: var(--gold); stroke-width: 1.5; } .body-gold { fill: var(--gold); }

.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav form { margin: 0; }
.nav-link { color: var(--muted); font-weight: 500; padding: 6px 8px; border-radius: 8px; }
.nav-link:hover { color: var(--text); background: var(--card); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  font-size: .9rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); flex: none; }
.chip-gold { color: var(--gold); border-color: rgba(245, 185, 66, .4); background: var(--gold-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  color: #04130c; background: linear-gradient(180deg, #1fd892, var(--green-2));
  box-shadow: 0 6px 18px rgba(22, 199, 132, 0.25);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); color: #04130c; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.btn-gold { color: #1a1204; background: linear-gradient(180deg, #ffcb5c, var(--gold-2)); box-shadow: 0 6px 18px rgba(245, 185, 66, 0.25); }
.btn-gold:hover { color: #1a1204; }
.btn-ghost { color: var(--text); background: var(--card-2); border-color: var(--border-2); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--green); }
.btn-danger { color: #fff; background: linear-gradient(180deg, #f05252, #c53030); box-shadow: none; }
.btn-danger:hover { color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 13px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Cards / alerts ---------- */
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; font-size: .95rem; border: 1px solid; }
.alert-ok { background: var(--green-soft); border-color: rgba(22, 199, 132, .4); color: #8ff0c7; }
.alert-err { background: var(--red-soft); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.pill { padding: 4px 10px; border-radius: 999px; font-size: .8rem; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(245, 185, 66, .3); white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-ok { color: var(--green); background: var(--green-soft); }
.badge-off { color: #fca5a5; background: var(--red-soft); }
.empty { text-align: center; padding: 40px 22px; }

/* ---------- Forms ---------- */
.stack { display: grid; gap: 16px; margin: 18px 0; }
.field { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: #0a1324; border: 1px solid var(--border-2); border-radius: 10px;
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 199, 132, .18); }
input::placeholder, textarea::placeholder { color: #5b6a88; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row input { flex: 1; min-width: 0; }

/* ---------- Auth pages ---------- */
.auth-page main { display: flex; }
.auth-wrap { position: relative; flex: 1; display: grid; place-items: center; padding: 40px 16px; min-height: 100vh; overflow: hidden; }
.auth-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(22, 199, 132, .18), transparent 65%); top: 50%; left: 50%; transform: translate(-50%, -60%); pointer-events: none; }
.auth-glow.gold { background: radial-gradient(circle, rgba(245, 185, 66, .16), transparent 65%); }
.auth-card { position: relative; width: 100%; max-width: 420px; padding: 32px 28px; }
.auth-brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.6rem; }
.big-404 { font-size: 4.5rem; font-weight: 800; margin: 0; background: linear-gradient(90deg, var(--green), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Dashboard ---------- */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 30px; margin-bottom: 28px; }
.hero-text { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 12px; }
.stat { min-width: 96px; text-align: center; padding: 14px 12px; border-radius: 12px; background: rgba(10, 19, 36, .7); border: 1px solid var(--border); }
.stat b { display: block; font-size: 1.6rem; color: var(--green); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }
.hero-chart { position: absolute; right: 0; bottom: 0; width: 60%; height: 70%; opacity: .25; pointer-events: none; }
.hero-chart polyline { fill: none; stroke: var(--green); stroke-width: 2; vector-effect: non-scaling-stroke; }

.modules { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.module-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.module-info { flex: 1; min-width: 0; }
.module-info h2, .module-info h3 { margin-bottom: 4px; }
.module-info p { margin: 0; }
.module-num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-weight: 800; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(245, 185, 66, .3); }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lesson-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); background: rgba(10, 19, 36, .55); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.lesson-list a:hover { border-color: var(--green); background: var(--green-soft); color: var(--text); }
.lesson-idx { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--border-2); }
.lesson-title { flex: 1; min-width: 0; }
.lesson-play { color: var(--green); font-size: .8rem; }
.soon { font-size: .72rem; color: var(--muted); border: 1px solid var(--border-2); border-radius: 999px; padding: 1px 8px; }
.lesson-list a.watched .lesson-idx { color: #04130c; background: var(--green); border-color: var(--green); }
.lesson-list a.watched .lesson-idx { font-size: 0; }
.lesson-list a.watched .lesson-idx::after { content: '✓'; font-size: .8rem; }
.empty-note { margin: 0; }
.lesson-dur { flex: none; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.started { flex: none; font-size: .72rem; color: var(--gold); }

/* Progress bars (native <progress>, no inline styles needed under CSP) */
progress { -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--card-2); color: var(--green); }
progress::-webkit-progress-bar { background: var(--card-2); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--green-2), var(--green)); border-radius: 999px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--green-2), var(--green)); border-radius: 999px; }
.progress-bar { display: block; width: 100%; height: 10px; border: 1px solid var(--border-2); }
.mini-progress { display: block; flex: none; width: 52px; height: 5px; }
.table .mini-progress { width: 100%; max-width: 140px; margin: 4px 0; }
.course-progress { margin: 4px 0 16px; max-width: 460px; }
.course-progress-label { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.course-progress-label b { color: var(--green); }
.btn-continue { white-space: normal; text-align: left; max-width: 100%; }

/* ---------- Lesson page ---------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }
.lesson-heading { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.lesson-tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(245, 185, 66, .3); padding: 3px 10px; border-radius: 999px; }
.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--border-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(22, 199, 132, .08);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-msg { display: grid; place-items: center; text-align: center; padding: 20px; background: linear-gradient(135deg, #0b1528, #050a14); }
.player-msg p { margin: 6px 0 0; }
/* Username + date watermark; public/assets/lesson.js moves it to a random spot every ~20s. */
.watermark {
  position: absolute; top: 8%; left: 6%; z-index: 2; pointer-events: none;
  font-size: clamp(.68rem, 2.4vw, .85rem); font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  color: rgba(255, 255, 255, .28); text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  transition: opacity .4s ease;
  user-select: none; -webkit-user-select: none;
}
.watermark.wm-hide { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .watermark { transition: none; } }
.resume-note { margin: 8px 0 0; color: var(--gold); }
.lesson-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.complete-form { margin: 0; }
.btn-done { background: var(--green-soft); color: var(--green); border-color: rgba(22, 199, 132, .5); box-shadow: none; }
.btn-done:hover { color: var(--green); }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0; }
.lesson-nav .btn { flex-direction: column; align-items: flex-start; gap: 2px; max-width: 48%; white-space: normal; text-align: left; }
.lesson-nav .btn:last-child { align-items: flex-end; text-align: right; }
.lesson-nav .btn small { font-weight: 500; font-size: .78rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.lesson-desc p { white-space: pre-line; margin: 0; color: #c9d3e6; }
.lesson-side { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding: 18px; }
.lesson-side h2 { font-size: 1rem; margin-bottom: 12px; }
.side-module { margin-bottom: 14px; }
.side-module h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin-bottom: 6px; }
.side-module ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-module a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; border-left: 2px solid transparent; }
.side-module a:hover { color: var(--text); background: var(--card-2); }
.side-module a.watched::before { content: '✓ '; color: var(--green); }
.side-module a.active { color: var(--text); background: var(--green-soft); border-left-color: var(--green); font-weight: 600; }

/* ---------- Admin ---------- */
.page-title { margin-bottom: 18px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card.stat-danger { border-color: rgba(239, 68, 68, .55); background: var(--red-soft); }
.stat-card.stat-danger b { color: var(--red); }
.stat-card.stat-warn { border-color: rgba(245, 185, 66, .55); background: var(--gold-soft); }
.text-danger { color: #fca5a5; }
.text-warn { color: var(--gold); font-weight: 600; }
.alert-warn { background: var(--gold-soft); border-color: rgba(245, 185, 66, .45); color: #fde2a4; }
.alert-warn a { color: var(--gold); text-decoration: underline; }
.badge-life { color: var(--gold); background: var(--gold-soft); }
.access-info { margin-top: 6px; }
.note-text { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-head { font-size: .95rem; color: var(--muted); margin: 4px 0 10px; }
.field small { font-weight: 400; color: #6c7b99; }
.filter-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.filter-row input { max-width: 420px; }
.table tr[hidden] { display: none !important; }
.offscreen { position: fixed; top: -1000px; left: -1000px; opacity: 0; }
/* One-time credentials page */
.cred-actions { margin-bottom: 16px; }
.cred-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-bottom: 22px; }
.cred-card { display: grid; gap: 10px; }
.cred-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.cred-list { margin: 0; display: grid; gap: 6px; }
.cred-list div { display: flex; gap: 10px; align-items: center; }
.cred-list dt { width: 84px; color: var(--muted); font-size: .85rem; }
.cred-list dd { margin: 0; }
.cred-list code { font-size: 1rem; padding: 3px 8px; border-radius: 6px; background: #0a1324; border: 1px solid var(--border-2); }
.cred-pass { color: var(--gold); letter-spacing: .04em; }
.cred-msg { font-family: var(--mono); font-size: .82rem; line-height: 1.5; }
.badge-danger { color: #fff; background: var(--red); margin: 6px 0 4px; }
.login-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.login-stats b { color: var(--text); }
.login-stats .text-danger, .login-stats .text-danger b { color: #fca5a5; }
.table tr.row-sharing td { background: var(--red-soft); }
.table tr.row-sharing td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.stat-card { padding: 16px; text-align: center; }
.stat-card b { display: block; font-size: 1.7rem; color: var(--gold); }
.stat-card span { color: var(--muted); font-size: .85rem; }
.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; align-items: end; margin-bottom: 12px; }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; align-items: end; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px; border-bottom: 1px solid var(--border-2); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.actions { min-width: 320px; }
.inline-form { display: flex; gap: 6px; margin-bottom: 8px; }
.inline-form input { padding: 6px 10px; font-size: .88rem; min-width: 0; flex: 1; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-row form { margin: 0; }
.admin-modules { display: grid; gap: 16px; }
.admin-module .module-head { margin-bottom: 10px; }
.admin-lessons { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.admin-lesson { padding: 10px 12px; border-radius: 10px; background: rgba(10, 19, 36, .55); border: 1px solid var(--border); }
.admin-lesson-head { display: flex; align-items: center; gap: 10px; }
.uid { color: var(--muted); background: var(--card-2); padding: 2px 6px; border-radius: 6px; }
details.edit { margin-top: 8px; }
details.edit > summary { cursor: pointer; color: var(--green); font-size: .88rem; font-weight: 600; list-style: none; display: inline-block; padding: 2px 0; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary::before { content: '▸ '; }
details.edit[open] > summary::before { content: '▾ '; }
details.edit[open] { padding: 12px; border-radius: 10px; background: rgba(7, 13, 26, .6); border: 1px dashed var(--border-2); }
details.edit[open] > summary { margin-bottom: 12px; }
details.add > summary { color: var(--gold); }

/* ---------- WhatsApp buttons ---------- */
.wa-icon { width: 1.15em; height: 1.15em; flex: none; }
.btn-wa { color: #fff; background: linear-gradient(180deg, #2fd366, #1da851); box-shadow: 0 6px 18px rgba(37, 211, 102, .25); }
.btn-wa:hover { color: #fff; }
.btn-wa.is-disabled { cursor: not-allowed; color: var(--muted); background: var(--card-2); border-color: var(--border-2); box-shadow: none; filter: none; }
.alert-expired p { margin: 0 0 10px; }
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  color: #fff; background: linear-gradient(180deg, #2fd366, #1da851);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 4px rgba(37, 211, 102, .18);
}
.wa-float:hover { color: #fff; filter: brightness(1.08); }
.wa-float .wa-icon { width: 30px; height: 30px; }

/* ---------- Landing page ---------- */
.landing-page .main { padding-top: 0; }
.landing-hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.landing-hero-text { position: relative; z-index: 1; max-width: 720px; }
.landing-title { font-size: clamp(2.3rem, 8vw, 4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px;
  background: linear-gradient(90deg, #fff 0%, #c8f7e4 45%, var(--green) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-title .gold { background: linear-gradient(90deg, #ffd47a, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-tagline { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: #c9d3e6; max-width: 640px; }
.instructor { margin-bottom: 22px; }
.instructor .chip { max-width: none; }
.landing-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.landing-stats .stat { min-width: 110px; }
.landing-chart { position: absolute; right: -2%; bottom: 0; width: 60%; height: 80%; opacity: .22; pointer-events: none; }
.landing-chart polyline { fill: none; stroke: var(--green); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.landing-section { padding: 40px 0 8px; scroll-margin-top: 80px; }
.section-intro { margin-bottom: 20px; max-width: 640px; }
.section-intro h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.section-intro p { margin: 0; }
.center-actions { justify-content: center; margin-top: 18px; }
.outline { display: grid; gap: 12px; }
.outline-module { padding: 0; }
.outline-module > summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.outline-module > summary::-webkit-details-marker { display: none; }
.outline-module > summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; color: var(--gold); line-height: 1; }
.outline-module[open] > summary::after { content: '−'; }
.outline-title { display: grid; gap: 2px; min-width: 0; }
.outline-desc { padding: 0 18px; margin: 0 0 8px; }
.outline-lessons { margin: 0; padding: 0 18px 16px 44px; display: grid; gap: 6px; color: #c9d3e6; }
.outline-lessons li { padding-left: 4px; }
.outline-lessons li span:first-child { margin-right: 8px; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.feature h3 { margin: 10px 0 6px; }
.feature p { margin: 0; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.3rem; background: var(--green-soft); border: 1px solid rgba(22, 199, 132, .3); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; }
.step-no { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-weight: 800; color: #04130c; background: linear-gradient(180deg, #1fd892, var(--green-2)); }
.faq { display: grid; gap: 10px; }
.faq-item { padding: 0; }
.faq-item > summary { padding: 16px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; gap: 12px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: '+'; margin-left: auto; color: var(--gold); font-size: 1.2rem; line-height: 1.2; }
.faq-item[open] > summary::after { content: '−'; }
.faq-item p { padding: 0 18px 16px; margin: 0; }
.disclaimer { border-color: rgba(245, 185, 66, .45); background: linear-gradient(180deg, rgba(245, 185, 66, .07), var(--bg-2)); }
.disclaimer h2 { color: var(--gold); }
.disclaimer ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: #c9d3e6; font-size: .93rem; }
.disclaimer b { color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 20px 0; font-size: .82rem; color: var(--muted); text-align: center; }
.footer a { text-decoration: underline; }
.footer-bare { border-top: 0; padding: 0 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .main { padding-top: 18px; }
  .card { padding: 16px; }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero-stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .modules { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .chip { max-width: 120px; }
  .nav-link { display: none; }
  .brand { font-size: 1rem; }
  .player { border-radius: 10px; margin: 0 -14px; width: calc(100% + 28px); border-left: 0; border-right: 0; }
  .lesson-nav .btn { max-width: 50%; padding: 10px 12px; }
  .lesson-tools .btn, .complete-form { flex: 1 1 auto; }
  .complete-form .btn { width: 100%; }
  .landing-hero { padding: 36px 0 24px; }
  .landing-hero .hero-actions .btn { flex: 1 1 100%; }
  .landing-stats .stat { flex: 1; min-width: 0; }
  .landing-section { padding-top: 28px; }
  .cred-grid { grid-template-columns: 1fr; }
  .filter-row input { max-width: none; }
  .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }

  /* Admin table becomes stacked cards */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; padding: 6px 4px; background: rgba(10, 19, 36, .55); }
  .table td { border: 0; padding: 8px 10px; }
  .table td::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
  .actions { min-width: 0; }
  .table tr.row-sharing { border-color: rgba(239, 68, 68, .6); background: var(--red-soft); }
  .table tr.row-sharing td { background: transparent; }
  .table tr.row-sharing td:first-child { box-shadow: none; }
}
