/* ═══════════════════════════════════════════════════════════════
   AFFILIATE / PARTNER PROGRAM TAB
═══════════════════════════════════════════════════════════════ */

/* Referral link card */
.aff-ref-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(184, 149, 106, 0.15);
    box-shadow: 0 6px 24px rgba(44, 24, 16, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
}
.aff-ref-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(184, 149, 106, 0.1), rgba(196, 145, 138, 0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aff-ref-icon svg {
    stroke: var(--terra);
}
.aff-ref-body {
    flex: 1;
    min-width: 0;
}
.aff-ref-label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--cream-txt, #8a7a6c);
    margin-bottom: 4px;
}
.aff-ref-url {
    font-family: "Jost", monospace;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--txt, #2c1810);
    word-break: break-all;
}
.aff-ref-copy {
    white-space: nowrap;
}
.aff-ref-copy.copied {
    background: var(--sage, #8fa887) !important;
}

/* Info banner — collapsible */
.aff-info-banner {
    background: #fff;
    border-radius: 14px;
    margin-bottom: 24px;
    border: 1px solid rgba(44, 24, 16, 0.04);
    overflow: hidden;
}
.aff-info-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--txt, #2c1810);
    transition: background 0.2s;
}
.aff-info-header:hover {
    background: rgba(184, 149, 106, 0.03);
}
.aff-info-header svg:first-child {
    stroke: var(--terra);
    flex-shrink: 0;
}
.aff-info-chevron {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.aff-info-banner.open .aff-info-chevron {
    transform: rotate(180deg);
}
.aff-info-body {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.4s ease,
        padding 0.3s ease;
    padding: 0 24px;
}
.aff-info-banner.open .aff-info-body {
    max-height: 400px;
    padding: 0 24px 24px;
}
.aff-info-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.aff-info-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.aff-info-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(184, 149, 106, 0.1);
    color: var(--terra);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aff-info-step strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.aff-info-step p {
    font-size: 0.75rem;
    color: var(--cream-txt, #8a7a6c);
    line-height: 1.5;
    margin: 0;
}

/* Stats grid */
.aff-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.aff-stat {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(44, 24, 16, 0.04);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}
.aff-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 24, 16, 0.06);
}
.aff-stat-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aff-stat-icon svg {
    stroke-width: 1.5;
}
.aff-stat-clicks {
    background: rgba(184, 149, 106, 0.08);
}
.aff-stat-clicks svg {
    stroke: #b8956a;
}
.aff-stat-signups {
    background: rgba(143, 168, 135, 0.08);
}
.aff-stat-signups svg {
    stroke: #8fa887;
}
.aff-stat-conversions {
    background: rgba(196, 145, 138, 0.08);
}
.aff-stat-conversions svg {
    stroke: #c4918a;
}
.aff-stat-earned {
    background: rgba(184, 149, 106, 0.12);
}
.aff-stat-earned svg {
    stroke: #b8956a;
}
.aff-stat-data {
    min-width: 0;
}
.aff-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--txt, #2c1810);
    line-height: 1;
    margin-bottom: 2px;
}
.aff-stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--cream-txt, #8a7a6c);
}

/* Earnings cards */
.aff-earnings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.aff-earn-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid rgba(44, 24, 16, 0.04);
}
.aff-earn-card h3 {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--cream-txt, #8a7a6c);
    margin-bottom: 10px;
}
.aff-earn-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--terra);
    line-height: 1;
    margin-bottom: 4px;
}
.aff-earn-sub {
    font-size: 0.72rem;
    color: var(--cream-txt, #8a7a6c);
}
.aff-earn-paid {
    border-style: dashed;
    border-color: rgba(143, 168, 135, 0.3);
}
.aff-earn-paid .aff-earn-amount {
    color: var(--sage, #8fa887);
}

/* Referrals table */
.aff-table-wrap {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(44, 24, 16, 0.04);
    overflow: hidden;
    margin-bottom: 24px;
}
.aff-table-header {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(44, 24, 16, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.aff-table-header h3 {
    font-size: 1rem;
    font-weight: 600;
}
.aff-table-badge {
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(184, 149, 106, 0.1);
    color: var(--terra);
}
.aff-table {
    width: 100%;
    border-collapse: collapse;
}
.aff-table th {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--cream-txt, #8a7a6c);
    padding: 12px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(44, 24, 16, 0.06);
    background: rgba(44, 24, 16, 0.015);
}
.aff-table td {
    padding: 14px 24px;
    font-size: 0.82rem;
    color: var(--txt, #2c1810);
    border-bottom: 1px solid rgba(44, 24, 16, 0.03);
}
.aff-table tr:last-child td {
    border-bottom: none;
}
.aff-table tr:hover td {
    background: rgba(184, 149, 106, 0.02);
}

/* Status pills */
.aff-status {
    display: inline-block;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
}
.aff-status-clicked {
    background: rgba(181, 168, 153, 0.12);
    color: #8a7a6c;
}
.aff-status-signed_up {
    background: rgba(143, 168, 135, 0.12);
    color: #6b8b63;
}
.aff-status-converted {
    background: rgba(184, 149, 106, 0.12);
    color: #a07b52;
}
.aff-status-paid {
    background: rgba(196, 145, 138, 0.12);
    color: #c4918a;
}

/* Empty state */
.aff-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--cream-txt, #8a7a6c);
}
.aff-empty svg {
    display: block;
    margin: 0 auto 12px;
    stroke: var(--cream-txt, #8a7a6c);
}
.aff-empty p {
    font-size: 0.82rem;
}

/* Payout settings */
.aff-payout {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    border: 1px solid rgba(44, 24, 16, 0.04);
}
.aff-payout h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.aff-payout-desc {
    font-size: 0.78rem;
    color: var(--cream-txt, #8a7a6c);
    line-height: 1.5;
    margin-bottom: 18px;
}
.aff-payout-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.aff-payout-field label {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--cream-txt, #8a7a6c);
    margin-bottom: 4px;
}
.aff-payout-field input,
.aff-payout-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(44, 24, 16, 0.1);
    border-radius: 8px;
    background: var(--cream, #fbf7f0);
    font-size: 0.82rem;
    color: var(--txt, #2c1810);
}
.aff-payout-field input:focus,
.aff-payout-field select:focus {
    outline: none;
    border-color: var(--terra);
}

/* ═══ AFFILIATE RESPONSIVE ═══ */
@media (max-width: 900px) {
    .aff-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .aff-earnings {
        grid-template-columns: 1fr;
    }
    .aff-payout-row {
        grid-template-columns: 1fr;
    }
    .aff-ref-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .aff-ref-copy {
        width: 100%;
        justify-content: center;
    }
    .aff-table-wrap {
        overflow-x: auto;
    }
    .aff-table {
        min-width: 400px;
    }
}
@media (max-width: 480px) {
    .aff-stat {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 16px 12px;
    }
    .aff-stat-num {
        font-size: 1.3rem;
    }
    .aff-earn-amount {
        font-size: 1.6rem;
    }
}

/* ═══ REDUCED MOTION — respect user accessibility preference ═══ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

