/* Afflyr Affiliate Portal — Frontend Styles */

.afflyr-portal {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

.afflyr-portal-header {
    margin-bottom: 32px;
}
.afflyr-portal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 4px;
}
.afflyr-portal-header p {
    color: #6b7280;
    margin: 0;
}

/* Stat Cards */
.afflyr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.afflyr-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.afflyr-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}
.afflyr-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}
.afflyr-highlight {
    color: #6C3FE8;
}

/* Sections */
.afflyr-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}
.afflyr-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 16px;
}

/* Link Box */
.afflyr-link-box {
    display: flex;
    gap: 8px;
}
.afflyr-link-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #f9fafb;
    color: #1a1a2e;
}

/* Buttons */
.afflyr-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #6C3FE8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.afflyr-btn:hover {
    background: #5a33c6;
}
.afflyr-btn-secondary {
    background: #f3f4f6;
    color: #1a1a2e;
    border: 1px solid #d1d5db;
}
.afflyr-btn-secondary:hover {
    background: #e5e7eb;
}
.afflyr-btn-small {
    padding: 4px 10px;
    font-size: 0.78rem;
    background: #f3f4f6;
    color: #6C3FE8;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.afflyr-btn-small:hover {
    background: #ede9fe;
}

/* Coupons */
.afflyr-coupon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.afflyr-coupon-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #ede9fe;
    border-radius: 8px;
}
.afflyr-coupon-code {
    font-weight: 700;
    font-size: 1rem;
    color: #6C3FE8;
    letter-spacing: 0.05em;
}

/* Tables */
.afflyr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.afflyr-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.afflyr-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}
.afflyr-table tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.afflyr-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}
.afflyr-badge-pending { background: #fef3c7; color: #92400e; }
.afflyr-badge-approved { background: #d1fae5; color: #065f46; }
.afflyr-badge-paid { background: #ede9fe; color: #6C3FE8; }
.afflyr-badge-rejected { background: #fee2e2; color: #991b1b; }

/* Notices */
.afflyr-notice {
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #374151;
    font-size: 0.95rem;
}
.afflyr-notice a { color: #6C3FE8; font-weight: 600; }
.afflyr-notice-warning { background: #fffbeb; border-color: #fde68a; }
.afflyr-notice-error { background: #fef2f2; border-color: #fecaca; }

/* Loading */
.afflyr-loading {
    color: #9ca3af;
    font-style: italic;
}

/* Form */
.afflyr-register-form {
    max-width: 500px;
}
.afflyr-form-row {
    margin-bottom: 20px;
}
.afflyr-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.afflyr-form-row input,
.afflyr-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}
.afflyr-form-row textarea {
    resize: vertical;
}

/* Responsive */
@media (max-width: 600px) {
    .afflyr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .afflyr-link-box {
        flex-direction: column;
    }
}
