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

/* spacing between stacked sections */
.sw-app__content > section,
.sw-app__content > .sw-rc-grid2,
.sw-app__content > .sw-rc-grid3 {
  margin-bottom: 20px;
}

/* =========================
  Hero
========================= */
.sw-rc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 20px;
}
.sw-rc-hero__main {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px 26px;
  color: #fff;
  background: radial-gradient(
    135% 135% at 96% 4%,
    #6a72ea 0%,
    #4b3bc0 38%,
    #211a4d 74%,
    #14112e 100%
  );
}
.sw-rc-hero__main::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -130px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  z-index: 0;
}
.sw-rc-hero__main::before {
  content: "";
  position: absolute;
  bottom: -86px;
  right: -100px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 0;
}

.sw-rc-hero__top,
.sw-rc-hero__label,
.sw-rc-hero__pts {
  position: relative;
  z-index: 1;
}
.sw-rc-hero__top {
  /* display is breakpoint-owned (flex desktop -> contents <mobile grid) */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sw-rc-hero__greet {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: rgba(255, 255, 255, 0.72);
}
.sw-rc-hero__tier {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.sw-rc-hero__tier-ico {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  border-radius: 999px;
}
.sw-rc-hero__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}
.sw-rc-hero__pts {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 3px 0 0;
}
.sw-rc-hero__foot {
  /* display is breakpoint-owned (flex desktop -> contents <mobile grid) */
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.sw-rc-hero__trend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(124, 108, 248, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sw-rc-hero__trend svg {
  width: 14px;
  height: 14px;
}
.sw-rc-hero__vs {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Scan-to-claim card */
.sw-rc-scan {
  border: 1.5px solid transparent;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #8b7bf8 0%, #b9aef9 42%, #8fe0c6 100%) border-box;
  box-shadow: 0 14px 34px rgba(124, 108, 248, 0.12);
}
.sw-rc-scan__head {
  gap: 12px; /* off the gap scale */
}
.sw-rc-scan__ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eeedfe;
  color: var(--sw-violet);
}
.sw-rc-scan__ico svg {
  width: 20px;
  height: 20px;
}
.sw-rc-scan__kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--sw-violet);
}
.sw-rc-scan__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f1020;
  margin: 2px 0 0;
}
.sw-rc-scan__qrrow {
  gap: 14px; /* off the gap scale */
  background: #f3f1fe;
  border: 1px solid #e6e2fb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 16px;
}
.sw-rc-scan__qrtext {
  gap: 2px; /* off the gap scale */
  flex: 1;
}
.sw-rc-scan__qrtitle {
  font-size: 13px;
  font-weight: 600;
  color: #0f1020;
}
.sw-rc-scan__qrsub {
  font-size: 11.5px;
  color: var(--sw-text-faint);
  line-height: 1.4;
}
.sw-rc-scan__qr {
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  line-height: 0;
}
.sw-rc-scan__qr svg {
  width: 56px;
  height: 56px;
  display: block;
}
.sw-rc-scan__reward {
  margin-top: auto;
  padding-top: 14px;
}
.sw-rc-scan__reward-txt {
  gap: 6px; /* off the gap scale */
  font-size: 12px;
  color: var(--sw-text-muted);
}
.sw-rc-scan__reward-txt svg {
  width: 14px;
  height: 14px;
  color: var(--sw-violet);
}
.sw-rc-scan__reward-txt strong {
  color: #0f1020;
  font-weight: 700;
}
.sw-rc-scan__bar {
  margin-top: 8px;
  --bs-progress-height: 6px;
  --bs-progress-bg: #eef0f3;
}

/* =========================
  Section block (header + content)
========================= */
.sw-rc-blockhead {
  gap: 16px; /* on-scale but paired with the margin below */
  margin-bottom: 14px; /* off the spacer scale */
}
.sw-rc-blockhead__title {
  font-size: 17px;
  font-weight: 700;
  color: #0f1020;
  margin: 0;
}
.sw-rc-blockhead__sub {
  font-size: 13px;
  color: var(--sw-text-muted);
  margin: 3px 0 0;
}
.sw-rc-viewall {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-violet);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-rc-viewall svg {
  width: 14px;
  height: 14px;
}
.sw-rc-viewall--btn {
  border: 1px solid var(--sw-border-strong);
  border-radius: 9px;
  padding: 7px 14px;
  color: var(--sw-text);
}
.sw-rc-viewall--btn:hover {
  background: #f5f5f7;
}

/* carousel nav */
.sw-rc-carousel__nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sw-rc-carousel__viewall {
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-violet);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 2px;
}
.sw-rc-carousel__viewall:hover {
  text-decoration: underline;
}
.sw-rc-cbtn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  --bs-btn-bg: #fff;
  --bs-btn-color: var(--sw-text);
  --bs-btn-border-color: var(--sw-border-strong);
  --bs-btn-hover-bg: #f5f5f7;
  --bs-btn-hover-color: var(--sw-text);
  --bs-btn-hover-border-color: var(--sw-border-strong);
  --bs-btn-active-bg: #f5f5f7;
  --bs-btn-active-color: var(--sw-text);
  --bs-btn-active-border-color: var(--sw-border-strong);
  --bs-btn-border-radius: 999px;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
}
.sw-rc-cbtn svg {
  width: 18px;
  height: 18px;
}
.sw-rc-cbtn--primary {
  --bs-btn-bg: var(--sw-violet);
  --bs-btn-color: #fff;
  --bs-btn-border-color: var(--sw-violet);
  --bs-btn-hover-bg: #5b4fe0;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: #5b4fe0;
  --bs-btn-active-bg: #5b4fe0;
  --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: #5b4fe0;
}

/* =========================
  Deals in this store (carousel)
========================= */
.sw-rc-deals {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sw-rc-deals::-webkit-scrollbar {
  display: none;
}
.sw-rc-deal {
  /* Bootstrap .card (carousel item); position:static keeps subpixel AA */
  scroll-snap-align: start;
  position: static;
  overflow: hidden;
  --bs-card-border-color: rgba(110, 93, 248, 0.6);
  --bs-card-border-radius: 16px;
  box-shadow: 0 6px 18px rgba(26, 26, 56, 0.07);
}
.sw-rc-deal__media {
  position: relative;
  aspect-ratio: 260 / 207;
  overflow: hidden;
}

.sw-rc-deal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sw-rc-deal__media .sw-status {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
}

.sw-rc-deal__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.sw-rc-deal__fav svg {
  width: 15px;
  height: 15px;
}
.sw-rc-deal__fav.is-saved {
  color: #e8113b;
}
.sw-rc-deal__fav.is-saved svg {
  fill: #e8113b;
}
.sw-rc-deal__body {
  padding: 14px 16px 16px;
  gap: 3px; /* off the gap scale */
}
.sw-rc-deal__name {
  font-size: 15px;
}
.sw-rc-deal__meta {
  font-size: 12px;
  color: var(--sw-text-faint);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sw-rc-deal__meta--near {
  color: var(--sw-violet);
  font-weight: 600;
}
.sw-rc-deal__meta svg {
  width: 13px;
  height: 13px;
}
.sw-rc-deal__ptsrow {
  margin-top: 6px; /* off the spacer scale */
}
.sw-rc-deal__pts {
  font-size: 17px;
  font-weight: 800;
  color: var(--sw-violet);
}
.sw-rc-deal__timer {
  gap: 5px;
  line-height: 1.5; /* .badge hardcodes 1 */
  --bs-badge-font-size: 12px;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #b45309;
  --bs-badge-padding-y: 4px;
  --bs-badge-padding-x: 9px;
  background: #fef3c7;
}
.sw-rc-deal__timer svg {
  width: 13px;
  height: 13px;
}
.sw-rc-deal__progress {
  margin-top: 10px;
}
.sw-rc-deal__bar {
  --bs-progress-height: 6px;
  --bs-progress-bg: #eef0f3;
}
.sw-rc-deal__left {
  font-size: 11.5px;
  color: var(--sw-text-faint);
  display: block;
  margin-top: 6px;
}
.sw-rc-deal__actions {
  margin-top: 12px; /* off the spacer scale */
}

.sw-rc-deal__share {
  height: 38px;
  padding: 0 14px;
  flex-shrink: 0;
  border: 1px solid #ddd6fb;
  border-radius: 10px;
  background: #fff;
  color: var(--sw-violet);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sw-rc-deal__share:hover {
  background: #f3f1fe;
}
.sw-rc-deal__share svg {
  width: 15px;
  height: 15px;
}
.sw-rc-deal__claim {
  flex: 1;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: var(--sw-violet);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.sw-rc-deal__claim svg {
  width: 16px;
  height: 16px;
}
.sw-rc-deal__claim:hover {
  filter: brightness(0.96);
}
.sw-rc-deal__view {
  flex: 1;
  height: 38px;
  border: 1px solid #ddd6fb;
  border-radius: 10px;
  background: #fff;
  color: var(--sw-violet);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}
.sw-rc-deal__view svg {
  width: 16px;
  height: 16px;
}
.sw-rc-deal__view:hover {
  background: #f3f1fe;
  color: var(--sw-violet);
}

.sw-rc-deal__view,
.sw-rc-deal__meta--near {
  display: none;
}
.sw-rc-deal[data-instore="false"] .sw-rc-deal__claim,
.sw-rc-deal[data-instore="false"]
  .sw-rc-deal__meta:not(.sw-rc-deal__meta--near) {
  display: none;
}
.sw-rc-deal[data-instore="false"] .sw-rc-deal__view {
  display: inline-flex;
}
.sw-rc-deal[data-instore="false"] .sw-rc-deal__meta--near {
  display: inline-flex;
}

/* =========================
  Achievements rail
========================= */
.sw-rc-achblock {
  position: static; /* .card AA fix */
  --bs-card-border-color: var(--sw-border);
  --bs-card-border-radius: 16px;
  padding: 20px 22px 18px; /* asymmetric bottom, off card-spacer scale */
  box-shadow: 0 1px 2px rgba(15, 16, 32, 0.04);
}
/* bottom "View all" is mobile-only (desktop keeps it in the header) */
.sw-rc-achviewall--bottom {
  display: none;
}
.sw-rc-achblock .sw-rc-achrail {
  list-style: none;
  margin: 0;
  padding: 10px 0 4px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}
.sw-rc-achstep {
  position: relative;
  padding: 0 8px;
}

.sw-rc-achstep::before {
  content: "";
  position: absolute;
  top: 26px;
  left: -50%;
  width: 100%;
  height: 4px;
  background: var(--sw-violet);
  border-radius: 999px;
  z-index: 0;
}
.sw-rc-achstep:first-child::before {
  display: none;
}

.sw-rc-achstep.is-locked::before {
  background: none;
  height: 0;
  top: 28px;
  border-top: 2px dashed #d6d8de;
  border-radius: 0;
}
.sw-rc-achstep.is-locked::after {
  content: "";
  position: absolute;
  top: 22px;
  left: -16px;
  z-index: 1;
  width: 12px;
  height: 12px;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2c7d0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E");
}

/* badge */
.sw-rc-achbadge {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #ede9fd;
  color: var(--sw-violet);
  box-shadow: 0 6px 14px rgba(15, 16, 32, 0.12);
}
.sw-rc-achbadge svg {
  width: 22px;
  height: 22px;
}
.sw-rc-achbadge__num {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.sw-rc-achbadge--streak {
  background: linear-gradient(150deg, #8b73f8, #6429c9);
  color: #fff;
}
.sw-rc-achbadge--amber {
  background: linear-gradient(150deg, #fde7b4, #f6c863);
  color: #c97e1c;
}
.sw-rc-achbadge--teal {
  background: linear-gradient(150deg, #c7efe0, #93dcc0);
  color: #0e9b86;
}
.sw-rc-achbadge--green {
  background: linear-gradient(150deg, #c9efd6, #93dcae);
  color: #0f9d58;
}
.sw-rc-achbadge--current {
  background: #fff;
  color: var(--sw-violet);
  border: 2px dashed var(--sw-violet);
  box-shadow: none;
}
.sw-rc-achbadge--locked {
  background: #f3f4f6;
  color: #b3b8c2;
  border: 2px dashed #d6d8de;
  box-shadow: none;
}

.sw-rc-achbadge__check {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  border: 2px solid #fff;
}
.sw-rc-achbadge__check svg {
  width: 11px;
  height: 11px;
}

.sw-rc-achstep__title {
  font-size: 13px;
  font-weight: 600;
  color: #0f1020;
  margin-top: 12px;
}
.sw-rc-achstep__meta {
  font-size: 11.5px;
  color: var(--sw-text-faint);
  margin-top: 2px;
}
.sw-rc-achstep.is-locked .sw-rc-achstep__title {
  color: #b3b8c2;
}

/* =========================
  Active deals (big cards)
========================= */
.sw-rc-bigdeals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sw-rc-activeviewall--bottom {
  display: none;
}
.sw-rc-bigdeal {
  position: static; /* .card AA fix */
  overflow: hidden;
  --bs-card-border-color: var(--sw-border);
  --bs-card-border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 16, 32, 0.04);
}
.sw-rc-bigdeal__cover {
  position: relative;
  height: 150px;
  overflow: hidden;
}
.sw-rc-bigdeal__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sw-rc-bigdeal__live {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #047857;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.sw-rc-bigdeal__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #10b981;
}
.sw-rc-bigdeal__body {
  padding: 16px 18px 18px;
}
.sw-rc-bigdeal__brand {
  font-size: 16px;
}
.sw-rc-bigdeal__meta {
  font-size: 12px;
  color: var(--sw-text-faint);
  margin-top: 2px;
}
.sw-rc-bigdeal__ptsrow {
  margin-top: 12px; /* off the spacer scale */
}
.sw-rc-bigdeal__pts {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f1020;
}
.sw-rc-bigdeal__trend {
  line-height: 1.5; /* .badge hardcodes 1 */
  --bs-badge-font-size: 12px;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #047857;
  --bs-badge-padding-y: 3px;
  --bs-badge-padding-x: 8px;
  background: #d1fae5;
}
.sw-rc-bigdeal__scans {
  font-size: 12px;
  color: var(--sw-text-muted);
  margin-top: 14px; /* off the spacer scale */
}
.sw-rc-bigdeal__bar {
  --bs-progress-height: 7px;
  --bs-progress-bg: #eef0f3;
  margin-top: 7px;
}
.sw-rc-bigdeal__verified {
  font-size: 11.5px;
  color: var(--sw-text-faint);
  display: block;
  margin-top: 7px;
}
.sw-rc-bigdeal__actions {
  margin-top: 14px; /* off the spacer scale */
}

/* shared retail buttons */
.sw-rc-btn {
  gap: 7px;
  height: 38px; /* cardfoot overrides to 44px */
  flex: 1; /* equal-width in the actions row (basis 0) */
  --bs-btn-bg: #fff;
  --bs-btn-color: var(--sw-text);
  --bs-btn-border-color: var(--sw-border-strong);
  --bs-btn-hover-bg: #f5f5f7;
  --bs-btn-hover-color: var(--sw-text);
  --bs-btn-hover-border-color: var(--sw-border-strong);
  --bs-btn-active-bg: #f5f5f7;
  --bs-btn-active-color: var(--sw-text);
  --bs-btn-active-border-color: var(--sw-border-strong);
  --bs-btn-border-radius: 9px;
  --bs-btn-font-size: 13px;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: 14px;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
}
.sw-rc-btn svg {
  width: 15px;
  height: 15px;
}
.sw-rc-btn--primary {
  --bs-btn-bg: var(--sw-violet);
  --bs-btn-color: #fff;
  --bs-btn-border-color: var(--sw-violet);
  --bs-btn-hover-bg: var(--sw-violet);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-border-color: var(--sw-violet);
  --bs-btn-active-bg: var(--sw-violet);
  --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: var(--sw-violet);
}
.sw-rc-btn--primary:hover {
  filter: brightness(0.96);
}

/* the three retail bars share a violet gradient fill */
.sw-rc-scan__bar .progress-bar,
.sw-rc-deal__bar .progress-bar,
.sw-rc-bigdeal__bar .progress-bar {
  background: linear-gradient(90deg, #7c6cf8, #6d28d9);
}

/* =========================
  Two-column grid (earning + recent)
========================= */
.sw-rc-grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.sw-rc-grid3 {
  --bs-gutter-x: 20px; /* off the spacer scale */
  --bs-gutter-y: 20px;
}
.sw-rc-card {
  overflow-wrap: normal; /* .card break-word gotcha */
  position: static; /* .card sets position:relative -> Chromium drops subpixel text AA; static restores it (no positioned children depend on it) */
  --bs-card-border-color: var(--sw-border);
  --bs-card-border-radius: 16px;
  --bs-card-spacer-y: 20px;
  --bs-card-spacer-x: 22px;
  box-shadow: 0 1px 2px rgba(15, 16, 32, 0.04);
}
.sw-rc-cardhead {
  gap: 12px; /* off the gap scale */
  margin-bottom: 16px;
}
.sw-rc-cardhead__title {
  font-size: 16px;
  margin: 0;
}
.sw-rc-cardhead__sub {
  font-size: 12.5px;
  color: var(--sw-text-muted);
  margin: 3px 0 0;
}
.sw-rc-range__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sw-border-strong);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sw-text);
  cursor: pointer;
  white-space: nowrap;
}
.sw-rc-range__lab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sw-rc-range__btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sw-rc-range__lab svg {
  color: var(--sw-text-muted);
}
/* Bootstrap dropdown themed via its vars (matches the topbar menu) */
.sw-rc-range__menu {
  --bs-dropdown-min-width: 148px;
  --bs-dropdown-padding-y: 6px;
  --bs-dropdown-padding-x: 6px;
  --bs-dropdown-border-color: var(--sw-border);
  --bs-dropdown-border-radius: 10px;
  --bs-dropdown-box-shadow: 0 8px 32px rgba(15, 10, 33, 0.12);
  --bs-dropdown-link-color: var(--sw-text);
  --bs-dropdown-link-hover-color: var(--sw-text);
  --bs-dropdown-link-hover-bg: #f3f4f6;
  --bs-dropdown-link-active-color: var(--sw-violet);
  --bs-dropdown-link-active-bg: var(--sw-violet-50);
  --bs-dropdown-item-padding-x: 10px;
  --bs-dropdown-item-padding-y: 7px;
  --bs-dropdown-font-size: 12.5px;
  box-shadow: var(--bs-dropdown-box-shadow);
}
.sw-rc-range__menu .dropdown-item {
  border-radius: 6px;
  font-weight: 600;
}

/* earning */
.sw-rc-earn__stats {
  display: flex;
  gap: 28px;
  margin-bottom: 8px;
}
.sw-rc-earn__k {
  font-size: 12px;
  color: var(--sw-text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sw-rc-earn__v {
  display: block;
}
.sw-rc-earn__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.sw-rc-earn__dot--violet {
  background: #6d5ef7;
}
.sw-rc-earn__dot--green {
  background: #22c55e;
}
.sw-rc-earn__dot--cyan {
  background: #0ea5e9;
}
.sw-rc-earn__v {
  font-size: 18px;
  font-weight: 800;
  color: #0f1020;
  letter-spacing: -0.3px;
}
/* Chart.js responsive pattern: positioned wrapper owns the height and
   the canvas fills it; min-width lets the grid column shrink */
.sw-rc-earn__chart {
  position: relative;
  height: 220px;
  /* stats margin-bottom (8px) supplies the gap; flex-column no longer
     collapses these two margins as block flow did */
}
.sw-rc-grid2 > * {
  min-width: 0;
}

.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 svg {
  width: 18px;
  height: 18px;
}
.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__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__time {
  font-size: 11px;
  color: var(--sw-text-faint);
  margin-top: 2px;
}
.text-end {
  text-align: right;
}

.sw-rc-share,
.sw-rc-rate {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sw-rc-cardfoot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.sw-rc-cardfoot .sw-rc-btn {
  flex: 1;
  height: 44px;
}
.sw-rc-foot-pts {
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.5; /* .badge hardcodes 1 */
  --bs-badge-font-size: 12.5px;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #0f9d58;
  --bs-badge-padding-y: 11px;
  --bs-badge-padding-x: 14px;
  --bs-badge-border-radius: 10px;
  background: #d8f3e3;
}

/* =========================
  Share your story (lavender card)
========================= */
.sw-rc-share {
  --bs-card-bg: #f3f1fe;
  --bs-card-border-color: #e6e2fb;
}
.sw-rc-share__head,
.sw-rc-rate__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sw-rc-share__ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--sw-violet);
}
.sw-rc-rate__ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sw-violet);
  color: #fff;
}
.sw-rc-share__ico svg,
.sw-rc-rate__ico svg {
  width: 19px;
  height: 19px;
}
.sw-rc-card__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f1020;
  margin: 0;
}
.sw-rc-card__sub {
  font-size: 12.5px;
  color: var(--sw-text-muted);
  margin: 2px 0 0;
}
.sw-rc-share__card {
  background: #fff;
  border: 1px solid #ece8fb;
  border-radius: 14px;
  padding: 14px;
}
.sw-rc-share__author {
  gap: 10px; /* off the gap scale */
}
.sw-rc-share__id {
  flex: 1; /* basis 0 */
}
.sw-rc-share__name {
  font-size: 13px;
  font-weight: 700;
  color: #0f1020;
}
.sw-rc-share__loc {
  font-size: 11.5px;
  color: var(--sw-text-faint);
}
.sw-rc-share__gold {
  flex-shrink: 0;
  line-height: 1.5; /* .badge hardcodes 1 */
  --bs-badge-font-size: 10.5px;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #8a5a00;
  --bs-badge-padding-y: 4px;
  --bs-badge-padding-x: 9px;
  background: #fdeccb;
}
.sw-rc-share__gold svg {
  width: 11px;
  height: 11px;
}
.sw-rc-share__body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--sw-text);
  margin: 12px 0;
}

.sw-rc-share__pill {
  gap: 5px; /* off the gap scale */
  line-height: 1.5; /* .badge hardcodes 1 */
  --bs-badge-font-size: 11.5px;
  --bs-badge-font-weight: 700;
  --bs-badge-padding-y: 5px;
  --bs-badge-padding-x: 11px;
}
.sw-rc-share__pill svg {
  width: 12px;
  height: 12px;
}
.sw-rc-share__pill--violet {
  background: #ede9fd;
  --bs-badge-color: var(--sw-violet);
}
.sw-rc-share__pill--streak {
  background: linear-gradient(135deg, #f97316, #ea580c);
  --bs-badge-color: #fff;
}
.sw-rc-share__cardfoot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0eefb;
}
.sw-rc-share__url {
  font-size: 11.5px;
  color: var(--sw-text-faint);
}
.sw-rc-share__acts {
  display: inline-flex;
  gap: 12px;
  color: #9ca3af;
}
.sw-rc-share__acts svg {
  width: 16px;
  height: 16px;
}
.sw-rc-share__socials {
  margin: 14px 0 0; /* off the spacer scale */
}
.sw-rc-soc {
  gap: 6px; /* off the gap scale */
  --bs-btn-color: #0f1020;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--sw-border);
  --bs-btn-hover-color: #0f1020;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: var(--sw-border);
  --bs-btn-active-color: #0f1020;
  --bs-btn-active-bg: #fff;
  --bs-btn-active-border-color: var(--sw-border);
  --bs-btn-font-size: 11.5px;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 6px;
  --bs-btn-padding-x: 12px;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
}
.sw-rc-soc svg {
  width: 15px;
  height: 15px;
}
.sw-rc-soc--x {
  --bs-btn-bg: #0f1020;
  --bs-btn-border-color: #0f1020;
  --bs-btn-hover-bg: #0f1020;
  --bs-btn-hover-border-color: #0f1020;
  --bs-btn-active-bg: #0f1020;
  --bs-btn-active-border-color: #0f1020;
  --bs-btn-padding-y: 7px;
  --bs-btn-padding-x: 7px;
}
.sw-rc-soc--x svg {
  width: 14px;
  height: 14px;
}

/* =========================
  Rate this store
========================= */
.sw-rc-rate__box {
  background: #f8f7fe;
  border: 1px solid #ece8fb;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.sw-rc-rate__q {
  font-size: 13px;
  font-weight: 600;
  color: #0f1020;
  display: block;
  margin-bottom: 12px;
}

.sw-rc-stars button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #d6d3e6;
  line-height: 0;
}
.sw-rc-stars button svg {
  width: 30px;
  height: 30px;
}
.sw-rc-stars button.is-on {
  color: #f6a609;
  fill: #f6a609;
}
.sw-rc-stars button.is-on svg {
  fill: #f6a609;
}
.sw-rc-rate__or {
  font-size: 12px;
  color: var(--sw-text-faint);
  display: block;
  margin: 16px 0 10px;
}
.sw-rc-rate__cats {
  margin-bottom: 16px;
}
.sw-rc-chip {
  --bs-btn-color: var(--sw-text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--sw-border-strong);
  --bs-btn-hover-color: var(--sw-text);
  --bs-btn-hover-bg: #f5f5f7;
  --bs-btn-hover-border-color: var(--sw-border-strong);
  --bs-btn-active-color: var(--sw-text);
  --bs-btn-active-bg: #f5f5f7;
  --bs-btn-active-border-color: var(--sw-border-strong);
  --bs-btn-font-size: 12.5px;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-y: 6px;
  --bs-btn-padding-x: 13px;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
}

/* =========================
  Leaderboard — Top Retail Customers
========================= */
.sw-rc-lead__head {
  gap: 9px; /* off the gap scale */
  margin-bottom: 14px;
}
.sw-rc-lead__trophy {
  font-size: 19px;
  line-height: 1;
  flex-shrink: 0;
}
.sw-rc-lead__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f1020;
  margin: 0;
}
.sw-rc-leadlist {
  gap: 10px; /* off the gap scale */
}
.sw-rc-leadrow {
  gap: 11px; /* off the gap scale */
  padding: 10px 12px;
  border: 1px solid var(--sw-border);
  border-radius: 14px;
}
.sw-rc-leadrow.is-you {
  background: #f3f1fe;
  border-color: #c9bdfb;
}
.sw-rc-leadrow__rank {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: #e5e7eb;
}
.sw-rc-leadrow__rank--1 {
  background: #f59e0b;
  color: #fff;
}
.sw-rc-leadrow__rank--2 {
  background: #cbd0d8;
  color: #fff;
}
.sw-rc-leadrow__rank--3 {
  background: #cd915a;
  color: #fff;
}
.sw-rc-leadrow__avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}
.sw-rc-leadrow .sw-rc-avatar--sm {
  width: 38px;
  height: 38px;
  font-size: 13px;
}
.sw-rc-leadrow__id {
  flex: 1; /* basis 0, not flex-fill's auto */
}
.sw-rc-leadrow__name {
  font-size: 13.5px;
}
.sw-rc-leadrow.is-you .sw-rc-leadrow__name {
  color: var(--sw-violet);
}
.sw-rc-leadrow__you {
  color: var(--sw-violet);
  font-weight: 700;
  margin-left: 2px;
}
.sw-rc-leadrow__loc {
  font-size: 11.5px;
  color: var(--sw-text-faint);
  margin-top: 1px;
}
.sw-rc-leadrow__pts {
  font-size: 14px;
  font-weight: 800;
  color: #0f1020;
}
.sw-rc-leadrow__scans {
  font-size: 11px;
  color: var(--sw-text-faint);
  margin-top: 1px;
}

.sw-rc-storebar {
  /* pinned to the viewport, centered over the content column
     (50% + half the 240px sidebar) */
  position: fixed;
  bottom: 20px;
  left: calc(50% + 120px);
  transform: translateX(-50%);
  z-index: 30;
  width: fit-content;
  max-width: calc(100vw - 256px);
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 16, 32, 0.16);
  padding: 8px;
}
/* location selector + dropdown */
.sw-rc-storebar__select {
  position: relative;
}
.sw-rc-storebar__selbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f1fe;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px 8px 10px;
  cursor: pointer;
  text-align: left;
}
.sw-rc-storebar__selbtn:hover {
  background: #ece8fb;
}
.sw-rc-storebar__pin {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #fff;
  color: var(--sw-violet);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sw-rc-storebar__pin svg {
  width: 16px;
  height: 16px;
}
.sw-rc-storebar__loc {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.sw-rc-storebar__kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--sw-violet);
}
.sw-rc-storebar__name {
  font-size: 13px;
  font-weight: 700;
  color: #0f1020;
  white-space: nowrap;
}
.sw-rc-storebar__chev {
  width: 15px;
  height: 15px;
  color: var(--sw-text-muted);
  flex-shrink: 0;
  transition: transform 0.18s;
}
.sw-rc-storebar__select.is-open .sw-rc-storebar__chev {
  transform: rotate(180deg);
}

.sw-rc-storebar__menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 16, 32, 0.16);
  padding: 6px;
  display: none;
}
.sw-rc-storebar__select.is-open .sw-rc-storebar__menu {
  display: block;
}
.sw-rc-storebar__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.sw-rc-storebar__opt:hover {
  background: #f5f5f7;
}
.sw-rc-storebar__opt.is-selected {
  background: #f3f1fe;
}
.sw-rc-storebar__opt-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0f1020;
}
.sw-rc-storebar__opt.is-selected .sw-rc-storebar__opt-name {
  color: var(--sw-violet);
}
.sw-rc-storebar__opt-meta {
  display: block;
  font-size: 11px;
  color: var(--sw-text-faint);
  margin-top: 1px;
}
.sw-rc-storebar__opt-check {
  width: 16px;
  height: 16px;
  color: var(--sw-violet);
  flex-shrink: 0;
  opacity: 0;
}
.sw-rc-storebar__opt.is-selected .sw-rc-storebar__opt-check {
  opacity: 1;
}

/* action buttons */
.sw-rc-sbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #0f1020;
  text-decoration: none;
  white-space: nowrap;
}
.sw-rc-sbtn svg {
  width: 18px;
  height: 18px;
  color: var(--sw-text-muted);
}
.sw-rc-sbtn:hover {
  background: #f5f5f7;
  color: #0f1020;
}
.sw-rc-sbtn--primary {
  background: var(--sw-violet);
  color: #fff;
}
.sw-rc-sbtn--primary svg {
  color: #fff;
}
.sw-rc-sbtn--primary:hover {
  background: var(--sw-violet);
  color: #fff;
  filter: brightness(0.96);
}

/* =========================
  Floating store bar (mobile)
========================= */
.sw-rc-mobar {
  display: none;
  position: sticky;
  bottom: 16px;
  z-index: 30;
  margin: 12px auto 4px;
  width: fit-content;
  max-width: calc(100% - 24px);
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--sw-border);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 16, 32, 0.18);
  padding: 6px;
}
.sw-rc-mobar__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f1020;
  text-decoration: none;
  white-space: nowrap;
}
.sw-rc-mobar__btn svg {
  width: 17px;
  height: 17px;
  color: var(--sw-text-muted);
}
.sw-rc-mobar__btn--primary {
  background: var(--sw-violet);
  color: #fff;
}
.sw-rc-mobar__btn--primary svg {
  color: #fff;
}
@media (max-width: 991.98px) {
  .sw-rc-mobar {
    display: flex;
  }
}

/* =========================
  Responsive
========================= */
@media (max-width: 1199.98px) {
  .sw-rc-hero {
    grid-template-columns: 1fr;
  }
  .sw-rc-grid2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 991.98px) {
  .sw-rc-bigdeals {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(290px, 86%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sw-rc-bigdeals::-webkit-scrollbar {
    display: none;
  }
  .sw-rc-bigdeal {
    scroll-snap-align: start;
  }
  .sw-rc-activeviewall--top {
    display: none;
  }
  .sw-rc-activeviewall--bottom {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
  }
  .sw-rc-achblock .sw-rc-achrail {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 22px;
  }
  .sw-rc-achstep::before,
  .sw-rc-achstep::after {
    display: none !important;
  }
  .sw-rc-achblock .sw-rc-achviewall--top {
    display: none;
  }
  .sw-rc-achviewall--bottom {
    display: flex;
    justify-content: center;
    margin-top: 18px;
  }
}

.sw-rc-scanbtn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--sw-violet);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(109, 94, 247, 0.3);
}
.sw-rc-scanbtn svg {
  width: 20px;
  height: 20px;
}
.sw-rc-scanbtn:active {
  filter: brightness(0.96);
}

@media (max-width: 991.98px) {
  .sw-rc-storebar {
    display: none;
  }
  .sw-rc-scanbtn {
    display: flex;
  }
  .sw-rc-scan {
    display: none;
  }
  .sw-rc-deals {
    grid-auto-columns: minmax(210px, 78%);
  }

  .sw-app__content {
    display: flex;
    flex-direction: column;
    gap: 34px;
  }
  .sw-app__content > * {
    order: 5;
  }

  .sw-app__content > section,
  .sw-app__content > .sw-rc-grid2,
  .sw-app__content > .sw-rc-grid3 {
    margin-bottom: 0;
  }
  .sw-rc-hero {
    order: 1;
  }
  .sw-rc-scanbtn {
    order: 2;
  }
  .sw-rc-dealsblock {
    order: 3;
  }
  .sw-rc-statsrow {
    order: 4;
  }

  .sw-rc-hero__main {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "greet trend"
      "tier  vs"
      "label label"
      "pts   pts";
    align-items: center;
    gap: 7px 12px;
    padding: 18px 20px;
  }
  .sw-rc-hero__top {
    display: contents;
  }
  .sw-rc-hero__greet {
    grid-area: greet;
    margin: 0;
  }
  .sw-rc-hero__tier {
    grid-area: tier;
    justify-self: start;
  }
  .sw-rc-hero__label {
    grid-area: label;
    margin-top: 2px;
  }
  .sw-rc-hero__pts {
    grid-area: pts;
  }
  .sw-rc-hero__foot {
    display: contents;
  }
  .sw-rc-hero__trend {
    grid-area: trend;
    justify-self: end;
    margin: 0;
  }
  .sw-rc-hero__vs {
    grid-area: vs;
    justify-self: end;
  }
}
@media (max-width: 575.98px) {
  .sw-rc-hero__main {
    padding: 18px 18px 16px;
  }
  .sw-rc-hero__pts {
    font-size: 30px;
  }
  .sw-rc-earn .sw-rc-cardhead {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .sw-rc-earn .sw-rc-range,
  .sw-rc-earn .sw-rc-range__btn,
  .sw-rc-earn .sw-rc-range__menu {
    width: 100%;
  }
  .sw-rc-earn .sw-rc-range__btn {
    height: 44px;
  }
  .sw-rc-earn__stats {
    gap: 10px;
    flex-wrap: nowrap;
  }
  .sw-rc-earn__stats > div {
    flex: 1;
    min-width: 0;
  }
  .sw-rc-earn__k {
    font-size: 11px;
  }
  .sw-rc-earn__v {
    font-size: 15px;
  }
  .sw-rc-deal__share-txt {
    display: none;
  }
  .sw-rc-deal__share {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
}

/* =========================
  Stat / metric card
========================= */
/* =========================
  Dashboard — Stat Cards Start
========================= */
.sw-stat {
  overflow-wrap: normal; /* .card break-word gotcha */
  position: static; /* .card position:relative drops subpixel text AA */
  --bs-card-border-color: #e5e7eb;
  --bs-card-border-radius: 16px;
  --bs-card-spacer-y: 20px;
  --bs-card-spacer-x: 24px;
  gap: 16px; /* on-scale but keeps the card flex-column spacing */
}

/* align-items breakpoint-owned (center -> flex-start <576) */
.sw-stat__head {
  align-items: center;
}
.sw-stat__head-l {
  align-items: center;
  gap: 10px; /* off the gap scale */
}

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

.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;
  color: #6b7280;
}

.sw-stat__more {
  width: 18px;
  height: 18px;
  color: #9ca3af;
}

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

.sw-stat__num-wrap {
  gap: 12px; /* off the gap scale */
}

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

.sw-stat__trend {
  gap: 6px; /* off the gap scale */
}

.sw-stat__trend-pill {
  gap: 2px;
  line-height: 14px; /* .badge hardcodes 1 */
  --bs-badge-font-size: 11px;
  --bs-badge-font-weight: 700;
  --bs-badge-padding-y: 2px;
  --bs-badge-padding-x: 8px;
  padding-left: 6px; /* design trims the icon side */
}

.sw-stat__trend-pill--up {
  background: #d1fae5;
  --bs-badge-color: #065f46;
}
.sw-stat__trend-pill--down {
  background: #fef2f2;
  --bs-badge-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;
}

/* merchant 4-across tightening */
@media (min-width: 1200px) {
  .sw-stat__value {
    font-size: 26px;
    line-height: 34px;
    white-space: nowrap;
  }
  .sw-stat__spark {
    max-width: 52px;
  }
}

/* metric cards on mobile */
@media (max-width: 575.98px) {
  .sw-stat {
    padding: 16px;
    gap: 12px;
  }
  .sw-stat__head {
    align-items: flex-start;
  }
  .sw-stat__head-l {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .sw-stat__body {
    gap: 6px;
    align-items: center;
  }
  .sw-stat__num-wrap {
    gap: 10px;
    min-width: 0;
  }
  .sw-stat__value {
    font-size: 18px;
    line-height: 24px;
    letter-spacing: -0.4px;
    white-space: nowrap;
  }
  .sw-stat__spark {
    max-width: 34px;
    height: 26px;
  }
}

.sw-rc-viewall {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.sw-achm .modal-dialog {
  max-width: 720px;
}
.sw-achm__content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3.5rem);
}
.sw-achm__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 14px;
  flex-shrink: 0;
}
.sw-achm__title {
  font-size: 20px;
  font-weight: 700;
  color: #0f0f21;
  margin: 0;
}
.sw-achm__sub {
  font-size: 13px;
  color: #6b7280;
  margin: 4px 0 0;
}
.sw-achm__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #f3f4f6;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sw-achm__close:hover {
  background: #e7e8ec;
  color: #0f0f21;
}
.sw-achm__close svg {
  width: 16px;
  height: 16px;
}
.sw-achm__body {
  padding: 0 24px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* stats strip */
.sw-achm-stats {
  display: flex;
  background: #f3f1fe;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}
.sw-achm-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 16px;
}
.sw-achm-stat + .sw-achm-stat {
  border-left: 1px solid #e2ddfb;
}
.sw-achm-stat__num {
  font-size: 24px;
  font-weight: 700;
  color: #0f0f21;
}
.sw-achm-stat__num--violet {
  color: #6e5df8;
}
.sw-achm-stat__label {
  font-size: 12px;
  color: #6b7280;
}

/* badge grid */
.sw-achm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.sw-achm-badge {
  background: #fff;
  border: 1px solid #edf0f2;
  border-radius: 14px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.sw-achm-badge--progress {
  background: #f6f4ff;
  border-color: #e7e2fc;
}
.sw-achm-badge--locked {
  background: #f7f8fa;
}
.sw-achm-badge__ico {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #6e5df8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sw-achm-badge__ico svg {
  width: 22px;
  height: 22px;
}
.sw-achm-badge--locked .sw-achm-badge__ico {
  background: #e6e8ee;
  color: #9ca3af;
}
.sw-achm-badge__title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f0f21;
}
.sw-achm-badge--locked .sw-achm-badge__title {
  color: #9ca3af;
}
.sw-achm-badge__status {
  font-size: 12px;
  font-weight: 600;
  color: #1f9d57;
}
.sw-achm-badge__status--locked {
  color: #9ca3af;
  font-weight: 500;
}
.sw-achm-badge__prog {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.sw-achm-badge__prog span {
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
}
.sw-achm-badge__bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #e2ddfb;
  overflow: hidden;
}
.sw-achm-badge__bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #6e5df8;
}

/* footer */
.sw-achm__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px 20px;
  border-top: 1px solid #edf0f2;
}
.sw-achm__note {
  font-size: 13px;
  color: #6b7280;
}
.sw-achm__cta {
  background: #6e5df8;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  white-space: nowrap;
}
.sw-achm__cta:hover {
  background: #5d4ee6;
}

/* ===== Mobile bottom sheet ===== */
@media (max-width: 575.98px) {
  .sw-achm-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sw-achm__head,
  .sw-achm__body,
  .sw-achm__foot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .sw-achm-stat {
    padding: 0 10px;
  }
  .sw-achm .modal-dialog {
    margin: 0;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
  }
  .sw-achm__content {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  .sw-achm__head {
    padding-top: 22px;
  }
  .sw-achm__content::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #d6d8de;
    z-index: 2;
  }
  .sw-achm.fade .modal-dialog {
    transform: translateY(100%);
    transition: transform 0.28s ease;
  }
  .sw-achm.show .modal-dialog {
    transform: none;
  }
  
  .sw-achm__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .sw-achm__cta {
    width: 100%;
  }
}
