.user-dashboard {
  background:
    radial-gradient(circle at 88% 5%, rgba(126, 94, 240, .12), transparent 27rem),
    radial-gradient(circle at 5% 38%, rgba(255, 198, 120, .13), transparent 23rem),
    var(--cream);
  min-height: calc(100vh - 82px);
}

.dashboard-shell {
  width: min(1180px, calc(100% - 60px));
  margin: auto;
  padding: 46px 0 80px;
}

.dashboard-welcome {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 22px;
  align-items: stretch;
}

.dashboard-welcome-copy {
  min-height: 420px;
  padding: 42px 38px;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 10% 115%, rgba(255,255,255,.18), transparent 17rem),
    linear-gradient(135deg, #252044, #5a3bd5 72%, #765af0);
  box-shadow: 0 24px 65px rgba(62, 44, 142, .22);
  position: relative;
  overflow: hidden;
}

.dashboard-welcome-copy::after {
  content: "✦";
  position: absolute;
  left: 42px;
  top: 32px;
  font-size: 94px;
  line-height: 1;
  color: rgba(255,255,255,.08);
  transform: rotate(-12deg);
}

.dashboard-kicker {
  display: block;
  color: #6c50db;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.dashboard-welcome-copy .dashboard-kicker { color: #cfc6ff; }
.dashboard-welcome-copy h1 { margin: 6px 0 10px; font: 700 clamp(34px, 4.2vw, 54px) "Varela Round"; }
.dashboard-welcome-copy p { max-width: 610px; margin: 0; color: rgba(255,255,255,.76); font-size: 18px; line-height: 1.65; }
.dashboard-actions { display: flex; gap: 11px; margin-top: 26px; }
.dashboard-primary { padding: 14px 20px; background: #fff; color: #352178; box-shadow: none; }
.dashboard-primary:hover { background: #f7f4ff; }
.dashboard-primary span, .mission-button span { margin-right: 18px; }
.dashboard-secondary { padding: 13px 18px; border: 1px solid rgba(255,255,255,.32); border-radius: 15px; color: #fff; font-weight: 800; }
.dashboard-secondary:hover { background: rgba(255,255,255,.09); }
.dashboard-sync-line { display: flex; align-items: center; gap: 7px; margin-top: 20px; color: rgba(255,255,255,.66); font-size: 12px; font-weight: 700; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #72e79d; box-shadow: 0 0 0 4px rgba(114,231,157,.13); }

.player-card {
  min-height: 420px;
  padding: 28px;
  border: 1px solid #e4def8;
  border-radius: 30px;
  background: linear-gradient(150deg, #fff 45%, #efeaff);
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 13px 18px;
  position: relative;
  overflow: hidden;
}

.player-avatar { width: 78px; height: 78px; border-radius: 25px; background: #ffe8d2; display: grid; place-items: center; font-size: 43px; box-shadow: 5px 5px 0 #f6cfaa; }
.player-rank { align-self: center; display: flex; align-items: baseline; gap: 7px; }
.player-rank span { color: var(--muted); font-weight: 800; }
.player-rank b { color: var(--purple); font: 900 46px "Varela Round"; line-height: 1; }
.player-xp-copy { grid-column: 1/-1; display: grid; gap: 3px; margin-top: 8px; }
.player-xp-copy b { font-size: 17px; }
.player-xp-copy span { font-size: 12px; color: var(--muted); }
.player-xp-track { grid-column: 1/-1; height: 10px; background: #ded7f4; border-radius: 10px; overflow: hidden; }
.player-xp-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5a3bd5,#bd72df); transition: width .7s ease; }
.player-spark { position: absolute; color: #c9bdf6; }
.spark-one { top: 25px; left: 30px; font-size: 24px; }
.spark-two { top: 56px; left: 60px; font-size: 12px; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin: 18px 0; }
.dashboard-metrics article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.92); display: flex; align-items: center; gap: 13px; }
.dashboard-metrics b { display: block; font: 800 27px "Varela Round"; line-height: 1.05; }
.dashboard-metrics small { color: var(--muted); font-weight: 700; }
.metric-icon { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; }
.metric-purple { background: #eee9ff; color: var(--purple); }
.metric-green { background: #e3f7e9; color: #28744b; }
.metric-orange { background: #ffead8; }
.metric-gold { background: #fff3cb; }

.dashboard-main-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.next-mission-card, .week-card, .next-achievement-card { border: 1px solid var(--line); border-radius: 26px; background: #fff; padding: 26px; }
.dashboard-card-heading, .dashboard-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dashboard-card-heading h2, .dashboard-section-title h2, .dashboard-settings h2 { margin: 0; font: 700 26px "Varela Round"; }
.mission-time { padding: 6px 10px; border-radius: 13px; background: #f3efff; color: var(--purple); font-size: 12px; font-weight: 800; white-space: nowrap; }
.mission-focus { display: flex; gap: 16px; align-items: center; margin: 23px 0 19px; padding: 18px; border-radius: 18px; background: #f8f6fc; }
.mission-icon { width: 55px; height: 55px; flex: 0 0 55px; border-radius: 17px; background: #e9e2ff; display: grid; place-items: center; font-size: 28px; }
.mission-focus small { display: block; color: var(--muted); font-weight: 700; }
.mission-focus b { display: block; font-size: 20px; margin: 1px 0 3px; }
.mission-focus p { margin: 0; color: var(--muted); font-size: 13px; }
.mission-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.mission-tags span { border: 1px solid #e5e0ed; border-radius: 999px; padding: 6px 11px; color: #625d71; font-size: 12px; font-weight: 700; }
.mission-button { width: 100%; margin-top: 20px; padding: 13px 18px; border-radius: 15px; background: var(--purple); color: #fff; font-weight: 900; }
.mission-button:hover { background: #4729bd; }

.week-card { background: #211d3d; color: #fff; border-color: #211d3d; }
.week-card .dashboard-kicker { color: #a998f3; }
.week-card h2 { font-size: 22px; }
.week-flame { font-size: 32px; }
.week-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; margin: 31px 0 20px; direction: ltr; }
.week-day { display: grid; gap: 8px; justify-items: center; color: #8f899f; font-size: 11px; font-weight: 800; }
.week-day i { width: 30px; height: 30px; border-radius: 10px; background: #312b50; display: grid; place-items: center; font-style: normal; color: #716a88; }
.week-day.done { color: #d8d1f5; }
.week-day.done i { background: #765af0; color: #fff; box-shadow: 0 5px 14px rgba(118,90,240,.28); }
.week-day.today i { outline: 2px solid #f0c764; outline-offset: 2px; }
.week-card > p { margin: 0; color: #aaa4bb; font-size: 13px; line-height: 1.55; }

.dashboard-achievements, .dashboard-strengths { margin-top: 38px; }
.dashboard-section-title { align-items: end; margin-bottom: 18px; }
.dashboard-link { color: var(--purple); font-weight: 900; }
.achievement-layout { display: grid; grid-template-columns: 1.45fr .55fr; gap: 18px; }
.recent-achievements { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.dashboard-reward { min-height: 160px; border: 1px solid #e7e1f4; border-radius: 22px; padding: 19px; background: linear-gradient(145deg,#fff,#f8f5ff); position: relative; }
.dashboard-reward .reward-emoji { display: block; font-size: 38px; margin-bottom: 14px; }
.dashboard-reward b { display: block; font-size: 16px; }
.dashboard-reward small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.dashboard-reward .reward-check { position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; border-radius: 50%; background: #dff6e7; color: #2e7a4d; display: grid; place-items: center; font-weight: 900; }
.dashboard-reward.empty { grid-column: 1/-1; display: grid; place-items: center; text-align: center; color: var(--muted); border-style: dashed; }
.next-achievement-card { background: #fff7dc; border-color: #f3df99; }
.next-achievement-label { color: #936a00; font-size: 11px; font-weight: 900; }
.next-achievement-main { display: flex; gap: 12px; align-items: center; margin: 15px 0 18px; }
.next-achievement-main > span { font-size: 38px; }
.next-achievement-main b { display: block; font-size: 16px; }
.next-achievement-main p { margin: 3px 0 0; color: #776b4f; font-size: 12px; line-height: 1.4; }
.next-achievement-progress { height: 8px; background: #eadba8; border-radius: 9px; overflow: hidden; }
.next-achievement-progress i { display: block; width: 0; height: 100%; background: #e7a924; border-radius: inherit; }
.next-achievement-card > small { display: block; margin-top: 8px; color: #806d3f; font-weight: 700; }

.dashboard-skill-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.dashboard-skill { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: #fff; }
.dashboard-skill-head { display: flex; align-items: center; gap: 9px; }
.dashboard-skill-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; }
.dashboard-skill-head b { flex: 1; font-size: 14px; }
.dashboard-skill-head strong { font-size: 14px; }
.dashboard-skill-track { height: 7px; margin-top: 15px; background: #eeeaf2; border-radius: 8px; overflow: hidden; }
.dashboard-skill-track i { display: block; height: 100%; border-radius: inherit; }
.dashboard-skill > small { display: block; color: var(--muted); margin-top: 8px; }

.dashboard-settings { margin-top: 28px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.7); display: grid; grid-template-columns: 1fr auto auto auto; gap: 20px; align-items: center; }
.dashboard-settings h2 { font-size: 21px; }
.dashboard-setting { display: grid; gap: 7px; }
.dashboard-setting > b { color: var(--muted); font-size: 12px; }
.dashboard-setting .mini-seg button { padding: 7px 10px; min-width: 36px; }

@media (max-width: 900px) {
  .dashboard-welcome { grid-template-columns: 1fr; }
  .player-card { min-height: 210px; grid-template-columns: auto 1fr; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-main-grid, .achievement-layout { grid-template-columns: 1fr; }
  .dashboard-skill-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-settings { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .dashboard-shell { width: calc(100% - 28px); padding-top: 22px; }
  .dashboard-welcome-copy { min-height: 0; padding: 28px 23px; border-radius: 24px; }
  .dashboard-welcome-copy p { font-size: 15px; }
  .dashboard-actions { flex-direction: column; }
  .dashboard-primary, .dashboard-secondary { width: 100%; }
  .player-card { border-radius: 24px; }
  .dashboard-metrics { gap: 8px; }
  .dashboard-metrics article { padding: 14px; gap: 9px; }
  .dashboard-metrics b { font-size: 22px; }
  .metric-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .next-mission-card, .week-card, .next-achievement-card { padding: 20px; border-radius: 22px; }
  .dashboard-card-heading h2, .dashboard-section-title h2 { font-size: 22px; }
  .recent-achievements { grid-template-columns: 1fr; }
  .dashboard-reward { min-height: 120px; }
  .dashboard-skill-grid { grid-template-columns: 1fr; }
  .dashboard-section-title { align-items: flex-start; }
  .dashboard-link { font-size: 12px; white-space: nowrap; }
  .dashboard-settings { grid-template-columns: 1fr; gap: 15px; }
}
