/**
 * Referral Program - Styles
 *
 * @package TUH_Account
 * @since 4.0.0
 */

/* Container */
.tuh-referral {
    max-width: 900px;
    margin: 0 auto;
}

/* Light mode hardening for dark-first palettes (e.g. Purple Night). */
.tuh-async-dashboard[data-theme="light"] .tuh-referral,
.tuh-wc-content[data-theme="light"] .tuh-referral,
body[data-theme="light"] .tuh-spa-wrapper .tuh-referral {
    --tuh-card-bg: #ffffff;
    --tuh-bg-secondary: #f8fafc;
    --tuh-card-border: #e5e7eb;
    --tuh-text-primary: #111827;
    --tuh-text-secondary: #4b5563;
    --tuh-text-muted: #6b7280;
}

/* Header */
.tuh-referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: var(--tuh-radius, 16px);
    color: var(--tuh-text-primary, #1a1a1a);
    background: linear-gradient(135deg, var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12)) 0%, var(--tuh-card-bg, #ffffff) 65%);
    border: 1px solid var(--tuh-card-border, #e5e7eb);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-referral-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tuh-referral-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--tuh-text-secondary, #6b7280);
}

.tuh-referral-code-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tuh-code-label {
    font-size: 0.85rem;
    color: var(--tuh-text-secondary, #6b7280);
}

.tuh-code-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tuh-code {
    padding: 10px 16px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    letter-spacing: 2px;
    background: var(--tuh-bg-secondary, #f3f4f6);
    border-radius: 8px;
    border: 1px dashed var(--tuh-card-border, #e5e7eb);
    color: var(--tuh-text-primary, #1a1a1a);
}

.tuh-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--tuh-bg-secondary, #f3f4f6);
    border: 1px solid var(--tuh-card-border, #e5e7eb);
    border-radius: 8px;
    color: var(--tuh-text-muted, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tuh-copy-btn:hover {
    background: var(--tuh-primary, #7c3aed);
    border-color: var(--tuh-primary, #7c3aed);
    color: var(--tuh-text-on-primary, #fff);
}

.tuh-copy-btn.copied {
    background: var(--tuh-success, #10b981);
}

/* Referral Link Section */
.tuh-referral-link-section {
    padding: 20px;
    margin-bottom: 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: 12px;
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-referral-link-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
}

.tuh-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tuh-link-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.9rem;
    background: var(--tuh-bg-secondary, var(--bg-subtle, #f3f4f6));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: 8px;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-link-box .tuh-copy-btn {
    background: var(--tuh-primary, #7c3aed);
    color: #fff;
}

.tuh-link-box .tuh-copy-btn:hover {
    background: var(--tuh-primary-hover, #6d28d9);
}

.tuh-share-buttons {
    display: flex;
    gap: 8px;
}

.tuh-referral .tuh-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--tuh-shadow-sm, none);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tuh-referral .tuh-share-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.tuh-referral .tuh-share-btn svg {
    fill: currentColor;
    stroke: currentColor;
}

.tuh-referral .tuh-share-whatsapp {
    background: #25d366;
}

.tuh-referral .tuh-share-telegram {
    background: #0088cc;
}

.tuh-referral .tuh-share-twitter {
    background: var(--tuh-bg-secondary, #f3f4f6);
    color: var(--tuh-text-primary, #111827);
    border-color: var(--tuh-card-border, #d1d5db);
}

.tuh-referral .tuh-share-twitter:hover {
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.1));
    color: var(--tuh-primary, #7c3aed);
    border-color: var(--tuh-primary-alpha-20, rgba(124, 58, 237, 0.2));
    opacity: 1;
}

.tuh-referral .tuh-share-twitter svg {
    fill: currentColor;
    stroke: none;
}

/* Stats */
.tuh-referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tuh-referral .tuh-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 12px);
    box-shadow: var(--tuh-shadow-sm, none);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tuh-referral .tuh-stat-card:hover {
    border-color: var(--tuh-primary, #7c3aed);
    box-shadow: var(--tuh-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
}

.tuh-referral .tuh-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 10px;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral .tuh-stat-icon.tuh-stat-credits {
    background: rgba(245, 158, 11, 0.15);
    color: var(--tuh-warning, #f59e0b);
}

.tuh-referral .tuh-stat-icon.tuh-stat-referred {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tuh-referral .tuh-stat-icon.tuh-stat-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--tuh-success, #10b981);
}

.tuh-referral .tuh-stat-icon.tuh-stat-lifetime {
    background: rgba(147, 51, 234, 0.15);
    color: #a855f7;
}

.tuh-referral .tuh-stat-content {
    display: flex;
    flex-direction: column;
}

.tuh-referral .tuh-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-referral .tuh-stat-label {
    font-size: 0.75rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

/* Progress Section */
.tuh-referral-progress {
    padding: 24px;
    margin-bottom: 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 16px);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-referral .tuh-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tuh-referral .tuh-progress-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-referral .tuh-progress-header h3 svg {
    color: var(--tuh-warning, #f59e0b);
}

.tuh-referral .tuh-progress-numbers {
    font-size: 1rem;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
}

.tuh-referral .tuh-progress-numbers strong {
    font-size: 1.25rem;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral .tuh-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tuh-referral .tuh-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--tuh-card-border, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

.tuh-referral .tuh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tuh-primary, #7c3aed) 0%, var(--tuh-primary-hover, #6d28d9) 100%);
    border-radius: inherit;
    transition: width 0.5s ease;
}

.tuh-referral .tuh-progress-fill.complete {
    background: linear-gradient(90deg, var(--tuh-success, #10b981) 0%, #34d399 100%);
}

.tuh-referral .tuh-progress-percent {
    min-width: 45px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tuh-text-secondary, var(--text-secondary, #888));
}

.tuh-referral .tuh-progress-hint {
    margin: 12px 0 0;
    font-size: 0.875rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral .tuh-progress-complete {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tuh-success, #10b981);
    background: var(--tuh-success-alpha-10, rgba(16, 185, 129, 0.1));
    border: 1px solid var(--tuh-success-alpha-20, rgba(16, 185, 129, 0.2));
    border-radius: 10px;
}

/* Rewards Section */
.tuh-referral-rewards {
    margin-bottom: 24px;
}

.tuh-referral-rewards h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-rewards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tuh-reward-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 12px);
    box-shadow: var(--tuh-shadow-sm, none);
    transition: all 0.2s ease;
}

.tuh-reward-card.available {
    border-color: var(--tuh-primary, #7c3aed);
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.1));
}

.tuh-reward-card.locked {
    opacity: 0.6;
}

.tuh-reward-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12));
    border-radius: 50%;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-reward-card.available .tuh-reward-icon {
    background: var(--tuh-primary, #7c3aed);
    color: #fff;
}

.tuh-reward-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-reward-cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-reward-cost svg {
    color: var(--tuh-warning, #f59e0b);
}

.tuh-reward-card .tuh-btn {
    width: 100%;
}

/* Buttons — SPA selector (.tuh-section prefix) beats spa-classic reset:
   html body .tuh-spa-wrapper .tuh-async-dashboard button (0,2,3)
   .tuh-section .tuh-referral .tuh-btn → 0,3,0 */
.tuh-referral .tuh-btn,
.tuh-section .tuh-referral .tuh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tuh-referral .tuh-btn-primary,
.tuh-section .tuh-referral .tuh-btn-primary {
    background: var(--tuh-primary, #7c3aed);
    background-color: var(--tuh-primary, #7c3aed);
    color: #fff;
}

.tuh-referral .tuh-btn-primary:hover,
.tuh-section .tuh-referral .tuh-btn-primary:hover {
    background: var(--tuh-primary-hover, #6d28d9);
    background-color: var(--tuh-primary-hover, #6d28d9);
}

.tuh-referral .tuh-btn-secondary,
.tuh-section .tuh-referral .tuh-btn-secondary {
    background: var(--bg-subtle, #252525);
    background-color: var(--bg-subtle, #252525);
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
    border: 1px solid var(--border, #333);
}

.tuh-referral .tuh-btn-secondary:hover,
.tuh-section .tuh-referral .tuh-btn-secondary:hover {
    background: var(--tuh-card-border, var(--border, #444));
    background-color: var(--tuh-card-border, var(--border, #444));
}

.tuh-referral .tuh-btn-disabled,
.tuh-section .tuh-referral .tuh-btn-disabled {
    background: var(--bg-subtle, #252525);
    background-color: var(--bg-subtle, #252525);
    color: var(--tuh-text-muted, #666);
    cursor: not-allowed;
    opacity: 0.6;
}

.tuh-referral .tuh-btn-lg,
.tuh-section .tuh-referral .tuh-btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

.tuh-referral .tuh-btn-sm,
.tuh-section .tuh-referral .tuh-btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* How it Works */
.tuh-referral-howto {
    padding: 20px;
    margin-bottom: 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: 12px;
}

.tuh-referral-howto h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, #1a1a1a);
}

.tuh-referral-howto h3 svg {
    color: var(--tuh-primary, #7c3aed);
}

.tuh-howto-steps {
    display: flex;
    gap: 16px;
}

.tuh-howto-step {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.tuh-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--tuh-primary, #7c3aed);
    border-radius: 50%;
}

.tuh-howto-step p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tuh-text-secondary, #6b7280);
}

/* History */
.tuh-referral-history {
    padding: 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 16px);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-referral-history h3 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-referral .tuh-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tuh-referral .tuh-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--tuh-bg-secondary, var(--bg-subtle, #f9fafb));
    border: 1px solid var(--tuh-card-border, var(--border, #e5e7eb));
    border-radius: 10px;
}

.tuh-referral .tuh-history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.tuh-referral .tuh-history-item.earn .tuh-history-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--tuh-success, #10b981);
}

.tuh-referral .tuh-history-item.redeem .tuh-history-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--tuh-warning, #f59e0b);
}

.tuh-referral .tuh-history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tuh-referral .tuh-history-reason {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-referral .tuh-history-date {
    font-size: 0.75rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral .tuh-history-credits {
    font-size: 0.95rem;
    font-weight: 600;
}

.tuh-referral .tuh-history-credits.positive {
    color: var(--tuh-success, #10b981);
}

.tuh-referral .tuh-history-credits.negative {
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

/* Enrollment Page */
.tuh-referral-enroll-page {
    text-align: center;
}

.tuh-enroll-hero {
    padding: 48px 24px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12)) 0%, var(--tuh-card-bg, #ffffff) 65%);
    border-radius: 20px;
    border: 1px solid var(--tuh-card-border, #e5e7eb);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-enroll-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--tuh-primary, #7c3aed);
    border-radius: 50%;
    color: #fff;
}

.tuh-enroll-hero h2 {
    margin: 0 0 8px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tuh-text-primary, #1a1a1a);
}

.tuh-enroll-hero p {
    margin: 0;
    font-size: 1rem;
    color: var(--tuh-text-secondary, #6b7280);
}

/* Benefits */
.tuh-enroll-benefits {
    margin-bottom: 32px;
}

.tuh-enroll-benefits h3 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tuh-benefit-card {
    padding: 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 12px);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12));
    border-radius: 50%;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-benefit-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-benefit-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
}

/* Rewards Preview */
.tuh-enroll-rewards {
    margin-bottom: 32px;
}

.tuh-enroll-rewards h3 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-rewards-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tuh-reward-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 12px);
    box-shadow: var(--tuh-shadow-sm, none);
}

.tuh-reward-preview-badge {
    padding: 6px 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tuh-primary, #7c3aed);
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12));
    border: 1px solid var(--tuh-primary-alpha-20, rgba(124, 58, 237, 0.2));
    border-radius: 999px;
}

.tuh-reward-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tuh-reward-preview-credits {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-reward-preview-desc {
    font-size: 0.75rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-reward-arrow {
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

/* CTA */
.tuh-enroll-cta {
    padding: 32px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--tuh-primary, #7c3aed) 0%, var(--tuh-primary-hover, #6d28d9) 100%);
    border-radius: 16px;
    box-shadow: var(--tuh-shadow-md, 0 6px 20px rgba(0, 0, 0, 0.12));
}

/* Enroll button — needs .tuh-section prefix to beat spa-classic button reset */
.tuh-referral-enroll-page .tuh-enroll-btn,
.tuh-section .tuh-referral-enroll-page .tuh-enroll-btn {
    margin-bottom: 12px;
    background: #fff;
    background-color: #fff;
    color: var(--tuh-primary, #7c3aed);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tuh-referral-enroll-page .tuh-enroll-btn:hover,
.tuh-section .tuh-referral-enroll-page .tuh-enroll-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tuh-enroll-note {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.tuh-enroll-blocked {
    text-align: center;
}

.tuh-blocked-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
}

.tuh-blocked-message {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: #fff;
}

.tuh-enroll-cta .tuh-btn-secondary,
.tuh-section .tuh-enroll-cta .tuh-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tuh-enroll-cta .tuh-btn-secondary:hover,
.tuh-section .tuh-enroll-cta .tuh-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.3);
}

/* Timeline How-to */
.tuh-enroll-howto {
    text-align: left;
    margin-bottom: 24px;
}

.tuh-enroll-howto h3 {
    margin: 0 0 24px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
    text-align: center;
}

.tuh-howto-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 40px;
}

.tuh-howto-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: var(--tuh-card-border, var(--border, #333));
}

.tuh-timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    position: relative;
}

.tuh-timeline-number {
    position: absolute;
    left: -40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--tuh-primary, #7c3aed);
    border-radius: 50%;
    z-index: 1;
}

.tuh-timeline-content h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-timeline-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
}

/* Dashboard Widget - Segue tema do dashboard */
.tuh-referral-widget {
    padding: 18px 20px;
    margin-bottom: 20px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: var(--tuh-radius, 12px);
    box-shadow: var(--tuh-shadow-sm, var(--tuh-account-shadow, none));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tuh-referral-widget-incentive {
    border-left: 2px solid var(--tuh-warning, #f59e0b);
}

.tuh-referral-widget-claim {
    border-left: 2px solid var(--tuh-primary, #7c3aed);
}

.tuh-referral-widget .tuh-widget-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tuh-referral-widget .tuh-widget-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12));
    border-radius: 10px;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral-widget .tuh-icon-incentive {
    background: var(--tuh-warning-bg, rgba(245, 158, 11, 0.12));
    color: var(--tuh-warning, #f59e0b);
}

.tuh-referral-widget .tuh-icon-claim {
    background: var(--tuh-primary-alpha-10, rgba(124, 58, 237, 0.12));
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral-widget .tuh-widget-title {
    flex: 1;
}

.tuh-referral-widget .tuh-widget-title h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
}

.tuh-referral-widget .tuh-widget-subtitle {
    font-size: 0.72rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral-widget .tuh-widget-value {
    text-align: right;
}

.tuh-referral-widget .tuh-widget-value strong {
    font-size: 1.25rem;
    color: var(--tuh-primary, #7c3aed);
}

.tuh-referral-widget .tuh-widget-value span {
    display: block;
    font-size: 0.7rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral-widget .tuh-widget-progress {
    margin-bottom: 12px;
}

.tuh-referral-widget .tuh-widget-progress .tuh-progress-bar {
    height: 6px;
    background: var(--bg-subtle, #252525);
    border-radius: 3px;
    overflow: hidden;
}

.tuh-referral-widget .tuh-widget-progress .tuh-progress-fill {
    height: 100%;
    background: var(--tuh-primary, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tuh-referral-widget .tuh-widget-progress .tuh-progress-fill.complete {
    background: var(--tuh-success, #10b981);
}

.tuh-referral-widget .tuh-widget-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--tuh-card-border, var(--border, #333));
}

.tuh-referral-widget .tuh-widget-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.tuh-referral-widget .tuh-widget-status.complete {
    color: var(--tuh-success, #10b981);
}

.tuh-referral-widget .tuh-widget-status.pending {
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral-widget .tuh-widget-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--tuh-primary, #7c3aed);
    text-decoration: none;
}

.tuh-referral-widget .tuh-widget-link:hover {
    text-decoration: underline;
}

/* Claim Widget */
.tuh-widget-claim-content {
    display: grid;
    gap: 12px;
}

.tuh-referral-claim-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tuh-referral-claim-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--tuh-card-border, var(--border, #333));
    border-radius: 10px;
    background: var(--tuh-card-bg, var(--surface, #1e1e1e));
    color: var(--tuh-text-primary, var(--text, #e5e5e5));
    font-size: 0.85rem;
}

.tuh-referral-claim-input::placeholder {
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral-claim-note {
    font-size: 0.75rem;
    color: var(--tuh-text-muted, var(--text-secondary, #888));
}

.tuh-referral-widget-claim .tuh-widget-footer {
    justify-content: flex-end;
}

@media (max-width: 600px) {
    .tuh-referral-claim-form {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Incentive Widget Content */
.tuh-widget-incentive-content {
    margin-bottom: 6px;
    display: grid;
    gap: 8px;
}

.tuh-widget-incentive-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
    line-height: 1.4;
}

.tuh-incentive-highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--tuh-warning-bg, rgba(245, 158, 11, 0.12));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
}

.tuh-incentive-badge {
    padding: 0 2px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tuh-warning, #f59e0b);
    background: transparent;
    border-radius: 999px;
}

.tuh-incentive-text {
    font-size: 0.8rem;
    color: var(--tuh-text-secondary, var(--text-secondary, #aaa));
}

/* Toast */
.tuh-referral-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 150;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: #1f2937;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tuh-referral-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.tuh-referral-toast.success {
    background: var(--tuh-success, #10b981);
}

.tuh-referral-toast.error {
    background: var(--tuh-error, #ef4444);
}

@media (max-width: 900px) {
    .tuh-referral {
        max-width: 100%;
    }

    .tuh-referral-header {
        align-items: flex-start;
    }

    .tuh-referral-info,
    .tuh-referral-code-box {
        min-width: 0;
    }

    .tuh-code {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .tuh-link-box {
        flex-wrap: wrap;
    }

    .tuh-link-input {
        min-width: 0;
    }

    .tuh-share-buttons {
        flex-wrap: wrap;
    }

    .tuh-referral .tuh-history-item {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .tuh-referral .tuh-history-info {
        min-width: 0;
    }

    .tuh-referral .tuh-history-reason {
        overflow-wrap: anywhere;
    }

    .tuh-referral .tuh-history-credits {
        white-space: nowrap;
    }

    .tuh-referral-enroll-page .tuh-enroll-btn,
    .tuh-section .tuh-referral-enroll-page .tuh-enroll-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

/* Responsive - Tablet */
@media (max-width: 992px) {
    .tuh-referral-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .tuh-rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tuh-benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Large Mobile */
@media (max-width: 768px) {
    .tuh-referral-header {
        gap: 16px;
        padding: 16px;
    }

    .tuh-referral-link-section {
        padding: 16px;
    }

    .tuh-code {
        font-size: 1.1rem;
        padding: 8px 12px;
    }

    .tuh-referral .tuh-stat-icon {
        width: 40px;
        height: 40px;
    }

    .tuh-enroll-hero {
        padding: 32px 20px;
    }

    .tuh-enroll-hero h2 {
        font-size: 1.4rem;
    }

    .tuh-enroll-icon {
        width: 64px;
        height: 64px;
    }

    .tuh-benefit-card {
        padding: 16px;
    }

    .tuh-referral-progress {
        padding: 16px;
    }

    .tuh-referral-history {
        padding: 16px;
    }

    .tuh-referral-rewards h3 {
        font-size: 1rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .tuh-referral-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 14px;
    }

    .tuh-referral-code-box {
        align-items: center;
    }

    .tuh-referral-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .tuh-referral .tuh-stat-card {
        padding: 12px;
    }

    .tuh-referral .tuh-stat-value {
        font-size: 1.1rem;
    }

    .tuh-rewards-grid {
        grid-template-columns: 1fr;
    }

    .tuh-reward-card {
        padding: 16px;
    }

    .tuh-reward-icon {
        width: 48px;
        height: 48px;
    }

    .tuh-howto-steps {
        flex-direction: column;
    }

    .tuh-code {
        font-size: 1rem;
        padding: 8px 12px;
        letter-spacing: 1px;
    }

    .tuh-copy-btn,
    .tuh-share-btn {
        width: 44px;
        height: 44px;
    }

    .tuh-rewards-preview {
        flex-direction: column;
    }

    .tuh-reward-arrow {
        transform: rotate(90deg);
    }

    .tuh-enroll-hero {
        padding: 24px 16px;
    }

    .tuh-enroll-hero h2 {
        font-size: 1.25rem;
    }

    .tuh-enroll-icon {
        width: 56px;
        height: 56px;
    }

    .tuh-enroll-cta {
        padding: 20px 16px;
    }

    .tuh-benefit-icon {
        width: 44px;
        height: 44px;
    }

    .tuh-benefit-card h4 {
        font-size: 0.95rem;
    }

    .tuh-benefit-card p {
        font-size: 0.8rem;
    }

    .tuh-howto-timeline {
        padding-left: 28px;
    }

    .tuh-howto-timeline::before {
        left: 9px;
    }

    .tuh-timeline-number {
        left: -28px;
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .tuh-timeline-content h4 {
        font-size: 0.9rem;
    }

    .tuh-timeline-content p {
        font-size: 0.8rem;
    }

    .tuh-referral .tuh-btn,
    .tuh-section .tuh-referral .tuh-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .tuh-referral .tuh-btn-lg,
    .tuh-section .tuh-referral .tuh-btn-lg {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .tuh-referral-toast {
        bottom: 16px;
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
    }

    .tuh-referral-toast.show {
        transform: translateX(0) translateY(0);
    }

    .tuh-referral-widget {
        margin-bottom: 16px;
    }

    .tuh-widget-incentive-content p {
        font-size: 0.8rem;
    }

    .tuh-incentive-highlight {
        padding: 6px 8px;
    }

    .tuh-incentive-badge {
        font-size: 0.9rem;
        padding: 0 2px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .tuh-referral-header {
        padding: 12px;
    }

    .tuh-referral-link-section {
        padding: 12px;
    }

    .tuh-link-box {
        flex-direction: column;
        gap: 8px;
    }

    .tuh-link-input {
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
    }

    .tuh-link-box .tuh-copy-btn {
        width: 100%;
        justify-content: center;
    }

    .tuh-share-buttons {
        justify-content: center;
    }

    .tuh-code {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        word-break: break-all;
    }

    .tuh-referral .tuh-stat-icon {
        width: 36px;
        height: 36px;
    }

    .tuh-referral .tuh-stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .tuh-referral .tuh-stat-value {
        font-size: 1rem;
    }

    .tuh-referral .tuh-stat-label {
        font-size: 0.7rem;
    }

    .tuh-referral .tuh-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tuh-referral .tuh-progress-header h3 {
        font-size: 0.9rem;
    }

    .tuh-referral .tuh-progress-numbers {
        font-size: 0.9rem;
    }

    .tuh-referral .tuh-progress-numbers strong {
        font-size: 1rem;
    }

    .tuh-reward-preview {
        padding: 12px 16px;
    }

    .tuh-reward-preview-badge {
        font-size: 1rem;
        padding: 6px 10px;
    }

    .tuh-reward-preview-credits {
        font-size: 0.8rem;
    }

    .tuh-enroll-benefits h3,
    .tuh-enroll-rewards h3,
    .tuh-enroll-howto h3 {
        font-size: 1.1rem;
    }

    .tuh-referral .tuh-history-item {
        padding: 10px;
    }

    .tuh-referral .tuh-history-icon {
        width: 32px;
        height: 32px;
    }

    .tuh-referral .tuh-history-reason {
        font-size: 0.85rem;
    }

    .tuh-referral .tuh-history-date {
        font-size: 0.7rem;
    }

    .tuh-referral .tuh-history-credits {
        font-size: 0.85rem;
    }
}

/* Responsive - Extra Small */
@media (max-width: 360px) {
    .tuh-referral-header {
        padding: 10px;
    }

    .tuh-code {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .tuh-referral .tuh-stat-card {
        padding: 10px;
        gap: 8px;
    }

    .tuh-referral .tuh-stat-value {
        font-size: 0.95rem;
    }

    .tuh-enroll-hero h2 {
        font-size: 1.1rem;
    }

    .tuh-enroll-hero p {
        font-size: 0.85rem;
    }

    .tuh-howto-timeline {
        padding-left: 24px;
    }

    .tuh-timeline-number {
        left: -24px;
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .tuh-howto-timeline::before {
        left: 7px;
    }

    .tuh-reward-card {
        padding: 12px;
    }

    .tuh-reward-icon {
        width: 40px;
        height: 40px;
    }

    .tuh-reward-info h4 {
        font-size: 0.85rem;
    }

    .tuh-reward-cost {
        font-size: 0.75rem;
    }
}
