/* ============================================================
   SkillUp Academy — Course Platform
   Original design inspired by common Vietnamese e-learning UX
   ============================================================ */

:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --accent: #f97316;
  --accent-light: #fff7ed;
  --success: #16a34a;
  --danger: #e11d48;
  --star: #f59e0b;

  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-alt: #f1f5f9;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
  --container: 1180px;
  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .3); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 12px 26px rgba(79, 70, 229, .38); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(249, 115, 22, .3); }
.btn-accent:hover { background: #ea580c; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: var(--brand-light); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 16px rgba(79,70,229,.35);
}
.logo span { color: var(--brand); }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  font-weight: 500; font-size: 15px; color: var(--body);
  padding: 8px 14px; border-radius: 8px; transition: .2s;
}
.nav-menu a:hover { color: var(--brand); background: var(--brand-light); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .link-login { font-weight: 600; font-size: 15px; padding: 8px 12px; }
.nav-actions .link-login:hover { color: var(--brand); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Nav dropdown (Công cụ) ---------- */
.nav-item-drop { position: relative; }
.nav-item-drop > .nav-drop-t {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 500; font-size: 15px; color: var(--body);
  padding: 8px 14px; border-radius: 8px; transition: .2s; cursor: pointer;
}
.nav-item-drop:hover > .nav-drop-t { color: var(--brand); background: var(--brand-light); }
.nav-item-drop .caret { font-size: 11px; transition: transform .2s; }
.nav-item-drop:hover .caret { transform: rotate(180deg); }
.nav-drop-menu {
  position: absolute; top: 100%; left: 0; margin-top: 10px; min-width: 290px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(24,24,48,.16); padding: 8px; display: none; z-index: 60;
}
.nav-drop-menu::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav-item-drop:hover .nav-drop-menu { display: block; }
.nav-drop-menu a { display: flex !important; align-items: center; gap: 12px; padding: 10px 12px !important; border-radius: 12px; }
.nav-drop-menu a:hover { background: var(--brand-light); }
.nav-drop-menu .ndi-ico {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff;
  display: grid; place-items: center; font-size: 19px;
}
.nav-drop-menu .ndi-txt b { display: block; font-size: 14px; color: var(--ink); font-weight: 700; }
.nav-drop-menu .ndi-txt small { display: block; font-size: 12px; color: var(--body); margin-top: 1px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(1000px 500px at 85% -10%, #ede9fe 0%, transparent 55%),
    radial-gradient(800px 400px at 5% 10%, #fef3e7 0%, transparent 50%),
    var(--bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 6px 14px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--body);
  margin-bottom: 22px;
}
.hero-badge .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: grid; place-items: center; font-size: 13px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), #7c3aed 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 18px; color: var(--muted); margin-bottom: 30px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-perks { display: flex; flex-wrap: wrap; gap: 18px 26px; }
.hero-perks li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; color: var(--body); }
.hero-perks .check {
  width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: var(--success);
  display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
}

/* Hero visual card */
.hero-visual { position: relative; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: 22px; position: relative; z-index: 2;
}
.hero-card-thumb {
  border-radius: 14px; height: 190px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
  position: relative; overflow: hidden; display: grid; place-items: center; margin-bottom: 18px;
}
.hero-card-thumb .play {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.95);
  display: grid; place-items: center; color: var(--brand); font-size: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); cursor: pointer; transition: transform .2s;
}
.hero-card-thumb .play:hover { transform: scale(1.08); }
.hero-card-thumb .tag { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,.35); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.hero-card h4 { font-size: 17px; margin-bottom: 6px; }
.hero-card .meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.hero-card .price-row { display: flex; align-items: center; justify-content: space-between; }
.hero-card .price { font-size: 22px; font-weight: 800; color: var(--brand); }
.hero-card .price s { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.float-badge {
  position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px; z-index: 3; border: 1px solid var(--line);
}
.float-badge .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; }
.float-badge strong { display: block; font-size: 16px; color: var(--ink); line-height: 1.1; }
.float-badge small { color: var(--muted); font-size: 12px; }
.float-1 { top: -18px; right: -14px; }
.float-1 .ico { background: #dcfce7; }
.float-2 { bottom: -20px; left: -18px; }
.float-2 .ico { background: var(--accent-light); }

/* ---------- Stats strip ---------- */
.stats { background: var(--brand); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 44px; padding-bottom: 44px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1; }
.stat .lbl { font-size: 14.5px; opacity: .85; margin-top: 8px; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.18); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; position: relative; transition: .25s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.step-num {
  position: absolute; top: 24px; right: 26px; font-size: 46px; font-weight: 800; color: var(--brand-light); line-height: 1;
}
.step-ico { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; font-size: 26px; margin-bottom: 20px; }
.step h3 { font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- Webinars ---------- */
.webinar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.webinar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.webinar:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.webinar-top { padding: 20px 22px; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; position: relative; }
.webinar-top.free { background: linear-gradient(135deg, #16a34a, #22c55e); }
.webinar-date { display: flex; align-items: baseline; gap: 6px; font-weight: 700; }
.webinar-date .day { font-size: 34px; line-height: 1; }
.webinar-date .mon { font-size: 14px; opacity: .9; }
.webinar-pill { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.22); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.webinar-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.webinar-body h3 { font-size: 18px; margin-bottom: 8px; }
.webinar-body p { font-size: 14px; color: var(--muted); margin-bottom: 16px; flex: 1; }
.webinar-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.webinar-meta span { display: flex; align-items: center; gap: 5px; }
.webinar-foot { display: flex; align-items: center; justify-content: space-between; }
.webinar-price { font-size: 20px; font-weight: 800; color: var(--ink); }
.webinar-price.free-txt { color: var(--success); }

/* ---------- Course filter + grid ---------- */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filter-tab {
  font-family: inherit; font-weight: 600; font-size: 14px; color: var(--body);
  background: #fff; border: 1.5px solid var(--line); padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: .2s;
}
.filter-tab:hover { border-color: var(--brand); color: var(--brand); }
.filter-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.course {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .25s;
}
.course:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.course-thumb { height: 168px; position: relative; display: grid; place-items: center; color: #fff; }
.course-thumb .ico { font-size: 44px; opacity: .95; }
.course-thumb .cat-tag {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.92); color: var(--ink);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.course-thumb .discount {
  position: absolute; top: 14px; right: 14px; background: var(--danger); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px;
}
.g1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.g2 { background: linear-gradient(135deg, #f97316, #fb923c); }
.g3 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.g4 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.g5 { background: linear-gradient(135deg, #16a34a, #4ade80); }
.g6 { background: linear-gradient(135deg, #8b5cf6, #c084fc); }
.g7 { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.g8 { background: linear-gradient(135deg, #dc2626, #f87171); }
.g9 { background: linear-gradient(135deg, #ca8a04, #facc15); }

.course-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.course-body h3 { font-size: 17px; margin-bottom: 10px; min-height: 44px; }
.course-rate { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.course-rate .stars { color: var(--star); letter-spacing: 1px; }
.course-rate b { color: var(--ink); }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.course-meta span { display: flex; align-items: center; gap: 5px; }
.course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-price .now { font-size: 20px; font-weight: 800; color: var(--brand); }
.course-price .old { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.course-price .free { font-size: 18px; font-weight: 800; color: var(--success); }
.course-price .soon, .cp-price .soon { font-size: 16px; font-weight: 800; color: #c2410c; }
.soon-tag { position: absolute; top: 14px; right: 14px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; }

.courses-more { text-align: center; margin-top: 46px; }

/* ---------- Features / why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature { display: flex; gap: 18px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: .2s; }
.feature:hover { box-shadow: var(--shadow); }
.feature .ico { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; font-size: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--muted); }

/* ---------- Testimonials ---------- */
.tst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tst { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.tst .stars { color: var(--star); letter-spacing: 2px; margin-bottom: 14px; }
.tst p { font-size: 15px; color: var(--body); margin-bottom: 20px; }
.tst-who { display: flex; align-items: center; gap: 12px; }
.tst-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; }
.tst-who strong { display: block; color: var(--ink); font-size: 15px; }
.tst-who small { color: var(--muted); font-size: 13px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; font-family: inherit; font-weight: 600; font-size: 16px; color: var(--ink); background: none; border: none; padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q .plus { flex-shrink: 0; font-size: 22px; color: var(--brand); transition: transform .25s; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(120deg, var(--brand), #7c3aed 70%, #a855f7);
  color: #fff; text-align: center; border-radius: 28px; padding: 62px 30px; position: relative; overflow: hidden;
}
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09); }
.cta::before { width: 260px; height: 260px; top: -80px; left: -60px; }
.cta::after { width: 200px; height: 200px; bottom: -70px; right: -40px; }
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; position: relative; }
.cta p { font-size: 18px; opacity: .92; max-width: 560px; margin: 0 auto 30px; position: relative; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cbd5e1; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; }
.footer .logo { color: #fff; margin-bottom: 16px; }
.footer-about p { font-size: 14.5px; color: #94a3b8; margin-bottom: 20px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #cbd5e1; font-size: 17px; transition: .2s; }
.footer-social a:hover { background: var(--brand); color: #fff; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col a { font-size: 14.5px; color: #94a3b8; transition: .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; font-size: 14.5px; color: #94a3b8; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: #94a3b8; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .steps, .webinar-grid, .course-grid, .tst-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats .container { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .stat + .stat { border-left: none; }
}

@media (max-width: 960px) {
  .section { padding: 60px 0; }
  .nav-menu, .nav-actions .link-login { display: none; }
  .menu-toggle { display: block; }
  .nav-menu.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 12px 20px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-menu.open a { padding: 12px; border-radius: 8px; }
  .why-grid { grid-template-columns: 1fr; }
  /* dropdown -> expanded inline on mobile */
  .nav-item-drop { width: 100%; }
  .nav-item-drop > .nav-drop-t { padding: 12px; }
  .nav-item-drop .caret { display: none; }
  .nav-drop-menu { position: static; display: block; margin: 0; padding: 0 0 4px 10px; min-width: 0; border: none; box-shadow: none; }
  .nav-drop-menu::before { display: none; }
}

@media (max-width: 560px) {
  .steps, .webinar-grid, .course-grid, .tst-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-cta .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta { padding: 46px 22px; }
}

/* ============================================================
   ADDED COMPONENTS — multi-page (cart, detail, auth, checkout)
   ============================================================ */

.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Header extras */
.cart-btn { position: relative; font-size: 20px; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-alt); transition: .2s; }
.cart-btn:hover { background: var(--brand-light); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-av { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.user-name { font-weight: 600; font-size: 14px; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Page hero */
.page-hero { background: linear-gradient(135deg, var(--brand-light), #faf5ff); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.page-hero.small { padding: 34px 0 28px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 10px; }
.page-hero p { color: var(--muted); font-size: 16px; max-width: 620px; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs.light, .crumbs.light a { color: rgba(255,255,255,.85); }

/* Courses toolbar */
.courses-toolbar { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; flex: 1; max-width: 420px; }
.search-box input { border: none; outline: none; font-family: inherit; font-size: 15px; width: 100%; background: none; color: var(--ink); }
.select { font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 18px; background: #fff; cursor: pointer; }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-ico { font-size: 52px; margin-bottom: 12px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

/* ---------- Course detail ---------- */
.course-hero { background: linear-gradient(135deg, #312e81, #4f46e5 60%, #7c3aed); color: #fff; padding: 44px 0 52px; }
.course-hero-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.ch-cat { display: inline-block; background: rgba(255,255,255,.18); font-size: 13px; font-weight: 700; padding: 5px 14px; border-radius: 999px; margin: 14px 0 12px; }
.course-hero h1 { color: #fff; font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; }
.ch-sub { font-size: 17px; opacity: .92; margin-bottom: 18px; max-width: 620px; }
.ch-stats { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14.5px; margin-bottom: 14px; }
.ch-rate b { color: #fde047; }
.ch-rate .stars { color: #fde047; }
.ch-teacher { font-size: 14.5px; opacity: .9; }

.ch-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; position: sticky; top: 90px; }
.ch-card-thumb { height: 190px; position: relative; display: grid; place-items: center; color: #fff; }
.ch-card-thumb .ico { font-size: 52px; }
.ch-card-thumb .play { position: absolute; width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand); display: grid; place-items: center; font-size: 20px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.ch-card-body { padding: 22px; }
.cp-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cp-price .now { font-size: 30px; font-weight: 800; color: var(--ink); }
.cp-price .old { font-size: 16px; color: var(--muted); text-decoration: line-through; }
.cp-price .free { font-size: 28px; font-weight: 800; color: var(--success); }
.cp-off { background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.cp-timer { font-size: 13px; color: var(--danger); background: #fef2f2; padding: 8px 12px; border-radius: 9px; margin: 12px 0 16px; text-align: center; }
.ch-card-body .btn { margin-bottom: 10px; }
.ch-incl { margin: 18px 0 14px; }
.ch-incl li { font-size: 14px; color: var(--body); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ch-incl li:last-child { border-bottom: none; }
.ch-guarantee { font-size: 13px; color: var(--success); background: #f0fdf4; padding: 10px; border-radius: 9px; text-align: center; }

.course-body-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 26px; }
.tab { font-family: inherit; font-weight: 600; font-size: 15.5px; color: var(--muted); background: none; border: none; padding: 12px 18px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .2s; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.learn-box { background: var(--brand-light); border-radius: var(--radius); padding: 26px; margin-bottom: 30px; }
.learn-box h3 { font-size: 20px; margin-bottom: 16px; }
.learn-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.learn-list li { display: flex; gap: 10px; font-size: 15px; }
.lk { color: var(--success); font-weight: 800; flex-shrink: 0; }
.cb-h { font-size: 20px; margin: 26px 0 12px; }
.cb-p { color: var(--body); font-size: 15.5px; margin-bottom: 14px; }
.req-list li { color: var(--body); font-size: 15px; padding: 4px 0; }

.curriculum { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.curr-head { background: var(--bg-alt); padding: 14px 20px; font-size: 14px; font-weight: 600; color: var(--body); }
.curr-sec { border-top: 1px solid var(--line); }
.curr-sec-head { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #fff; border: none; font-family: inherit; font-weight: 700; font-size: 15.5px; color: var(--ink); padding: 16px 20px; cursor: pointer; }
.curr-meta { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 13.5px; color: var(--muted); }
.curr-meta .plus { font-style: normal; font-size: 20px; color: var(--brand); transition: transform .25s; }
.curr-sec.open .curr-meta .plus { transform: rotate(45deg); }
.curr-list { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.curr-sec.open .curr-list { max-height: 6000px; }
.curr-lesson { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 14.5px; }
.cl-name { color: var(--body); }
.cl-dur { color: var(--muted); font-size: 13px; }
.cl-dur .prev { color: var(--brand); }

.ins-card { display: flex; gap: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.ins-av { width: 84px; height: 84px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 34px; display: grid; place-items: center; flex-shrink: 0; }
.ins-role { color: var(--brand); font-weight: 600; margin-bottom: 10px; }
.ins-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }

.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; }
.side-box h4 { font-size: 16px; margin-bottom: 14px; }
.info-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; color: var(--muted); }
.info-list li:last-child { border-bottom: none; }
.info-list b { color: var(--ink); }

/* ---------- Auth pages ---------- */
.auth-body { background: var(--bg-soft); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; max-width: 1080px; margin: 0 auto; }
.auth-brand { background: linear-gradient(150deg, var(--brand), #7c3aed 70%, #a855f7); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-brand h2 { color: #fff; font-size: 30px; margin: 34px 0 14px; }
.auth-brand p { opacity: .92; font-size: 16px; margin-bottom: 26px; }
.auth-perks li { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 15px; }
.auth-perks span { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.auth-panel { background: #fff; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-back { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.auth-back:hover { color: var(--brand); }
.auth-panel h1 { font-size: 30px; margin-bottom: 8px; }
.auth-lead { color: var(--muted); margin-bottom: 26px; }
.auth-form .field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 7px; }
.field input, .co-fields input, .card-form input, .field textarea, .field .ta { width: 100%; font-family: inherit; font-size: 15px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none; transition: .2s; color: var(--ink); background: #fff; }
.field textarea, .field .ta { resize: vertical; line-height: 1.5; }
.field textarea:focus, .field .ta:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.field input:focus, .co-fields input:focus, .card-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.field.invalid input { border-color: var(--danger); }
.field .err { display: block; color: var(--danger); font-size: 12.5px; margin-top: 5px; min-height: 4px; }
.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; opacity: .6; }
.pw-meter { height: 5px; background: var(--line); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); border-radius: 999px; transition: width .25s, background .25s; }
.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--body); cursor: pointer; }
.checkbox.agree { margin-bottom: 20px; }
.checkbox.invalid { color: var(--danger); }
.link-sm { font-size: 14px; color: var(--brand); font-weight: 600; }
.auth-or { text-align: center; position: relative; margin: 24px 0; }
.auth-or::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-or span { position: relative; background: #fff; padding: 0 14px; color: var(--muted); font-size: 13px; }
.social-auth { display: grid; gap: 10px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 15px; color: var(--body); }
.auth-switch a { color: var(--brand); font-weight: 600; }
.auth-demo { margin-top: 18px; font-size: 12.5px; color: var(--muted); background: var(--bg-alt); padding: 10px 12px; border-radius: 9px; text-align: center; }

/* ---------- Checkout ---------- */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 30px; align-items: start; }
.co-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.co-box h3 { font-size: 18px; margin-bottom: 18px; }
.co-fields { display: grid; gap: 16px; }
.co-fields.two { grid-template-columns: 1fr 1fr; }
.pay-methods { display: grid; gap: 12px; }
.pay-method { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: .2s; position: relative; }
.pay-method:hover { border-color: var(--brand); }
.pay-method.active { border-color: var(--brand); background: var(--brand-light); }
.pay-method input { accent-color: var(--brand); width: 18px; height: 18px; }
.pm-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; }
.pm-txt b { display: block; font-size: 15px; color: var(--ink); }
.pm-txt small { color: var(--muted); font-size: 13px; }
.pm-badge { position: absolute; top: 12px; right: 14px; background: var(--success); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

.co-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.co-summary h3 { font-size: 18px; margin-bottom: 18px; }
.co-items { display: grid; gap: 14px; margin-bottom: 18px; }
.co-item { display: flex; align-items: center; gap: 12px; }
.co-item-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.co-item-info { flex: 1; min-width: 0; }
.co-item-info b { display: block; font-size: 14px; color: var(--ink); line-height: 1.3; }
.co-item-info small { color: var(--muted); font-size: 12.5px; }
.co-item-price { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; }
.coupon { display: flex; gap: 8px; margin: 16px 0 6px; }
.coupon input { flex: 1; font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); outline: none; }
.coupon input:focus { border-color: var(--brand); }
.coupon-msg { font-size: 13px; min-height: 6px; margin-bottom: 6px; }
.coupon-msg.ok { color: var(--success); }
.coupon-msg.bad { color: var(--danger); }
.co-totals { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 10px; }
.ct-row { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--body); margin-bottom: 10px; }
.ct-row.save b { color: var(--success); }
.ct-row.total { font-size: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ct-row.total b { color: var(--brand); font-size: 22px; }
.co-summary .btn { margin-top: 6px; }
.co-secure { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* Payment screen */
.pay-screen, .success-screen { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 32px; }
.pay-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.pay-order { font-size: 14px; color: var(--muted); }
.pay-amt { font-size: 22px; font-weight: 800; color: var(--brand); }
.qr-wrap { display: flex; gap: 22px; align-items: center; background: var(--bg-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.qr { width: 150px; height: 150px; border-radius: 10px; box-shadow: var(--shadow-sm); background: #fff; padding: 6px; }
.qr-info { flex: 1; min-width: 200px; }
.qr-bank { margin-bottom: 8px; }
.qr-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); padding: 4px 0; }
.qr-line b { color: var(--ink); }
.qr-amt { color: var(--brand) !important; font-size: 16px; }
.pay-status { display: flex; align-items: center; gap: 14px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 18px; }
.pay-status b { color: var(--ink); font-size: 15px; }
.pay-status small { display: block; color: var(--muted); font-size: 13px; }
.pay-countdown { margin-left: auto; font-weight: 800; font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--brand-light); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-actions { display: flex; gap: 12px; }
.pay-actions .btn { flex: 1; }
.pay-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 16px; }
.card-form { margin-bottom: 20px; }
.card-form .field { margin-bottom: 14px; }
.card-note { font-size: 12.5px; color: var(--muted); }

/* Success */
.success-screen { text-align: center; }
.success-ring { width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%; background: #dcfce7; display: grid; place-items: center; animation: pop .5s ease; }
.success-check { width: 62px; height: 62px; border-radius: 50%; background: var(--success); color: #fff; font-size: 32px; display: grid; place-items: center; }
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.success-screen h2 { font-size: 26px; margin-bottom: 8px; }
.success-screen > p { color: var(--muted); margin-bottom: 24px; }
.success-card { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; text-align: left; margin-bottom: 22px; }
.sc-row { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--muted); padding: 7px 0; }
.sc-row b { color: var(--ink); }
.sc-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 16px; }
.sc-row.total b { color: var(--brand); font-size: 20px; }
.success-items { text-align: left; margin-bottom: 24px; }
.success-items h4 { font-size: 15px; margin-bottom: 12px; }
.si-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; transition: .2s; }
.si-row:hover { border-color: var(--brand); background: var(--brand-light); }
.si-row b { flex: 1; font-size: 14.5px; color: var(--ink); }
.si-go { color: var(--brand); font-weight: 600; font-size: 14px; }
.success-actions { display: flex; gap: 12px; justify-content: center; }

/* Responsive for added components */
@media (max-width: 900px) {
  .course-hero-grid, .course-body-grid, .checkout-grid { grid-template-columns: 1fr; }
  .ch-card, .side-box, .co-summary { position: static; }
  .learn-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 40px 24px; min-height: 100vh; }
}
@media (max-width: 560px) {
  .co-fields.two { grid-template-columns: 1fr; }
  .success-actions, .pay-actions { flex-direction: column; }
  .qr-wrap { justify-content: center; text-align: center; }
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-login-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 36px 34px; width: 100%; max-width: 400px; }
.admin-login-tag { text-align: center; font-size: 13px; font-weight: 600; color: var(--brand); background: var(--brand-light); padding: 6px 14px; border-radius: 999px; width: fit-content; margin: 0 auto 16px; }
.admin-login-card h1 { text-align: center; font-size: 24px; margin-bottom: 24px; }
.admin-login-card .field { margin-bottom: 16px; }
.err-msg { font-size: 13.5px; color: var(--danger); min-height: 6px; margin-bottom: 8px; }
.err-msg.ok { color: var(--success); }

.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.admin-topbar-right { display: flex; align-items: center; gap: 14px; }
.admin-who { font-size: 14px; font-weight: 600; color: var(--ink); }
.admin-shell { max-width: 1180px; margin: 0 auto; padding: 30px 24px 60px; }
.admin-h { font-size: 22px; margin-bottom: 20px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; align-items: center; gap: 16px; }
.ac-ico { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.ac-val { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.ac-lbl { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.admin-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 22px; margin-bottom: 22px; }
.admin-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.admin-grid .admin-section { margin-bottom: 0; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-section-head h3 { font-size: 17px; }
.activate-form .field { margin-bottom: 14px; }

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: top; }
.data-table td small { color: var(--muted); font-size: 12px; }
.data-table td.num { font-weight: 700; color: var(--ink); white-space: nowrap; }
.data-table tbody tr:hover, .data-table tr:hover { background: var(--bg-soft); }
.empty-cell { text-align: center; color: var(--muted); padding: 30px !important; }
.badge { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-soft { background: var(--bg-alt); color: var(--body); margin-bottom: 4px; }

@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr !important; }
}

/* Admin tabs */
.admin-tabs-bar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 66px; z-index: 40; }
.admin-tabs { display: flex; gap: 4px; }
.admin-tab { font-family: inherit; font-weight: 600; font-size: 14.5px; color: var(--muted); background: none; border: none; border-bottom: 3px solid transparent; padding: 15px 18px; cursor: pointer; transition: .2s; }
.admin-tab:hover { color: var(--brand); }
.admin-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* CRM */
.crm-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.status-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.tag-chip { display: inline-block; background: var(--bg-alt); color: var(--body); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin: 3px 3px 0 0; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; width: 100%; max-width: 560px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { font-size: 20px; }
.modal-close { background: var(--bg-alt); border: none; width: 34px; height: 34px; border-radius: 9px; font-size: 15px; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.modal-close:hover { background: var(--line); }
.modal .field { margin-bottom: 14px; }
.crm-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 18px; }
.crm-detail-stats > div { text-align: center; }
.crm-detail-stats b { display: block; font-size: 19px; color: var(--ink); }
.crm-detail-stats span { font-size: 12.5px; color: var(--muted); }
.crm-row { margin-bottom: 12px; }
.crm-row label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.sess-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-row .select, .crm-row input { width: 100%; }
.crm-h { font-size: 14px; margin: 18px 0 8px; color: var(--ink); }
.hist-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hist-row b { white-space: nowrap; }
.note-add { display: flex; gap: 8px; margin-bottom: 12px; }
.note-add input { flex: 1; }
.note-item { background: var(--bg-soft); border-left: 3px solid var(--brand); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.note-at { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }

/* Finance */
.fin-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 26px; }
.admin-card.fin-profit { border-width: 2px; border-color: currentColor; }
.etype { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.etype-ads { background: #fee2e2; color: #dc2626; }
.etype-salary { background: #ffedd5; color: #ea580c; }
.etype-other { background: #e2e8f0; color: #475569; }
.icon-del { background: none; border: none; cursor: pointer; font-size: 15px; opacity: .6; }
.icon-del:hover { opacity: 1; }

.fin-cards-3 { grid-template-columns: repeat(3, 1fr); }
.chan-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px; white-space: nowrap; }
.bar { display: inline-block; width: 70px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: 7px; }
.bar span { display: block; height: 100%; border-radius: 999px; }
.data-table tr.row-total td { border-top: 2px solid var(--line); background: var(--bg-soft); }
.fin-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.fin-form .select, .fin-form input { font-family: inherit; font-size: 13.5px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 8px; outline: none; }
.fin-form .select:focus, .fin-form input:focus { border-color: var(--brand); }
.fin-form input[name=name], .fin-form input[name=note] { flex: 1; min-width: 110px; }
.fin-form input[name=amount] { width: 120px; }
.fin-form input[name=date] { width: 150px; }
.fin-form .err-msg { width: 100%; margin: 0; }

/* ============================================================
   BLOG
   ============================================================ */
.blog-hero { background: linear-gradient(135deg, #312e81, #4f46e5 60%, #7c3aed); color: #fff; padding: 56px 0 48px; }
.blog-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); max-width: 780px; margin: 14px 0 12px; }
.blog-hero p { opacity: .9; font-size: 17px; max-width: 620px; }
.blog-stats { display: flex; gap: 36px; margin-top: 26px; }
.blog-stats b { display: block; font-size: 28px; font-weight: 800; }
.blog-stats span { font-size: 13.5px; opacity: .85; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .25s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.bp-thumb { height: 180px; position: relative; display: grid; place-items: center; background-size: cover; background-position: center; color: #fff; }
.bp-cat { position: absolute; top: 14px; left: 14px; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.bp-ico { font-size: 44px; opacity: .9; }
.bp-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.bp-body h3 { font-size: 17.5px; line-height: 1.35; margin-bottom: 10px; }
.bp-body h3 a { color: var(--ink); }
.bp-body h3 a:hover { color: var(--brand); }
.bp-excerpt { color: var(--muted); font-size: 14.5px; flex: 1; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bp-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* Blog post (SSR) */
.post-wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px 60px; }
.post-cat { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 13px; font-weight: 700; padding: 5px 14px; border-radius: 999px; margin: 12px 0 10px; }
.post-title { font-size: clamp(28px, 4.5vw, 42px); line-height: 1.2; margin-bottom: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.post-cover { width: 100%; border-radius: 14px; margin-bottom: 24px; }
.post-content { font-size: 17px; line-height: 1.8; color: var(--body); }
.post-content h2 { font-size: 26px; margin: 32px 0 12px; }
.post-content h3 { font-size: 21px; margin: 26px 0 10px; }
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 0 0 18px 22px; }
.post-content li { margin-bottom: 8px; }
.post-content img { border-radius: 12px; margin: 16px 0; }
.post-content a { color: var(--brand); text-decoration: underline; }
.post-content blockquote { border-left: 4px solid var(--brand); background: var(--bg-soft); padding: 12px 18px; border-radius: 8px; margin: 0 0 18px; color: var(--ink); }
.post-content code { background: var(--bg-alt); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.post-tag { background: var(--bg-alt); color: var(--body); font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.post-cta { background: var(--brand-light); border-radius: var(--radius); padding: 28px; text-align: center; margin-top: 32px; }
.post-cta h3 { font-size: 20px; margin-bottom: 6px; }
.post-cta p { color: var(--muted); margin-bottom: 16px; }

@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } .blog-stats { gap: 24px; } }

/* Admin: connection info rows */
.conn-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; font-size: 13.5px; }
.conn-row b { flex-shrink: 0; width: 90px; color: var(--muted); font-weight: 600; padding-top: 6px; }
.conn-row code, #blogConnBox code { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; display: inline-block; }

/* Video player */
.video-box { background: #0f172a; border-radius: 16px; width: 100%; max-width: 900px; overflow: hidden; box-shadow: var(--shadow-lg); }
.video-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; color: #fff; font-weight: 600; font-size: 15px; }
.video-bar .modal-close { background: rgba(255,255,255,.15); color: #fff; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Lớp chắn chống tải: che tiêu đề/nút chia sẻ + chặn chuột phải trên vùng video,
   chừa lại thanh điều khiển ~46px dưới cùng để xem/tua/toàn màn hình bình thường. */
.video-frame .vg-shield { position: absolute; left: 0; right: 0; top: 0; bottom: 46px; z-index: 6; background: transparent; }
.curr-lesson.playable { cursor: pointer; }
.curr-lesson.playable:hover { background: var(--brand-light); }
.curr-lesson.playable .cl-name { color: var(--brand); }
.cl-right { display: flex; align-items: center; gap: 10px; }
.cl-check { background: none; border: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); padding: 2px; border-radius: 50%; }
.cl-check.done { color: var(--success); }
.cl-check:hover { transform: scale(1.15); }
.prog-wrap { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.prog-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.prog-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #22c55e); border-radius: 999px; transition: width .4s ease; }
.prog-txt { font-size: 13px; color: var(--body); font-weight: 600; }
#markBtn { white-space: nowrap; }

/* Course builder (admin) */
.builder-sec { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--bg-soft); }
.builder-sec-top { display: flex; gap: 8px; margin-bottom: 10px; }
.builder-sec-top input { flex: 1; font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; }
.builder-lesson { display: grid; grid-template-columns: 1.4fr 70px 1.8fr auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.builder-lesson input[type=text] { font-family: inherit; font-size: 13px; padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 7px; width: 100%; }
.builder-lesson label { font-size: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); }
.builder-lesson .icon-del { font-size: 14px; }
.mini-btn { font-family: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border: 1.5px dashed var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--brand); }
.mini-btn:hover { border-color: var(--brand); }
@media (max-width: 640px) { .builder-lesson { grid-template-columns: 1fr; } }

/* Messaging channels */
.chan-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 8px; }
.chan-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.chan-card.on { border-color: #16a34a; background: #f0fdf4; }
.chan-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.chan-info b { display: block; font-size: 15px; color: var(--ink); }
.chan-state { font-size: 13px; color: var(--muted); font-weight: 600; }
.chan-state.ok { color: var(--success); }
.chan-hint { grid-column: 1 / -1; font-size: 13px; color: var(--muted); background: var(--bg-alt); padding: 12px 14px; border-radius: 10px; margin-top: 6px; }
.chan-hint code { background: #fff; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); font-size: 12.5px; }

@media (max-width: 860px) {
  .fin-cards, #crmCards { grid-template-columns: repeat(2, 1fr) !important; }
  .fin-cards-3 { grid-template-columns: 1fr !important; }
  .chan-status { grid-template-columns: 1fr; }
}

/* ============================================================
   Khu vực học viên (student area) + menu tài khoản + Affiliate
   ============================================================ */
.user-menu { position: relative; }
.user-chip-btn { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px 5px 5px; cursor: pointer; font: inherit; color: inherit; font-weight: 600; }
.user-chip-btn:hover { border-color: var(--brand); }
.user-chip-btn .caret { font-size: 11px; color: #8a8aa3; }
.user-menu .user-drop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(30,20,80,.16); min-width: 220px; padding: 8px; display: none; z-index: 60; }
.user-menu.open .user-drop { display: block; }
.user-drop a, .user-drop button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 10px; color: #24243a; text-decoration: none; font: inherit; font-weight: 600;
  background: none; border: 0; cursor: pointer; font-size: 14.5px; }
.user-drop a:hover, .user-drop button:hover { background: #f3f1fb; color: var(--brand); }
.user-drop span { width: 20px; text-align: center; }

.stu-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; display: grid;
  grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.stu-side { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: 0 10px 30px rgba(60,40,140,.06);
  display: flex; flex-direction: column; min-height: calc(100vh - 108px); }
.stu-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.stu-home-btn { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px;
  color: #3a3a52; text-decoration: none; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.stu-home-btn .sni-ico { font-size: 18px; width: 22px; text-align: center; }
.stu-home-btn:hover { background: #f3f1fb; color: var(--brand); }
.stu-side-foot .stu-logout { margin-top: 0; }
.stu-side-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.stu-av { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font-weight: 800; font-size: 20px; }
.stu-nm { font-weight: 700; font-size: 15px; color: #1a1a2e; line-height: 1.2; }
.stu-home { font-size: 12.5px; color: #8a8aa3; text-decoration: none; }
.stu-home:hover { color: var(--brand); }
.stu-nav { display: flex; flex-direction: column; gap: 4px; }
.stu-nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px;
  color: #3a3a52; text-decoration: none; font-weight: 600; font-size: 14.5px; transition: .15s; }
.stu-nav-item .sni-ico { font-size: 18px; width: 22px; text-align: center; }
.stu-nav-item:hover { background: #f3f1fb; color: var(--brand); }
.stu-nav-item.active { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
.stu-logout { margin-top: 14px; width: 100%; padding: 10px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: #e11d48; font-weight: 700; cursor: pointer; font-size: 14px; }
.stu-logout:hover { background: #fff1f3; border-color: #fecdd3; }
.stu-main { min-width: 0; }
.stu-h { font-size: 24px; margin: 0 0 4px; color: #1a1a2e; }
.stu-sub { color: #6b6b85; margin: 0 0 22px; font-size: 15px; }

.stu-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stu-stat { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.stu-stat .ico { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.stu-stat .v { font-size: 22px; font-weight: 800; color: #1a1a2e; line-height: 1; }
.stu-stat .l { font-size: 13px; color: #6b6b85; margin-top: 3px; }

.stu-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.stu-course { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: .2s; }
.stu-course:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(79,70,229,.12); }
.stu-course .thumb { aspect-ratio: 16 / 9; background-size: cover; background-position: center; display: grid; place-items: center; }
.mc-card .thumb { aspect-ratio: 16 / 9 !important; height: auto !important; }
/* Card gợi ý (.course) trong khu học viên: ảnh bìa 16:9 NGANG, đồng bộ card đã mua (desktop + mobile) */
body:has(.stu-wrap) .course-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body:has(.stu-wrap) .course-thumb { aspect-ratio: 16 / 9 !important; height: auto !important; background-size: cover; background-position: center; }
@media (max-width: 560px){
  body:has(.stu-wrap) .course-grid, body:has(.stu-wrap) .stu-course-grid { grid-template-columns: 1fr; }
}
.stu-course .thumb .ico { font-size: 44px; }
.stu-course .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.stu-course h3 { font-size: 15.5px; margin: 0 0 10px; line-height: 1.4; }
.stu-prog { height: 8px; background: #eef0f5; border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.stu-prog span { display: block; height: 100%; background: linear-gradient(90deg, #4f46e5, #7c3aed); }
.stu-prog-txt { font-size: 12.5px; color: #6b6b85; margin-bottom: 14px; }
.stu-course .btn { margin-top: auto; }
.stu-empty { background: #fff; border: 1px dashed #d7d7e6; border-radius: 16px; padding: 44px; text-align: center; }

.learn-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; align-items: start; }
.learn-video { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; }
.learn-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.learn-video .vg-shield { position: absolute; top: 0; left: 0; right: 0; bottom: 46px; z-index: 6; }
.learn-body { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-top: 16px; }
.learn-body h1 { font-size: 21px; margin: 0 0 8px; }
.learn-side { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.learn-side h3 { font-size: 16px; margin: 0 0 4px; }
.learn-side .ls-prog { font-size: 12.5px; color: #6b6b85; margin-bottom: 14px; }
.ls-sec-h { font-weight: 700; font-size: 13px; color: #6b6b85; text-transform: uppercase; letter-spacing: .3px; margin: 12px 0 6px; }
.ls-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; color: #2a2a40; }
.ls-item:hover { background: #f3f1fb; }
.ls-item.active { background: #ede9fe; color: var(--brand); font-weight: 700; }
.ls-item.locked { color: #a6a6bd; cursor: not-allowed; }
.ls-item .ls-ic { width: 22px; text-align: center; flex: 0 0 22px; }
.ls-back { display: inline-flex; align-items: center; gap: 6px; color: #6b6b85; text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.ls-back:hover { color: var(--brand); }

.aff-hero { background: linear-gradient(135deg, #3b1e6e, #4f46e5 55%, #7c3aed); color: #fff; border-radius: 18px; padding: 26px; margin-bottom: 22px; }
.aff-hero h2 { color: #fff; margin: 0 0 6px; font-size: 22px; }
.aff-hero p { opacity: .9; margin: 0 0 16px; }
.aff-link-box { display: flex; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 12px; padding: 8px; }
.aff-link-box input { flex: 1; background: transparent; border: 0; color: #fff; font-size: 14px; font-weight: 600; outline: none; min-width: 0; }
.aff-copy { background: #fff; color: var(--brand); border: 0; border-radius: 9px; padding: 8px 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.aff-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.aff-table th, .aff-table td { padding: 11px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.aff-table th { background: #faf9ff; color: #6b6b85; font-weight: 700; font-size: 13px; }
.aff-table tr:last-child td { border-bottom: 0; }
.badge-ok { background: #dcfce7; color: #15803d; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge-wait { background: #fef9c3; color: #a16207; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge-paid { background: #dbeafe; color: #1d4ed8; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.stu-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.stu-card h3 { margin: 0 0 14px; font-size: 17px; }

.pf-form { display: grid; gap: 14px; max-width: 520px; }
.pf-form .field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: #3a3a52; }
.pf-form .field input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14.5px; }
.pf-form .field input:focus { outline: none; border-color: var(--brand); }
.pf-form .field input:disabled { background: #f5f5fa; color: #8a8aa3; }
.pf-msg { font-size: 14px; font-weight: 600; }
.pf-msg.ok { color: #15803d; } .pf-msg.err { color: #e11d48; }

@media (max-width: 900px) {
  .stu-wrap { grid-template-columns: 1fr; }
  .stu-side { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: auto; }
  .stu-side-head { border: 0; padding: 0; margin: 0; flex: 1 1 100%; }
  .stu-nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  .stu-nav-item { flex: 1 1 auto; }
  .stu-side-foot { margin-top: 0; padding-top: 0; border: 0; display: flex; gap: 10px; flex: 1 1 100%; }
  .stu-home-btn { margin: 0; border: 1px solid var(--line); border-radius: 11px; }
  .stu-logout { width: auto; margin: 0; }
  .learn-wrap { grid-template-columns: 1fr; }
  .learn-side { position: static; max-height: none; }
  .stu-stats { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Khu vực học viên — THEME TỐI (giống khoahocbigman)
   Áp cho mọi trang có .stu-wrap hoặc .learn-wrap
   ============================================================ */
body:has(.stu-wrap), body:has(.learn-wrap){
  background:linear-gradient(180deg,#2a1250 0%,#1c0c36 55%,#160826 100%) !important;
  background-attachment:fixed !important;
}
body:has(.stu-wrap) .header, body:has(.stu-wrap) .footer,
body:has(.learn-wrap) .header, body:has(.learn-wrap) .footer{ display:none !important; }

/* Sidebar */
body:has(.stu-wrap) .stu-side{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.09); box-shadow:none; }
body:has(.stu-wrap) .stu-side-head{ border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .stu-nm{ color:#f3effc; }
body:has(.stu-wrap) .stu-side-head small{ color:#a79fc4 !important; }
body:has(.stu-wrap) .stu-home, body:has(.stu-wrap) .stu-nav-item, body:has(.stu-wrap) .stu-home-btn{ color:#cec7e6; }
body:has(.stu-wrap) .stu-nav-item:hover, body:has(.stu-wrap) .stu-home-btn:hover{ background:rgba(255,255,255,.08); color:#fff; }
body:has(.stu-wrap) .stu-nav-item.active{ background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; }
body:has(.stu-wrap) .stu-side-foot{ border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .stu-logout{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.14); }

/* Tiêu đề + chữ */
body:has(.stu-wrap) .stu-h{ color:#fff; }
body:has(.stu-wrap) .stu-sub{ color:#c2bad9; }
body:has(.stu-wrap) .stu-main h2{ color:#fff; }

/* Ô thống kê */
body:has(.stu-wrap) .stu-stat{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .stu-stat .v{ color:#fff; }
body:has(.stu-wrap) .stu-stat .l{ color:#b6aed0; }

/* Card khóa học của học viên */
body:has(.stu-wrap) .stu-course{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .stu-course h3{ color:#f3effc; }
body:has(.stu-wrap) .stu-prog{ background:rgba(255,255,255,.14); }
body:has(.stu-wrap) .stu-prog-txt, body:has(.stu-wrap) .mc-date, body:has(.stu-wrap) .mc-prow{ color:#b6aed0; }

/* my-courses: pills / search / tabs */
body:has(.stu-wrap) .mc-pill{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .mc-pill .n{ color:#c4b5fd; }
body:has(.stu-wrap) .mc-pill .t{ color:#b6aed0; }
body:has(.stu-wrap) .mc-search input{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:#fff; }
body:has(.stu-wrap) .mc-search input::placeholder{ color:#9990b5; }
body:has(.stu-wrap) .mc-tab{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.12); color:#cec7e6; }
body:has(.stu-wrap) .mc-card .desc{ color:#b6aed0; }

/* Card gợi ý (.course từ courseCardHTML) */
body:has(.stu-wrap) .course{ background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); }
body:has(.stu-wrap) .course h3, body:has(.stu-wrap) .course h3 a{ color:#f3effc; }
body:has(.stu-wrap) .course-rate, body:has(.stu-wrap) .course-meta, body:has(.stu-wrap) .course-meta span{ color:#b6aed0; }
body:has(.stu-wrap) .course .now{ color:#fff; }
body:has(.stu-wrap) .course .old{ color:#8f88a8; }

/* Thẻ chung + bảng (affiliate/profile) */
body:has(.stu-wrap) .stu-card{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
body:has(.stu-wrap) .stu-card h3{ color:#fff; }
body:has(.stu-wrap) .stu-card p{ color:#b6aed0 !important; }
body:has(.stu-wrap) .aff-table{ background:transparent; border-color:rgba(255,255,255,.12); }
body:has(.stu-wrap) .aff-table th{ background:rgba(255,255,255,.05); color:#b6aed0; }
body:has(.stu-wrap) .aff-table td{ color:#e7e2f3; border-color:rgba(255,255,255,.08); }
body:has(.stu-wrap) .pf-form .field label{ color:#cec7e6; }
body:has(.stu-wrap) .pf-form .field input{ background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:#fff; }
body:has(.stu-wrap) .pf-form .field input:disabled{ background:rgba(255,255,255,.03); color:#8f88a8; }
body:has(.stu-wrap) .stu-empty{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.16); color:#e7e2f3; }
body:has(.stu-wrap) .stu-empty h3{ color:#fff; }

/* Trang học (learn) nền tối */
body:has(.learn-wrap) .learn-body, body:has(.learn-wrap) .learn-side{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
body:has(.learn-wrap) .learn-body h1, body:has(.learn-wrap) .learn-side h3{ color:#fff; }
body:has(.learn-wrap) .learn-side .ls-prog{ color:#b6aed0; }
body:has(.learn-wrap) .ls-item{ color:#d7d1ea; }
body:has(.learn-wrap) .ls-item:hover{ background:rgba(255,255,255,.08); }
body:has(.learn-wrap) .ls-item.active{ background:rgba(124,58,237,.35); color:#fff; }
body:has(.learn-wrap) .ls-item.locked{ color:#8f88a8; }
body:has(.learn-wrap) .ls-sec-h{ color:#a79fc4; }
body:has(.learn-wrap) .ls-back{ color:#b6aed0; }
body:has(.learn-wrap) .stu-prog{ background:rgba(255,255,255,.14); }

/* ===== Bảo vệ nội dung: chống bôi đen copy / kéo ảnh (deterrent) ===== */
body{ -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none; -webkit-touch-callout:none; }
input, textarea, [contenteditable="true"], .aff-link-box input{ -webkit-user-select:text; -moz-user-select:text; -ms-user-select:text; user-select:text; }
img{ -webkit-user-drag:none; -khtml-user-drag:none; -moz-user-drag:none; -o-user-drag:none; user-drag:none; }

/* ===== Nút Zalo / gọi điện nổi (chat FAB) ===== */
#chatFab{ position:fixed; right:18px; bottom:18px; z-index:900; display:flex; flex-direction:column; gap:12px; }
.cfab{ width:56px; height:56px; border-radius:50%; display:grid; place-items:center; color:#fff; text-decoration:none;
  box-shadow:0 8px 22px rgba(0,0,0,.25); position:relative; font-weight:800; }
.cfab-zalo{ background:#0068ff; font-size:14px; }
.cfab-tel{ background:#16a34a; font-size:24px; }
.cfab::before{ content:""; position:absolute; inset:0; border-radius:50%; background:inherit; opacity:.55; z-index:-1;
  animation:cfabPulse 1.8s infinite; }
@keyframes cfabPulse{ 0%{ transform:scale(1); opacity:.55 } 70%{ transform:scale(1.7); opacity:0 } 100%{ opacity:0 } }
.cfab-tip{ position:absolute; right:66px; top:50%; transform:translateY(-50%); white-space:nowrap; background:#1a1a2e; color:#fff;
  font-size:13px; font-weight:600; padding:8px 12px; border-radius:8px; opacity:0; pointer-events:none; transition:.2s; }
.cfab-tip::after{ content:""; position:absolute; right:-5px; top:50%; transform:translateY(-50%); border:6px solid transparent; border-left-color:#1a1a2e; }
.cfab-zalo:hover .cfab-tip{ opacity:1; }
@media(max-width:560px){ .cfab{ width:50px; height:50px; } .cfab-tip{ display:none; } #chatFab{ right:12px; bottom:12px; } }
