/* Royal Affiliate Pro Public Styles */

.rafp-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.rafp-dashboard-powered {
    text-align: center;
    padding: 24px 0 8px;
    margin-top: 32px;
    border-top: 1px solid #eee;
}

.rafp-dashboard-powered a {
    color: #999;
    text-decoration: none;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.2s ease;
}

.rafp-dashboard-powered a:hover {
    color: #666;
}

.rafp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.rafp-stat-box {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.rafp-stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 36px;
    color: #333;
}

.rafp-stat-box p {
    margin: 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rafp-referral-link-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.rafp-referral-link-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 10px 0;
}

.rafp-recent-referrals {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.rafp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.rafp-table th,
.rafp-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.rafp-table th {
    background: #f7f7f7;
    font-weight: 600;
    color: #333;
}

.rafp-status-approved {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rafp-status-pending {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rafp-status-rejected {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rafp-registration-form {
    max-width: 600px;
    margin: 0 auto 60px;
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.rafp-registration-form p {
    margin-bottom: 20px;
}

.rafp-registration-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-family: inherit;
}

.rafp-registration-form input[type="email"],
.rafp-registration-form input[type="text"],
.rafp-registration-form input[type="url"],
.rafp-registration-form input[type="tel"],
.rafp-registration-form select,
.rafp-registration-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.rafp-registration-form .button {
    background: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.rafp-registration-form .button:hover {
    background: #135e96;
}

/* Payment Method Conditional Fields */
.rafp-payment-fields {
    margin-bottom: 15px;
}

.rafp-field-hint {
    display: block;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: normal;
    font-family: inherit;
}

.rafp-payment-info {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.rafp-payment-info .dashicons {
    flex-shrink: 0;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.rafp-payment-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.rafp-payment-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.rafp-payment-info-stripe {
    background: #f0f4ff;
    border: 1px solid #d4dbf5;
}

.rafp-payment-info-stripe .dashicons {
    color: #6772e5;
}

.rafp-payment-info-stripe strong {
    color: #6772e5;
}

.rafp-payment-info-bank {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.rafp-payment-info-bank .dashicons {
    color: #495057;
}

.rafp-payment-info-bank strong {
    color: #333;
}

.rafp-stats-widget {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.rafp-stat {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.rafp-stat h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.rafp-stat-value {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   Payment Settings Sections (PayPal, Stripe, Bank Transfer)
   ========================================================================== */

.rafp-payment-section,
.rafp-stripe-connect-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.rafp-payment-section h3,
.rafp-stripe-connect-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Payment Method Info Container */
.rafp-payment-method-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Payment Method Badge */
.rafp-payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    width: fit-content;
}

.rafp-payment-method-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.rafp-method-paypal {
    background: #ffc439;
    color: #003087;
}

.rafp-method-bank {
    background: #e9ecef;
    color: #495057;
}

/* Payment Details */
.rafp-payment-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.rafp-payment-details p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.rafp-payment-details p:last-child {
    margin-bottom: 0;
}

.rafp-payment-hint {
    color: #666 !important;
    font-size: 13px !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rafp-payment-hint .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Notices */
.rafp-notice {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.rafp-notice p {
    margin: 0;
    font-size: 14px;
}

.rafp-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rafp-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.rafp-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.rafp-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Connected State */
.rafp-stripe-connected {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rafp-stripe-status {
    display: flex;
    align-items: center;
}

.rafp-stripe-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.rafp-stripe-status-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.rafp-status-connected {
    background: #d4edda;
    color: #155724;
}

.rafp-status-connected .dashicons {
    color: #28a745;
}

.rafp-stripe-account-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.rafp-stripe-account-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.rafp-stripe-account-info p:last-child {
    margin-bottom: 0;
}

.rafp-stripe-account-info strong {
    color: #555;
}

.rafp-stripe-actions {
    padding-top: 10px;
}

/* Not Connected State */
.rafp-stripe-not-connected p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.rafp-stripe-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.rafp-stripe-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: #333;
}

.rafp-stripe-benefits .dashicons {
    color: #28a745;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Stripe Connect Button */
.rafp-stripe-connect-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #6772e5;
    color: #fff;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.rafp-stripe-connect-button:hover {
    background: #5469d4;
    color: #fff;
    text-decoration: none;
}

.rafp-stripe-connect-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(103, 114, 229, 0.3);
}

.rafp-stripe-connect-button svg {
    flex-shrink: 0;
}

/* Button Styles */
.rafp-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rafp-btn-primary {
    background: #2271b1;
    color: #fff;
}

.rafp-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.rafp-btn-secondary {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #dcdcde;
}

.rafp-btn-secondary:hover {
    background: #dcdcde;
    color: #1d2327;
    border-color: #c3c4c7;
}

.rafp-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Error and Success text for forms */
.rafp-error {
    color: #dc3545;
    font-size: 14px;
    padding: 12px 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-top: 15px;
}

.rafp-success {
    color: #155724;
    font-size: 14px;
    padding: 12px 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-top: 15px;
}

/* ==========================================================================
   Leaderboard Styles
   ========================================================================== */

.rafp-leaderboard {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.rafp-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.rafp-leaderboard-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1d2327;
}

.rafp-leaderboard-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rafp-leaderboard-filters select {
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.rafp-leaderboard-filters select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Table Style */
.rafp-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rafp-leaderboard-table th,
.rafp-leaderboard-table td {
    padding: 16px 20px;
    text-align: left;
}

.rafp-leaderboard-table th {
    background: #f6f7f7;
    font-weight: 600;
    color: #50575e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dcdcde;
}

.rafp-leaderboard-table td {
    border-bottom: 1px solid #f0f0f1;
}

.rafp-leaderboard-table tr:last-child td {
    border-bottom: none;
}

.rafp-leaderboard-table tr:hover td {
    background: #f9f9f9;
}

.rafp-leaderboard-rank {
    width: 60px;
    text-align: center !important;
}

.rafp-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.rafp-rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rafp-rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #000;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rafp-rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b8722c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.rafp-rank-default {
    background: #f0f0f1;
    color: #50575e;
}

.rafp-leaderboard-affiliate {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rafp-leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rafp-leaderboard-name {
    font-weight: 500;
    color: #1d2327;
}

.rafp-leaderboard-tier {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: #e7f5ff;
    color: #1971c2;
    margin-top: 4px;
}

.rafp-leaderboard-value {
    font-weight: 600;
    color: #1d2327;
    font-size: 16px;
}

/* Podium Style */
.rafp-leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.rafp-podium-place {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.rafp-podium-place:hover {
    transform: translateY(-5px);
}

.rafp-podium-1 {
    order: 2;
    padding-bottom: 60px;
    background: linear-gradient(180deg, #fff9e6 0%, #fff 100%);
    border: 2px solid #ffd700;
}

.rafp-podium-2 {
    order: 1;
    padding-bottom: 40px;
    background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
    border: 2px solid #c0c0c0;
}

.rafp-podium-3 {
    order: 3;
    padding-bottom: 30px;
    background: linear-gradient(180deg, #fff5eb 0%, #fff 100%);
    border: 2px solid #cd7f32;
}

.rafp-podium-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rafp-podium-1 .rafp-podium-avatar {
    width: 100px;
    height: 100px;
    border-color: #ffd700;
}

.rafp-podium-rank {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rafp-podium-1 .rafp-podium-rank {
    color: #ffd700;
    font-size: 40px;
}

.rafp-podium-2 .rafp-podium-rank {
    color: #a8a8a8;
}

.rafp-podium-3 .rafp-podium-rank {
    color: #cd7f32;
}

.rafp-podium-name {
    font-weight: 600;
    color: #1d2327;
    font-size: 16px;
    margin-bottom: 5px;
}

.rafp-podium-value {
    font-size: 20px;
    font-weight: 700;
    color: #2271b1;
}

/* Cards Style */
.rafp-leaderboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.rafp-leaderboard-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s ease;
}

.rafp-leaderboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.rafp-card-rank {
    flex-shrink: 0;
}

.rafp-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rafp-card-info {
    flex: 1;
    min-width: 0;
}

.rafp-card-name {
    font-weight: 600;
    color: #1d2327;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rafp-card-tier {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: #e7f5ff;
    color: #1971c2;
}

.rafp-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #2271b1;
    flex-shrink: 0;
}

/* Minimal Style */
.rafp-leaderboard-minimal {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rafp-minimal-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f1;
}

.rafp-minimal-row:last-child {
    border-bottom: none;
}

.rafp-minimal-row:hover {
    background: #f9f9f9;
}

.rafp-minimal-rank {
    width: 40px;
    font-weight: 600;
    color: #50575e;
}

.rafp-minimal-name {
    flex: 1;
    font-weight: 500;
    color: #1d2327;
}

.rafp-minimal-value {
    font-weight: 600;
    color: #2271b1;
}

/* Loading State */
.rafp-leaderboard-loading {
    text-align: center;
    padding: 60px 20px;
    color: #50575e;
}

.rafp-leaderboard-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f1;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: rafp-spin 0.8s linear infinite;
}

@keyframes rafp-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.rafp-leaderboard-empty {
    text-align: center;
    padding: 60px 20px;
    color: #50575e;
    background: #f6f7f7;
    border-radius: 8px;
}

.rafp-leaderboard-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
    margin-bottom: 15px;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .rafp-stripe-connect-section {
        padding: 20px;
    }

    .rafp-stripe-connect-button {
        width: 100%;
        justify-content: center;
    }

    .rafp-leaderboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rafp-leaderboard-podium {
        flex-direction: column;
        align-items: center;
    }

    .rafp-podium-place {
        width: 100%;
        max-width: 280px;
    }

    .rafp-podium-1,
    .rafp-podium-2,
    .rafp-podium-3 {
        order: unset;
        padding-bottom: 20px;
    }

    .rafp-leaderboard-table {
        display: block;
        overflow-x: auto;
    }
}

/* ===== PAYMENT SETTINGS FORM ===== */
.rafp-payment-form {
    margin-top: 15px;
}

.rafp-form-row {
    margin-bottom: 15px;
}

.rafp-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
    color: #1d2327;
}

.rafp-form-row input[type="email"],
.rafp-form-row textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.rafp-form-row input[type="email"]:focus,
.rafp-form-row textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rafp-form-hint {
    font-size: 12px;
    color: #646970;
    margin: 4px 0 0;
}

.rafp-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rafp-save-payment-btn {
    background: #2271b1 !important;
    border-color: #135e96 !important;
    color: #fff !important;
    padding: 6px 20px !important;
    font-weight: 500 !important;
    cursor: pointer;
    border-radius: 4px !important;
}

.rafp-save-payment-btn:hover {
    background: #135e96 !important;
    border-color: #0a4b78 !important;
}

.rafp-save-payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rafp-payment-status {
    font-size: 13px;
    font-weight: 500;
}

.rafp-status-success {
    color: #2e7d32;
}

.rafp-status-error {
    color: #c62828;
}

.rafp-status-paid {
    background: #d1ecf1;
    color: #0c5460;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rafp-status-requested {
    background: #e8daef;
    color: #6c3483;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================================================
   Tab Navigation
   ========================================================================== */

.rafp-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
}

.rafp-tab {
    padding: 10px 20px;
    text-decoration: none !important;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-align: center;
    flex: 1;
}

.rafp-tab:hover {
    color: #1d2327;
    background: #f5f5f5;
    text-decoration: none !important;
}

.rafp-tab-active {
    background: #2271b1 !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(34, 113, 177, 0.3);
}

.rafp-tab-active:hover {
    background: #185a9d !important;
    color: #fff !important;
}

.rafp-tab-content {
    min-height: 200px;
}

@media screen and (max-width: 600px) {
    .rafp-tabs {
        flex-direction: column;
        gap: 2px;
    }

    .rafp-tab {
        text-align: left;
        flex: none;
    }
}

/* ==========================================================================
   Earnings Chart
   ========================================================================== */

.rafp-earnings-chart-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.rafp-earnings-chart-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rafp-chart-empty {
    color: #666;
    font-style: italic;
}

.rafp-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rafp-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rafp-bar-label {
    flex: 0 0 70px;
    font-size: 13px;
    color: #50575e;
    text-align: right;
}

.rafp-bar-track {
    flex: 1;
    height: 24px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
}

.rafp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4f94d4);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.5s ease;
}

.rafp-bar-value {
    flex: 0 0 80px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}

/* ==========================================================================
   Filter Pills
   ========================================================================== */

.rafp-filter-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rafp-pill {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #50575e;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.rafp-pill:hover {
    border-color: #2271b1;
    color: #2271b1;
    text-decoration: none;
}

.rafp-pill-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.rafp-pill-active:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.rafp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rafp-page-link {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2271b1;
    font-size: 13px;
    transition: all 0.2s;
}

.rafp-page-link:hover {
    background: #f0f0f1;
    border-color: #c3c4c7;
    text-decoration: none;
}

.rafp-page-info {
    font-size: 13px;
    color: #50575e;
}

/* ==========================================================================
   Table Responsive
   ========================================================================== */

.rafp-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rafp-empty-message {
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* ==========================================================================
   Request Payout
   ========================================================================== */

.rafp-request-payout-section {
    margin: 30px 0;
    text-align: center;
}

.rafp-btn-action {
    display: inline-block;
    padding: 12px 28px;
    background: #2271b1;
    border: 1px solid #135e96;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rafp-btn-action:hover {
    background: #135e96;
    border-color: #0a4b78;
    color: #fff;
}

.rafp-btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rafp-payout-requested-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
}

.rafp-payout-requested-badge .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.rafp-payout-minimum-notice {
    color: #856404;
    font-size: 14px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 12px 24px;
    display: inline-block;
}

/* ==========================================================================
   Copy Field
   ========================================================================== */

.rafp-copy-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rafp-copy-field .rafp-referral-link-input {
    flex: 1;
    margin: 0;
}

.rafp-copy-btn {
    white-space: nowrap;
}

/* ==========================================================================
   Method Badge (small, for payouts tab)
   ========================================================================== */

.rafp-method-badge-sm {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.rafp-method-badge-sm.rafp-method-paypal {
    background: #ffc439;
    color: #003087;
}

.rafp-method-badge-sm.rafp-method-bank_transfer {
    background: #e9ecef;
    color: #495057;
}

.rafp-method-badge-sm.rafp-method-stripe {
    background: #e8e0f5;
    color: #6772e5;
}

.rafp-method-badge-sm.rafp-method-manual {
    background: #f0f0f1;
    color: #50575e;
}

/* ==========================================================================
   Link Generator
   ========================================================================== */

.rafp-link-generator {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.rafp-link-generator h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rafp-link-generator .description {
    margin: 0 0 15px 0;
}

.rafp-link-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.rafp-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rafp-link-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

#rafp-generated-link-output {
    margin-top: 15px;
}

#rafp-generated-link-output label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #1d2327;
}

.rafp-recent-links {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
}

.rafp-recent-links h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rafp-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rafp-link-list li {
    margin-bottom: 10px;
}

.rafp-link-list li:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 600px) {
    .rafp-link-form {
        flex-direction: column;
    }

    .rafp-link-input {
        width: 100%;
    }

    .rafp-copy-field {
        flex-direction: column;
    }

    .rafp-bar-label {
        flex: 0 0 50px;
        font-size: 11px;
    }

    .rafp-bar-value {
        flex: 0 0 60px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Settings Tab Sections
   ========================================================================== */

.rafp-settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.rafp-settings-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rafp-form-row input[type="text"],
.rafp-form-row input[type="url"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.rafp-form-row input[type="text"]:focus,
.rafp-form-row input[type="url"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rafp-form-row select {
    max-width: 400px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.rafp-form-row select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rafp-form-row input[type="tel"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s;
}

.rafp-form-row input[type="tel"]:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.rafp-form-row-inline {
    display: flex;
    gap: 16px;
}

.rafp-form-row-inline .rafp-form-col {
    flex: 1;
}

.rafp-form-row-inline .rafp-form-col input[type="text"] {
    max-width: 100%;
}

@media (max-width: 480px) {
    .rafp-form-row-inline {
        flex-direction: column;
        gap: 0;
    }
}

/* ==========================================================================
   Creatives Gallery
   ========================================================================== */

.rafp-creatives-gallery {
    max-width: 900px;
}

.rafp-creatives-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rafp-filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
}

.rafp-filter-btn:hover {
    border-color: #999;
}

.rafp-filter-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.rafp-filter-btn span {
    opacity: 0.7;
    font-size: 13px;
}

.rafp-creatives-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 20px;
}

.rafp-creative-card.rafp-hidden {
    display: none !important;
}

.rafp-email-swipe-preview {
    position: relative;
}

.rafp-email-swipe-code {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.rafp-copy-email-swipe {
    font-family: inherit;
}

.rafp-creatives-intro {
    color: #666;
    margin-bottom: 24px;
    font-size: 14px;
}

/* Creative Card */
.rafp-creative-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

/* Card Header */
.rafp-creative-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.rafp-creative-card-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.rafp-creative-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rafp-creative-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.rafp-creative-type-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.rafp-creative-type-banner {
    background: #e8f0fe;
    color: #1a56db;
}

.rafp-creative-type-text {
    background: #e8f5e9;
    color: #2e7d32;
}

.rafp-creative-size {
    display: inline-block;
    background: #f0f0f1;
    color: #50575e;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Preview */
.rafp-creative-preview {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
}

.rafp-creative-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.rafp-text-creative {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.rafp-text-creative .dashicons {
    color: #2271b1;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rafp-text-creative-content {
    font-size: 15px;
    color: #1d2327;
    line-height: 1.5;
    font-weight: 500;
}

/* Embed Section */
.rafp-creative-embed {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.rafp-embed-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rafp-embed-toolbar label {
    font-size: 13px;
    font-weight: 600;
    color: #50575e;
    white-space: nowrap;
}

.rafp-embed-toolbar select.rafp-embed-format {
    display: inline-block !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    padding: 5px 10px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    font-size: 13px;
    background: #fff !important;
    min-width: 140px;
    height: auto;
    cursor: pointer;
}

.rafp-embed-toolbar .rafp-copy-code {
    display: inline-block !important;
    padding: 5px 14px;
    border: 1px solid #c9a227;
    border-radius: 4px;
    background: #c9a227;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.rafp-embed-toolbar .rafp-copy-code:hover {
    background: #a88620;
    border-color: #a88620;
}

.rafp-embed-code {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    resize: vertical;
}

.rafp-embed-code:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

@media (max-width: 600px) {
    .rafp-creative-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .rafp-embed-toolbar {
        flex-wrap: wrap;
    }

    .rafp-embed-format {
        min-width: 0;
        flex: 1;
    }
}

/* ==========================================================================
   TEAM TAB (Multi-Tier)
   ========================================================================== */

.rafp-team-earnings {
    margin-bottom: 30px;
}

.rafp-team-earnings h3,
.rafp-team-recruits h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.rafp-team-recruits {
    margin-top: 30px;
}

/* Affiliate tag badges on dashboard */
.rafp-affiliate-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.rafp-tag-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* Dashboard active challenges */
.rafp-dashboard-challenges {
    margin-bottom: 25px;
}

.rafp-dashboard-challenges h3 {
    margin: 0 0 12px 0;
}

.rafp-challenge-card {
    background: #f9f6eb;
    border: 1px solid #e8dfc0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.rafp-challenge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.rafp-challenge-reward {
    font-size: 12px;
    color: #806515;
    background: #f0e6c0;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.rafp-challenge-progress-bar {
    background: #e0dac8;
    border-radius: 4px;
    overflow: hidden;
    height: 22px;
    position: relative;
}

.rafp-challenge-progress-fill {
    background: #c9a227;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rafp-challenge-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 22px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
}

.rafp-challenge-deadline {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

/* ==========================================================================
   QR Code Section
   ========================================================================== */

.rafp-qr-code-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.rafp-qr-code-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.rafp-qr-code-wrapper {
    display: inline-block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    line-height: 0;
}

.rafp-qr-code-wrapper svg {
    display: block;
    max-width: 100%;
}

.rafp-qr-hint {
    margin: 10px 0;
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   Cloaked Links Table
   ========================================================================== */

.rafp-cloaked-links {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
}

.rafp-cloaked-links h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.rafp-cloaked-links .description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 13px;
}
