:root {
    --bg: #f6f9ff;
    --card: #ffffff;
    --text: #0b1b33;
    --muted: #5b6b82;
    --line: #e6edf7;

    --brand: #1b6dff;
    --brand2: #1fd1a7;
    --brand3: #0b2a5a;

    --brand-primary: var(--brand);
    --brand-secondary: var(--brand2);

    --shadow: 0 18px 40px rgba(11, 27, 51, .10);
    --shadow-soft: 0 12px 26px rgba(11, 27, 51, .06);
    --r: 16px;
    --r2: 22px;
    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 700px at 0% 0%, rgba(27,109,255,.25), transparent 60%),
        radial-gradient(1000px 600px at 100% 0%, rgba(31,209,167,.18), transparent 60%),
        linear-gradient(180deg, #eaf1ff 0%, #f4f8ff 35%, #ffffff 100%);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: .95fr 1.05fr;
}

.hero-panel {
    position: relative;
    padding: 42px;
    color: #fff;
    background:
        radial-gradient(700px 420px at 0% 0%, rgba(255,255,255,.20), transparent 62%),
        radial-gradient(520px 520px at 100% 100%, rgba(31,209,167,.20), transparent 55%),
        linear-gradient(145deg, var(--brand3), var(--brand), var(--brand2));
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(31,209,167,.14);
    left: -90px;
    top: -80px;
}

.hero-panel::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    right: -160px;
    bottom: -120px;
}

.brand-header,
.mobile-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: 0 12px 26px rgba(27,109,255,.18);
    color: #fff;
    font-weight: 900;
    letter-spacing: -.4px;
}

.brand-header strong,
.mobile-brand strong {
    font-weight: 900;
    letter-spacing: -.3px;
}

.brand-header span {
    display: block;
    opacity: .82;
    margin-top: 3px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin-top: 105px;
}

.hero-kicker,
.step-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-kicker {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
}

.hero-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand2);
    box-shadow: 0 0 0 6px rgba(31,209,167,.18);
}

.hero-content h1 {
    margin: 22px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -1.2px;
}

.hero-content p {
    font-size: 18px;
    line-height: 1.65;
    opacity: .90;
}

.hero-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 38px;
}

.hero-benefits div {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}

.hero-benefits strong,
.hero-benefits span {
    display: block;
}

.hero-benefits strong {
    font-size: 22px;
}

.hero-benefits span {
    margin-top: 8px;
    font-size: 13px;
    opacity: .86;
    font-weight: 800;
}

.hero-footer {
    position: absolute;
    left: 42px;
    bottom: 34px;
    opacity: .85;
    z-index: 2;
    font-weight: 800;
}

.form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.form-panel::before {
    content: "";
    position: fixed;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    right: 8%;
    top: 12%;
    background: rgba(27,109,255,.09);
    z-index: -1;
}

.mobile-brand {
    display: none;
}

.mobile-brand .brand-mark {
    background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.progress-box {
    position: fixed;
    top: 32px;
    right: 42px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.progress-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c8d3e5;
}

.progress-dot.active {
    background: var(--brand);
    box-shadow: 0 0 0 5px rgba(27,109,255,.12);
}

.form-card {
    width: min(100%, 620px);
    padding: 38px;
    border-radius: 30px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.step-label {
    color: var(--brand3);
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.step-label::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand2);
    box-shadow: 0 0 0 6px rgba(31,209,167,.18);
}

.form-card h2 {
    margin: 18px 0 8px;
    font-size: 34px;
    line-height: 1.12;
    color: var(--brand3);
    letter-spacing: -0.04em;
}

.form-subtitle,
.secure-note {
    color: var(--muted);
    line-height: 1.6;
    font-weight: 700;
}

.loan-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.loan-form.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.field,
.loan-form label {
    display: grid;
    gap: 8px;
}

.field.full,
.full {
    grid-column: 1 / -1;
}

label {
    font-size: 14px;
    font-weight: 900;
    color: var(--brand3);
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 15px 16px;
    font-size: 16px;
    color: var(--text);
    background: #fbfdff;
    outline: none;
    font-weight: 800;
    transition: .2s ease;
}

input:focus,
select:focus {
    border-color: rgba(27,109,255,.40);
    box-shadow: 0 0 0 4px rgba(27,109,255,.10);
    background: #fff;
}

.consent-check {
    display: flex !important;
    grid-template-columns: unset !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px !important;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    user-select: none;
}

.consent-check input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.btn-primary {
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 900;
    transition: .2s ease;
    text-decoration: none;
}

.primary-button,
.btn-primary {
    margin-top: 8px;
    padding: 17px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 18px 34px rgba(27,109,255,.22);
}

.primary-button:hover,
.secondary-button:hover,
.btn-primary:hover {
    transform: translateY(-1px);
}

.secondary-button {
    width: 100%;
    padding: 13px 16px;
    color: var(--brand3);
    background: #f4f8ff;
    border: 1px solid var(--line);
}

.secure-note {
    margin-top: 20px;
    font-size: 13px;
}

.fade-in {
    animation: fadeIn .35s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.analyzing-card {
    text-align: center;
}

.loader-ring {
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 7px solid #e8eef7;
    border-top-color: var(--brand);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.analysis-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    text-align: left;
}

.analysis-item {
    padding: 15px 16px;
    border-radius: 16px;
    background: #f5f8fc;
    color: var(--muted);
    font-weight: 900;
}

.analysis-item.active {
    color: var(--brand3);
    background: rgba(31,209,167,.12);
    border: 1px solid rgba(31,209,167,.28);
}

.approved-box {
    margin: 28px 0;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
}

.approved-box span,
.approved-box strong {
    display: block;
}

.approved-box strong {
    margin-top: 8px;
    font-size: 36px;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.offer-card {
    position: relative;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.offer-badge {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #0c6c57;
    background: rgba(31,209,167,.12);
    border: 1px solid rgba(31,209,167,.28);
    font-size: 11px;
    font-weight: 900;
}

.offer-card h3 {
    margin: 0 0 12px;
    font-size: 17px;
    color: var(--brand3);
}

.offer-card strong {
    display: block;
    font-size: 24px;
    color: var(--brand3);
}

.offer-card p {
    color: var(--muted);
    font-weight: 700;
}

.public-card {
    max-width: 980px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.public-form {
    margin-top: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.public-form label {
    display: block;
    font-weight: 900;
    margin-bottom: 6px;
}

.public-form input,
.public-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.upload-box {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    background: #f8fafc;
}

.required {
    color: #dc2626;
}

.text-center {
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--brand2);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    margin-bottom: 18px;
}

.proposal-summary {
    margin: 24px auto;
    padding: 18px;
    background: #f8fafc;
    border-radius: 14px;
    max-width: 420px;
}

.timeline {
    margin: 28px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
}

.timeline-item.done {
    border-color: rgba(31,209,167,.45);
    background: rgba(31,209,167,.08);
}

.timeline-item.current {
    border-color: rgba(27,109,255,.45);
    background: #eff6ff;
}

.timeline-dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #d1d5db;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.timeline-item.done .timeline-dot {
    background: var(--brand2);
    color: #fff;
}

.timeline-item.current .timeline-dot {
    background: var(--brand);
    color: #fff;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-content span {
    color: #64748b;
    font-size: 14px;
}

.badge-error {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 900;
    margin-bottom: 16px;
}

.badge-warning {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 900;
    font-size: 13px;
}

.form-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-weight: 800;
}

.form-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.info-box {
    margin: 22px 0;
    padding: 18px;
    border-radius: 14px;
    text-align: left;
}

.info-box p {
    margin: 8px 0 0;
    color: #475569;
}

.info-box.success {
    background: rgba(31,209,167,.08);
    border: 1px solid rgba(31,209,167,.45);
}

.info-box.error {
    background: #fef2f2;
    border: 1px solid #dc2626;
}

.info-box.warning {
    background: #fffbeb;
    border: 1px solid #f59e0b;
}

@media (max-width: 940px) {
    .app-shell {
        display: block;
    }

    .hero-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        display: block;
        padding: 22px;
    }

    .mobile-brand {
        display: flex;
        margin-bottom: 24px;
    }

    .progress-box {
        position: static;
        margin-bottom: 18px;
    }

    .form-card,
    .public-card {
        padding: 26px;
        border-radius: 24px;
    }

    .loan-form.two-columns,
    .offers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .form-panel {
        padding: 18px;
    }

    .form-card,
    .public-card {
        padding: 22px;
    }

    .form-card h2 {
        font-size: 28px;
    }

    .consent-check {
        align-items: flex-start;
    }
}
