/* ================= RESET ================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Poppins, sans-serif;
}

html{
  scroll-behavior:smooth;
}

body{
  background:
    radial-gradient(circle at top left, rgba(56,189,248,0.08), transparent 30%),
    linear-gradient(135deg,#020617,#0f172a 45%,#111827);
  color:white;
  min-height:100vh;
}

/* ================= NAVBAR ================= */
.navbar{
  position:sticky;
  top:0;
  z-index:100;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 30px;
  background:rgba(2,6,23,0.82);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(148,163,184,0.12);
}

.logo{
  font-size:22px;
  font-weight:700;
  color:#38bdf8;
}

.nav-links{
  list-style:none;
  display:flex;
  gap:18px;
  align-items:center;
}

.nav-links li a{
  color:#e2e8f0;
  text-decoration:none;
  padding:8px 10px;
  border-radius:8px;
  transition:0.25s ease;
}

.nav-links li a:hover,
.active-link{
  color:#38bdf8;
  background:rgba(56,189,248,0.08);
}

/* ================= HERO ================= */
.dashboard-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  padding:32px 30px 10px;
  max-width:1400px;
  margin:0 auto;
}

.hero-left{
  flex:1;
}

.hero-right{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
}

.hero-tag{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(56,189,248,0.12);
  color:#38bdf8;
  font-size:13px;
  font-weight:600;
  margin-bottom:12px;
}

.dashboard-hero h1{
  font-size:34px;
  margin-bottom:10px;
  color:#f8fafc;
}

.hero-subtext{
  color:#94a3b8;
  max-width:700px;
  line-height:1.6;
  margin-bottom:12px;
}

.dashboard-validity{
  display:inline-block;
  margin-top:4px;
  margin-bottom:12px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(56,189,248,0.10);
  color:#38bdf8;
  font-size:13px;
  font-weight:600;
  border:1px solid rgba(56,189,248,0.22);
}

#welcome{
  color:#cbd5e1;
  font-size:18px;
  font-weight:500;
}

.logout-btn{
  background:linear-gradient(135deg,#38bdf8,#0ea5e9);
  border:none;
  padding:11px 18px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  color:#001018;
  transition:0.25s ease;
  box-shadow:0 10px 24px rgba(56,189,248,0.24);
}

.logout-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(56,189,248,0.32);
}

/* ================= SECTION ================= */
.dashboard-section{
  max-width:1400px;
  margin:0 auto;
  padding:10px 30px 40px;
}

.section-heading{
  margin-bottom:8px;
}

.section-heading h2{
  font-size:24px;
  color:#f8fafc;
  margin-bottom:6px;
}

.section-heading p{
  color:#94a3b8;
  font-size:14px;
}

/* ================= STATS ================= */
.dashboard-stats{
  max-width:1400px;
  margin:22px auto 0;
  padding:0 30px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:20px;
}

.stat-card{
  background:linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.96));
  border:1px solid rgba(148,163,184,0.12);
  border-radius:18px;
  padding:22px;
  box-shadow:0 12px 30px rgba(0,0,0,0.24);
  position:relative;
  overflow:hidden;
}

.stat-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,#38bdf8,#0ea5e9,#22c55e);
}

.stat-card p{
  color:#94a3b8;
  font-size:14px;
  margin-bottom:10px;
}

.stat-card h3{
  font-size:30px;
  color:#f8fafc;
  line-height:1;
}

/* ================= GRID WRAPPERS ================= */
.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
  padding-top:24px;
}

.courses-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
}

/* keep support for id-based layout too */
#courseList,
#quizList,
#testSeriesList{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
  padding:24px 0 0;
}

/* ================= COURSE CARD ================= */
.course-card{
  position:relative;
  background:linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.96));
  padding:22px;
  border-radius:18px;
  cursor:pointer;
  transition:all 0.3s ease;
  box-shadow:0 12px 30px rgba(0,0,0,0.28);
  border:1px solid rgba(148,163,184,0.12);
  overflow:hidden;
}

.course-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg, #38bdf8, #0ea5e9, #22c55e);
}

.course-card:hover{
  transform:translateY(-8px) scale(1.02);
  box-shadow:0 18px 40px rgba(0,0,0,0.4);
  border-color:rgba(56,189,248,0.35);
}

.course-card h3{
  margin-bottom:12px;
  font-size:21px;
  color:#f8fafc;
  line-height:1.4;
}

.course-card p{
  color:#94a3b8;
  margin:7px 0;
  font-size:14px;
  line-height:1.5;
}

.course-validity{
  display:inline-block;
  margin-top:8px;
  margin-bottom:10px;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(56,189,248,0.10);
  color:#38bdf8 !important;
  font-size:13px;
  font-weight:600;
  border:1px solid rgba(56,189,248,0.22);
}

.free,
.paid,
.locked{
  display:inline-block;
  margin-top:4px;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
}

.free{
  color:#22c55e;
  background:rgba(34,197,94,0.12);
  border:1px solid rgba(34,197,94,0.25);
}

.paid{
  color:#f97316;
  background:rgba(249,115,22,0.12);
  border:1px solid rgba(249,115,22,0.25);
}

.locked{
  color:#ef4444;
  background:rgba(239,68,68,0.12);
  border:1px solid rgba(239,68,68,0.25);
}

.locked-card{
  opacity:0.78;
  border:1px solid rgba(239,68,68,0.35);
}

.locked-card::before{
  background:linear-gradient(90deg, #ef4444, #f97316);
}

.course-card button{
  margin-top:16px;
  padding:11px 15px;
  border-radius:10px;
  border:none;
  background:linear-gradient(135deg, #3b82f6, #2563eb);
  color:white;
  cursor:pointer;
  font-weight:600;
  transition:0.3s;
  box-shadow:0 8px 18px rgba(37,99,235,0.28);
}

.course-card button:hover{
  transform:translateY(-2px);
  background:linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow:0 12px 24px rgba(37,99,235,0.34);
}

.progress-bar{
  background:#020617;
  height:10px;
  border-radius:999px;
  overflow:hidden;
  margin-top:14px;
  border:1px solid rgba(148,163,184,0.08);
}

.progress{
  background:linear-gradient(90deg, #38bdf8, #0ea5e9);
  height:100%;
  border-radius:999px;
  transition:width 0.4s ease;
}

.course-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
  font-size:13px;
  color:#cbd5e1;
}

/* ================= SPECIAL MENTORSHIP CARD ================= */
.mentorship-card-special::before{
  background:linear-gradient(90deg,#a855f7,#38bdf8,#22c55e);
}

.mentorship-card-special{
  border:1px solid rgba(168,85,247,0.28);
}

.mentorship-card-special:hover{
  border-color:rgba(168,85,247,0.42);
}

/* ================= MENTORSHIP BOOKINGS ================= */
#mentorshipBookings{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:20px;
  margin-top:18px;
}

.mentorship-booking-card{
  background:linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.96));
  border:1px solid rgba(168,85,247,0.28);
  border-radius:18px;
  padding:20px;
  box-shadow:0 12px 28px rgba(0,0,0,0.25);
  position:relative;
  overflow:hidden;
}

.mentorship-booking-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,#a855f7,#38bdf8,#22c55e);
}

.mentorship-booking-card h3{
  color:#f8fafc;
  margin-bottom:10px;
  font-size:20px;
}

.mentorship-booking-card p{
  color:#cbd5e1;
  margin:8px 0;
  font-size:14px;
  line-height:1.5;
}

.booking-status{
  display:inline-block;
  margin-top:10px;
  padding:6px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
  background:rgba(34,197,94,0.12);
  color:#22c55e;
  border:1px solid rgba(34,197,94,0.28);
}

/* ================= EMPTY / MESSAGE CARDS ================= */
.empty-card{
  background:linear-gradient(180deg, rgba(30,41,59,0.96), rgba(15,23,42,0.96));
  border:1px dashed rgba(148,163,184,0.25);
  border-radius:18px;
  padding:22px;
  color:#94a3b8;
  text-align:center;
}

/* ================= MOBILE ================= */
@media (max-width: 768px){
  .navbar{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
    padding:14px 18px;
  }

  .nav-links{
    flex-wrap:wrap;
    gap:10px;
  }

  .dashboard-hero{
    flex-direction:column;
    padding:24px 18px 8px;
  }

  .dashboard-hero h1{
    font-size:28px;
  }

  .hero-right{
    width:100%;
  }

  .dashboard-section{
    padding:10px 18px 30px;
  }

  .dashboard-stats{
    gap:16px;
    margin-top:18px;
    padding:0 18px;
  }

  .dashboard-grid,
  .courses-grid,
  #courseList,
  #quizList,
  #testSeriesList{
    gap:16px;
    padding-top:20px;
  }

  .course-card,
  .stat-card,
  .mentorship-booking-card{
    padding:18px;
    border-radius:16px;
  }

  .course-card h3{
    font-size:19px;
  }

  .course-card button,
  .logout-btn{
    width:100%;
  }

  .course-meta{
    flex-direction:column;
    align-items:flex-start;
  }
}