.referral-form-wrapper {
    max-width: 95%;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.12);
    border-radius: 28px;
    padding: 36px;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
}

.referral-form-top {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 36px;
}

.referral-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 97, 0.12);
    color: #C9A961;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 18px;
}

.referral-form-top h1 {
    margin: 0 0 14px;
    font-size: 2.4rem;
    line-height: 1.1;
}

.referral-form-top p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.referral-progress-shell {
    position: relative;
}

.referral-progress-line {
    position: absolute;
    top: 26px;
    left: 28px;
    right: 28px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
}

.referral-progress-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    position: relative;
}

.referral-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    z-index: 1;
    color: #94a3b8;
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.referral-progress-step.active,
.referral-progress-step.completed {
    color: #0f172a;
    opacity: 1;
}

.referral-progress-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    font-weight: 700;
    color: #64748b;
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.referral-progress-step.active .referral-progress-number,
.referral-progress-step.completed .referral-progress-number {
    border-color: #C9A961;
    background: #F9F4ED;
    color: #C9A961;
}

.referral-progress-step strong {
    font-size: 0.92rem;
    line-height: 1.25;
    max-width: 120px;
}

.referral-step {
    display: none;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.referral-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.referral-step h2 {
    margin-bottom: 26px;
    font-size: 1.95rem;
    line-height: 1.12;
}

.referral-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.referral-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding: 26px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 168px;
    align-items: center;
}

.referral-card:hover {
    transform: translateY(-2px);
    border-color: #C9A961;
}

.referral-card input {
    display: none;
}

.referral-card strong {
    font-size: 1.05rem;
    color: #0f172a;
}

.referral-card span {
    display: block;
    color: #475569;
    line-height: 1.7;
}

.referral-card::after {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    justify-self: center;
    align-self: center;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.referral-card.selected {
    border-color: #C9A961;
    background: #F9F4ED;
}

.referral-card.selected strong,
.referral-card.selected span {
    color: #C9A961;
}

.referral-card.selected::after {
    border-color: #C9A961;
    background: #F9F4ED;
}

.referral-input-group {
    display: block;
    margin-bottom: 24px;
}

.referral-input-group span {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #0f172a;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #C9A961;
    box-shadow: 0 0 0 5px rgba(201, 169, 97, 0.12);
}

textarea {
    min-height: 180px;
    resize: vertical;
}

.referral-field-error {
    min-height: 20px;
    margin-top: 10px;
    color: #dc2626;
    font-size: 0.95rem;
}

.referral-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

.referral-button {
    min-width: 150px;
    border: none;
    border-radius: 999px;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}

.referral-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.referral-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.referral-button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #C9A961 0%, #B39236 100%);
}

.referral-button-secondary {
    color: #334155;
    background: #e2e8f0;
}

.review-summary {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 22px;
    padding: 26px;
    color: #0f172a;
    display: grid;
    gap: 16px;
}

.review-summary p {
    margin: 0;
    line-height: 1.8;
}

.referral-note {
    margin-top: 22px;
    color: #475569;
}

.referral-form-message {
    margin-top: 24px;
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 900px) {
    .referral-form-top {
        grid-template-columns: 1fr;
    }

    .referral-progress-step strong {
        max-width: unset;
    }
}

@media (max-width: 720px) {
    .referral-form-wrapper {
        padding: 24px;
    }

    .referral-card-grid {
        grid-template-columns: 1fr;
    }

    .referral-nav-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .referral-button {
        width: 100%;
    }
}
