/**
 * ================================================================
 * KUNS LEARNING HUB — STYLESHEET
 * Inspired by Go Global Learning Hub (Nguyen Phi Van)
 * Palette: Mint Pearl, Deep Teal, Emerald, Warm Gold, Midnight Navy
 * ================================================================
 */

:root {
  --bg: #FFF8F5;
  --bg-subtle: #FFF0EB;
  --panel: #FFFFFF;
  --panel-2: #FDF4F0;
  --panel-dark: #2A1712;
  --footer-bg: #1F100C;
  --text: #2D1813;
  --text-muted: #5A3D36;
  --text-light: #A5867E;
  
  --primary: #FA7252;
  --primary-dark: #D65536;
  --primary-light: #FFB5A0;
  --primary-glow: rgba(250, 114, 82, 0.25);
  
  --rose-gold: #E8A282;
  --green: #4E9A60;
  --gold: #ECA342;
  --gold-warm: #DC7B3C;
  --pink: #F77A6C;
  --lavender: #99627B;
  
  --line: rgba(45, 24, 19, 0.08);
  --line-strong: rgba(45, 24, 19, 0.16);
  --line-mint: rgba(250, 114, 82, 0.24);
  
  --shadow-sm: 0 2px 8px rgba(45, 24, 19, 0.04);
  --shadow-md: 0 8px 24px rgba(45, 24, 19, 0.06);
  --shadow-lg: 0 16px 40px rgba(45, 24, 19, 0.10);
  --shadow-mint: 0 10px 30px rgba(250, 114, 82, 0.22);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --max-width: 1200px;
  --font-main: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-serif: 'Roboto', sans-serif;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

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

/* Typography Utility */
.serif { font-family: var(--font-serif); }
.text-mint, .text-coral { color: var(--primary); }
.text-gold { color: var(--gold-warm); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }

/* Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, #D65536 0%, #FA7252 50%, #2D1813 100%);
  color: #FFFFFF;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 100;
}
.top-bar a {
  color: #FFFFFF;
  text-decoration: underline;
  margin-left: 8px;
}
.top-bar-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #FFFFFF;
  font-size: 1.1rem;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
.top-bar-close:hover {
  opacity: 1;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  transition: all 0.3s ease;
}
.header.scrolled {
  box-shadow: 0 4px 20px rgba(45, 24, 19, 0.08);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(250, 114, 82, 0.25);
  border: 2px solid var(--primary-light);
  flex-shrink: 0;
}
.brand-logo img, .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand-text b, .brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  display: block;
  letter-spacing: -0.3px;
  margin: 0;
  line-height: 1.2;
}
.brand-text span {
  font-size: 0.72rem;
  color: var(--primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}
.nav-links a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 6px 2px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary-dark);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User Badges (Streak & XP) */
.user-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pill-streak { color: #E65100; border-color: rgba(230, 81, 0, 0.2); background: #FFF5EE; }
.pill-xp { color: #D65536; border-color: var(--line-mint); background: #FFF0EB; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary {
  background: linear-gradient(135deg, #FA7252 0%, #D65536 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-mint);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(250, 114, 82, 0.35);
}
.btn-secondary {
  background: #FFFFFF;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--primary);
}
.btn-gold {
  background: linear-gradient(135deg, #ECA342 0%, #DC7B3C 100%);
  color: #2D1813;
  box-shadow: 0 8px 24px rgba(220, 123, 60, 0.25);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(220, 123, 60, 0.35);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  padding: 48px 0 36px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--line-mint);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.hero-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(91, 183, 51, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(91, 183, 51, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(91, 183, 51, 0); }
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 28px;
}
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat-item b {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.stat-item span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Daily Challenge Card Widget */
.daily-challenge-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--line-mint);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.daily-challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #FA7252, #ECA342);
}
.dc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dc-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.dc-xp {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-warm);
}
.dc-question {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 18px;
}

.dc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.dc-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  text-align: left;
}
.dc-opt:hover {
  border-color: var(--primary);
  background: #FFFFFF;
}
.dc-opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  color: var(--text-muted);
}
.dc-opt.selected-correct {
  border-color: var(--green);
  background: #F1FBF2;
}
.dc-opt.selected-correct .dc-opt-letter {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.dc-opt.selected-wrong {
  border-color: var(--pink);
  background: #FFF1F1;
}
.dc-opt.selected-wrong .dc-opt-letter {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.dc-feedback {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-top: 14px;
}
.dc-feedback.show { display: block; }
.dc-feedback.correct {
  background: #F1FBF2;
  border: 1px solid rgba(91, 183, 51, 0.3);
  color: #1A5319;
}
.dc-feedback.wrong {
  background: #FFF5F5;
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #9C1A1A;
}

/* Event Banner Bar */
.event-banner {
  background: linear-gradient(135deg, #2D1813 0%, #1A0D0A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  margin: 20px 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(250, 114, 82, 0.25);
}
.eb-content {
  display: flex;
  align-items: center;
  gap: 18px;
}
.eb-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(250, 114, 82, 0.2);
  border: 1px solid rgba(255, 181, 160, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.eb-text h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #FFFFFF;
}
.eb-text p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
}

/* Section Common */
.sec {
  padding: 56px 0;
}
.sec-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}
.sec-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-subtle);
  border: 1px solid var(--line-mint);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sec-head h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 12px;
}
.sec-head p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* 3 How It Works Pillars */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
}
.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.pillar-step {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: block;
}
.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}
.pillar-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.pillar-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* AI Companion Box */
.ai-companion-card {
  background: linear-gradient(135deg, #2A1712 0%, #3B211A 100%);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  color: #FFFFFF;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
  margin: 30px 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 181, 160, 0.22);
}
.aic-left .tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  background: rgba(250, 114, 82, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}
.aic-left h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #FFFFFF;
}
.aic-left p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  margin-bottom: 22px;
}
.aic-left p em {
  color: #FFB5A0;
  font-style: normal;
  font-weight: 700;
}
.aic-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aic-prompt-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF !important;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.aic-prompt-chip:hover {
  background: rgba(250, 114, 82, 0.35);
  border-color: #FFB5A0;
  color: #FFFFFF !important;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(250, 114, 82, 0.3);
}
.aic-chat-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 20px;
}
#aic-messages-stream {
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}
.aic-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aic-msg-user {
  flex-direction: row-reverse;
}
.aic-avatar, .aic-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.aic-bubble {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 12px 18px;
  border-radius: 16px;
  font-size: 0.92rem;
  color: #FFFFFF !important;
  line-height: 1.55;
  max-width: 85%;
}
.aic-bubble strong {
  color: #FFB5A0;
}
.aic-msg-user .aic-bubble {
  background: linear-gradient(135deg, #FA7252, #D65536);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF !important;
}
.aic-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 18px;
}
.aic-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #FFFFFF !important;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
}
.aic-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
.aic-send {
  background: linear-gradient(135deg, #FA7252, #D65536);
  color: #FFFFFF !important;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(214, 85, 54, 0.35);
}
.aic-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(214, 85, 54, 0.5);
}

/* Problem Filters */
.problem-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.problem-chip {
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.problem-chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}
.problem-chip.active {
  background: linear-gradient(135deg, #D65536, #FA7252);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--shadow-mint);
}

/* 8 Categories Grid */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-mint);
}
.cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cat-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.cat-cnt {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.cat-card h4 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.cat-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.cat-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Course Filter Tabs */
.type-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.type-tab {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.type-tab:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}
.type-tab.active {
  background: #2D1813;
  color: #FFFFFF;
  border-color: #2D1813;
  box-shadow: 0 4px 14px rgba(45, 24, 19, 0.2);
}

/* Course Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.course-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.cc-thumb {
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  overflow: hidden;
}
.cc-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(45, 24, 19, 0.85);
  color: #fff;
  backdrop-filter: blur(8px);
}
.cc-badge-free {
  background: #2E7D32 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.4);
}
.cc-badge-pro {
  background: #D65536 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(214, 85, 54, 0.4);
}
.cc-badge-mentor {
  background: #ECA342 !important;
  color: #2D1813 !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 8px rgba(236, 163, 66, 0.4);
}

/* 4 Course Groups & 3 Tiers Filter Bar */
.course-filter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.course-group-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.c-group-tab {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.c-group-tab:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.c-group-tab.active {
  background: #2D1813;
  color: #FFFFFF;
  border-color: #2D1813;
  box-shadow: 0 6px 18px rgba(45, 24, 19, 0.25);
}

.course-tier-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.c-tier-tab {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.c-tier-tab:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
}
.c-tier-tab.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(250, 114, 82, 0.35);
}
.cc-level {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: #FFFFFF;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.cc-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.cc-meta .xp {
  color: var(--gold-warm);
  display: flex;
  align-items: center;
  gap: 4px;
}
.course-card h4 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 8px;
}
.cc-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.cc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cc-instructor {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cc-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}
.course-card:hover .cc-btn {
  background: var(--primary);
  color: #FFFFFF;
}

/* 3 Tier Programs */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.prog-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.prog-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-mint);
  transform: scale(1.03);
  z-index: 2;
}
.prog-top-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #FFFFFF;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.prog-level {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.prog-card h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.prog-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 42px;
}
.prog-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.prog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
  flex: 1;
}
.prog-list li {
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.prog-list li .ck {
  color: var(--primary);
  font-weight: 800;
}

/* Smart Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tool-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.tool-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}
.tool-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}
.tool-action {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Leaderboard */
.lb-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 840px;
  margin: 0 auto;
}
.lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.lb-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
}
.lb-tabs {
  display: flex;
  gap: 8px;
}
.lb-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--panel-2);
}
.lb-tab.active {
  background: var(--primary);
  color: #fff;
}
.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  background: var(--panel-2);
  transition: all 0.2s ease;
}
.lb-row:hover {
  background: var(--bg-subtle);
}
.lb-left, .lb-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lb-rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: #FFFFFF;
  border: 1.5px solid var(--line-strong);
  flex-shrink: 0;
}
.lb-row.top-1 .lb-rank { background: #FFD54F; color: #2D1813; border-color: #FFA000; }
.lb-row.top-2 .lb-rank { background: #E0E0E0; color: #2D1813; }
.lb-row.top-3 .lb-rank { background: #FFB74D; color: #2D1813; }
.lb-user-av { font-size: 1.4rem; }
.lb-user-info { display: flex; flex-direction: column; gap: 2px; }
.lb-user-info b, .lb-user-name { display: block; font-size: 0.95rem; font-weight: 700; color: var(--text); }
.lb-user-info span, .lb-user-tier { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.lb-right, .lb-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lb-streak { font-size: 0.85rem; font-weight: 700; color: #E65100; }
.lb-xp { font-size: 0.95rem; font-weight: 800; color: var(--primary-dark); }

/* Books Library 3D */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.book-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.book-3d-wrap {
  perspective: 900px;
  margin: 0 auto 24px;
  width: 170px;
  height: 240px;
}
.book-3d {
  width: 100%;
  height: 100%;
  border-radius: 6px 14px 14px 6px;
  box-shadow: 8px 12px 24px rgba(14, 42, 48, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  color: #FFFFFF;
  position: relative;
  transform: rotateY(-14deg);
  transition: transform 0.4s ease;
}
.book-card:hover .book-3d {
  transform: rotateY(-4deg) scale(1.04);
}
.b3d-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
}
.b3d-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
}
.b3d-author {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}
.book-meta {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 12px;
}
.book-card h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.book-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}
.book-btns {
  display: flex;
  gap: 10px;
}

/* Instructor Section */
.instructor-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 44px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
}
.ins-photo-box {
  position: relative;
}
.ins-photo {
  width: 100%;
  height: 380px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 3px solid #FFFFFF;
}
.ins-badge-float {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 1px solid var(--line-mint);
  box-shadow: var(--shadow-md);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}
.ins-content h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.ins-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.ins-philosophy {
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.ins-creds {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}
.ins-creds li {
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ins-creds li .ck { color: var(--gold-warm); font-weight: 800; }

/* FAQ Accordion */
.faq-wrap {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.faq-q {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.faq-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--primary-dark);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}
.faq-a {
  display: none;
  padding: 0 24px 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq-item.open .faq-a { display: block; }

/* Registration Form Card */
.reg-section {
  background: linear-gradient(135deg, #2D1813 0%, #1A0D0A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  margin: 50px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(250, 114, 82, 0.25);
}
.reg-left h3 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #FFFFFF;
}
.reg-left p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 24px;
  line-height: 1.6;
}
.reg-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reg-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #FFFFFF;
}

.reg-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 32px;
}
.reg-card h4 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
}
.reg-card .sub {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 20px;
}
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #FFFFFF;
}
.form-field input, .form-field select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
.form-field input::placeholder { color: rgba(255, 255, 255, 0.65); }
.form-field input:focus, .form-field select:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.2);
}
.form-field select option {
  background: #2D1813;
  color: #FFFFFF;
}

/* Modal Inputs & Form Fields - High Contrast & Crystal Clear */
.modal-box .form-field label {
  color: #1F2937 !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

.modal-box .form-field input,
.modal-box input[type="text"],
.modal-box input[type="password"],
.modal-box input[type="email"],
.modal-box select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm, 10px);
  background: #FFFFFF !important;
  border: 2px solid #CBD5E1 !important;
  color: #0F172A !important; /* Bold, dark text - 100% visible */
  font-family: inherit;
  font-size: 1rem !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.modal-box .form-field input:focus,
.modal-box input[type="text"]:focus,
.modal-box input[type="password"]:focus,
.modal-box input[type="email"]:focus {
  outline: none;
  border-color: #FA7252 !important;
  box-shadow: 0 0 0 4px rgba(250, 114, 82, 0.2) !important;
  background: #FFFFFF !important;
}

.modal-box .form-field input::placeholder,
.modal-box input::placeholder {
  color: #94A3B8 !important; /* Visible medium gray placeholder */
  font-weight: 500;
}

/* Password Input Wrapper & Visibility Toggle */
.password-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.password-input-wrapper .input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: #64748B;
  pointer-events: none;
  z-index: 2;
}

.password-input-wrapper input {
  width: 100% !important;
  padding: 13px 48px 13px 44px !important;
  border-radius: var(--radius-sm, 10px) !important;
  background: #FFFFFF !important;
  border: 2px solid #CBD5E1 !important;
  color: #0F172A !important;
  font-family: inherit;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.password-input-wrapper input:focus {
  outline: none !important;
  border-color: #FA7252 !important;
  box-shadow: 0 0 0 4px rgba(250, 114, 82, 0.2) !important;
  background: #FFFFFF !important;
}

.password-input-wrapper input::placeholder {
  color: #94A3B8 !important;
  font-weight: 500 !important;
  letter-spacing: normal !important;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  transition: all 0.2s ease;
  user-select: none;
  z-index: 3;
}

.password-toggle-btn:hover {
  background: #FFEBE5;
  border-color: #FA7252;
  color: #C84628;
  transform: translateY(-50%) scale(1.06);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* Footer */
footer {
  background: var(--footer-bg);
  color: #FFFFFF;
  padding: 60px 0 30px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.foot-brand h4 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.foot-brand p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}
.foot-col h5 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.foot-col a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 10px;
}
.foot-col a:hover { color: var(--primary-light); }
.foot-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Modal System */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 36, 0.8);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.modal-close:hover { background: #E0E0E0; }

/* ==========================================================
   CLASSROOM LMS LEARNER SYSTEM
   ========================================================== */
.modal-classroom-box {
  max-width: 1040px;
  width: 96%;
  max-height: 92vh;
  padding: 24px 28px;
  background: #FFFFFF;
}

.cr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  gap: 16px;
}
.cr-header-left {
  flex: 1;
}
.cr-course-badge {
  background: var(--bg-subtle);
  color: var(--primary-dark);
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}
.cr-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cr-progress-wrap {
  text-align: right;
  min-width: 140px;
}
.cr-progress-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.cr-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--line-strong);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.cr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FA7252, #4E9A60);
  transition: width 0.3s ease;
}
.cr-close-btn {
  position: static;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
}

.cr-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 24px;
  align-items: start;
}

/* 5-Min Media Player */
.cr-player-card {
  background: linear-gradient(135deg, #2D1813 0%, #1A0D0A 100%);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  color: #FFFFFF;
  margin-bottom: 20px;
  border: 1px solid rgba(250, 114, 82, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.cr-player-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cr-speaker-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cr-speaker-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--primary-light);
  background: #fff;
  object-fit: cover;
}
.cr-player-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}
.cr-player-waves span {
  display: inline-block;
  width: 3px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  transition: height 0.2s ease;
}
.cr-player-waves.playing span:nth-child(1) { animation: wave 0.8s infinite ease-in-out; }
.cr-player-waves.playing span:nth-child(2) { animation: wave 0.6s infinite ease-in-out 0.1s; }
.cr-player-waves.playing span:nth-child(3) { animation: wave 1.0s infinite ease-in-out 0.2s; }
.cr-player-waves.playing span:nth-child(4) { animation: wave 0.7s infinite ease-in-out 0.15s; }
.cr-player-waves.playing span:nth-child(5) { animation: wave 0.9s infinite ease-in-out 0.25s; }
.cr-player-waves.playing span:nth-child(6) { animation: wave 0.6s infinite ease-in-out 0.05s; }
.cr-player-waves.playing span:nth-child(7) { animation: wave 0.8s infinite ease-in-out 0.3s; }
.cr-player-waves.playing span:nth-child(8) { animation: wave 0.7s infinite ease-in-out 0.18s; }

@keyframes wave {
  0%, 100% { height: 6px; }
  50% { height: 22px; background: #FFD54F; }
}

.cr-timer {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.cr-player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cr-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FA7252, #D65536);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(214, 85, 54, 0.4);
  transition: transform 0.2s ease;
}
.cr-play-btn:hover { transform: scale(1.08); }
.cr-player-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  overflow: hidden;
  cursor: pointer;
}
.cr-player-scrubber {
  height: 100%;
  background: #FFB5A0;
  transition: width 0.2s linear;
}
.cr-player-status {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

/* Lesson Content Body */
.cr-content-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.cr-body-text {
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.65;
  margin: 18px 0 24px;
}
.cr-section-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cr-section-box h5 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cr-section-box ul {
  padding-left: 20px;
  margin: 6px 0;
}
.cr-section-box li {
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.cr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.cr-complete-btn {
  background: #2E7D32 !important;
  color: #FFFFFF !important;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
}
.cr-complete-btn.completed {
  background: #1B5E20 !important;
}

/* Sidebar Syllabus */
.cr-sidebar {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  max-height: 580px;
  overflow-y: auto;
}
.cr-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.cr-sidebar-head h4 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}
.cr-lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cr-lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  text-align: left;
  gap: 8px;
}
.cr-lesson-item:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-light);
}
.cr-lesson-item.active {
  background: #FFF1EB;
  border-color: var(--primary);
  font-weight: 700;
  color: var(--primary-dark);
}
.cr-lesson-item.done {
  border-color: rgba(46, 125, 50, 0.4);
}
.cr-lesson-item .cr-li-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.cr-lesson-item .cr-li-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-subtle);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary-dark);
}
.cr-lesson-item.done .cr-li-idx {
  background: #2E7D32;
  color: #fff;
}
.cr-lesson-item .cr-li-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}
.cr-lesson-item.done .cr-li-status {
  color: #2E7D32;
}

.cr-lesson-item.locked {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
  cursor: not-allowed !important;
  opacity: 0.72;
}
.cr-lesson-item.locked:hover {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}
.cr-lesson-item.locked .cr-li-idx {
  background: #E2E8F0 !important;
  color: #64748B !important;
  font-size: 0.75rem !important;
}
.cr-lesson-item.locked .cr-li-status {
  color: #94A3B8 !important;
  font-weight: 700 !important;
}

@media (max-width: 860px) {
  .cr-layout { grid-template-columns: 1fr; }
  .modal-classroom-box { padding: 18px 16px; }
}

/* Floating Action Button (Zalo & AI) */
.floating-actions {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
}
.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  font-size: 1.3rem;
}
.float-btn:hover { transform: scale(1.08); }
.float-zalo { background: #0088FF; font-size: 0.9rem; font-weight: 800; }
.float-ai { background: linear-gradient(135deg, #FA7252, #99627B); }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2D1813;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  border: 1px solid var(--primary);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================
   COMMUNITY FEED SYSTEM (Solo Expert style)
   ========================================================== */
.feed-layout {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Post Composer Card */
.feed-composer-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.feed-composer-card:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.fc-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.fc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1.5px solid var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.fc-prompt {
  flex: 1;
}
.fc-prompt textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 52px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  background: transparent;
}
.fc-prompt textarea::placeholder {
  color: var(--text-muted);
}
.fc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.fc-space-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc-select {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.fc-post-btn {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(250, 114, 82, 0.3);
}

/* Feed Tabs */
.feed-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--line-strong);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-tab:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}
.feed-tab.active {
  background: #2D1813;
  color: #FFFFFF;
  border-color: #2D1813;
  box-shadow: 0 4px 14px rgba(45, 24, 19, 0.2);
}

/* Feed Posts Stream */
.feed-posts-stream {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.feed-post-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.feed-post-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.feed-post-card.pinned {
  border: 1.5px solid var(--primary-light);
  background: linear-gradient(180deg, #FFFBF9 0%, #FFFFFF 100%);
}
.fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.fp-author-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fp-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}
.fp-author-info {
  display: flex;
  flex-direction: column;
}
.fp-author-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fp-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 900;
}
.fp-author-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}
.fp-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.fp-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.fp-body h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}
.fp-body p {
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 14px;
}
.fp-body-content {
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.68;
}
.fp-readmore-btn {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: inline-block;
}
.fp-readmore-btn:hover { text-decoration: underline; }

/* Engagement Actions */
.fp-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}
.fp-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}
.fp-act-btn:hover {
  background: var(--bg-subtle);
  color: var(--primary-dark);
}
.fp-act-btn.liked {
  color: #E53935;
  background: #FFEBEE;
}

/* Comments Section inside Post */
.fp-comments-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.fp-comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.fp-c-avatar {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.fp-c-bubble {
  background: var(--panel-2);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  flex: 1;
}
.fp-c-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.fp-c-name {
  font-weight: 800;
  color: var(--text);
  font-size: 0.82rem;
}
.fp-c-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.fp-c-text {
  color: var(--text);
  line-height: 1.5;
}
.fp-comment-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.fp-comment-input {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}
.fp-comment-input:focus { border-color: var(--primary); }
.fp-comment-submit {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Feed Sidebar Widgets */
.feed-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.f-widget {
  border-radius: var(--radius-xl);
  padding: 24px;
}
.f-event-card {
  background: linear-gradient(135deg, #2D1813 0%, #1A0D0A 100%);
  color: #FFFFFF;
  border: 1px solid rgba(250, 114, 82, 0.25);
  box-shadow: var(--shadow-md);
}
.f-widget-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--primary-light);
  text-transform: uppercase;
}
.f-widget-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.f-spaces-card, .f-contributors-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.f-spaces-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.f-space-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.f-space-item:hover {
  background: var(--bg-subtle);
  color: var(--primary-dark);
}
.f-space-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.f-contrib-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.f-contrib-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--panel-2);
}
.f-contrib-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.f-contrib-rank {
  font-weight: 800;
  font-size: 0.85rem;
}
.f-contrib-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}
.f-contrib-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.f-contrib-xp {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-dark);
}

@media (max-width: 1024px) {
  .feed-layout { grid-template-columns: 1fr; }
  .user-badges { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.88rem; }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .programs-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .instructor-card { grid-template-columns: 1fr; }
  .reg-section { grid-template-columns: 1fr; padding: 36px 24px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    padding: 20px;
    gap: 14px;
    border-bottom: 1px solid var(--line-mint);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open {
    display: flex;
  }
  .burger { display: flex; }
  .burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger.open span:nth-child(2) {
    opacity: 0;
  }
  .burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .burger span {
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
}

@media (max-width: 768px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .courses-grid { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: 1fr; }
  .event-banner { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr; }
  .ai-companion-card { grid-template-columns: 1fr; padding: 28px 20px; }
  .hero h1 { font-size: 2.1rem; }
}

/* ==========================================================
   ADMIN PORTAL STYLES (HUONG KUNKUNS EXCLUSIVE)
   ========================================================== */
.modal-admin-box {
  max-width: 1040px;
  width: 95%;
  max-height: 92vh;
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.admin-top-bar {
  background: linear-gradient(135deg, #2D1813 0%, #4A2318 100%);
  color: #FFF;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary);
}

.admin-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge {
  background: rgba(250, 114, 82, 0.25);
  color: var(--primary-light);
  border: 1px solid var(--primary);
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  background: #FAF6F0;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  overflow-x: auto;
  gap: 6px;
}

.admin-tab-btn {
  padding: 13px 18px;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

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

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

.admin-tab-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(92vh - 125px);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-kpi-card {
  background: #FAF6F0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s;
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.admin-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.admin-kpi-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.admin-kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFF;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th {
  background: #FAF6F0;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

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

.admin-table tr:hover td {
  background: #FFFAF8;
}

.admin-form-card {
  background: #FAF6F0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: #FFF;
  color: var(--text);
  transition: border-color 0.2s;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.admin-action-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #FFF;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.admin-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.admin-action-btn.btn-danger {
  color: #DC2626;
  border-color: #FECACA;
}

.admin-action-btn.btn-danger:hover {
  background: #FEE2E2;
}

/* ==========================================================
   LESSON CURRICULUM BUILDER & VIDEO PLAYER
   ========================================================== */
.admin-lesson-item {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.admin-lesson-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.admin-lesson-idx-badge {
  background: var(--bg-subtle);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.admin-lesson-meta-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.ac-lesson-title-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: #FFFAF8;
  transition: all 0.2s;
}

.ac-lesson-title-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.cr-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cr-video-container iframe,
.cr-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Header Logout Button */
.btn-header-logout {
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid var(--line);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-header-logout:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #EF4444;
  color: #DC2626;
}

/* ==========================================================
   RICH TEXT FORMATTING EDITOR (RTE) & CLASSROOM RICH CONTENT
   ========================================================== */
.rte-container {
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.rte-container:focus-within {
  border-color: #FA7252;
  box-shadow: 0 0 0 4px rgba(250, 114, 82, 0.18);
}

.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: #F8FAFC;
  border-bottom: 1.5px solid #E2E8F0;
  user-select: none;
}

.rte-select {
  padding: 5px 8px;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  outline: none;
}

.rte-select:hover {
  border-color: #FA7252;
}

.rte-divider {
  width: 1px;
  height: 22px;
  background: #CBD5E1;
  margin: 0 3px;
}

.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 2px 7px;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

.rte-btn:hover {
  background: #FFEBE5;
  border-color: #FA7252;
  color: #C84628;
}

.rte-btn:active {
  transform: scale(0.95);
}

.rte-color-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rte-color-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748B;
  margin-right: 1px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rte-color-btn {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.rte-color-btn:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 2px #FA7252;
  z-index: 2;
}

.rte-color-input-custom {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.85rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  overflow: hidden;
  transition: all 0.15s ease;
}

.rte-color-input-custom:hover {
  border-color: #FA7252;
  transform: scale(1.15);
}

.rte-color-input-custom input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.rte-content-editor {
  min-height: 190px;
  max-height: 440px;
  overflow-y: auto;
  padding: 14px 16px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #0F172A;
  background: #FFFFFF;
  outline: none;
}

.rte-content-editor:empty:before {
  content: attr(data-placeholder);
  color: #94A3B8;
  font-weight: 400;
  pointer-events: none;
  display: block;
}

.rte-content-editor h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 14px 0 8px;
  color: #0F172A;
  line-height: 1.35;
}

.rte-content-editor h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 12px 0 6px;
  color: #1E293B;
  line-height: 1.35;
}

.rte-content-editor p {
  margin: 0 0 10px;
}

.rte-content-editor ul,
.rte-content-editor ol {
  margin: 8px 0 12px;
  padding-left: 24px;
}

.rte-content-editor li {
  margin-bottom: 4px;
}

.rte-content-editor blockquote {
  border-left: 4px solid #FA7252;
  background: #FFF5F2;
  padding: 10px 16px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #431407;
  line-height: 1.6;
}

/* Classroom Rich Content Body View */
.cr-lesson-rich-body {
  font-size: 0.96rem;
  line-height: 1.8;
  color: #1F2937;
}

.cr-lesson-rich-body h1,
.cr-lesson-rich-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 18px 0 10px;
  color: #0F172A;
  line-height: 1.35;
}

.cr-lesson-rich-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 14px 0 8px;
  color: #1E293B;
  line-height: 1.35;
}

.cr-lesson-rich-body p {
  margin: 0 0 12px;
}

.cr-lesson-rich-body ul,
.cr-lesson-rich-body ol {
  margin: 10px 0 14px;
  padding-left: 24px;
}

.cr-lesson-rich-body li {
  margin-bottom: 6px;
}

.cr-lesson-rich-body blockquote {
  border-left: 4px solid #FA7252;
  background: #FFF5F2;
  padding: 12px 18px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #431407;
}

.cr-lesson-rich-body mark,
.cr-lesson-rich-body [style*="background-color"] {
  padding: 2px 5px;
  border-radius: 4px;
}

/* ==========================================================
   FINAL ASSESSMENT EXAM & CERTIFICATE OF COMPLETION
   ========================================================== */
/* Exam Question Box & Options */
.exam-q-box {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 18px;
  transition: all 0.2s ease;
}

.exam-q-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 12px;
  line-height: 1.5;
}

.exam-option-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.15s ease;
  user-select: none;
}

.exam-option-item:hover {
  border-color: #FA7252;
  background: #FFF7ED;
}

.exam-option-item.selected {
  border-color: #FA7252;
  background: #FFEBE5;
  box-shadow: 0 0 0 2px rgba(250, 114, 82, 0.2);
}

.exam-option-item input[type="radio"] {
  margin-top: 3px;
  accent-color: #FA7252;
  transform: scale(1.15);
}

.exam-option-text {
  font-size: 0.9rem;
  color: #1F2937;
  line-height: 1.45;
}

/* Certificate Styles */
.modal-cert-box {
  background: #1E293B !important;
  color: #0F172A !important;
}

.kuns-certificate {
  background: #FFFDF9;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
  overflow: hidden;
  font-family: 'Times New Roman', Georgia, 'Cinzel', serif;
}

.cert-border-outer {
  border: 3.5px solid #D97706;
  border-radius: 10px;
  padding: 6px;
  background: #FFFBF2;
}

.cert-border-inner {
  border: 1.5px solid #F59E0B;
  border-radius: 6px;
  padding: 34px 28px;
  position: relative;
  background: radial-gradient(circle at center, #FFFFFF 65%, #FFFDF8 100%);
  box-shadow: inset 0 0 60px rgba(245, 158, 11, 0.04);
}

.cert-corner {
  position: absolute;
  font-size: 1.3rem;
  color: #D97706;
  opacity: 0.85;
  user-select: none;
}
.cert-corner.tl { top: 8px; left: 8px; }
.cert-corner.tr { top: 8px; right: 8px; }
.cert-corner.bl { bottom: 8px; left: 8px; }
.cert-corner.br { bottom: 8px; right: 8px; }

.cert-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #78350F;
  text-transform: uppercase;
}

.cert-academy-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #B45309;
  margin: 4px 0 12px;
  text-transform: uppercase;
}

.cert-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #9A3412;
  letter-spacing: 1.5px;
  margin: 0;
  line-height: 1.25;
}

.cert-sub-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #94A3B8;
  margin-top: 2px;
}

.cert-body {
  margin: 22px 0 20px;
}

.cert-lead {
  font-size: 0.92rem;
  color: #475569;
  font-style: italic;
  margin: 0 0 6px;
}

.cert-student-name {
  font-size: 1.9rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 4px 0 6px;
  border-bottom: 2px solid #F59E0B;
  display: inline-block;
  padding: 0 24px 6px;
}

.cert-code {
  font-size: 0.82rem;
  color: #C2410C;
  font-weight: 800;
  letter-spacing: 1px;
}

.cert-desc {
  font-size: 0.9rem;
  color: #334155;
  max-width: 540px;
  margin: 14px auto 8px;
  line-height: 1.5;
}

.cert-course-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: #C2410C;
  margin: 6px 0 4px;
  line-height: 1.35;
}

.cert-group {
  font-size: 0.84rem;
  color: #64748B;
  font-style: italic;
}

.cert-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #FDE68A;
  padding-top: 18px;
  margin-top: 18px;
  text-align: left;
}

.cert-meta-col {
  font-size: 0.76rem;
  color: #475569;
  line-height: 1.7;
}

.cert-seal-col {
  display: flex;
  justify-content: center;
}

.cert-seal-stamp {
  width: 96px;
  height: 96px;
  border: 2.5px solid #DC2626;
  border-radius: 50%;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(254, 242, 242, 0.7);
  transform: rotate(-6deg);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.18);
  margin: 0 auto;
}

.cert-seal-inner {
  width: 100%;
  height: 100%;
  border: 1.5px dashed #DC2626;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3px;
  box-sizing: border-box;
}

.seal-org {
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1.1;
  color: #991B1B;
  text-transform: uppercase;
}

.seal-stars {
  font-size: 0.52rem;
  letter-spacing: 2px;
  color: #DC2626;
  line-height: 1;
  margin: 1px 0;
}

.seal-verified {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  color: #B91C1C;
  border-top: 1px solid #DC2626;
  border-bottom: 1px solid #DC2626;
  padding: 1px 4px;
  line-height: 1.2;
  margin: 1px 0;
  text-transform: uppercase;
}

.seal-sub {
  font-size: 0.44rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #991B1B;
  line-height: 1.1;
  text-transform: uppercase;
}

.cert-sign-col {
  text-align: right;
}

.cert-signature-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
  font-style: italic;
  font-size: 1.85rem;
  color: #0F172A;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}

.cert-sign-line {
  width: 140px;
  height: 1.5px;
  background: #CBD5E1;
  margin: 6px 0 4px auto;
}

.cert-sign-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1F2937;
}

.cert-sign-sub {
  font-size: 0.72rem;
  color: #64748B;
  font-style: italic;
}

/* Certificate item in Profile */
.cert-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.cert-item-card:hover {
  border-color: #FA7252;
  box-shadow: 0 2px 8px rgba(250, 114, 82, 0.15);
}

/* Print Styles: Prints ONLY the Certificate cleanly */
@media print {
  body * {
    visibility: hidden;
  }
  #certificate-print-area,
  #certificate-print-area * {
    visibility: visible;
  }
  #certificate-print-area {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    box-shadow: none !important;
    border: none !important;
    background: #FFFFFF !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cert-no-print {
    display: none !important;
  }
}



