:root {
    --application-max: 1120px;
    --application-soft-blue: var(--brand-light-blue-bg);
    --application-line: var(--border-input);
    --application-shadow: 0 18px 55px rgba(1, 54, 92, 0.12);
}

.application-page {
    background: linear-gradient(180deg, #f7fbfd 0%, #eef5f9 100%);
}

.application-page.session-modal-open,
.application-page.preview-modal-open,
.application-page.legal-modal-open,
.application-page.phone-confirmation-modal-open {
    overflow: hidden;
}

.application-page.formal-otp-disabled-mode #application-phone-modal {
    display: none !important;
}

.application-page.cedula-suspension-modal-open {
    overflow: hidden;
}

.application-main {
    width: 100%;
    max-width: var(--application-max);
    margin: 0 auto;
    padding: 42px 24px 64px;
    flex: 1;
}

.application-shell {
    background: var(--bg-card);
    border: 1px solid rgba(1, 54, 92, 0.08);
    border-radius: 24px;
    box-shadow: var(--application-shadow);
    overflow: visible;
}

.application-intro {
    padding: 42px 48px 30px;
    text-align: center;
}

.application-intro h1,
.access-card h1,
.success-card h1 {
    color: var(--brand-navy);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: 12px;
}

.application-intro > p:last-child,
.access-card p,
.success-card > p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.eyebrow {
    color: var(--brand-light-blue) !important;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.application-progress {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0 48px 32px;
    background: var(--bg-card);
}

.recovery-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: center;
    margin: 0 48px 30px;
    padding: 18px 20px;
    border: 1px solid #f0d98d;
    border-radius: 13px;
    background: #fff8df;
    color: var(--brand-navy);
}

.recovery-panel span {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.recovery-panel strong {
    padding: 8px 13px;
    border-radius: 8px;
    background: white;
    color: var(--brand-navy);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.recovery-code-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.recovery-code-actions strong {
    -webkit-user-select: text;
    user-select: text;
}

.form-duration-note {
    margin: 8px 0 0;
    color: var(--brand-navy);
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.btn-copy-recovery {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--brand-navy);
    border-radius: 8px;
    background: var(--brand-navy);
    color: white;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-copy-recovery:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-copy-recovery:focus-visible {
    outline: 3px solid rgba(0, 123, 255, 0.25);
    outline-offset: 2px;
}

.btn-copy-recovery:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.recovery-panel p {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}

.session-modal {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(1, 35, 59, 0.7);
    backdrop-filter: blur(5px);
}

.session-modal.hidden {
    display: none;
}

.session-modal-card {
    width: min(100%, 520px);
    max-height: calc(100vh - 44px);
    overflow-y: auto;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    background: white;
    box-shadow: 0 24px 70px rgba(1, 35, 59, 0.3);
    text-align: center;
}

.session-modal-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff3c4;
    font-size: 1.65rem;
}

.session-modal-card h2 {
    margin-bottom: 10px;
    color: var(--brand-navy);
    font-size: clamp(1.55rem, 4vw, 2rem);
}

#session-modal-message {
    color: var(--text-secondary);
    line-height: 1.6;
}

.session-extension-status {
    margin-top: 10px;
    color: var(--brand-navy);
    font-size: 0.85rem;
    font-weight: 700;
}

.expired-recovery-block {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #f0d98d;
    border-radius: 13px;
    background: #fff8df;
}

.expired-recovery-block > span {
    display: block;
    color: var(--brand-navy);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.expired-recovery-block strong {
    display: inline-block;
    margin: 8px 0;
    padding: 8px 14px;
    border-radius: 8px;
    background: white;
    color: var(--brand-navy);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.recovery-code-actions-modal {
    justify-content: center;
}

.expired-recovery-block p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.session-modal-error {
    margin-top: 14px;
    color: var(--error-color);
    font-size: 0.83rem;
    font-weight: 700;
}

.session-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.session-modal-actions .btn-primary,
.btn-session-secondary {
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
}

.btn-session-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-navy);
    background: white;
    color: var(--brand-navy);
    cursor: pointer;
    text-decoration: none;
    transition: border-color var(--trans-fast), background var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast);
}

.btn-session-secondary:hover:not(:disabled) {
    border-color: var(--brand-light-blue);
    background: #f4fbff;
    box-shadow: 0 6px 14px rgba(1, 54, 92, 0.1);
    transform: translateY(-1px);
}

.progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    color: var(--brand-navy);
    font-size: 0.88rem;
    font-weight: 700;
}

.progress-track {
    height: 8px;
    background: var(--border-input);
    border-radius: 99px;
    overflow: hidden;
}

#progress-bar {
    display: block;
    width: 14.285%;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-navy);
    transition: width 0.35s ease;
}

.step-dots {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    list-style: none;
    margin-top: 20px;
}

.step-dots li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.72rem;
    gap: 7px;
    cursor: pointer;
}

.step-dots li.step-locked {
    cursor: not-allowed;
    opacity: 0.65;
}

.step-selector-label,
.step-selector {
    display: none;
}

.step-dots li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(50% + 17px);
    width: calc(100% - 34px);
    height: 2px;
    background: var(--application-line);
}

.step-dots span {
    position: relative;
    z-index: 1;
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-navy);
    color: var(--bg-card);
    font-weight: 800;
}

.step-dots li.active,
.step-dots li.completed {
    color: var(--brand-navy);
    font-weight: 700;
}

.step-dots li.active span {
    background: var(--brand-navy);
    box-shadow: 0 0 0 4px var(--brand-gold);
    color: var(--bg-card);
}

.step-dots li.completed span {
    background: var(--brand-navy);
    color: var(--bg-card);
}

.step-dots li.completed::after {
    background: var(--brand-navy);
}

#application-form {
    border-top: 1px solid var(--application-line);
    padding: 44px 48px 34px;
}

.application-step {
    display: none;
    animation: applicationFade 0.28s ease;
}

.application-step.active {
    display: block;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 17px;
    margin-bottom: 32px;
}

.section-number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: var(--brand-gold);
    color: var(--brand-navy);
    font-weight: 800;
}

.section-heading h2 {
    color: var(--brand-navy);
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 1px 0 5px;
}

.section-heading p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.field-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.money-grid {
    grid-template-areas:
        "income expenses"
        "assets liabilities"
        "source source";
}

.financial-income-field { grid-area: income; }
.financial-expenses-field { grid-area: expenses; }
.financial-assets-field { grid-area: assets; }
.financial-liabilities-field { grid-area: liabilities; }
.financial-source-field { grid-area: source; }

.field-span-2 {
    grid-column: span 2;
}

.field-group {
    min-width: 0;
    margin: 0;
}

.vehicle-search-control {
    position: relative;
}

.vehicle-search-input-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.vehicle-search-input-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.vehicle-clear-button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--brand-navy);
    border-radius: 8px;
    background: white;
    color: var(--brand-navy);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.vehicle-clear-button:hover,
.vehicle-clear-button:focus-visible {
    background: var(--brand-light-blue-bg);
}

.vehicle-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--application-line);
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: var(--application-shadow);
}

.vehicle-suggestion-option {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--application-line);
    background: transparent;
    color: var(--brand-navy);
    font: inherit;
    font-size: 0.86rem;
    text-align: left;
    cursor: pointer;
}

.vehicle-suggestion-option:last-child {
    border-bottom: 0;
}

.vehicle-suggestion-option:hover,
.vehicle-suggestion-option:focus-visible {
    outline: none;
    background: var(--brand-light-blue-bg);
}

.field-group label,
.boolean-fieldset legend {
    color: var(--brand-navy);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.field-group label {
    display: block;
    max-width: 100%;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.field-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.45;
    margin-top: 6px;
}

.btn-location-shortcut {
    width: 100%;
    min-height: 50px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: #eef2f4;
    color: var(--brand-navy);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--trans-fast), box-shadow var(--trans-fast);
}

.btn-location-shortcut:hover {
    background: #e3e9ec;
    box-shadow: 0 5px 14px rgba(1, 54, 92, 0.08);
}

.btn-location-shortcut:focus-visible {
    outline: 3px solid rgba(13, 146, 204, 0.25);
    outline-offset: 2px;
}

.required-mark {
    color: var(--error-color);
}

.application-page input[type="text"],
.application-page input[type="email"],
.application-page input[type="tel"],
.application-page input[type="number"],
.application-page input[data-date-co],
.application-page select,
.application-page textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 2px solid var(--border-input);
    border-radius: 10px;
    background: white;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.94rem;
    transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
}

.application-page input[data-date-co] {
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    height: 50px;
    padding-right: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.date-input-control {
    position: relative;
    width: 100%;
}

.date-picker-button {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 1;
}

.date-picker-button::before,
.date-picker-button::after {
    content: "";
    position: absolute;
    left: 7px;
    width: 18px;
    border-color: currentColor;
}

.date-picker-button::before {
    top: 8px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.date-picker-button::after {
    top: 13px;
    border-top: 2px solid currentColor;
}

.date-input-control:hover .date-picker-button,
.date-picker-button:hover,
.date-picker-button:focus-visible {
    color: var(--brand-light-blue);
    background: var(--brand-light-blue-bg);
    outline: none;
}

.date-picker-proxy {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 32px;
    height: 32px;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 2;
}

.application-page select {
    appearance: none;
    padding-right: 40px;
    background-image: linear-gradient(45deg, transparent 50%, var(--brand-navy) 50%), linear-gradient(135deg, var(--brand-navy) 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 12px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.application-page input:focus,
.application-page select:focus,
.application-page textarea:focus {
    outline: none;
    border-color: var(--brand-light-blue);
    box-shadow: 0 0 0 4px rgba(13, 146, 204, 0.12);
}

.application-page textarea {
    min-height: 50px;
    height: 50px;
    overflow-y: hidden;
    resize: none;
}

.application-page input:disabled,
.application-page select:disabled {
    background-color: #f1f4f6;
    color: #788892;
    cursor: not-allowed;
}

#marcaVehiculoId option[value="Otros"] {
    font-weight: 800;
    text-transform: uppercase;
}

.application-page input[type="number"] {
    appearance: textfield;
}

.application-page input[type="number"]::-webkit-inner-spin-button,
.application-page input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.application-page input[readonly] {
    background-color: #f1f4f6;
    color: var(--brand-navy);
    cursor: not-allowed;
}

.application-page .field-invalid,
.application-page .field-invalid:focus {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.field-error {
    display: block;
    color: var(--error-color) !important;
    font-size: 0.73rem !important;
    font-weight: 600;
    margin-top: 6px;
}

.location-fieldset,
.reference-card,
.labor-scope {
    border: 1px solid var(--application-line);
    border-radius: 15px;
    margin-top: 28px;
    padding: 24px;
}

.location-fieldset legend,
.reference-card legend,
.labor-scope > legend {
    padding: 0 9px;
    color: var(--brand-light-blue);
    font-size: 1rem;
    font-weight: 800;
}

.country-note {
    display: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: -7px 0 18px;
}

.field-help {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: -4px 0 12px;
}

.conditional-panel {
    margin-top: 24px;
    padding: 23px;
    border: 1px solid #bcd9e8;
    border-left: 5px solid var(--brand-light-blue);
    border-radius: 13px;
    background: var(--application-soft-blue);
}

.conditional-panel.compact {
    max-width: 420px;
}

.conditional-panel h3 {
    color: var(--brand-navy);
    font-size: 1rem;
    margin-bottom: 18px;
}

.fixed-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 14px 17px;
    border-radius: 10px;
    background: #fff7dc;
    color: var(--brand-navy);
    font-size: 0.88rem;
}

.money-grid {
    margin-top: 26px;
}

.money-input {
    position: relative;
}

.money-input > span {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--brand-navy);
    font-weight: 700;
}

.application-page .money-input input {
    padding-left: 31px;
}

.application-page .money-input input::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

.vehicle-money-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
    margin-top: 26px;
}

.vehicle-value-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;
}

.vehicle-value-hint.has-fasecolda {
    color: var(--brand-navy);
    font-weight: 800;
}

.labor-activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.vehicle-money-column,
.financial-option-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 20px;
}

.boolean-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.financial-question-flow {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin-top: 28px;
}

.financial-option-group {
    min-width: 0;
}

.financial-question-option {
    min-width: 0;
}

.financial-option-group > .financial-toggle {
    padding: 18px;
    border: 1px solid var(--application-line);
    border-radius: 12px;
}

.financial-option-group > .conditional-panel {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-top: 14px;
}

#otros-ingresos-fields .field-grid {
    grid-template-columns: 1fr;
}

.boolean-fieldset {
    min-width: 0;
    max-width: 100%;
    border: 0;
}

.boolean-fieldset legend {
    max-width: 100%;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.location-decision {
    width: calc(50% - 12px);
    margin: 4px 0 20px;
    padding: 0;
    border: 0;
    background: transparent;
}

.location-decision-with-address {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
    align-items: start;
    margin-bottom: 20px;
}

.location-decision-with-address .location-decision {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    margin: 0;
}

.location-decision-with-address .home-address-field {
    grid-column: 2;
    grid-row: 1;
}

.location-decision-with-address .home-location-fields {
    grid-column: 1 / -1;
    margin: 0;
}

.location-decision legend {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    color: var(--brand-navy);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.location-decision .choice-row {
    width: 100%;
    max-width: none;
}

.location-decision .field-help {
    margin: 8px 0 0;
}

.location-choice-fields {
    margin-top: 0;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #bcd9e8;
    border-radius: 13px;
    background: var(--application-soft-blue);
}

.location-choice-fields + .field-grid {
    margin-top: 20px;
}

.boolean-grid > .boolean-fieldset,
.tax-declaration-group > .boolean-fieldset,
.financial-question-option.boolean-fieldset,
.second-activity-toggle {
    padding: 18px;
    border: 1px solid var(--application-line);
    border-radius: 12px;
}

.tax-declaration-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tax-declaration-group #tax-year-field {
    width: 100%;
    max-width: none;
    margin-top: 0;
}

.choice-row {
    display: flex;
    gap: 10px;
}

.choice-row label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.choice-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-row span {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 2px solid var(--border-input);
    border-radius: 9px;
    background: white;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all var(--trans-fast);
}

.choice-row input:checked + span {
    border-color: var(--brand-light-blue);
    background: var(--brand-light-blue-bg);
    color: var(--brand-navy);
}

.choice-row input:focus-visible + span {
    outline: 3px solid rgba(13, 146, 204, 0.25);
}

.vehicle-money-option {
    width: 100%;
    align-self: stretch;
}

.vehicle-money-toggle legend {
    margin-bottom: 8px;
}

.vehicle-money-value {
    width: 100%;
    max-width: none;
    margin-top: 12px;
    padding: 16px;
    box-sizing: border-box;
}

/* Los paneles monetarios comparten una columna completa; no deben heredar
   el límite visual que se usa en otros paneles compactos del formulario. */
.vehicle-money-value.conditional-panel.compact {
    inline-size: 100%;
    min-inline-size: 0;
    max-width: none;
}

.second-activity-toggle {
    margin-top: 28px;
}

.labor-scope .labor-conditional > .conditional-panel {
    margin-top: 24px;
}

[data-labor-scope="primary"] .labor-conditional > .conditional-panel,
#secondary-labor .labor-conditional > .conditional-panel {
    margin-top: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

[data-labor-scope="primary"] .location-choice-fields,
#secondary-labor .location-choice-fields {
    margin-bottom: 20px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.asset-card {
    border: 1px solid var(--application-line);
    border-radius: 15px;
    margin-bottom: 20px;
    padding: 22px;
}

.asset-card > .boolean-fieldset > legend {
    font-size: 1rem;
}

.asset-card > .conditional-panel {
    margin-top: 18px;
}

.terms-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 14px;
    margin-top: 28px;
    padding: 20px;
    border: 2px solid var(--application-line);
    border-radius: 13px;
    color: var(--text-secondary);
    cursor: default;
    font-size: 0.85rem;
    line-height: 1.55;
}

.terms-card input {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--brand-light-blue);
}

.terms-copy {
    min-width: 0;
}

.terms-copy > label {
    cursor: pointer;
}

.terms-card strong {
    display: block;
    color: var(--brand-navy);
    margin-bottom: 3px;
}

.terms-card > .field-error {
    grid-column: 1 / -1;
    margin-top: 0;
}

.admin-embedded-form .terms-card.is-readonly {
    border-color: #d4dde5;
    background: #f4f7f9;
    color: #6c7a86;
}

.admin-embedded-form .terms-card.is-readonly input {
    accent-color: #8d9aa5;
    cursor: not-allowed;
}

.admin-embedded-form .terms-card.is-readonly .terms-copy > label {
    cursor: default;
}

.legal-document-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 12px;
}

.legal-document-link {
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid #b9d7e7;
    border-radius: 8px;
    background: #f7fbfd;
    color: var(--brand-light-blue);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.legal-document-link:hover,
.legal-document-link:focus-visible {
    border-color: var(--brand-navy);
    background: white;
    color: var(--brand-navy);
}

.reference-phone-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
    gap: 20px 24px;
    align-items: start;
}

.reference-location-shortcut {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    padding-top: 27px;
}

.reference-location-shortcut .btn-location-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #8bc8e7;
    background: #f3fbff;
}

.optional-upload-card {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr);
    gap: 28px;
    align-items: center;
    margin-top: 34px;
    padding: 28px;
    border: 2px solid #acd4e8;
    border-left: 6px solid var(--brand-light-blue);
    border-radius: 16px;
    background: linear-gradient(135deg, #f4fbff 0%, #ffffff 72%);
    box-shadow: 0 12px 28px rgba(1, 54, 92, 0.08);
}

.cedula-availability-question {
    margin-top: 30px;
    padding: 18px 20px;
    border: 1px solid var(--application-line);
    border-radius: 12px;
    background: #fbfdfe;
}

.cedula-availability-question legend {
    margin-bottom: 5px;
}

.cedula-availability-help {
    margin: 0 0 13px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.5;
}

.optional-upload-badge {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #dff2fb;
    color: var(--brand-navy);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.optional-upload-card h3 {
    color: var(--brand-navy);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.optional-upload-card p {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.55;
}

.optional-upload-label {
    color: var(--brand-navy);
    font-size: 0.82rem;
}

.application-page input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.file-selection-button {
    display: inline-flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 2px solid var(--brand-light-blue);
    border-radius: 11px;
    background: var(--brand-light-blue);
    box-shadow: 0 7px 16px rgba(13, 146, 204, 0.18);
    color: white;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    transition: border-color var(--trans-fast), background var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast);
}

/* La etiqueta general de los campos es más específica que el selector base
   del botón; se declara aquí para preservar contraste en reposo y hover. */
.field-group .file-selection-button,
.field-group .file-selection-button:hover,
.field-group .file-selection-button:focus-visible,
.field-group .file-selection-button span {
    color: white;
    font-size: 1rem;
    font-weight: 800;
}

.file-selection-button:hover {
    border-color: var(--brand-navy);
    background: var(--brand-navy);
    box-shadow: 0 9px 20px rgba(1, 54, 92, 0.2);
    transform: translateY(-1px);
}

.file-selection-button:focus-visible {
    outline: 3px solid rgba(13, 146, 204, 0.28);
    outline-offset: 3px;
}

.file-selection-names {
    min-height: 20px;
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.file-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.file-preview-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 28px;
    align-items: center;
    min-width: 0;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--application-line);
    border-radius: 10px;
    background: white;
}

.file-preview-thumb {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #edf3f6;
    color: var(--brand-navy);
    font-size: 0.62rem;
    font-weight: 800;
}

.file-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-pdf {
    background: #fff0ec;
    color: #b93824;
}

.file-preview-details {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.file-preview-details strong,
.file-preview-details small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-preview-details strong {
    color: var(--brand-navy);
    font-size: 0.76rem;
}

.file-preview-details small {
    color: var(--text-secondary);
    font-size: 0.68rem;
}

.file-preview-remove {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff0f0;
    color: var(--error-color);
    cursor: pointer;
    font: inherit;
    font-size: 1.15rem;
    line-height: 1;
}

.file-preview-remove:hover,
.file-preview-remove:focus-visible {
    background: var(--error-color);
    color: white;
}

.btn-file-remove {
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: var(--error-color);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--application-line);
}

.action-primary {
    width: auto;
    min-width: 220px;
}

.action-secondary {
    width: auto;
    min-width: 220px;
    background: white;
}

#preview-application {
    border-color: var(--brand-light-blue);
    background: linear-gradient(135deg, #f5fcff 0%, #e7f6fd 100%);
    box-shadow: 0 5px 14px rgba(13, 146, 204, 0.12);
}

#preview-application:hover:not(:disabled),
#preview-application:focus-visible {
    border-color: var(--brand-navy);
    background: #dff2fb;
    box-shadow: 0 8px 18px rgba(1, 54, 92, 0.16);
}

.btn-back {
    min-height: 48px;
    padding: 10px 17px;
    border: 0;
    background: transparent;
    color: var(--brand-light-blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

#draft-status {
    display: none !important;
}

.form-error-summary {
    margin-top: 24px;
    padding: 14px 17px;
    border: 1px solid #efadb4;
    border-left: 5px solid var(--error-color);
    border-radius: 9px;
    background: #fff4f5;
    color: #9f2733;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-error-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8d1d2a;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.access-card,
.success-card {
    max-width: 680px;
    margin: 40px auto;
    padding: 52px 45px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--application-shadow);
    text-align: center;
}

.access-icon,
.success-check {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #fff7dc;
    font-size: 2rem;
}

.success-check {
    background: #e8f7ee;
    color: var(--success-color);
    font-size: 2.5rem;
    font-weight: 800;
}

.access-link {
    display: inline-flex;
    width: auto;
    margin-top: 24px;
    padding-inline: 28px;
    text-decoration: none;
}

.application-reference {
    margin-top: 20px;
    color: var(--brand-navy) !important;
    font-size: 0.85rem;
    font-weight: 700;
}

.missing-id-attachment-notice {
    margin: 26px 0 0;
    padding: 18px 20px;
    border: 2px solid #ffd469;
    border-radius: 14px;
    background: #fff7dc;
    color: var(--brand-navy);
    text-align: left;
}

.missing-id-attachment-notice strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.98rem;
}

.missing-id-attachment-notice p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.application-footer {
    width: 100%;
    padding: 28px 20px;
    background: var(--brand-navy);
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    line-height: 1.7;
    text-align: center;
}

.tax-id,
.application-footer a[x-apple-data-detectors] {
    color: inherit !important;
    font: inherit !important;
    font-variant-numeric: tabular-nums;
    text-decoration: none !important;
    white-space: nowrap;
}

.admin-embedded-form {
    min-width: 0;
    min-height: 100vh;
    background: #f7fbfd;
}

.admin-embedded-form .site-header {
    display: none !important;
}

.admin-embedded-form .application-main {
    max-width: none;
    min-height: 100vh;
    padding: 0;
}

.admin-embedded-form .application-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-embedded-form .application-intro,
.admin-embedded-form .recovery-panel,
.admin-embedded-form .application-footer,
.admin-embedded-form #success-message {
    display: none !important;
}

.admin-embedded-form .application-progress {
    position: sticky;
    top: 0;
    padding: 18px 28px;
    border-bottom: 1px solid var(--application-line);
}

.admin-embedded-form #application-form {
    padding: 24px 28px;
}

.admin-embedded-form .form-actions {
    position: static;
    z-index: 8;
    margin: 18px 0 0;
    padding: 18px 0 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

/* La firma/envío público se gestiona desde el panel padre. El iframe conserva
   navegación y previsualización, pero nunca debe mostrar un disparador que
   pueda abrir la confirmación OTP del formulario público. */
.admin-embedded-form #validate-and-submit,
.admin-embedded-form #submit-application {
    display: none !important;
}

.admin-embedded-form .phone-confirmation-modal {
    display: none !important;
}

.admin-embedded-form #draft-status {
    display: none !important;
}

.admin-embedded-form .step-dots li {
    cursor: pointer;
    opacity: 1;
}

.admin-embedded-form .step-dots li.step-locked {
    cursor: pointer;
    opacity: 1;
}

/* El panel administrativo prioriza el área de edición en ventanas de poca
   altura, donde la ficha de resumen ya se oculta en el modal padre. */
@media (min-width: 821px) and (max-height: 850px) {
    .admin-embedded-form {
        zoom: 0.96;
    }

    .admin-embedded-form .application-progress {
        padding: 10px 22px 14px;
    }

    .admin-embedded-form .progress-copy {
        margin-bottom: 6px;
        font-size: 0.8rem;
    }

    .admin-embedded-form .progress-track {
        height: 6px;
    }

    .admin-embedded-form .step-dots {
        margin-top: 12px;
    }

    .admin-embedded-form .step-dots li {
        gap: 5px;
        font-size: 0.65rem;
    }

    .admin-embedded-form .step-dots li:not(:last-child)::after {
        top: 14px;
        left: calc(50% + 15px);
        width: calc(100% - 30px);
    }

    .admin-embedded-form .step-dots span {
        width: 28px;
        height: 28px;
    }

    .admin-embedded-form #application-form {
        padding: 26px 22px 24px;
    }

    .admin-embedded-form .section-heading {
        margin-bottom: 24px;
    }
}

.preview-modal,
.legal-modal,
.phone-confirmation-modal {
    position: fixed;
    z-index: 1100;
    inset: 0;
    overflow-y: auto;
    padding: 28px;
    background: rgba(1, 35, 59, 0.78);
    backdrop-filter: blur(6px);
}

.preview-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 980px);
    height: min(90vh, 900px);
    height: min(90dvh, 900px);
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 28px 80px rgba(1, 35, 59, 0.35);
}

.preview-modal {
    display: grid;
    place-items: center;
    overflow: hidden;
}

.preview-modal-header,
.legal-modal-header,
.phone-confirmation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    border-bottom: 1px solid var(--application-line);
}

.preview-modal-header h2,
.legal-modal-header h2,
.phone-confirmation-header h2 {
    color: var(--brand-navy);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.2;
}

.preview-modal-header > div > p:last-child {
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.phone-confirmation-modal {
    display: grid;
    place-items: center;
    z-index: 1250;
}

.cedula-suspension-modal {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(71, 18, 18, 0.72);
    backdrop-filter: blur(6px);
}

.cedula-suspension-card {
    width: min(100%, 540px);
    padding: 30px 32px 32px;
    border: 2px solid #efb8b8;
    border-top: 7px solid #c93030;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(41, 8, 8, 0.35);
}

.cedula-suspension-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.cedula-suspension-alert-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: #fff0f0;
    font-size: 1.65rem;
}

.cedula-suspension-card h2 {
    margin: 16px 0 12px;
    color: #8f1f29;
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    line-height: 1.2;
}

.cedula-suspension-card > p:not(.eyebrow) {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.cedula-suspension-card > .btn-primary {
    width: 100%;
}

.phone-confirmation-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 620px);
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 28px 80px rgba(1, 35, 59, 0.35);
}

.phone-confirmation-header > div > p:last-child {
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
}

.phone-confirmation-body {
    overflow-y: auto;
    padding: 28px 32px;
    background: #f7fbfd;
}

.phone-confirmation-field {
    margin: 0;
}

.phone-confirmation-field label,
#application-phone-otp-step h3 {
    color: var(--brand-navy);
    font-weight: 800;
}

.phone-confirmation-field input {
    font-size: 1.08rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.035em;
}

.phone-confirmation-field small,
#application-phone-otp-step > p {
    color: var(--text-secondary);
    line-height: 1.5;
}

#application-phone-otp-step h3 {
    margin-bottom: 7px;
    font-size: 1.05rem;
}

#application-phone-otp-step > p {
    margin-bottom: 20px;
    font-size: 0.88rem;
}

#application-phone-otp-inputs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.application-page .application-phone-otp-digit {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 64px;
    min-height: 64px;
    padding: 0 5px;
    border-width: 3px;
    font-size: 1.35rem;
    line-height: 64px;
    text-align: center;
}

.phone-otp-timer {
    min-height: 20px;
    margin: -8px 0 8px !important;
    color: var(--brand-navy) !important;
    text-align: center;
    font-size: 0.8rem !important;
    font-weight: 700;
}

.phone-otp-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.phone-text-action {
    padding: 5px;
    border: 0;
    background: transparent;
    color: var(--brand-light-blue);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}

.phone-confirmation-error {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid #efadb4;
    border-radius: 9px;
    background: #fff4f5;
    color: #9f2733;
    font-size: 0.82rem;
    font-weight: 700;
}

.phone-confirmation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    padding: 22px 32px 26px;
    border-top: 1px solid var(--application-line);
    background: white;
}

.phone-confirmation-actions .btn-primary,
.phone-confirmation-actions .btn-session-secondary {
    width: auto;
    min-width: 180px;
}

.modal-close-button {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--application-line);
    border-radius: 50%;
    background: white;
    color: var(--brand-navy);
    font: inherit;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.application-preview-content {
    display: grid;
    min-height: 0;
    gap: 18px;
    padding: 28px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f7fbfd;
}

.preview-section {
    padding: 22px;
    border: 1px solid var(--application-line);
    border-radius: 14px;
    background: white;
}

.preview-section h3 {
    margin-bottom: 17px;
    color: var(--brand-navy);
    font-size: 1.05rem;
}

.preview-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
}

.preview-field {
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf1f3;
}

.preview-field dt {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.preview-field dd {
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--brand-navy);
    font-size: 0.88rem;
    font-weight: 600;
}

.preview-modal-actions,
.legal-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    padding: 24px 32px 30px;
    border-top: 1px solid var(--application-line);
    background: white;
}

.preview-modal-actions .btn-primary,
.preview-modal-actions .btn-session-secondary,
.legal-modal-actions .btn-primary,
.legal-modal-actions .btn-session-secondary {
    width: auto;
    min-width: 190px;
}

.legal-modal {
    display: grid;
    place-items: center;
    z-index: 1200;
}

.legal-modal-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 980px);
    height: min(90vh, 900px);
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 28px 80px rgba(1, 35, 59, 0.35);
}

.legal-modal-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: white;
}

@media (min-width: 821px) {
    .application-main {
        max-width: 1200px;
    }

    .vehicle-money-column {
        display: contents;
    }

    .vehicle-value-field { grid-column: 1; grid-row: 1; }
    .vehicle-accessories-option { grid-column: 2; grid-row: 1; }
    .vehicle-down-payment-option { grid-column: 1; grid-row: 2; }
    .vehicle-term-field { grid-column: 2; grid-row: 2; }
}

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

@media (max-width: 820px) {
    .application-main {
        padding: 24px 14px 42px;
    }

    .application-intro,
    #application-form {
        padding-left: 24px;
        padding-right: 24px;
    }

    .application-progress {
        position: static;
        padding-left: 24px;
        padding-right: 24px;
    }

    .recovery-panel {
        margin-left: 24px;
        margin-right: 24px;
    }

    .field-grid,
    .field-grid.three-columns,
    .boolean-grid,
    .financial-question-flow,
    .vehicle-money-layout,
    .optional-upload-card {
        grid-template-columns: 1fr;
    }

    .labor-activity-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-money-column,
    .financial-option-column {
        display: contents;
    }

    .vehicle-value-field { order: 1; }
    .vehicle-accessories-option { order: 2; }
    .vehicle-down-payment-option { order: 3; }
    .vehicle-term-field { order: 4; }

    .financial-honoraria-option { order: 1; }
    .financial-variable-salary-option { order: 2; }
    .financial-other-income-option { order: 3; }
    .financial-tax-declaration-option { order: 4; }
    .financial-foreign-currency-option { order: 5; }
    .financial-public-funds-option { order: 6; }
    .financial-pep-option { order: 7; }

    .tax-declaration-group {
        grid-template-columns: 1fr;
    }

    .money-grid {
        grid-template-areas:
            "income"
            "expenses"
            "assets"
            "liabilities"
            "source";
    }

    .field-span-2 {
        grid-column: span 1;
    }

    .location-decision {
        width: 100%;
    }

    .location-decision-with-address {
        grid-template-columns: 1fr;
    }

    .location-decision-with-address .location-decision {
        grid-column: auto;
        grid-row: auto;
        order: 1;
    }

    .location-decision-with-address .home-location-fields {
        grid-column: auto;
        order: 2;
        margin: 0;
    }

    .location-decision-with-address .home-address-field {
        grid-column: auto;
        grid-row: auto;
        order: 3;
    }

    .reference-phone-line {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .reference-location-shortcut {
        padding-top: 0;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .action-primary,
    .action-secondary {
        flex: 1 1 220px;
        min-width: 0;
    }

    .step-dots small {
        display: none;
    }
}

@media (max-width: 540px) {
    .session-modal {
        padding: 14px;
    }

    .session-modal-card {
        max-height: calc(100vh - 28px);
        padding: 28px 20px;
    }

    .session-modal-actions {
        flex-direction: column;
    }

    .session-modal-actions .btn-primary,
    .btn-session-secondary {
        width: 100%;
    }

    .application-shell {
        border-radius: 16px;
    }

    .application-intro {
        padding-top: 30px;
    }

    .application-intro h1 {
        font-size: 1.65rem;
    }

    .progress-copy {
        font-size: 0.76rem;
    }

    .step-dots {
        display: none;
    }

    .step-selector-label {
        display: block;
        margin-top: 14px;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
    }

    .step-selector {
        display: block;
        width: 100%;
        min-height: 42px;
        margin-top: 5px;
        padding: 8px 12px;
        border: 1px solid var(--application-line);
        border-radius: 9px;
        background: white;
        color: var(--brand-navy);
        font: inherit;
        font-size: 16px;
    }

    .recovery-panel {
        grid-template-columns: 1fr;
    }

    .recovery-code-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .step-dots {
        margin-top: 16px;
    }

    .step-dots span {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .step-dots li:not(:last-child)::after {
        top: 12px;
        left: calc(50% + 14px);
        width: calc(100% - 28px);
    }

    #application-form {
        padding-top: 30px;
        padding-bottom: 104px;
    }

    .section-heading {
        gap: 12px;
        margin-bottom: 26px;
    }

    .section-number {
        width: 41px;
        height: 41px;
        border-radius: 11px;
        font-size: 0.82rem;
    }

    .section-heading h2 {
        font-size: 1.28rem;
    }

    .location-fieldset,
    .reference-card,
    .labor-scope,
    .conditional-panel,
    .asset-card,
    .optional-upload-card {
        padding: 18px;
    }

    .application-page input[type="text"],
    .application-page input[type="email"],
    .application-page input[type="tel"],
    .application-page input[type="number"],
    .application-page input[data-date-co],
    .application-page select,
    .application-page textarea {
        font-size: 16px;
    }

    .reference-location-shortcut .btn-location-shortcut {
        width: 100%;
    }

    .location-decision .choice-row {
        flex-direction: column;
    }

    .legal-document-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-width: 0;
    }

    .legal-document-link {
        display: block;
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        inline-size: auto;
        width: auto;
        align-self: stretch;
        border-width: 2px;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .terms-card {
        grid-template-columns: 20px minmax(0, 1fr);
        gap: 10px;
        padding: 16px;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        z-index: 9;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        inline-size: calc(100% + 48px);
        margin: 28px 0 -34px -24px;
        padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--application-line);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -8px 20px rgba(1, 54, 92, 0.08);
        backdrop-filter: blur(8px);
    }

    .admin-embedded-form .form-actions {
        inline-size: 100%;
        margin-left: 0;
    }

    .btn-back,
    .action-secondary {
        box-sizing: border-box;
        max-inline-size: 100%;
        width: 100%;
    }

    .btn-back {
        grid-column: 1 / -1;
    }

    .final-step-actions .btn-back {
        grid-column: auto;
    }

    .action-secondary {
        min-width: 0;
    }

    .action-primary {
        grid-column: 1 / -1;
        box-sizing: border-box;
        max-inline-size: 100%;
        width: 100%;
    }

    /* En una cuadrícula, estirar el botón en su celda evita que un width:100%
       redondee hacia fuera y deje oculto el borde derecho en Safari móvil. */
    .form-actions > .btn-back,
    .form-actions > .action-secondary,
    .form-actions > .action-primary {
        inline-size: auto;
        min-inline-size: 0;
        max-inline-size: 100%;
        justify-self: stretch;
    }

    .preview-modal,
    .legal-modal {
        padding: 0;
    }

    .preview-modal-card,
    .legal-modal-card {
        width: 100%;
        min-height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .legal-modal-card {
        height: 100%;
    }

    .preview-modal-card {
        height: 100%;
        max-height: none;
    }

    .preview-modal-header,
    .legal-modal-header,
    .application-preview-content {
        padding: 22px 20px;
    }

    .preview-fields {
        grid-template-columns: 1fr;
    }

    .preview-modal-actions,
    .legal-modal-actions {
        flex-direction: column;
        padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
    }

    .preview-modal-actions .btn-primary,
    .preview-modal-actions .btn-session-secondary,
    .legal-modal-actions .btn-primary,
    .legal-modal-actions .btn-session-secondary {
        width: 100%;
    }

    .phone-confirmation-modal {
        padding: 14px;
    }

    .cedula-suspension-modal {
        padding: 14px;
    }

    .cedula-suspension-card {
        padding: 24px 20px 22px;
        border-radius: 18px;
    }

    .phone-confirmation-card {
        width: 100%;
        max-height: calc(100vh - 28px);
        max-height: calc(100dvh - 28px);
        border-radius: 18px;
    }

    #application-phone-otp-inputs {
        gap: 8px;
    }

    .application-page .application-phone-otp-digit {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 58px;
        min-height: 58px;
        line-height: 58px;
    }

    .phone-confirmation-header,
    .phone-confirmation-body {
        padding: 22px 20px;
    }

    .phone-confirmation-actions {
        flex-direction: column-reverse;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    }

    .phone-confirmation-actions .btn-primary,
    .phone-confirmation-actions .btn-session-secondary {
        width: 100%;
    }


    .access-card,
    .success-card {
        padding: 38px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
