:root {
    --brand: #e31f2b;
    --brand-dark: #b8131d;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --focus: rgba(227, 31, 43, .14);
    --success: #1f9d61;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #111827;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, rgba(9,14,25,.96), rgba(27,35,52,.86)), url("BC.jpg") center/cover no-repeat;
}

body::after {
    content: "";
    position: fixed;
    width: 520px;
    height: 520px;
    right: -180px;
    top: -200px;
    z-index: -1;
    border-radius: 50%;
    background: rgba(227,31,43,.18);
    filter: blur(10px);
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 22px;
}

.form-card {
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(0, 1.65fr);
    min-height: 690px;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.3);
}

.brand-panel {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #1b2230 url("BC.jpg") center/cover no-repeat;
}

.brand-panel__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,17,27,.52), rgba(12,17,27,.93)); }
.brand-panel__content { position: relative; z-index: 1; height: 100%; padding: 42px 38px; display: flex; flex-direction: column; }

.brand-logo { display: block; max-width: 100%; max-height: 52px; object-fit: contain; }
.brand-copy { margin: auto 0; }
.eyebrow { display: inline-block; margin-bottom: 14px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #ffd3d6; }
.eyebrow--dark { margin-bottom: 8px; color: var(--brand); }
.brand-copy h2 { max-width: 330px; margin: 0 0 16px; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; font-weight: 750; letter-spacing: -.035em; }
.brand-copy p { max-width: 340px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.65; }
.security-note { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.5; }
.security-dot { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: #55d996; box-shadow: 0 0 0 5px rgba(85,217,150,.12); }

.form-panel { padding: 44px 54px 36px; }
.form-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 32px; }
.form-header h1 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 36px); font-weight: 750; letter-spacing: -.035em; }
.form-header p { margin: 0; color: var(--muted); font-size: 14px; }
.step-counter { display: flex; align-items: baseline; gap: 4px; min-width: 66px; justify-content: center; padding: 9px 12px; border-radius: 14px; background: var(--surface-soft); color: #98a2b3; }
.step-counter strong { color: var(--brand); font-size: 19px; }
.step-counter span { font-size: 13px; font-weight: 700; }

.stepper { position: relative; margin-bottom: 38px; }
.stepper-track { position: absolute; top: 15px; left: 8%; right: 8%; height: 2px; background: var(--line); overflow: hidden; }
.stepper-progress { height: 100%; background: var(--brand); transition: width .35s ease; }
.stepper-items { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); }
.step-item { display: grid; justify-items: center; gap: 7px; color: #98a2b3; font-weight: 700; font-size: 12px; transition: color .25s ease; }
.step-item span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-size: 12px; transition: all .25s ease; }
.step-item.active, .step-item.completed { color: var(--ink); }
.step-item.active span, .step-item.completed span { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(227,31,43,.08); }

.form-step { animation: stepIn .28s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-heading { display: flex; gap: 13px; align-items: center; margin-bottom: 24px; }
.section-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: #fff1f2; color: var(--brand); font-weight: 800; font-size: 12px; }
.section-heading h3 { margin: 0 0 3px; font-size: 18px; font-weight: 750; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }

.form-label { margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 700; }
.form-label span { color: var(--brand); }
.form-control {
    min-height: 46px;
    border: 1px solid #d0d5dd;
    border-radius: 11px;
    padding: 10px 13px;
    color: var(--ink);
    background: #fff;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(16,24,40,.03);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea.form-control { min-height: 92px; resize: vertical; }
.form-control::placeholder { color: #a7afbd; }
.form-control:hover { border-color: #98a2b3; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); }
.form-control.is-invalid { border-color: #dc3545; background-image: none; box-shadow: 0 0 0 3px rgba(220,53,69,.08); }
.form-control:disabled { background: #f2f4f7; cursor: wait; }
.field-error { display: none; margin-top: 6px; color: #d92d20; font-size: 12px; }

.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; padding-top: 24px; border-top: 1px solid #eef0f3; }
.form-actions--end { justify-content: flex-end; }
.btn { min-height: 44px; border-radius: 11px; padding: 10px 17px; font-size: 14px; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: var(--brand); background: var(--brand); box-shadow: 0 8px 20px rgba(227,31,43,.18); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--brand-dark); background: var(--brand-dark); }
.btn-light { border: 1px solid var(--line); background: #fff; color: #475467; }
.btn-light:hover { border-color: #d0d5dd; background: #f9fafb; color: var(--ink); }
.btn-success { border-color: var(--success); background: var(--success); box-shadow: 0 8px 20px rgba(31,157,97,.18); }
.whatsapp-mark { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px; border-radius: 50%; background: rgba(255,255,255,.18); }

.custom-modal { border: 0; border-radius: 20px; box-shadow: 0 24px 70px rgba(16,24,40,.22); }
.custom-modal .modal-header { align-items: center; gap: 12px; padding: 24px 24px 10px; }
.custom-modal .modal-body { padding-left: 78px; color: var(--muted); }
.custom-modal .modal-footer { padding: 18px 24px 24px; }
.modal-alert-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #fff1f2; color: var(--brand); font-weight: 900; }
.modal-title { font-size: 18px; font-weight: 750; }

.system-version { padding: 16px 4px 0; text-align: center; color: rgba(255,255,255,.52); font-size: 11px; letter-spacing: .02em; }
.system-version span { padding: 0 5px; color: rgba(255,255,255,.28); }

@media (max-width: 900px) {
    .page-shell { width: min(760px, calc(100% - 24px)); padding-top: 20px; }
    .form-card { grid-template-columns: 1fr; }
    .brand-panel { min-height: 230px; }
    .brand-panel__content { padding: 28px 30px; }
    .brand-copy { margin: 30px 0 18px; }
    .brand-copy h2 { max-width: 520px; font-size: 30px; }
    .brand-copy p { max-width: 560px; }
    .security-note { display: none; }
}

@media (max-width: 576px) {
    .page-shell { width: 100%; padding: 0; }
    .form-card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .brand-panel { min-height: 168px; }
    .brand-panel__content { padding: 22px 20px; }
    .brand-logo-wrap { width: 96px; min-height: 56px; border-radius: 14px; }
    .brand-copy { margin: 18px 0 0; }
    .brand-copy .eyebrow, .brand-copy p { display: none; }
    .brand-copy h2 { margin: 0; max-width: 300px; font-size: 24px; }
    .form-panel { padding: 28px 20px 30px; }
    .form-header { margin-bottom: 26px; }
    .form-header h1 { font-size: 27px; }
    .form-header p { font-size: 13px; }
    .step-counter { min-width: 58px; padding: 8px 10px; }
    .stepper { margin-bottom: 30px; }
    .step-item small { font-size: 11px; }
    .form-actions { position: sticky; bottom: 0; z-index: 5; margin: 28px -20px -30px; padding: 16px 20px 18px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); box-shadow: 0 -10px 30px rgba(16,24,40,.05); }
    .form-actions .btn { flex: 1; }
    .system-version { display: none; }
}
