/* =========================
  ScanWin — dashboard.css
========================= */

/* =========================
  Dashboard — Welcome Hero Card Start
========================= */
.sw-hero {
  background: linear-gradient(
    25.59deg,
    #4a3dc4 31.7%,
    #6e5ef7 75.62%,
    #9c8ff7 104.9%
  );
  color: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 8.9px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sw-hero::before,
.sw-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  filter: blur(0.5px);
}

.sw-hero::before {
  width: 220px;
  height: 220px;
  right: -100px;
  top: -80px;
}

.sw-hero::after {
  width: 140px;
  height: 140px;
  right: -50px;
  bottom: -60px;
}

.sw-hero__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.sw-hero__greet {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.32px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin: 0;
}

.sw-hero__lvl-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.sw-hero__lvl-tag:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

/* Metal tier badge inside the hero pill — defaults to gold but
   accepts other modifiers (--bronze, --silver, --platinum) if
   the user's tier changes. */
.sw-hero__lvl-badge {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.sw-hero__lvl-badge svg {
  width: 13px;
  height: 13px;
}

.sw-hero__lvl-badge--bronze   { background: #c17f4a; }
.sw-hero__lvl-badge--silver   { background: #9ca3af; }
.sw-hero__lvl-badge--gold     { background: #e0a82e; }
.sw-hero__lvl-badge--platinum { background: #e5e7eb; color: #6b7280; }

.sw-hero__label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 2px 0;
  position: relative;
  z-index: 1;
}

.sw-hero__amount {
  font-size: 44px;
  line-height: 52px;
  font-weight: 700;
  letter-spacing: -1.32px;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 1;
}

.sw-hero__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.sw-hero__trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sw-hero__trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 8px;
  background: #3c3489;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.sw-hero__trend-pill svg {
  width: 14px;
  height: 14px;
}

.sw-hero__trend-cap {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

.sw-btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: #fff;
  color: var(--sw-violet);
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.sw-btn-light:hover {
  background: var(--sw-violet-50);
  color: var(--sw-violet-600);
}
/* =========================
  Dashboard — Welcome Hero Card End
========================= */

/* =========================
  Dashboard — Tier Progress Card Start
  Metal-tier stepper (Bronze → Silver → Gold → Platinum) with
  scan-based progress toward the next tier. Replaces the older
  numeric .sw-level / .sw-stepper component per the PO audit.
========================= */
.sw-tier {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  height: 100%;
}

.sw-tier__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sw-tier__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #0f1020;
}

.sw-tier__more {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: none;
  border: 0;
  padding: 0;
}

.sw-tier__more:hover {
  color: var(--sw-text);
}

/* Tier rail (Bronze → Silver → Gold → Platinum) */
.sw-tier__rail {
  display: flex;
  align-items: center;
  width: 100%;
}

.sw-tier__step {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  position: relative;
}

.sw-tier__step--bronze { background: #c17f4a; }
.sw-tier__step--silver { background: #9ca3af; }
.sw-tier__step--gold   { background: #e0a82e; }
.sw-tier__step--locked {
  background: #E5E7EB;
  color: #9ca3af;
}

/* Subtle halo around the current tier so the user can see
   "you are here" at a glance — purely a UX cue on top of the
   metal-color, not present in the figma. */
.sw-tier__step--current::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(224, 168, 46, 0.28);
  pointer-events: none;
}

.sw-tier__star {
  width: 18px;
  height: 18px;
}

/* Connector between badges. Lines flex to fill the rail so the
   stepper auto-fits whatever column width the grid gives it. */
.sw-tier__line {
  flex: 1;
  height: 2px;
  margin: 0 4px;
  border-radius: 1px;
  background: #e5e7eb;
}

.sw-tier__line--done {
  background: var(--sw-violet);
}

/* Progress block */
.sw-tier__progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sw-tier__progress-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.sw-tier__current-val {
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  color: #0f1020;
}

.sw-tier__target {
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  color: #9ca3af;
}

.sw-tier__bar {
  height: 8px;
  background: #eaeaef;
  border-radius: 999px;
  overflow: hidden;
}

.sw-tier__bar-fill {
  height: 100%;
  background: var(--sw-violet);
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

.sw-tier__hint {
  font-size: 12px;
  line-height: 14px;
  color: #6b7280;
  margin: 0;
}

/* Below xl (<1200px) the tier card stacks under the welcome hero
   in a full-width column. Tighten gap so the card isn't too tall. */
@media (max-width: 1199.98px) {
  .sw-tier {
    gap: 16px;
  }
}

/* Phones — shrink badges so all four fit comfortably on narrow
   viewports (320–390px). The line `margin` is also reduced to
   recover horizontal space. */
@media (max-width: 575.98px) {
  .sw-tier {
    padding: 20px;
    gap: 14px;
  }
  .sw-tier__step {
    width: 32px;
    height: 32px;
  }
  .sw-tier__star {
    width: 16px;
    height: 16px;
  }
  .sw-tier__line {
    margin: 0 2px;
  }
  .sw-tier__step--current::after {
    inset: -3px;
  }
}
/* =========================
  Dashboard — Tier Progress Card End
========================= */

/* =========================
  Dashboard — Stat Cards Start
========================= */
.sw-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.sw-stat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sw-stat__head-l {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sw-stat__iconbox {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sw-stat__iconbox--violet {
  background: #eeedfe;
  color: var(--sw-violet);
}
.sw-stat__iconbox--green {
  background: #d1fae5;
  color: #047857;
}
.sw-stat__iconbox--yellow {
  background: #fef3c7;
  color: #b45309;
}

.sw-stat__label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: #6b7280;
}

.sw-stat__more {
  width: 18px;
  height: 18px;
  background: none;
  border: 0;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sw-stat__more:hover {
  color: var(--sw-text);
}

.sw-stat__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sw-stat__num-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sw-stat__value {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.64px;
  color: #0f1020;
  margin: 0;
}

.sw-stat__trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw-stat__trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
}

.sw-stat__trend-pill--up {
  background: #d1fae5;
  color: #065f46;
}
.sw-stat__trend-pill--down {
  background: #fef2f2;
  color: #dc2626;
}

.sw-stat__trend-cap {
  font-size: 11px;
  line-height: 14px;
  color: #9ca3af;
}

.sw-stat__spark {
  height: 32px;
  width: 100%;
  max-width: 64px;
  flex-shrink: 0;
}
/* =========================
  Dashboard — Stat Cards End
========================= */

/* =========================
  Dashboard — Active Campaigns Start
========================= */
.sw-campaign {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sw-campaign__top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f3f4f6;
}

.sw-campaign__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

.sw-campaign__brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sw-campaign__brand-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: #0f1020;
}

.sw-campaign__brand-meta {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.sw-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #d1fae5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #065f46;
}

.sw-pill-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}

.sw-campaign__middle {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 16px;
}

.sw-campaign__earned-label {
  font-size: 12px;
  line-height: 16px;
  color: #9ca3af;
}

.sw-campaign__earned-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sw-campaign__earned {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.32px;
  color: #0f1020;
  margin: 0;
}

.sw-campaign__delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
}

.sw-campaign__delta-icon {
  width: 14px;
  height: 14px;
}

.sw-campaign__progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sw-campaign__scans {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.sw-campaign__scans-l {
  font-weight: 600;
  color: #0f1020;
}
.sw-campaign__scans-r {
  font-weight: 400;
  color: #6b7280;
}

.sw-campaign__bar {
  height: 12px;
  background: #f3f4f6;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

.sw-campaign__bar-fill {
  height: 100%;
  border-radius: 10px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 6px,
      rgba(255, 255, 255, 0) 6px 12px
    ),
    linear-gradient(180deg, #6e5ef7 0%, #9c8ff7 100%);
}

.sw-campaign__pdi {
  font-size: 12px;
  line-height: 16px;
  color: #9ca3af;
  margin: 0;
}

.sw-campaign__actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
}

.sw-btn-soft,
.sw-btn-ghost {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  height: 40px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.sw-btn-soft {
  background: var(--sw-violet);
  border: 0;
  color: #fff;
}

.sw-btn-soft:hover {
  background: var(--sw-violet-600);
  color: #fff;
}

.sw-btn-ghost {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #0f1020;
}

.sw-btn-ghost:hover {
  background: #f9fafb;
  color: #0f1020;
}
/* =========================
  Dashboard — Active Campaigns End
========================= */

/* =========================
  Dashboard — Earnings Overview Start
========================= */
.sw-earnings__stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sw-earnings__stat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--sw-text-muted);
  font-weight: 500;
}

.sw-earnings__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.sw-earnings__dot--violet {
  background: #6e5df8;
}
.sw-earnings__dot--cyan {
  background: #06b6d4;
}
.sw-earnings__dot--lime {
  background: #84cc16;
}

.sw-earnings__stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--sw-text);
  letter-spacing: -0.5px;
  margin-top: 2px;
}

.sw-range-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-text-muted);
  background: #f5f5f7;
  border: 0;
  border-radius: 8px;
}

.sw-chart-wrap {
  width: 100%;
  height: 240px;
}

.sw-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--sw-text-faint);
  margin-top: 8px;
  padding: 0 4px;
}
/* =========================
  Dashboard — Earnings Overview End
========================= */

/* =========================
  Dashboard — Recent Activity Start
========================= */
.sw-activity__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sw-activity__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f3f4f6;
}

.sw-activity__item:hover {
  background: #fafafa;
}

.sw-activity__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sw-activity__icon--green {
  background: #D1FAE5;
  color: #065F46;
}
.sw-activity__icon--violet {
  background: #EEEDFE;
  color: #6D5EF7;
}
.sw-activity__icon--blue {
  background: #FEF3C7;
  color: #B45309;
}
.sw-activity__icon--orange {
  background: #D1FAE5;
  color: #065F46;
}

.sw-activity__main {
  flex: 1;
  min-width: 0;
}

.sw-activity__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-text);
}

.sw-activity__meta {
  font-size: 12px;
  color: var(--sw-text-faint);
  margin-top: 2px;
}

.sw-activity__amount {
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
  white-space: nowrap;
}

.sw-activity__amount--neutral {
  color: var(--sw-text-muted);
  font-weight: 600;
}

.sw-activity__pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
}
/* =========================
  Dashboard — Recent Activity End
========================= */

/* =========================
  Dashboard — Top Creators Leaderboard Start
========================= */
.sw-leaderboard {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sw-leaderboard__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-leaderboard__head-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sw-leaderboard__title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #0f1020;
  margin: 0;
}

.sw-creator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
}

.sw-creator__rank {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sw-creator__rank--gold {
  background: linear-gradient(135deg, #ffd44f 0%, #f59e0a 71%);
}
.sw-creator__rank--silver {
  background: #d9d9db;
}
.sw-creator__rank--bronze {
  background: #d6a673;
}
.sw-creator__rank--neutral {
  background: #fafafb;
  color: #6b7280;
}

.sw-creator__photo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: #18181b;
  flex-shrink: 0;
}

.sw-creator__avatar-text {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6e5ef7 0%, #9c8ff7 71%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sw-creator__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sw-creator__name {
  font-size: 13px;
  font-weight: 600;
  color: #0f1020;
}

.sw-creator__meta {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
}

.sw-creator__money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sw-creator__earnings {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: -0.15px;
  color: #0f1020;
}

.sw-creator__scans {
  font-size: 11px;
  line-height: 14px;
  color: #9ca3af;
}

.sw-creator--me {
  background: #f5f4fe;
  border-color: var(--sw-violet);
}

.sw-creator--me .sw-creator__name {
  color: var(--sw-violet);
}

.sw-leaderboard__divider {
  height: 1px;
  background: #f3f4f6;
}
/* =========================
  Dashboard — Top Creators Leaderboard End
========================= */

/* =========================
  Dashboard Page Responsive Start
========================= */

/* Tablet & smaller — hero shrinks, earnings stats tighten */
@media (max-width: 991.98px) {
  .sw-hero {
    padding: 20px;
  }

  .sw-hero__amount {
    font-size: 36px;
  }

  .sw-earnings__stats {
    gap: 20px;
  }
}

/* Phone — tighter hero/stat/campaign typography */
@media (max-width: 575.98px) {
  .sw-hero {
    padding: 18px 16px;
  }

  .sw-hero__amount {
    font-size: 32px;
  }

  .sw-stat {
    padding: 14px;
  }

  .sw-stat__value {
    font-size: 18px;
  }

  .sw-campaign__earned {
    font-size: 24px;
  }

  .sw-earnings__stats {
    gap: 16px;
  }

  .sw-earnings__stat-value {
    font-size: 18px;
  }
}
/* =========================
  Dashboard Page Responsive End
========================= */
