:root {
    --bg: #eef3f7;
    --navy: #0d557b;
    --navy-dark: #103a57;
    --cyan: #16a8e0;
    --orange: #f7a11a;
    --border: #d8e2ea;
    --text: #214d6b;
    --muted: #86a2b6;
    --white: #fff;
    --soft: #f8fbfd;
    --warning: #fff5e6;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.topbar {
    background: var(--navy);
    color: #fff;
    border-bottom: 4px solid var(--orange);
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.topbar .left,
.topbar .right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.step-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.mini-link {
    color: #d8edf8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.logo-wrap {
    text-align: center;
    padding: 18px 0 8px;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--navy-dark);
}

.logo span {
    color: var(--orange)
}

.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 18px 34px;
}

.hero {
    text-align: center;
    margin: 10px 0 18px;
}

.eyebrow {
    color: #68a7c7;
    letter-spacing: .25em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero h1 {
    margin: 0 0 10px;
    color: var(--navy-dark);
    font-size: 44px;
    font-weight: 800;
    line-height: 1.08;
}

.hero p {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    margin: 26px 0 26px;
    flex-wrap: wrap;
}

.step-item {
    text-align: center;
    min-width: 110px;
    color: #a2b8c8;
    font-size: 12px;
    font-weight: 700;
}

.step-item .dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 800;
}

.step-item.active {
    color: var(--orange);
}

.step-item.active .dot {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.step-item.done {
    color: var(--navy-dark);
}

.step-item.done .dot {
    background: var(--navy-dark);
    border-color: var(--navy-dark);
    color: #fff;
}

.step-line {
    width: 70px;
    height: 2px;
    background: #cfdae3;
    margin-top: 14px;
}

.card-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
    overflow: hidden;
    margin-bottom: 22px;
}

.card-body {
    padding: 22px 24px 24px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 800;
    color: var(--navy-dark);
}

.section-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}

.section-sub {
    color: #93adbd;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 14px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 800;
    color: var(--navy-dark);
    text-transform: uppercase;
}

.field label .optional {
    color: #9bb0bf;
    text-transform: none;
    margin-left: 4px;
    font-weight: 700;
}

.control {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    color: #55778e;
    outline: none;
}

.control.area {
    min-height: 80px;
    height: auto;
    padding: 12px;
    resize: vertical;
}

.helper {
    margin-top: 5px;
    font-size: 11px;
    color: #f29b16;
    font-weight: 700;
}

.option-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.option-card {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 16px 14px;
    background: #fff;
    min-height: 88px;
    position: relative;
}

.option-card.active {
    border-color: var(--cyan);
    background: #f4fbfe;
}

.option-card .radio {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d6dee5;
    background: #fff;
}

.option-card.active .radio {
    border-color: var(--cyan);
    box-shadow: inset 0 0 0 4px #fff;
    background: var(--cyan);
}

.option-card strong {
    display: block;
    padding-left: 26px;
    color: var(--navy-dark);
    font-size: 14px;
    font-weight: 800;
}

.option-card small {
    display: block;
    padding-left: 26px;
    color: #98adbc;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.45;
}

.alert-soft {
    background: #eef8fc;
    border: 1px solid #bfe3f4;
    color: #61859c;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 8px;
}

.smartlocker-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    margin-top: 10px;
}

.smartlocker-head {
    background: #10a8e1;
    color: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eef3f6;
    font-size: 13px;
    color: #5d7e95;
    font-weight: 700;
}

.toggle-row:last-child {
    border-bottom: none
}

.switch {
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #dbe4ea;
    position: relative;
    flex: 0 0 auto;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.switch.on {
    background: var(--orange);
}

.switch.on::after {
    left: 25px;
}

.payment-card {
    background: var(--navy-dark);
    color: #fff;
    border-radius: 12px;
    padding: 18px;
    margin: 12px 0 14px;
    min-height: 88px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.payment-card .masked {
    font-size: 24px;
    letter-spacing: .25em;
    font-weight: 800;
}

.payment-card .meta {
    color: #b7dced;
    font-size: 12px;
    font-weight: 700;
}

.footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.footer-actions.right {
    justify-content: flex-end;
}

.btn-soft,
.btn-outline,
.btn-primary,
.btn-warning {
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.btn-soft {
    background: #eef3f7;
    color: #6d8ca0;
    border: 1px solid #dde7ee;
}

.btn-outline {
    background: #fff;
    color: var(--navy-dark);
    border: 1px solid #bcd0dd;
}

.btn-primary {
    background: var(--orange);
    color: #fff;
}

.btn-warning {
    background: #f1d097;
    color: #fff;
}

.welcome-box {
    text-align: center;
    padding: 18px 10px 8px;
}

.confetti {
    font-size: 44px;
    margin-bottom: 10px;
}

.welcome-box h2 {
    margin: 0 0 8px;
    color: var(--navy-dark);
    font-size: 34px;
    font-weight: 800;
}

.welcome-box p {
    color: #8da7b7;
    margin: 0 0 18px;
}

.client-code {
    max-width: 320px;
    margin: 0 auto 18px;
    border: 1px solid #b8dced;
    background: #f4fbfe;
    border-radius: 10px;
    padding: 14px 18px;
    color: #5f87a1;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.client-code strong {
    display: block;
    margin-top: 6px;
    color: var(--navy-dark);
    font-size: 28px;
    letter-spacing: .04em;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 620px;
    margin: 16px auto 10px;
}

.action-btn {
    border: none;
    border-radius: 10px;
    padding: 16px 18px;
    font-weight: 800;
    color: #fff;
    min-height: 74px;
    line-height: 1.35;
}

.action-btn.orange {
    background: var(--orange)
}

.action-btn.navy {
    background: var(--navy-dark)
}

.fineprint {
    margin-top: 14px;
    color: #8ca6b7;
    font-size: 12px;
}

.field label:has(+ input[required])::after,
.field label:has(+ select[required])::after {
    content: "*";
    color: #FF7A00;
    margin-left: 4px;
}

/* Ocultar borde rojo por defecto en inputs required */
input:required,
select:required {
    border-color: #ced4da;
}

/* Mostrar borde rojo SOLO cuando tiene clase is-invalid */
input.is-invalid:required,
select.is-invalid:required {
    border-color: #dc3545;
}

/* Ocultar mensajes de error por defecto */
.helper.error {
    display: none;
}

/* Mostrar mensajes de error solo cuando el campo relacionado tiene error */
input.is-invalid~.helper.error,
select.is-invalid~.helper.error {
    display: block;
}

@media (max-width: 900px) {

    .grid-2,
    .grid-3,
    .grid-4,
    .option-cards,
    .action-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        gap: 10px
    }

    .step-line {
        display: none
    }

    .hero h1 {
        font-size: 34px
    }
}