/* ==========================================================================
   LÊN LEVEL ACADEMY - MODERN DESIGN SYSTEM & STYLESHEET (2026 EDITION)
   Thiết kế cao cấp, thẩm mỹ hiện đại với Glassmorphism, Ambient Mesh & Bento Grid
   ========================================================================== */

/* 1. BIẾN MÀU SẮC & GIAO DIỆN (THEME VARIABLES) */
:root {
  /* Bảng màu sáng (Light Mode - Ambient Clean) */
  --bg: #F8FAFC;
  --bg-gradient: 
    radial-gradient(at 0% 0%, rgba(92, 74, 222, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(85, 219, 156, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.06) 0px, transparent 50%),
    #F8FAFC;
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  --surface-sunken: #F1F5F9;
  --surface-glass: rgba(255, 255, 255, 0.82);
  
  --ink: #0F172A;
  --ink-secondary: #334155;
  --mute: #64748B;
  --line: #E2E8F0;
  --line-light: #F1F5F9;
  
  /* Màu nhận diện thương hiệu (Branding) */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  
  --gold: #F59E0B;
  --gold-hover: #D97706;
  --gold-light: #FEF3C7;
  --gold-gradient: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  
  --success: #10B981;
  --success-light: #ECFDF5;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  
  --zalo: #0068FF;
  --fb: #1877F2;

  /* Hiệu ứng bóng đổ hiện đại (Layered Elevation & Shadows) */
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -3px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 24px 38px -6px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.22);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Chế độ tối cao cấp (Dark Mode - Deep Obsidian Ambient) */
[data-theme="dark"] {
  --bg: #090D16;
  --bg-gradient: 
    radial-gradient(at 0% 0%, rgba(92, 74, 222, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(85, 219, 156, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.16) 0px, transparent 50%),
    #090D16;
  --surface: #121927;
  --surface-hover: #1A2438;
  --surface-sunken: rgba(255, 255, 255, 0.05);
  --surface-glass: rgba(18, 25, 39, 0.85);
  
  --ink: #F8FAFC;
  --ink-secondary: #CBD5E1;
  --mute: #94A3B8;
  --line: rgba(255, 255, 255, 0.08);
  --line-light: rgba(255, 255, 255, 0.04);
  
  --primary-light: rgba(37, 99, 235, 0.18);
  --gold-light: rgba(245, 158, 11, 0.18);
  --success-light: rgba(16, 185, 129, 0.18);
  --danger-light: rgba(239, 68, 68, 0.18);
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 14px 28px -4px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 25px 45px -8px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 35px rgba(59, 130, 246, 0.35);
}

/* 2. THIẾT LẬP CƠ BẢN (RESET & BASE STYLES) */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

/* Thanh cuộn hiện đại (Sleek Custom Scrollbar) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--mute);
}

::selection {
  background: rgba(37, 99, 235, 0.28);
  color: var(--ink);
}

html {
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* 3. BỐ CỤC CHUNG (LAYOUT CONTAINER) */
.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  flex: 1;
}

.page {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page.on {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 4. HEADER & THANH ĐIỀU HƯỚNG (GLASSMORPHISM) */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  height: 58px;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Khung logo động đổi màu 2s/lần dựa trên 3 logo đính kèm */
.brand-logo-box {
  position: relative;
  width: 24px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-logo-box {
  transform: translateY(-2px) scale(1.08);
}

.brand-logo-box .logo-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  animation-duration: 6s;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, filter;
}

.brand-logo-box .logo-purple {
  animation-name: logoCyclePurple;
}

.brand-logo-box .logo-black {
  animation-name: logoCycleBlack;
}

.brand-logo-box .logo-mint {
  animation-name: logoCycleMint;
}

/* Tối ưu hiển thị cho Dark Mode */
[data-theme="dark"] .brand-logo-box .logo-black {
  filter: invert(1) brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

[data-theme="dark"] .brand-logo-box .logo-purple {
  filter: drop-shadow(0 0 10px rgba(92, 74, 222, 0.55));
}

[data-theme="dark"] .brand-logo-box .logo-mint {
  filter: drop-shadow(0 0 10px rgba(85, 219, 156, 0.55));
}

/* Keyframes chu kỳ 6 giây (mỗi màu giữ ~2s, chuyển cảnh êm dịu 0.6s) */
@keyframes logoCyclePurple {
  0% { opacity: 1; }
  23.3% { opacity: 1; }
  33.3% { opacity: 0; }
  90% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes logoCycleBlack {
  0% { opacity: 0; }
  23.3% { opacity: 0; }
  33.3% { opacity: 1; }
  56.6% { opacity: 1; }
  66.6% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes logoCycleMint {
  0% { opacity: 0; }
  56.6% { opacity: 0; }
  66.6% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* Tên thương hiệu Lên Level đổi màu đồng bộ với logo theo chu kỳ 6s */
.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  animation: logoTextCycle 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: color;
}

@keyframes logoTextCycle {
  0%, 23.3% {
    color: #5C4ADE; /* Màu Tím đồng bộ Logo 1 */
  }
  33.3%, 56.6% {
    color: var(--brand-dark-color, #0F172A); /* Màu Đen đồng bộ Logo 2 */
  }
  66.6%, 90% {
    color: #55DB9C; /* Màu Xanh Mint đồng bộ Logo 3 */
  }
  100% {
    color: #5C4ADE; /* Quay về Màu Tím */
  }
}

[data-theme="dark"] {
  --brand-dark-color: #F8FAFC;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: var(--radius-full);
}

nav a {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mute);
  transition: var(--transition);
  white-space: nowrap;
}

nav a:hover {
  color: var(--ink);
}

nav a.on {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-auth-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
  transform: rotate(15deg);
}

/* 5. CÁC NÚT BẤM (BUTTONS) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--mute);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-zalo {
  background: var(--zalo);
  color: #FFFFFF;
}

.btn-zalo:hover {
  background: #0056D2;
}

.btn-fb {
  background: var(--fb);
  color: #FFFFFF;
}

.btn-fb:hover {
  background: #1464CC;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* 6. HERO SECTION */
.hero {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero h1 {
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero h1 .highlight {
  background: none !important;
  background-image: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: #5C4ADE;
  display: inline-block;
  animation: logoHighlightCycle 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: color, -webkit-text-fill-color;
  transition: color 0.3s ease;
}

@keyframes logoHighlightCycle {
  0%, 23.3% {
    color: #5C4ADE !important; /* Màu Tím đồng bộ Logo 1 */
    -webkit-text-fill-color: #5C4ADE !important;
  }
  33.3%, 56.6% {
    color: var(--brand-dark-color, #0F172A) !important; /* Màu Đen / Trắng đồng bộ Logo 2 */
    -webkit-text-fill-color: var(--brand-dark-color, #0F172A) !important;
  }
  66.6%, 90% {
    color: #55DB9C !important; /* Màu Xanh Mint đồng bộ Logo 3 */
    -webkit-text-fill-color: #55DB9C !important;
  }
  100% {
    color: #5C4ADE !important; /* Quay về Màu Tím */
    -webkit-text-fill-color: #5C4ADE !important;
  }
}

.hero-lead {
  font-size: 17px;
  color: var(--mute);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* Khối ảnh chân dung tinh tế, cân đối & Floating Bento Chips */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-avatar-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.hero-glow {
  position: absolute;
  inset: -14px;
  background: radial-gradient(circle, rgba(92, 74, 222, 0.28) 0%, rgba(85, 219, 156, 0.2) 50%, rgba(37, 99, 235, 0.15) 80%, transparent 100%);
  filter: blur(32px);
  border-radius: 32px;
  z-index: 1;
  animation: glowPulse 5s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { transform: scale(0.96); opacity: 0.7; }
  100% { transform: scale(1.04); opacity: 1; }
}

.hero-avatar-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 440px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.hero-avatar-wrapper:hover .hero-avatar-img {
  transform: translateY(-2px);
  box-shadow: 0 30px 50px -10px rgba(15, 23, 42, 0.16);
}

/* Floating Bento Chips hiện đại */
.hero-floating-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: floatChip 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-floating-chip.chip-top {
  top: 24px;
  right: -16px;
  animation-delay: 0s;
}

.hero-floating-chip.chip-bottom {
  bottom: 50px;
  left: -18px;
  animation-delay: 2s;
}

@keyframes floatChip {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.chip-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}

.hero-floating-chip.chip-top .chip-icon {
  background: var(--gold-light);
}

.chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.chip-text strong {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
}

.chip-text span {
  font-size: 10.5px;
  color: var(--mute);
  font-weight: 500;
}

.hero-avatar-caption {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--mute);
  text-align: center;
  font-weight: 500;
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  box-shadow: var(--shadow-sm);
}

/* 7. TIẾN ĐỘ HỌC GAMIFIED (LEVEL & ROCKET PROGRESS BAR) */
.prog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.prog-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-md);
}

.prog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
}

.prog-top strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
}

.prog-stat {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.prog-track {
  position: relative;
  height: 12px;
  background: var(--line);
  border-radius: var(--radius-full);
}

.prog-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.prog-rocket {
  position: absolute;
  top: -10px;
  left: 0%;
  transform: translateX(-50%);
  font-size: 20px;
  transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.prog-dots {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  position: relative;
}

.prog-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--mute);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.prog-dot:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.1);
}

.prog-dot.done {
  background: var(--gold-gradient);
  border-color: var(--gold);
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.prog-msg {
  margin-top: 14px;
  font-size: 13px;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 8. CÁC SECTION NỘI DUNG CHÍNH (CONTENT SECTIONS) */
.section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 28px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-head p {
  color: var(--mute);
  font-size: 16px;
  max-width: 620px;
}

/* Về diễn giả / Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--mute);
  font-weight: 500;
}

/* Lưới thẻ tính năng (Feature Grid) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.card p {
  color: var(--mute);
  font-size: 14px;
  line-height: 1.6;
}

/* Lộ trình 4 Level (Roadmap Cards) */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.roadmap-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  overflow: hidden;
}

.roadmap-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--line);
}

.roadmap-card.active::before {
  background: var(--primary-gradient);
}

.roadmap-card.gold::before {
  background: var(--gold-gradient);
}

.roadmap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.roadmap-card .level-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.roadmap-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Audio Player Section / Modern Floating Widget */
.audio-player-banner {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  margin-top: 24px;
  transition: var(--transition);
}

.audio-player-banner:hover {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow-lg);
}

.audio-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.audio-disc {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, #0F172A 28%, #334155 30%, #0F172A 38%, #475569 40%, var(--gold) 48%, var(--gold-hover) 100%);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.audio-disc.spinning {
  animation: spin 3s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.audio-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.audio-text span {
  font-size: 12px;
  color: var(--mute);
  margin-top: 2px;
  display: block;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Sóng âm thanh Equalizer sống động */
.audio-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
}

.eq-bar {
  width: 3.5px;
  height: 4px;
  background: var(--gold);
  border-radius: 3px;
  transition: height 0.2s ease, opacity 0.2s ease;
  opacity: 0.4;
}

.audio-equalizer.active .eq-bar:nth-child(1) {
  animation: eqBounce 0.9s ease-in-out infinite alternate;
}
.audio-equalizer.active .eq-bar:nth-child(2) {
  animation: eqBounce 0.7s ease-in-out infinite 0.15s alternate;
}
.audio-equalizer.active .eq-bar:nth-child(3) {
  animation: eqBounce 1.1s ease-in-out infinite 0.1s alternate;
}
.audio-equalizer.active .eq-bar:nth-child(4) {
  animation: eqBounce 0.8s ease-in-out infinite 0.25s alternate;
}

@keyframes eqBounce {
  0% { height: 4px; opacity: 0.5; }
  100% { height: 20px; opacity: 1; }
}

.audio-select {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.audio-select:focus {
  border-color: var(--gold);
  outline: none;
}

/* Học viên nói gì (Testimonials) */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.testimonial-stars {
  color: #F59E0B;
  font-size: 14px;
  margin-bottom: 10px;
}

.testimonial-text {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.author-meta strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
}

.author-meta span {
  font-size: 12px;
  color: var(--mute);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--mute);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--mute);
  line-height: 1.6;
}

/* CTA Banner lớn */
.cta-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 16px;
  color: #94A3B8;
  max-width: 520px;
  margin: 0 auto 24px;
}

.cta-banner-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 9. TRANG KHÓA HỌC (COURSES PAGE - BENTO METRICS & MODERN CARDS) */
.courses-header {
  padding: 44px 0 12px;
}

.courses-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 24px 0 16px;
  box-shadow: var(--shadow-sm);
}

.courses-summary-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.courses-summary-item .cs-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.courses-summary-item:hover .cs-icon {
  transform: scale(1.1) rotate(4deg);
}

.courses-summary-item strong {
  display: block;
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
}

.courses-summary-item span {
  font-size: 12px;
  color: var(--mute);
}

/* Thanh lọc và tìm kiếm bài học */
.courses-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: var(--radius-full);
}

.filter-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.6;
}

/* Danh sách bài học (Lesson Items) */
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lesson-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.lesson-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .lesson-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}

.lesson-main {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
}

.lesson-thumb {
  width: 96px;
  height: 66px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1E293B, #0F172A);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.lesson-card:hover .lesson-thumb {
  transform: scale(1.04);
}

.lesson-thumb.paid {
  background: var(--gold-gradient);
  color: #0F172A;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  border: none;
}

.lesson-details h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.lesson-meta {
  font-size: 13px;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.tag-free {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tag-paid {
  background: var(--gold-light);
  color: var(--gold-hover);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-vip-unlocked {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-weight: 700;
}

[data-theme="dark"] .tag-vip-unlocked {
  background: rgba(129, 140, 248, 0.2);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.4);
}

.lesson-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Video Player Container */
.player-container {
  display: none;
  margin-top: 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
}

.player-container.open {
  display: block;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.player-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: #CBD5E1;
  background: radial-gradient(circle at center, #1E293B 0%, #0F172A 100%);
}

.player-placeholder .ph-icon {
  font-size: 38px;
}

/* 10. MODAL & DIALOG (MODERN GLASSMORPHISM & SPRING POP-IN) */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  padding: 30px;
  width: min(460px, 92vw);
  margin: auto;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.35);
  animation: dialogPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-theme="dark"] dialog {
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes dialogPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: backdropFade 0.25s ease forwards;
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog-header {
  margin-bottom: 20px;
  text-align: center;
}

.dialog-header h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ink);
}

.form-group input {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.form-group input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}

.form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
}

/* Nút Đăng nhập bằng Google & Phân cách */
.btn-google-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 14px;
}

.btn-google-auth:hover {
  background: var(--surface-hover);
  border-color: var(--mute);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-google-auth .google-icon {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 16px 0;
  color: var(--mute);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider span {
  padding: 0 10px;
}

/* QR Code Thanh Toán Tự Động SePay */
.checkout-modal {
  width: min(480px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}

.checkout-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

[data-theme="dark"] .checkout-badge-pill {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.checkout-price-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 12px;
}

[data-theme="dark"] .checkout-price-banner {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.checkout-price-banner .price-label {
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 600;
}

.checkout-price-banner .price-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-hover);
}

.qr-card {
  text-align: center;
  padding: 6px 0;
}

.qr-image-wrapper {
  background: #FFFFFF;
  padding: 12px;
  border-radius: var(--radius-md);
  display: inline-block;
  box-shadow: var(--shadow-md);
  margin-bottom: 6px;
  position: relative;
  border: 1px solid var(--line);
}

.qr-image-wrapper img {
  width: 190px;
  height: 190px;
  display: block;
  object-fit: contain;
}

.qr-scan-guide {
  font-size: 11px;
  color: var(--mute);
  margin-bottom: 10px;
}

.bank-info-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  margin-bottom: 12px;
}

.bank-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.bank-info-row:last-child {
  margin-bottom: 0;
}

.bank-info-row strong {
  color: var(--ink);
}

.bank-info-row.highlight-row {
  background: rgba(37, 99, 235, 0.06);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(37, 99, 235, 0.35);
  margin-top: 4px;
}

[data-theme="dark"] .bank-info-row.highlight-row {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.45);
}

.highlight-code {
  color: var(--primary) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.copy-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  padding: 2px 7px !important;
  font-size: 11px !important;
}

/* Khung trạng thái tự động quét */
.auto-scan-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.scan-radar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radar-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.25;
  animation: radarPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.radar-icon {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.scan-text-wrapper {
  flex: 1;
}

.scan-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.scan-subtitle {
  font-size: 11px;
  color: var(--mute);
  margin-top: 2px;
  line-height: 1.35;
}

.checkout-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-countdown {
  font-size: 12px;
  color: var(--mute);
}

.checkout-countdown strong {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.checkout-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-outline-admin {
  background: transparent;
  border: 1px dashed var(--mute);
  color: var(--mute);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-admin:hover {
  border-color: var(--gold);
  color: var(--gold-hover);
  background: var(--gold-light);
}

.checkout-footnote {
  font-size: 11.5px;
  color: var(--mute);
  margin-top: 6px;
}

/* Màn hình thành công rực rỡ */
.checkout-success-view {
  text-align: center;
  padding: 24px 12px;
  animation: fadeInPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon-animated {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.success-circle {
  width: 68px;
  height: 68px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.45);
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.success-title {
  color: var(--success);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.success-badge-info {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 18px;
}

.success-redirect-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form-select:focus {
  border-color: var(--primary);
  background: var(--surface);
  outline: none;
}

/* 11. TOAST THÔNG BÁO (NOTIFICATION TOAST) */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 12. NÚT ZALO NỔI (FLOATING QUICK ACTION WIDGET) */
.floating-zalo {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  background: linear-gradient(135deg, #0080FF 0%, #0055D4 100%);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 104, 255, 0.4);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: floatZalo 3s ease-in-out infinite;
}

@keyframes floatZalo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.floating-zalo:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 28px rgba(0, 104, 255, 0.55);
}

/* 13. CHÂN TRANG (FOOTER) */
footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 40px 0 24px;
  font-size: 13px;
  color: var(--mute);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* 14. RESPONSIVE (TỐI ƯU GIAO DIỆN DI ĐỘNG & TABLET) */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 36px 0;
  }
  
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-avatar-wrapper {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
  }

  .hero-avatar-img {
    height: 380px;
    width: 100%;
  }

  .hero-floating-chip.chip-top {
    top: 16px;
    right: -8px;
  }

  .hero-floating-chip.chip-bottom {
    bottom: 36px;
    left: -8px;
  }

  .hero-avatar-caption {
    margin-top: 16px;
  }

  .lesson-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .lesson-actions {
    justify-content: flex-start;
  }
  
  .container {
    padding: 0 20px;
  }

  .header-inner {
    height: auto;
    padding: 10px 0 0 0;
    gap: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .brand {
    font-size: 16px;
    gap: 8px;
    order: 1;
    flex-shrink: 0;
  }

  .brand-logo-box {
    width: 20px;
    height: 28px;
  }

  .brand-title {
    font-size: 16px;
  }

  .header-actions {
    gap: 8px;
    order: 2;
    flex-shrink: 0;
  }

  .header-actions .btn-sm {
    padding: 5px 12px;
    font-size: 12px;
  }

  .header-inner::after {
    content: '';
    width: 100%;
    order: 2;
    height: 0;
    margin: 0;
    padding: 0;
  }

  /* Viên thuốc bo tròn chuẩn mực, cách lề 2 bên đúng 20px */
  nav {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 4px;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mute);
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    box-shadow: none;
    white-space: nowrap;
    transition: all 0.2s ease;
  }

  nav a:hover {
    color: var(--ink);
  }

  nav a.on {
    background: var(--primary);
    color: #FFFFFF;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    font-weight: 800;
  }

  [data-theme="dark"] nav {
    background: #141C2B;
    border-color: rgba(255, 255, 255, 0.12);
  }

  [data-theme="dark"] nav a {
    color: #94A3B8;
  }

  [data-theme="dark"] nav a:hover {
    color: #FFFFFF;
  }

  [data-theme="dark"] nav a.on {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5);
  }
  
  .audio-player-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
    margin-top: 36px;
    width: 100%;
    box-sizing: border-box;
  }

  .audio-info {
    width: 100%;
    gap: 12px;
  }

  .audio-disc {
    width: 44px;
    height: 44px;
    font-size: 18px;
    flex-shrink: 0;
  }

  .audio-text {
    flex: 1;
    min-width: 0;
  }

  .audio-text strong {
    font-size: 14.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .audio-text span {
    font-size: 11.5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .audio-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
  }

  .audio-equalizer {
    flex-shrink: 0;
    padding: 0 2px;
    gap: 2.5px;
  }

  .audio-select {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 8px 10px;
    font-size: 12.5px;
    text-overflow: ellipsis;
    border-radius: var(--radius-md);
  }

  #audioPlayBtn {
    flex-shrink: 0;
    padding: 8px 13px;
    font-size: 12.5px;
    white-space: nowrap;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }
  .header-inner {
    padding: 8px 0 0 0;
    gap: 0;
  }
  .brand {
    font-size: 15px;
    gap: 6px;
  }
  .brand-title {
    font-size: 15px;
  }
  .brand-logo-box {
    width: 18px;
    height: 24px;
  }
  .theme-toggle-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .header-actions {
    gap: 5px;
    flex-shrink: 0;
  }
  .header-auth-group {
    gap: 5px;
  }
  .header-auth-group .btn {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    white-space: nowrap;
  }
  .user-chip-nav .hide-mobile,
  .btn-logout-compact .hide-mobile {
    display: none !important;
  }
  .btn-logout-compact .show-mobile-icon {
    display: inline !important;
    font-size: 14px;
  }
  .btn-logout-compact {
    padding: 3px 6px !important;
  }
  nav {
    margin: 8px 0 0 0;
  }
  nav a {
    padding: 6px 6px;
    font-size: 12px;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 13px;
    padding: 10px 16px;
  }

  .courses-summary-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  .courses-summary-item {
    gap: 10px !important;
  }
  .courses-summary-item .cs-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
  .courses-summary-item strong {
    font-size: 13px !important;
  }
  .courses-summary-item span {
    font-size: 11px !important;
  }

  .lesson-actions {
    width: 100%;
  }
  .lesson-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   16. GÓC BLOG & ĐĂNG BÀI VIẾT (BLOG SECTION & CREATION SYSTEM)
   ========================================================================== */
.section-head-with-action {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.section-head-with-action .section-head-text h2 {
  margin-bottom: 8px;
}

.section-head-with-action .section-head-text p {
  margin-bottom: 0;
}

.btn-glow {
  position: relative;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}

.btn-glow:hover {
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

/* Thanh bộ lọc chuyên mục Blog */
.blog-filter-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 28px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.blog-filter-bar::-webkit-scrollbar {
  display: none;
}

.blog-cat-btn {
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-cat-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.blog-cat-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

/* Lưới hiển thị bài viết */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 24px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(37, 99, 235, 0.4);
}

.blog-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.blog-card-icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}

.blog-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.blog-badge-psychology {
  background: rgba(92, 74, 222, 0.12);
  color: #5C4ADE;
  border: 1px solid rgba(92, 74, 222, 0.25);
}

.blog-badge-closing {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.blog-badge-branding {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.blog-badge-student {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 10px;
}

.blog-card-meta-dot {
  font-size: 8px;
  opacity: 0.5;
}

.blog-card-title {
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--mute);
  line-height: 1.6;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.blog-author-info {
  display: flex;
  flex-direction: column;
}

.blog-author-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.blog-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-card-read-more {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-read-more {
  transform: translateX(4px);
}

.btn-card-del {
  background: transparent;
  border: none;
  color: var(--mute);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 13px;
  transition: var(--transition);
}

.btn-card-del:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* Modals cho Blog */
.dialog-wide {
  width: min(720px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
}

.dialog-reader {
  width: min(780px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 34px;
}

.dialog-header-with-close {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-header-with-close h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

.dialog-close-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  font-size: 20px;
  line-height: 1;
  color: var(--mute);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.dialog-close-btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
  transform: rotate(90deg);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-textarea-large {
  min-height: 160px;
}

.dialog-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Reader Modal Styles */
.reader-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.reader-tags-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reader-meta-item {
  font-size: 13px;
  color: var(--mute);
  font-weight: 500;
}

.reader-icon-banner {
  font-size: 40px;
  margin-bottom: 12px;
}

.reader-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}

.reader-author-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reader-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reader-author-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.reader-author-details strong {
  font-size: 15px;
  color: var(--ink);
}

.reader-author-details span {
  font-size: 12.5px;
  color: var(--mute);
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-like, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-like:hover, .btn-share:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
}

.btn-like.liked {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-like.liked span:first-child {
  animation: heartPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.reader-content-body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 28px;
}

.reader-content-body p {
  margin-bottom: 16px;
}

.reader-content-body p:last-child {
  margin-bottom: 0;
}

/* Blog Excerpt Callout & Member Gate (Paywall) */
.blog-excerpt-callout {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.blog-excerpt-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-excerpt-text {
  font-size: 15.5px !important;
  line-height: 1.65 !important;
  color: var(--ink) !important;
  font-style: italic;
  margin: 0 !important;
}

.blog-teaser-fade {
  position: relative;
  max-height: 110px;
  overflow: hidden;
  margin-bottom: 24px;
}

.blog-teaser-fade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 10%, var(--surface) 100%);
  pointer-events: none;
}

[data-theme="dark"] .blog-teaser-fade::after {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0) 10%, var(--surface) 100%);
}

.blog-member-gate {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.09) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  text-align: center;
  margin: 16px 0 24px;
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.blog-member-gate::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-member-gate .gate-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}

.blog-member-gate .gate-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.blog-member-gate .gate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.35;
}

.blog-member-gate .gate-desc {
  font-size: 14px;
  color: var(--mute);
  max-width: 520px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.blog-member-gate .gate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.blog-member-gate .gate-perks {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mute);
  flex-wrap: wrap;
}

.blog-member-gate .gate-perks span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
}

.blog-member-unlocked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}

.reader-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.reader-footer-note {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .section-head-with-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .blog-header-actions {
    width: 100%;
  }
  .blog-header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .reader-title {
    font-size: 21px;
  }
  .reader-author-bar {
    flex-wrap: wrap;
  }
  .reader-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px;
  }
  .reader-footer-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   17. TRANG QUẢN TRỊ VIÊN (ADMIN DASHBOARD OS 2026)
   ========================================================================== */
.admin-container {
  padding-top: 36px;
  padding-bottom: 72px;
}

/* Cổng xác thực Admin PIN */
.admin-auth-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px 0;
}

.admin-gate-card {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 38px 30px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.admin-gate-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.admin-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.admin-gate-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.admin-gate-card p {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.55;
  margin-bottom: 24px;
}

.admin-pin-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-pin-wrapper input {
  width: 100%;
  padding: 13px 46px 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-align: center;
  transition: var(--transition);
}

.admin-pin-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}

.btn-toggle-pin {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}

.admin-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.admin-gate-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.5;
  background: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  text-align: left;
}

/* Dashboard Header */
.admin-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.status-dot-active {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulseDot 2s infinite ease-in-out;
}

.admin-dash-title {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.admin-dash-lead {
  font-size: 14.5px;
  color: var(--mute);
  margin-bottom: 0;
}

.admin-dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-danger-soft {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-danger-soft:hover {
  background: var(--danger);
  color: #FFFFFF;
}

/* 4 Bento Metric Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.admin-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.admin-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-stat-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.admin-stat-trend {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.trend-up {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.trend-neutral {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.trend-gold {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.trend-blue {
  background: rgba(92, 74, 222, 0.12);
  color: #5C4ADE;
  border: 1px solid rgba(92, 74, 222, 0.25);
}

.admin-stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.admin-stat-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 4px;
}

.admin-stat-sub {
  font-size: 12px;
  color: var(--mute);
  margin-top: auto;
}

/* Tabs Bar */
.admin-tabs-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.admin-tabs-bar::-webkit-scrollbar {
  display: none;
}

.portal-brand img {
  width: 24px;
  height: 24px;
  max-width: 24px;
  max-height: 24px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.admin-tab-btn {
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition);
}

.admin-tab-btn:hover {
  color: var(--ink);
}

.admin-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Panels */
.admin-tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.admin-tab-panel.active {
  display: block;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-panel-head h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}

.admin-panel-head p {
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 0;
}

.admin-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-search-input {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  min-width: 240px;
  transition: var(--transition);
}

.admin-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-select-sm {
  padding: 8px 12px;
  font-size: 13px;
  height: 38px;
}

/* Tables */
.admin-table-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.admin-table th {
  background: var(--bg);
  color: var(--mute);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-light);
  color: var(--ink);
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--surface-hover);
}

/* Badges inside table */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.badge-status-completed {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-status-pending {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--gold-light);
  color: var(--gold-hover);
  font-size: 11px;
  font-weight: 800;
}

.btn-table-action {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-table-action:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-table-del {
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-table-del:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* Settings Tab */
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 22px;
}

.admin-settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.settings-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-card-head h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}

.settings-card-head p {
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 0;
}

.sepay-status-overview {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sepay-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.sepay-info-row:last-child {
  border-bottom: none;
}

.sepay-info-row span:first-child {
  color: var(--mute);
}

.sepay-info-row span:last-child {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 768px) {
  .admin-dash-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-dash-actions {
    width: 100%;
  }
  .admin-panel-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .admin-search-input {
    width: 100%;
  }
  .admin-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   AFFILIATE & REFERRAL SYSTEM (20% HOA HỒNG HỌC VIÊN)
   ========================================================================== */
.checkout-referral-box {
  background: var(--surface-sunken, #F1F5F9);
  border: 1px dashed var(--line, #CBD5E1);
  border-radius: var(--radius-md, 12px);
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
  transition: var(--transition);
}

[data-theme="dark"] .checkout-referral-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.checkout-referral-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.referral-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 5px;
}

[data-theme="dark"] .referral-title {
  color: #F8FAFC;
}

.referral-optional-tag {
  font-size: 11px;
  color: var(--mute);
  font-style: italic;
}

[data-theme="dark"] .referral-optional-tag {
  color: #94A3B8;
}

.checkout-referral-input-row {
  display: flex;
  gap: 8px;
}

.checkout-referral-input-row input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface, #FFF);
  color: var(--ink);
  transition: var(--transition);
}

[data-theme="dark"] .checkout-referral-input-row input {
  background: #090D16;
  border-color: rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
}

.checkout-referral-input-row input::placeholder {
  color: var(--mute);
  opacity: 0.8;
  font-weight: 500;
}

[data-theme="dark"] .checkout-referral-input-row input::placeholder {
  color: #94A3B8;
  opacity: 0.85;
}

.checkout-referral-input-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .checkout-referral-input-row .btn {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .checkout-referral-input-row .btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.referral-feedback {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

/* Auth dialog notice pill */
.auth-notice-pill {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #B45309;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 12px;
  line-height: 1.4;
  text-align: left;
}

/* Nút liên kết cổng Affiliate trên header */
.btn-affiliate-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(37, 99, 235, 0.12));
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #7C3AED;
  font-weight: 700;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  text-decoration: none;
  transition: var(--transition);
}

.btn-affiliate-nav:hover {
  background: linear-gradient(135deg, #7C3AED, #2563EB);
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

.affiliate-unlocked-card {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(37, 99, 235, 0.06));
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-lg, 12px);
  text-align: left;
}

/* ==========================================================================
   PHÂN HỆ THỐNG KÊ DỮ LIỆU & BIỂU ĐỒ THỜI GIAN XEM BÀI GIẢNG (ANALYTICS)
   ========================================================================== */
.analytics-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.analytics-chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.analytics-chart-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.25);
}

.analytics-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.analytics-chart-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

.analytics-chart-subtitle {
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 0;
  line-height: 1.4;
}

.analytics-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 270px;
  flex: 1;
}

.analytics-chart-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--mute);
}

.chart-legend-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Thanh tiến độ xem bài giảng trong bảng */
.watch-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 170px;
}

.watch-progress-track {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.watch-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.watch-progress-val {
  font-size: 13px;
  font-weight: 800;
  min-width: 48px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Thẻ Retention Insights */
.retention-insights-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.retention-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--line);
  transition: var(--transition);
}

.retention-insight-item:hover {
  background: var(--surface-hover);
}

.retention-insight-item .insight-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.retention-insight-item strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 3px;
}

.retention-insight-item p {
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 0;
  line-height: 1.45;
}

/* Donut custom legend grid */
.donut-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  width: 100%;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.donut-legend-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
}

.donut-legend-val {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 900px) {
  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .analytics-actions-wrap {
    width: 100%;
  }
  .analytics-actions-wrap select,
  .analytics-actions-wrap button {
    flex: 1;
    min-width: 130px;
  }
  .analytics-canvas-wrapper {
    height: 230px;
  }
  .donut-legend-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }
  .admin-stat-card {
    padding: 12px 14px !important;
  }
  .admin-stat-val {
    font-size: 19px !important;
  }
  .admin-stat-lbl {
    font-size: 11.5px !important;
  }
  .admin-stat-sub {
    font-size: 11px !important;
  }
  .admin-tabs-bar {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 6px !important;
  }
  .admin-tab-btn {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
    flex-shrink: 0 !important;
  }
}

/* ==========================================================================
   THANH THEO DÕI TIẾN ĐỘ XEM VIDEO THỜI GIAN THỰC (WATCH TRACKER)
   ========================================================================== */
.player-watch-bar {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watch-bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink);
  gap: 8px;
  flex-wrap: wrap;
}

.watch-status-tag {
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.watch-bar-track {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.watch-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB 0%, #10B981 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ==========================================================================
   TRANG ĐƠN HÀNG & THƯ VIỆN BÀI GIẢNG HỌC VIÊN (ORDERS & MY COURSES)
   ========================================================================== */
.orders-page-container {
  padding-top: 32px;
  padding-bottom: 72px;
}

.orders-hero {
  margin-bottom: 32px;
}

.orders-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.orders-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.orders-stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.orders-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.3);
}

.orders-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon-blue { background: rgba(37, 99, 235, 0.12); color: #2563EB; }
.stat-icon-emerald { background: rgba(16, 185, 129, 0.12); color: #10B981; }
.stat-icon-purple { background: rgba(124, 58, 237, 0.12); color: #7C3AED; }
.stat-icon-amber { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }

.orders-stat-info {
  display: flex;
  flex-direction: column;
}

.orders-stat-label {
  font-size: 12.5px;
  color: var(--mute);
  font-weight: 600;
  margin-bottom: 2px;
}

.orders-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

/* Thư viện bài giảng của học viên */
.owned-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.owned-lesson-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.owned-lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.4);
}

.owned-lesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.owned-lesson-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.owned-lesson-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.owned-lesson-badge.free {
  background: var(--bg);
  color: var(--mute);
  border: 1px solid var(--line);
}

.owned-lesson-badge.paid {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.owned-lesson-badge.vip {
  background: var(--gold-light);
  color: var(--gold-hover);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.owned-lesson-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.owned-lesson-desc {
  font-size: 13px;
  color: var(--mute);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.owned-lesson-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 16px;
}

.owned-lesson-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-light);
}

/* Thẻ VIP Banner */
.vip-privilege-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.18) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.vip-privilege-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.vip-privilege-text h4 {
  font-size: 16px;
  font-weight: 800;
  color: #B45309;
  margin-bottom: 3px;
}

[data-theme="dark"] .vip-privilege-text h4 {
  color: #FBBF24;
}

.vip-privilege-text p {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* Bảng đơn hàng khách hàng */
.customer-orders-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-top: 36px;
}

.orders-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.orders-search-input {
  flex: 1;
  min-width: 260px;
  max-width: 400px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: var(--transition);
}

.orders-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.order-code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.order-code-badge:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* Modal Hóa Đơn Điện Tử (Invoice Modal) */
.invoice-dialog {
  max-width: 620px;
  width: 95%;
  border: none;
  border-radius: var(--radius-xl);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.invoice-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
}

.invoice-paper {
  padding: 32px 36px;
  position: relative;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--line);
  margin-bottom: 20px;
}

.invoice-brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.invoice-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.invoice-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-light);
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 22px;
}

.invoice-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--mute);
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.invoice-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-light);
  color: var(--ink);
}

.invoice-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 800;
  padding: 12px 0;
  border-top: 2px solid var(--line);
  margin-bottom: 24px;
}

.invoice-stamp {
  position: absolute;
  right: 40px;
  bottom: 80px;
  border: 2px solid #10B981;
  color: #10B981;
  font-weight: 900;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  transform: rotate(-10deg);
  opacity: 0.85;
  pointer-events: none;
  letter-spacing: 0.08em;
}

.invoice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media print {
  body * {
    visibility: hidden;
  }
  .invoice-paper, .invoice-paper * {
    visibility: visible;
  }
  .invoice-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
  }
  .invoice-actions {
    display: none !important;
  }
}


