:root {
  --ref-panel: rgba(22, 22, 26, 0.78);
  --ref-panel-hi: rgba(32, 32, 38, 0.9);
  --ref-stroke: rgba(255, 255, 255, 0.12);
}

.referral-page {
  min-height: 100vh;
  background: #09090b;
  color: var(--text);
  overflow-x: hidden;
}

.referral-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 97, 0, 0.22), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(168, 85, 247, 0.16), transparent 30%),
    linear-gradient(135deg, #08080a 0%, #130b08 48%, #090911 100%);
}

.referral-topbar,
.referral-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.referral-topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.referral-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.referral-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(255, 97, 0, 0.38);
}

.referral-top-actions {
  display: flex;
  gap: 10px;
}

.referral-shell {
  padding: 12px 0 70px;
}

.referral-hero-card,
.referral-card,
.metric-card {
  border: 1px solid var(--ref-stroke);
  background: linear-gradient(145deg, var(--ref-panel), rgba(20, 13, 10, 0.82));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.referral-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 28px;
  align-items: end;
  padding: 34px;
  border-radius: 24px;
}

.referral-kicker,
.section-heading span,
.metric-card span {
  color: var(--orange-hi);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.referral-hero-card h1 {
  margin: 12px 0;
  max-width: 640px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.92;
}

.referral-gold-headline {
  position: relative;
  color: #ffd86a;
  background: linear-gradient(110deg, #fff7c6 0%, #ffd15a 22%, #ff9f1f 44%, #fff3a7 58%, #ffb02e 78%, #fff8cf 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 34px rgba(255, 177, 46, 0.28);
  animation: referral-gold-shine 3.4s ease-in-out infinite;
}

.referral-gold-headline::after {
  content: "Earn up to 30% of every sale.";
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(255, 177, 46, 0.34);
  -webkit-text-fill-color: rgba(255, 177, 46, 0.18);
  filter: blur(18px);
}

@keyframes referral-gold-shine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.referral-hero-card p,
.referral-hero-lead {
  max-width: 620px;
  color: var(--text-mid);
  font-size: 18px;
  line-height: 1.55;
}

.referral-rule-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.referral-rule-strip span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.referral-link-panel {
  border: 1px solid var(--ref-stroke);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 18px;
  padding: 16px;
}

.referral-link-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
}

.referral-code-row,
.referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 10px;
}

.referral-code-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.referral-code-row input,
.referral-link-row input {
  min-width: 0;
  border: 1px solid var(--ref-stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 0 14px;
  font-weight: 700;
}

.referral-code-row input {
  text-transform: uppercase;
  color: #ffd76a;
  letter-spacing: 0.04em;
}

.referral-code-help {
  margin: -2px 0 16px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
}

.referral-stripe-cta {
  position: relative;
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 239, 164, 0.72);
  border-radius: 16px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 255, 255, 0.92), transparent 16%),
    linear-gradient(110deg, #8f5300 0%, #ffd66b 22%, #fff1a8 40%, #ffb32c 58%, #fff8cf 76%, #d98000 100%);
  background-size: 180% 100%;
  color: #241100;
  box-shadow:
    0 16px 38px rgba(255, 177, 46, 0.28),
    0 0 0 1px rgba(255, 219, 106, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -10px 22px rgba(151, 75, 0, 0.22);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
  animation: referral-payout-shine 3.6s ease-in-out infinite;
}

.referral-stripe-cta::before {
  content: "";
  position: absolute;
  inset: -80% -24%;
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.72) 48%, transparent 62%);
  transform: translateX(-70%) rotate(8deg);
  animation: referral-payout-sweep 2.8s ease-in-out infinite;
}

.referral-stripe-cta::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  pointer-events: none;
}

.referral-stripe-cta span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.stripe-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 1px 9px 3px;
  border-radius: 7px;
  background: #635bff;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: lowercase;
  text-shadow: none;
  box-shadow:
    0 7px 16px rgba(99, 91, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.referral-stripe-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 48px rgba(255, 177, 46, 0.4),
    0 0 28px rgba(255, 215, 106, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -10px 22px rgba(151, 75, 0, 0.2);
}

.referral-stripe-cta:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  animation: none;
}

.referral-stripe-cta:disabled::before {
  display: none;
}

@keyframes referral-payout-shine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes referral-payout-sweep {
  0%, 38% { transform: translateX(-70%) rotate(8deg); }
  72%, 100% { transform: translateX(72%) rotate(8deg); }
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric-card,
.referral-card {
  border-radius: 20px;
  padding: 22px;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 38px;
  line-height: 1;
}

.metric-card small,
.section-heading small,
.milestone-copy,
.stripe-status {
  color: var(--text-dim);
}

.referral-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.chart-card {
  min-height: 390px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

#referral-chart {
  width: 100%;
  height: 300px;
}

.payout-list {
  display: grid;
  gap: 10px;
}

.payout-list div {
  display: flex;
  justify-content: space-between;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
}

.payout-list span {
  color: var(--text-mid);
}

.stripe-status {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.payout-explainer {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 13px;
}

.payout-explainer strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 13px;
}

.payout-explainer p {
  margin: 0;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.45;
}

.milestone-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.milestone-meter div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--purple));
  transition: width 0.45s ease;
}

.idea-list {
  display: grid;
  gap: 10px;
}

.idea-list button {
  width: 100%;
  border: 1px solid var(--ref-stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 13px 14px;
  text-align: left;
  font-weight: 700;
}

.content-submit-card {
  margin-top: 18px;
}

.boost-application-card {
  margin-top: 18px;
}

.boost-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: stretch;
}

.boost-copy {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 106, 0.24);
  border-radius: 18px;
  padding: 30px 24px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 246, 178, 0.24), transparent 26%),
    radial-gradient(circle at 82% 86%, rgba(255, 97, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 215, 106, 0.18), rgba(255, 97, 0, 0.08)),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 178, 0.14),
    0 18px 48px rgba(255, 177, 46, 0.08);
}

.boost-copy::before {
  content: "";
  position: absolute;
  inset: -45% -30%;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 246, 178, 0.18) 50%, transparent 58%);
  transform: translateX(-58%) rotate(10deg);
  animation: boost-copy-sheen 4.2s ease-in-out infinite;
  pointer-events: none;
}

.boost-copy::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 106, 0.12);
  background: radial-gradient(circle, rgba(255, 215, 106, 0.14), transparent 62%);
  filter: blur(0.3px);
  pointer-events: none;
}

.boost-copy strong {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 420px;
  color: #ffd86a;
  background: linear-gradient(110deg, #fff8cc 0%, #ffd86a 28%, #ffad2f 52%, #fff2a9 76%, #ffc342 100%);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-shadow: 0 0 34px rgba(255, 177, 46, 0.24);
  animation: referral-gold-shine 3.8s ease-in-out infinite;
}

.boost-copy p {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--text-mid);
  font-size: 16px;
  line-height: 1.5;
}

.boost-tier-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.boost-tier-strip span {
  border: 1px solid rgba(255, 215, 106, 0.2);
  border-radius: 999px;
  background: rgba(255, 215, 106, 0.09);
  color: #ffe18a;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
}

@keyframes boost-copy-sheen {
  0%, 38% { transform: translateX(-58%) rotate(10deg); }
  72%, 100% { transform: translateX(58%) rotate(10deg); }
}

.boost-form,
.boost-form label {
  display: grid;
  gap: 9px;
}

.boost-form {
  gap: 14px;
}

.boost-form label {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.boost-form input,
.boost-form select,
.boost-form textarea {
  width: 100%;
  border: 1px solid var(--ref-stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.boost-form textarea {
  resize: vertical;
  min-height: 86px;
}

.boost-applications-list {
  display: grid;
  gap: 10px;
}

.boost-application-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--ref-stroke);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.boost-application-item strong,
.boost-application-item p {
  display: block;
}

.boost-application-item p {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 13px;
}

.boost-application-item small {
  flex: 0 0 auto;
  color: var(--text-dim);
}

.top-earners-card {
  margin-top: 0;
}

.top-earners-list {
  display: grid;
  gap: 10px;
}

.top-earner-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 46px minmax(0, 1fr) minmax(150px, auto);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--ref-stroke);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 183, 43, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
  overflow: hidden;
}

.top-earner-rank-1 {
  border-color: rgba(255, 207, 92, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 240, 166, 0.1), 0 14px 40px rgba(255, 183, 43, 0.08);
}

.top-earner-rank {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 207, 92, 0.26);
  color: #ffd66b;
  background: rgba(255, 207, 92, 0.08);
  font-weight: 900;
}

.top-earner-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 238, 171, 0.85), transparent 24%),
    radial-gradient(circle at 60% 48%, rgba(255, 97, 0, 0.72), transparent 42%),
    radial-gradient(circle at 70% 72%, rgba(168, 85, 247, 0.58), transparent 40%),
    #221815;
  filter: blur(1.6px);
  transform: scale(0.98);
}

.top-earner-identity strong,
.top-earner-identity span,
.top-earner-money b,
.top-earner-money span {
  display: block;
}

.top-earner-identity strong {
  font-size: 16px;
}

.top-earner-identity span,
.top-earner-money span {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 13px;
}

.top-earner-money {
  text-align: right;
}

.top-earner-money b {
  color: var(--green);
  font-size: 19px;
}

.top-earners-empty {
  border: 1px dashed var(--ref-stroke);
  border-radius: 16px;
  padding: 18px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.035);
}

.content-submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.content-submit-form,
.content-submit-form label {
  display: grid;
  gap: 9px;
}

.content-submit-form {
  gap: 14px;
}

.content-submit-form label {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.content-field-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.content-submit-form input,
.content-submit-form select,
.content-submit-form textarea {
  width: 100%;
  border: 1px solid var(--ref-stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.content-submit-form textarea {
  resize: vertical;
  min-height: 92px;
}

.content-incentive {
  border-radius: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 97, 0, 0.24), transparent 42%),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 97, 0, 0.22);
}

.content-incentive strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.content-incentive p {
  margin: 12px 0 0;
  color: var(--text-mid);
  line-height: 1.5;
}

.content-submissions-list {
  display: grid;
  gap: 10px;
}

.content-submission-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--ref-stroke);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.content-submission-item div {
  min-width: 0;
}

.content-submission-item strong,
.content-submission-item a {
  display: block;
}

.content-submission-item a {
  margin-top: 5px;
  color: var(--text-mid);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-platform-chip,
.content-status {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 7px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.content-platform-chip {
  color: var(--orange-hi);
  background: rgba(255, 97, 0, 0.14);
}

.content-status {
  margin: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.content-status-approved,
.content-status-featured {
  background: rgba(50, 215, 75, 0.14);
  color: #66f28a;
}

.content-status-rejected {
  background: rgba(255, 69, 58, 0.16);
  color: #ff8a83;
}

.empty-content-state {
  border: 1px dashed var(--ref-stroke);
  border-radius: 16px;
  padding: 18px;
  color: var(--text-dim);
  text-align: center;
}

.full-width {
  margin-top: 18px;
}

.activity-table {
  overflow-x: auto;
}

.activity-table table {
  width: 100%;
  border-collapse: collapse;
}

.activity-table th,
.activity-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 10px;
  text-align: left;
}

.activity-table th {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
}

.activity-table td {
  color: var(--text-mid);
  font-size: 13px;
}

@media (max-width: 860px) {
  .referral-hero-card,
  .referral-dashboard-grid,
  .metric-grid,
  .boost-layout,
  .content-submit-layout,
  .content-field-grid {
    grid-template-columns: 1fr;
  }

  .top-earner-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .top-earner-avatar {
    display: none;
  }

  .top-earner-money {
    grid-column: 2;
    text-align: left;
  }

  .referral-topbar {
    height: auto;
    padding: 18px 0;
    align-items: flex-start;
  }

  .referral-top-actions {
    flex-direction: column;
  }

  .referral-hero-card {
    padding: 22px;
  }
}
