.affiliate-main-wrap {
  min-height: calc(100vh - 110px);
}

.affiliate-content {
  max-width: 1160px;
  padding-top: 24px;
  padding-bottom: 56px;
}

.affiliate-greeting {
  margin-bottom: 20px;
}

.affiliate-hero {
  margin-bottom: 24px;
}

.affiliate-hero-copy {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.affiliate-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.affiliate-subtitle {
  max-width: 780px;
  margin: 0 auto;
  color: #dbeafe;
}

.affiliate-summary-grid,
.affiliate-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.affiliate-panel {
  background: rgba(11, 15, 20, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(6px);
}

.affiliate-panel-highlight {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.88));
}

.affiliate-panel-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.affiliate-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
}

.affiliate-balance {
  margin: 10px 0 8px;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.affiliate-muted,
.affiliate-status,
.affiliate-section-copy,
.small-note,
.empty-copy,
.status-text,
.modal-copy {
  color: #cbd5e1;
}

.affiliate-status {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.affiliate-tier-progress {
  margin-top: 16px;
}

.affiliate-tier-actions {
  margin-top: 14px;
}

.affiliate-tier-ladder.hidden {
  display: none;
}

.affiliate-tier-ladder {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.affiliate-tier-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.affiliate-tier-title {
  margin: 0 0 6px;
  color: #fff;
  font-weight: 700;
}

.affiliate-progress-bar {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.affiliate-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.affiliate-tier-row {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.affiliate-tier-row.is-current {
  border-color: rgba(96, 165, 250, 0.34);
}

.affiliate-tier-row.is-next {
  border-color: rgba(250, 204, 21, 0.34);
}

.affiliate-tier-name {
  color: #fff;
  font-weight: 700;
}

.affiliate-tier-meta {
  color: #cbd5e1;
  font-size: 13px;
}

.affiliate-tier-bonus {
  color: #93c5fd;
  font-weight: 800;
  white-space: nowrap;
}

.affiliate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.affiliate-panel .btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
}

.affiliate-panel-title,
.affiliate-section-title {
  margin: 0 0 14px;
  color: #ffffff;
}

.affiliate-stack {
  display: grid;
  gap: 12px;
}

.affiliate-note,
.list-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.store-total-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.store-total-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.store-total-name {
  color: #fff;
  font-weight: 700;
}

.store-total-value {
  color: #93c5fd;
  font-weight: 800;
}

.store-total-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.commission-breakdown {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.commission-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #cbd5e1;
}

.commission-breakdown-row strong {
  color: #fff;
  font-weight: 700;
}

.affiliate-empty {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

.affiliate-section {
  margin: 24px 0 18px;
}

.affiliate-section-head {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.affiliate-section-panel {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.affiliate-section-copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.affiliate-section-panel .affiliate-kicker,
.affiliate-section-panel .affiliate-section-title,
.affiliate-section-panel .affiliate-section-copy {
  width: 100%;
}

.affiliate-section-panel .affiliate-kicker {
  margin: 0;
}

.affiliate-section-panel .affiliate-section-title {
  margin: 0;
}

.affiliate-section-panel .affiliate-section-copy {
  margin: 0;
}

.affiliate-promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.affiliate-more-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.affiliate-all-stores-panel.hidden {
  display: none;
}

.affiliate-all-stores-panel {
  margin-top: 18px;
}

.affiliate-all-stores-copy {
  margin: 0 0 16px;
}

.affiliate-all-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.affiliate-store-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.16);
  display: grid;
  gap: 12px;
}

.affiliate-store-card.is-enabled {
  border-color: rgba(96, 165, 250, 0.32);
}

.affiliate-store-card.is-pending {
  border-color: rgba(250, 204, 21, 0.36);
}

.affiliate-store-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.affiliate-store-name {
  color: #fff;
  font-weight: 700;
}

.affiliate-store-url {
  color: #93c5fd;
  font-size: 13px;
  word-break: break-word;
}

.affiliate-store-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.affiliate-store-status.is-enabled {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.affiliate-store-status.is-pending {
  background: rgba(250, 204, 21, 0.16);
  color: #fde68a;
}

.affiliate-store-status.is-locked {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.affiliate-store-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.affiliate-store-actions .btn {
  flex: 1 1 150px;
}

.promo-card {
  background: rgba(11, 15, 20, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.promo-card.promo-card-boosted {
  border-color: rgba(250, 204, 21, 0.42);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.34), 0 0 0 1px rgba(250, 204, 21, 0.12);
}

.promo-artwork {
  height: 180px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.3), transparent 36%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.promo-commission {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 84px;
  padding: 16px 22px;
  border-radius: 18px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(147, 197, 253, 0.32);
  color: #ffffff;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.promo-commission.promo-commission-boosted {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(249, 115, 22, 0.22));
  border-color: rgba(250, 204, 21, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 24px rgba(250, 204, 21, 0.25),
    0 0 48px rgba(249, 115, 22, 0.16);
}

.promo-body {
  padding: 20px;
}

.promo-body h3 {
  margin: 0 0 10px;
  color: #ffffff;
}

.promo-badge,
.payout-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.promo-links {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.promo-links input,
.modal-form input,
.modal-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
}

.promo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.promo-actions .btn {
  flex: 1 1 140px;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100100;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.modal-panel {
  position: relative;
  max-width: 560px;
  margin: 6vh auto;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  padding: 26px;
  color: #e2e8f0;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

.modal-panel h2 {
  margin-top: 0;
  color: #ffffff;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-form label {
  display: grid;
  gap: 8px;
  color: #e2e8f0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #ffffff;
  cursor: pointer;
}

.instruction-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

#banner:not(.is-hidden) {
  display: block;
}

@media (max-width: 900px) {
  .affiliate-summary-grid,
  .affiliate-info-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-panel-top {
    flex-direction: column;
  }

  .affiliate-actions {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .affiliate-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .affiliate-panel {
    padding: 18px;
  }

  .promo-body {
    padding: 16px;
  }

  .modal-panel {
    margin: 3vh 12px;
    padding: 20px;
  }
}
