.loan-wrapper {
    --loan-accent-light: #32ace2;
    --loan-accent-dark: #0e2355;
    max-width: 760px;
    margin: 30px auto;
    padding: 26px;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--loan-accent-light) 0 39%, #eef0f5 39% 100%);
    font-family: "Manrope", "Segoe UI", sans-serif;
}

#loanEligibilityForm {
    background: #f7f8fc;
    border-radius: 24px;
    padding: 34px 40px 30px;
    box-shadow: 0 18px 45px rgba(18, 22, 56, 0.16);
    position: relative;
    overflow: hidden;
}

.loan-header {
    text-align: center;
    margin-bottom: 28px;
}

.loan-header h2 {
    margin: 0;
    color: var(--loan-accent-dark);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.2px;
}

.loan-stepper {
    margin-bottom: 30px;
}

.loan-progress-track {
    width: 100%;
    height: 7px;
    background: #e7ebf4;
    border-radius: 999px;
    overflow: hidden;
}

.loan-progress-line {
    width: 0;
    height: 100%;
    background: var(--loan-accent-dark);
    transition: width 0.35s ease;
    border-radius: inherit;
}

.loan-stepper-items {
    margin-top: -20px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.loan-stepper-item {
    text-align: center;
}

.loan-stepper-dot {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e3e8f2;
    color: #8f9cbc;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.loan-stepper-item.active .loan-stepper-dot {
    background: var(--loan-accent-light);
    color: #fff;
    box-shadow: 0 8px 16px rgba(50, 172, 226, 0.32);
}

.loan-stepper-item.completed .loan-stepper-dot {
    background: #1bb980;
    color: #fff;
}

.loan-step {
    display: none;
}

.loan-step.active {
    display: block;
}

.loan-step-title {
    margin: 0 0 14px;
    color: var(--loan-accent-dark);
    font-size: 21px;
}

.loan-step-options {
    display: grid;
    gap: 12px;
}

.loan-option {
    display: block;
    cursor: pointer;
}

.loan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.loan-option span {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid #d9e0ec;
    color: #27304a;
    font-size: 16px;
    background: #f9fbff;
    transition: all 0.2s ease;
}

.loan-option span::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ced8e8;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.loan-option:hover span {
    border-color: var(--loan-accent-light);
    transform: translateX(4px);
}

.loan-option:hover span::before {
    border-color: var(--loan-accent-light);
}

.loan-option input:checked+span {
    border-color: var(--loan-accent-light);
    background: #eef8fd;
    color: var(--loan-accent-dark);
    box-shadow: 0 0 0 1px rgba(50, 172, 226, 0.16);
}

.loan-option input:checked+span::before {
    border-color: var(--loan-accent-light);
    box-shadow: inset 0 0 0 3px #fff;
    background: var(--loan-accent-light);
}

.loan-step-error {
    margin: 10px 4px 10px;
    min-height: 18px;
    font-size: 13px;
    color: #c62828;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.loan-step-error.is-visible {
    opacity: 1;
}

.loan-inline-fields {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    max-width: 630px;
    margin: 0 auto;
}

.loan-inline-fields span {
    color: var(--loan-accent-dark);
    font-size: 26px;
    font-weight: 700;
}

.loan-single-field {
    max-width: 630px;
    margin: 0 auto;
}

.loan-inline-fields input,
.loan-single-field input {
    min-height: 58px;
    width: 100%;
    border: 1px solid #d9e0ec;
    background: #f9fbff;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 16px;
    color: #27304a;
    transition: all 0.2s ease;
}

.loan-inline-fields input:hover,
.loan-single-field input:hover {
    border-color: var(--loan-accent-light) !important;
}

.loan-inline-fields input:focus,
.loan-single-field input:focus {
    border-color: var(--loan-accent-light);
    outline: none;
    box-shadow: 0 0 0 2px rgba(50, 172, 226, 0.18);
}

.loan-step-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.loan-score-input {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 0 18px !important;
    border-radius: 12px !important;
    border: 1px solid #d9e0ec !important;
    cursor: pointer;
}
.loan-score-input:hover{
    border-color: var(--loan-accent-light);
    transform: translateX(4px);
}

.loan-step-actions .loan-btn:only-child {
    grid-column: 2;
}

#loanEligibilityForm .loan-btn {
    min-height: 46px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
}

#loanEligibilityForm .loan-btn-secondary {
    background: #edf1f8;
    border-color: #d8deea;
    color: #30405f;
}

#loanEligibilityForm .loan-btn-primary {
    background: var(--loan-accent-dark);
    color: #fff;
    box-shadow: 0 10px 22px rgba(14, 35, 85, 0.28);
}

#loanEligibilityForm .loan-btn:disabled {
    background: #e4e8f1;
    border-color: #d8deea;
    color: #9aa6bd;
    box-shadow: none;
    cursor: not-allowed;
}

.loan-result {
    margin-top: 18px;
    color: var(--loan-accent-dark);
}

@media (max-width: 680px) {
    .loan-wrapper {
        padding: 16px;
        margin: 16px auto;
    }

    #loanEligibilityForm {
        padding: 24px 18px;
    }

    .loan-header h2 {
        font-size: 32px;
    }

    .loan-step-title {
        font-size: 18px;
    }

    .loan-option span {
        min-height: 52px;
        font-size: 14px;
    }

    .loan-inline-fields {
        grid-template-columns: 1fr;
    }

    .loan-inline-fields span {
        justify-self: center;
    }
}