/* ==========================================================================
   PakARQ CodeQuest - Dashboard & Roadmap Progression
   Matches PakARQ Website Aesthetics (Rafenthic Purple Theme)
   ========================================================================== */

.dashboard-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.welcome-card {
  background: #ffffff;
  border: 1.5px solid var(--purple-100);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px -10px rgba(106, 28, 255, 0.08);
}

.welcome-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(124, 28, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-greeting {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-family: var(--font-heading);
}

.welcome-sub {
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  max-width: 620px;
}

/* XP Bar Component */
.xp-meter-container {
  margin-top: 1.25rem;
}

.xp-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink-2);
}

.xp-meter-track {
  height: 12px;
  background: var(--purple-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--purple-200);
}

.xp-meter-fill {
  height: 100%;
  background: var(--grad-purple);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(124, 28, 255, 0.4);
}

/* Streak & Quick Stat Cards */
.stats-sidebar-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-metric-card {
  background: #ffffff;
  border: 1.5px solid var(--purple-100);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 6px 20px rgba(42, 10, 94, 0.04);
  transition: all 0.25s ease;
}
.stat-metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--purple-300);
  box-shadow: 0 10px 25px rgba(106, 28, 255, 0.1);
}

.stat-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.stat-metric-icon.fire { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.stat-metric-icon.trophy { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.stat-metric-icon.check { background: rgba(16, 185, 129, 0.12); color: #059669; }

.stat-metric-info h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 0.2rem;
  font-weight: 800;
}

.stat-metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-heading);
}

/* Roadmap Grid */
.roadmap-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.roadmap-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.level-card {
  background: #ffffff;
  border: 1.5px solid var(--purple-100);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(42, 10, 94, 0.04);
}

.level-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple-300);
  box-shadow: 0 15px 35px rgba(106, 28, 255, 0.12);
}

.level-card.locked {
  opacity: 0.55;
  filter: grayscale(0.5);
  pointer-events: none;
  background: var(--purple-50);
}

.level-card.active {
  border-color: var(--purple-500);
  box-shadow: 0 0 20px rgba(124, 28, 255, 0.2);
}

.level-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.level-badge-num {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--purple-100);
  color: var(--purple-700);
  border: 1px solid var(--purple-200);
}

.level-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-family: var(--font-heading);
}

.level-card-tagline {
  font-size: 0.82rem;
  color: var(--purple-700);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.level-card-missions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--purple-100);
}

.mission-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  font-size: 0.84rem;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.mission-chip:hover {
  background: var(--purple-100);
  border-color: var(--purple-300);
  color: var(--purple-800);
  transform: translateX(3px);
}
.mission-chip.completed {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}
.mission-chip.completed i {
  color: #059669;
}

@media (max-width: 900px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
}

/* Badges Showcase Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.badge-tile {
  background: #ffffff;
  border: 1.5px solid var(--purple-100);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 15px rgba(42, 10, 94, 0.04);
  transition: all 0.25s ease;
}
.badge-tile:hover {
  transform: translateY(-3px);
  border-color: var(--purple-300);
  box-shadow: 0 10px 25px rgba(106, 28, 255, 0.1);
}

.badge-tile.locked {
  opacity: 0.6;
  background: var(--purple-50);
}

.badge-tile.unlocked {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.badge-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--purple-50);
  border: 1px solid var(--purple-200);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--purple-600);
  margin-bottom: 0.85rem;
}

.badge-tile.unlocked .badge-icon-box {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.badge-tile-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-family: var(--font-heading);
}

.badge-tile-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
