/* ============================================
   GLOBAL RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: #0f1629;
  color: #e2e8f0;
  min-height: 100vh;
}

body.app-mode {
  background: #f3f4f8;
  color: #1a1a2e;
  padding: 30px;
}

.card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8ef;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* TOP NAV */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(15, 23, 41, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.3s;
}

.top-nav.scrolled {
  background: rgba(10, 15, 30, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f5f9;
  font-size: 18px;
  font-weight: 700;
}

.nav-brand i {
  color: #6c3ce0;
  font-size: 22px;
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.login-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #6c3ce0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.logout-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ============================================
   AUTH MODAL
   ============================================ */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.auth-modal-content {
  position: relative;
  background: #13182b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.auth-modal-close:hover {
  color: #fff;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-modal-icon {
  font-size: 32px;
  color: #6c3ce0;
  margin-bottom: 16px;
}

.auth-modal-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.auth-modal-header p {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

.auth-field {
  margin-bottom: 20px;
}

.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.auth-field input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  outline: none;
}

.auth-field input:focus {
  border-color: #6c3ce0;
  background: rgba(108,60,224,0.05);
  box-shadow: 0 0 0 3px rgba(108,60,224,0.15);
}

.auth-field input::placeholder {
  color: rgba(255,255,255,0.25);
}

.auth-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6c3ce0, #5b21b6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(108,60,224,0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.auth-switch button {
  background: none;
  border: none;
  color: #a78bfa;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  margin-left: 4px;
}

.auth-switch button:hover {
  color: #6c3ce0;
}

.brand-highlight {
  color: #a78bfa;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

/* ============================================
   LANDING PAGE
   ============================================ */

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 40px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(108,60,224,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,60,224,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6c3ce0, transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: -10%;
  left: -5%;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #22c55e, transparent 70%);
  top: 40%;
  left: 50%;
  animation-delay: -5s;
}

.orb-4 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #6c3ce0, transparent 70%);
  top: -20%;
  left: -10%;
}

.orb-5 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(167,139,250,0.18);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 50px;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #c4b5fd, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #6c3ce0, #5b21b6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(108,60,224,0.4);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,60,224,0.5);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.cta-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}

.cta-large {
  padding: 18px 40px;
  font-size: 17px;
  border-radius: 14px;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.trust-avatars {
  display: flex;
}

.trust-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border: 2px solid #0a0f1e;
  margin-left: -8px;
}

.trust-avatar:first-child {
  margin-left: 0;
}

.trust-text {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 40px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* Section Headers */
.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 16px;
  margin-bottom: 56px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Features */
.features {
  padding: 100px 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.4s;
}

.feature-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.feature-card p {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  line-height: 1.7;
}

/* Curriculum Timeline */
.curriculum {
  padding: 100px 40px;
  background: rgba(255,255,255,0.01);
}

.curriculum-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.curriculum-timeline::before {
  content: '';
  position: absolute;
  left: 52px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #6c3ce0, #3b82f6, #22c55e, #f59e0b);
}

.timeline-item {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-week {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(108,60,224,0.15);
  border: 2px solid rgba(108,60,224,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  flex-shrink: 0;
  z-index: 1;
  padding-top: 2px;
}

.timeline-content {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  flex: 1;
  transition: all 0.3s;
}

.timeline-content:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(167,139,250,0.4);
}

.timeline-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.timeline-content p {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.timeline-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-meta span {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.badge-live {
  background: rgba(108,60,224,0.2) !important;
  color: #a78bfa !important;
}

.badge-upcoming {
  background: rgba(59,130,246,0.15) !important;
  color: #60a5fa !important;
}

/* Testimonials */
.testimonials {
  padding: 100px 40px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.06);
}

.testimonial-stars {
  font-size: 16px;
  margin-bottom: 16px;
}

.testimonial-card p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

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

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.testimonial-author strong {
  color: #fff;
  font-size: 14px;
}

.testimonial-author small {
  color: rgba(255,255,255,0.4);
}

/* Founder Section */
.founder-section {
  padding: 100px 40px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.founder-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 48px 40px;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  gap: 36px;
  text-align: left;
  margin-top: 48px;
  box-shadow: 0 0 40px rgba(167,139,250,0.08);
  transition: border-color 0.4s;
}

.founder-card:hover {
  border-color: rgba(167,139,250,0.35);
}

.founder-avatar {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 30px rgba(167,139,250,0.3);
}

.founder-info {
  flex: 1;
  min-width: 0;
}

.founder-name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.founder-name-row h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.linkedin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #0077b5;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.linkedin-btn:hover {
  background: #005f8d;
  transform: scale(1.1);
}

.founder-role {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
  font-weight: 500;
}

.founder-bio p {
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.founder-bio p:last-child {
  margin-bottom: 0;
}

/* Partnership Banner */
.partnership-banner {
  margin-top: 40px;
  padding: 28px 36px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(167,139,250,0.1), rgba(6,182,212,0.08));
  border: 1px solid rgba(167,139,250,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.partnership-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #a78bfa, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.partnership-banner p {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
  line-height: 1.6;
}

.partnership-banner strong {
  color: #e2e8f0;
}

/* Founder section responsive */
@media (max-width: 700px) {
  .founder-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 24px;
    gap: 24px;
  }

  .founder-name-row {
    justify-content: center;
  }

  .founder-avatar {
    width: 90px;
    height: 90px;
    font-size: 30px;
  }

  .founder-section {
    padding: 80px 20px;
  }

  .partnership-banner {
    flex-direction: column;
    padding: 24px 20px;
    gap: 12px;
  }
}

/* Final CTA */
.final-cta {
  position: relative;
  padding: 120px 40px;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-content h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.cta-content p {
  color: rgba(255,255,255,0.75);
  font-size: 16px;
  margin-bottom: 36px;
}

/* Footer */
.landing-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand i {
  color: #6c3ce0;
}

.footer-text {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Landing Responsive */
@media (max-width: 768px) {
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-bar {
    flex-wrap: wrap;
    gap: 24px;
  }
  
  .stat-divider {
    display: none;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 120px 20px 60px;
  }
  
  .top-nav {
    padding: 12px 20px;
  }
  
  .curriculum-timeline::before {
    left: 32px;
  }
  
  .timeline-week {
    width: 56px;
    height: 56px;
    font-size: 11px;
  }
}

/* ============================================
   DASHBOARD — COURSES HEADER
   ============================================ */
#dashboard-view {
  padding-top: 80px;
}

#course-detail-view {
  padding-top: 80px;
}

#course-view {
  padding-top: 80px;
}

.courses-container {
  padding: 28px;
}

.courses-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.courses-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-right: auto;
}

/* Filter Pills */
.courses-filters {
  display: flex;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  overflow: hidden;
}

.filter-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:not(:last-child) {
  border-right: 1px solid #e0e0e8;
}

.filter-btn.active {
  background: #6c3ce0;
  color: #fff;
}

.filter-btn:hover:not(.active) {
  background: #f3f0ff;
  color: #6c3ce0;
}

/* Category Dropdown & View Toggle */
.courses-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-dropdown {
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  background: #fff;
  color: #333;
  cursor: pointer;
  outline: none;
}

.category-dropdown:focus {
  border-color: #6c3ce0;
}

.view-toggle {
  display: flex;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  overflow: hidden;
}

.toggle-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #fff;
  color: #888;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.toggle-btn:not(:last-child) {
  border-right: 1px solid #e0e0e8;
}

.toggle-btn.active {
  background: #1a1a2e;
  color: #fff;
}

.toggle-btn:hover:not(.active) {
  background: #f5f5f7;
}

/* ============================================
   DASHBOARD — COURSE CARDS GRID
   ============================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.course-card {
  border-radius: 14px;
  border: 1px solid #e8e8ef;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card Image Area */
.card-image {
  height: 160px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-badge.live {
  background: #6c3ce0;
  color: #fff;
}

.card-badge.upcoming {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-badge.completed {
  background: #22c55e;
  color: #fff;
}

.card-emoji {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-size: 48px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Card Info Area */
.card-info {
  padding: 18px;
}

.card-week-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #1a1a2e;
}

.card-course-name {
  font-size: 13px;
  color: #777;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Progress Bar */
.progress-wrapper {
  margin-bottom: 14px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
  margin-bottom: 6px;
  font-weight: 500;
}

.progress-bar {
  height: 6px;
  background: #e8e8ef;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-fill.green {
  background: #22c55e;
}

.progress-fill.blue {
  background: #6c3ce0;
}

/* Card Meta Footer */
.card-meta {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f5;
  font-size: 12px;
  color: #888;
}

.card-meta span i {
  margin-right: 4px;
  font-size: 11px;
}

/* ============================================
   COURSE VIEW — BACK BUTTON
   ============================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #6c3ce0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 6px 0;
  transition: all 0.2s;
}

.back-btn:hover {
  text-decoration: underline;
}

/* ============================================
   COURSE VIEW — 3 PANEL LAYOUT
   ============================================ */
.course-view-container {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 20px;
  align-items: start;
}

/* ============================================
   LEFT SIDEBAR
   ============================================ */
.sidebar-panel {
  max-height: 650px;
  overflow-y: auto;
  padding: 20px;
}

.sidebar-panel::-webkit-scrollbar {
  width: 4px;
}

.sidebar-panel::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-panel::-webkit-scrollbar-thumb {
  background: #d0d0d8;
  border-radius: 4px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8ef;
  margin-bottom: 14px;
}

/* Week headers */
.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  cursor: pointer;
  padding: 10px 0;
  user-select: none;
  transition: color 0.2s;
}

.week-header:hover {
  color: #6c3ce0;
}

.week-header .chevron {
  font-size: 11px;
  transition: transform 0.25s ease;
  color: #aaa;
}

.week-header.collapsed .chevron {
  transform: rotate(-90deg);
}

.week-content {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.week-content.collapsed {
  max-height: 0 !important;
  overflow: hidden;
}

/* Module headers */
.module-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  padding: 8px 0 4px 12px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.module-header:hover {
  color: #6c3ce0;
}

.module-header .caret {
  font-size: 9px;
  transition: transform 0.25s ease;
  color: #aaa;
}

.module-header.collapsed .caret {
  transform: rotate(-90deg);
}

.module-lessons {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.module-lessons.collapsed {
  max-height: 0 !important;
  overflow: hidden;
}

/* Lesson items */
.lesson-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 50px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.2s;
}

.lesson-item:hover {
  background: #f8f7ff;
}

.lesson-item.current {
  border-left-color: #6c3ce0;
  background: #f3f0ff;
  color: #6c3ce0;
  font-weight: 600;
}

.lesson-item.completed .lesson-check {
  color: #6c3ce0;
}

.lesson-icon {
  font-size: 12px;
  color: #bbb;
  width: 16px;
  text-align: center;
}

.lesson-item.current .lesson-icon {
  color: #6c3ce0;
}

.lesson-check {
  margin-left: auto;
  font-size: 12px;
  color: #ddd;
}

/* ============================================
   CENTER — LESSON PANEL
   ============================================ */
.lesson-panel {
  padding: 0;
  overflow: hidden;
}

.lesson-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e8e8ef;
}

.lesson-content-title {
  font-size: 14px;
  font-weight: 600;
  color: #888;
}

.slide-counter {
  font-size: 12px;
  font-weight: 600;
  color: #6c3ce0;
  background: #f3f0ff;
  padding: 4px 12px;
  border-radius: 20px;
}

.lesson-main-title {
  font-size: 20px;
  font-weight: 700;
  padding: 20px 24px 0;
  color: #1a1a2e;
}

/* ============================================
   SLIDE VIEWER
   ============================================ */
.slide-viewer {
  background: #0f1729;
  border-radius: 12px;
  margin: 16px 24px;
  overflow: hidden;
}

.slide-content {
  min-height: 280px;
  padding: 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.slide-body {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.slide-body ul,
.slide-body ol {
  padding-left: 20px;
  margin-top: 10px;
}

.slide-body li {
  margin-bottom: 6px;
}

.slide-body strong {
  color: #fff;
}

.slide-body code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.slide-visual {
  margin-top: 20px;
  padding: 20px;
  background: #f5f3ff;
  border-radius: 12px;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.6;
}

.slide-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.slide-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.slide-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slide-dots {
  display: flex;
  gap: 6px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.slide-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.slide-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Narration Controls */
.narration-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 16px;
  justify-content: center;
}

.narrate-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #6c3ce0;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.narrate-btn:hover {
  background: #7c4dff;
  transform: scale(1.08);
}

.narrate-stop {
  background: #dc2626;
}

.narrate-stop:hover {
  background: #ef4444;
}

.narrate-progress {
  flex: 1;
  max-width: 200px;
}

.narrate-bar {
  height: 4px;
  background: rgba(108,60,224,0.2);
  border-radius: 4px;
  overflow: hidden;
}

.narrate-bar-fill {
  height: 100%;
  background: #6c3ce0;
  border-radius: 4px;
  width: 0%;
}

.narrate-lang {
  background: #f3f4f8;
  border: 1px solid #e0e0e8;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: #1a1a2e;
}

/* ============================================
   LESSON TABS
   ============================================ */
.lesson-tabs {
  display: flex;
  border-bottom: 1px solid #e8e8ef;
  padding: 0 24px;
}

.tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #888;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.tab:hover {
  color: #6c3ce0;
}

.tab.active {
  color: #6c3ce0;
  border-bottom-color: #6c3ce0;
}

.tab-content {
  padding: 20px 24px;
  min-height: 120px;
}

/* Overview Tab */
.objectives-list {
  list-style: none;
  padding: 0;
}

.objectives-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}

.objectives-list li i {
  color: #6c3ce0;
  margin-top: 3px;
  font-size: 13px;
  flex-shrink: 0;
}

/* Notes Tab */
.notes-content {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

.notes-content p {
  margin-bottom: 14px;
}

/* Resources Tab */
.resources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.resource-card:hover {
  border-color: #6c3ce0;
  background: #faf8ff;
}

.resource-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.resource-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
}

.resource-type {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   RIGHT — AI PLAYGROUND
   ============================================ */
.playground-panel {
  padding: 0;
  overflow: hidden;
}

.playground-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8ef;
}

.playground-title {
  font-size: 15px;
  font-weight: 700;
  color: #6c3ce0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.playground-content {
  padding: 20px;
}

.playground-label {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  margin-top: 18px;
}

.playground-label:first-of-type {
  margin-top: 0;
}

.playground-task {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 8px;
}

/* Hint */
.exercise-hint {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  font-style: italic;
  color: #92400e;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.exercise-hint i {
  color: #f59e0b;
  margin-top: 2px;
}

.btn-hint {
  background: none;
  border: 1px solid #e0e0e8;
  color: #777;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 4px;
}

.btn-hint:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Prompt Input */
.playground-input {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}

.playground-input:focus {
  border-color: #6c3ce0;
  box-shadow: 0 0 0 3px rgba(108, 60, 224, 0.1);
}

/* Run Button */
.btn-run {
  width: 100%;
  padding: 10px 18px;
  background: #6c3ce0;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-run:hover {
  background: #5a2ec4;
}

.btn-run:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-run.loading {
  background: #7c52e8;
  pointer-events: none;
}

/* AI Output */
.playground-output {
  min-height: 80px;
  max-height: 260px;
  overflow-y: auto;
  background: #f8f8fc;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

.playground-output h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #1a1a2e;
}

.playground-output ul,
.playground-output ol {
  padding-left: 18px;
  margin: 6px 0;
}

.playground-output li {
  margin-bottom: 4px;
}

.placeholder-text {
  color: #bbb;
  font-style: italic;
}

/* Playground Actions */
.playground-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-save {
  flex: 1;
  padding: 10px;
  background: #fff;
  color: #6c3ce0;
  border: 1px solid #6c3ce0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-save:hover {
  background: #f3f0ff;
}

.btn-submit {
  flex: 1;
  padding: 10px;
  background: #6c3ce0;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: #5a2ec4;
}

.btn-submit.submitted {
  background: #22c55e;
  pointer-events: none;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
#toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1a1a2e;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.35s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  border-left: 4px solid #22c55e;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.info {
  border-left: 4px solid #3b82f6;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(60px);
  }
}

/* ============================================
   SLIDE TRANSITIONS
   ============================================ */
.slide-content.fade-in {
  animation: slideFadeIn 0.35s ease forwards;
}

.slide-content.fade-out {
  animation: slideFadeOut 0.2s ease forwards;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .course-view-container {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    max-height: none;
  }
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

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

  .courses-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .courses-header h2 {
    margin-right: 0;
  }
}

/* ============================================
   ADMIN VIEW
   ============================================ */
#admin-view {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 80px;
}

.admin-container {
  padding: 32px;
}

.admin-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 24px;
}

.admin-form {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e0e0e8;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.admin-input:focus {
  border-color: #6c3ce0;
}

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

.admin-user-table th {
  text-align: left;
  padding: 12px 16px;
  background: #f3f4f8;
  color: #555;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e8;
}

.admin-user-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f5;
  color: #333;
}

.admin-user-table tr:nth-child(even) {
  background: #fafafa;
}

.admin-user-table tr:hover {
  background: #f3f0ff;
}

.access-yes {
  color: #10b981;
  font-weight: 600;
}

.access-no {
  color: #999;
}

.grant-btn {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.grant-btn:hover {
  background: #0d9668;
}

.revoke-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.revoke-btn:hover {
  background: #dc2626;
}

.admin-nav-btn {
  background: transparent;
  border: 1px solid rgba(108, 60, 224, 0.3);
  color: #6c3ce0;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 12px;
  transition: all 0.2s;
}

body:not(.app-mode) .admin-nav-btn {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.3);
}

.admin-nav-btn:hover {
  background: rgba(108, 60, 224, 0.1);
}

/* ============================================
   ANALYTICS DASHBOARD
   ============================================ */
.analytics-section {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 28px;
  background: #1a1a2e;
  border-radius: 16px;
  border: 1px solid rgba(108, 60, 224, 0.25);
}

.analytics-section .admin-title {
  color: #e0e0ff;
  margin-bottom: 16px;
}

.analytics-period {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.analytics-period select {
  background: #16213e;
  color: #e0e0ff;
  border: 1px solid rgba(108, 60, 224, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.analytics-refresh-btn {
  background: rgba(108, 60, 224, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(108, 60, 224, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.analytics-refresh-btn:hover {
  background: rgba(108, 60, 224, 0.4);
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.analytics-card {
  background: #16213e;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s;
}

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

.analytics-card-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.analytics-card-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.analytics-card-label {
  font-size: 0.78rem;
  color: #8888aa;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analytics-charts-row {
  margin-bottom: 20px;
}

.analytics-chart-card,
.analytics-table-card {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-chart-card h3,
.analytics-table-card h3 {
  color: #c4b5fd;
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-weight: 600;
}

.analytics-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-top: 10px;
}

.analytics-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.analytics-bar-value {
  font-size: 0.72rem;
  color: #c4b5fd;
  margin-bottom: 4px;
  font-weight: 600;
}

.analytics-bar {
  width: 100%;
  max-width: 48px;
  background: linear-gradient(180deg, #6c3ce0, #06b6d4);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.analytics-bar-label {
  font-size: 0.68rem;
  color: #8888aa;
  margin-top: 6px;
  white-space: nowrap;
}

.analytics-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.analytics-table th {
  text-align: left;
  padding: 8px 12px;
  color: #8888aa;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.analytics-table td {
  padding: 8px 12px;
  color: #ddd;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.analytics-table tr:hover {
  background: rgba(108, 60, 224, 0.08);
}

.analytics-empty {
  color: #666;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

.analytics-recent-list {
  max-height: 320px;
  overflow-y: auto;
}

.analytics-event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.analytics-event-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}

.analytics-event-user {
  color: #aaa;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-event-time {
  color: #666;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Scrollbar for recent activity */
.analytics-recent-list::-webkit-scrollbar {
  width: 5px;
}
.analytics-recent-list::-webkit-scrollbar-track {
  background: transparent;
}
.analytics-recent-list::-webkit-scrollbar-thumb {
  background: rgba(108, 60, 224, 0.3);
  border-radius: 3px;
}

@media (max-width: 700px) {
  .analytics-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-tables-row {
    grid-template-columns: 1fr;
  }
  .analytics-section {
    padding: 16px;
    margin: 0 8px 16px;
  }
}

/* ===============================================
   COMMUNITY DISCUSSIONS
   =============================================== */
#community-view {
  padding-top: 80px;
  min-height: 100vh;
}

.community-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.community-header {
  margin-bottom: 24px;
}

.community-header h2 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.community-header h2 i {
  color: #6c3ce0;
  margin-right: 8px;
}

.community-course-tabs {
  display: flex;
  gap: 8px;
}

.community-tab {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(108, 60, 224, 0.3);
  background: rgba(108, 60, 224, 0.1);
  color: #ccc;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.community-tab.active {
  background: linear-gradient(135deg, #6c3ce0, #8b5cf6);
  color: #fff;
  border-color: transparent;
}

.community-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #6c3ce0, #8b5cf6);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
}

.community-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 60, 224, 0.4);
}

.community-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 1rem;
}

/* Thread list */
.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid #6c3ce0;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.thread-card:hover {
  background: rgba(108, 60, 224, 0.08);
  transform: translateX(4px);
  border-left-color: #06b6d4;
}

.thread-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.thread-info {
  flex: 1;
  min-width: 0;
}

.thread-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-meta {
  color: #888;
  font-size: 0.82rem;
  margin: 0;
}

.thread-author {
  color: #06b6d4;
  font-weight: 500;
}

.thread-reply-count {
  color: #10b981;
}

.thread-activity {
  flex-shrink: 0;
}

.thread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: rgba(108, 60, 224, 0.2);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Thread detail */
.community-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #aaa;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.2s, border-color 0.2s;
}

.community-back-btn:hover {
  color: #fff;
  border-color: #6c3ce0;
}

.thread-detail-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.thread-detail-title {
  color: #fff;
  font-size: 1.4rem;
  margin: 0 0 8px;
}

.thread-detail-meta {
  color: #888;
  font-size: 0.85rem;
  margin: 0 0 16px;
}

.thread-detail-body {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Replies */
.thread-replies-section {
  margin-top: 8px;
}

.replies-heading {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.replies-empty {
  text-align: center;
  color: #888;
  padding: 24px;
  font-size: 0.9rem;
}

.reply-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 10px;
}

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

.reply-author {
  color: #06b6d4;
  font-weight: 600;
  font-size: 0.88rem;
}

.reply-date {
  color: #666;
  font-size: 0.8rem;
}

.reply-body {
  color: #bbb;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Reply / New discussion form */
.reply-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.community-form-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 28px;
}

.community-form-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin: 0 0 20px;
}

.community-form-card h3 i {
  color: #6c3ce0;
  margin-right: 8px;
}

.community-field {
  margin-bottom: 16px;
}

.community-field label {
  display: block;
  color: #aaa;
  font-size: 0.85rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.community-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.community-input:focus {
  outline: none;
  border-color: #6c3ce0;
}

.community-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.community-textarea:focus {
  outline: none;
  border-color: #6c3ce0;
}

.community-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.community-cancel-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #aaa;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.community-cancel-btn:hover {
  color: #fff;
  border-color: #fff;
}

.community-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #6c3ce0, #8b5cf6);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.community-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 60, 224, 0.4);
}

.community-nav-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(108, 60, 224, 0.4);
  background: rgba(108, 60, 224, 0.15);
  color: #a78bfa;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s, color 0.2s;
}

.community-nav-btn:hover {
  background: rgba(108, 60, 224, 0.3);
  color: #fff;
}

@media (max-width: 600px) {
  .community-container {
    padding: 0 12px 32px;
  }
  .thread-card {
    padding: 12px 14px;
  }
  .thread-detail-card {
    padding: 16px;
  }
  .community-form-card {
    padding: 18px;
  }
  .community-form-actions {
    flex-direction: column;
  }
}

/* ============ ENROLLMENT & BATCH MANAGEMENT ============ */

.enroll-form, .batch-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.enroll-form .admin-input,
.batch-create-form .admin-input {
  flex: 1;
  min-width: 180px;
}

.batch-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.batch-date-field label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  white-space: nowrap;
}

.batch-date-field input[type="date"] {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  color-scheme: dark;
}

.enroll-credentials-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
}

.enroll-credentials-card h3 {
  margin: 0 0 14px 0;
  font-size: 1.05rem;
  color: #10b981;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.95rem;
}

.cred-label {
  color: rgba(255,255,255,0.5);
  min-width: 80px;
  font-weight: 500;
}

.cred-value {
  color: #fff;
  background: rgba(255,255,255,0.06);
  padding: 4px 12px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}

.copy-creds-btn {
  margin-top: 14px;
  background: linear-gradient(135deg, #6c3ce0, #06b6d4);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.copy-creds-btn:hover {
  opacity: 0.85;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.batch-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
  transition: border-color 0.2s;
}

.batch-card:hover {
  border-color: rgba(108, 60, 224, 0.3);
}

.batch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.batch-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #fff;
}

.batch-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.batch-status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.batch-status-expired {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.batch-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
}

.batch-card-info i {
  margin-right: 4px;
  color: #6c3ce0;
}

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

.batch-toggle-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.2s;
}

.batch-toggle-btn:hover {
  background: rgba(255,255,255,0.1);
}

.batch-add-member {
  display: flex;
  gap: 6px;
  flex: 1;
}

.batch-member-input {
  flex: 1;
  min-width: 140px;
  padding: 6px 10px !important;
  font-size: 0.85rem !important;
}

.batch-add-btn {
  padding: 6px 12px !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
}

.batch-members-list {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
}

.batch-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.batch-members-table th {
  text-align: left;
  padding: 6px 10px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.batch-members-table td {
  padding: 8px 10px;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.batch-remove-btn {
  padding: 4px 8px !important;
  font-size: 0.78rem !important;
  min-width: auto !important;
}

@media (max-width: 600px) {
  .batch-grid {
    grid-template-columns: 1fr;
  }
  .enroll-form, .batch-create-form {
    flex-direction: column;
  }
  .batch-add-member {
    flex-direction: column;
  }
}
