.profile-section .aff-content {
  --aff-ink: #e8eee9;
  --aff-muted: #91a199;
  --aff-line: rgba(177, 205, 187, .13);
  --aff-panel: rgba(157, 197, 169, .045);
  --aff-green: #83c89a;
  --aff-gold: #d7b76e;
  color: var(--aff-ink);
}

.profile-section .aff-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 17px;
}

.profile-section .aff-kicker,
.profile-section .aff-section-index {
  color: var(--aff-green);
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .12em;
}

.profile-section .aff-title {
  margin: 5px 0 3px;
  color: var(--aff-ink);
  font-size: 1.12rem;
  line-height: 1.3;
  font-weight: 700;
}

.profile-section .aff-intro,
.profile-section .aff-link-hint {
  margin: 0;
  color: var(--aff-muted);
  font-size: .74rem;
  line-height: 1.65;
}

.profile-section .aff-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(131, 200, 154, .32);
  border-radius: 50%;
  background: rgba(131, 200, 154, .08);
  font-size: 1.05rem;
  line-height: 1;
}

.profile-section .aff-link-panel {
  padding: 13px;
  margin: 0 0 13px;
  border: 1px solid rgba(131, 200, 154, .23);
  border-radius: 9px;
  background: linear-gradient(115deg, rgba(77, 148, 98, .11), var(--aff-panel));
}

.profile-section .aff-link-panel-create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.profile-section .aff-link-label {
  display: block;
  margin-bottom: 7px;
  color: #c5d4c9;
  font-size: .7rem;
  font-weight: 650;
}

.profile-section .aff-link-controls {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-section .aff-link-input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--aff-line);
  border-radius: 6px;
  outline: none;
  background: rgba(11, 18, 14, .42);
  color: #d9e8dc;
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
}

.profile-section .aff-link-input:focus {
  border-color: rgba(131, 200, 154, .65);
  box-shadow: 0 0 0 2px rgba(131, 200, 154, .1);
}

.profile-section .aff-button {
  min-height: 37px;
  padding: 8px 12px;
  border: 1px solid rgba(131, 200, 154, .38);
  border-radius: 6px;
  background: rgba(77, 148, 98, .15);
  color: #b6e0c1;
  font: inherit;
  font-size: .72rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.profile-section .aff-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(131, 200, 154, .68);
  background: rgba(77, 148, 98, .24);
}

.profile-section .aff-button:focus-visible {
  outline: 2px solid var(--aff-green);
  outline-offset: 2px;
}

.profile-section .aff-button:disabled {
  opacity: .62;
  cursor: wait;
}

.profile-section .aff-button-copy {
  flex: 0 0 auto;
}

.profile-section .aff-link-hint {
  margin-top: 7px;
  font-size: .68rem;
}

.profile-section .aff-feedback {
  padding: 9px 11px;
  margin: -3px 0 13px;
  border: 1px solid var(--aff-line);
  border-radius: 6px;
  color: #c1d0c5;
  font-size: .73rem;
  line-height: 1.5;
}

.profile-section .aff-feedback.is-success {
  border-color: rgba(131, 200, 154, .28);
  background: rgba(77, 148, 98, .09);
  color: #a9d9b6;
}

.profile-section .aff-feedback.is-error {
  border-color: rgba(215, 183, 110, .3);
  background: rgba(215, 183, 110, .06);
  color: #e3c982;
}

.profile-section .aff-terms {
  padding: 12px 13px;
  margin: 0 0 13px;
  border-left: 2px solid rgba(215, 183, 110, .58);
  background: rgba(215, 183, 110, .045);
}

.profile-section .aff-terms-heading,
.profile-section .aff-section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.profile-section .aff-terms-heading strong {
  color: #e1d4b5;
  font-size: .75rem;
}

.profile-section .aff-terms p {
  margin: 8px 0 0;
  color: #a8b2aa;
  font-size: .71rem;
  line-height: 1.7;
}

.profile-section .aff-terms b {
  color: var(--aff-gold);
  font-family: 'DM Mono', monospace;
}

.profile-section .aff-network {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 17px;
  border-top: 1px solid var(--aff-line);
  border-bottom: 1px solid var(--aff-line);
}

.profile-section .aff-network-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px;
}

.profile-section .aff-network-item + .aff-network-item {
  border-left: 1px solid var(--aff-line);
  padding-left: 14px;
}

.profile-section .aff-network-item span,
.profile-section .aff-commission-grid span {
  color: var(--aff-muted);
  font-size: .67rem;
  line-height: 1.4;
}

.profile-section .aff-network-item strong {
  color: var(--aff-ink);
  font-family: 'DM Mono', monospace;
  font-size: 1.05rem;
}

.profile-section .aff-section-heading {
  margin: 0 0 10px;
}

.profile-section .aff-section-heading h4 {
  margin: 0;
  color: #dbe5dd;
  font-size: .78rem;
}

.profile-section .aff-currency-note {
  margin-left: auto;
  color: var(--aff-muted);
  font-size: .61rem;
}

.profile-section .aff-commission {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--aff-line);
}

.profile-section .aff-commission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.profile-section .aff-commission-grid > div {
  min-width: 0;
  padding: 10px 9px;
  border: 1px solid var(--aff-line);
  border-radius: 6px;
  background: var(--aff-panel);
}

.profile-section .aff-commission-grid span,
.profile-section .aff-commission-grid strong {
  display: block;
}

.profile-section .aff-commission-grid strong {
  margin-top: 5px;
  color: var(--aff-green);
  font-family: 'DM Mono', monospace;
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.profile-section .aff-balance-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 0 7px;
  color: #b9c8bd;
  font-size: .68rem;
  font-weight: 650;
}

.profile-section .aff-balance-heading span {
  color: var(--aff-muted);
  font-size: .61rem;
  font-weight: 400;
  text-align: right;
}

.profile-section .aff-balance-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(177, 205, 187, .08);
}

.profile-section .aff-balance-currency {
  color: var(--aff-gold);
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
}

.profile-section .aff-balance-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.profile-section .aff-balance-values > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-section .aff-balance-values span {
  color: var(--aff-muted);
  font-size: .59rem;
}

.profile-section .aff-balance-values strong {
  color: #cbd7ce;
  font-family: 'DM Mono', monospace;
  font-size: .64rem;
  overflow-wrap: anywhere;
}

.profile-section .aff-empty-inline,
.profile-section .aff-history-empty {
  padding: 12px 8px;
  color: var(--aff-muted);
  font-size: .7rem;
  text-align: center;
}

.profile-section .aff-history {
  padding-top: 15px;
}

.profile-section .aff-account {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--aff-line);
}

.profile-section .aff-account-intro {
  margin: -3px 0 12px;
  color: var(--aff-muted);
  font-size: .68rem;
  line-height: 1.6;
}
.profile-section .aff-account-sync { margin: -5px 0 10px; color: var(--aff-muted); font-size: .62rem; }
.profile-section .aff-account-sync.is-error { color: #e3c982; }

.profile-section .aff-account-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--aff-line);
  border-radius: 8px;
  background: var(--aff-panel);
}

.profile-section .aff-account-form label {
  display: grid;
  gap: 5px;
  color: #b9c8bd;
  font-size: .65rem;
}

.profile-section .aff-account-form input {
  width: 100%;
  min-width: 0;
  min-height: 37px;
  padding: 8px 9px;
  border: 1px solid var(--aff-line);
  border-radius: 6px;
  outline: 0;
  background: rgba(11, 18, 14, .42);
  color: var(--aff-ink);
  font: inherit;
  font-size: .7rem;
}

.profile-section .aff-account-form input:focus {
  border-color: rgba(131, 200, 154, .65);
  box-shadow: 0 0 0 2px rgba(131, 200, 154, .1);
}

.profile-section .aff-account-save {
  grid-column: 1 / -1;
  justify-self: start;
}

.profile-section .aff-account-feedback {
  padding: 8px 10px;
  margin: 0 0 10px;
  border: 1px solid var(--aff-line);
  border-radius: 6px;
  font-size: .69rem;
}

.profile-section .aff-account-feedback.is-error {
  color: #e3c982;
  border-color: rgba(215, 183, 110, .3);
  background: rgba(215, 183, 110, .06);
}

.profile-section .aff-account-feedback.is-success {
  color: #a9d9b6;
  border-color: rgba(131, 200, 154, .28);
  background: rgba(77, 148, 98, .09);
}

.profile-section .aff-payout-history { margin-top: 14px; }
.profile-section .aff-payout-list { border-top: 1px solid var(--aff-line); }
.profile-section .aff-payout-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(177, 205, 187, .08);
}
.profile-section .aff-payout-entry > div:first-child { display: grid; gap: 3px; min-width: 0; }
.profile-section .aff-payout-entry > div:first-child strong { color: #d0ddd3; font-size: .7rem; overflow-wrap: anywhere; }
.profile-section .aff-payout-entry span { color: var(--aff-muted); font-size: .61rem; }
.profile-section .aff-payout-status { color: var(--aff-green) !important; }
.profile-section .aff-payout-value { display: grid; justify-items: end; gap: 5px; flex: none; }
.profile-section .aff-payout-value strong { color: var(--aff-green); font: 600 .72rem 'DM Mono', monospace; }
.profile-section .aff-receipt-button { min-height: 30px; padding: 5px 8px; font-size: .63rem; }
.profile-section .aff-account-loading { display: grid; gap: 8px; }
.profile-section .aff-account-loading span { height: 34px; border-radius: 5px; background: rgba(177, 205, 187, .08); animation: aff-skeleton-pulse 1.6s ease-in-out infinite; }

.profile-section .aff-receipt-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(90dvh, 900px);
  padding: 0;
  border: 1px solid rgba(177, 205, 187, .2);
  border-radius: 10px;
  background: #121915;
  color: var(--aff-ink);
}
.profile-section .aff-receipt-dialog::backdrop { background: rgba(4, 8, 6, .82); backdrop-filter: blur(3px); }
.profile-section .aff-receipt-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--aff-line); }
.profile-section .aff-receipt-head button { padding: 6px 10px; border: 1px solid var(--aff-line); border-radius: 5px; background: transparent; color: var(--aff-ink); cursor: pointer; }
.profile-section .aff-receipt-body { display: grid; place-items: center; max-height: calc(90dvh - 54px); overflow: auto; padding: 12px; }
.profile-section .aff-receipt-body img { display: block; max-width: 100%; max-height: calc(90dvh - 80px); object-fit: contain; }
.profile-section .aff-receipt-body a { color: var(--aff-green); }

.profile-section .aff-history-list {
  border-top: 1px solid var(--aff-line);
}

.profile-section .aff-history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(177, 205, 187, .08);
}

.profile-section .aff-entry-main {
  min-width: 0;
}

.profile-section .aff-entry-product {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #d0ddd3;
  font-size: .72rem;
  font-weight: 600;
}

.profile-section .aff-entry-rate {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(215, 183, 110, .1);
  color: var(--aff-gold);
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
}

.profile-section .aff-entry-meta {
  margin-top: 4px;
  color: var(--aff-muted);
  font-size: .63rem;
  line-height: 1.5;
}

.profile-section .aff-entry-total {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.profile-section .aff-entry-total strong {
  color: var(--aff-green);
  font-family: 'DM Mono', monospace;
  font-size: .74rem;
}

.profile-section .aff-payout {
  color: var(--aff-gold);
  font-size: .59rem;
}

.profile-section .aff-payout.is-paid {
  color: var(--aff-green);
}

.profile-section .aff-unavailable {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(215, 183, 110, .25);
  border-radius: 8px;
  background: rgba(215, 183, 110, .055);
  color: #d8c58f;
}

.profile-section .aff-state-mark {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border: 1px solid rgba(215, 183, 110, .42);
  border-radius: 50%;
  font-family: 'DM Mono', monospace;
  font-size: .75rem;
}

.profile-section .aff-unavailable strong {
  font-size: .77rem;
}

.profile-section .aff-unavailable p {
  margin: 5px 0 0;
  color: #b9ad8c;
  font-size: .7rem;
  line-height: 1.6;
}

.profile-section .aff-unavailable-detail {
  overflow-wrap: anywhere;
}

.profile-section .aff-loading {
  display: grid;
  gap: 11px;
  padding: 3px 0;
}

.profile-section .aff-skeleton {
  display: block;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(177, 205, 187, .07), rgba(177, 205, 187, .14), rgba(177, 205, 187, .07));
  animation: aff-skeleton-pulse 1.6s ease-in-out infinite;
}

.profile-section .aff-skeleton-title {
  width: 48%;
  height: 22px;
}

.profile-section .aff-skeleton-link {
  width: 100%;
  height: 62px;
}

.profile-section .aff-skeleton-metrics {
  width: 100%;
  height: 66px;
}

.profile-section .aff-skeleton-row {
  width: 78%;
}

.profile-section .aff-feedback,
.profile-section .aff-unavailable,
.profile-section .aff-link-panel {
  animation: aff-enter .22s ease-out both;
}

@keyframes aff-skeleton-pulse {
  0%, 100% { opacity: .56; }
  50% { opacity: 1; }
}

@keyframes aff-enter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .profile-section .aff-account-form { grid-template-columns: 1fr; }
  .profile-section .aff-account-save { width: 100%; }
  .profile-section .aff-payout-entry { align-items: flex-start; }
  .profile-section .aff-link-panel-create {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-section .aff-button-create {
    width: 100%;
  }

  .profile-section .aff-link-controls {
    flex-direction: column;
  }

  .profile-section .aff-button-copy {
    width: 100%;
  }

  .profile-section .aff-network {
    grid-template-columns: 1fr;
  }

  .profile-section .aff-network-item + .aff-network-item {
    border-top: 1px solid var(--aff-line);
    border-left: 0;
    padding-left: 8px;
  }

  .profile-section .aff-commission-grid {
    grid-template-columns: 1fr;
  }

  .profile-section .aff-commission-grid > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .profile-section .aff-commission-grid strong {
    margin-top: 0;
    text-align: right;
  }

  .profile-section .aff-balance-heading {
    flex-direction: column;
    gap: 3px;
  }

  .profile-section .aff-balance-heading span {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-section .aff-button,
  .profile-section .aff-link-panel,
  .profile-section .aff-feedback,
  .profile-section .aff-unavailable,
  .profile-section .aff-skeleton {
    animation: none;
    transition: none;
  }
}
/* owner 2026-12-02: OTP step for the payout account */
.profile-section .aff-otp { display:grid; gap:9px; margin:10px 0 4px; padding:14px; border:1px solid rgba(77,127,255,.35); border-radius:12px; background:rgba(77,127,255,.06); }
.profile-section .aff-otp p { margin:0; color:#aab3c5; font-size:.8rem; line-height:1.6; }
.profile-section .aff-otp p b { color:#fff; }
.profile-section .aff-otp label { display:grid; gap:5px; font-size:.75rem; color:#aab3c5; }
.profile-section .aff-otp input { padding:10px 12px; border-radius:9px; border:1px solid rgba(255,255,255,.14); background:#05070c; color:#fff; font:inherit; letter-spacing:.06em; }
.profile-section .aff-otp-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.profile-section .aff-link-button { background:none; border:0; color:#8fb0ff; font:inherit; font-size:.78rem; cursor:pointer; padding:4px 2px; }
.profile-section .aff-link-button:disabled { opacity:.5; cursor:default; }
