/* Final isolated affiliate experience pass. These selectors are scoped to the
   affiliate routes updated in this revision. */

.affiliate-dashboard-experience-page,
.affiliate-how-page,
.affiliate-league-manager-page,
.affiliate-past-promotions-page,
.affiliate-settings-page {
  background:
    radial-gradient(circle at 10% 20%, rgba(223, 17, 27, 0.12), transparent 30%),
    radial-gradient(circle at 88% 45%, rgba(25, 132, 211, 0.12), transparent 32%),
    #04070b;
  min-height: 100vh;
  overflow: hidden;
}

.affiliate-detail-workspace {
  background:
    linear-gradient(180deg, rgba(4, 7, 11, 0.98), rgba(5, 11, 17, 0.98)),
    url('/images/fmm-experience/grid-texture.svg');
  min-height: 100vh;
  padding: clamp(105px, 11vw, 145px) clamp(16px, 4vw, 58px) 70px;
}

.affiliate-detail-workspace > .xp-dashboard-back {
  margin: 0 auto 22px;
  max-width: 1360px;
}

/* How it works */
.affiliate-how-back {
  align-items: center;
  background: rgba(6, 10, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  left: clamp(16px, 4vw, 64px);
  min-height: 42px;
  padding: 0 16px;
  position: absolute;
  text-transform: uppercase;
  top: 92px;
  z-index: 20;
}

.affiliate-how-back:hover {
  background: rgba(223, 17, 27, 0.88);
  border-color: rgba(223, 17, 27, 0.9);
}

.affiliate-how-main {
  position: relative;
}

.affiliate-how-workflow {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.affiliate-how-workflow article {
  background:
    linear-gradient(150deg, rgba(17, 25, 35, 0.98), rgba(6, 10, 16, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.3);
  min-height: 264px;
  overflow: hidden;
  padding: 22px;
  position: relative;
  transition: border-color 170ms ease, transform 170ms ease;
}

.affiliate-how-workflow article::after {
  background: linear-gradient(90deg, var(--ff-red, #df111b), transparent);
  bottom: 0;
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  width: 55%;
}

.affiliate-how-workflow article:hover {
  border-color: rgba(223, 17, 27, 0.48);
  transform: translateY(-4px);
}

.affiliate-how-step-number {
  color: rgba(255, 255, 255, 0.08);
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 64px;
  line-height: 0.8;
  position: absolute;
  right: 17px;
  top: 19px;
}

.affiliate-how-step-icon {
  align-items: center;
  background: linear-gradient(145deg, rgba(223, 17, 27, 0.28), rgba(223, 17, 27, 0.08));
  border: 1px solid rgba(223, 17, 27, 0.36);
  border-radius: 13px;
  color: #ff5963;
  display: flex;
  font-size: 24px;
  height: 52px;
  justify-content: center;
  margin-bottom: 38px;
  width: 52px;
}

.affiliate-how-workflow h3 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 26px;
  line-height: 1;
  margin: 0 0 11px;
  max-width: 82%;
  text-transform: uppercase;
}

.affiliate-how-workflow p {
  color: var(--ff-muted, rgba(255, 255, 255, 0.64));
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.affiliate-how-revenue-panel {
  align-items: stretch;
  background:
    linear-gradient(110deg, rgba(6, 10, 16, 0.98) 0%, rgba(10, 18, 28, 0.94) 58%, rgba(223, 17, 27, 0.16) 100%),
    url('/images/fmm-experience/fighter-duel-arena.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  margin: 20px 0 72px;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(26px, 5vw, 58px);
  position: relative;
}

.affiliate-how-revenue-panel::before {
  background: linear-gradient(90deg, rgba(4, 7, 11, 0.98), rgba(4, 7, 11, 0.72) 60%, rgba(4, 7, 11, 0.18));
  content: '';
  inset: 0;
  position: absolute;
}

.affiliate-how-revenue-copy,
.affiliate-how-revenue-visual {
  position: relative;
  z-index: 2;
}

.affiliate-how-revenue-copy h2 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.92;
  margin: 12px 0 18px;
  max-width: 760px;
  text-transform: uppercase;
}

.affiliate-how-revenue-copy > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.7;
  max-width: 760px;
}

.affiliate-how-money-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.affiliate-how-money-grid > div {
  background: rgba(4, 8, 13, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 15px;
}

.affiliate-how-money-grid strong {
  color: #fff;
  font-family: var(--ff-display, sans-serif);
  font-size: 16px;
  text-transform: uppercase;
}

.affiliate-how-money-grid span {
  color: var(--ff-muted, rgba(255, 255, 255, 0.6));
  font-size: 11px;
  line-height: 1.5;
}

.affiliate-how-revenue-visual {
  align-items: end;
  display: flex;
  justify-content: center;
  min-height: 390px;
}

.affiliate-how-revenue-visual img {
  bottom: -58px;
  height: 520px;
  max-width: none;
  object-fit: contain;
  position: absolute;
  right: -20px;
  width: 420px;
}

.affiliate-how-revenue-visual > div {
  background: rgba(5, 9, 14, 0.86);
  border: 1px solid rgba(223, 17, 27, 0.45);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  display: grid;
  left: 0;
  padding: 18px 22px;
  position: absolute;
  top: 50px;
  z-index: 2;
}

.affiliate-how-revenue-visual span,
.affiliate-how-revenue-visual small {
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--ff-display, sans-serif);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.affiliate-how-revenue-visual strong {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 72px;
  line-height: 0.95;
}

.affiliate-how-feature-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.affiliate-how-feature-grid article {
  align-items: flex-start;
  background: linear-gradient(145deg, rgba(15, 23, 33, 0.98), rgba(7, 11, 17, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  display: flex;
  gap: 15px;
  padding: 20px;
}

.affiliate-how-feature-grid article > svg {
  color: var(--ff-red, #df111b);
  flex: 0 0 auto;
  font-size: 28px;
  margin-top: 4px;
}

.affiliate-how-feature-grid h3 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 21px;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.affiliate-how-feature-grid p {
  color: var(--ff-muted, rgba(255, 255, 255, 0.62));
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.affiliate-how-cta,
.affiliate-past-next-panel {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(223, 17, 27, 0.2), rgba(12, 19, 28, 0.98) 52%, rgba(18, 104, 166, 0.15)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(223, 17, 27, 0.3);
  border-radius: 18px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 35px 0 56px;
  padding: clamp(22px, 4vw, 38px);
}

.affiliate-how-cta h2,
.affiliate-past-next-panel h2 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.98;
  margin: 8px 0;
  max-width: 780px;
  text-transform: uppercase;
}

.affiliate-how-cta > div:first-child > p:not(.xp-eyebrow) {
  color: var(--ff-muted, rgba(255, 255, 255, 0.62));
  line-height: 1.55;
  margin: 0;
}

.affiliate-how-cta > div:last-child {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

/* Affiliate profile split */
.affiliate-account-tabs {
  align-items: center;
  background: rgba(10, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  display: flex;
  gap: 8px;
  margin-top: -6px;
  padding: 7px;
  width: fit-content;
}

.affiliate-account-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 13px;
  font-weight: 900;
  gap: 9px;
  min-height: 45px;
  padding: 0 17px;
  text-transform: uppercase;
}

.affiliate-account-tabs button.is-active {
  background: linear-gradient(135deg, var(--ff-red, #df111b), #a60812);
  box-shadow: 0 10px 28px rgba(223, 17, 27, 0.22);
  color: #fff;
}

.affiliate-profile-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.affiliate-public-profile-card {
  background:
    linear-gradient(180deg, rgba(6, 10, 16, 0.22), rgba(6, 10, 16, 0.98) 58%),
    url('/images/fmm-experience/fighter-duel-panel.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
  display: grid;
  justify-items: center;
  min-height: 610px;
  overflow: hidden;
  padding: 52px 24px 24px;
  position: relative;
  text-align: center;
}

.affiliate-public-profile-card::before {
  background: radial-gradient(circle at 50% 18%, rgba(223, 17, 27, 0.32), transparent 35%);
  content: '';
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.affiliate-public-profile-card > * {
  position: relative;
  z-index: 2;
}

.affiliate-public-profile-card > img {
  border: 3px solid rgba(223, 17, 27, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(223, 17, 27, 0.1), 0 20px 45px rgba(0, 0, 0, 0.4);
  height: 142px;
  object-fit: cover;
  width: 142px;
}

.affiliate-public-profile-card > p {
  color: #ff6972;
  font-family: var(--ff-display, sans-serif);
  font-size: 10px;
  letter-spacing: 0.11em;
  margin: 20px 0 5px;
  text-transform: uppercase;
}

.affiliate-public-profile-card h2 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

.affiliate-public-profile-card > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  margin-top: 6px;
}

.affiliate-public-profile-card blockquote {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.65;
  margin: 25px 0;
  max-width: 340px;
}

.affiliate-public-profile-card > div {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.affiliate-public-profile-card small {
  background: rgba(4, 8, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.56);
  display: grid;
  font-family: var(--ff-display, sans-serif);
  font-size: 9px;
  gap: 5px;
  padding: 13px;
  text-transform: uppercase;
}

.affiliate-public-profile-card small strong {
  color: #fff;
  font-size: 22px;
}

.affiliate-public-profile-card .theme-btn {
  justify-content: center;
  margin-top: auto;
  width: 100%;
}

.affiliate-account-settings-panel,
.affiliate-profile-panel {
  margin-bottom: 0 !important;
}

.affiliate-payment-method-list {
  display: grid;
  gap: 10px;
}

.affiliate-payment-method-list > label {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  display: grid;
  gap: 9px;
  padding: 12px;
  transition: border-color 160ms ease, background 160ms ease;
}

.affiliate-payment-method-list > label.is-selected {
  background: rgba(223, 17, 27, 0.07);
  border-color: rgba(223, 17, 27, 0.48);
}

.affiliate-payment-method-list > label > span {
  align-items: center;
  color: #fff;
  display: flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 13px;
  gap: 9px;
  text-transform: uppercase;
}

.affiliate-payment-method-list input[type='radio'] {
  accent-color: var(--ff-red, #df111b);
  height: 17px;
  width: 17px;
}

.affiliate-payment-method-list > label > input:not([type='radio']) {
  background: rgba(0, 0, 0, 0.34) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 9px !important;
  color: #fff !important;
  min-height: 46px;
  padding: 0 12px !important;
}

.affiliate-payout-card .theme-btn {
  margin-top: auto;
}

.affiliate-payout-modal-backdrop {
  align-items: center;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1000000;
}

.affiliate-payout-modal {
  background:
    linear-gradient(150deg, rgba(17, 25, 35, 0.99), rgba(5, 9, 14, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(223, 17, 27, 0.35);
  border-radius: 18px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.66);
  color: #fff;
  max-width: 520px;
  padding: 30px;
  position: relative;
  width: 100%;
}

.affiliate-payout-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 38px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 38px;
}

.affiliate-payout-modal h2 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 38px;
  margin: 9px 0;
  text-transform: uppercase;
}

.affiliate-payout-modal > p:not(.xp-eyebrow) {
  color: var(--ff-muted, rgba(255, 255, 255, 0.62));
  line-height: 1.55;
}

.affiliate-payout-modal > label {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.affiliate-payout-modal > label > span {
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--ff-display, sans-serif);
  font-size: 11px;
  text-transform: uppercase;
}

.affiliate-payout-modal input {
  background: rgba(0, 0, 0, 0.38) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 20px;
  min-height: 54px;
  padding: 0 14px !important;
}

.affiliate-payout-modal > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* League and archive guard rails */
.affiliate-session-required {
  padding: 160px 20px 90px;
}

.affiliate-session-required .xp-empty-state {
  margin: 0 auto;
  max-width: 760px;
}

.affiliate-league-manager-page .xp-route-loading,
.affiliate-past-promotions-page .xp-route-loading {
  min-height: 220px;
}

.affiliate-league-member-grid article {
  min-width: 0;
}

.affiliate-league-member-grid article > span,
.affiliate-league-member-grid article > div {
  min-width: 0;
}

.affiliate-past-next-panel {
  margin-top: 0;
}

.affiliate-past-next-panel > div {
  min-width: 0;
}

@media (max-width: 1100px) {
  .affiliate-how-workflow,
  .affiliate-how-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .affiliate-how-revenue-panel {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .affiliate-profile-layout {
    grid-template-columns: 1fr;
  }

  .affiliate-public-profile-card {
    min-height: 530px;
  }
}

@media (max-width: 820px) {
  .affiliate-how-back {
    top: 82px;
  }

  .affiliate-how-workflow,
  .affiliate-how-feature-grid,
  .affiliate-how-money-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-how-revenue-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .affiliate-how-revenue-visual {
    min-height: 360px;
  }

  .affiliate-how-revenue-visual img {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .affiliate-how-cta,
  .affiliate-past-next-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-how-cta > div:last-child,
  .affiliate-past-next-panel > .theme-btn {
    width: 100%;
  }

  .affiliate-how-cta .theme-btn,
  .affiliate-past-next-panel .theme-btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .affiliate-how-back {
    font-size: 0;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 42px;
  }

  .affiliate-how-back svg {
    font-size: 14px;
  }

  .affiliate-how-workflow article {
    min-height: 238px;
    padding: 18px;
  }

  .affiliate-how-revenue-panel {
    border-radius: 16px;
    padding: 22px 16px;
  }

  .affiliate-how-revenue-copy h2 {
    font-size: 39px;
  }

  .affiliate-how-revenue-visual img {
    height: 440px;
    width: 350px;
  }

  .affiliate-account-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .affiliate-account-tabs button {
    justify-content: center;
    width: 100%;
  }

  .affiliate-public-profile-card {
    min-height: 500px;
    padding-inline: 16px;
  }

  .affiliate-payout-modal {
    padding: 25px 17px 18px;
  }

  .affiliate-payout-modal > div:last-child {
    flex-direction: column;
  }

  .affiliate-payout-modal .theme-btn {
    justify-content: center;
    width: 100%;
  }
}

/* Affiliate workspace navigation and final route alignment ---------------- */
.affiliate-dashboard-experience-page,
.affiliate-how-page-final,
.affiliate-league-page-final,
.affiliate-past-promotions-page,
.affiliate-profile-page-final,
.affiliate-account-settings-page {
  background:
    radial-gradient(circle at 10% 20%, rgba(223, 17, 27, 0.14), transparent 30%),
    radial-gradient(circle at 88% 45%, rgba(25, 132, 211, 0.12), transparent 32%),
    linear-gradient(180deg, #04070b 0%, #070c12 50%, #04070b 100%);
  color: #fff;
  min-height: 100vh;
  overflow-x: clip;
}

.affiliate-experience-nav {
  background: rgba(4, 8, 13, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 35;
}

.affiliate-experience-nav-inner {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 9px;
  padding-top: 9px;
  scrollbar-width: thin;
}

.affiliate-experience-nav-inner > a {
  align-items: center;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 11px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.035em;
  min-height: 43px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.affiliate-experience-nav-inner > a:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.affiliate-experience-nav-inner > a.is-active {
  background: linear-gradient(135deg, var(--ff-red, #df111b), #9e0811);
  border-color: rgba(255, 122, 130, 0.48);
  box-shadow: 0 10px 25px rgba(223, 17, 27, 0.22);
  color: #fff;
}

.affiliate-experience-nav-inner svg {
  font-size: 13px;
}

.affiliate-route-loading,
.affiliate-auth-state,
.affiliate-auth-required-card {
  align-items: center;
  background:
    linear-gradient(115deg, rgba(3, 6, 10, 0.96), rgba(3, 6, 10, 0.62)),
    url('/images/fmm-experience/fighter-duel-arena.webp') center / cover;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: center;
  min-height: 72vh;
  padding: 130px 22px 70px;
  text-align: center;
}

.affiliate-auth-state .xp-route-loading {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  min-height: 360px;
}

.affiliate-auth-required-card {
  margin: 0 auto;
  min-height: 100vh;
  width: 100%;
}

.affiliate-auth-required-card > svg {
  color: #ff5862;
  font-size: 48px;
}

.affiliate-auth-required-card h1 {
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}

.affiliate-auth-required-card p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
  margin: 0;
  max-width: 620px;
}

/* Affiliate dashboard details and supporting controls */
.affiliate-dashboard-hero-final {
  background:
    linear-gradient(90deg, rgba(2, 5, 8, 0.98) 0%, rgba(4, 9, 14, 0.82) 58%, rgba(223, 17, 27, 0.18) 100%),
    url('/images/fmm-experience/fighter-action-red.webp') center / cover;
}

.affiliate-dashboard-main-final,
.affiliate-how-main-final,
.affiliate-league-main-final,
.affiliate-past-main-final,
.affiliate-profile-main-final {
  position: relative;
}

.affiliate-dashboard-detail-page {
  background:
    linear-gradient(180deg, rgba(4, 7, 11, 0.97), rgba(6, 11, 17, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  min-height: 100vh;
  padding: clamp(108px, 11vw, 146px) clamp(16px, 4vw, 58px) 70px;
}

.affiliate-dashboard-detail-page > .xp-dashboard-back {
  margin: 0 auto 20px;
  max-width: 1320px;
}

.affiliate-dashboard-pagination {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}

.affiliate-dashboard-pagination button {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 11px;
  font-weight: 900;
  gap: 7px;
  min-height: 43px;
  padding: 0 15px;
  text-transform: uppercase;
}

.affiliate-dashboard-pagination button:hover:not(:disabled) {
  background: rgba(223, 17, 27, 0.16);
  border-color: rgba(223, 17, 27, 0.48);
}

.affiliate-dashboard-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.affiliate-dashboard-pagination > span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.affiliate-dashboard-pagination strong {
  color: #fff;
}

.affiliate-dashboard-community-final {
  align-items: center;
  background:
    linear-gradient(110deg, rgba(4, 8, 13, 0.96), rgba(8, 18, 28, 0.84), rgba(223, 17, 27, 0.16)),
    url('/images/fmm-experience/fighter-duel-panel.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  margin: 15px 0 60px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
}

.affiliate-dashboard-link-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.affiliate-dashboard-link-grid a {
  align-items: center;
  background: rgba(4, 8, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  color: #fff;
  display: flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 12px;
  gap: 9px;
  min-height: 51px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.affiliate-dashboard-link-grid a:hover {
  border-color: rgba(223, 17, 27, 0.52);
  color: #ff7a82;
}

/* How it works */
.affiliate-inline-back {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 10px;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 22px;
  min-height: 40px;
  padding: 0 15px;
  text-transform: uppercase;
}

.affiliate-inline-back:hover {
  background: rgba(223, 17, 27, 0.16);
  border-color: rgba(223, 17, 27, 0.45);
}

.affiliate-how-step-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.affiliate-how-step-grid article {
  background:
    linear-gradient(150deg, rgba(17, 25, 35, 0.98), rgba(6, 10, 16, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.28);
  min-height: 250px;
  overflow: hidden;
  padding: 22px;
  position: relative;
}

.affiliate-how-step-grid article::after {
  background: linear-gradient(90deg, var(--ff-red, #df111b), transparent);
  bottom: 0;
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  width: 58%;
}

.affiliate-how-step-grid article > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
}

.affiliate-how-step-grid article > div > svg {
  background: rgba(223, 17, 27, 0.13);
  border: 1px solid rgba(223, 17, 27, 0.38);
  border-radius: 12px;
  color: #ff6069;
  font-size: 24px;
  height: 52px;
  padding: 13px;
  width: 52px;
}

.affiliate-how-step-grid article > div > span {
  color: rgba(255, 255, 255, 0.08);
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 64px;
  line-height: 0.8;
}

.affiliate-how-step-grid h3 {
  color: #fff;
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: 26px;
  line-height: 1;
  margin: 0 0 11px;
  max-width: 90%;
  text-transform: uppercase;
}

.affiliate-how-step-grid p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.affiliate-how-rules-panel {
  background:
    linear-gradient(100deg, rgba(4, 8, 13, 0.98) 0%, rgba(4, 8, 13, 0.87) 56%, rgba(4, 8, 13, 0.18) 100%),
    url('/images/fmm-experience/fighter-action-red.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 21px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  margin: 22px 0 48px;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(26px, 5vw, 58px);
  position: relative;
}

.affiliate-how-rules-copy {
  align-self: center;
  position: relative;
  z-index: 2;
}

.affiliate-how-rules-copy h2 {
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.92;
  margin: 12px 0 18px;
  max-width: 760px;
  text-transform: uppercase;
}

.affiliate-how-rules-copy > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
  max-width: 700px;
}

.affiliate-how-rules-copy ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.affiliate-how-rules-copy li {
  align-items: flex-start;
  background: rgba(3, 7, 11, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  font-size: 12px;
  gap: 10px;
  line-height: 1.55;
  padding: 12px;
}

.affiliate-how-rules-copy li svg {
  color: #59da84;
  flex: 0 0 auto;
  margin-top: 2px;
}

.affiliate-how-rules-art {
  align-items: flex-end;
  display: flex;
  justify-content: center;
  min-height: 420px;
  position: relative;
}

.affiliate-how-rules-art > img {
  bottom: -60px;
  height: 500px;
  object-fit: contain;
  position: absolute;
  right: -85px;
  width: 460px;
}

.affiliate-how-rules-art > div {
  background: rgba(4, 8, 13, 0.88);
  border: 1px solid rgba(223, 17, 27, 0.44);
  border-radius: 14px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  left: 0;
  max-width: 260px;
  padding: 17px;
  position: absolute;
  z-index: 2;
}

.affiliate-how-rules-art svg {
  color: #ff626b;
  font-size: 24px;
}

.affiliate-how-rules-art strong {
  font-family: var(--ff-display, sans-serif);
  font-size: 18px;
  text-transform: uppercase;
}

.affiliate-how-rules-art span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.5;
}

.affiliate-how-cta-final {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(223, 17, 27, 0.22), rgba(12, 19, 28, 0.98) 52%, rgba(18, 104, 166, 0.16)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(223, 17, 27, 0.32);
  border-radius: 18px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 35px 0 56px;
  padding: clamp(22px, 4vw, 38px);
}

.affiliate-how-cta-final h2 {
  font-family: var(--ff-display, Impact, sans-serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 0.98;
  margin: 8px 0;
  max-width: 780px;
  text-transform: uppercase;
}

.affiliate-how-cta-final > div:first-child > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
  margin: 0;
}

.affiliate-how-cta-final > div:last-child {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

/* Affiliate league guard rails and final table controls */
.affiliate-league-invite-final {
  background:
    linear-gradient(110deg, rgba(6, 10, 16, 0.97), rgba(11, 20, 30, 0.92)),
    url('/images/fmm-experience/grid-texture.svg');
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.25);
}

.affiliate-league-invite-control {
  align-items: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.affiliate-league-invite-control > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  padding: 0 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-league-invite-control > button {
  align-items: center;
  align-self: stretch;
  background: linear-gradient(135deg, var(--ff-red, #df111b), #a30811);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 10px;
  font-weight: 900;
  gap: 7px;
  min-height: 48px;
  padding: 0 15px;
  text-transform: uppercase;
}

.affiliate-league-warning {
  align-items: center;
  background: rgba(247, 181, 27, 0.08);
  border: 1px solid rgba(247, 181, 27, 0.34);
  border-radius: 10px;
  color: #f7c95c;
  display: flex;
  font-size: 12px;
  gap: 9px;
  margin: 14px 0;
  padding: 12px 14px;
}

.affiliate-table-loading {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--ff-display, sans-serif);
  min-height: 210px;
  padding: 80px 20px;
  text-align: center;
  text-transform: uppercase;
}

.affiliate-member-status {
  background: rgba(247, 181, 27, 0.09);
  border: 1px solid rgba(247, 181, 27, 0.28);
  border-radius: 999px;
  color: #f7c95c;
  display: inline-flex;
  font-family: var(--ff-display, sans-serif);
  font-size: 9px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.affiliate-member-status.is-verified {
  background: rgba(53, 212, 93, 0.08);
  border-color: rgba(53, 212, 93, 0.3);
  color: #6ce893;
}

.affiliate-spin {
  animation: affiliate-spin 900ms linear infinite;
}

@keyframes affiliate-spin {
  to { transform: rotate(360deg); }
}

/* Profile and private account-settings separation */
.affiliate-profile-page-final,
.affiliate-account-settings-page {
  background:
    radial-gradient(circle at 18% 15%, rgba(16, 116, 188, 0.14), transparent 28%),
    radial-gradient(circle at 84% 50%, rgba(223, 17, 27, 0.14), transparent 31%),
    #04070b;
}

.affiliate-profile-referral-final {
  background:
    linear-gradient(115deg, rgba(6, 10, 16, 0.98), rgba(11, 20, 29, 0.92), rgba(223, 17, 27, 0.12)),
    url('/images/fmm-experience/grid-texture.svg');
}

.affiliate-account-settings-shell {
  display: grid;
  gap: 30px;
}

.affiliate-account-settings-shell > .xp-page-section {
  margin-bottom: 0;
}

.affiliate-payout-settings-card {
  background:
    linear-gradient(150deg, rgba(14, 23, 33, 0.98), rgba(6, 10, 16, 0.99)),
    url('/images/fmm-experience/fighter-action-red.webp') center / cover;
  position: relative;
}

.affiliate-payout-settings-card::before {
  background: linear-gradient(100deg, rgba(6, 10, 16, 0.96), rgba(6, 10, 16, 0.72));
  border-radius: inherit;
  content: '';
  inset: 0;
  position: absolute;
}

.affiliate-payout-settings-card > * {
  position: relative;
  z-index: 1;
}

.affiliate-account-security-note {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(23, 110, 166, 0.11), rgba(7, 13, 20, 0.96)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(83, 178, 237, 0.24);
  border-radius: 16px;
  display: grid;
  gap: 17px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 58px;
  padding: 22px;
}

.affiliate-account-security-note > svg:first-child {
  color: #68caff;
  font-size: 32px;
}

.affiliate-account-security-note small {
  color: #68caff;
  font-family: var(--ff-display, sans-serif);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.affiliate-account-security-note h2 {
  font-family: var(--ff-display, sans-serif);
  font-size: 22px;
  margin: 3px 0 5px;
  text-transform: uppercase;
}

.affiliate-account-security-note p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.affiliate-account-security-check {
  color: #58dd82;
  font-size: 28px;
}

.affiliate-settings-modal-backdrop {
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1000000;
}

.affiliate-settings-modal {
  background:
    linear-gradient(150deg, rgba(17, 25, 35, 0.99), rgba(5, 9, 14, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(223, 17, 27, 0.38);
  border-radius: 18px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.66);
  color: #fff;
  display: grid;
  gap: 18px;
  max-width: 520px;
  padding: 30px;
  position: relative;
  width: 100%;
}

.affiliate-settings-modal > p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.55;
  margin: 0;
}

.affiliate-settings-modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 38px;
  justify-content: center;
  position: absolute;
  right: 15px;
  top: 15px;
  width: 38px;
}

.affiliate-settings-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 1050px) {
  .affiliate-how-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .affiliate-dashboard-community-final,
  .affiliate-how-rules-panel {
    grid-template-columns: 1fr;
  }

  .affiliate-how-rules-art {
    min-height: 380px;
  }
}

@media (max-width: 760px) {
  .affiliate-experience-nav-inner {
    padding-inline: 12px;
  }

  .affiliate-experience-nav-inner > a {
    min-height: 40px;
    padding-inline: 12px;
  }

  .affiliate-dashboard-pagination,
  .affiliate-settings-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-dashboard-pagination button,
  .affiliate-settings-modal-actions .theme-btn {
    justify-content: center;
    width: 100%;
  }

  .affiliate-dashboard-community-final,
  .affiliate-how-cta-final,
  .affiliate-account-security-note {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .affiliate-dashboard-link-grid,
  .affiliate-how-step-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-how-cta-final > div:last-child {
    flex-direction: column;
    width: 100%;
  }

  .affiliate-how-cta-final .theme-btn {
    justify-content: center;
    width: 100%;
  }

  .affiliate-how-rules-panel {
    padding: 23px 16px;
  }

  .affiliate-how-rules-art > img {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .affiliate-league-invite-control {
    grid-template-columns: 1fr;
  }

  .affiliate-league-invite-control > span {
    min-height: 44px;
    padding-top: 14px;
  }

  .affiliate-league-invite-control > button {
    justify-content: center;
    width: 100%;
  }

  .affiliate-settings-modal {
    padding: 25px 17px 18px;
  }
}

@media (max-width: 520px) {
  .affiliate-public-profile-card {
    min-height: 490px;
  }

  .affiliate-public-profile-card > div {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== 
   Affiliate experience — final source-aligned routes
   Dashboard, league, campaign archive, operating guide, public profile,
   and private account settings. Loaded after the legacy affiliate styles.
   ========================================================================== */

.affiliate-dashboard-experience-page,
.affiliate-league-page-final,
.affiliate-past-promotions-page,
.affiliate-how-page-final,
.affiliate-settings-page-final,
.affiliate-account-settings-page {
  background:
    radial-gradient(circle at 84% 16%, rgba(223, 17, 27, 0.18), transparent 31rem),
    radial-gradient(circle at 8% 48%, rgba(22, 143, 230, 0.14), transparent 32rem),
    linear-gradient(180deg, #03060a 0%, #070c13 44%, #020407 100%) !important;
  min-height: 100vh;
}

.affiliate-dashboard-main-final,
.affiliate-league-main-final,
.affiliate-past-main-final,
.affiliate-how-main-final,
.affiliate-settings-main-final,
.affiliate-account-settings-page .xp-page-main {
  background:
    linear-gradient(180deg, rgba(4, 8, 13, 0.1), rgba(4, 8, 13, 0.94)),
    url('/images/fmm-experience/grid-texture.svg');
  padding-top: clamp(34px, 5vw, 68px);
}

/* Shared affiliate route navigation ------------------------------------- */
.affiliate-experience-nav {
  backdrop-filter: blur(20px);
  background:
    linear-gradient(90deg, rgba(4, 8, 13, 0.98), rgba(9, 16, 24, 0.95), rgba(4, 8, 13, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  position: sticky;
  top: 72px;
  z-index: 42;
}

.affiliate-experience-nav::before {
  background: linear-gradient(90deg, transparent, rgba(223, 17, 27, 0.78), rgba(22, 143, 230, 0.68), transparent);
  content: '';
  height: 2px;
  inset: 0 0 auto;
  position: absolute;
}

.affiliate-experience-nav-inner {
  display: flex;
  gap: 7px;
  max-width: 1360px;
  overflow-x: auto;
  padding-block: 10px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.affiliate-experience-nav-inner a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.62) !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0.055em;
  min-height: 43px;
  padding: 0 14px;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.affiliate-experience-nav-inner a svg {
  color: #ff4a55;
  font-size: 13px;
}

.affiliate-experience-nav-inner a:hover,
.affiliate-experience-nav-inner a.is-active {
  background: linear-gradient(135deg, rgba(223, 17, 27, 0.18), rgba(22, 143, 230, 0.08));
  border-color: rgba(223, 17, 27, 0.38);
  color: #fff !important;
  transform: translateY(-1px);
}

.affiliate-experience-nav-inner a.is-active {
  box-shadow: inset 0 -2px #df111b, 0 9px 24px rgba(223, 17, 27, 0.12);
}

/* Dashboard -------------------------------------------------------------- */
.affiliate-dashboard-hero-final {
  background-image:
    linear-gradient(90deg, rgba(2, 5, 9, 0.99) 0%, rgba(3, 8, 14, 0.84) 46%, rgba(3, 7, 12, 0.46) 100%),
    linear-gradient(180deg, transparent 58%, #03060a 100%),
    url('/images/fmm-pages/premium-affiliate-banner.webp') !important;
  background-position: center right;
  background-size: cover;
  min-height: 620px;
  padding-top: 112px;
}

.affiliate-dashboard-hero-final .xp-affiliate-hero-fighter {
  filter: drop-shadow(0 30px 45px rgba(0, 0, 0, 0.66));
  max-height: 630px;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.76;
}

.affiliate-dashboard-main-final > .theme-container {
  max-width: 1360px;
}

.affiliate-dashboard-community-final {
  align-items: center;
  background:
    linear-gradient(105deg, rgba(3, 7, 12, 0.98) 0%, rgba(8, 18, 29, 0.93) 56%, rgba(223, 17, 27, 0.2) 100%),
    url('/images/fmm-experience/fighter-duel-panel.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: 0 32px 82px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: clamp(26px, 4vw, 58px);
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  margin: 20px 0 80px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  position: relative;
}

.affiliate-dashboard-community-final::after {
  background: linear-gradient(90deg, #df111b, #168fe6, transparent 76%);
  bottom: 0;
  content: '';
  height: 4px;
  left: 0;
  position: absolute;
  width: 72%;
}

.affiliate-dashboard-community-final h2 {
  color: #fff;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: clamp(35px, 4vw, 58px);
  line-height: 0.94;
  margin: 10px 0 15px;
  max-width: 680px;
  text-transform: uppercase;
}

.affiliate-dashboard-community-final > div:first-child > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
  margin: 0;
  max-width: 670px;
}

.affiliate-dashboard-link-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.affiliate-dashboard-link-grid a {
  align-items: center;
  background: rgba(3, 7, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  color: #fff !important;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 82px;
  padding: 15px;
  transition: border-color 170ms ease, transform 170ms ease, background 170ms ease;
}

.affiliate-dashboard-link-grid a:hover {
  background: rgba(14, 22, 32, 0.92);
  border-color: rgba(223, 17, 27, 0.48);
  transform: translateY(-3px);
}

.affiliate-dashboard-link-grid a > svg:first-child {
  color: #ff4c57;
  font-size: 23px;
}

.affiliate-dashboard-link-grid a > svg:last-child {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.affiliate-dashboard-link-grid span {
  display: grid;
  min-width: 0;
}

.affiliate-dashboard-link-grid strong {
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.affiliate-dashboard-link-grid small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  margin-top: 4px;
}

.affiliate-dashboard-pagination {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.affiliate-dashboard-pagination button {
  align-items: center;
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 9px !important;
  color: #fff !important;
  display: inline-flex;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 12px !important;
  font-weight: 900;
  gap: 8px;
  min-height: 43px;
  padding: 0 15px !important;
  text-transform: uppercase;
}

.affiliate-dashboard-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.affiliate-dashboard-pagination span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.affiliate-dashboard-pagination strong {
  color: #fff;
}

.affiliate-dashboard-detail-page {
  background:
    linear-gradient(180deg, rgba(3, 7, 12, 0.98), rgba(4, 8, 13, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  min-height: 100vh;
  padding: 120px clamp(15px, 4vw, 58px) 80px;
}

.affiliate-route-loading,
.affiliate-auth-state {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 130px 20px 70px;
}

/* Affiliate league ------------------------------------------------------- */
.affiliate-league-page-final > .xp-hero {
  background-image:
    linear-gradient(90deg, rgba(3, 6, 10, 0.98), rgba(3, 6, 10, 0.74) 50%, rgba(3, 6, 10, 0.26)),
    var(--xp-hero-image) !important;
  min-height: 640px;
  padding-top: 118px;
}

.affiliate-league-main-final .xp-affiliate-league-shell {
  max-width: 1360px;
}

.affiliate-league-page-final {
  background:
    radial-gradient(circle at 18% 18%, rgba(223, 17, 27, 0.14), transparent 26rem),
    radial-gradient(circle at 82% 28%, rgba(22, 143, 230, 0.1), transparent 28rem),
    #04070b;
}

.affiliate-league-invite-final {
  background:
    linear-gradient(120deg, rgba(13, 20, 29, 0.98), rgba(5, 10, 16, 0.96)),
    url('/images/fmm-experience/grid-texture.svg');
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.34);
}

.affiliate-league-invite-control,
.affiliate-referral-url-final,
.affiliate-referral-url {
  align-items: center;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 7px;
}

.affiliate-league-invite-control > span,
.affiliate-referral-url-final > span,
.affiliate-referral-url > span {
  color: rgba(255, 255, 255, 0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-league-invite-control button,
.affiliate-referral-url-final button,
.affiliate-referral-url button {
  align-items: center;
  background: linear-gradient(135deg, #bd0710, #f12430) !important;
  border: 1px solid rgba(255, 86, 95, 0.55) !important;
  border-radius: 8px !important;
  color: #fff !important;
  display: inline-flex;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 11px !important;
  font-weight: 900;
  gap: 7px;
  min-height: 43px;
  padding: 0 14px !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.affiliate-league-warning {
  align-items: flex-start;
  background: rgba(247, 181, 27, 0.08);
  border-bottom: 1px solid rgba(247, 181, 27, 0.24);
  color: #ffd66e;
  display: flex;
  font-size: 12px;
  gap: 9px;
  line-height: 1.5;
  padding: 12px 16px;
}

.affiliate-table-loading {
  align-items: center;
  color: rgba(255, 255, 255, 0.68);
  display: flex;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 18px;
  justify-content: center;
  min-height: 260px;
  text-transform: uppercase;
}

.affiliate-member-status {
  background: rgba(247, 181, 27, 0.1);
  border: 1px solid rgba(247, 181, 27, 0.25);
  border-radius: 999px;
  color: #ffd46c;
  display: inline-flex;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 10px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.affiliate-member-status.is-verified {
  background: rgba(53, 212, 93, 0.09);
  border-color: rgba(53, 212, 93, 0.28);
  color: #77ed96;
}

.affiliate-auth-required-card {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(14, 21, 31, 0.97), rgba(5, 9, 14, 0.98)),
    url('/images/fmm-pages/league-arena-hd.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 21px;
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  margin: 130px auto 70px;
  max-width: 720px;
  padding: clamp(30px, 6vw, 64px);
  text-align: center;
}

.affiliate-auth-required-card > svg {
  color: #ff4651;
  font-size: 43px;
}

.affiliate-auth-required-card h1 {
  color: #fff;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.94;
  margin: 18px 0 12px;
  text-transform: uppercase;
}

.affiliate-auth-required-card p {
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin-bottom: 23px;
  max-width: 540px;
}

.affiliate-spin {
  animation: affiliateSpin 0.8s linear infinite;
}

@keyframes affiliateSpin {
  to { transform: rotate(360deg); }
}

/* Campaign archive ------------------------------------------------------- */
.affiliate-past-promotions-page > .xp-hero {
  background-image:
    linear-gradient(90deg, rgba(3, 6, 10, 0.98), rgba(4, 8, 13, 0.74) 58%, rgba(4, 8, 13, 0.36)),
    var(--xp-hero-image) !important;
}

.affiliate-past-main-final > .theme-container {
  max-width: 1360px;
}

.affiliate-past-promotion-card {
  box-shadow: 0 24px 66px rgba(0, 0, 0, 0.32);
  transition: border-color 170ms ease, transform 170ms ease;
}

.affiliate-past-promotion-card:hover {
  border-color: rgba(223, 17, 27, 0.43);
  transform: translateY(-4px);
}

/* How it works ----------------------------------------------------------- */
.affiliate-how-page-final > .xp-hero {
  background-image:
    linear-gradient(90deg, rgba(3, 6, 10, 0.99), rgba(3, 6, 10, 0.72) 58%, rgba(3, 6, 10, 0.33)),
    var(--xp-hero-image) !important;
}

.affiliate-how-main-final > .theme-container {
  max-width: 1360px;
}

.affiliate-inline-back {
  align-items: center;
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 9px !important;
  color: rgba(255, 255, 255, 0.75) !important;
  display: inline-flex;
  font-family: var(--ff-display, var(--xp-display)) !important;
  font-size: 11px !important;
  font-weight: 900;
  gap: 8px;
  margin-bottom: 32px;
  min-height: 42px;
  padding: 0 14px !important;
  text-transform: uppercase;
}

.affiliate-inline-back:hover {
  border-color: rgba(223, 17, 27, 0.45) !important;
  color: #fff !important;
}

.affiliate-how-step-grid {
  counter-reset: affiliate-steps;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.affiliate-how-step-grid article {
  background:
    linear-gradient(150deg, rgba(17, 25, 35, 0.98), rgba(5, 9, 14, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
  min-height: 270px;
  overflow: hidden;
  padding: 23px;
  position: relative;
  transition: border-color 170ms ease, transform 170ms ease;
}

.affiliate-how-step-grid article::after {
  background: linear-gradient(90deg, #df111b, #168fe6, transparent);
  bottom: 0;
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  width: 68%;
}

.affiliate-how-step-grid article:hover {
  border-color: rgba(223, 17, 27, 0.46);
  transform: translateY(-4px);
}

.affiliate-how-step-grid article > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.affiliate-how-step-grid article > div > svg {
  align-items: center;
  background: rgba(223, 17, 27, 0.13);
  border: 1px solid rgba(223, 17, 27, 0.35);
  border-radius: 13px;
  color: #ff4b55;
  display: flex;
  font-size: 23px;
  height: 54px;
  padding: 14px;
  width: 54px;
}

.affiliate-how-step-grid article > div > span {
  color: rgba(255, 255, 255, 0.08);
  font-family: var(--ff-display, var(--xp-display));
  font-size: 64px;
  font-style: italic;
  font-weight: 900;
  line-height: 0.8;
}

.affiliate-how-step-grid h3 {
  color: #fff;
  font-size: 26px;
  line-height: 0.98;
  margin: 44px 0 11px;
  max-width: 90%;
  text-transform: uppercase;
}

.affiliate-how-step-grid p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.affiliate-how-rules-panel {
  align-items: stretch;
  background:
    linear-gradient(110deg, rgba(3, 7, 12, 0.99) 0%, rgba(6, 13, 21, 0.94) 62%, rgba(223, 17, 27, 0.14) 100%),
    url('/images/fmm-pages/league-arena-hd.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.4);
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
  margin: 20px 0 26px;
  overflow: hidden;
  padding: clamp(26px, 5vw, 56px);
  position: relative;
}

.affiliate-how-rules-copy {
  position: relative;
  z-index: 2;
}

.affiliate-how-rules-copy h2 {
  color: #fff;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.93;
  margin: 11px 0 17px;
  max-width: 780px;
  text-transform: uppercase;
}

.affiliate-how-rules-copy > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
  max-width: 760px;
}

.affiliate-how-rules-copy ul {
  display: grid;
  gap: 11px;
  list-style: none;
  margin: 25px 0 0;
  padding: 0;
}

.affiliate-how-rules-copy li {
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.29);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  font-size: 13px;
  gap: 10px;
  line-height: 1.55;
  padding: 12px;
}

.affiliate-how-rules-copy li svg {
  color: #58dd7d;
  flex: 0 0 auto;
  margin-top: 3px;
}

.affiliate-how-rules-art {
  align-items: end;
  display: flex;
  min-height: 510px;
  overflow: hidden;
  position: relative;
}

.affiliate-how-rules-art > img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: 0.62;
  position: absolute;
  width: 100%;
}

.affiliate-how-rules-art::after {
  background: linear-gradient(180deg, transparent 20%, rgba(4, 8, 13, 0.96));
  content: '';
  inset: 0;
  position: absolute;
}

.affiliate-how-rules-art > div {
  background: rgba(4, 8, 13, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  display: grid;
  gap: 4px;
  margin: 18px;
  padding: 18px;
  position: relative;
  width: calc(100% - 36px);
  z-index: 2;
}

.affiliate-how-rules-art svg {
  color: #ff4a55;
  font-size: 25px;
  margin-bottom: 8px;
}

.affiliate-how-rules-art strong {
  color: #fff;
  font-size: 22px;
  text-transform: uppercase;
}

.affiliate-how-rules-art span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  line-height: 1.5;
}

.affiliate-how-cta-final {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(223, 17, 27, 0.18), rgba(8, 16, 25, 0.98) 48%, rgba(22, 143, 230, 0.12)),
    url('/images/fmm-experience/fighter-duel-panel.webp') center / cover;
  border: 1px solid rgba(223, 17, 27, 0.29);
  border-radius: 18px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 80px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
}

.affiliate-how-cta-final h2 {
  color: #fff;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 0.96;
  margin: 8px 0 10px;
  max-width: 830px;
  text-transform: uppercase;
}

.affiliate-how-cta-final > div:first-child > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.63);
  line-height: 1.6;
  margin: 0;
  max-width: 780px;
}

.affiliate-how-cta-final > div:last-child {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

/* Public affiliate profile ---------------------------------------------- */
.affiliate-settings-page-final > .xp-hero,
.affiliate-account-settings-page > .xp-hero {
  background-image:
    linear-gradient(90deg, rgba(3, 6, 10, 0.99), rgba(3, 6, 10, 0.74) 58%, rgba(3, 6, 10, 0.3)),
    var(--xp-hero-image) !important;
}

.affiliate-settings-shell,
.affiliate-account-settings-shell {
  margin: 0 auto;
  max-width: 1360px;
  padding-bottom: 80px;
}

.affiliate-settings-card,
.affiliate-profile-preview-card {
  background:
    linear-gradient(150deg, rgba(16, 24, 34, 0.97), rgba(6, 10, 16, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 17px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.3);
}

.affiliate-profile-workspace-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
}

.affiliate-profile-editor-card {
  min-width: 0;
}

.affiliate-profile-preview-card {
  min-height: 650px;
  overflow: hidden;
  position: relative;
}

.affiliate-profile-preview-media {
  background:
    linear-gradient(180deg, rgba(3, 7, 12, 0.05), rgba(3, 7, 12, 0.94)),
    url('/images/fmm-experience/fighter-action-blue.webp') center / cover;
  height: 300px;
  overflow: hidden;
  position: relative;
}

.affiliate-profile-preview-media::after {
  background: linear-gradient(180deg, transparent 45%, #070b11 100%);
  content: '';
  inset: 0;
  position: absolute;
}

.affiliate-profile-preview-media > img {
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.6));
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
  position: absolute;
  right: -10px;
  width: 78%;
}

.affiliate-profile-preview-media > span {
  background: rgba(223, 17, 27, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  font-family: var(--ff-display, var(--xp-display));
  font-size: 9px;
  font-weight: 900;
  left: 18px;
  letter-spacing: 0.12em;
  padding: 7px 10px;
  position: absolute;
  text-transform: uppercase;
  top: 18px;
  z-index: 2;
}

.affiliate-profile-preview-content {
  padding: 0 23px 24px;
  position: relative;
}

.affiliate-profile-preview-avatar {
  background: #070b11;
  border: 4px solid #070b11;
  border-radius: 50%;
  height: 104px;
  margin-top: -53px;
  overflow: hidden;
  position: relative;
  width: 104px;
  z-index: 3;
}

.affiliate-profile-preview-avatar img {
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.affiliate-profile-preview-content .xp-eyebrow {
  margin: 18px 0 8px;
}

.affiliate-profile-preview-content h2 {
  color: #fff;
  font-size: clamp(31px, 3.6vw, 48px);
  line-height: 0.96;
  margin: 0;
  text-transform: uppercase;
}

.affiliate-profile-preview-content > strong {
  color: #ff5963;
  display: block;
  font-size: 14px;
  margin-top: 6px;
}

.affiliate-profile-preview-content > p:not(.xp-eyebrow) {
  color: rgba(255, 255, 255, 0.63);
  line-height: 1.62;
  margin: 17px 0 21px;
}

.affiliate-profile-meta-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.affiliate-profile-meta-grid > span {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px;
}

.affiliate-profile-meta-grid svg {
  color: #ff4b55;
  margin-bottom: 5px;
}

.affiliate-profile-meta-grid small {
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--ff-display, var(--xp-display));
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.affiliate-profile-meta-grid strong {
  color: #fff;
  font-family: var(--ff-body, var(--xp-body)) !important;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.affiliate-profile-settings-callout,
.affiliate-account-security-note {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(22, 143, 230, 0.14), rgba(7, 13, 21, 0.98) 48%, rgba(223, 17, 27, 0.14)),
    url('/images/fmm-experience/fighter-duel-panel.webp') center / cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 17px;
  display: grid;
  gap: 18px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 22px;
}

.affiliate-profile-settings-callout > svg,
.affiliate-account-security-note > svg:first-child {
  color: #ff4a55;
  font-size: 30px;
}

.affiliate-profile-settings-callout small,
.affiliate-account-security-note small {
  color: #ff6f78;
  font-family: var(--ff-display, var(--xp-display));
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.affiliate-profile-settings-callout h2,
.affiliate-account-security-note h2 {
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  margin: 3px 0 6px;
  text-transform: uppercase;
}

.affiliate-profile-settings-callout p,
.affiliate-account-security-note p {
  color: rgba(255, 255, 255, 0.61);
  line-height: 1.55;
  margin: 0;
}

/* Private account settings ---------------------------------------------- */
.affiliate-account-settings-shell {
  display: grid;
  gap: 28px;
}

.affiliate-settings-control input,
.affiliate-settings-control select,
.affiliate-settings-field-grid input,
.affiliate-settings-field-grid textarea {
  background: rgba(0, 0, 0, 0.34) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 14px !important;
  min-height: 49px;
  outline: none !important;
  padding: 10px 13px !important;
  width: 100%;
}

.affiliate-settings-field-grid textarea {
  min-height: 128px;
}

.affiliate-settings-control input:focus,
.affiliate-settings-control select:focus,
.affiliate-settings-field-grid input:focus,
.affiliate-settings-field-grid textarea:focus {
  border-color: rgba(223, 17, 27, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(223, 17, 27, 0.12) !important;
}

.affiliate-account-security-check {
  color: #63e583 !important;
  font-size: 31px !important;
  justify-self: end;
}

.affiliate-settings-modal-backdrop {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed !important;
  z-index: 2000 !important;
}

.affiliate-settings-modal {
  background:
    linear-gradient(150deg, rgba(16, 24, 34, 0.99), rgba(5, 9, 14, 0.99)),
    url('/images/fmm-experience/grid-texture.svg');
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.58);
  display: grid;
  gap: 17px;
  max-width: 540px;
  padding: 29px;
  position: relative;
  width: 100%;
}

.affiliate-settings-modal > p {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
  margin: 0;
}

.affiliate-settings-modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 50% !important;
  color: #fff !important;
  display: flex;
  height: 38px;
  justify-content: center;
  padding: 0 !important;
  position: absolute;
  right: 15px;
  top: 15px;
  width: 38px;
}

.affiliate-settings-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Responsive affiliate surfaces ---------------------------------------- */
@media (max-width: 1180px) {
  .affiliate-dashboard-community-final,
  .affiliate-profile-workspace-grid,
  .affiliate-how-rules-panel {
    grid-template-columns: 1fr;
  }

  .affiliate-dashboard-community-final {
    background-position: 70% center;
  }

  .affiliate-profile-preview-card {
    min-height: auto;
  }

  .affiliate-profile-preview-media {
    height: 340px;
  }

  .affiliate-how-rules-art {
    min-height: 420px;
  }
}

@media (max-width: 980px) {
  .affiliate-experience-nav {
    top: 64px;
  }

  .affiliate-how-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .affiliate-dashboard-community-final {
    grid-template-columns: 1fr;
  }

  .affiliate-profile-settings-callout,
  .affiliate-account-security-note {
    align-items: flex-start;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .affiliate-profile-settings-callout .theme-btn,
  .affiliate-account-security-check {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .affiliate-experience-nav-inner {
    padding-inline: 14px;
  }

  .affiliate-experience-nav-inner a {
    font-size: 10px;
    min-height: 39px;
    padding-inline: 11px;
  }

  .affiliate-dashboard-hero-final {
    min-height: auto;
  }

  .affiliate-dashboard-link-grid,
  .affiliate-how-step-grid,
  .affiliate-profile-meta-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-dashboard-community-final,
  .affiliate-how-rules-panel,
  .affiliate-how-cta-final {
    border-radius: 16px;
    padding: 22px 16px;
  }

  .affiliate-how-cta-final {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-how-cta-final > div:last-child {
    flex-direction: column;
    width: 100%;
  }

  .affiliate-how-cta-final .theme-btn {
    justify-content: center;
    width: 100%;
  }

  .affiliate-how-rules-art {
    min-height: 360px;
  }

  .affiliate-league-invite-control,
  .affiliate-referral-url-final,
  .affiliate-referral-url {
    grid-template-columns: 1fr;
  }

  .affiliate-league-invite-control button,
  .affiliate-referral-url-final button,
  .affiliate-referral-url button {
    justify-content: center;
  }

  .affiliate-profile-preview-media {
    height: 270px;
  }

  .affiliate-profile-settings-callout,
  .affiliate-account-security-note {
    grid-template-columns: 1fr;
  }

  .affiliate-profile-settings-callout .theme-btn,
  .affiliate-account-security-check {
    grid-column: auto;
  }

  .affiliate-profile-settings-callout .theme-btn {
    justify-content: center;
    width: 100%;
  }

  .affiliate-settings-modal-actions {
    flex-direction: column;
  }

  .affiliate-settings-modal-actions .theme-btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .affiliate-dashboard-pagination,
  .affiliate-league-pagination {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .affiliate-dashboard-pagination button {
    justify-content: center;
    width: 100%;
  }

  .affiliate-profile-preview-media {
    height: 230px;
  }

  .affiliate-profile-preview-media > img {
    width: 92%;
  }

  .affiliate-settings-modal {
    padding: 24px 16px 17px;
  }
}

/* --------------------------------------------------------------------------
   Targeted affiliate dashboard polish: campaign detail loading, card media,
   and tighter hero/nav spacing.
   -------------------------------------------------------------------------- */
.affiliate-dashboard-hero-final {
  min-height: clamp(470px, 54vw, 560px) !important;
  padding-top: clamp(88px, 8vw, 104px) !important;
  padding-bottom: clamp(34px, 5vw, 58px) !important;
}

.affiliate-dashboard-main-final,
.affiliate-dashboard-main-final.xp-page-main {
  padding-top: clamp(20px, 3vw, 38px) !important;
}

.affiliate-dashboard-main-final .xp-dashboard-stat-grid {
  margin-bottom: clamp(38px, 5vw, 58px) !important;
}

.affiliate-dashboard-main-final .xp-page-section {
  margin-bottom: clamp(48px, 6vw, 72px) !important;
}

.affiliate-dashboard-experience-page .affiliate-experience-nav {
  margin-top: 0 !important;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-media {
  align-items: stretch !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  height: clamp(230px, 20vw, 280px) !important;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-media figure {
  align-items: flex-end !important;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(0,0,0,0.22));
  display: flex !important;
  height: 100% !important;
  justify-content: center !important;
  min-width: 0 !important;
  position: relative;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-media figure:first-of-type {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-media img {
  height: 100% !important;
  max-width: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  width: 100% !important;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-media > span {
  left: 50% !important;
  top: 50% !important;
}

.affiliate-dashboard-experience-page .xp-affiliate-fight-copy h3 {
  min-height: 48px;
}

.affiliate-campaign-loading {
  align-items: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(223,17,27,0.16), transparent 30%),
    radial-gradient(circle at 78% 46%, rgba(22,143,230,0.14), transparent 34%),
    #03060a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  color: #fff;
  display: flex;
  font-family: var(--ff-display, var(--xp-display, Impact, sans-serif));
  font-size: 18px;
  justify-content: center;
  letter-spacing: 0.04em;
  margin: 0 auto;
  max-width: 900px;
  min-height: 360px;
  padding: 32px;
  text-align: center;
  text-transform: uppercase;
}

.affiliate-campaign-loading.is-error {
  color: #ffb6bc;
}

@media (max-width: 760px) {
  .affiliate-dashboard-hero-final {
    padding-top: 84px !important;
  }

  .affiliate-dashboard-experience-page .xp-affiliate-fight-media {
    height: 250px !important;
  }
}
