/* ============================================================
   DIGITALIZANDO MX
   REGISTRATION PAGE
============================================================ */

.dmxRegisterPage {
    padding: 24px;
}

.dmxRegisterLayout {
    grid-template-columns:
        minmax(390px, 0.88fr)
        minmax(560px, 1.12fr);
    min-height: min(900px, calc(100vh - 48px));
    max-width: 1380px;
}


/* ============================================================
   REGISTRATION LEFT SIDE
============================================================ */

.dmxRegisterAside {
    padding:
        45px
        clamp(38px, 4.5vw, 62px)
        36px;
}

.dmxRegisterHero {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: min(570px, 100%);
    padding: 38px 0 30px;
}

.dmxRegisterHero h1 {
    max-width: 590px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(41px, 4vw, 63px);
    font-weight: 760;
    line-height: 1.03;
    letter-spacing: -0.055em;
}

.dmxRegisterHero h1 span {
    display: block;
    color: transparent;
    background:
        linear-gradient(
            100deg,
            #a6a8ff 0%,
            #72e5cf 100%
        );
    background-clip: text;
    -webkit-background-clip: text;
}

.dmxRegisterHero h2 {
    max-width: 540px;
    margin: 23px 0 0;
    color: rgba(236, 240, 251, 0.68);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: -0.01em;
}


/* ============================================================
   REGISTRATION BENEFITS
============================================================ */

.dmxRegisterBenefits {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.dmxRegisterBenefit {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: start;
    gap: 15px;
    width: min(485px, 100%);
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 15px;
    transition:
        background 220ms ease,
        border-color 220ms ease,
        transform 220ms ease;
}

.dmxRegisterBenefit:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.07);
    transform: translateX(5px);
}

.dmxRegisterBenefitNumber {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #aeb0ff;
    background:
        linear-gradient(
            145deg,
            rgba(124, 125, 255, 0.18),
            rgba(23, 201, 164, 0.07)
        );
    border: 1px solid rgba(154, 156, 255, 0.19);
    border-radius: 13px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.dmxRegisterBenefit strong {
    display: block;
    margin: 1px 0 4px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 13px;
    font-weight: 700;
}

.dmxRegisterBenefit p {
    margin: 0;
    color: rgba(219, 225, 240, 0.53);
    font-size: 11px;
    line-height: 1.55;
}


/* ============================================================
   EXISTING ACCOUNT
============================================================ */

.dmxExistingAccount {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(485px, 100%);
    margin-top: 27px;
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.dmxExistingAccountIcon {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--dmx-secondary);
    background: rgba(23, 201, 164, 0.1);
    border-radius: 12px;
}

.dmxExistingAccountIcon svg {
    width: 21px;
    height: 21px;
}

.dmxExistingAccount > div:last-child {
    display: grid;
    gap: 4px;
}

.dmxExistingAccount span {
    color: rgba(224, 229, 241, 0.58);
    font-size: 10px;
}

.dmxExistingAccountLink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: #ffffff;
    font-size: 12px;
    font-weight: 720;
    transition: color 220ms ease;
}

.dmxExistingAccountLink:hover {
    color: #9fa2ff;
}

.dmxExistingAccountLink svg {
    width: 15px;
    height: 15px;
    transition: transform 220ms ease;
}

.dmxExistingAccountLink:hover svg {
    transform: translateX(3px);
}


/* ============================================================
   REGISTRATION RIGHT SIDE
============================================================ */

.dmxRegisterContent {
    justify-content: flex-start;
    padding:
        42px
        clamp(42px, 5vw, 75px)
        25px;
    overflow-y: auto;
}

.dmxRegisterPanel {
    width: min(610px, 100%);
    margin: auto;
    animation: dmxPanelEntrance 750ms 150ms ease both;
}


/* ============================================================
   REGISTRATION HEADER
============================================================ */

.dmxRegisterHeader {
    margin-bottom: 28px;
}

.dmxRegisterHeaderTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.dmxRegisterIcon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--dmx-primary);
    background:
        linear-gradient(
            145deg,
            rgba(91, 92, 240, 0.12),
            rgba(91, 92, 240, 0.04)
        );
    border: 1px solid rgba(91, 92, 240, 0.11);
    border-radius: 15px;
}

.dmxRegisterIcon svg {
    width: 25px;
    height: 25px;
}

.dmxRegisterStep {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px 7px 7px;
    color: #737c90;
    background: #f7f8fb;
    border: 1px solid #e8eaf0;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dmxRegisterStep > span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--dmx-primary-dark),
            var(--dmx-primary-light)
        );
    border-radius: 50%;
    font-size: 10px;
    box-shadow:
        0 5px 12px rgba(91, 92, 240, 0.25);
}

.dmxRegisterHeader h3 {
    margin: 0;
    color: var(--dmx-text);
    font-size: clamp(29px, 3vw, 37px);
    font-weight: 760;
    line-height: 1.12;
    letter-spacing: -0.04em;
}


/* ============================================================
   REGISTRATION FORM
============================================================ */

.dmxRegisterForm {
    display: grid;
    gap: 23px;
}

.dmxRegisterFieldset {
    display: grid;
    gap: 17px;
    min-width: 0;
    margin: 0;
    padding: 19px;
    background: #fafbfc;
    border: 1px solid #e7eaf1;
    border-radius: 17px;
    transition:
        border-color 220ms ease,
        box-shadow 220ms ease,
        background 220ms ease;
}

.dmxRegisterFieldset:focus-within {
    background: #ffffff;
    border-color: rgba(91, 92, 240, 0.26);
    box-shadow:
        0 12px 35px rgba(31, 42, 72, 0.055);
}

.dmxRegisterFieldset legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    color: #353e52;
    background: #ffffff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.dmxRegisterFieldset legend span {
    color: var(--dmx-primary);
    font-size: 9px;
}

.dmxRegisterNameGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contenedorInputRegistro {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.contenedorInputRegistro label,
.contenedorInputRegistro b {
    color: #343c4f;
    font-size: 11px;
    font-weight: 720;
    letter-spacing: 0.01em;
}

.contenedorInputRegistro .inptutLogin,
.contenedorInputRegistro .inptutLoginB {
    height: 51px;
    background: #ffffff;
    font-size: 13px;
}

.contenedorInputRegistro .inptutLogin:hover,
.contenedorInputRegistro .inptutLoginB:hover {
    border-color: #c9cfdd;
}

.contenedorInputRegistro .inptutLogin:focus,
.contenedorInputRegistro .inptutLoginB:focus {
    border-color: var(--dmx-primary);
    box-shadow:
        0 0 0 4px rgba(91, 92, 240, 0.08);
}


/* ============================================================
   PASSWORD VALIDATION
============================================================ */

.validaPass {
    padding: 14px 15px;
    background:
        linear-gradient(
            145deg,
            rgba(91, 92, 240, 0.045),
            rgba(23, 201, 164, 0.025)
        );
    border: 1px solid rgba(91, 92, 240, 0.1);
    border-radius: 13px;
}

.dmxPasswordRulesHeader {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.dmxPasswordRulesHeader span {
    color: #777f90;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.validaPass ul {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px 11px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.validaPass li {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    color: #8a92a3;
    font-size: 9px;
    line-height: 1.35;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.validaPass li > span {
    display: grid;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    place-items: center;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 800;
    transition:
        color 180ms ease,
        background 180ms ease;
}


/* Estado incorrecto */

.validaPass li.error {
    color: #a56b74;
}

.validaPass li.error > span {
    color: #d45769;
    background: rgba(229, 72, 95, 0.09);
}


/* Compatibilidad con diferentes nombres usados por el JS */

.validaPass li.correcto,
.validaPass li.correcta,
.validaPass li.success,
.validaPass li.exito,
.validaPass li.valido,
.validaPass li.valid {
    color: #218c74;
    transform: translateX(1px);
}

.validaPass li.correcto > span,
.validaPass li.correcta > span,
.validaPass li.success > span,
.validaPass li.exito > span,
.validaPass li.valido > span,
.validaPass li.valid > span {
    color: transparent;
    background: rgba(23, 184, 144, 0.12);
}

.validaPass li.correcto > span::before,
.validaPass li.correcta > span::before,
.validaPass li.success > span::before,
.validaPass li.exito > span::before,
.validaPass li.valido > span::before,
.validaPass li.valid > span::before {
    content: "✓";
    color: var(--dmx-success);
}


/* Compatibilidad por si el JS reemplaza directamente el texto */

.validaPass li:not(.error) {
    color: #218c74;
}


/* ============================================================
   SUBMIT BUTTON
============================================================ */

.dmxRegisterSubmit {
    min-height: 54px;
    margin-top: 0;
}


/* ============================================================
   TERMS
============================================================ */

.dmxRegisterTerms {
    max-width: 530px;
    margin: -9px auto 0;
    color: #9199a9;
    font-size: 9px;
    line-height: 1.65;
    text-align: center;
}

.dmxRegisterTerms button {
    display: inline;
    margin: 0;
    padding: 0;
    color: var(--dmx-primary);
    background: transparent;
    font-size: inherit;
    font-weight: 650;
    line-height: inherit;
    cursor: pointer;
}

.dmxRegisterTerms button:hover {
    color: var(--dmx-primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* ============================================================
   MOBILE LOGIN LINK
============================================================ */

.dmxRegisterMobileLogin {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 23px;
    color: #858e9f;
    font-size: 11px;
}

.dmxRegisterMobileLogin a {
    color: var(--dmx-primary);
    font-weight: 720;
}

.dmxRegisterMobileLogin a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ============================================================
   ALERT HIGHLIGHT
============================================================ */

.textoAlertaResalta {
    color: var(--dmx-danger);
    font-weight: 750;
    overflow-wrap: anywhere;
}


/* ============================================================
   LARGE SCREENS
============================================================ */

@media (min-width: 1500px) {

    .dmxRegisterPage {
        padding: 34px;
    }

    .dmxRegisterLayout {
        min-height: min(920px, calc(100vh - 68px));
    }

}


/* ============================================================
   LAPTOP
============================================================ */

@media (max-width: 1180px) {

    .dmxRegisterPage {
        padding: 18px;
    }

    .dmxRegisterLayout {
        grid-template-columns:
            minmax(340px, 0.78fr)
            minmax(530px, 1.22fr);
        min-height: calc(100vh - 36px);
    }

    .dmxRegisterAside {
        padding:
            38px
            32px
            30px;
    }

    .dmxRegisterHero h1 {
        font-size: clamp(38px, 4.4vw, 53px);
    }

    .dmxRegisterHero h2 {
        font-size: 14px;
    }

    .dmxRegisterContent {
        padding:
            35px
            39px
            22px;
    }

}


/* ============================================================
   COMPACT LAPTOP HEIGHT
============================================================ */

@media (min-width: 901px) and (max-height: 900px) {

    .dmxRegisterPage {
        padding: 14px;
    }

    .dmxRegisterLayout {
        min-height: calc(100vh - 28px);
    }

    .dmxRegisterAside {
        padding-top: 29px;
        padding-bottom: 25px;
    }

    .dmxRegisterHero {
        padding-top: 22px;
        padding-bottom: 19px;
    }

    .dmxRegisterHero h1 {
        font-size: clamp(37px, 3.7vw, 52px);
    }

    .dmxRegisterHero h2 {
        margin-top: 15px;
        font-size: 13px;
    }

    .dmxRegisterBenefits {
        gap: 4px;
        margin-top: 19px;
    }

    .dmxRegisterBenefit {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .dmxRegisterBenefitNumber {
        width: 37px;
        height: 37px;
    }

    .dmxExistingAccount {
        margin-top: 15px;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .dmxRegisterContent {
        padding-top: 25px;
        padding-bottom: 14px;
    }

    .dmxRegisterHeader {
        margin-bottom: 19px;
    }

    .dmxRegisterHeaderTop {
        margin-bottom: 12px;
    }

    .dmxRegisterIcon {
        width: 42px;
        height: 42px;
    }

    .dmxRegisterHeader h3 {
        font-size: 29px;
    }

    .dmxRegisterForm {
        gap: 15px;
    }

    .dmxRegisterFieldset {
        gap: 12px;
        padding: 14px 16px;
    }

    .contenedorInputRegistro .inptutLogin,
    .contenedorInputRegistro .inptutLoginB {
        height: 46px;
    }

    .validaPass {
        padding: 10px 12px;
    }

    .dmxPasswordRulesHeader {
        margin-bottom: 7px;
    }

    .dmxRegisterSubmit {
        min-height: 49px;
    }

    .dmxRegisterContent .dmxLanguageSelector {
        margin-top: 9px;
    }

    .dmxRegisterContent .contenedorPie {
        margin-top: 13px;
    }

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 900px) {

    .dmxRegisterPage {
        padding: 0;
    }

    .dmxRegisterLayout {
        display: block;
        width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .dmxRegisterAside {
        display: none;
    }

    .dmxRegisterContent {
        min-height: 100vh;
        padding:
            max(31px, env(safe-area-inset-top))
            30px
            max(24px, env(safe-area-inset-bottom));
        overflow: visible;
    }

    .dmxRegisterPanel {
        width: min(610px, 100%);
    }

    .dmxRegisterMobileBrand {
        display: flex;
        margin-bottom: 32px;
    }

    .dmxRegisterMobileLogin {
        display: flex;
    }

    .dmxRegisterContent .contenedorPie {
        width: min(610px, 100%);
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 620px) {

    .dmxRegisterContent {
        padding:
            max(24px, env(safe-area-inset-top))
            19px
            max(21px, env(safe-area-inset-bottom));
    }

    .dmxRegisterMobileBrand {
        margin-bottom: 27px;
    }

    .dmxRegisterMobileBrand img {
        max-width: 180px;
        max-height: 58px;
    }

    .dmxRegisterHeader {
        margin-bottom: 24px;
    }

    .dmxRegisterHeaderTop {
        margin-bottom: 17px;
    }

    .dmxRegisterIcon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .dmxRegisterIcon svg {
        width: 23px;
        height: 23px;
    }

    .dmxRegisterStep {
        font-size: 9px;
    }

    .dmxRegisterHeader h3 {
        font-size: 29px;
    }

    .dmxRegisterNameGrid {
        grid-template-columns: 1fr;
    }

    .dmxRegisterFieldset {
        gap: 15px;
        padding: 16px 14px;
        border-radius: 15px;
    }

    .dmxRegisterForm {
        gap: 19px;
    }

    .validaPass ul {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dmxRegisterTerms {
        padding: 0 5px;
    }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 390px) {

    .dmxRegisterContent {
        padding-right: 15px;
        padding-left: 15px;
    }

    .dmxRegisterHeader h3 {
        font-size: 27px;
    }

    .dmxRegisterStep {
        padding-right: 8px;
    }

    .dmxRegisterStep > span {
        width: 22px;
        height: 22px;
    }

    .validaPass ul {
        grid-template-columns: 1fr;
    }

    .contenedorInputRegistro .inptutLogin,
    .contenedorInputRegistro .inptutLoginB {
        padding-left: 48px;
    }

}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .dmxRegisterPanel,
    .dmxRegisterBenefit,
    .dmxExistingAccountLink svg {
        animation: none;
        transition: none;
    }

}