/* ================================================
   Referral Program — Frontend Styles
   ================================================ */

.rp-dashboard {
    max-width: 860px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rp-dashboard h2 {
    font-size: 1.6em;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.rp-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.rp-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.1em;
    color: #111;
}

/* Referral link */
.rp-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.rp-link-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9em;
    background: #f9fafb;
    color: #374151;
}

.rp-copy-btn {
    white-space: nowrap;
    padding: 10px 18px !important;
    font-size: 0.9em !important;
    border-radius: 6px !important;
    cursor: pointer;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
}

.rp-copy-btn:hover {
    background: #1d4ed8 !important;
}

.rp-rates-info {
    font-size: 0.85em;
    color: #6b7280;
    margin: 0;
}

/* Balance grid */
.rp-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.rp-balance-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rp-balance-amount {
    font-size: 1.5em;
    font-weight: 700;
    color: #111827;
}

.rp-balance-label {
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.rp-pending  .rp-balance-amount { color: #d97706; }
.rp-approved .rp-balance-amount { color: #059669; }
.rp-paid     .rp-balance-amount { color: #2563eb; }

/* Table */
.rp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.rp-table th,
.rp-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.rp-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rp-table tr:last-child td { border-bottom: none; }

/* Badges */
.rp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rp-badge-pending   { background: #fef3c7; color: #92400e; }
.rp-badge-approved  { background: #d1fae5; color: #065f46; }
.rp-badge-paid      { background: #dbeafe; color: #1e40af; }
.rp-badge-cancelled { background: #fee2e2; color: #991b1b; }

.rp-empty {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.rp-notice {
    padding: 12px 16px;
    background: #fef9c3;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
}

/* Stats widget ([referral_stats]) */
.rp-stats-widget {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rp-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-stat-label { font-size: 0.8em; color: #6b7280; }
.rp-stat-value { font-size: 1.2em; font-weight: 700; color: #111; }
