        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background: linear-gradient(135deg, #0b3a5c 0%, #1c648d 100%);
            min-height: 100vh;
            padding: 24px 16px;
        }

        .container {
            max-width: 860px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 14px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
            padding: 28px 36px 36px;
        }

        /* ---------- Cabecera ---------- */
        .header {
            display: flex;
            align-items: center;
            gap: 14px;
            border-bottom: 2px solid #e3ecf3;
            padding-bottom: 16px;
            margin-bottom: 20px;
        }
        .header img { max-height: 60px; width: auto; }
        .header-title h1 {
            font-size: 22px;
            font-weight: 600;
            color: #0b3a5c;
        }
        .header-title small {
            font-size: 13px;
            color: #5d7a92;
            display: block;
            margin-top: 2px;
        }

        /* ---------- Indicador de pasos ---------- */
        .stepper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin: 4px 0 22px;
        }
        .stepper .step {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 500;
            color: #9aafc0;
            padding: 8px 14px;
            border-radius: 30px;
            background: #f2f6fa;
            transition: all 0.2s;
        }
        .stepper .step.active {
            color: #ffffff;
            background: #1c648d;
        }
        .stepper .step.done { color: #1c648d; }
        .stepper .num {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #d6e3ee;
            color: #4a6a80;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
        }
        .stepper .step.active .num { background: #ffffff; color: #1c648d; }
        .stepper .step.done .num { background: #1c648d; color: #fff; }
        .stepper .line { flex: 1; max-width: 60px; height: 2px; background: #d6e3ee; }

        /* ---------- Pestañas de pasos ---------- */
        .step-panel { display: none; }
        .step-panel.active { display: block; animation: fadeIn 0.25s ease; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

        /* ---------- Títulos de sección ---------- */
        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: #0b3a5c;
            border-left: 4px solid #1c648d;
            padding-left: 10px;
            margin: 4px 0 16px;
        }
        .intro-note {
            font-size: 13px;
            color: #5d7a92;
            background: #f2f6fa;
            border-radius: 8px;
            padding: 10px 14px;
            margin-bottom: 18px;
            line-height: 1.5;
        }
        .warn-note {
            font-size: 13px;
            color: #8a6d1a;
            background: #fdf6e3;
            border: 1px solid #f0dfae;
            border-radius: 8px;
            padding: 10px 14px;
            margin-bottom: 18px;
            line-height: 1.5;
        }

        /* ---------- Rejilla de campos ---------- */
        .grid2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px 18px;
            margin-bottom: 6px;
        }
        .field label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: #2c4a61;
            margin-bottom: 5px;
        }
        .field .req { color: #c0392b; }
        .field input[type="text"],
        .field input[type="email"],
        .field input[type="number"],
        .field input[type="tel"],
        .field input[type="url"],
        .field input[type="file"],
        .field select,
        .field textarea {
            width: 100%;
            padding: 9px 12px;
            border: 1px solid #c9d7e3;
            border-radius: 7px;
            font-size: 14px;
            background: #fafcfe;
            color: #22384a;
            font-family: inherit;
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .field input:focus,
        .field select:focus,
        .field textarea:focus {
            border-color: #1c648d;
            box-shadow: 0 0 0 3px rgba(28, 100, 141, 0.12);
            outline: none;
            background: #ffffff;
        }
        .field input:disabled {
            background: #f0f3f6;
            color: #8d9aa5;
        }
        .field textarea { resize: vertical; min-height: 70px; }
        .field .hint { font-size: 12px; color: #7f96a8; margin-top: 4px; }
        .field .reniec-tag {
            display: inline-block;
            font-size: 11px;
            color: #1a7f4e;
            background: #e6f6ee;
            border-radius: 20px;
            padding: 2px 8px;
            margin-left: 6px;
            vertical-align: middle;
        }
        .btn-reniec {
            background: #1a7f4e;
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 6px 14px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 4px;
        }
        .btn-reniec:hover { background: #14653f; }
        .btn-reniec:disabled { background: #a9bbc8; cursor: not-allowed; }
        .reniec-status { font-size: 12px; margin-top: 4px; min-height: 14px; }
        .reniec-status.ok { color: #1a7f4e; }
        .reniec-status.err { color: #c0392b; }
        .reniec-status.loading { color: #1c648d; }

        /* Campos condicionales (jurídica / entidad pública) */
        .juridica-fields { display: none; }
        .juridica-fields.show { display: grid; animation: fadeIn 0.2s; }

        /* ---------- Checkboxes ---------- */
        .checkbox {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 14px;
            border: 1px solid #c9d7e3;
            border-radius: 8px;
            background: #fafcfe;
            margin-bottom: 10px;
            cursor: pointer;
            font-size: 13px;
            line-height: 1.5;
            color: #2c4a61;
        }
        .checkbox input[type="checkbox"] {
            width: 18px;
            height: 18px;
            margin-top: 1px;
            accent-color: #1c648d;
            flex-shrink: 0;
        }
        .checkbox.checked { border-color: #1c648d; background: #edf5fa; }

        /* ---------- Opciones tipo de persona ---------- */
        .persona-options {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .persona-option {
            flex: 1;
            min-width: 150px;
            padding: 12px;
            text-align: center;
            border: 1px solid #c9d7e3;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #2c4a61;
            background: #fafcfe;
            transition: all 0.15s;
        }
        .persona-option input { display: none; }
        .persona-option.selected {
            border-color: #1c648d;
            background: #edf5fa;
            color: #0b3a5c;
            box-shadow: inset 0 0 0 1px #1c648d;
        }

        /* ---------- Botones ---------- */
        .btn-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-top: 24px;
            flex-wrap: wrap;
        }
        .btn {
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 15px;
            font-weight: 500;
            padding: 11px 24px;
            transition: background 0.2s, transform 0.1s;
        }
        .btn:active { transform: scale(0.98); }
        .btn-prev { background: #e8eef4; color: #2c4a61; }
        .btn-prev:hover { background: #d6e3ee; }
        .btn-next, .btn-submit { background: #1c648d; color: #ffffff; }
        .btn-next:hover, .btn-submit:hover { background: #0b3a5c; }
        .btn-submit {
            background: linear-gradient(135deg, #1c648d, #0b3a5c);
            margin-left: auto;
        }
        .btn-next:disabled,
        .btn-submit:disabled {
            background: #a9bbc8;
            cursor: not-allowed;
        }

        /* ---------- Errores ---------- */
        .alert {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 18px;
            font-size: 14px;
            line-height: 1.5;
            border-left: 4px solid transparent;
        }
        .alert-error { background: #fdebea; border-left-color: #c0392b; color: #922b21; }
        .alert-success { background: #e7f7ee; border-left-color: #27ae60; color: #1e8449; }

        /* ---------- Confirmación ---------- */
        .confirm-box { text-align: center; padding: 30px 0 10px; }
        .confirm-box h1 { color: #0b3a5c; font-weight: 600; margin-bottom: 10px; }
        .confirm-box .id-doc {
            font-size: 30px;
            font-weight: 700;
            color: #0b3a5c;
            background: #edf5fa;
            padding: 10px 30px;
            border-radius: 40px;
            display: inline-block;
            margin: 14px 0 20px;
            border: 1px solid #c9d7e3;
        }
        .confirm-box .back-link {
            display: inline-block;
            margin-top: 14px;
            color: #1c648d;
            text-decoration: none;
            border-bottom: 1px dashed #6f93ad;
            padding-bottom: 2px;
        }
        .confirm-box .back-link:hover { border-bottom-color: #0b3a5c; }

        /* ---------- Responsive ---------- */
        @media (max-width: 640px) {
            .container { padding: 20px 18px; }
            .grid2 { grid-template-columns: 1fr; }
            .header { flex-direction: column; text-align: center; }
            .stepper { flex-direction: column; }
            .stepper .line { display: none; }
        }

/* ---------- V14 · Estado del correo de constancia ---------- */
.alert-warning { background: #fff7e6; border-left-color: #d68910; color: #7d5900; }
.mail-status { max-width: 720px; margin: 0 auto 18px; text-align: left; }

/* V16: campos recuperados de RENIEC/SUNAT quedan bloqueados visualmente. */
input.autofill-locked:disabled {
    background: #eef4f8;
    border-color: #b7c9d6;
    color: #365568;
    cursor: not-allowed;
    opacity: 1;
}
