.registro-extranjero-page {
    --registro-primary: #f97316;
    --registro-primary-bright: #ff6b13;
    --registro-primary-dark: #c2410c;
    --registro-primary-soft: rgba(249, 115, 22, 0.14);
    --registro-ink: #111827;
    --registro-muted: #64748b;
    --registro-border: #dbe4ef;
    --registro-surface: #ffffff;
    --registro-bg: #f6f9fe;
    --registro-bg-soft: #eef5fd;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    width: calc(100vw - 0px);
    margin: -1.5rem calc(50% - 50vw) 0;
    padding: 0.8rem 1.45rem 2rem;
    background:
        radial-gradient(circle at 96% 20%, rgba(96, 165, 250, 0.16), transparent 13rem),
        radial-gradient(circle at 0% 66%, rgba(147, 197, 253, 0.16), transparent 13rem),
        radial-gradient(circle at 13% 27%, rgba(249, 115, 22, 0.1), transparent 4rem),
        linear-gradient(180deg, #f8fbff 0%, var(--registro-bg) 48%, #ffffff 100%);
    color: var(--registro-ink);
    overflow-x: hidden;
    overflow-y: visible;
}

body.registro-extranjero-active,
body:has(.registro-extranjero-page) {
    background:
        radial-gradient(circle at 96% 20%, rgba(96, 165, 250, 0.16), transparent 13rem),
        radial-gradient(circle at 0% 66%, rgba(147, 197, 253, 0.16), transparent 13rem),
        linear-gradient(180deg, #f8fbff 0%, #f6f9fe 48%, #ffffff 100%);
}

body.registro-extranjero-active .topbar,
body.registro-extranjero-active .sticky-footer,
body.registro-extranjero-active #accordionSidebar,
body:has(.registro-extranjero-page) .topbar,
body:has(.registro-extranjero-page) .sticky-footer,
body:has(.registro-extranjero-page) #accordionSidebar {
    display: none !important;
}

body.registro-extranjero-active #content-wrapper,
body.registro-extranjero-active #content,
body:has(.registro-extranjero-page) #content-wrapper,
body:has(.registro-extranjero-page) #content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

.registro-extranjero-page::before {
    content: "";
    position: fixed;
    z-index: 0;
    right: -12%;
    bottom: 10%;
    width: 310px;
    height: 310px;
    background:
        radial-gradient(circle at 55% 42%, rgba(59, 130, 246, 0.07), transparent 42%),
        radial-gradient(circle, transparent 58%, rgba(59, 130, 246, 0.08) 59%, transparent 60%);
    border-radius: 50%;
}

.registro-extranjero-page::after {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    background:
        radial-gradient(circle at 98% 25%, rgba(96, 165, 250, 0.1), transparent 6rem),
        radial-gradient(circle at 0% 58%, rgba(96, 165, 250, 0.12), transparent 7rem),
        linear-gradient(174deg, transparent 0 85%, rgba(255, 255, 255, 0.92) 85.2% 100%);
    pointer-events: none;
}

.registro-extranjero-page > h2,
.registro-extranjero-page > p {
    display: none;
}

.registro-extranjero-page form {
    position: relative;
    z-index: 2;
    max-width: 980px;
    margin: 0 auto;
}

.registro-extranjero-page form::before {
    content: "\f072";
    position: absolute;
    z-index: 0;
    right: max(-9vw, -135px);
    bottom: 8.8rem;
    color: rgba(30, 92, 159, 0.38);
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(18deg);
    pointer-events: none;
    user-select: none;
}

.registro-extranjero-page form::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: max(-16vw, -220px);
    bottom: 5.5rem;
    width: 220px;
    height: 130px;
    border-bottom: 2px dashed rgba(249, 115, 22, 0.45);
    border-left: 2px dashed rgba(249, 115, 22, 0.25);
    border-radius: 50%;
    transform: rotate(17deg);
    pointer-events: none;
}

.registro-extranjero-page .container,
.registro-extranjero-page .row,
.registro-extranjero-page [class*="col-"] {
    max-width: none;
}

.registro-extranjero-page .registro-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    overflow: hidden;
    background: var(--registro-surface);
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.registro-card-body {
    min-height: 705px;
    padding: 2rem 1.55rem 1.55rem;
}

.registro-page-header {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 250px;
    gap: 1rem;
    align-items: center;
    width: min(1500px, 100%);
    min-height: 96px;
    margin: 0 auto 3.35rem;
    padding: 0 2.55rem;
    color: #1f3b66;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(219, 228, 239, 0.8);
    border-radius: 8px;
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
}

.registro-page-header::before {
    content: "\f072";
    position: absolute;
    left: max(-7vw, -98px);
    top: 310px;
    z-index: 0;
    color: rgba(30, 92, 159, 0.42);
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-size: 2.05rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(22deg);
    pointer-events: none;
    user-select: none;
}

.registro-page-header::after {
    content: "";
    position: absolute;
    left: max(-13vw, -190px);
    top: 210px;
    z-index: 0;
    width: 200px;
    height: 150px;
    border-top: 2px dashed rgba(37, 99, 235, 0.26);
    border-right: 2px dashed rgba(37, 99, 235, 0.18);
    border-radius: 50%;
    transform: rotate(28deg);
    pointer-events: none;
}

.registro-header-brand img {
    display: block;
    width: 185px;
    height: auto;
}

.registro-header-logo-mobile {
    display: none !important;
}

.registro-header-title h2 {
    margin: 0;
    color: #1f3b66;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1.12;
    text-align: center;
}

.registro-plane {
    position: absolute;
    right: clamp(-102px, -7vw, -60px);
    top: 140px;
    z-index: 0;
    color: rgba(30, 92, 159, 0.48);
    font-size: 2.4rem;
    transform: rotate(-30deg);
    pointer-events: none;
    user-select: none;
}

.registro-plane::before,
.registro-globe::before {
    content: "";
    position: absolute;
    border-top: 2px dashed rgba(37, 99, 235, 0.28);
    pointer-events: none;
}

.registro-plane::before {
    width: 235px;
    height: 120px;
    right: 34px;
    top: 18px;
    border-radius: 50%;
    transform: rotate(-16deg);
}

.registro-globe {
    position: absolute;
    right: -300px;
    top: 240px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 37% 40%, rgba(30, 92, 159, 0.12), transparent 32%),
        radial-gradient(circle at 58% 48%, rgba(30, 92, 159, 0.1), transparent 24%),
        linear-gradient(145deg, rgba(96, 165, 250, 0.15), rgba(255, 255, 255, 0.04));
    box-shadow: inset -35px -20px 48px rgba(30, 92, 159, 0.05);
    opacity: 0.62;
}

.registro-globe::before {
    width: 220px;
    height: 150px;
    right: 255px;
    top: 260px;
    border-color: rgba(249, 115, 22, 0.5);
    border-radius: 50%;
    transform: rotate(-50deg);
}

.registro-globe::after {
    content: "";
    position: absolute;
    right: 246px;
    top: 250px;
    width: 12px;
    height: 12px;
    background: var(--registro-primary-bright);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.95);
}

.registro-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 42px;
    margin-bottom: 1.45rem;
    color: #ea580c;
    font-weight: 700;
    text-decoration: none;
}

.registro-back-link:hover,
.registro-back-link:focus {
    color: var(--registro-primary);
    text-decoration: none;
}

.registro-hero {
    max-width: 850px;
    margin-bottom: 2.25rem;
}

.registro-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.6rem;
    color: #f97316;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.registro-hero h1 {
    margin: 0;
    color: var(--registro-ink);
    font-size: 2.45rem;
    font-weight: 800;
    line-height: 1.08;
}

.registro-hero p {
    margin: 0.75rem 0 0;
    color: var(--registro-muted);
    font-size: 1rem;
}

.registro-alert {
    max-width: 1080px;
    margin: 0 auto 1rem;
}

.registro-stepper-header {
    margin-bottom: 2.15rem;
}

.registro-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0.45rem;
    margin: 0;
    list-style: none;
    background: #f8fbff;
    border: 1px solid var(--registro-border);
    border-radius: 999px;
}

.registro-stepper li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    min-height: 48px;
    padding: 0 0.55rem;
    color: var(--registro-muted);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.registro-stepper li strong {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

.registro-stepper li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -10%;
    width: 20%;
    height: 1px;
    background: #dbe4ef;
}

.registro-stepper li span {
    display: inline-flex;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    aspect-ratio: 1;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.82rem;
    line-height: 1;
}

.registro-stepper li.active {
    color: #fff;
    background: linear-gradient(135deg, #ff8126 0%, var(--registro-primary-bright) 100%);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
}

.registro-stepper li.active::after {
    background: transparent;
}

.registro-stepper li.complete {
    color: var(--registro-primary-dark);
    background: var(--registro-primary-soft);
}

.registro-stepper-mobile {
    display: none;
}

.registro-step-panel {
    min-height: 315px;
}

.registro-step-panel[hidden] {
    display: none !important;
}

.registro-step-title {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1.45rem;
    margin-bottom: 1.55rem;
    border-bottom: 1px solid var(--registro-border);
}

.registro-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: #fff;
    background: linear-gradient(145deg, #ff8a2a, #ff650d);
    border-radius: 8px;
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
}

.registro-step-title h3 {
    margin: 0;
    color: var(--registro-ink);
    font-size: 1.45rem;
    font-weight: 800;
}

.registro-step-title p {
    margin: 0.35rem 0 0;
    color: var(--registro-muted);
}

.registro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.55rem;
}

.registro-grid-full,
.registro-grid > .row {
    grid-column: 1 / -1;
}

.registro-field-block,
.registro-grid > [class*="col-"] {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.registro-grid .form-group {
    margin-bottom: 0;
}

.registro-extranjero-page .form-label {
    margin-bottom: 0.45rem;
    color: #111827;
    font-weight: 750;
}

.registro-extranjero-page .form-control {
    min-height: 50px;
    color: var(--registro-ink);
    border: 1px solid var(--registro-border);
    border-radius: 7px;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.registro-extranjero-page .form-control:focus {
    border-color: var(--registro-primary);
    box-shadow: 0 0 0 4px var(--registro-primary-soft);
}

.registro-password-control {
    position: relative;
}

.registro-password-control .form-control {
    padding-right: 3.35rem;
}

.registro-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: var(--registro-muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
}

.registro-password-toggle:hover {
    color: var(--registro-primary-dark);
}

.registro-password-toggle:focus-visible {
    outline: 2px solid var(--registro-primary);
    outline-offset: 2px;
}

.registro-extranjero-page .form-text,
.registro-extranjero-page .text-muted {
    color: var(--registro-muted) !important;
}

.registro-choice-group .btn-group {
    display: inline-flex;
    padding: 0.25rem;
    background: #f8fafc;
    border: 1px solid var(--registro-border);
    border-radius: 999px;
}

.registro-choice-group .btn {
    min-width: 74px;
    color: var(--registro-muted);
    border: 0;
    border-radius: 999px !important;
    font-weight: 700;
}

.registro-choice-group .btn-check:checked + .btn {
    color: #fff;
    background: var(--registro-primary);
}

.registro-document-note,
.registro-legal-copy {
    padding: 1rem 1.15rem;
    color: #475569;
    background: #fff7ed;
    border: 1px solid rgba(249, 115, 22, 0.22);
    border-radius: 8px;
}

.registro-document-note p,
.registro-document-note ul,
.registro-legal-copy {
    margin-bottom: 0;
}

.registro-document-note ul {
    padding-left: 1.1rem;
}

.registro-document-note li + li {
    margin-top: 0.35rem;
}

#fotoPreview img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.registro-step-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.45rem;
    margin-top: 1.5rem;
}

.registro-submit-slot[hidden],
.registro-step-actions [hidden] {
    display: none !important;
}

.registro-btn-primary,
.registro-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.75rem 1.45rem;
    border-radius: 999px;
    font-weight: 800;
}

.registro-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #ff8126 0%, var(--registro-primary-bright) 100%);
    border-color: var(--registro-primary-bright);
    box-shadow: var(--shadow-sm, 0 4px 6px -1px rgba(0, 0, 0, 0.05));
}

.registro-btn-primary:hover,
.registro-btn-primary:focus {
    color: #fff;
    background: var(--registro-primary-dark);
    border-color: var(--registro-primary-dark);
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.08));
}

.registro-btn-secondary {
    color: var(--registro-primary-dark);
    background: #fff;
    border: 1px solid rgba(249, 115, 22, 0.35);
}

.registro-btn-secondary:disabled {
    color: #94a3b8;
    border-color: var(--registro-border);
    opacity: 1;
}

.registro-validation-summary {
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 8px;
}

@media (max-width: 767.98px) {
    body.registro-extranjero-active .topbar,
    body:has(.registro-extranjero-page) .topbar {
        display: flex !important;
        min-height: 64px;
        margin: 0 0.75rem 1rem;
        padding: 0;
        background: #ffffff !important;
        border: 1px solid rgba(17, 24, 39, 0.08);
        border-top: 0;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08) !important;
    }

    body.registro-extranjero-active .topbar .container-fluid,
    body.registro-extranjero-active .topbar .scc-topbar-inner,
    body:has(.registro-extranjero-page) .topbar .container-fluid,
    body:has(.registro-extranjero-page) .topbar .scc-topbar-inner {
        position: relative !important;
        min-width: 0;
        padding: 0.55rem 0.75rem;
    }

    body.registro-extranjero-active .topbar .sidemenu-toggle,
    body.registro-extranjero-active .topbar .scc-topbar-actions,
    body:has(.registro-extranjero-page) .topbar .sidemenu-toggle,
    body:has(.registro-extranjero-page) .topbar .scc-topbar-actions {
        display: none !important;
    }

    body.registro-extranjero-active .topbar .header-content-left,
    body:has(.registro-extranjero-page) .topbar .header-content-left {
        flex: 0 0 auto;
        min-width: 0;
    }

    body.registro-extranjero-active .topbar .header-content-left img,
    body.registro-extranjero-active .topbar .mineduc-logo-container,
    body.registro-extranjero-active .topbar > .container-fluid img,
    body:has(.registro-extranjero-page) .topbar .header-content-left img,
    body:has(.registro-extranjero-page) .topbar .mineduc-logo-container,
    body:has(.registro-extranjero-page) .topbar > .container-fluid img {
        height: 44px !important;
        max-width: 170px;
        object-fit: contain;
    }

    body.registro-extranjero-active .topbar .scc-topbar-title,
    body.registro-extranjero-active .topbar .position-absolute.start-50,
    body:has(.registro-extranjero-page) .topbar .scc-topbar-title,
    body:has(.registro-extranjero-page) .topbar .position-absolute.start-50 {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto;
        min-width: 0;
        padding: 0;
        pointer-events: none;
    }

    body.registro-extranjero-active .topbar .scc-topbar-title h5,
    body.registro-extranjero-active .topbar .position-absolute.start-50 h5,
    body:has(.registro-extranjero-page) .topbar .scc-topbar-title h5,
    body:has(.registro-extranjero-page) .topbar .position-absolute.start-50 h5 {
        color: #1f3b66;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1;
        white-space: nowrap;
    }

    .registro-extranjero-page {
        margin: 0 -0.75rem 0;
        padding: 1rem 0.75rem 2rem;
    }

    .registro-page-header {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        justify-items: center;
        min-height: auto;
        margin-bottom: 1rem;
        padding: 0.75rem 0.25rem 0.25rem;
        text-align: center;
    }

    .registro-header-brand img {
        width: min(165px, 58vw);
    }

    .registro-header-logo-desktop {
        display: none !important;
    }

    .registro-header-logo-mobile {
        display: block !important;
    }

    .registro-header-title,
    .registro-header-context {
        width: min(100%, 420px);
    }

    .registro-header-title h2 {
        font-size: 1.55rem;
        line-height: 1.15;
    }

    .registro-header-title p,
    .registro-header-context span {
        margin-top: 0.4rem;
        font-size: 0.96rem;
        line-height: 1.35;
    }

    .registro-header-context {
        padding-top: 0.25rem;
    }

    .registro-header-context strong {
        font-size: 0.95rem;
    }

    .registro-plane,
    .registro-globe,
    .registro-extranjero-page form::before,
    .registro-extranjero-page form::after,
    .registro-page-header::before,
    .registro-page-header::after {
        display: none;
    }

    .registro-card-body {
        padding: 1.15rem;
    }

    .registro-hero h1 {
        font-size: 1.65rem;
    }

    .registro-stepper {
        display: none;
    }

    .registro-stepper-mobile {
        display: grid;
        gap: 0.45rem;
        padding: 0.9rem;
        background: #f8fafc;
        border: 1px solid var(--registro-border);
        border-radius: 18px;
    }

    .registro-stepper-mobile span {
        color: var(--registro-primary-dark);
        font-size: 0.82rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .registro-stepper-mobile strong {
        color: var(--registro-ink);
        font-size: 1.05rem;
    }

    .registro-step-dots {
        display: flex;
        gap: 0.4rem;
    }

    .registro-step-dots span {
        width: 0.65rem;
        height: 0.65rem;
        background: #cbd5e1;
        border-radius: 50%;
    }

    .registro-step-dots span.active,
    .registro-step-dots span.complete {
        background: var(--registro-primary);
    }

    .registro-step-panel {
        min-height: 500px;
    }

    .registro-step-title {
        gap: 0.75rem;
    }

    .registro-step-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .registro-step-title h3 {
        font-size: 1.2rem;
    }

    .registro-grid {
        grid-template-columns: 1fr;
    }

    .registro-choice-group .btn-group {
        width: 100%;
    }

    .registro-choice-group .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .registro-step-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .registro-step-actions .btn,
    .registro-submit-slot input {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .registro-card-body {
        padding: 1rem;
    }

    .registro-btn-primary,
    .registro-btn-secondary {
        min-height: 44px;
        padding-inline: 1rem;
    }
}

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