/* ============================================
   BM Tutors - Global Stylesheet
   bmtutors.com
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --primary: #1a6fdb;
  --primary-dark: #1255b0;
  --primary-light: #e8f0fd;
  --secondary: #22c55e;
  --secondary-dark: #16a34a;
  --secondary-light: #dcfce7;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 36px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
  --nav-height: 70px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: var(--font-body); }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-100);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; font-weight: 900;
}

.nav-logo span { color: var(--secondary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-600);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 10px;
  border-radius: 8px;
  transition: var(--transition);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--gray-700);
  border-radius: 4px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: white;
  border-bottom: 1px solid var(--gray-100);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-weight: 600;
  font-size: 16px;
  color: var(--gray-700);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav a:hover,
.mobile-nav a:active { background: var(--primary-light); color: var(--primary); }
.mobile-nav .mobile-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(26,111,219,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26,111,219,0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 14px rgba(34,197,94,0.35);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--gray-200); transform: translateY(-2px); }

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { opacity: 0.9; transform: translateY(-2px); }

.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-hover:hover { transform: translateY(-4px); }

/* ============================================
   BADGE
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--secondary-light); color: var(--secondary-dark); }
.badge-warning { background: var(--accent-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }

/* ============================================
   FORMS
   ============================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-control {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(26,111,219,0.1);
}

.form-control::placeholder { color: var(--gray-400); }

.form-control.error { border-color: var(--danger); }
.form-error { font-size: 13px; color: var(--danger); font-weight: 500; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page-wrapper {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.section-header { text-align: center; margin-bottom: 56px; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f8f0 50%, #f0f7ff 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(26,111,219,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(34,197,94,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text { }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--primary-light);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-tag .dot {
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title .highlight {
  color: var(--primary);
  position: relative;
}

.hero-title .highlight-green { color: var(--secondary-dark); }

.hero-subtitle {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.hero-main-card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 3;
}

.hero-floating-card {
  position: absolute;
  background: white;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}

.hero-floating-card.card-1 { top: -20px; right: -20px; animation-delay: 0s; }
.hero-floating-card.card-2 { bottom: 20px; left: -30px; animation-delay: 1.5s; }

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

.hero-floating-card .fc-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

/* ============================================
   SUBJECT CARDS
   ============================================ */
.subject-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.subject-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.subject-icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.subject-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 10px;
}

.subject-desc { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 16px; }
.subject-topics { font-size: 13px; font-weight: 600; color: var(--gray-400); }

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.feature-desc { font-size: 14px; color: var(--gray-500); line-height: 1.65; }

/* ============================================
   STEPS / HOW IT WORKS
   ============================================ */
.steps-section { background: var(--gray-50); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 0;
}

.step-card {
  text-align: center;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin: 0 auto 24px;
  box-shadow: 0 0 0 8px var(--gray-50);
  transition: var(--transition);
}

.step-card:hover .step-num {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.step-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.step-desc { font-size: 14px; color: var(--gray-500); line-height: 1.6; }

/* ============================================
   PRICING
   ============================================ */
.pricing-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  border: 2px solid var(--gray-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pricing-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.pricing-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.pricing-plan {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.pricing-card.featured .pricing-plan { color: rgba(255,255,255,0.8); }

.pricing-price {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card.featured .pricing-price { color: white; }

.pricing-price span { font-size: 22px; font-weight: 700; }
.pricing-period { font-size: 14px; color: var(--gray-400); margin-bottom: 28px; }
.pricing-card.featured .pricing-period { color: rgba(255,255,255,0.7); }

.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--gray-700);
}

.pricing-card.featured .pricing-features li { color: rgba(255,255,255,0.9); }

.pricing-features li .check {
  width: 22px; height: 22px;
  background: var(--secondary-light);
  color: var(--secondary-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  font-weight: 700;
}

.pricing-card.featured .pricing-features li .check {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-section { background: var(--gray-50); }

.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  position: relative;
}

.testimonial-quote {
  font-size: 40px;
  color: var(--primary-light);
  font-family: Georgia, serif;
  line-height: 1;
  margin-bottom: 12px;
}

.testimonial-text {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

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

.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.testimonial-name { font-weight: 700; font-size: 15px; color: var(--gray-800); }
.testimonial-role { font-size: 13px; color: var(--gray-400); }

.stars { color: var(--accent); font-size: 14px; margin-bottom: 4px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.8);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand { }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
}

.footer-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 900;
}

.footer-tagline { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 20px; }

.footer-social { display: flex; gap: 10px; }

.social-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.social-icon:hover { background: var(--primary); }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.55); transition: var(--transition); }
.footer-col ul li a:hover { color: white; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.dashboard-sidebar {
  background: white;
  border-right: 1px solid var(--gray-200);
  padding: 24px 16px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.sidebar-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-user-info .name { font-weight: 700; font-size: 15px; color: var(--gray-800); }
.sidebar-user-info .role { font-size: 12px; color: var(--gray-400); }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-600);
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-link:hover { background: var(--gray-100); color: var(--gray-800); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); }

.sidebar-link .icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  padding: 16px 16px 6px;
}

.dashboard-main {
  background: var(--gray-50);
  padding: 32px;
  overflow-y: auto;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard-welcome h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.dashboard-welcome p { font-size: 15px; color: var(--gray-500); }

/* Stat Cards */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-info .value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 2px;
}

.stat-info .label { font-size: 13px; color: var(--gray-400); font-weight: 500; }
.stat-info .change { font-size: 12px; font-weight: 600; margin-top: 4px; }
.stat-info .change.up { color: var(--secondary-dark); }
.stat-info .change.down { color: var(--danger); }

/* ============================================
   CHILD PROFILE CARDS
   ============================================ */
.child-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

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

.child-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.child-info { flex: 1; }
.child-info .child-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--gray-800); margin-bottom: 2px; }
.child-info .child-year { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; }

.child-mini-stats { display: flex; gap: 16px; }
.child-mini-stat { font-size: 13px; color: var(--gray-500); }
.child-mini-stat strong { color: var(--gray-800); }

/* ============================================
   QUESTION CARD (Topic Practice)
   ============================================ */
.question-area {
  max-width: 780px;
  margin: 0 auto;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.question-counter { font-size: 14px; color: var(--gray-400); font-weight: 500; }

.question-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  border: 1px solid var(--gray-100);
}

.question-text {
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.55;
  margin-bottom: 28px;
}

.options-list { display: flex; flex-direction: column; gap: 12px; }

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-700);
  text-align: left;
  transition: var(--transition);
  width: 100%;
  cursor: pointer;
  font-family: var(--font-body);
}

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

.option-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.option-btn.correct { border-color: var(--secondary); background: var(--secondary-light); color: var(--secondary-dark); }

.option-btn.incorrect { border-color: var(--danger); background: var(--danger-light); color: var(--danger); }

.option-label {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  transition: var(--transition);
}

.option-btn.selected .option-label { background: var(--primary); color: white; }
.option-btn.correct .option-label { background: var(--secondary); color: white; }
.option-btn.incorrect .option-label { background: var(--danger); color: white; }

.question-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.explanation-box {
  background: var(--primary-light);
  border: 1px solid rgba(26,111,219,0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  display: none;
}

.explanation-box.show { display: block; }
.explanation-box h4 { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.explanation-box p { font-size: 15px; color: var(--gray-700); line-height: 1.7; }

/* ============================================
   MOCK TEST
   ============================================ */
.test-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.test-header {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border: 1px solid var(--gray-100);
}

.timer-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--gray-800);
}

.timer-display .timer-icon { font-size: 22px; }
.timer-display.warning { color: var(--danger); }

.test-sidebar { }

.nav-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  border: 1px solid var(--gray-100);
}

.nav-panel h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.question-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.q-nav-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--gray-200);
  background: white;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.q-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.q-nav-btn.answered { background: var(--secondary-light); border-color: var(--secondary); color: var(--secondary-dark); }
.q-nav-btn.current { background: var(--primary); border-color: var(--primary); color: white; }
.q-nav-btn.flagged { background: var(--accent-light); border-color: var(--accent); color: #92400e; }

.nav-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-500); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

/* ============================================
   RESULTS PAGE
   ============================================ */
.results-hero {
  text-align: center;
  padding: 48px 24px 36px;
}

.score-circle {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--pct), var(--gray-200) 0);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  position: relative;
}

.score-circle-inner {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.score-pct {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.score-label { font-size: 12px; color: var(--gray-400); font-weight: 600; }

.results-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.breakdown-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.breakdown-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 4px;
}

.breakdown-label { font-size: 14px; color: var(--gray-400); font-weight: 500; }

.answer-review { }

.answer-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.answer-status {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.answer-status.correct { background: var(--secondary-light); color: var(--secondary-dark); }
.answer-status.incorrect { background: var(--danger-light); color: var(--danger); }

.answer-content .q-text { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.answer-content .a-text { font-size: 14px; color: var(--gray-500); }
.answer-content .a-text strong { color: var(--secondary-dark); }
.answer-content .a-wrong { color: var(--danger); }

/* ============================================
   AI HELP PAGE
   ============================================ */
.ai-chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.chat-area {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height) - 96px);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}

.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: white;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.message.user { flex-direction: row-reverse; }

.message-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
}

.message.ai .message-bubble {
  background: var(--gray-100);
  color: var(--gray-800);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-100);
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  resize: none;
  padding: 13px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  max-height: 120px;
  background: var(--gray-50);
}

.chat-input:focus { border-color: var(--primary); background: white; }

.chat-send-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

.ai-sidebar { }

.ai-topics-panel {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.ai-topics-panel h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 14px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 600;
  margin: 4px 4px 4px 0;
  cursor: pointer;
  transition: var(--transition);
}

.topic-chip:hover { background: var(--primary-light); color: var(--primary); }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

.contact-info-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
}

.contact-info-card h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 12px;
}

.contact-info-card p { font-size: 15px; opacity: 0.85; line-height: 1.7; margin-bottom: 32px; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-detail-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-detail-info h4 { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.contact-detail-info p { font-size: 14px; opacity: 0.75; margin-bottom: 0; }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 50%, var(--secondary) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.auth-visual::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.auth-visual-content { position: relative; z-index: 1; text-align: center; }

.auth-visual h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 16px;
  line-height: 1.2;
}

.auth-visual p { font-size: 17px; opacity: 0.85; line-height: 1.7; max-width: 380px; margin: 0 auto; }

.auth-features-list { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; text-align: left; }

.auth-feature { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
.auth-feature .icon { font-size: 20px; }

.auth-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--gray-50);
}

.auth-form-box {
  width: 100%;
  max-width: 440px;
}

.auth-form-box .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 36px;
}

.auth-form-box .brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; font-weight: 900;
}

.auth-form-box h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.auth-form-box .subtitle {
  font-size: 15px;
  color: var(--gray-500);
  margin-bottom: 32px;
}

.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span { font-size: 13px; color: var(--gray-400); font-weight: 500; }

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 12px;
}

.auth-switch a { color: var(--primary); font-weight: 700; }

/* ============================================
   SUBJECTS PAGE
   ============================================ */
.subjects-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
  padding: 60px 0 40px;
}

.topic-list { display: flex; flex-direction: column; gap: 12px; }

.topic-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.topic-item:hover { border-color: var(--primary); transform: translateX(4px); box-shadow: var(--shadow-md); }

.topic-item-icon { font-size: 22px; width: 36px; text-align: center; }

.topic-item-info { flex: 1; }
.topic-item-info h4 { font-weight: 700; font-size: 15px; color: var(--gray-800); margin-bottom: 2px; }
.topic-item-info p { font-size: 13px; color: var(--gray-400); }

.topic-item-progress { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.topic-item-progress .pct { font-size: 13px; font-weight: 700; color: var(--primary); }
.topic-item-progress .mini-bar { width: 80px; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.topic-item-progress .mini-fill { height: 100%; border-radius: 3px; background: var(--primary); }

/* ============================================
   ALERT / NOTIFICATION
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-success { background: var(--secondary-light); color: var(--secondary-dark); border: 1px solid #86efac; }
.alert-warning { background: var(--accent-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #fca5a5; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #93c5fd; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-actions .btn { display: none; }
  .nav-actions .btn:last-child { display: inline-flex; }

  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .hero { padding: 80px 0 60px; }

  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .steps-grid::before { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }

  .test-layout { grid-template-columns: 1fr; }
  .nav-panel { position: static; }

  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }

  .contact-layout { grid-template-columns: 1fr; }

  .ai-chat-layout { grid-template-columns: 1fr; }
  .ai-sidebar { order: -1; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .dashboard-main { padding: 20px 16px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .results-breakdown { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 16px; }

  .steps-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .question-actions { flex-direction: column; }
  .question-actions .btn { width: 100%; }

  .pricing-card { padding: 28px 22px; }

  .auth-form-area { padding: 32px 20px; }

  .test-header { flex-direction: column; gap: 12px; }

  .chat-area { height: calc(100vh - var(--nav-height) - 48px); }
}

/* ============================================
   MOBILE TOUCH & INTERACTIVE FIXES
   ============================================ */

/* Ensure all interactive buttons meet 44px minimum touch target */
@media (max-width: 1024px) {
  /* Hamburger — already fixed above, reinforce here */
  .hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
  }

  /* Action pills (Show steps / Read aloud) */
  .action-pill {
    min-height: 44px;
    padding: 10px 16px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Option buttons in practice and mock test */
  .option-btn,
  .mock-option {
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Submit / Next buttons */
  .btn-lg {
    min-height: 48px;
  }

  /* Nav grid buttons in mock test */
  .q-nav-btn {
    min-width: 36px;
    min-height: 36px;
  }

  /* Expand steps button inside Dr. BM panel */
  .expand-steps-btn {
    min-height: 40px;
    padding: 8px 16px;
    display: inline-flex !important;
  }

  /* Results explanation toggle */
  .ri-explain-toggle {
    min-height: 44px;
    padding: 10px 0;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 640px) {
  /* Action pills stack neatly on small screens */
  .action-pill {
    font-size: 13px;
    padding: 10px 14px;
  }

  /* Dr. BM explainer panel — full width on mobile */
  .explanation-box {
    padding: 16px;
  }

  /* Practice question card padding */
  .q-card {
    padding: 24px 18px;
  }

  /* q-text font size */
  .q-text {
    font-size: 17px;
  }

  /* Option buttons — full comfortable touch area */
  .option-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  /* Results review items */
  .review-item {
    padding: 16px;
  }

  /* Explanation container — better mobile readability */
  .ri-explanation {
    padding: 14px;
    font-size: 14px;
  }

  /* Inline Dr. BM explainer panels (renderStandardDrBmExplainer output) */
  [id^="drbm-"] button,
  [id*="-toggle"],
  [id*="-xbtn"] {
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  /* Mock test options */
  .mock-option {
    padding: 14px 16px;
    min-height: 52px;
  }

  /* Mock test nav buttons */
  .btn-nav,
  .btn-flag {
    min-height: 44px;
    padding: 10px 18px;
  }

  /* Subjects page topic items */
  .topic-item {
    padding: 14px 16px;
  }
}
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary-dark); }
.text-danger { color: var(--danger); }
.text-gray { color: var(--gray-500); }
.text-muted { color: var(--gray-400); }

.fw-bold { font-weight: 700; }
.fw-black { font-weight: 900; font-family: var(--font-display); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
.hidden { display: none !important; }

/* Smooth page load animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
/* ============================================
   DR. BM AI SETTINGS — Parent Controls
   ============================================ */

/* ── Toggle Switch ── */
.ai-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 16px;
}
.ai-toggle-row:last-child { border-bottom: none; }

.ai-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.ai-toggle-label .toggle-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 7px;
}
.ai-toggle-label .toggle-desc {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.5;
}

/* The toggle pill */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--gray-200);
  cursor: pointer;
  transition: background 0.22s cubic-bezier(0.4,0,0.2,1);
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.toggle-switch input:checked + .toggle-track {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(24px);
}
.toggle-switch input:disabled + .toggle-track {
  opacity: 0.45;
  cursor: not-allowed;
}
.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Master toggle row — slightly elevated */
.ai-toggle-row.master {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1.5px solid rgba(26,111,219,0.18);
  margin-bottom: 6px;
}
.ai-toggle-row.master .toggle-title { font-size: 16px; }

/* Sub-toggles indented when parent is off */
.ai-sub-toggles {
  padding-left: 18px;
  border-left: 3px solid var(--gray-200);
  margin-left: 4px;
  transition: opacity 0.2s, filter 0.2s;
}
.ai-sub-toggles.disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.3);
}

/* Per-child selector inside AI settings */
.child-selector-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.child-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-200);
  background: white;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}
.child-tab:hover { border-color: var(--primary); color: var(--primary); }
.child-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.child-tab .tab-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 900;
}

/* AI settings section header */
.ai-settings-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.ai-settings-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ai-settings-header h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.ai-settings-header p {
  font-size: 13px;
  color: var(--gray-400);
}

/* Save confirmation toast */
.settings-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-900);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 3000;
  box-shadow: var(--shadow-xl);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
}
.settings-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   AI FEATURE BUTTONS — Child-facing
   ============================================ */
.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gray-200);
  background: white;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  white-space: nowrap;
}
.ai-action-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}
.ai-action-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.ai-action-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
/* Subtle icon badge when AI is reading */
.ai-action-btn.speaking {
  background: var(--secondary-light);
  color: var(--secondary-dark);
  border-color: var(--secondary);
  animation: speakPulse 1.2s ease-in-out infinite;
}
@keyframes speakPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.35); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* AI disabled notice banner */
.ai-disabled-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--accent-light);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 16px;
}
.ai-disabled-notice .notice-icon { font-size: 18px; flex-shrink: 0; }
.ai-disabled-notice a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* Dr. BM avatar chip shown in explanation box */
.dr-bm-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 5px 13px 5px 7px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}
.dr-bm-chip .chip-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* AI status dot on child dashboard nav */
.ai-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}
.ai-status-dot.on  { background: var(--secondary); box-shadow: 0 0 0 2px var(--secondary-light); }
.ai-status-dot.off { background: var(--gray-300); }
