﻿
form.submitting {
    pointer-events: none;
    opacity: .8;
}

/* ===== page background ===== */
.loan-hero {
    min-height: 100%;
    padding: 36px 0;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(237,50,55,.18), transparent 60%), radial-gradient(900px 500px at 85% 30%, rgba(248,159,64,.14), transparent 55%), linear-gradient(180deg, #ffffff 0%, #ffffff 60%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

    .loan-hero:before {
        content: "";
        position: absolute;
        inset: -180px -220px auto auto;
        width: 520px;
        height: 520px;
        background: radial-gradient(circle at 30% 30%, rgba(13,110,253,0.25), transparent 60%);
        filter: blur(2px);
        border-radius: 50%;
        transform: rotate(18deg);
        pointer-events: none;
    }

    .loan-hero:after {
        content: "";
        position: absolute;
        inset: auto auto -200px -260px;
        width: 560px;
        height: 560px;
        background: radial-gradient(circle at 40% 40%, rgba(16,185,129,0.20), transparent 60%);
        border-radius: 50%;
        pointer-events: none;
    }

/* ===== container ===== */
.loan-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 14px;
    position: relative;
    z-index: 2;
}

/* ===== shell card ===== */
.loan-shell {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(229,231,235,0.9);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(2,6,23,0.08);
    overflow: hidden;
}

.loan-header {
    padding: 22px 22px 14px 22px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient( 90deg, rgba(237,50,55,.06), rgba(248,159,64,.06) );
}

.loan-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

.loan-sub {
    margin: 6px 0 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* ===== stepper ===== */
.stepper {
    display: flex;
    gap: 10px;
    padding: 14px 22px 18px 22px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    align-items: center;
}

.step-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    background: #fff;
    white-space: nowrap;
    user-select: none;
}

    .step-chip .num {
        width: 20px;
        height: 20px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(237,50,55,.08);
        color: var(--brand);
        font-weight: 700;
        font-size: 12px;
    }

    .step-chip.active {
        border-color: rgba(13,110,253,0.35);
        background: rgba(13,110,253,0.06);
        color: var(--ink);
    }

        .step-chip.active .num {
            background: var(--brand);
            color: #fff;
        }

    .step-chip.done {
        border-color: rgba(16,185,129,0.35);
        background: rgba(16,185,129,0.06);
        color: var(--ink);
    }

        .step-chip.done .num {
            background: #10b981;
            color: #fff;
        }

.stepbar {
    margin-left: auto;
    width: 220px;
    height: 8px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--line);
}

    .stepbar > div {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, var(--brand), var(--brand2));
        transition: width .25s ease;
    }

/* ===== body ===== */
.loan-body {
    padding: 18px 22px 10px 22px;
    background: #fff;
}

/* ===== form grid ===== */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea {
    min-height: 92px;
    resize: vertical;
}

    .field input:focus, .field select:focus, .field textarea:focus {
        border-color: var(--brand2);
        box-shadow: 0 0 0 4px rgba(13,110,253,0.10);
    }

.hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.val {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: block;
}

/* ===== required asterisk (auto) =====
               Works by reading HTML5 "required" on inputs/select/textarea.
               This is generated automatically by MVC for [Required] fields.
            */
.field label:has(+ input[required])::after,
.field label:has(+ select[required])::after,
.field label:has(+ textarea[required])::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
}

/* ===== wizard panels ===== */
.step-panel {
    display: none;
}

    .step-panel.active {
        display: block;
    }


@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 6px 0 14px;
}

/* ===== terms box ===== */
.scroll-box {
    max-height: 220px;
    overflow: auto;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
}

/* ===== footer nav ===== */
.loan-footer {
    padding: 14px 22px 18px 22px;
    border-top: 1px solid var(--line);
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
}

.btnx {
    border: 1px solid var(--line);
    background: var(--brand);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease;
}

    .btnx:hover {
        border-color: rgba(13,110,253,0.35);
        box-shadow: 0 10px 18px rgba(2,6,23,0.06);
    }

    .btnx:active {
        transform: translateY(1px);
    }

.btn-primaryx {
    background: linear-gradient(90deg, var(--brand), var(--brand2));
    border: none;
    color: #fff;
    box-shadow: 0 6px 18px rgba(237,50,55,.25);
}

    .btn-primaryx:hover {
        filter: brightness(.95);
    }

.btn-ghostx {
    background: #f8fafc;
}

.footer-left {
    display: flex;
    gap: 10px;
}

.footer-right {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.tiny {
    font-size: 12px;
    color: var(--muted);
}

/* ===== responsive ===== */
@@media (max-width: 980px) {
    .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    .stepbar {
        width: 120px;
    }
}

#signaturePad {
    cursor: url('/img/pen-cursor.png') 0 16, crosshair;
}
