/* Affiliate Dashboard — icopify.co/affiliate/affiliate-dashboard */

body.affiliate-dashboard-page .dashboard-layout {
    display: block;
}

body.affiliate-dashboard-page .dashboard-main {
    margin-left: 280px;
    width: calc(100% - 280px);
    background: #eef1f6;
    min-height: 100vh;
}

body.affiliate-dashboard-page .dashboard-header {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 250;
    background: #fff;
    justify-content: flex-end;
    min-height: 56px;
}

body.affiliate-dashboard-page .dashboard-content {
    padding: 76px 0 48px;
}

.aff-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 56px 24px;
    overflow: hidden;
}

.aff-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.88) 100%),
        url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1600&q=80') center/cover no-repeat;
    z-index: 0;
}

.aff-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.aff-hero h1 {
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.aff-hero-lead {
    margin: 0 0 8px;
    font-size: 1.05rem;
    opacity: 0.95;
}

.aff-hero-lead .aff-highlight {
    color: #4ade80;
    font-weight: 700;
}

.aff-hero-sub {
    margin: 0;
    font-size: 1.05rem;
    color: #4ade80;
    font-weight: 600;
}

.aff-referral-band {
    position: relative;
    padding: 48px 24px 56px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.92) 100%),
        url('https://images.unsplash.com/photo-1556761175-b413da4baf72?w=1600&q=80') center/cover no-repeat;
}

.aff-referral-box {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.aff-referral-box h2 {
    margin: 0 0 16px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #22c55e;
}

.aff-referral-input-row {
    display: flex;
    gap: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.aff-referral-input-row input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #334155;
    background: #fff;
    min-width: 0;
}

.aff-referral-input-row input:focus {
    outline: none;
}

.aff-copy-btn {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.aff-copy-btn:hover {
    background: #16a34a;
}

.aff-stats-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: -36px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.aff-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
}

.aff-stat-card.aff-stat-balance {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.aff-stat-card.aff-stat-balance .aff-stat-label,
.aff-stat-card.aff-stat-balance .aff-stat-value {
    color: #fff;
}

.aff-stat-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.aff-stat-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: help;
    border: none;
    padding: 0;
}

.aff-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.aff-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 0;
}

.aff-tagline {
    text-align: center;
    margin-bottom: 36px;
}

.aff-tagline h2 {
    margin: 0 0 12px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.35;
}

.aff-tagline p {
    margin: 0;
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.aff-tagline strong {
    color: #1e293b;
}

.aff-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.aff-step-card {
    background: #fff;
    border: 2px solid #bbf7d0;
    border-radius: 10px;
    padding: 28px 22px 24px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.aff-step-icon {
    width: 120px;
    height: 90px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #22c55e;
    opacity: 0.85;
}

.aff-step-card h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #22c55e;
}

.aff-step-card p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.65;
    text-align: left;
}

.aff-faq-section {
    background: #fff;
    border-radius: 8px;
    padding: 40px 32px 48px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    margin-bottom: 24px;
}

.aff-faq-section h2 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e293b;
}

.aff-faq-sub {
    margin: 0 0 28px;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

.aff-faq-list {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.aff-faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.aff-faq-item:last-child {
    border-bottom: none;
}

.aff-faq-question {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 18px;
    background: #fff;
    border: none;
    text-align: left;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aff-faq-question:hover {
    background: #f8fafc;
}

.aff-faq-item.open .aff-faq-question {
    background: #f1f5f9;
}

.aff-faq-caret {
    flex-shrink: 0;
    width: 12px;
    color: #64748b;
    font-size: 0.7rem;
    margin-top: 4px;
    transition: transform 0.15s ease;
}

.aff-faq-item.open .aff-faq-caret {
    transform: rotate(90deg);
}

.aff-faq-answer {
    display: none;
    padding: 0 18px 16px 38px;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.65;
}

.aff-faq-item.open .aff-faq-answer {
    display: block;
}

.aff-faq-answer ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.aff-faq-answer li {
    margin-bottom: 4px;
}

@media (max-width: 992px) {
    body.affiliate-dashboard-page .dashboard-main {
        margin-left: 0;
        width: 100%;
    }

    body.affiliate-dashboard-page .dashboard-header {
        left: 0;
    }

    .aff-stats-row {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 24px;
    }

    .aff-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .aff-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .aff-referral-input-row {
        flex-direction: column;
    }

    .aff-copy-btn {
        width: 100%;
    }
}
