/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e5ea;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
}
.header-inner {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

/* ── Main ── */
.main {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 48px;
    flex: 1;
}

/* ── Welcome ── */
.welcome { margin-bottom: 28px; }
.welcome h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.5px;
}
.welcome-sub {
    font-size: 15px;
    color: #86868b;
    margin-top: 4px;
}

/* ── Card ── */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── Section Header ── */
.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-header .section-title { margin-bottom: 0; }
.attendance-badge {
    font-size: 13px;
    font-weight: 600;
    color: #34c759;
    background: #e8f8ee;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ── Progress Bar (Desktop — Horizontal) ── */
.progress-container {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.progress-track {
    display: flex;
    min-width: 900px;
    position: relative;
}

/* Lines layer — absolute behind all dots */
.progress-lines {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    display: flex;
    z-index: 0;
    padding: 0 5%;
}
.progress-line-segment {
    flex: 1;
    height: 3px;
    background: #e5e5ea;
    transition: background 0.6s ease;
}
.progress-line-segment.completed {
    background: #34c759;
}
.progress-line-segment.current {
    background: linear-gradient(to right, #34c759, #007AFF);
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 18px;
    z-index: 1;
}

/* Dot */
.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e5ea;
    border: 3px solid #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    flex-shrink: 0;
}
.step-dot svg {
    width: 14px;
    height: 14px;
    display: block;
    flex-shrink: 0;
}
/* Legacy status-based states (kept so transitions don't flicker between
   server-side render and CSS load) — overridden by state-* variants below. */
.progress-step.completed .step-dot {
    background: #34c759;
    border-color: #34c759;
}
.progress-step.upcoming .step-dot {
    background: #fff;
    border-color: #d2d2d7;
}

/* visual_state-driven dot colors (authoritative). */
.progress-step.state-complete .step-dot {
    background: #34c759;
    border-color: #34c759;
}
.progress-step.state-booked .step-dot {
    background: #007AFF;
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}
.progress-step.state-ready .step-dot {
    background: #FFB800;
    border-color: #FFB800;
    box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.25);
    animation: pulse-amber 2s ease-in-out infinite;
}
.progress-step.state-upcoming .step-dot {
    background: #fff;
    border-color: #d2d2d7;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(0, 122, 255, 0.08); }
}
@keyframes pulse-amber {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.25); }
    50% { box-shadow: 0 0 0 8px rgba(255, 184, 0, 0.1); }
}

/* Labels */
.step-label {
    font-size: 11px;
    font-weight: 600;
    color: #86868b;
    text-align: center;
    margin-top: 10px;
    line-height: 1.3;
    max-width: 80px;
    transition: color 0.4s ease;
}
.progress-step.completed .step-label,
.progress-step.state-complete .step-label { color: #1d1d1f; }
.progress-step.current .step-label,
.progress-step.state-booked .step-label {
    color: #007AFF;
    font-weight: 700;
}
.progress-step.state-ready .step-label {
    color: #c46d00;
    font-weight: 700;
}

.step-date {
    font-size: 10px;
    color: #86868b;
    margin-top: 3px;
}

/* ── Universal Action Card ── */
.universal-action-card {
    border-left: 4px solid #007AFF;
}
.universal-action-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.universal-action-text h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 2px;
}
.universal-action-text p {
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
}
.universal-btn {
    width: 100%;
    margin-top: 0;
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 12px;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}
.universal-btn:hover {
    background: linear-gradient(135deg, #0063d1, #4a45c2);
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.4);
}

/* ── Action Cards Grid ── */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.action-grid .card {
    margin-bottom: 0;
}

/* ── Action Card ── */
.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
}
.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.action-icon svg {
    width: 24px;
    height: 24px;
}
.action-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
}
.action-card p {
    font-size: 13px;
    color: #86868b;
    line-height: 1.4;
}

/* Offer Letter Card — active state */
.offer-card .action-icon {
    background: #e8f0fe;
    color: #007AFF;
}
.offer-card.completed-state .action-icon {
    background: #e8f8ee;
    color: #34c759;
}

/* Action Button */
.action-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #007AFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}
.action-btn:hover {
    background: #0063d1;
}
.action-btn:active {
    transform: scale(0.97);
}
.action-btn:disabled {
    background: #a8c8f0;
    cursor: not-allowed;
    transform: none;
}

/* Placeholder Cards */
.placeholder-card {
    opacity: 0.6;
}
.placeholder-card .action-icon {
    background: #f2f2f7;
    color: #86868b;
}
.coming-soon {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #86868b;
    background: #f2f2f7;
    padding: 3px 10px;
    border-radius: 12px;
}

/* ── Appointment List ── */
.apt-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.apt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.apt-row:hover { background: #f9f9fb; }
.apt-row.canceled { opacity: 0.5; }
.apt-row.canceled .apt-name { text-decoration: line-through; }

.apt-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.apt-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}
.apt-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.apt-date {
    font-size: 12px;
    color: #86868b;
}
.apt-host {
    font-size: 12px;
    color: #86868b;
}
.apt-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.rate-btn {
    font-size: 12px;
    font-weight: 500;
    color: #007AFF;
    background: none;
    border: 1.5px solid #007AFF;
    padding: 5px 14px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.rate-btn:hover {
    background: #007AFF;
    color: #fff;
}
.rate-btn:active {
    transform: scale(0.95);
}

/* Status Badges */
.apt-status-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 16px;
    white-space: nowrap;
}
.apt-icon {
    width: 14px;
    height: 14px;
}
.apt-status-badge.attended {
    color: #15803d;
    background: #dcfce7;
}
.apt-status-badge.no_show {
    color: #991b1b;
    background: #fee2e2;
}
.apt-status-badge.upcoming {
    color: #1d4ed8;
    background: #dbeafe;
}
.apt-status-badge.canceled {
    color: #6b7280;
    background: #f3f4f6;
}

/* ── Referrals Section ── */
.referral-count-badge {
    font-size: 13px;
    font-weight: 600;
    color: #5856d6;
    background: #ededfc;
    padding: 4px 12px;
    border-radius: 20px;
}
.referral-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 400px;
    overflow-y: auto;
}
.referral-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 10px;
    transition: background 0.15s ease, opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(8px);
}
.referral-row.loaded {
    opacity: 1;
    transform: translateY(0);
}
.referral-row:hover { background: #f9f9fb; }
.referral-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.referral-name {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}
.referral-date {
    font-size: 12px;
    color: #86868b;
}
.referral-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.referral-stage-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}
.referral-stage-badge.in-pipeline {
    color: #1d4ed8;
    background: #dbeafe;
}
.referral-stage-badge.screening {
    color: #92400e;
    background: #fef3c7;
}
.referral-mini-progress {
    display: flex;
    gap: 3px;
    align-items: center;
}
.mini-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e5e5ea;
    transition: background 0.3s ease;
}
.mini-dot.completed {
    background: #34c759;
}
.mini-dot.current {
    background: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}
.referral-screening-steps {
    display: flex;
    gap: 4px;
}
.screening-step {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    color: #9ca3af;
    background: #f3f4f6;
}
.screening-step.done {
    color: #15803d;
    background: #dcfce7;
}

/* ── Chat Widget ── */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
}
.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0, 122, 255, 0.45); }
.chat-fab:active { transform: scale(0.95); }
.chat-fab svg { width: 26px; height: 26px; }
.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Chat Panel */
.chat-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 360px;
    height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.2s ease;
}
@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-header {
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}
.chat-header-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34c759;
}
.chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.chat-close:hover { color: #fff; }

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
}
.chat-empty {
    text-align: center;
    padding: 40px 20px;
    margin: auto 0;
}
.chat-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 6px;
}
.chat-empty-sub {
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
}

/* Chat bubbles */
.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.chat-msg.outbound {
    align-self: flex-end;
}
.chat-msg.inbound {
    align-self: flex-start;
}
.chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
}
.chat-msg.outbound .chat-bubble {
    background: #007AFF;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg.inbound .chat-bubble {
    background: #f0f0f5;
    color: #1d1d1f;
    border-bottom-left-radius: 4px;
}
.chat-time {
    font-size: 10px;
    color: #86868b;
    margin-top: 3px;
    padding: 0 4px;
}
.chat-msg.outbound .chat-time { text-align: right; }
.chat-sender {
    font-size: 11px;
    font-weight: 600;
    color: #86868b;
    margin-bottom: 2px;
    padding-left: 4px;
}
.chat-msg.pending .chat-bubble { opacity: 0.6; }

/* Input area */
.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #e5e5ea;
    flex-shrink: 0;
    background: #fff;
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1.5px solid #e5e5ea;
    border-radius: 20px;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
    -webkit-appearance: none;
}
.chat-input:focus { outline: none; border-color: #007AFF; background: #fff; }
.chat-input::placeholder { color: #86868b; }
.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #007AFF;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.chat-send:hover { background: #0063d1; }
.chat-send:active { transform: scale(0.92); }

/* ── Toast Notification ── */
.toast {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #34c759;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    padding: 14px 24px;
    z-index: 200;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
.toast.visible {
    transform: translateY(0);
}

/* ── Rating Modal ── */
.rating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.rating-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.25s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.rating-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #86868b;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
}
.rating-title {
    font-size: 20px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 2px;
}
.rating-subtitle {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 20px;
}
.rating-section {
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f2;
}
.rating-section:last-of-type {
    border-bottom: none;
    margin-bottom: 16px;
}
.rating-question {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 4px;
}
.rating-helper {
    font-size: 13px;
    color: #86868b;
    line-height: 1.4;
    margin-bottom: 12px;
}
.rating-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}

/* Star rating */
.star-rating {
    display: flex;
    gap: 6px;
}
.star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
}
.star:active {
    transform: scale(0.9);
}
.star svg {
    width: 36px;
    height: 36px;
    fill: #d2d2d7;
    stroke: none;
    transition: fill 0.15s ease;
}
/* Hover (pointer over a single star) — lighter gold preview */
.star-rating .star:hover svg {
    fill: #FFCA28;
}
/* JS-driven preview (mouseenter fills stars <= hovered with lighter gold) */
.star-rating .star.preview svg {
    fill: #FFCA28;
}
/* Active (selected) — solid gold. Defined last so it beats :hover specificity ties;
   extra selectors ensure an active star stays gold even when the cursor is on it. */
.star-rating .star.active svg,
.star-rating .star.active:hover svg,
.star-rating .star.active.preview svg {
    fill: #FFB800;
}

/* Comment textarea */
.rating-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #1d1d1f;
    background: #f5f5f7;
    border: 1.5px solid #e5e5ea;
    border-radius: 10px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
}
.rating-textarea:focus {
    outline: none;
    border-color: #007AFF;
    background: #fff;
}
.rating-textarea::placeholder {
    color: #86868b;
}

/* Submit button inside modal */
.rating-submit {
    margin-top: 4px;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}
.rating-submit:hover {
    background: linear-gradient(135deg, #0063d1, #4a45c2);
}
.rating-submit:disabled {
    background: #d2d2d7;
    box-shadow: none;
}

/* Contact Us card */
.contact-helper {
    font-size: 14px;
    color: #86868b;
    line-height: 1.4;
    margin-bottom: 18px;
}
.contact-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.contact-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    text-decoration: none;
    background: #f5f5f7;
    border: 1px solid transparent;
    color: #1d1d1f;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.contact-btn:hover {
    background: #fff;
    transform: translateY(-1px);
}
.contact-btn:active {
    transform: translateY(0) scale(0.98);
}
.contact-btn-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.contact-btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.contact-btn-label {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}
.contact-btn-detail {
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.contact-btn-chevron {
    flex-shrink: 0;
    color: #c7c7cc;
    transition: transform 0.15s ease, color 0.15s ease;
}
.contact-btn:hover .contact-btn-chevron {
    transform: translateX(2px);
}

/* Email variant */
.contact-btn-email .contact-btn-icon {
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}
.contact-btn-email:hover {
    border-color: #007AFF;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.15);
}
.contact-btn-email:hover .contact-btn-chevron {
    color: #007AFF;
}

/* SMS variant */
.contact-btn-sms .contact-btn-icon {
    background: linear-gradient(135deg, #34c759, #28a745);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.35);
}
.contact-btn-sms:hover {
    border-color: #34c759;
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.15);
}
.contact-btn-sms:hover .contact-btn-chevron {
    color: #34c759;
}

@media (max-width: 520px) {
    .contact-btn-row {
        grid-template-columns: 1fr;
    }
    .contact-btn-detail {
        font-size: 13px;
    }
}

/* Rated button state */
.rate-btn.rated {
    color: #34c759;
    border-color: #34c759;
}
.rate-btn.rated:hover {
    background: #34c759;
    color: #fff;
}

/* Yes/No pill toggle */
.yesno-row {
    display: flex;
    gap: 10px;
}
.yesno-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    background: #fff;
    border: 1.5px solid #d2d2d7;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.yesno-btn:hover {
    border-color: #007AFF;
}
.yesno-btn.active {
    background: #007AFF;
    border-color: #007AFF;
    color: #fff;
}

/* NPS 1-10 row */
.nps-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}
.nps-btn {
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    background: #fff;
    border: 1.5px solid #d2d2d7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.nps-btn:hover {
    border-color: #007AFF;
}
.nps-btn.active.nps-low {
    background: #ff3b30;
    border-color: #ff3b30;
    color: #fff;
}
.nps-btn.active.nps-mid {
    background: #ff9500;
    border-color: #ff9500;
    color: #fff;
}
.nps-btn.active.nps-high {
    background: #34c759;
    border-color: #34c759;
    color: #fff;
}

/* Per-axis comment toggle + box */
.comment-toggle {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 500;
    color: #007AFF;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.comment-toggle:hover {
    text-decoration: underline;
}
.rating-comment-box {
    display: none;
    margin-top: 6px;
}
.rating-comment-box.visible {
    display: block;
}

/* Mobile: wrap NPS row to 2 lines on narrow screens */
@media (max-width: 420px) {
    .nps-row {
        grid-template-columns: repeat(5, 1fr);
    }
    .star svg {
        width: 30px;
        height: 30px;
    }
}

/* ── Error Card ── */
.error-card {
    text-align: center;
    padding: 48px 24px;
    max-width: 480px;
    margin: 60px auto;
}
.error-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 16px;
}
.error-text {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
}

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 20px 24px 80px;
    font-size: 12px;
    color: #86868b;
}

/* ── Animation (loaded state) ── */
.progress-step { opacity: 0; transform: translateY(8px); }
.progress-step.loaded { opacity: 1; transform: translateY(0); transition: opacity 0.4s ease, transform 0.4s ease; }

/* ── Tooltip (desktop only) ── */
.step-tooltip {
    position: absolute;
    background: #1d1d1f;
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 100;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 200px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE — Vertical Progress Bar + Responsive Layout
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
    .main { padding: 20px 16px 40px; }
    .welcome h1 { font-size: 22px; }
    .card { padding: 18px 16px; border-radius: 12px; }

    /* Vertical progress bar */
    .progress-container {
        overflow-x: visible;
        padding-bottom: 0;
    }
    .progress-track {
        flex-direction: column;
        min-width: unset;
        gap: 0;
        padding-left: 0;
    }
    .progress-step {
        flex-direction: row;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
        gap: 14px;
        min-height: 52px;
    }
    .step-label {
        text-align: left;
        max-width: none;
        font-size: 13px;
        margin-top: 0;
    }
    .step-date {
        margin-top: 1px;
        font-size: 11px;
    }
    .step-text-group {
        display: flex;
        flex-direction: column;
    }

    /* Vertical connecting lines — centered on 28px dot */
    .progress-lines {
        flex-direction: column;
        position: absolute;
        left: 13px; /* (28px dot / 2) - (3px line / 2) = 12.5 ≈ 13 */
        top: 26px;
        bottom: 26px;
        width: 3px;
        height: auto;
        padding: 0;
        right: auto;
    }
    .progress-line-segment {
        flex: 1;
        width: 3px;
        height: auto;
    }

    /* Animation override for vertical */
    .progress-step { opacity: 0; transform: translateX(-8px); }
    .progress-step.loaded { opacity: 1; transform: translateX(0); }

    /* Action grid — single column on mobile */
    .action-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Universal action card on mobile */
    .universal-btn {
        padding: 16px 28px;
        font-size: 17px;
    }

    /* Section header stacks on mobile */
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Appointment tweaks */
    .apt-row { padding: 12px; }
    .apt-name { font-size: 13px; }

    /* Referral tweaks */
    .referral-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    .referral-progress {
        align-items: flex-start;
    }

    /* Chat panel — full width on mobile */
    .chat-panel {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        border-radius: 16px 16px 0 0;
    }
    .chat-widget { position: fixed; bottom: 16px; right: 16px; }

    /* Footer padding for FAB */
    .footer { padding-bottom: 100px; }
}

/* ============================================================ */
/* Referral Portal — entry button (main portal)                 */
/* ============================================================ */
.referral-portal-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: #1d1d1f;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.referral-portal-link:hover {
    transform: translateY(-1px);
    border-color: #007AFF;
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.15);
}
.referral-portal-link:active { transform: translateY(0) scale(0.99); }
.referral-portal-link-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}
.referral-portal-link-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.referral-portal-link-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.referral-portal-link-detail {
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
}
.referral-portal-link-chevron {
    flex-shrink: 0;
    color: #c7c7cc;
    transition: transform 0.15s ease, color 0.15s ease;
}
.referral-portal-link:hover .referral-portal-link-chevron {
    transform: translateX(2px);
    color: #007AFF;
}

/* ============================================================ */
/* Referral Portal — page                                        */
/* ============================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    padding: 6px 10px 6px 6px;
    font-size: 14px;
    font-weight: 500;
    color: #007AFF;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.back-link:hover { background: #e8f0fe; }

/* Helper (about stages & payments) */
.helper-card {
    padding: 0;
    overflow: hidden;
}
.helper-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    -webkit-tap-highlight-color: transparent;
}
.helper-toggle:hover { background: #fafafa; }
.helper-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.helper-toggle-left svg { color: #007AFF; }
.helper-chevron {
    color: #86868b;
    transition: transform 0.2s ease;
}
.helper-card.open .helper-chevron { transform: rotate(180deg); }
.helper-body {
    display: none;
    padding: 4px 24px 24px;
    border-top: 1px solid #f0f0f2;
}
.helper-card.open .helper-body { display: block; }
.helper-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 12px;
}
.helper-section-title:first-of-type { margin-top: 16px; }
.helper-text {
    font-size: 14px;
    color: #1d1d1f;
    line-height: 1.5;
}
.helper-stage-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.helper-stage-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.4;
}
.helper-stage-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #007AFF;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.helper-stage-list strong {
    display: inline-block;
    margin-right: 6px;
    color: #1d1d1f;
}
.helper-stage-desc {
    color: #86868b;
    font-style: italic;
}
.payment-pill-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.payment-pill-legend .legend-label {
    font-size: 13px;
    color: #86868b;
}

/* List section heading (Active / Completed) */
.list-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 8px 0 12px;
    padding: 0 4px;
}
.list-heading-title {
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.list-heading-count {
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    background: #e5e5ea;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Completed Project collapsible section */
.completed-card {
    margin-top: 20px;
    padding: 0;
    overflow: hidden;
}
.completed-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.completed-toggle:hover { background: #fafafa; }
.completed-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.completed-toggle-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e8f8ee;
    color: #1f9d4e;
    display: flex;
    align-items: center;
    justify-content: center;
}
.completed-toggle-label {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
}
.completed-toggle-count {
    font-size: 12px;
    font-weight: 600;
    color: #1f9d4e;
    background: #e8f8ee;
    padding: 2px 8px;
    border-radius: 10px;
}
.completed-card .helper-chevron {
    color: #86868b;
    transition: transform 0.2s ease;
}
.completed-card.open .helper-chevron { transform: rotate(180deg); }
.completed-body {
    display: none;
    padding: 4px 20px 20px;
    border-top: 1px solid #f0f0f2;
}
.completed-card.open .completed-body { display: block; }
.completed-body .referral-portal-list {
    margin-top: 14px;
}

/* Pre-onboarding 3-step progress bar (Application → Info Session → Offer Letter Sent) */
.rp-pre-progress {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 6px;
}
.rp-pre-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    width: 90px;
    position: relative;
}
.rp-pre-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rp-pre-step.state-done .rp-pre-dot {
    background: #34c759;
}
.rp-pre-step.state-current .rp-pre-dot {
    background: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}
.rp-pre-label {
    font-size: 11px;
    font-weight: 500;
    color: #86868b;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}
.rp-pre-step.state-done .rp-pre-label {
    color: #1f9d4e;
}
.rp-pre-step.state-current .rp-pre-label {
    color: #007AFF;
    font-weight: 600;
}
.rp-pre-connector {
    flex: 1;
    height: 3px;
    background: #e5e5ea;
    margin: 10px -8px 0;
    border-radius: 2px;
    min-width: 16px;
}
.rp-pre-connector.state-done { background: #34c759; }
@media (max-width: 420px) {
    .rp-pre-step { width: 72px; }
    .rp-pre-label { font-size: 10px; }
}

/* Referral card list */
.referral-portal-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.referral-portal-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #e5e5ea;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.referral-portal-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.referral-portal-card.status-waiting_on_client { border-left-color: #ff9500; }
.referral-portal-card.status-disqualified { border-left-color: #ff3b30; opacity: 0.7; }
.referral-portal-card.status-opted_out { border-left-color: #86868b; opacity: 0.75; }
.referral-portal-card.status-completed { border-left-color: #34c759; }
.referral-portal-card.status-on_track { border-left-color: #007AFF; }

.rp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.rp-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--v-brand-grad, linear-gradient(135deg, #4f46e5, #7c3aed));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.rp-header-text {
    flex: 1;
    min-width: 0;
}
.rp-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}
.rp-meta {
    margin-top: 2px;
    font-size: 12px;
    color: #86868b;
}
.rp-dot-sep {
    margin: 0 6px;
    opacity: 0.5;
}

/* Status pill */
.rp-status-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}
.rp-status-pill.status-waiting_on_client {
    background: #fff4e5;
    color: #c46d00;
}
.rp-status-pill.status-on_track {
    background: #e8f0fe;
    color: #007AFF;
}
.rp-status-pill.status-completed {
    background: #e8f8ee;
    color: #1f9d4e;
}
.rp-status-pill.status-disqualified {
    background: #ffe8e6;
    color: #d12b20;
}
.rp-status-pill.status-opted_out {
    background: #f0f0f2;
    color: #6e6e73;
}

/* Stage block */
.rp-stage-block { margin-bottom: 16px; }
.rp-stage-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.rp-stage-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}
.rp-stage-count {
    font-size: 12px;
    color: #86868b;
    white-space: nowrap;
}
.rp-progress {
    display: flex;
    gap: 4px;
    align-items: center;
}
.rp-progress-dot {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e5ea;
    transition: background 0.15s ease;
}
.rp-progress-dot.completed { background: #34c759; }
.rp-progress-dot.current {
    background: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}
/* Yellow (ready to book/act) when the referral is blocked on the client. */
.referral-portal-card.status-waiting_on_client .rp-progress-dot.current {
    background: #FFB800;
    box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.25);
}

/* Next action callout */
.rp-next-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff9ed;
    border: 1px solid #ffe4b3;
    border-radius: 10px;
    margin-bottom: 14px;
}
.rp-next-action-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ff9500;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rp-next-action-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.rp-next-action-label {
    font-size: 11px;
    font-weight: 600;
    color: #c46d00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rp-next-action-value {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

/* Payment pills */
.rp-payment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.payment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    background: #f0f0f2;
    color: #86868b;
}
.payment-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c7c7cc;
}
/* Pending — default grey (explicit so it beats cascade). */
.payment-pill.pending {
    background: #f0f0f2;
    color: #86868b;
}
.payment-pill.pending .payment-pill-dot { background: #c7c7cc; }

/* Triggered — amber; the money is owed but not yet sent. */
.payment-pill.triggered {
    background: #fff4e5;
    color: #c46d00;
}
.payment-pill.triggered .payment-pill-dot { background: #FFB800; }

/* Paid — green; money went out. */
.payment-pill.paid {
    background: #e8f8ee;
    color: #1f9d4e;
}
.payment-pill.paid .payment-pill-dot { background: #34c759; }

/* Void — muted with strikethrough so it reads as cancelled. */
.payment-pill.void {
    background: #f0f0f2;
    color: #a1a1a6;
    text-decoration: line-through;
}
.payment-pill.void .payment-pill-dot { background: #d2d2d7; }

/* ============================================================ */
/* Your payments card (main portal — milestone payouts)          */
/* ============================================================ */
.your-payments-sub {
    margin: -6px 0 14px;
    font-size: 13px;
    color: #86868b;
}
.your-payments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.your-payment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    gap: 12px;
}
.your-payment-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}
.your-payment-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
}
.your-payment-amount {
    font-size: 15px;
    font-weight: 700;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}
.your-payment-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.your-payment-status {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.your-payment-status.status-pending {
    background: #f0f0f2;
    color: #86868b;
}
.your-payment-status.status-triggered {
    background: #fff4e5;
    color: #c46d00;
}
.your-payment-status.status-paid {
    background: #e8f8ee;
    color: #1f9d4e;
}
.your-payment-date {
    font-size: 12px;
    color: #86868b;
}
.payment-pill-note {
    font-size: 11px;
    color: #86868b;
    font-style: italic;
}

/* Empty state */
.empty-referrals {
    text-align: center;
    padding: 48px 24px;
}
.empty-referrals h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 8px;
}
.empty-referrals p {
    font-size: 14px;
    color: #86868b;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Mobile tweaks for the referral page */
@media (max-width: 520px) {
    .rp-card-header { flex-wrap: wrap; }
    .rp-status-pill {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
    .sort-bar { flex-wrap: wrap; }
    .ref-count { margin-left: 0; width: 100%; }
}

/* ============================================================ */
/* Contact strip (top of main portal)                           */
/* ============================================================ */
.contact-strip {
    display: flex;
    gap: 12px;
    margin: 0 0 20px;
    flex-wrap: wrap;
}
.contact-strip-item {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}
.contact-strip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #007AFF;
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.contact-strip-btn:hover {
    background: #e8f0fe;
    border-color: #cfe0fb;
}
.contact-strip-detail {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    text-align: center;
    word-break: break-word;
}

/* ============================================================ */
/* Sort control (referral portal)                               */
/* ============================================================ */
.list-heading-sort {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sort-label {
    font-size: 11px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sort-select {
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%2386868b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='1 1 5 5 9 1'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 26px;
}
.sort-select:focus {
    outline: none;
    border-color: #007AFF;
}

/* ============================================================ */
/* Status banner (referral card — primary state cue)            */
/* ============================================================ */
.rp-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}
.rp-banner-icon { flex-shrink: 0; }
.rp-banner-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.rp-banner-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}
.rp-banner-action {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.rp-status-banner.status-waiting_on_client {
    background: #fff4e5;
    border-color: #ffe0b3;
    color: #c46d00;
}
.rp-status-banner.status-on_track {
    background: #e8f8ee;
    border-color: #c2e9cf;
    color: #1f9d4e;
}
.rp-status-banner.status-completed {
    background: #e8f8ee;
    border-color: #c2e9cf;
    color: #1f9d4e;
}
.rp-status-banner.status-disqualified {
    background: #ffe8e6;
    border-color: #ffc9c3;
    color: #d12b20;
}
.rp-status-banner.status-opted_out {
    background: #f0f0f2;
    border-color: #d9d9de;
    color: #6e6e73;
}

/* Muted fallback stage label when a pre-pipeline ref has a raw portal label */
.rp-stage-label-muted {
    color: #86868b;
    font-weight: 500;
}

/* Extra breathing room between the 3-phase header and the 10-dot detail row */
.rp-pre-progress + .rp-stage-row { margin-top: 16px; }
.rp-pre-progress + .rp-progress { margin-top: 16px; }

/* ============================================================ */
/* Back-link loading state (spinner swap during portal reload)  */
/* ============================================================ */
.back-link-arrow,
.back-link-spinner,
.back-link-text,
.back-link-loading-text {
    display: inline-flex;
    align-items: center;
}
.back-link-spinner,
.back-link-loading-text { display: none; }
.back-link.loading .back-link-arrow,
.back-link.loading .back-link-text { display: none; }
.back-link.loading .back-link-spinner,
.back-link.loading .back-link-loading-text { display: inline-flex; }
.back-link.loading .back-link-spinner {
    animation: back-link-spin 0.8s linear infinite;
}
.back-link.loading { pointer-events: none; opacity: 0.75; }
@keyframes back-link-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================ */
/* FAQ section (bottom of main portal)                          */
/* ============================================================ */
.faq-card {
    margin-top: 16px;
}
.faq-list {
    display: flex;
    flex-direction: column;
}
.faq-item {
    border-bottom: 1px solid #e5e5ea;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-question {
    cursor: pointer;
    padding: 16px 32px 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    list-style: none;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 400;
    color: #86868b;
    line-height: 1;
}
.faq-item[open] > .faq-question::after {
    content: "\2212";
}
.faq-question:hover {
    color: #007AFF;
}
.faq-answer {
    padding: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.55;
    color: #424245;
}
.faq-answer p {
    margin: 0 0 10px 0;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}
.faq-bullets {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.faq-bullets li {
    margin-bottom: 6px;
}
.faq-bullets li:last-child {
    margin-bottom: 0;
}
.faq-reminder {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f5f5f7;
    border-left: 3px solid #007AFF;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
}

/* ============================================================ */
/* Your Information card (editable payment info)                 */
/* ============================================================ */
.your-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.your-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    gap: 12px;
}
.your-info-label {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    flex-shrink: 0;
}
.your-info-value {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.your-info-display {
    font-size: 14px;
    color: #1d1d1f;
    word-break: break-word;
}
.your-info-display.muted {
    color: #a1a1a6;
    font-style: italic;
}
.your-info-edit {
    background: none;
    border: none;
    color: #007AFF;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    padding: 2px 4px;
}
.your-info-edit:hover { text-decoration: underline; }
.your-info-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.your-info-input {
    padding: 7px 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 14px;
    color: #1d1d1f;
    background: #fff;
    min-width: 140px;
}
.your-info-save,
.your-info-cancel {
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 7px 12px;
}
.your-info-save {
    background: #007AFF;
    color: #fff;
}
.your-info-save:hover { background: #0066d6; }
.your-info-save:disabled { opacity: 0.6; cursor: default; }
.your-info-cancel {
    background: #f0f0f2;
    color: #1d1d1f;
}
.your-info-cancel:hover { background: #e5e5ea; }

/* One-time announcement popup body (reuses .rating-overlay / .rating-modal) */
.announcement-body {
    font-size: 14px;
    line-height: 1.55;
    color: #3a3a3c;
    margin: 8px 0 20px;
}
