:root {
  --brand-dark: #0f172a;
  --brand-accent: #f5a623;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f7f8fa;
}

/* Nút "3D" dùng chung (đăng nhập/đăng ký, có thể tái sử dụng nơi khác) */
.btn-3d {
  background: linear-gradient(180deg, #ffc157 0%, var(--brand-accent) 100%);
  border: none;
  color: #1e1300;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  box-shadow: 0 4px 0 #c17f10, 0 8px 16px rgba(245, 166, 35, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-3d:hover {
  color: #1e1300;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #c17f10, 0 12px 20px rgba(245, 166, 35, 0.35);
}
.btn-3d:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #c17f10, 0 4px 8px rgba(245, 166, 35, 0.3);
}

/* Trang đăng nhập / đăng ký: bố cục chia đôi */
.auth-split {
  min-height: 100vh;
  display: flex;
}
.auth-side {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 20% 20%, #1e293b 0%, #0f172a 50%, #0b1220 100%);
  overflow: hidden;
  padding: 3rem;
  align-items: center;
}
.auth-side-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
.auth-logo img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.auth-side h2 {
  font-weight: 700;
  line-height: 1.3;
}
.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #cbd5e1;
}
.auth-benefits i {
  color: var(--brand-accent);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.auth-side-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.22) 0%, rgba(245, 166, 35, 0) 70%);
  top: -80px;
  right: -80px;
}
.auth-side-chip {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-accent);
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: hero-float 4s ease-in-out infinite;
}
.auth-side-chip.chip-a { bottom: 18%; right: 14%; animation-delay: 0s; }
.auth-side-chip.chip-b { bottom: 34%; right: 28%; animation-delay: 0.7s; }
.auth-side-chip.chip-c { top: 22%; right: 10%; animation-delay: 1.4s; }

.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-form-wrap h3 {
  font-weight: 700;
}
.auth-input-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 0 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input-group:focus-within {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}
.auth-input-group i {
  color: #94a3b8;
}
.auth-input-group input {
  border: none;
  outline: none;
  padding: 0.65rem 0;
  width: 100%;
  background: transparent;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 1.5rem 0;
}
.auth-divider hr {
  flex: 1;
  border-color: #e2e8f0;
  margin: 0;
}
.btn-google {
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  color: #1e293b;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.btn-google:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  color: #1e293b;
}

/* Navbar */
.main-navbar {
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  padding-top: 0;
  padding-bottom: 0;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.main-navbar .container {
  align-items: stretch;
  min-height: 62px;
}
.main-navbar .navbar-collapse,
.main-navbar .navbar-nav {
  align-items: stretch;
}
.main-navbar .navbar-nav {
  gap: 0.1rem;
}
.main-navbar .nav-item {
  display: flex;
}
.main-navbar .navbar-brand,
.main-navbar .navbar-toggler {
  align-self: center;
}

/* Mục menu kiểu "tràn viền" - khối màu chạm sát mép trên/dưới navbar, không bo góc, không đổ bóng 3D */
.main-navbar .nav-link {
  display: flex;
  align-items: center;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0 1.15rem;
  border-radius: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.main-navbar .nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.main-navbar .nav-link.active {
  position: relative;
  background-color: var(--brand-accent);
  color: #1e1300;
  font-weight: 700;
}
.main-navbar .nav-link.active:hover {
  background-color: var(--brand-accent);
  color: #1e1300;
}
.main-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: #1e1300;
  border-radius: 1px;
}

.main-navbar .dropdown-toggle {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.9rem 0.35rem 0.5rem !important;
  transition: background-color 0.15s ease, transform 0.12s ease;
}
.main-navbar .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}
.main-navbar .dropdown-toggle i {
  font-size: 1.4rem;
  color: var(--brand-accent);
}
.main-navbar .dropdown-toggle::after {
  opacity: 0.6;
}
.main-navbar .dropdown-menu {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  padding: 0.5rem;
  margin-top: 0.6rem;
}
.main-navbar .dropdown-item {
  color: #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item:focus {
  background-color: rgba(245, 166, 35, 0.14);
  color: var(--brand-accent);
}
.main-navbar .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.08);
  margin: 0.4rem 0;
}

/* Nút đăng ký: nút phẳng, không hiệu ứng 3D */
.main-navbar .btn-warning {
  align-self: center;
  background-color: var(--brand-accent);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  color: #1e1300;
  transition: background-color 0.15s ease;
}
.main-navbar .btn-warning:hover {
  color: #1e1300;
  background-color: #ffc157;
}

.main-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  transition: transform 0.12s ease;
}
.main-navbar .navbar-toggler:hover {
  transform: translateY(-1px);
}
.main-navbar .navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.4);
}

/* Footer */
.main-footer {
  background-color: var(--brand-dark);
  color: #e2e8f0;
}
.main-footer a {
  color: #cbd5e1;
  text-decoration: none;
}
.main-footer a:hover {
  color: var(--brand-accent);
}

/* Hero */
.hero-section {
  background: radial-gradient(circle at 15% 15%, #1e293b 0%, #0f172a 45%, #0b1220 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 4rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 166, 35, 0.14);
  color: var(--brand-accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* Hero decorative art (right column) */
.hero-art {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.25) 0%, rgba(245, 166, 35, 0) 70%);
}
.hero-art-chip {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--brand-accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: hero-float 4s ease-in-out infinite;
}
.hero-art-chip.chip-1 { top: 8%; left: 12%; animation-delay: 0s; }
.hero-art-chip.chip-2 { top: 12%; right: 8%; animation-delay: 0.6s; }
.hero-art-chip.chip-3 { bottom: 22%; left: 4%; animation-delay: 1.2s; }
.hero-art-chip.chip-4 { bottom: 10%; right: 16%; animation-delay: 1.8s; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-art-card {
  position: relative;
  display: block;
  width: 240px;
  background: rgba(17, 24, 39, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.hero-art-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 166, 35, 0.4);
}

/* Hero stats row (overlapping bottom edge of hero) */
.hero-stats-row {
  margin-top: 1rem;
}
.hero-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  height: 100%;
}
.hero-stat-card i {
  font-size: 1.4rem;
  color: var(--brand-accent);
}
.hero-stat-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.hero-stat-label {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Section heading */
.section-heading h3 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

/* Category tiles */
.category-tile {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  text-decoration: none;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  color: #0f172a;
}
.category-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin: 0 auto 0.75rem;
}

/* Features section */
.features-section {
  background: #fff;
}
.feature-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(245, 166, 35, 0.14);
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 18px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Course card */
.course-card {
  position: relative;
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.course-card .card-img-top {
  height: 150px;
  object-fit: cover;
}
.course-card .card-title a {
  color: #0f172a;
  text-decoration: none;
}
.course-card .card-title a:hover {
  color: var(--brand-accent);
}
.badge-level {
  background-color: #e2e8f0;
  color: #0f172a;
  font-weight: 500;
}
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.wishlist-btn.active,
.wishlist-btn:hover {
  color: #e11d48;
}

/* Project card (dự án) */
.project-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.project-card .card-img-top {
  height: 180px;
  object-fit: cover;
}
.project-card .card-title a {
  color: #0f172a;
  text-decoration: none;
}
.project-card .card-title a:hover {
  color: var(--brand-accent);
}

/* Shop card (file chạy) */
.shop-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.shop-card .card-img-top {
  height: 180px;
  object-fit: cover;
}
.shop-card .card-title a {
  color: #0f172a;
  text-decoration: none;
}
.shop-card .card-title a:hover {
  color: var(--brand-accent);
}

/* Danh sách mô tả ngắn (trang chi tiết sản phẩm file chạy) */
.shop-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.shop-bullet-list li {
  margin-bottom: 0.5rem;
  color: #334155;
}

.shop-options-table {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.shop-options-table td {
  border-color: #eef2f7;
}

.filter-bar {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Course detail */
.course-detail-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.purchase-sidebar-sticky {
  position: sticky;
  top: 90px;
}
.course-detail-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e5e7eb;
  color: #475569;
}
.course-detail-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.course-detail-info-row i {
  color: #6366f1;
  margin-right: 0.4rem;
}

/* Status badges */
.status-badge.status-pending {
  background-color: #f59e0b;
}
.status-badge.status-confirmed {
  background-color: #16a34a;
}
.status-badge.status-cancelled {
  background-color: #dc2626;
}

.video-embed {
  border-radius: 6px;
  overflow: hidden;
}

/* Lesson page */
.lesson-type-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.lesson-sidebar-card {
  position: sticky;
  top: 80px;
}
.lesson-sidebar {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.lesson-sidebar-section + .lesson-sidebar-section {
  border-top: 1px solid #e5e7eb;
}
.lesson-sidebar-section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: none;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
}
.lesson-sidebar-section-header:hover {
  background: #f1f5f9;
}
.lesson-sidebar-section-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  color: #94a3b8;
}
.lesson-sidebar-progress {
  font-size: 0.75rem;
  font-weight: 600;
}
.lesson-sidebar-section-header i.bi-chevron-down {
  transition: transform 0.15s ease;
}
.lesson-sidebar-section-header[aria-expanded="true"] i.bi-chevron-down {
  transform: rotate(180deg);
}
.lesson-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-left: 3px solid transparent;
  text-decoration: none;
  color: #334155;
  border-top: 1px solid #f1f5f9;
}
.lesson-sidebar-item:hover {
  background: #f8fafc;
}
.lesson-sidebar-item.active {
  background: #fff7ed;
  border-left-color: var(--brand-accent);
}
.lesson-sidebar-item-check {
  color: #cbd5e1;
  padding-top: 0.15rem;
  flex-shrink: 0;
}
.lesson-sidebar-item.active .lesson-sidebar-item-check {
  color: var(--brand-accent);
}
.lesson-sidebar-item-check .bi-check-circle-fill {
  color: #16a34a;
}
.lesson-sidebar-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.lesson-sidebar-item-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.lesson-sidebar-item.active .lesson-sidebar-item-title {
  color: var(--brand-accent);
}
.lesson-sidebar-item-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Banner thông báo cookie */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1080;
  background: var(--brand-dark);
  color: #e2e8f0;
  padding: 0.9rem 1.25rem;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
.cookie-banner.show {
  display: flex;
}
.cookie-banner-text {
  font-size: 0.85rem;
  max-width: 720px;
  line-height: 1.5;
}
.cookie-banner-text i {
  color: var(--brand-accent);
  margin-right: 0.3rem;
}
.cookie-banner-text a {
  color: var(--brand-accent);
  text-decoration: underline;
  margin-left: 0.3rem;
}
.cookie-banner-btn {
  flex-shrink: 0;
}

/* Admin layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  background: var(--brand-dark);
  color: #e2e8f0;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}
.admin-brand {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}
.admin-sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(245, 166, 35, 0.15);
  color: var(--brand-accent);
}
.admin-content {
  flex: 1;
  padding: 2rem;
}
.stat-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Nội dung bài giảng dạng Markdown */
.lesson-content h1,
.lesson-content h2,
.lesson-content h3,
.lesson-content h4 {
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.lesson-content h1:first-child,
.lesson-content h2:first-child,
.lesson-content h3:first-child {
  margin-top: 0;
}
.lesson-content p {
  line-height: 1.7;
}
.lesson-content ul,
.lesson-content ol {
  padding-left: 1.5rem;
  line-height: 1.7;
}
.lesson-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.lesson-content code:not(.hljs code) {
  background: #f1f5f9;
  color: #db2777;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}
.lesson-content blockquote {
  border-left: 4px solid var(--brand-accent);
  padding: 0.5rem 1rem;
  color: #475569;
  background: #f8fafc;
  border-radius: 0 6px 6px 0;
}
.lesson-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.lesson-content th,
.lesson-content td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.lesson-content th {
  background: #f8fafc;
  font-weight: 600;
}
.lesson-content table > tbody > tr:nth-child(even) {
  background: #fafafa;
}

/* Khối code có đánh số dòng */
.code-block {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 2.5rem 1rem 1rem 0;
  margin: 1rem 0;
  overflow-x: auto;
  background: #f8fafc !important;
  counter-reset: code-line;
}
.code-block-toolbar {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
}
.code-block-lang {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}
.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #475569;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.code-copy-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.code-copy-btn.copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.code-block code {
  display: block;
  font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
  font-size: 0.9rem;
}
.code-line {
  display: block;
  padding-left: 3em;
  position: relative;
  white-space: pre;
}
.code-line::before {
  counter-increment: code-line;
  content: counter(code-line) ".";
  position: absolute;
  left: 0;
  width: 2.3em;
  text-align: right;
  padding-right: 0.7em;
  color: #94a3b8;
  user-select: none;
}

/* Nội dung khóa học: accordion Phần học -> Bài giảng */
.curriculum-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.curriculum-section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: #eef2ff;
  color: #4338ca;
  border: none;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  text-align: left;
}
.curriculum-section-header:hover {
  background: #e0e7ff;
}
.curriculum-section-header i {
  transition: transform 0.15s ease;
}
.curriculum-section-header[aria-expanded="false"] i {
  transform: rotate(180deg);
}
.curriculum-lesson {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid #f1f5f9;
}

/* Admin: header phần học (tiêu đề + nút sửa/xóa/thu gọn nằm chung 1 hàng) */
.admin-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-section-title-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  text-align: left;
  padding: 0;
  font-weight: 600;
  min-width: 0;
}
.admin-section-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}
.admin-section-icon-btn {
  color: #64748b;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border: none;
  background: transparent;
}
.admin-section-icon-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 6px;
}
.admin-section-chevron i {
  transition: transform 0.15s ease;
}
.admin-section-chevron[aria-expanded="false"] i {
  transform: rotate(180deg);
}

/* Tab Trực quan / Văn bản cho trình soạn thảo nội dung bài giảng (kiểu WordPress) */
.editor-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}
.editor-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 6px 6px 0 0;
  color: #475569;
}
.editor-tab:hover {
  color: #0f172a;
}
.editor-tab.active {
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  border-color: #cbd5e1;
}
.curriculum-lesson-icon {
  color: #94a3b8;
  flex-shrink: 0;
}
.curriculum-lesson-title {
  flex: 1;
}
.curriculum-lesson-duration {
  color: #94a3b8;
  font-size: 0.85rem;
}
.curriculum-lesson-action {
  color: var(--brand-accent);
  font-size: 1.1rem;
}
.curriculum-lock {
  color: #cbd5e1;
  font-size: 1.05rem;
}
