/* =============================================
   DASHBOARD PAGE STYLES
   ============================================= */

.dash-header {
  background: linear-gradient(160deg, #ffffff 0%, #F8F3FF 60%, #FDE8F5 100%);
  padding: calc(var(--nav-height) + 48px) 0 48px;
}
.dash-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.dash-header-text .section-title { text-align: left; margin-bottom: 8px; }
.dash-header-text .section-sub { text-align: left; margin: 0; }
.dash-header-text .section-badge { margin-bottom: 12px; }

/* STREAK CARD */
.streak-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  min-width: 320px;
  flex-shrink: 0;
}
.streak-icon { font-size: 2.5rem; }
.streak-info { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.streak-count {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.streak-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.streak-calendar { display: flex; gap: 6px; align-items: flex-end; }
.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.streak-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}
.streak-day.active .streak-dot {
  background: var(--gradient-main);
  box-shadow: 0 0 8px rgba(157,78,221,0.5);
}
.streak-label-day { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }

/* FILTER BAR */
.filter-bar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.filter-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--primary); background: var(--gradient-soft); }
.filter-btn.active { background: var(--gradient-main); color: #fff; border-color: transparent; box-shadow: 0 4px 16px rgba(123,47,190,0.28); }

/* LESSONS GRID */
.lessons-section { background: var(--bg-soft); }
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.lesson-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.lesson-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: var(--transition);
}
.lesson-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.lesson-card:hover::before { opacity: 1; }

.lesson-card.coming-soon { opacity: 0.7; cursor: not-allowed; }
.lesson-card.coming-soon:hover { transform: none; box-shadow: none; border-color: var(--border); }
.lesson-card.coming-soon:hover::before { opacity: 0; }

.coming-soon-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  border-radius: var(--radius-lg);
}

.lesson-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 8px; flex-wrap: wrap; }
.lesson-cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.lesson-cat-badge.fundamental { background: #EDE9FE; color: #6D28D9; }
.lesson-cat-badge.math { background: #FDF2F8; color: #BE185D; }
.lesson-cat-badge.cs-advanced { background: #EFF6FF; color: #1D4ED8; }
.lesson-cat-badge.ml { background: #ECFDF5; color: #065F46; }
.lesson-cat-badge.data-eng { background: #FFF7ED; color: #C2410C; }
.lesson-cat-badge.cloud { background: #F0F9FF; color: #0369A1; }
.lesson-cat-badge.bigdata { background: #F0FDF4; color: #166534; }

.lesson-difficulty { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.lesson-difficulty.beginner { color: #22c55e; }
.lesson-difficulty.intermediate { color: #f59e0b; }
.lesson-difficulty.advanced { color: #ef4444; }

.lesson-icon { font-size: 2.4rem; margin-bottom: 14px; }
.lesson-title { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; line-height: 1.4; }
.lesson-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.lesson-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-bottom: 14px; flex-wrap: wrap; }
.lesson-progress-bar { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; }
.lesson-progress-fill { height: 100%; background: var(--gradient-main); border-radius: 999px; transition: width 0.5s ease; }

/* HIDDEN (filtered out) */
.lesson-card.hidden { display: none; }

/* DASH CTA */
.dash-cta { background: var(--bg-white); }
.dash-cta-card {
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, #7B2FBE 0%, #C2185B 100%);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  overflow: hidden;
  position: relative;
}
.dash-cta-card::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.dash-cta-char {
  height: 200px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.2));
  animation: float 5s ease-in-out infinite;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.dash-cta-text { position: relative; z-index: 1; }
.dash-cta-text h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: #fff; line-height: 1.4; margin-bottom: 10px; }
.dash-cta-text p { color: rgba(255,255,255,0.8); font-size: 1rem; }

@media (max-width: 768px) {
  .dash-header-content { flex-direction: column; align-items: flex-start; }
  .streak-card { min-width: 100%; width: 100%; }
  .lessons-grid { grid-template-columns: 1fr; }
  .dash-cta-card { flex-direction: column; text-align: center; padding: 40px 28px; }
  .dash-cta-char { height: 150px; }
}

/* COMING SOON SECTION */
.coming-soon-section { margin-top: 48px; }
.coming-soon-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.coming-soon-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* LOADING SPINNER */
.lessons-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
