/* =====================================================
   VAN THE MMO - Style
   Mau nhan dien: cam (Van The MMO) + xanh duong
   ===================================================== */

:root {
  --brand-orange: #ff6b1a;
  --brand-orange-dark: #e85d10;
  --brand-blue:   #1f6feb;
  --brand-blue-dark: #155bca;
  --bg-soft:      #f5f6f8;
  --text-dark:    #1c1f2a;
  --text-muted:   #6c757d;
  --border-soft:  #e6e8ec;
  --card-shadow:  0 2px 12px rgba(15,23,42,.06);
  --card-shadow-hover: 0 6px 24px rgba(15,23,42,.1);
}

body {
  font-family: Roboto, sans-serif;
  background: var(--bg-soft);
  color: var(--text-dark);
  font-size: 15px;
}

/* ============ BRAND ============ */
.brand-orange { color: var(--brand-orange); }
.brand-blue   { color: var(--brand-blue); }

.btn-primary {
  --bs-btn-bg: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: var(--brand-blue-dark);
  --bs-btn-hover-border-color: var(--brand-blue-dark);
}
.btn-warning {
  --bs-btn-bg: var(--brand-orange);
  --bs-btn-border-color: var(--brand-orange);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-orange-dark);
  --bs-btn-hover-border-color: var(--brand-orange-dark);
  --bs-btn-hover-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-blue);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: var(--brand-blue);
  --bs-btn-hover-border-color: var(--brand-blue);
}

a { text-decoration: none; }
a.text-light-50 { color: rgba(255,255,255,.7) !important; }
a.text-light-50:hover { color: #fff !important; }

/* ============ AVATAR ============ */
.avatar-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-blue));
  color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, #fff 0%, #fff5ee 60%, #eaf2ff 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border-soft);
}
.hero h1 {
  font-size: 2.4rem; font-weight: 700; line-height: 1.25;
}
.hero .badge-hero {
  background: rgba(255,107,26,.12); color: var(--brand-orange);
  font-weight: 600; padding: 6px 14px; border-radius: 20px; font-size: .85rem;
}

/* ============ COURSE CARD ============ */
.course-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all .2s;
  height: 100%;
  display: flex; flex-direction: column;
}
.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}
.course-card .thumbnail {
  aspect-ratio: 16/9;
  background: #eef0f4 center/cover no-repeat;
  position: relative;
}
.course-card .category-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(31,111,235,.92); color: #fff;
  padding: 4px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 600;
}
.course-card .free-badge {
  position: absolute; top: 10px; right: 10px;
  background: #16a34a; color: #fff;
  padding: 4px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 600;
}
.course-card .body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; flex: 1;
}
.course-card h5 {
  font-size: 1rem; font-weight: 600;
  line-height: 1.35; margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
}
.course-card .meta {
  font-size: .82rem; color: var(--text-muted);
  margin-bottom: 10px;
}
.course-card .price {
  margin-top: auto;
  font-weight: 700; color: var(--brand-orange); font-size: 1.05rem;
}
.course-card .price-original {
  text-decoration: line-through; color: #aaa; font-weight: 400;
  font-size: .85rem; margin-left: 6px;
}

/* ============ STATS ============ */
.stat-box {
  background: #fff; border-radius: 12px;
  padding: 20px; text-align: center;
  box-shadow: var(--card-shadow);
}
.stat-box .number {
  font-size: 1.8rem; font-weight: 700; color: var(--brand-blue);
}
.stat-box .label {
  font-size: .85rem; color: var(--text-muted); margin-top: 4px;
}

/* ============ AUTH ============ */
.auth-card {
  background: #fff; border-radius: 14px;
  padding: 32px; box-shadow: var(--card-shadow);
  max-width: 440px; margin: 40px auto;
}
.auth-card h2 { font-weight: 700; margin-bottom: 6px; }

/* ============ LEARN LAYOUT ============ */
.learn-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
@media (max-width: 991px) { .learn-layout { grid-template-columns: 1fr; } }

.video-wrap {
  background: #000; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16/9; position: relative;
}
.video-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
/* Khoi cam click chuot phai, drag, select */
.video-wrap .no-click-overlay {
  position: absolute; top: 0; left: 0; right: 0; height: 44px;
  z-index: 2; cursor: default;
}

.lesson-list { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--card-shadow); }
.lesson-list .section-title {
  padding: 8px 10px; font-weight: 600;
  background: #f3f5f8; border-radius: 8px; margin-bottom: 6px; font-size: .92rem;
}
.lesson-list a.lesson-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--text-dark); font-size: .9rem;
  transition: background .15s;
}
.lesson-list a.lesson-item:hover { background: #f3f5f8; }
.lesson-list a.lesson-item.active {
  background: rgba(31,111,235,.1); color: var(--brand-blue); font-weight: 600;
}
.lesson-list a.lesson-item.completed i.bi-check-circle-fill { color: #16a34a; }

/* ============ ADMIN ============ */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: #1c1f2a; color: #fff;
  min-height: 100vh; position: fixed; top: 0; left: 0;
  padding: 16px 0;
}
.admin-sidebar .logo { padding: 8px 20px 20px; font-weight: 700; font-size: 1.1rem; }
.admin-sidebar a {
  display: block; padding: 10px 20px;
  color: rgba(255,255,255,.75); font-size: .92rem;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,.05);
  color: #fff; border-left-color: var(--brand-orange);
}
.admin-main { margin-left: 240px; padding: 20px 28px; }
@media (max-width: 991px) {
  .admin-sidebar { width: 100%; min-height: auto; position: static; }
  .admin-main { margin-left: 0; padding: 16px; }
}
.admin-card {
  background: #fff; border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 20px; margin-bottom: 20px;
}
.admin-card .card-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.admin-card h5 { font-weight: 600; margin: 0; }

/* ============ TABLE ============ */
.table-clean { font-size: .92rem; }
.table-clean thead th {
  font-weight: 600; font-size: .85rem; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 2px solid var(--border-soft);
  background: #fafbfc;
}
.table-clean td { vertical-align: middle; }

/* ============ STATUS BADGES ============ */
.badge-status {
  font-size: .72rem; padding: 4px 10px; border-radius: 12px; font-weight: 600;
}
.badge-status.draft     { background: #fef3c7; color: #92400e; }
.badge-status.published { background: #dcfce7; color: #166534; }
.badge-status.closed    { background: #fee2e2; color: #991b1b; }
.badge-status.hidden    { background: #f1f5f9; color: #475569; }
.badge-status.active    { background: #dcfce7; color: #166534; }
.badge-status.pending   { background: #fef3c7; color: #92400e; }
.badge-status.paid      { background: #dbeafe; color: #1e40af; }
.badge-status.granted   { background: #dcfce7; color: #166534; }
.badge-status.cancelled { background: #fee2e2; color: #991b1b; }
.badge-status.locked    { background: #fee2e2; color: #991b1b; }

/* ============ MISC ============ */
.section-title-main {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 24px;
}
.progress-thin { height: 6px; }

.text-light-50 { color: rgba(255,255,255,.7) !important; }

.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; opacity: .4; }

/* Khong cho select text ben canh video */
.video-wrap, .video-wrap * { user-select: none; }

/* ============================================================
   BO SUNG CSS CHO CAC VIEW MOI
   ============================================================ */

/* ----- Course card mở rộng (cho courses/index, my_courses) ----- */
.course-card .course-thumb {
  aspect-ratio: 16/9;
  background: #eef0f4;
  position: relative;
  overflow: hidden;
}
.course-card .course-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.course-card .course-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff6b1a22, #1f6feb22);
  color: var(--brand-orange);
  font-size: 3rem;
}
.course-card .course-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 12px;
  font-size: .72rem; font-weight: 600;
}
.course-card .course-title {
  font-size: 1rem; font-weight: 600;
  line-height: 1.35; margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em;
}
.course-card .course-title a:hover { color: var(--brand-orange) !important; }

/* ----- Hero section (về trang chính, about) ----- */
.hero-section {
  background: linear-gradient(135deg, #fff 0%, #fff5ee 60%, #eaf2ff 100%);
  border-bottom: 1px solid var(--border-soft);
}

/* ----- Main content wrapper ----- */
.main-content { min-height: 60vh; }

/* ----- Footer ----- */
footer { background: #1c1f2a; color: #fff; padding: 40px 0 20px; margin-top: 60px; }
footer a { color: rgba(255,255,255,.75); }
footer a:hover { color: #fff; }
footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; margin-top: 30px; font-size: .85rem; color: rgba(255,255,255,.6); }

/* ----- Learn layout (nâng cấp) ----- */
.learn-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: calc(100vh - 60px);
  background: #fff;
}
.learn-sidebar {
  background: #fff;
  border-right: 1px solid var(--border-soft);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  position: sticky;
  top: 60px;
}
.learn-content { background: #f5f6f8; }
.learn-sections { padding: 12px; }
.learn-section-block { margin-bottom: 14px; }
.learn-section-title {
  padding: 8px 10px; font-weight: 600;
  background: #f3f5f8; border-radius: 8px; margin-bottom: 6px;
  font-size: .92rem;
}
.learn-lesson-item {
  display: flex; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-dark); font-size: .9rem;
  transition: background .15s; text-decoration: none;
}
.learn-lesson-item:hover { background: #f3f5f8; color: var(--text-dark); }
.learn-lesson-item.active {
  background: rgba(255,107,26,.12);
  color: var(--brand-orange); font-weight: 600;
}
@media (max-width: 991px) {
  .learn-layout { grid-template-columns: 1fr; }
  .learn-sidebar { max-height: none; position: static; }
}

/* Video full-width trong learn-content */
.learn-content .video-wrap {
  border-radius: 0; aspect-ratio: 16/9;
  max-height: calc(100vh - 60px);
}

/* ----- ADMIN LAYOUT MOI ----- */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  /* Override cũ - giữ width 240, position relative trong grid */
  position: relative; width: auto; min-height: auto;
  padding: 0;
}
.admin-brand {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 1.1rem; font-weight: 700;
}
.admin-brand .small { font-size: .75rem; color: rgba(255,255,255,.5); font-weight: 400; margin-top: 4px; }

.admin-menu { list-style: none; padding: 12px 0; margin: 0; }
.admin-menu li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,.75);
  font-size: .92rem; text-decoration: none;
  border-left: 3px solid transparent;
}
.admin-menu li a:hover, .admin-menu li a.active {
  background: rgba(255,255,255,.05);
  color: #fff; border-left-color: var(--brand-orange);
}
.admin-menu-divider {
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 12px 0;
}

.admin-main {
  /* Override cũ - không margin-left vì đã trong grid */
  margin-left: 0; padding: 0;
  background: #f0f2f5;
  min-width: 0; /* ngăn grid blowout */
}
.admin-topbar {
  background: #fff; padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.admin-content { padding: 24px; }
.admin-content-padding { padding: 16px 24px 0; }

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; top: 0; left: -240px; width: 240px;
    height: 100vh; z-index: 1050;
    transition: left .25s;
  }
  .admin-sidebar.show { left: 0; }
}

/* ----- Stat cards (admin dashboard) ----- */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--brand-blue);
}
.stat-card .stat-icon {
  position: absolute; top: 16px; right: 16px;
  font-size: 2.4rem; opacity: .12;
}
.stat-card .stat-label {
  font-size: .82rem; color: var(--text-muted);
  text-transform: uppercase; font-weight: 600; letter-spacing: 0;
}
.stat-card .stat-value {
  font-size: 1.6rem; font-weight: 700; color: var(--text-dark);
  margin-top: 6px;
}
.stat-card.stat-orange { border-left-color: var(--brand-orange); }
.stat-card.stat-orange .stat-icon { color: var(--brand-orange); }
.stat-card.stat-blue { border-left-color: var(--brand-blue); }
.stat-card.stat-blue .stat-icon { color: var(--brand-blue); }
.stat-card.stat-green { border-left-color: #16a34a; }
.stat-card.stat-green .stat-icon { color: #16a34a; }
.stat-card.stat-dark { border-left-color: #1c1f2a; }
.stat-card.stat-dark .stat-icon { color: #1c1f2a; }

/* ----- Course description ----- */
.course-description {
  line-height: 1.7;
  color: var(--text-dark);
}

/* ==========================================================
   NAVBAR ENHANCEMENTS - bold, no-wrap, responsive shrink (PC)
   ========================================================== */
.main-navbar .navbar-brand {
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
}
.main-navbar .main-menu .nav-link {
  font-weight: 700;
  color: #1a1a1a !important;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  letter-spacing: 0;
  transition: color .15s;
}
.main-navbar .main-menu .nav-link:hover {
  color: var(--brand-blue) !important;
}
.nav-search { max-width: 260px; }
.nav-cta { font-weight: 700; padding: 6px 14px; white-space: nowrap; }

/* Desktop responsive: shrink labels gradually instead of wrapping */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .main-navbar .main-menu .nav-link {
    font-size: .78rem;
    padding: 0.5rem 0.55rem;
    letter-spacing: 0;
  }
  .main-navbar .navbar-brand { font-size: 1.05rem; }
  .nav-search { max-width: 160px; }
  .nav-search input { font-size: .8rem; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .main-navbar .main-menu .nav-link {
    font-size: .85rem;
    padding: 0.5rem 0.7rem;
  }
  .nav-search { max-width: 200px; }
}
@media (min-width: 1400px) {
  .main-navbar .main-menu .nav-link { font-size: .92rem; }
}

/* ==========================================================
   GLOBAL TYPOGRAPHY
   ========================================================== */
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select {
  font-family: Roboto, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.section-title,
.settings-page-title,
.card-header h5,
.auth-card h2 {
  text-transform: uppercase;
}

/* ==========================================================
   ADMIN LIGHT LAYOUT
   ========================================================== */
.admin-body {
  font-family: Roboto, sans-serif;
  background: #eef3f8;
  color: #1f2937;
  min-height: 100vh;
}

.admin-top-nav {
  background: #fff;
  min-height: 76px;
  border-bottom: 1px solid #e5edf6;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .07);
  z-index: 1020;
}

.admin-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 180px;
  font-size: 1.18rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-logo img {
  max-height: 42px;
  max-width: 180px;
  object-fit: contain;
}

.admin-main-menu {
  gap: 8px;
  align-items: center;
}

.admin-main-menu .nav-link {
  color: #475569;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 8px;
  white-space: nowrap;
}

.admin-main-menu .nav-link:hover {
  color: var(--brand-blue);
  background: #eef6ff;
}

.admin-main-menu .nav-link.active {
  color: #0f3c77;
  background: #dcebff;
}

.admin-main-menu .nav-link.disabled {
  color: #9aa8b8;
}

.admin-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 150px;
}

.admin-icon-btn,
.admin-avatar-btn {
  border: 0;
  background: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-icon-btn {
  width: 38px;
  height: 38px;
  color: #334155;
  font-size: 1.35rem;
}

.admin-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  position: absolute;
  top: 7px;
  right: 8px;
}

.admin-avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 900;
}

.admin-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px 32px 44px;
}

.admin-shell .admin-content {
  padding: 0;
}

.admin-flash-wrap {
  max-width: 1680px;
  margin: 16px auto 0;
  padding: 0 32px;
}

.admin-shell .card,
.admin-shell .stat-card {
  border-radius: 8px;
}

.admin-shell .table-light th {
  background: #dff0ff;
  color: #1f2937;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .admin-logo {
    min-width: auto;
  }
  .admin-main-menu {
    gap: 2px;
    padding-top: 12px;
  }
  .admin-user-actions {
    justify-content: flex-start;
    padding: 12px 0 4px;
  }
  .admin-shell,
  .admin-flash-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ==========================================================
   ADMIN V2 - giống bố cục mẫu Văn Thế MMO
   ========================================================== */
.admin-v2-body{background:#eef3f8;color:#0f2d52;font-family:Roboto,Arial,sans-serif;font-size:14px}.admin-v2-topbar{background:#fff;box-shadow:0 2px 12px rgba(15,23,42,.12);border-bottom:1px solid #e5edf7;z-index:1030}.admin-v2-nav-inner{max-width:1540px;margin:0 auto;min-height:72px;padding:0 28px;display:flex;align-items:center;gap:24px}.admin-v2-brand{display:flex;align-items:center;gap:5px;min-width:210px;font-size:20px;font-weight:900;white-space:nowrap}.admin-v2-brand img{max-height:43px;max-width:190px;object-fit:contain}.brand-mark{color:#1e74e8;font-size:28px;line-height:1}.admin-v2-menu-toggle{display:none;border:1px solid #d8e5f5;background:#fff;border-radius:10px;width:42px;height:38px;color:#17375f}.admin-v2-collapse{display:flex!important;align-items:center;justify-content:space-between;flex:1}.admin-v2-main-menu{display:flex;align-items:center;gap:10px;list-style:none;margin:0 auto;padding:0}.admin-v2-main-menu .nav-pill{display:inline-flex;align-items:center;gap:5px;padding:9px 13px;border-radius:8px;color:#50647f;font-weight:700;white-space:nowrap}.admin-v2-main-menu .nav-pill:hover,.admin-v2-main-menu .nav-pill.active{background:#dcebff;color:#10396b}.admin-v2-main-menu .disabled{color:#97a6ba;pointer-events:none}.admin-v2-actions{display:flex;align-items:center;gap:20px;min-width:120px;justify-content:flex-end}.admin-v2-icon-btn{border:0;background:transparent;color:#253c5c;font-size:22px}.admin-v2-avatar{border:0;width:42px;height:42px;border-radius:50%;background:#eef0ff;color:#4f46e5;font-weight:900;box-shadow:inset 0 0 0 4px #f7f7ff}.admin-v2-user-menu{width:260px;border:0;box-shadow:0 12px 34px rgba(15,23,42,.16);border-radius:8px;padding:0;overflow:hidden}.user-menu-head{padding:16px 18px;border-bottom:1px solid #edf2f7;display:flex;flex-direction:column;gap:4px}.user-menu-head strong{color:#334155}.user-menu-head span{font-size:12px;color:#2563eb;font-weight:800;text-transform:uppercase}.user-menu-profile{padding:14px 18px;display:flex;gap:12px;border-bottom:1px solid #edf2f7}.mini-avatar,.student-avatar-mini{width:42px;height:42px;border-radius:50%;background:#f0f4fa;color:#64748b;display:flex;align-items:center;justify-content:center;font-weight:800}.user-menu-profile div:last-child{display:flex;flex-direction:column;gap:3px;min-width:0}.user-menu-profile strong{color:#334155}.user-menu-profile span{font-size:12px;color:#8a9ab0;overflow:hidden;text-overflow:ellipsis}.admin-v2-user-menu .dropdown-item{padding:11px 18px;color:#607087;font-weight:500}.admin-v2-user-menu .dropdown-item i{width:22px;color:#94a3b8}.admin-v2-shell{max-width:1510px;margin:0 auto;padding:34px 28px 54px}.admin-v2-content{padding:0}.admin-v2-flash-wrap{max-width:1510px;margin:18px auto 0;padding:0 28px}.admin-v2-report-layout{display:grid;grid-template-columns:190px 1fr;gap:18px;align-items:start}.admin-v2-side-card{background:#fff;border-radius:8px;padding:14px;box-shadow:0 1px 0 rgba(15,23,42,.03);position:sticky;top:96px}.side-link{display:flex;align-items:center;gap:9px;padding:12px 14px;border-radius:7px;color:#111827;font-weight:800}.side-link:hover,.side-link.active{background:#dcebff;color:#0f3767}.admin-breadcrumb{display:flex;align-items:center;gap:12px;color:#1f6feb;margin:6px 0 22px;font-weight:600}.admin-breadcrumb i{color:#64748b}.admin-v2-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}.admin-v2-stat-box{background:#fff;border-radius:8px;min-height:70px;padding:14px 18px;display:grid;grid-template-columns:48px 1fr;grid-template-rows:1fr auto;gap:0 14px;align-items:center}.stat-square{width:42px;height:42px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:24px;grid-row:1/3}.stat-blue{background:#dff1ff;color:#086ca8}.stat-teal{background:#d7fbf3;color:#0e9482}.stat-pink{background:#fee3ef;color:#c0266a}.stat-orange{background:#ffe9d2;color:#e86b12}.admin-v2-stat-box .stat-number{font-size:24px;font-weight:900;color:#0645c7;text-align:right;line-height:1}.admin-v2-stat-box .stat-number.money{font-size:22px}.admin-v2-stat-box .stat-label{text-align:right;font-size:11px;color:#41536e;font-weight:700}.admin-v2-chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}.admin-v2-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.admin-v2-panel-card{background:#fff;border-radius:8px;padding:18px;box-shadow:0 1px 0 rgba(15,23,42,.03);min-width:0}.admin-v2-panel-card h3{font-size:18px;font-weight:800;text-align:center;text-transform:none;color:#19233c;margin:0 0 14px;padding-bottom:14px;border-bottom:1px solid #cdd7e5}.chart-wrap{height:270px}.top-course-list{display:flex;flex-direction:column;gap:12px}.top-course-row{display:grid;grid-template-columns:25px 48px 1fr auto;gap:12px;align-items:center}.rank{font-weight:900;color:#6b7280;text-align:center}.rank-1{color:#f59e0b}.rank-2{color:#9ca3af}.rank-3{color:#f97316}.course-thumb-mini{width:48px;height:38px;border-radius:4px;overflow:hidden;background:#e8eef6;display:flex;align-items:center;justify-content:center;color:#94a3b8}.course-thumb-mini img{width:100%;height:100%;object-fit:cover}.course-info-mini{min-width:0}.course-info-mini strong{display:block;color:#111827;font-size:13px;line-height:1.35}.course-info-mini span{display:block;color:#8190a5;font-size:12px;margin-top:4px}.course-count-mini{font-size:12px;color:#64748b;white-space:nowrap}.course-count-mini strong{color:#111827}.empty-mini{text-align:center;color:#94a3b8;padding:25px 12px}.student-active-row{grid-template-columns:25px 42px 1fr auto}.admin-v2-page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:16px}.admin-v2-page-head.compact{margin-bottom:14px}.admin-v2-page-head h1{font-size:22px;color:#123761;font-weight:900;margin:0;letter-spacing:.02em}.admin-v2-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.toolbar-search{height:36px;display:flex;background:#fff;border:1px solid #c7d6e8;border-radius:5px;overflow:hidden}.toolbar-search input{border:0;outline:0;width:190px;padding:0 12px;color:#475569}.toolbar-search.wide input{width:250px}.order-search input{width:360px}.toolbar-search button{border:0;background:#fff;color:#64748b;width:38px}.toolbar-filter-select select{height:36px;border:1px solid #c7d6e8;border-radius:5px;background:#fff;color:#334155;padding:0 12px;min-width:180px}.btn-filter,.btn-add,.btn-more{height:36px;border-radius:5px;border:1px solid #c7d6e8;background:#fff;color:#243b5a;font-weight:700;padding:0 14px;display:inline-flex;align-items:center;gap:7px}.btn-add{background:#2776f6;color:#fff;border-color:#2776f6}.btn-more{width:38px;justify-content:center;padding:0}.admin-v2-table-card{background:#fff;border-radius:4px;overflow:hidden;box-shadow:0 1px 0 rgba(15,23,42,.03)}.admin-v2-table{color:#26354d}.admin-v2-table thead th{background:#dff1ff!important;border:0;color:#111827;font-weight:900;padding:17px 18px;white-space:nowrap;text-transform:none}.admin-v2-table tbody td{border-color:#e8eef6;padding:14px 18px;vertical-align:middle}.course-main-cell{display:flex;align-items:center;gap:14px;min-width:430px}.course-thumb-table{width:96px;height:54px;border-radius:4px;overflow:hidden;background:#e8eef6;display:flex;align-items:center;justify-content:center;color:#94a3b8;flex:0 0 auto}.course-thumb-table img{width:100%;height:100%;object-fit:cover}.course-main-cell strong{display:block;color:#14223a;line-height:1.35}.course-main-cell span,.course-main-cell small{display:block;font-size:12px;color:#6f8198;margin-top:3px}.round-play{width:25px;height:25px;border:2px solid #00aaff;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#00aaff;font-size:13px}.small-counter{display:inline-flex;min-width:28px;height:28px;border:1px solid #cbd9ea;border-radius:6px;align-items:center;justify-content:center;color:#47617f;background:#fff}.fee-cell strong{display:block;font-size:16px;color:#050505}.fee-cell del{display:block;color:#8a9ab0;font-size:13px;margin-top:4px}.status-pill{display:inline-flex;padding:8px 14px;border-radius:6px;font-weight:700;white-space:nowrap}.status-pill.open{background:#bffbd0;color:#167a34}.status-pill.closed{background:#ffd1d6;color:#8f2330}.updated-cell strong{display:block;color:#53677f}.updated-cell span{display:block;color:#7e8fa5;font-size:13px;margin-top:3px}.dot-menu{border:0;background:transparent;color:#1f426b;font-size:20px}.contact-cell{font-size:13px;color:#334155}.contact-cell div+div{margin-top:4px}.contact-cell .ok{color:#1ad471;font-size:12px}.student-table tbody tr:nth-child(even){background:#f8fbff}.pager-fake{display:flex;align-items:center;justify-content:center;gap:7px;margin:16px 0 0}.pager-fake span,.pager-fake strong{min-width:30px;height:30px;border:1px solid #c9d7e8;border-radius:6px;background:#fff;display:flex;align-items:center;justify-content:center;color:#315173}.pager-fake strong{background:#2e7bf6;color:#fff;border-color:#2e7bf6}.muted-product{color:#607086;max-width:330px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.order-code{color:#526984}.order-status{display:inline-block;padding:5px 10px;border-radius:12px;color:#fff;font-weight:800;font-size:12px}.order-status.new{background:#f59e0b}.order-status.deleted{background:#9ca3af}.order-table em{display:block;font-size:12px;color:#8a9ab0;margin-top:5px}.payment-cell strong{display:block;color:#030712;font-size:16px}.payment-cell span{display:block;font-size:12px;margin-top:5px}.payment-cell .paid{color:#00a651;font-weight:800}.payment-cell .unpaid{color:#6b7280}.invoice-mini{display:inline-flex;width:22px;height:22px;border:1px solid #c7d6e8;border-radius:5px;align-items:center;justify-content:center;color:#64748b;background:#f8fafc}.settings-page-title,.admin-settings-page h2,.admin-settings-page h1{color:#123761!important;font-weight:900!important}.settings-layout,.admin-settings-layout{background:#fff;border-radius:8px}.settings-sidebar,.admin-settings-sidebar{background:#fff;border-radius:8px}.admin-v2-body .settings-nav a,.admin-v2-body .settings-sidebar a{border-radius:7px;font-weight:800;color:#111827}.admin-v2-body .settings-nav a.active,.admin-v2-body .settings-sidebar a.active{background:#dcebff;color:#0f3767}.admin-v2-body .form-control,.admin-v2-body .form-select{border-color:#c7d6e8}.admin-v2-body .btn-primary{background:#2776f6;border-color:#2776f6;font-weight:800}

@media (max-width:1199.98px){.admin-v2-nav-inner{padding:0 16px;gap:12px}.admin-v2-brand{min-width:170px;font-size:17px}.admin-v2-main-menu{gap:4px}.admin-v2-main-menu .nav-pill{padding:8px 9px;font-size:13px}.admin-v2-shell{padding:24px 16px 44px}.admin-v2-stat-grid{grid-template-columns:repeat(2,1fr)}.admin-v2-report-layout{grid-template-columns:160px 1fr}.order-search input{width:230px}}@media (max-width:991.98px){.admin-v2-nav-inner{min-height:64px;flex-wrap:wrap}.admin-v2-menu-toggle{display:inline-flex;align-items:center;justify-content:center;margin-left:auto}.admin-v2-collapse{display:none!important;flex-basis:100%;width:100%;padding:8px 0 14px}.admin-v2-collapse.show{display:block!important}.admin-v2-main-menu{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px}.admin-v2-main-menu .nav-pill{background:#f6f9fd;justify-content:center}.admin-v2-actions{justify-content:space-between;border-top:1px solid #edf2f7;padding-top:12px;width:100%}.admin-v2-report-layout{grid-template-columns:1fr}.admin-v2-side-card{position:static;display:flex;gap:8px;overflow-x:auto}.side-link{white-space:nowrap}.admin-v2-chart-grid,.admin-v2-bottom-grid{grid-template-columns:1fr}.admin-v2-page-head{align-items:flex-start;flex-direction:column}.admin-v2-toolbar{justify-content:flex-start;width:100%}.toolbar-search,.toolbar-search input,.toolbar-search.wide input,.order-search input,.toolbar-filter-select select{width:100%}.toolbar-search{flex:1;min-width:190px}.admin-v2-table-card{border-radius:8px}.admin-v2-table thead{display:none}.admin-v2-table tbody tr{display:block;border-bottom:10px solid #eef3f8;padding:10px 0;background:#fff!important}.admin-v2-table tbody td{display:flex;justify-content:space-between;gap:15px;padding:9px 14px;border:0}.admin-v2-table tbody td:before{content:attr(data-label);font-weight:800;color:#5d708a}.course-main-cell{min-width:0;align-items:flex-start}.course-main-cell:before{display:none}.course-thumb-table{width:86px;height:48px}.updated-cell,.fee-cell,.payment-cell{text-align:right}.top-course-row{grid-template-columns:24px 44px 1fr}.course-count-mini{grid-column:3}.student-active-row{grid-template-columns:24px 40px 1fr}.admin-v2-stat-box .stat-number{font-size:20px}.chart-wrap{height:235px}}@media (max-width:575.98px){.admin-v2-brand{font-size:15px;min-width:0}.admin-v2-brand img{max-width:150px}.admin-v2-stat-grid{grid-template-columns:1fr}.admin-v2-stat-box{min-height:66px}.admin-v2-shell{padding:18px 10px 36px}.admin-v2-panel-card{padding:14px}.admin-v2-page-head h1{font-size:19px}.btn-filter,.btn-add{flex:1;justify-content:center}.top-course-row{gap:9px}.course-info-mini strong{font-size:12px}.admin-v2-main-menu{grid-template-columns:1fr}.admin-v2-table tbody td{font-size:13px}.course-main-cell{gap:10px}.pager-fake{overflow-x:auto;justify-content:flex-start;padding-bottom:4px}}

/* V9 public course preview video */
.public-preview-btn{white-space:nowrap;font-weight:700;border-radius:8px;}
.public-video-preview-modal .modal-content{border:0;border-radius:14px;overflow:hidden;}
.public-video-preview-modal .modal-header{background:#f8fbff;border-bottom:1px solid #e2e8f0;}
@media (max-width:768px){.public-preview-btn{padding:4px 8px;font-size:12px}.list-group-item .d-flex.align-items-center.gap-2{flex-wrap:wrap;justify-content:flex-end}}

/* V20 auth */
.auth-code-input{letter-spacing:8px;font-weight:900;font-size:1.35rem}.auth-icon{width:58px;height:58px;margin:0 auto 12px;border-radius:18px;background:linear-gradient(135deg,#dbeafe,#fff7ed);display:flex;align-items:center;justify-content:center;font-size:28px;color:#2563eb}
@media(max-width:576px){.auth-card{margin:18px auto;padding:22px!important}.auth-card h2{font-size:24px}.auth-code-input{letter-spacing:5px}}

/* v65 - nut len dau trang web + mobile */
.vt-scroll-top-btn{
  position:fixed;
  right:22px;
  bottom:24px;
  width:48px;
  height:48px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#ff8a18 0%,#2f80ed 100%);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  box-shadow:0 16px 34px rgba(24,72,140,.24);
  z-index:1090;
  opacity:0;
  visibility:hidden;
  transform:translateY(14px) scale(.96);
  transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
}
.vt-scroll-top-btn.show{opacity:1;visibility:visible;transform:translateY(0) scale(1)}
.vt-scroll-top-btn:hover{filter:brightness(1.04);transform:translateY(-2px) scale(1.03)}
@media (max-width:575.98px){.vt-scroll-top-btn{right:14px;bottom:16px;width:44px;height:44px;font-size:20px}}

/* ===== v68: popup thong bao/xac nhan giua trang, khong dung alert native ===== */
.vt-dialog-overlay{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(3px);
}
.vt-dialog-overlay.show{display:flex;}
body.vt-dialog-open{overflow:hidden;}
.vt-dialog-card{
  position:relative;
  width:min(470px, calc(100vw - 32px));
  background:#fff;
  border-radius:24px;
  padding:30px 30px 24px;
  box-shadow:0 30px 90px rgba(15,23,42,.28);
  border:1px solid rgba(226,232,240,.9);
  text-align:center;
  animation:vtDialogIn .18s ease-out;
}
@keyframes vtDialogIn{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
.vt-dialog-close{
  position:absolute;
  top:14px;
  right:14px;
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:#f1f5f9;
  color:#64748b;
  display:flex;
  align-items:center;
  justify-content:center;
}
.vt-dialog-close:hover{background:#e2e8f0;color:#0f172a;}
.vt-dialog-icon{
  width:70px;
  height:70px;
  border-radius:22px;
  margin:0 auto 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#dbeafe,#eff6ff);
  color:#2563eb;
  font-size:34px;
  box-shadow:0 14px 32px rgba(37,99,235,.16);
}
.vt-dialog-card.is-warning .vt-dialog-icon{background:linear-gradient(135deg,#fff7ed,#ffedd5);color:#f97316;box-shadow:0 14px 32px rgba(249,115,22,.18);}
.vt-dialog-card.is-danger .vt-dialog-icon{background:linear-gradient(135deg,#fee2e2,#fff1f2);color:#ef4444;box-shadow:0 14px 32px rgba(239,68,68,.16);}
.vt-dialog-card.is-success .vt-dialog-icon{background:linear-gradient(135deg,#dcfce7,#ecfdf5);color:#16a34a;box-shadow:0 14px 32px rgba(22,163,74,.16);}
.vt-dialog-title{
  margin:0 0 10px;
  color:#0f2d55;
  font-size:24px;
  font-weight:900;
  letter-spacing:-.02em;
}
.vt-dialog-message{
  color:#334155;
  font-size:17px;
  line-height:1.55;
  white-space:pre-line;
  margin:0 auto 22px;
  max-width:390px;
}
.vt-dialog-actions{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}
.vt-dialog-btn{
  min-width:120px;
  height:48px;
  border-radius:15px;
  border:0;
  padding:0 22px;
  font-size:16px;
  font-weight:800;
}
.vt-dialog-ok{
  background:linear-gradient(135deg,#2f80ed,#6aa7ff);
  color:#fff;
  box-shadow:0 12px 24px rgba(47,128,237,.22);
}
.vt-dialog-ok:hover{filter:brightness(.98);transform:translateY(-1px);}
.vt-dialog-cancel{background:#eef4ff;color:#1e3a5f;}
.vt-dialog-cancel:hover{background:#dbeafe;}
@media(max-width:576px){
  .vt-dialog-overlay{padding:16px;}
  .vt-dialog-card{padding:26px 20px 20px;border-radius:20px;}
  .vt-dialog-title{font-size:21px;}
  .vt-dialog-message{font-size:15px;}
  .vt-dialog-btn{height:45px;min-width:112px;}
}


/* v70: thông báo flash luôn nằm dưới màn hình, dễ nhìn và không che form */
.site-flash-wrap,
.admin-v2-flash-wrap{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:22px!important;
  top:auto!important;
  transform:translateX(-50%)!important;
  z-index:3000!important;
  width:min(760px, calc(100vw - 28px))!important;
  pointer-events:none;
}
.site-flash-wrap .alert,
.admin-v2-flash-wrap .alert{
  pointer-events:auto;
  margin:0 0 10px!important;
  border-radius:18px!important;
  box-shadow:0 18px 48px rgba(15,23,42,.18)!important;
  font-weight:700;
  padding:16px 46px 16px 18px!important;
}
@media (max-width: 640px){
  .site-flash-wrap,
  .admin-v2-flash-wrap{bottom:14px!important;width:calc(100vw - 20px)!important;}
  .site-flash-wrap .alert,
  .admin-v2-flash-wrap .alert{font-size:14px;padding:13px 42px 13px 14px!important;}
}

/* V110: nút giỏ hàng ở thanh trên cùng */
.nav-cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #dfe5ee;
  background: #fff;
  color: #1f3556;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  transition: .18s ease;
}
.nav-cart-btn:hover { color: #2563eb; border-color: #bfdbfe; background: #f3f7ff; }
.nav-cart-btn > i { font-size: 20px; }
.nav-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 19px;
  font-weight: 800;
  text-align: center;
  border: 2px solid #fff;
}
.nav-cart-count.is-empty { display: none; }
.cd47-cart-btn.added,
[data-cart-add].added { background: #eaf7ee!important; color: #16a34a!important; border-color: #bbf7d0!important; }
