:root {
  --bg: #f5f7fa; --surface: #fff; --text: #1b2430; --muted: #66727f; --line: #e3e8ee;
  --brand: #6d28d9; --brand-2: #f1eafe; --accent: #f59e0b; --ink: #000;
  --grad: linear-gradient(90deg, #a855f7, #ec4899 45%, #f97316 80%, #fbbf24);
  --amber: #a15c07; --amber-bg: #fef3c7;
  --green: #1d7a46; --green-bg: #e3f4ea; --red: #b42318; --red-bg: #fde8e7;
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .4em 0 .6em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin: 0 0 .7em; }
code { background: var(--brand-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; word-break: break-all; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--red); }

.topbar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1f1f2e; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { color: #fff; display: flex; align-items: center; gap: 10px; line-height: 1.1; font-size: .92rem; letter-spacing: .02em; }
.brand img { display: block; height: 33px; width: auto; }
.brand b { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a, .topbar .link { color: #e7e5f0; font-weight: 500; }
.topbar nav a.on { color: #fff; box-shadow: inset 0 -2px 0 #ec4899; padding-bottom: 2px; }
.topbar nav a:hover { color: #fff; text-decoration: none; }
.topbar nav .btn.sm { background: var(--grad); color: #1b1030; font-weight: 700; }
.nav-toggle, .nav-burger { display: none; }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; cursor: pointer; font: inherit; padding: 0; }
main.wrap { padding-top: 20px; padding-bottom: 40px; min-height: calc(100vh - 120px); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.center-card { text-align: center; padding: 40px 18px; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.ghost { background: var(--brand-2); color: var(--brand); }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.full { width: 100%; }

label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 12px; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--brand-2); border-color: var(--brand); }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
label.check { font-weight: 400; display: flex; align-items: center; margin-bottom: 6px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
legend { font-weight: 600; font-size: .88rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: end; }
.form-grid .span2 { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input, .inline-form select { margin: 0; width: auto; flex: 1; padding: 5px 8px; }
.inline-form .w-sort { width: 64px; flex: 0 0 64px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.row-actions form { margin: 0; }
.search { display: flex; gap: 8px; margin-bottom: 14px; }
.search input { margin: 0; max-width: 360px; }
.danger-zone { text-align: right; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
td.actions .inline-form select { width: 84px; flex: none; }
.card { overflow-x: auto; }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--brand-2); color: var(--brand); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }

.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; background: var(--green-bg); color: var(--green); }
.flash.error { background: var(--red-bg); color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.course-card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.course-card h3 { margin: 6px 0 0; }
.course-card p { margin: 0 0 6px; }
.course-card .btn { margin-top: auto; align-self: flex-start; }
.course-card.dim { opacity: .7; }
.course-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--brand-2); color: var(--brand); display: grid; place-items: center; font-weight: 800; }

.auth { max-width: 420px; margin: 30px auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { margin: 0; display: flex; flex-direction: column; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat b { font-size: 1.6rem; }
.stat small { color: var(--muted); }
.stat.warn { border-color: var(--accent); background: #fff8e6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col > .card { margin-bottom: 18px; }
.creds { border-color: var(--accent); background: #fff8e6; }
.creds pre { background: #fff; padding: 12px; border-radius: 8px; border: 1px solid var(--line); user-select: all; }

.course-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; user-select: none; }
.player video { width: 100%; height: 100%; display: block; }
.player:fullscreen { border-radius: 0; aspect-ratio: auto; }
.wm { position: absolute; top: 0; left: 0; color: rgba(255,255,255,.35); font-size: 14px; font-weight: 600; pointer-events: none;
  text-shadow: 0 0 2px rgba(0,0,0,.5); transition: transform 2s ease; white-space: nowrap; z-index: 2; }
.fs-btn { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(0,0,0,.45); color: #fff; border: 0; border-radius: 6px; font-size: 18px; width: 36px; height: 34px; cursor: pointer; opacity: .75; }
.fs-btn:hover { opacity: 1; }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.75); padding: 20px; text-align: center; z-index: 4; }
.player-msg[hidden] { display: none; }
.lec-title { margin-top: 14px; }
.lec-list { padding: 14px 0; max-height: 75vh; overflow-y: auto; }
.lec-list h3 { padding: 0 16px; }
.lec-list ol { list-style: none; margin: 0; padding: 0; counter-reset: lec; }
.lec-list li { counter-increment: lec; }
.lec-list li a { display: flex; justify-content: space-between; gap: 8px; padding: 9px 16px; color: var(--text); }
.lec-list li a::before { content: counter(lec) "."; color: var(--muted); min-width: 24px; }
.lec-list li a span:first-of-type { flex: 1; }
.lec-list li a:hover { background: var(--bg); text-decoration: none; }
.lec-list li.on a { background: var(--brand-2); color: var(--brand); font-weight: 600; }
.up-row { display: grid; grid-template-columns: 1fr 140px 90px; gap: 8px; align-items: center; margin-top: 8px; font-size: .88rem; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
progress { width: 100%; }

@media (max-width: 860px) {
  .course-layout, .two-col, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 28px 20px; }
}

/* ---------- shared additions ---------- */
textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.btn.lg { padding: 13px 22px; font-size: 1rem; border-radius: 10px; }
.btn.outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.part-row td { background: var(--bg); padding: 6px 8px; }
.inline-form .w-part { width: 88px; flex: 0 0 88px; }
.unlock-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--amber-bg); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.unlock-form input { width: auto; flex: 1 1 160px; margin: 0; padding: 6px 9px; }
.logo-prev { height: 150px; border-radius: 10px; background: #f3f0fa; display: grid; place-items: center; margin-bottom: 12px; overflow: hidden; }
.logo-prev img { max-height: 120px; max-width: 80%; }
.logo-prev.cover img { max-height: none; max-width: none; width: 100%; height: 100%; object-fit: cover; }
.locked-panel { aspect-ratio: 16 / 9; border-radius: var(--radius); background: radial-gradient(circle at 30% 20%, #2a1745, #0b0b12 70%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.locked-panel h2 { margin: 6px 0; }
.locked-panel p { color: #d8d4e6; max-width: 440px; }
.lock-ico { font-size: 40px; }
.unlock-note { margin-top: 12px; background: var(--amber-bg); color: var(--amber); padding: 10px 14px; border-radius: 8px; font-size: .92rem; }
.lec-list li.locked a { color: var(--muted); }

/* ---------- public website ---------- */
body.public { background: #fff; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #db2777; margin-bottom: 8px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.hero-glow { position: absolute; inset: -40% -10% auto auto; width: 70%; height: 160%; background: radial-gradient(closest-side, rgba(168,85,247,.35), transparent 70%), radial-gradient(closest-side at 70% 70%, rgba(249,115,22,.25), transparent 70%); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.12; margin: 0 0 18px; letter-spacing: -.01em; }
.hero p { color: #cfcbe0; font-size: 1.08rem; max-width: 560px; }
.hero .eyebrow { color: #f9a8d4; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-cta .btn:first-child { background: var(--grad); color: #1b1030; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 20px 60px rgba(168,85,247,.25)); }
.page-hero { background: var(--ink); color: #fff; padding: 52px 0 46px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.page-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 8px; max-width: 820px; }
.page-hero p { color: #cfcbe0; margin: 0; max-width: 680px; }
.page-hero .eyebrow { color: #f9a8d4; }
.crumb { color: #cfcbe0; font-size: .9rem; display: inline-block; margin-bottom: 10px; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section.narrow { max-width: 820px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 8px; line-height: 1.2; }
.mb { margin-bottom: 20px; }
.band { background: #faf8ff; }
.band.dark { background: var(--ink); color: #fff; }
.band.dark .contact-card { background: #15131f; border-color: #2a2738; color: #fff; }
.band.dark .contact-card small { color: #a9a4bd; }

.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cgrid.three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ccard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(40, 20, 80, .10); }
.ccard-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #f6f2ff, #fff4ec); display: grid; place-items: center; overflow: hidden; }
.ccard-media img { max-height: 70%; max-width: 60%; object-fit: contain; }
.ccard-media.cover img, .cd-media.cover img { max-height: none; max-width: none; width: 100%; height: 100%; object-fit: cover; }
.ccard-initials { font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.ccard-body h3 { margin: 0 0 4px; font-size: 1.08rem; }
.ccard-body h3 a { color: var(--text); }
.ccard-sub { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.ccard-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fee { font-weight: 800; font-size: 1.05rem; }

.about-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; padding-top: 64px; padding-bottom: 64px; align-items: center; }
.about-split h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 14px; line-height: 1.2; }
.quote { font-weight: 600; border-left: 3px solid #ec4899; padding-left: 14px; }
.why { display: grid; gap: 14px; }
.why-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 3px; }
.why-item b { font-size: 1rem; }
.why-item span { color: var(--muted); font-size: .92rem; }

.fee-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fee-row { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fee-row:last-child { border-bottom: 0; }
.fee-row:nth-child(odd) { background: #fcfbff; }
.fee-no { font-weight: 800; font-size: 1.3rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fee-name { display: flex; flex-direction: column; }
.fee-name a { color: var(--text); }
.fee-name span { color: var(--muted); font-size: .9rem; }
.fee-amt { font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.admission { margin-top: 22px; background: #faf8ff; border: 1px solid #ece6fb; border-radius: 14px; padding: 18px 22px; }
.admission h3 { margin: 0 0 8px; }
.admission ul { margin: 0; padding-left: 20px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.contact-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; color: var(--text); background: #fff; transition: border-color .15s; }
.contact-card:hover { text-decoration: none; border-color: #c084fc; }
.contact-card .ci { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #db2777; }
.contact-card b { font-size: 1.05rem; }
.contact-card small { color: var(--muted); }
.contact-card.wa .ci { color: #16a34a; }
.break { word-break: break-all; }
.cta-box { margin-top: 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--ink); color: #fff; border-radius: 14px; padding: 22px 24px; }
.cta-box div { display: flex; flex-direction: column; }
.cta-box span { color: #cfcbe0; }
.cta-box .btn { background: var(--grad); color: #1b1030; }

.course-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.cd-media { aspect-ratio: 16 / 7; border-radius: 14px; background: linear-gradient(135deg, #f6f2ff, #fff4ec); display: grid; place-items: center; overflow: hidden; margin-bottom: 26px; }
.cd-media img { max-height: 70%; max-width: 40%; object-fit: contain; }
.lead { font-size: 1.06rem; line-height: 1.7; }
.cd-side .sticky { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.cd-fee { font-size: 2rem; font-weight: 800; }
.cd-points { margin: 6px 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }

.footer { background: var(--ink); color: #cfcbe0; margin-top: 0; }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
.footer h4 { color: #fff; margin: 4px 0 10px; font-size: .95rem; }
.footer a, .footer span { display: block; color: #cfcbe0; margin-bottom: 6px; font-size: .92rem; }
.footer .brand { display: flex; color: #fff; margin-bottom: 10px; }
.footer .brand span { display: block; color: #fff; margin: 0; }
.muted-l { color: #a9a4bd; font-size: .9rem; }
.copy { border-top: 1px solid #1f1f2e; padding-top: 16px; padding-bottom: 20px; font-size: .85rem; color: #8a85a0; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }
.wa-float:hover { transform: scale(1.05); }

@media (max-width: 960px) {
  .hero-in, .about-split, .course-detail { grid-template-columns: 1fr; }
  .hero-logo { order: -1; }
  .hero-logo img { max-width: 260px; }
  .hero-in { padding-top: 40px; padding-bottom: 52px; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .nav-burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
  .nav-burger span { width: 24px; height: 2px; background: #fff; display: block; }
  .topbar nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: flex-start; padding: 12px 16px 18px; gap: 12px; border-bottom: 1px solid #1f1f2e; }
  .nav-toggle:checked ~ nav { display: flex; }
}
@media (max-width: 600px) {
  .fee-row { grid-template-columns: 40px 1fr; }
  .fee-amt { grid-column: 2; }
  .fee-row .btn { grid-column: 2; justify-self: start; }
  .footer-in { grid-template-columns: 1fr; }
  .section { padding-top: 44px; padding-bottom: 44px; }
}
.course-icon { overflow: hidden; }
.course-icon img { width: 100%; height: 100%; object-fit: cover; }
.topbar .nav-toggle { display: none; }
.hero-logo img { border-radius: 22px; box-shadow: 0 0 0 1px #1d1a29, 0 30px 90px rgba(168,85,247,.28); }
.contact-card b.break { font-size: .95rem; word-break: normal; overflow-wrap: anywhere; }
