/* ===== REFERRAL DASHBOARD ===== */

.ref-body {
    background: #f8fffe;
}

/* Hero Section */
.ref-hero {
    min-height: 100vh;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.ref-bg-glow {
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(78, 196, 176, 0.12) 0%, rgba(78, 196, 176, 0.04) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ref-bg-glow-2 {
    position: absolute;
    bottom: -200px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(78, 196, 176, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

/* ===== LOOKUP SECTION ===== */
.ref-lookup {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.ref-lookup-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.06);
}

.ref-lookup-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--teal-50), var(--teal-100));
    border: 1px solid var(--teal-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-600);
    margin: 0 auto 20px;
}

.ref-lookup-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.ref-lookup-card > p {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 28px;
}

.ref-lookup-form {
    display: flex;
    gap: 10px;
}

.ref-lookup-form input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
    transition: all 0.2s ease;
}

.ref-lookup-form input:focus {
    border-color: var(--teal-400);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(78, 196, 176, 0.12);
}

.ref-lookup-form input::placeholder {
    color: var(--gray-400);
}

.ref-lookup-form button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 107, 95, 0.3);
    white-space: nowrap;
}

.ref-lookup-form button:hover {
    background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
    box-shadow: 0 6px 20px rgba(37, 107, 95, 0.4);
    transform: translateY(-1px);
}

.ref-lookup-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.ref-lookup-error {
    margin-top: 16px;
    font-size: 0.88rem;
    color: #e74c3c;
}

/* ===== DASHBOARD SECTION ===== */
.ref-header {
    text-align: center;
    margin-bottom: 48px;
}

.ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--teal-50), var(--teal-100));
    color: var(--teal-700);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    border: 1px solid var(--teal-200);
    margin-bottom: 20px;
}

.ref-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.ref-highlight {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ref-subtitle {
    font-size: 1.05rem;
    color: var(--gray-500);
    line-height: 1.7;
}

/* Grid Layout */
.ref-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    max-width: 980px;
    margin: 0 auto;
}

/* Cards */
.ref-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 16px rgba(0,0,0,0.04);
}

/* Stats Card */
.ref-stats-card {
    display: flex;
    flex-direction: column;
}

.ref-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.ref-big-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ref-card-sub {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: 28px;
}

/* Progress Bar */
.ref-progress-section {
    margin-bottom: 24px;
}

.ref-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.ref-progress-label span:last-child {
    font-weight: 600;
    color: var(--teal-700);
}

.ref-progress-bar {
    height: 10px;
    background: var(--gray-100);
    border-radius: 10px;
    overflow: hidden;
}

.ref-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-400), var(--teal-600));
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Milestones */
.ref-milestones {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ref-milestone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.ref-milestone strong {
    margin-left: auto;
    color: var(--gray-400);
    font-weight: 700;
}

.ref-milestone-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: var(--white);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ref-milestone.achieved {
    background: linear-gradient(135deg, #f0fdf9, #e6f7f3);
    border-color: var(--teal-200);
}

.ref-milestone.achieved .ref-milestone-dot {
    background: var(--teal-500);
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(78, 196, 176, 0.2);
}

.ref-milestone.achieved span {
    color: var(--gray-700);
}

.ref-milestone.achieved strong {
    color: var(--teal-700);
}

/* Right Column */
.ref-right-col {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Discount Card */
.ref-discount-card {
    position: relative;
    overflow: hidden;
}

.ref-discount-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-200);
    transition: background 0.3s ease;
}

.ref-discount-card.has-discount::before {
    background: linear-gradient(90deg, var(--teal-400), var(--teal-600));
}

.ref-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.has-discount .ref-discount-badge {
    background: linear-gradient(135deg, var(--teal-50), var(--teal-100));
    border-color: var(--teal-200);
    color: var(--teal-700);
}

.ref-discount-code {
    margin-bottom: 12px;
}

.ref-discount-code label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.ref-code-display {
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0fdf9, #e6f7f3);
    border: 2px dashed var(--teal-300);
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--teal-700);
    font-family: 'SF Mono', 'Fira Code', monospace;
    letter-spacing: 0.08em;
    text-align: center;
}

.ref-discount-note {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin-top: 10px;
    line-height: 1.4;
}

.ref-no-discount p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.ref-no-discount strong {
    color: var(--teal-700);
}

/* Share Card */
.ref-share-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.ref-copy-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ref-copy-row input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.82rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--gray-700);
    background: var(--gray-50);
    outline: none;
    min-width: 0;
}

.ref-copy-row input:focus {
    border-color: var(--teal-400);
    box-shadow: 0 0 0 3px rgba(78, 196, 176, 0.1);
}

.ref-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--teal-600);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ref-copy-btn:hover {
    background: var(--teal-700);
}

.ref-copy-btn.copied {
    background: var(--teal-800);
}

/* Social Share Buttons */
.ref-share-social {
    display: flex;
    gap: 10px;
}

.ref-social-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ref-social-btn:hover {
    background: var(--teal-50);
    border-color: var(--teal-200);
    color: var(--teal-700);
}

/* ===== FEEDBACK PROMPT CARD ===== */
.ref-feedback-card {
    text-align: center;
    background: linear-gradient(135deg, #f0fdf9, #e6f7f3);
    border-color: var(--teal-200);
}

.ref-feedback-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--teal-100), var(--teal-200));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-700);
    margin: 0 auto 14px;
}

.ref-feedback-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.ref-feedback-card p {
    font-size: 0.88rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 18px;
}

.ref-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
    color: white;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 107, 95, 0.3);
}

.ref-feedback-btn:hover {
    background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 107, 95, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .ref-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
    }
}

@media (max-width: 640px) {
    .ref-hero {
        padding: 110px 0 60px;
    }

    .ref-title {
        font-size: 2rem;
    }

    .ref-card {
        padding: 24px 20px;
    }

    .ref-big-number {
        font-size: 3rem;
    }

    .ref-lookup-card {
        padding: 32px 24px;
    }

    .ref-lookup-form {
        flex-direction: column;
    }

    .ref-copy-row {
        flex-direction: column;
    }

    .ref-share-social {
        flex-direction: column;
    }

    .ref-social-btn {
        justify-content: center;
    }
}
