/* Affiliate Program Styles */
.affiliate-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.affiliate-hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    border-radius: 16px;
    margin-bottom: 3rem;
}

.affiliate-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.affiliate-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stats .stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Dashboard */
.affiliate-dashboard {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h2 {
    color: var(--text-primary);
    margin: 0;
}

.affiliate-code-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.affiliate-code-section label {
    font-weight: 600;
    color: var(--text-primary);
}

.code-display {
    display: flex;
    gap: 0.5rem;
}

.code-display input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: monospace;
    min-width: 120px;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #1976d2;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-content .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-content .stat-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Referral Tools */
.referral-tools h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.tools-grid {
    display: grid;
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.tool-card h4 {
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.link-generator {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.link-generator input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.social-templates {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.social-btn.whatsapp {
    background: #25d366;
    color: white;
}

.social-btn.twitter {
    background: #1da1f2;
    color: white;
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
}

.qr-code {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.download-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
}

/* Earnings Section */
.earnings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.earnings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.earnings-header h3 {
    color: var(--text-primary);
    margin: 0;
}

.payout-btn {
    padding: 0.5rem 1rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.payout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.payout-btn:hover:not(:disabled) {
    background: #45a049;
}

.earnings-chart {
    margin-bottom: 2rem;
    text-align: center;
}

.payout-list {
    max-height: 200px;
    overflow-y: auto;
}

.payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.payout-item:last-child {
    border-bottom: none;
}

/* Referrals Table */
.referrals-table {
    margin-bottom: 3rem;
}

.referrals-table h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

/* Info Sections */
.affiliate-info {
    margin-bottom: 3rem;
}

.affiliate-info h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem auto;
}

.step h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Commission Structure */
.commission-structure {
    margin-bottom: 3rem;
}

.commission-structure h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.commission-table {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.commission-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.commission-row:last-child {
    border-bottom: none;
}

.commission-row.header {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.tier {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
}

.tier.bronze {
    background: #cd7f32;
    color: white;
}

.tier.silver {
    background: #c0c0c0;
    color: #333;
}

.tier.gold {
    background: #ffd700;
    color: #333;
}

.tier.platinum {
    background: #e5e4e2;
    color: #333;
}

/* Affiliate Signup */
.affiliate-signup {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    border-radius: 16px;
}

.affiliate-signup h2 {
    margin-bottom: 1rem;
}

.affiliate-signup p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.join-btn {
    padding: 1rem 2rem;
    background: white;
    color: #4caf50;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .affiliate-page {
        padding: 1rem;
    }
    
    .affiliate-hero {
        padding: 2rem 1rem;
    }
    
    .affiliate-hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .affiliate-code-section {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .code-display {
        width: 100%;
    }
    
    .code-display input {
        flex: 1;
        min-width: 0;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
    
    .social-templates {
        justify-content: center;
    }
}