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

/* =========================
  Dashboard — Welcome Hero Card Start
========================= */
.sw-hero {
  background: linear-gradient(
    25.59deg,
    #4a3dc4 31.7%,
    var(--sw-violet-500) 75.62%,
    #9c8ff7 104.9%
  );
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 4px 8.9px rgba(0, 0, 0, 0.15);
  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__greet {
  font-size: 11px;
  letter-spacing: 1.32px;
  color: rgba(255, 255, 255, 0.7);
}

.sw-hero__lvl-tag {
  padding: 4px 12px 4px 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
}

.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;
}

.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;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 2px 0;
}

.sw-hero__amount {
  font-size: 44px;
  line-height: 52px;
  letter-spacing: -1.32px;
}

.sw-hero__bottom {
  gap: 12px;
}

.sw-hero__trend {
  display: inline-flex;
}

/* Bootstrap .badge.rounded-pill (white text is the badge default) */
.sw-hero__trend-pill {
  --bs-badge-padding-y: 4px;
  --bs-badge-padding-x: 10px;
  --bs-badge-font-size: 12px;
  line-height: inherit;
  background: var(--sw-violet-800);
}

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

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

/* Bootstrap .btn themed through its variables */
.sw-btn-light {
  --bs-btn-padding-y: 12px;
  --bs-btn-padding-x: 18px;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 600;
  --bs-btn-color: var(--sw-violet-500);
  --bs-btn-bg: var(--sw-surface);
  --bs-btn-border-width: 0px;
  --bs-btn-border-radius: 8px;
  --bs-btn-hover-color: var(--sw-violet-600);
  --bs-btn-hover-bg: var(--sw-violet-50);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  text-align: start; /* an <a>: keep its label alignment (.btn centres) */
}
/* =========================
  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.
========================= */
/* Bootstrap .card; the padding is its .card-body's (spacer variables).
   position: static — .card's relative repaints the box with different
   anti-aliasing (same on the stat, campaign and leaderboard cards). */
.sw-tier {
  --bs-card-spacer-y: 24px;
  --bs-card-spacer-x: 24px;
  --bs-card-border-color: var(--sw-border-default);
  --bs-card-border-radius: 20px;
}

.sw-tier__body {
  gap: 16px;
}

.sw-tier__title {
  font-size: 14px;
  line-height: 20px;
}

/* Bare "more" icon buttons (here and on the stat cards): Bootstrap .btn
   stripped back to the icon through its variables */
.sw-tier__more,
.sw-stat__more {
  --bs-btn-padding-y: 0px;
  --bs-btn-padding-x: 0px;
  --bs-btn-border-width: 0px;
  --bs-btn-border-radius: 0px;
  --bs-btn-hover-color: var(--sw-text-primary);
  --bs-btn-hover-bg: transparent;
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
}

.sw-tier__more {
  --bs-btn-color: var(--sw-text-secondary);
  width: 20px;
  height: 20px;
}

/* Tier rail (Bronze → Silver → Gold → Platinum) */

.sw-tier__step {
  width: 36px;
  height: 36px;
  color: #fff;
}

.sw-tier__step--iron {
  background: #4B5563;
}

.sw-tier__step--bronze {
  background: #C17F4A;
}
.sw-tier__step--silver {
  background: #9CA3AF;
}
.sw-tier__step--gold {
  background: #E0A82E;
}
.sw-tier__step--platinum {
  background: #E5E7EB;
}

/* 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;
}

/* 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;
  border-radius: 1px;
  background: #e5e7eb;
}

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

/* Progress block */

.sw-tier__progress-row {
  gap: 6px;
}

.sw-tier__current-val {
  font-size: 13px;
  line-height: 16px;
}

.sw-tier__target {
  font-size: 12px;
  line-height: 15px;
}

/* Bootstrap .progress themed through its variables
   (fill = .progress-bar.rounded-pill in the markup) */
.sw-tier__bar {
  --bs-progress-height: 8px;
  --bs-progress-bg: #eaeaef;
  --bs-progress-border-radius: var(--bs-border-radius-pill);
  --bs-progress-bar-bg: var(--sw-violet-500);
  --bs-progress-bar-transition: width 0.4s ease-out;
}

.sw-tier__hint {
  font-size: 11px;
  line-height: 14px;
  color: var(--sw-text-secondary);
}

/* 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 {
    --bs-card-spacer-y: 18px;
    --bs-card-spacer-x: 18px;
    --bs-card-border-radius: 16px;
  }
  .sw-tier__body {
    gap: 14px;
  }
  .sw-tier__step {
    width: 32px;
    height: 32px;
  }
  .sw-tier__line {
    margin: 0 0px;
  }
  .sw-tier__step--current::after {
    inset: -3px;
  }
}
/* =========================
  Dashboard — Tier Progress Card End
========================= */

/* =========================
  Dashboard — Stat Cards Start
========================= */
/* Bootstrap .card; the padding is its .card-body's (spacer variables) */
.sw-stat {
  --bs-card-spacer-y: 20px;
  --bs-card-spacer-x: 24px;
  --bs-card-border-color: var(--sw-border-default);
  --bs-card-border-radius: 16px;
  --bs-card-height: 100%;
}

.sw-stat__head {
  align-items: center;
}

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

.sw-stat__iconbox {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.sw-stat__iconbox--violet {
  background: var(--sw-brand-soft);
}
.sw-stat__iconbox--green {
  background: var(--sw-success-soft);
  color: var(--sw-success-text);
}
.sw-stat__iconbox--yellow {
  background: var(--sw-warning-soft);
  color: var(--sw-warning-text);
}

.sw-stat__label-group {
  gap: 1px;
  font-size: 11px;
  line-height: 100%;
  color: #9CA3B0;
}

.sw-stat__label {
  font-size: 13px;
  line-height: 18px;
  color: var(--sw-text-secondary);
}

.sw-stat__more {
  --bs-btn-color: var(--sw-text-tertiary);
  width: 18px;
  height: 18px;
}

.sw-stat__body {
  display: flex;
}

.sw-stat__num-wrap {
  gap: 12px;
}

.sw-stat__value {
  font-size: var(--sw-h1-size);
  line-height: var(--sw-h1-lh);
  letter-spacing: -0.64px;
}

.sw-stat__trend {
  gap: 6px;
}

/* Bootstrap .badge.rounded-pill */
.sw-stat__trend-pill {
  --bs-badge-padding-y: 2px;
  --bs-badge-padding-x: 8px;
  --bs-badge-font-size: 11px;
  gap: 2px;
  padding-left: 6px;
  line-height: 14px;
}

.sw-stat__trend-pill--up {
  --bs-badge-color: var(--sw-success-text);
  background: var(--sw-success-soft);
}
.sw-stat__trend-pill--down {
  --bs-badge-color: var(--sw-danger-text);
  background: var(--sw-danger-soft);
}

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

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

/* =========================
  Dashboard — Active Campaigns Start
========================= */
/* Bootstrap .card with .card-header (no divider line) / .card-body /
   .card-footer (transparent, no divider), themed through its variables.
   The card's overflow clips the header's corners, so the header itself
   stays square (inner radius 0) — rounding both double-antialiases them. */
.sw-campaign {
  --bs-card-spacer-y: 20px;
  --bs-card-spacer-x: 20px;
  --bs-card-border-color: var(--sw-border-default);
  --bs-card-border-radius: 16px;
  --bs-card-inner-border-radius: 0px;
  --bs-card-height: 100%;
}

.sw-campaign__top {
  --bs-card-cap-padding-y: 14px;
  --bs-card-cap-padding-x: 16px;
  --bs-card-cap-bg: var(--sw-surface-muted);
  --bs-card-border-width: 0px;
  gap: 12px;
}

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

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

.sw-campaign__brand-name {
  font-size: 15px;
  line-height: 1.2;
}

.sw-campaign__brand-meta {
  font-size: 12px;
  color: var(--sw-text-secondary);
}

/* Bootstrap .badge.rounded-pill */
.sw-pill-live {
  --bs-badge-padding-y: 4px;
  --bs-badge-padding-x: 10px;
  --bs-badge-font-size: 10px;
  --bs-badge-color: var(--sw-success-text);
  line-height: inherit;
  background: var(--sw-success-soft);
  letter-spacing: 0.8px;
}

.sw-pill-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sw-success);
}

.sw-campaign__middle {
  padding-bottom: 16px;
}

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

.sw-campaign__earned-row {
  gap: 12px;
}

.sw-campaign__earned {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.32px;
}

/* Bootstrap .badge.rounded-pill */
.sw-campaign__delta {
  --bs-badge-padding-y: 4px;
  --bs-badge-padding-x: 10px;
  --bs-badge-font-size: 12px;
  --bs-badge-color: var(--sw-success-text);
  gap: 2px;
  line-height: inherit;
  background: var(--sw-success-soft);
}

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

.sw-campaign__scans {
  font-size: 12px;
}

.sw-campaign__scans-r {
  color: var(--sw-text-secondary);
}

/* Bootstrap .progress themed through its variables. The striped violet
   fill stays custom (.progress-bar-striped is a different 45deg stripe on
   a flat colour), so the bar colour underneath it is transparent. */
.sw-campaign__bar {
  --bs-progress-height: 12px;
  --bs-progress-bg: var(--sw-surface-muted);
  --bs-progress-border-radius: var(--bs-border-radius-pill);
  --bs-progress-bar-bg: transparent;
  --bs-progress-bar-transition: none;
}

.sw-campaign__bar-fill {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 0 6px,
      rgba(255, 255, 255, 0) 6px 12px
    ),
    linear-gradient(180deg, var(--sw-violet-500) 0%, #9c8ff7 100%);
}

.sw-campaign__pdi {
  font-size: 12px;
  line-height: 16px;
}

.sw-campaign__actions {
  --bs-card-cap-padding-y: 12px;
  --bs-card-cap-padding-x: 16px;
  --bs-card-cap-bg: transparent;
  --bs-card-border-width: 0px;
  padding-bottom: 16px;
}

/* Bootstrap .btn themed through its variables */
.sw-btn-soft,
.sw-btn-ghost {
  --bs-btn-padding-y: 10px;
  --bs-btn-padding-x: 16px;
  --bs-btn-font-size: 13px;
  --bs-btn-font-weight: 600;
  --bs-btn-border-radius: 8px;
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-border-color);
  flex: 1;
  height: 40px;
}

.sw-btn-soft {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--sw-violet-500);
  --bs-btn-border-width: 0px;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sw-violet-600);
}

.sw-btn-ghost {
  --bs-btn-color: var(--sw-text-primary);
  --bs-btn-bg: var(--sw-surface);
  --bs-btn-border-color: var(--sw-border-default);
  --bs-btn-hover-color: var(--sw-text-primary);
  --bs-btn-hover-bg: #f9fafb;
  --bs-btn-hover-border-color: var(--sw-border-default);
  text-align: start; /* an <a>: .btn would centre a label that wraps on phones */
}
/* =========================
  Dashboard — Active Campaigns End
========================= */

/* =========================
  Dashboard — Earnings Overview Start
========================= */
.sw-earnings__stats {
  gap: 32px;
}

.sw-earnings__stat-label {
  gap: 6px;
  font-size: 12px;
  color: var(--sw-text-secondary);
}

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

.sw-earnings__dot--violet {
  background: #6E5CF7;
}
.sw-earnings__dot--cyan {
  background: #85CC17;
}
.sw-earnings__dot--lime {
  background: #21D4ED;
}

.sw-earnings__stat-value {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin-top: 2px;
}

/* Bootstrap .btn themed through its variables (no hover change in the
   design). It sits in a line box, so vertical-align is pinned back from
   .btn's middle. */
.sw-range-select {
  --bs-btn-padding-y: 8px;
  --bs-btn-padding-x: 12px;
  --bs-btn-font-size: 13px;
  --bs-btn-font-weight: 600;
  --bs-btn-color: #0f1020;
  --bs-btn-bg: #ffffff;
  --bs-btn-border-color: #e5e7eb;
  --bs-btn-border-radius: 8px;
  --bs-btn-hover-color: var(--bs-btn-color);
  --bs-btn-hover-bg: var(--bs-btn-bg);
  --bs-btn-hover-border-color: var(--bs-btn-border-color);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-border-color);
}

.sw-chart-wrap {
  height: 240px;
}
/* =========================
  Dashboard — Earnings Overview End
========================= */

/* =========================
  Dashboard — Recent Activity Start
========================= */
.sw-activity__list {
  display: flex;
  list-style: none;
}

.sw-activity__item {
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--sw-surface-muted);
}

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

.sw-activity__icon {
  width: 40px;
  height: 40px;
}

.sw-activity__icon--green {
  background: var(--sw-success-soft);
  color: var(--sw-success-text);
}
.sw-activity__icon--violet {
  background: var(--sw-brand-soft);
  color: var(--sw-violet-500);
}
.sw-activity__icon--blue {
  background: var(--sw-warning-soft);
  color: var(--sw-warning-text);
}
.sw-activity__icon--orange {
  background: var(--sw-success-soft);
  color: var(--sw-success-text);
}

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

.sw-activity__title {
  font-size: 13px;
}

.sw-activity__meta {
  font-size: 12px;
  margin-top: 2px;
}

.sw-activity__amount {
  font-size: 13px;
  font-weight: 700;
  color: var(--sw-success);
}

.sw-activity__amount--neutral {
  color: var(--sw-text-secondary);
}

/* Bootstrap .badge.rounded-pill. Kept inline (the badge is inline-block)
   so the pill's box and the row height stay as designed. */
.sw-activity__pill {
  --bs-badge-padding-y: 3px;
  --bs-badge-padding-x: 8px;
  --bs-badge-font-size: 10px;
  --bs-badge-color: var(--sw-success-text);
  line-height: inherit;
  letter-spacing: 0.5px;
  background: var(--sw-success-soft);
}
/* =========================
  Dashboard — Recent Activity End
========================= */

/* =========================
  Dashboard — Top Creators Leaderboard Start
========================= */
/* Bootstrap .card; the padding is its .card-body's (spacer variables) */
.sw-leaderboard {
  --bs-card-spacer-y: 24px;
  --bs-card-spacer-x: 24px;
  --bs-card-border-color: var(--sw-border-default);
  --bs-card-border-radius: 16px;
}

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

.sw-leaderboard__title {
  /* Figma Heading/H5 */
  font-size: var(--sw-h5-size);
  line-height: var(--sw-h5-lh);
  font-weight: var(--sw-h5-weight);
  letter-spacing: var(--sw-h5-ls);
}

.sw-creator {
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--sw-border-strong2);
  border-radius: 12px;
  background: var(--sw-surface);
}

.sw-creator__rank {
  width: 28px;
  height: 28px;
  font-size: 12px;
  color: #fff;
}

.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: var(--sw-text-secondary);
}

.sw-creator__photo {
  width: 36px;
  height: 36px;
  background: #18181b;
}

.sw-creator__avatar-text {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--sw-violet-500) 0%, #9c8ff7 71%);
  font-size: 12px;
}

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

.sw-creator__name {
  font-size: 13px;
  color: var(--sw-text-primary);
}

.sw-creator__meta {
  font-size: 11px;
}

.sw-creator__earnings {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.15px;
}

.sw-creator__scans {
  font-size: 11px;
  line-height: 14px;
}

.sw-creator--me {
  background: var(--sw-brand-subtle);
  border-color: var(--sw-violet-500);
}

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

.sw-leaderboard__divider {
  height: 1px;
  background: var(--sw-surface-muted);
}
/* =========================
  Dashboard — Top Creators Leaderboard End
========================= */

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

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

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

  .sw-earnings__stats {
    gap: 20px;
  }

  .sw-stat__value {
    font-size: 28px;
    line-height: 100%;
  }
}

/* Phone — tighter hero/stat/campaign typography */
@media (max-width: 575px) {
  .sw-hero {
    padding: 20px;
  }
  
  .sw-hero__lvl-tag {
    font-size: 11px;
  }

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

  .sw-hero__lvl-badge svg {
    width: 12px;
    height: 12px;
  }
  
  .sw-hero__label {
    font-size: 12px;
  }

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

  .sw-stat {
    --bs-card-spacer-y: 14px;
    --bs-card-spacer-x: 14px;
  }

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

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

  .sw-earnings__stats {
    gap: 16px;
    justify-content: space-between;
  }

  .sw-earnings__stat-value {
    font-size: 14px;
  }

  .sw-stat__head-l {
    flex-direction: column;
    align-items: flex-start;
  }

  .sw-stat__head {
    align-items: flex-start;
  }
  .sw-stat__more {
    margin-top: 9px;
  }

  .sw-stat__num-wrap .d-flex {
    flex-direction: column;
    gap: 10px;
  }
  .sw-stat__spark {
    max-width: 232px;
  }
  .sw-stat__trend-pill {
    --bs-badge-font-size: 10px;
  }
  .sw-range-select {
    width: 100%;
    justify-content: space-between;
  }
  .sw-card__title {
    font-size: 16px;
  }
  .sw-card__subtitle {
    font-size: 12px;
  }
  .sw-earnings__stat-label {
    font-size: 10px;
  }
  
  .sw-leaderboard {
    --bs-card-spacer-y: 16px;
    --bs-card-spacer-x: 16px;
  }
  .sw-creator__photo {
    display: none;
  }
  .sw-creator__earnings {
    font-size: 13px;
  }
  .sw-creator__avatar-text {
    width: 32px;
    height: 32px;
  }
}
/* =========================
  Dashboard Page Responsive End
========================= */
