/* ==================== 分销系统样式 ==================== */

/* 购买记录折扣列 */
.discount-cell {
    white-space: nowrap;
}

.discount-badge {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.discount-source {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.original-price {
    text-decoration: line-through;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    margin-right: 4px;
}

/* ==================== 推广中心页面（全新风格） ==================== */

#affiliateContent {
    position: relative;
    padding: 12px;
}

#affiliateContent::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.95), rgba(255, 255, 255, 0.98)),
        linear-gradient(90deg, rgba(20, 25, 35, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(20, 25, 35, 0.03) 1px, transparent 1px);
    background-size: auto, 22px 22px, 22px 22px;
    pointer-events: none;
}

.aff-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.aff-dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(300px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.aff-main-col,
.aff-side-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.aff-side-col {
    position: sticky;
    top: 12px;
    align-self: start;
}

.aff-loading,
.aff-overview-placeholder {
    text-align: center;
    padding: 28px 20px;
    color: var(--color-text-muted);
}

.aff-panel,
.aff-state-card,
.aff-chart,
.aff-wd-form,
.aff-wd-bal {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(216, 190, 150, 0.45);
    box-shadow: 0 22px 50px rgba(49, 38, 24, 0.08);
}

.aff-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 153, 0.95), transparent 36%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.35), transparent 22%),
        linear-gradient(135deg, #171b25 0%, #232a39 52%, #3a2d1f 100%);
    color: #fffaf3;
    box-shadow: 0 30px 70px rgba(17, 21, 30, 0.28);
}

.aff-hero-card::after {
    content: "";
    position: absolute;
    inset: auto -8% -18% auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 196, 92, 0.22), transparent 70%);
    pointer-events: none;
}

.aff-shell-apply .aff-hero-card {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
}

.aff-hero-copy,
.aff-hero-side {
    position: relative;
    z-index: 1;
}

.aff-hero-copy h2 {
    margin: 8px 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.9rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.aff-hero-copy p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 250, 243, 0.82);
    font-size: 0.96rem;
    line-height: 1.75;
}

.aff-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.aff-kicker-muted {
    background: rgba(255, 140, 0, 0.08);
    border-color: rgba(255, 140, 0, 0.12);
    color: var(--color-primary-dark);
}

.aff-hero-nums {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.aff-hero-nums div,
.aff-note-card,
.aff-link-card,
.aff-level-card {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.aff-hero-nums div {
    padding: 18px 16px;
    min-height: 96px;
}

.aff-hero-nums strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2vw, 2.2rem);
    letter-spacing: -0.03em;
}

.aff-hero-nums small {
    display: block;
    color: rgba(255, 250, 243, 0.74);
    font-size: 0.76rem;
}

.aff-hero-side {
    display: flex;
    align-items: stretch;
}

.aff-hero-side-stack {
    flex-direction: column;
    gap: 14px;
}

.aff-note-card,
.aff-link-card,
.aff-level-card {
    padding: 18px;
}

.aff-note-card-dark {
    min-height: 100%;
    background: rgba(255, 255, 255, 0.06);
}

.aff-note-title {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: rgba(255, 250, 243, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.aff-note-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(255, 250, 243, 0.92);
    line-height: 1.9;
    font-size: 0.92rem;
}

.aff-panel {
    border-radius: 24px;
    padding: 22px;
}

.aff-side-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aff-side-stack-card {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 248, 239, 0.72);
    border: 1px solid rgba(228, 196, 148, 0.45);
}

.aff-side-stack-card h3 {
    margin: 10px 0 0;
    font-size: 1.06rem;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: #202534;
}

.aff-section-head,
.aff-tabs-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.aff-section-head-compact {
    margin-bottom: 14px;
}

.aff-section-head h3,
.aff-tabs-head h3 {
    margin: 6px 0 0;
    font-size: 1.18rem;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: #202534;
}

.aff-section-head p,
.aff-tabs-head p {
    margin: 8px 0 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.aff-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.aff-form-col label,
.aff-wd-form-grid label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #685942;
    letter-spacing: 0.02em;
}

.aff-form-col label .req,
.aff-wd-form-grid label .req {
    color: var(--color-error);
}

.aff-form-col input,
.aff-form-col select,
.aff-form-col textarea,
.aff-link-box input,
.aff-sel-sm,
.aff-wd-form-grid input,
.aff-wd-form-grid select {
    width: 100%;
    box-sizing: border-box;
    border-radius: 16px;
    border: 1px solid rgba(201, 176, 136, 0.45);
    background: rgba(255, 250, 244, 0.9);
    color: #2a3140;
    font-size: 0.92rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    outline: none;
}

.aff-form-col input,
.aff-form-col select,
.aff-form-col textarea,
.aff-wd-form-grid input,
.aff-wd-form-grid select {
    padding: 13px 14px;
}

.aff-form-col input:focus,
.aff-form-col select:focus,
.aff-form-col textarea:focus,
.aff-link-box input:focus,
.aff-sel-sm:focus,
.aff-wd-form-grid input:focus,
.aff-wd-form-grid select:focus {
    border-color: rgba(255, 140, 0, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.12);
}

.aff-field-hint {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    font-size: 0.74rem;
}

.aff-field-hint.warn { color: var(--color-warning); }
.aff-field-hint.err { color: var(--color-error); }
.aff-field-hint.ok { color: var(--color-success); }

.aff-btn-primary,
.aff-btn-copy,
.aff-pag-btn {
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.aff-btn-primary:hover,
.aff-btn-copy:hover,
.aff-pag-btn:hover {
    transform: translateY(-1px);
}

.aff-btn-primary {
    width: 100%;
    padding: 13px 18px;
    margin-top: 6px;
    background: linear-gradient(135deg, #ff9e2c, #ef7b00);
    color: #fff;
    box-shadow: 0 16px 30px rgba(239, 123, 0, 0.28);
}

.aff-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.aff-btn-primary.aff-btn-sm {
    width: auto;
    padding: 11px 22px;
}

.aff-link-label,
.aff-mini-note {
    color: var(--color-text-secondary);
    font-size: 0.78rem;
}

.aff-mini-note-dark {
    color: var(--color-text-secondary);
}

.aff-link-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.aff-link-box input {
    flex: 1;
    padding: 12px 14px;
    font-family: var(--font-mono);
    background: rgba(255, 248, 238, 0.96);
}

.aff-btn-copy {
    padding: 12px 18px;
    background: linear-gradient(135deg, #fff2da, #ffd89b);
    color: #4c3420;
    white-space: nowrap;
}

.aff-level-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 30px;
}

.aff-level-icon { font-size: 1.2rem; line-height: 1; }
.aff-level-name { font-weight: 800; }

.aff-perk {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 245, 230, 0.82);
    border: 1px solid rgba(255, 205, 136, 0.5);
    color: #75532f;
    font-size: 0.72rem;
    font-weight: 700;
}

.aff-code-panel {
    padding-top: 18px;
}

.aff-copy-panel {
    padding-top: 18px;
}

.aff-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.aff-copy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.aff-copy-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 148px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(228, 196, 148, 0.55);
    background: linear-gradient(135deg, rgba(255, 245, 227, 0.94), rgba(255, 255, 255, 0.96));
    overflow: hidden;
}

.aff-copy-card::before {
    content: "";
    position: absolute;
    inset: auto -18px -22px auto;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 170, 59, 0.18), transparent 70%);
    pointer-events: none;
}

.aff-copy-card-minimal {
    background: linear-gradient(135deg, rgba(255, 251, 244, 0.96), rgba(255, 255, 255, 0.98));
}

.aff-copy-card-benefit {
    background: linear-gradient(135deg, rgba(255, 246, 225, 0.98), rgba(255, 238, 210, 0.94));
}

.aff-copy-card-community {
    background: linear-gradient(135deg, rgba(241, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.aff-copy-card-creator {
    background: linear-gradient(135deg, rgba(247, 240, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.aff-copy-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aff-copy-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(210, 182, 140, 0.4);
    color: #6a4a24;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.aff-copy-card-btn {
    position: relative;
    z-index: 1;
    padding: 7px 12px;
    border: 1px solid rgba(255, 140, 0, 0.18);
    border-radius: 999px;
    background: rgba(255, 140, 0, 0.08);
    color: var(--color-primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.aff-copy-card-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 140, 0, 0.14);
    border-color: rgba(255, 140, 0, 0.28);
}

.aff-copy-preview {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #2b3341;
    font-size: 0.84rem;
    line-height: 1.72;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aff-code-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 245, 227, 0.96), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(228, 196, 148, 0.55);
}

.aff-code-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.aff-code-tag code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    word-break: break-all;
}

.aff-code-tag small {
    color: var(--color-text-secondary);
    font-size: 0.74rem;
}

.aff-code-tag button {
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 140, 0, 0.18);
    background: rgba(255, 140, 0, 0.08);
    color: var(--color-primary-dark);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.aff-empty-inline,
.aff-empty-hint,
.aff-empty {
    color: var(--color-text-muted);
}

.aff-empty-inline {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 248, 239, 0.78);
    border: 1px dashed rgba(201, 176, 136, 0.55);
    text-align: center;
}

.aff-overview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aff-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.aff-stat {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(216, 190, 150, 0.45);
    box-shadow: 0 18px 40px rgba(49, 38, 24, 0.07);
}

.aff-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.76rem;
    color: rgba(54, 61, 75, 0.68);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.aff-stat-top small {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 140, 0, 0.08);
    color: var(--color-primary-dark);
    font-size: 0.66rem;
    font-weight: 700;
}

.aff-stat-val {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: #202534;
}

.aff-stat-note {
    margin-top: 10px;
    color: rgba(54, 61, 75, 0.72);
    font-size: 0.78rem;
    line-height: 1.6;
}

.aff-stat.primary,
.aff-stat.accent {
    color: #fff;
    border-color: transparent;
}

.aff-stat.primary {
    background:
        radial-gradient(circle at top left, rgba(255, 214, 153, 0.34), transparent 36%),
        linear-gradient(135deg, #202633 0%, #3a2c1e 100%);
}

.aff-stat.accent {
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #7856ff 0%, #3b2f87 100%);
}

.aff-stat.primary .aff-stat-top,
.aff-stat.accent .aff-stat-top,
.aff-stat.primary .aff-stat-note,
.aff-stat.accent .aff-stat-note,
.aff-stat.primary .aff-stat-val,
.aff-stat.accent .aff-stat-val {
    color: #fff;
}

.aff-stat.primary .aff-stat-top small,
.aff-stat.accent .aff-stat-top small {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}

.aff-quick-info,
.aff-tab-summary {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 248, 238, 0.76);
    border: 1px solid rgba(228, 196, 148, 0.45);
    font-size: 0.86rem;
    color: var(--color-text-secondary);
}

.aff-quick-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.aff-quick-info b,
.aff-tab-summary b {
    color: #202534;
}

.aff-qi-sep {
    width: 1px;
    height: 14px;
    background: rgba(190, 166, 133, 0.55);
}

.aff-tabs-wrap {
    min-height: 0;
}

.aff-tabs-head {
    align-items: center;
}

.aff-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aff-tab {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(215, 189, 151, 0.5);
    background: rgba(255, 248, 239, 0.72);
    color: #66553d;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aff-tab:hover {
    border-color: rgba(255, 140, 0, 0.4);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.aff-tab.active {
    background: linear-gradient(135deg, #ffb24c, #ef7b00);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(239, 123, 0, 0.22);
}

.aff-tab-body {
    min-height: 120px;
}

.aff-trend {
    display: flex;
    flex-direction: column;
}

.aff-trend-ctrl {
    display: flex;
    gap: 10px;
}

.aff-sel-sm {
    padding: 10px 14px;
}

.aff-chart {
    border-radius: 22px;
    padding: 18px;
    min-height: 210px;
    overflow-x: auto;
}

.aff-chart-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(54, 61, 75, 0.55);
}

.aff-line-chart-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aff-line-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.aff-line-metric {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 248, 239, 0.78);
    border: 1px solid rgba(228, 196, 148, 0.42);
}

.aff-line-metric span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.04em;
}

.aff-line-metric strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: -0.03em;
    color: #202534;
}

.aff-line-stage {
    position: relative;
    padding-bottom: 22px;
}

.aff-line-svg {
    display: block;
    width: 100%;
    height: 220px;
    overflow: visible;
}

.aff-line-guide {
    stroke: rgba(190, 166, 133, 0.28);
    stroke-width: 1;
    stroke-dasharray: 4 8;
}

.aff-line-area {
    fill: url(#affLineGradient);
}

.aff-line-path {
    fill: none;
    stroke: #ff8c00;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 10px 14px rgba(255, 140, 0, 0.18));
}

.aff-line-dot {
    fill: #ffffff;
    stroke: #ff8c00;
    stroke-width: 2;
}

.aff-line-dot-last {
    fill: #ff8c00;
    stroke: #ffffff;
    stroke-width: 3;
}

.aff-line-xlabels {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
}

.aff-line-xlabel {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.68rem;
    color: rgba(54, 61, 75, 0.62);
    white-space: nowrap;
}

.aff-tbl-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(223, 198, 160, 0.45);
    background: rgba(255, 255, 255, 0.62);
}

.aff-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.aff-tbl thead th {
    padding: 14px 14px;
    text-align: left;
    background: rgba(255, 247, 236, 0.88);
    border-bottom: 1px solid rgba(223, 198, 160, 0.5);
    color: #6a5742;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.aff-tbl tbody td {
    padding: 14px;
    border-bottom: 1px solid rgba(232, 219, 197, 0.72);
    color: #243041;
}

.aff-tbl tbody tr:last-child td {
    border-bottom: none;
}

.aff-tbl tbody tr:hover {
    background: rgba(255, 247, 236, 0.48);
}

.mono-sm {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hl {
    font-weight: 800;
    color: var(--color-primary-dark);
}

.tm {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.ref-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}

.aff-empty {
    padding: 36px !important;
    text-align: center;
}

.aff-empty-hint {
    text-align: center;
    padding: 28px 18px;
    border-radius: 18px;
    background: rgba(255, 248, 239, 0.72);
    border: 1px dashed rgba(201, 176, 136, 0.55);
}

.st {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.st-pending { background: #fef3c7; color: #92400e; }
.st-settled, .st-approved { background: #d1fae5; color: #065f46; }
.st-paid { background: #dbeafe; color: #1e40af; }
.st-withdrawn { background: #e0e7ff; color: #3730a3; }
.st-rejected, .st-refunded { background: #fee2e2; color: #991b1b; }
.st-tier1 { background: #dbeafe; color: #1e40af; }
.st-tier2 { background: #fae8ff; color: #7e22ce; }

.aff-team-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
}
.aff-team-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary, #6b7280);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.aff-team-card-body {
    font-size: 14px;
    color: var(--color-text-primary, #111827);
}

.aff-team-card-spaced {
    margin-top: 8px;
}

.aff-wd-top-spaced {
    margin: 12px 0;
}

.aff-subsection-title {
    margin: 16px 0 8px;
    font-size: 14px;
}

.aff-pag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(223, 198, 160, 0.45);
}

.aff-pag-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #fff2da, #ffd89b);
    color: #594022;
}

.aff-pag-info {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.aff-wd {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aff-wd-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 0.42fr)) minmax(0, 1.6fr);
    gap: 14px;
    align-items: stretch;
}

.aff-wd-bal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px;
    border-radius: 22px;
    min-height: 136px;
}

.aff-wd-bal span {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.aff-wd-bal-v {
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: -0.04em;
    color: #202534;
}

.aff-wd-bal.frozen .aff-wd-bal-v { color: #f59e0b; }
.aff-wd-bal.done .aff-wd-bal-v { color: #10b981; }

.aff-wd-form {
    padding: 18px;
    border-radius: 22px;
}

.aff-wd-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.aff-state-card {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 36px 28px;
    border-radius: 28px;
    text-align: center;
}

.aff-state-card.is-pending {
    background:
        radial-gradient(circle at top left, rgba(255, 204, 128, 0.2), transparent 30%),
        rgba(255, 255, 255, 0.9);
}

.aff-state-card.is-rejected {
    background:
        radial-gradient(circle at top left, rgba(255, 160, 160, 0.16), transparent 28%),
        rgba(255, 255, 255, 0.9);
}

.aff-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: rgba(255, 140, 0, 0.08);
    font-size: 2rem;
}

.aff-state-card h3 {
    margin: 12px 0 10px;
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    color: #202534;
}

.aff-state-card p {
    margin: 0 auto;
    max-width: 520px;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.aff-state-meta {
    margin-top: 16px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

@media (max-width: 1024px) {
    .aff-dash-grid {
        grid-template-columns: 1fr;
    }

    .aff-side-col {
        position: static;
    }

    .aff-hero-card {
        grid-template-columns: 1fr;
    }

    .aff-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aff-line-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aff-wd-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aff-wd-form {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    #affiliateContent {
        padding: 6px;
    }

    .aff-shell {
        gap: 14px;
    }

    .aff-hero-card,
    .aff-panel,
    .aff-state-card {
        padding: 18px;
        border-radius: 22px;
    }

    .aff-hero-nums,
    .aff-form-row,
    .aff-stats-grid,
    .aff-wd-top,
    .aff-wd-form-grid,
    .aff-codes-grid,
    .aff-copy-grid {
        grid-template-columns: 1fr;
    }

    .aff-line-metrics {
        grid-template-columns: 1fr;
    }

    .aff-tabs-head,
    .aff-section-head,
    .aff-quick-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .aff-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .aff-tab {
        white-space: nowrap;
    }

    .aff-link-box,
    .aff-trend-ctrl {
        flex-direction: column;
    }

    .aff-chart-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
