/* ==========================================================================
   HỌC VIỆN LỘC VINH — mockup design system
   Ngôn ngữ thiết kế: thân thiện · hiện đại · chuyên nghiệp · dễ sử dụng
   Kế thừa token thương hiệu của cokhilocvinh.com (accent #f2681c, ink #0b1424)
   Cấu trúc: 1) Token  2) Base  3) Tiện ích  4) Nút & badge  5) Form
             6) Header  7) Hero  8) Card khóa học  9) Chi tiết khóa
            10) Thanh toán  11) Player  12) Dashboard  13) Admin
            14) Footer  15) Responsive
   ========================================================================== */

/* 1. TOKEN ---------------------------------------------------------------- */
:root {
  /* màu thương hiệu (khớp style.css của site chính) */
  --ink: #0b1424;
  --ink-2: #111e33;
  --body: #3c4c63;
  --muted: #66788f;
  --line: #e3e9f1;
  --line-2: #d5dfeb;
  --soft: #f6f8fc;
  --soft-2: #eef3f9;
  --white: #fff;
  --accent: #f2681c;
  --accent-dark: #d9560e;
  --accent-soft: #fff1e7;

  /* màu chức năng */
  --blue: #2f6fb2;
  --blue-soft: #eaf2fb;
  --green: #0f8a5f;
  --green-soft: #e7f7f0;
  --amber: #a9711a;
  --amber-soft: #fdf5e4;
  --red: #c0392b;
  --red-soft: #fdeceb;

  /* bo góc — mềm, thân thiện */
  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* đổ bóng — nhẹ, không nặng nề */
  --sh-1: 0 1px 2px rgba(11, 20, 36, .06), 0 1px 3px rgba(11, 20, 36, .04);
  --sh-2: 0 10px 24px -16px rgba(11, 20, 36, .32), 0 2px 6px rgba(11, 20, 36, .05);
  --sh-3: 0 28px 56px -36px rgba(11, 20, 36, .38);
  --sh-accent: 0 14px 30px -16px rgba(242, 104, 28, .55);

  /* chữ */
  --font: "Be Vietnam Pro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1180px;
  --header-h: 72px;
}

/* 2. BASE ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4, h5 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.018em;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); }
h3 { font-size: 1.14rem; letter-spacing: -.01em; }
h4 { font-size: 1rem; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: rgba(242, 104, 28, .2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 3. TIỆN ÍCH -------------------------------------------------------------- */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.section { padding: 68px 0; }
.section--soft { background: var(--soft); }
.section--tight { padding: 44px 0; }
.section-head { display: grid; gap: 12px; margin-bottom: 28px; max-width: 680px; }
.section-head--split {
  display: flex; align-items: end; justify-content: space-between;
  gap: 28px; max-width: none; flex-wrap: wrap;
}
.section-head--split .section-head-side { max-width: 420px; font-size: .95rem; }
.section-title { margin-top: 6px; }
.section-aside { color: var(--muted); font-size: .95rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-dark);
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(242, 104, 28, .14); }

.grid { display: grid; gap: 20px; }
/* chặn min-content của card làm tràn cột trên màn hẹp */
.grid > *, .hero-grid > *, .detail-grid > *, .checkout-grid > *,
.player-layout > *, .footer-grid > *, .continue-card > *, .kpi-grid > *,
.editor-grid > *, .editor-rail > *, .tree, .lesson-item,
.app-shell > *, .app-main > *, .tbl-wrap, .table, .panel > * { min-width: 0; }
/* grid dùng làm cột dọc: track minmax(0,1fr) để bảng/khối rộng không đẩy trang */
.app-main, .toolbar, .field, .bank-rows, .checklist, .sum-total { grid-template-columns: minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 22px; }

.alert {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--soft); font-size: .9rem;
}
.alert--info { background: var(--blue-soft); border-color: #cfe0f5; color: #1d4e82; }
.alert--warn { background: var(--amber-soft); border-color: #f0dcb0; color: #7d5310; }
.alert--success { background: var(--green-soft); border-color: #bfe6d6; color: #0a6647; }
.alert strong { color: inherit; }

.hr { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; color: var(--line-2); margin-bottom: 10px; }

/* 4. NÚT & BADGE ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: .95rem; font-weight: 700; letter-spacing: -.01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-outline { border-color: var(--line-2); background: var(--white); color: var(--ink); }
.btn-outline:hover { border-color: var(--muted); background: var(--soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--soft-2); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .84rem; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn--disabled { opacity: .55; pointer-events: none; box-shadow: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: .74rem; font-weight: 700; letter-spacing: .01em;
  background: var(--soft-2); color: var(--body);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--accent { background: var(--accent-soft); color: var(--accent-dark); }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--blue { background: var(--blue-soft); color: var(--blue); }
.badge--amber { background: var(--amber-soft); color: var(--amber); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--solid { background: var(--ink); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--white);
  font-size: .875rem; font-weight: 600; color: var(--body);
  transition: .16s ease;
}
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 5. FORM ----------------------------------------------------------------- */
.field { display: grid; gap: 7px; }
.label { font-size: .84rem; font-weight: 700; color: var(--ink); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink); font: inherit; font-size: .94rem;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #9aa9bc; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 104, 28, .14);
}
.help { font-size: .8rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }

.searchbar { position: relative; display: flex; align-items: center; }
.searchbar .icon { position: absolute; left: 16px; color: var(--muted); width: 18px; height: 18px; }
.searchbar .input { padding-left: 44px; min-height: 52px; border-radius: var(--r-pill); }

/* 6. HEADER --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(11, 20, 36, .5); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), #ff8b45);
  display: grid; place-items: center; color: #fff; box-shadow: var(--sh-accent);
}
.brand-mark .icon { width: 22px; height: 22px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: .95rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px;
  border-radius: var(--r-pill); font-size: .9rem; font-weight: 600; color: var(--body);
  white-space: nowrap;
  transition: .16s ease;
}
.nav-link:hover { background: var(--soft-2); color: var(--ink); }
.nav-link.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--white);
  place-items: center; color: var(--ink);
}
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 65; background: rgba(11, 20, 36, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
body.nav-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-foot { display: none; }

/* 7. HERO ----------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fdfaf7 0%, #ffffff 70%); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(closest-side, rgba(242, 104, 28, .18), rgba(242, 104, 28, 0));
  filter: blur(46px);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center;
  gap: 52px; padding: 60px 0 68px; position: relative;
}
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.hero-title span { color: var(--accent); }
.hero-lead { font-size: 1.06rem; color: var(--body); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 8px; }
.hero-stats .stat strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--ink); font-family: var(--mono); }
.hero-stats .stat span { font-size: .8rem; color: var(--muted); }

.hero-visual { position: relative; display: grid; gap: 14px; }
.hero-proof {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); width: max-content; max-width: 100%;
}
.hero-proof .icon { color: var(--green); width: 20px; height: 20px; }
.hero-proof b { color: var(--ink); }

/* 8. CARD KHÓA HỌC -------------------------------------------------------- */
.toolbar { display: grid; gap: 14px; margin-bottom: 26px; }
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

.course-card {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--line-2); }
.course-cover {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
  background: linear-gradient(135deg, #fbe9dc, #eef3fb);
  border-bottom: 1px solid var(--line);
}
.course-cover--2 { background: linear-gradient(135deg, #e7f2ec, #eaf2fb); }
.course-cover--3 { background: linear-gradient(135deg, #eceafb, #eaf6f8); }
.course-cover--4 { background: linear-gradient(135deg, #fdf1e3, #eef7f2); }
.course-cover--5 { background: linear-gradient(135deg, #e6eefb, #f7f0ea); }
.course-cover--6 { background: linear-gradient(135deg, #f3e9f7, #eaf2fb); }
.cover-art { display: grid; gap: 8px; justify-items: center; color: var(--ink); opacity: .92; }
.cover-art .icon { width: 40px; height: 40px; color: var(--accent-dark); }
.cover-art span { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; color: var(--body); text-transform: uppercase; }
.cover-flags { position: absolute; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 8px; }
.cover-play {
  position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--accent-dark);
  box-shadow: var(--sh-2);
}
.course-body { padding: 18px 18px 20px; display: grid; gap: 12px; align-content: start; }
.course-title { font-size: 1.04rem; line-height: 1.35; }
.course-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.course-meta .meta { display: inline-flex; align-items: center; gap: 5px; }
.course-meta .icon { width: 15px; height: 15px; }
.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price { font-size: 1.16rem; font-weight: 800; color: var(--ink); font-family: var(--mono); letter-spacing: -.02em; }
.price-old { font-size: .85rem; color: var(--muted); text-decoration: line-through; font-family: var(--mono); }
.price-off { font-size: .74rem; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: var(--r-pill); }
.rating { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 700; color: var(--ink); }
.rating .icon { width: 15px; height: 15px; color: #e8a33a; fill: currentColor; stroke: none; }

.progressbar { height: 7px; border-radius: var(--r-pill); background: var(--soft-2); overflow: hidden; }
.progressbar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff9a5c); }
.progressbar--green > i { background: linear-gradient(90deg, #12a06f, #5acba1); }
.progress-info { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }

/* 9. CHI TIẾT KHÓA ------------------------------------------------------- */
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); padding: 18px 0 6px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .icon { width: 13px; height: 13px; opacity: .6; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 60px; }
.preview {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(140deg, #14213a, #24354f); display: grid; place-items: center; color: #fff;
  box-shadow: var(--sh-3);
}
.preview::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(242, 104, 28, .35), transparent 55%);
}
.preview-play {
  position: relative; z-index: 1; display: grid; place-items: center; gap: 10px; text-align: center;
}
.preview-play .circle {
  width: 74px; height: 74px; border-radius: 50%; background: rgba(255, 255, 255, .95);
  display: grid; place-items: center; color: var(--accent-dark); box-shadow: var(--sh-3);
}
.preview-play .circle .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.preview-play small { font-size: .8rem; color: rgba(255, 255, 255, .78); }
.preview-tag { position: absolute; left: 16px; top: 16px; z-index: 1; }

.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.outcome { display: flex; gap: 10px; font-size: .9rem; }
.outcome .icon { color: var(--green); width: 18px; height: 18px; margin-top: 3px; }

.curriculum { display: grid; gap: 10px; }
.lesson-group { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); overflow: hidden; }
.lesson-group > summary {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none;
  font-weight: 700; color: var(--ink); font-size: .94rem;
}
.lesson-group > summary::-webkit-details-marker { display: none; }
.lesson-group > summary .chev { margin-left: auto; transition: transform .18s ease; color: var(--muted); }
.lesson-group[open] > summary .chev { transform: rotate(180deg); }
.lesson-group > summary .badge { font-weight: 700; }
.lessons { display: grid; }
.lesson-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px;
  border-top: 1px solid var(--line); font-size: .875rem;
}
.lesson-row:hover { background: var(--soft); }
.lesson-idx {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--soft-2); color: var(--body); font-size: .72rem; font-weight: 700;
}
.lesson-row.is-done .lesson-idx { background: var(--green-soft); color: var(--green); }
.lesson-row.is-current { background: var(--accent-soft); }
.lesson-row.is-current .lesson-idx { background: var(--accent); color: #fff; }
.lesson-name { flex: 1; min-width: 0; color: var(--ink); }
.lesson-row.is-locked .lesson-name { color: var(--muted); }
.lesson-time { font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.lesson-row .icon { width: 15px; height: 15px; color: var(--muted); }
.lesson-row .icon--free { color: var(--green); }

.buy-card {
  position: sticky; top: calc(var(--header-h) + 18px);
  border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--white);
  box-shadow: var(--sh-2); padding: 22px; display: grid; gap: 16px;
}
.buy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buy-price .price { font-size: 1.9rem; }
.buy-list { display: grid; gap: 9px; font-size: .875rem; }
.buy-list li { display: flex; gap: 9px; }
.buy-list .icon { color: var(--green); width: 17px; height: 17px; margin-top: 2px; }
.guarantee { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--soft); font-size: .8rem; color: var(--body); }
.guarantee .icon { color: var(--blue); width: 18px; height: 18px; }

.instructor { display: flex; gap: 16px; align-items: flex-start; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--soft-2); color: var(--ink); font-weight: 800; font-size: 1.05rem;
  border: 2px solid var(--white); box-shadow: var(--sh-1);
}
.avatar--lg { width: 72px; height: 72px; font-size: 1.3rem; }

.review { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head b { font-size: .9rem; color: var(--ink); }
.stars { display: inline-flex; gap: 2px; color: #e8a33a; }
.stars .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }

.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); padding: 0 18px; }
.faq summary { display: flex; align-items: center; gap: 10px; padding: 15px 0; cursor: pointer; font-weight: 700; color: var(--ink); font-size: .93rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { margin-left: auto; transition: transform .18s ease; color: var(--muted); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq p { padding: 0 0 16px; font-size: .9rem; color: var(--body); max-width: 70ch; }

/* 10. THANH TOÁN --------------------------------------------------------- */
.stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0 22px; }
.step { display: flex; align-items: center; gap: 9px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.step .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft-2); color: var(--muted); font-size: .78rem; font-weight: 800; font-family: var(--mono);
}
.step.is-active { color: var(--ink); }
.step.is-active .n { background: var(--accent); color: #fff; box-shadow: var(--sh-accent); }
.step.is-done { color: var(--green); }
.step.is-done .n { background: var(--green-soft); color: var(--green); }
.step-line { width: 34px; height: 2px; background: var(--line); border-radius: 2px; }

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.pay-method {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.pay-method + .pay-method { margin-top: 10px; }
.pay-method:hover { border-color: var(--muted); }
.pay-method input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.pay-method.is-selected { border-color: var(--accent); background: #fffaf6; box-shadow: 0 0 0 4px rgba(242, 104, 28, .1); }
.pay-method.is-disabled { opacity: .6; }
.pay-method .pm-ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--soft-2); color: var(--ink);
}
.pay-method .pm-body { display: grid; gap: 3px; }
.pay-method .pm-body b { color: var(--ink); font-size: .93rem; }
.pay-method .pm-body span { font-size: .82rem; color: var(--muted); }

.qr-panel {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start;
  padding: 22px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); background: var(--soft);
}
.qr-box {
  width: 176px; height: 176px; border-radius: var(--r); background: var(--white);
  border: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden;
}
.qr-box::before {
  content: ""; position: absolute; inset: 12px;
  background:
    repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 0 0 / 14px 14px,
    repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 7px 7px / 14px 14px;
  opacity: .82; border-radius: 6px;
  mask: radial-gradient(circle, #000 68%, #000 68%);
}
.qr-box span { position: relative; z-index: 1; background: var(--white); padding: 4px 8px; border-radius: 6px; font-size: .68rem; font-family: var(--mono); color: var(--muted); }
.bank-rows { display: grid; gap: 10px; }
.bank-row { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
.bank-row span:first-child { color: var(--muted); }
.bank-row b { color: var(--ink); font-family: var(--mono); font-size: .88rem; }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field code {
  flex: 1; min-width: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--white);
  border: 1px solid var(--line-2); font-family: var(--mono); font-size: .9rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.waiting { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--amber-soft); color: #7d5310; font-size: .84rem; font-weight: 600; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #d99b2b; box-shadow: 0 0 0 0 rgba(217, 155, 43, .5); animation: pulse 1.8s infinite; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(217, 155, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 155, 43, 0); }
}

.order-summary { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--white); box-shadow: var(--sh-2); padding: 22px; display: grid; gap: 14px; }
.sum-item { display: flex; gap: 12px; }
.sum-thumb { width: 64px; height: 48px; border-radius: 10px; flex: none; background: linear-gradient(135deg, #fbe9dc, #eef3fb); border: 1px solid var(--line); }
.sum-row { display: flex; justify-content: space-between; font-size: .88rem; }
.sum-row span { color: var(--muted); }
.sum-row b { color: var(--ink); font-family: var(--mono); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
.sum-total .price { font-size: 1.35rem; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { min-height: 42px; }
.coupon-row .btn { white-space: nowrap; flex: none; }

/* 11. PLAYER ------------------------------------------------------------- */
.player-shell { background: var(--soft); min-height: 100vh; }
.player-top { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.player-top .back { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 700; color: var(--body); }
.player-top .back:hover { color: var(--accent-dark); }
.player-top .meta { min-width: 0; }
.player-top .meta b { display: block; font-size: .92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; padding-bottom: 40px; }
.player-stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(140deg, #101a2c, #1e2f47); box-shadow: var(--sh-3);
  display: grid; place-items: center;
}
.player-stage .center-play {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .94);
  display: grid; place-items: center; color: var(--accent-dark); box-shadow: var(--sh-3);
}
.player-stage .center-play .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.player-watermark {
  position: absolute; right: 16px; top: 14px; font-family: var(--mono); font-size: .7rem;
  color: rgba(255, 255, 255, .42); letter-spacing: .04em; pointer-events: none;
}
.player-controls {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px 12px;
  background: linear-gradient(transparent, rgba(6, 12, 22, .72)); display: grid; gap: 9px;
}
.pc-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .28); position: relative; }
.pc-bar > i { position: absolute; inset: 0 auto 0 0; width: 38%; border-radius: 3px; background: var(--accent); }
.pc-bar > i::after { content: ""; position: absolute; right: -5px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.pc-row { display: flex; align-items: center; gap: 14px; color: rgba(255, 255, 255, .92); font-size: .76rem; font-family: var(--mono); }
.pc-row .spacer { margin-left: auto; }
.pc-row .fake-btn { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.pc-row .fake-btn .icon { width: 14px; height: 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 18px; flex-wrap: wrap; }
.tab { padding: 10px 14px; border: 0; background: none; font-size: .9rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent-dark); border-bottom-color: var(--accent); }

.player-side { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); overflow: hidden; }
.player-side-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.player-side .lesson-row { padding: 10px 16px; }
.player-side .lessons { max-height: 520px; overflow: auto; }

/* 12. DASHBOARD ---------------------------------------------------------- */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--soft); }
.app-side { background: var(--white); border-right: 1px solid var(--line); padding: 20px 16px; display: grid; align-content: start; gap: 22px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.side-nav { display: grid; gap: 3px; }
.side-link { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); font-size: .89rem; font-weight: 600; color: var(--body); }
.side-link .icon { width: 17px; height: 17px; color: var(--muted); }
.side-link:hover { background: var(--soft); color: var(--ink); }
.side-link.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.side-link.is-active .icon { color: var(--accent-dark); }
.side-title { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 12px; }
.side-user { display: flex; gap: 10px; align-items: center; padding: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.app-main { padding: 26px 30px 50px; display: grid; align-content: start; gap: 24px; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; flex-wrap: wrap; }
.page-head p { color: var(--muted); font-size: .92rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); display: grid; gap: 6px; }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 1.4rem; font-family: var(--mono); color: var(--ink); letter-spacing: -.02em; }
.kpi .trend { font-size: .74rem; font-weight: 700; color: var(--green); }
.kpi .trend--down { color: var(--red); }

.continue-card { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.continue-thumb { aspect-ratio: 16 / 9; border-radius: var(--r); background: linear-gradient(140deg, #14213a, #24354f); display: grid; place-items: center; color: rgba(255, 255, 255, .8); }
.ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--ink); background: conic-gradient(var(--green) calc(var(--p, 0) * 1%), var(--soft-2) 0); }
.ring > span { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; }

.course-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.course-row:first-child { border-top: 0; padding-top: 0; }
.thumb { width: 92px; height: 62px; border-radius: 10px; flex: none; background: linear-gradient(135deg, #fbe9dc, #eef3fb); border: 1px solid var(--line); }

/* 13. ADMIN -------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 800;
}
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--soft); }
.table .price { font-size: .92rem; }
.tbl-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

.mini-chart { display: flex; align-items: flex-end; gap: 8px; height: 128px; padding-top: 10px; }
.mini-chart .bar { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #ffa061, var(--accent)); min-height: 6px; position: relative; }
.mini-chart .bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--muted); font-family: var(--mono); }

/* 14. FOOTER ------------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .74); padding: 54px 0 26px; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-grid a { display: block; padding: 4px 0; font-size: .875rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 14px; }
.footer-brand .brand-text strong { color: #fff; }
.footer-brand .brand-text small { color: rgba(255, 255, 255, .55); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 34px; padding-top: 20px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; font-size: .78rem; }
.footer-legal b { color: rgba(255, 255, 255, .92); }
.notified-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); font-size: .74rem; }
.notified-badge .icon { width: 15px; height: 15px; color: #6fd3a8; }

/* 15. AUTH --------------------------------------------------------------- */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-brand { position: relative; background: linear-gradient(150deg, #101a2c, #24354f 60%, #3a2a20); color: #fff; padding: 46px; display: grid; align-content: space-between; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; inset: auto -15% -25% auto; width: 460px; height: 460px; background: radial-gradient(circle, rgba(242, 104, 28, .4), transparent 62%); }
.auth-brand h2 { color: #fff; font-size: 1.8rem; max-width: 22ch; }
.auth-quote { font-size: .95rem; color: rgba(255, 255, 255, .76); max-width: 34ch; }
.auth-side { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.tabs-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--soft-2); border-radius: var(--r-pill); }
.tabs-seg button { min-height: 40px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: .88rem; font-weight: 700; color: var(--muted); }
.tabs-seg button.is-active { background: var(--white); color: var(--ink); box-shadow: var(--sh-1); }

/* 16. DESIGN SYSTEM PAGE ------------------------------------------------- */
.ds-grid { display: grid; gap: 14px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.swatch { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.swatch .chipc { height: 66px; }
.swatch .meta { padding: 9px 11px; font-size: .74rem; background: var(--white); }
.swatch .meta b { display: block; color: var(--ink); font-size: .78rem; }
.swatch .meta code { font-family: var(--mono); color: var(--muted); font-size: .72rem; }
.token-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.token-table th, .token-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.token-table code { font-family: var(--mono); color: var(--accent-dark); }

/* 17. RESPONSIVE --------------------------------------------------------- */
/* 900–1180: 6 mục nav vẫn một dòng — thu padding/cỡ chữ, ẩn mục ngoài site */
@media (max-width: 1180px) {
  .header-inner { gap: 12px; }
  .nav-link { padding: 0 9px; font-size: .855rem; }
  .header-actions .btn-ghost { padding: 0 10px; }
}
@media (max-width: 1040px) {
  .nav-item--ext { display: none; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; padding: 44px 0 54px; }
  .hero-visual { order: -1; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .buy-card { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .player-layout { grid-template-columns: 1fr; }
  .player-side .lessons { max-height: 320px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); z-index: 70;
    background: var(--white); padding: 84px 20px 24px; box-shadow: var(--sh-3);
    transform: translateX(102%); transition: transform .24s ease;
    display: grid; align-content: start; gap: 16px; overflow: auto;
  }
  body.nav-open .main-nav { transform: none; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { min-height: 46px; font-size: .95rem; }
  .nav-toggle { display: grid; }
  .header-actions .btn-header-login { display: none; }
  .drawer-foot { display: grid; gap: 10px; margin-top: 8px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-main { padding: 20px 18px 40px; }
  .continue-card { grid-template-columns: 1fr; gap: 14px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}

@media (max-width: 720px) {
  .section { padding: 46px 0; }
  .container { padding-inline: 18px; }
  /* header gọn: logo + nút menu, CTA chuyển vào drawer */
  .header-inner { gap: 10px; }
  .brand { min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-text small { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark .icon { width: 19px; height: 19px; }
  .header-actions { gap: 8px; }
  .header-actions .btn { width: auto; }
  .nav-toggle { width: 40px; height: 40px; }
  .hero-proof { width: auto; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr; }
  .qr-panel { grid-template-columns: 1fr; }
  .qr-box { width: 100%; max-width: 220px; margin-inline: auto; height: 200px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .btn { width: 100%; }
  .btn-sm, .chip { width: auto; }
  .hero-actions { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr; }
  .price-card-sticky { position: static; }
}

@media (max-width: 560px) {
  .editor-bar .saved { display: none; }
  .header-actions .btn-primary { display: none; }
  .header-actions .btn-ghost { display: none; }   /* link phụ dài (trợ giúp) — giữ trong nội dung */
}

@media (max-width: 480px) {
  .hero-stats { gap: 18px; }
  .stepper { gap: 6px; }
  .step .n { width: 24px; height: 24px; }
  .step-line { width: 16px; }
  .step span.label-text { font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* 18. QUẢN LÝ KHÓA HỌC (admin) ------------------------------------------- */
.editor-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 0 14px; border-bottom: 1px solid var(--line);
}
.editor-bar .back { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 700; }
.editor-bar .back:hover { color: var(--accent-dark); }
.editor-bar .saved { font-size: .8rem; color: var(--muted); }

.editor-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .editor-grid { grid-template-columns: 280px minmax(0, 1fr); } .editor-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } .editor-rail { grid-template-columns: 1fr; } }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head b { color: var(--ink); font-size: .92rem; }
.panel-body { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--soft);
  display: flex; gap: 8px; flex-wrap: wrap; }
.panel-foot .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; justify-content: center; }

/* cây chương / bài */
/* track 1fr/minmax(0,…) để cột cây không phình theo max-content của tên bài */
.tree { display: grid; grid-template-columns: minmax(0, 1fr); }
.chapter { border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px; background: var(--soft); }
.chapter-head .grip { color: var(--line-2); cursor: grab; }
.chapter-head .name { flex: 1; min-width: 0; font-size: .85rem; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-head .count { font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.lesson-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 20px;
  border-top: 1px dashed var(--line); font-size: .84rem; cursor: pointer;
}
.lesson-item:hover { background: var(--soft); }
.lesson-item.is-selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.lesson-item .name { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-item .idx { font-family: var(--mono); font-size: .72rem; color: var(--muted); width: 16px; flex: none; }
.dot-state { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot--ok { background: var(--green); }
.dot--warn { background: var(--amber); }
.dot--none { background: var(--line-2); }

/* công tắc */
.toggle { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle .track { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--line-2); transition: background .16s ease; }
.toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--sh-1); transition: transform .16s ease;
}
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle--sm { width: 32px; height: 18px; }
.toggle--sm .track::after { width: 12px; height: 12px; top: 3px; left: 3px; }
.toggle--sm input:checked + .track::after { transform: translateX(14px); }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.toggle-row .txt { min-width: 0; }
.toggle-row .txt b { color: var(--ink); }

/* upload */
.upload {
  border: 2px dashed var(--line-2); border-radius: var(--r); background: var(--soft);
  padding: 18px; display: grid; gap: 8px; justify-items: center; text-align: center;
  transition: border-color .16s ease, background .16s ease;
}
.upload:hover, .upload.is-over { border-color: var(--accent); background: #fffaf6; }
.upload .icon { width: 26px; height: 26px; color: var(--accent-dark); }
.upload b { color: var(--ink); font-size: .9rem; }
.upload span { font-size: .78rem; color: var(--muted); }
.upload-progress { display: grid; gap: 7px; }
.upload-file {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white);
}
.upload-file .thumb-video {
  width: 72px; height: 44px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #14213a, #24354f); color: rgba(255,255,255,.85);
}
.upload-file .info { flex: 1; min-width: 0; }
.upload-file .info b { display: block; font-size: .86rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-file .info span { font-size: .75rem; color: var(--muted); font-family: var(--mono); }

/* giá */
.price-input { position: relative; }
.price-input .input { padding-right: 40px; font-family: var(--mono); text-align: right; font-weight: 700; }
.price-input .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
.price-preview { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); }
.price-preview .price { font-size: 1.15rem; }

/* checklist xuất bản */
.checklist { display: grid; gap: 9px; font-size: .84rem; }
.checklist li { display: flex; gap: 9px; align-items: flex-start; }
.checklist .icon { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.checklist li.ok .icon { color: var(--green); }
.checklist li.no .icon { color: var(--amber); }
.checklist li.no span { color: var(--body); }

/* thanh hành động dính đáy */
.action-bar {
  position: sticky; bottom: 0; z-index: 40; margin: 22px -30px -50px; padding: 14px 30px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.action-bar .spacer { margin-left: auto; }
@media (max-width: 900px) { .action-bar { margin: 18px -18px -40px; padding: 12px 18px; } .action-bar .btn { width: auto; } }

/* danh sách khóa học (bảng) */
.course-cell { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.course-cell .thumb { width: 64px; height: 42px; }
.course-cell b { display: block; color: var(--ink); font-size: .9rem; }
.course-cell span { font-size: .74rem; color: var(--muted); font-family: var(--mono); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
