:root {
    --background: #fffaf7;
    --surface: #fff7f3;
    --surface-card: #ffffff;

    --text: #17191f;
    --text-soft: #646977;
    --text-light: #9ca3af;

    --border: #ebe5e1;
    --border-focus: #ff5a2e;

    --accent: #ff5a2e;
    --accent-dark: #eb481d;
    --accent-soft: #fff0e9;

    --button-grad: linear-gradient(
        90deg,
        #ff7846 0%,
        #ff552c 100%
    );

    --button-grad-hover: linear-gradient(
        90deg,
        #ff6c38 0%,
        #ef471d 100%
    );

    --error: #c0392b;
    --error-bg: #fdecea;

    --success: #36a875;

    --font-ui: "Inter", sans-serif;
    --font-display: "DM Serif Display", serif;
}


/* =========================================================
   RESET
========================================================= */

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

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: var(--font-ui);
    background: var(--background);
    color: var(--text);

    overflow: hidden;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

ul {
    list-style: none;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.login-page {
    width: 100%;
    height: 100vh;
    height: 100dvh;

    display: grid;

    grid-template-columns:
        minmax(0, 61.5%)
        minmax(420px, 38.5%);

    overflow: hidden;

    background: #fffaf7;
}


/* =========================================================
   LEFT / HERO
========================================================= */

.login-visual {
    position: relative;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    background:
        radial-gradient(
            circle at 46% 50%,
            rgba(255, 231, 216, 0.38),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #fffdfb 0%,
            #fff9f5 52%,
            #fff5ee 100%
        );
}


/* =========================================================
   DECORACIONES
========================================================= */

.visual-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.visual-decoration-top {
    width: min(430px, 42vw);
    aspect-ratio: 1;

    top: -290px;
    right: 3%;

    border-radius: 50%;

    border:
        1px solid
        rgba(255, 90, 46, 0.25);
}

.visual-decoration-bottom {
    width: 245px;
    height: 245px;

    left: -130px;
    bottom: -100px;

    border-radius: 50%;

    background:
        rgba(255, 232, 217, 0.65);
}


/* =========================================================
   LOGO IZQUIERDO
========================================================= */

.visual-brand {
    position: absolute;

    top: clamp(24px, 3.7vh, 42px);
    left: clamp(42px, 4.6vw, 76px);

    z-index: 10;
}

.visual-brand img {
    display: block;

    width: clamp(78px, 6vw, 100px);
    height: auto;
}


/* =========================================================
   TEXTO HERO
========================================================= */

.visual-copy {
    position: absolute;

    z-index: 10;

    top: clamp(112px, 15.5vh, 155px);
    left: clamp(42px, 4.6vw, 76px);

    width: min(430px, 43%);
}

.visual-copy h2 {
    font-family: var(--font-display);

    font-size: clamp(42px, 3.7vw, 65px);

    font-weight: 400;

    line-height: 0.98;

    letter-spacing: -0.025em;

    color: #202228;
}

.visual-copy h2 em {
    color: var(--accent);
    font-style: normal;
}

.visual-line {
    display: block;

    width: 78px;
    height: 2px;

    margin-top: 21px;

    border-radius: 999px;

    background: var(--accent);
}

.visual-copy p {
    width: min(100%, 420px);

    margin-top: 20px;

    color: var(--text-soft);

    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 500;

    line-height: 1.65;
}


/* =========================================================
   MASCOTAS
========================================================= */

.pets-container {
    position: absolute;

    z-index: 3;

    /*
        La imagen vive dentro de este espacio.
        No afecta el tamaño del layout.
    */

    width: clamp(590px, 55vw, 850px);

    right: clamp(-115px, -5vw, -45px);
    bottom: 0;

    display: flex;
    justify-content: flex-end;
    align-items: flex-end;

    pointer-events: none;
}


/*
   El fondo naranja lo dejamos detrás.
   Si tu imagen ya tiene bastante naranja,
   esto puede reducirse todavía más.
*/

.pets-glow {
    position: absolute;

    z-index: -1;

    width: 69%;
    aspect-ratio: 1;

    right: 8%;
    bottom: -11%;

    border-radius:
        46% 54% 51% 49%
        / 43% 44% 56% 57%;

    background:
        linear-gradient(
            145deg,
            #ff985b 0%,
            #ff7a4a 48%,
            #ff5a34 100%
        );

    transform: rotate(-6deg);

    opacity: 0.92;
}


/*
   MUY IMPORTANTE:
   ya no usamos width:100% sin límites,
   porque eso hacía crecer la imagen demasiado.
*/

.visual-bg {
    position: relative;

    display: block;

    width: 100%;
    height: auto;

    max-height: 66vh;

    object-fit: contain;
    object-position: bottom right;

    z-index: 2;
}


/* =========================================================
   BENEFICIOS
========================================================= */

.visual-features {
    position: absolute;

    z-index: 12;

    left: clamp(42px, 4.6vw, 76px);
    bottom: clamp(26px, 4vh, 46px);

    width: min(560px, 57%);

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    padding: 18px 14px;

    border:
        1px solid
        rgba(255, 255, 255, 0.80);

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.92);

    backdrop-filter: blur(14px);

    box-shadow:
        0 18px 45px
        rgba(58, 34, 20, 0.09);
}

.visual-features li {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 7px;

    padding: 0 12px;

    text-align: center;
}

.visual-features li + li::before {
    content: "";

    position: absolute;

    left: 0;
    top: 3px;
    bottom: 3px;

    width: 1px;

    background:
        rgba(255, 90, 46, 0.18);
}

.feature-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        var(--accent-soft);

    color:
        var(--accent);
}

.feature-icon svg {
    width: 19px;
    height: 19px;
}

.feature-content {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 3px;
}

.feature-content strong {
    color: #282b31;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;
}

.feature-content small {
    color: #949aa5;

    font-size: 9.5px;
    font-weight: 500;

    line-height: 1.3;
}


/* =========================================================
   RIGHT SIDE
========================================================= */

.login-content {
    position: relative;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding:
        clamp(28px, 4vh, 50px)
        clamp(34px, 4vw, 60px);

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #fffaf7 0%,
            #fff5ef 100%
        );
}


/* =========================================================
   DECORACION DERECHA
========================================================= */

.login-background-decoration {
    position: absolute;

    pointer-events: none;
}

.login-decoration-one {
    width: 220px;
    height: 220px;

    top: -105px;
    right: -80px;

    border-radius: 50%;

    background:
        rgba(255, 231, 216, 0.68);
}

.login-decoration-two {
    width: 280px;
    height: 280px;

    bottom: -200px;
    left: -130px;

    border:
        1px solid
        rgba(255, 90, 46, 0.13);

    border-radius: 50%;
}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-container {
    position: relative;

    z-index: 3;

    width: 100%;
    max-width: 455px;

    padding:
        clamp(32px, 4vh, 44px)
        clamp(30px, 3vw, 42px);

    border:
        1px solid
        rgba(25, 25, 25, 0.045);

    border-radius: 26px;

    background:
        rgba(255, 255, 255, 0.96);

    box-shadow:
        0 26px 65px
        rgba(61, 36, 22, 0.075);
}


/* =========================================================
   BRAND LOGIN
========================================================= */

.brand {
    display: flex;
    justify-content: center;

    margin-bottom: clamp(24px, 3.2vh, 34px);
}

.brand-circle {
    position: relative;

    width: 105px;
    height: 68px;

    display: grid;
    place-items: center;
}

.brand-circle::before {
    content: "";

    position: absolute;

    width: 105px;
    height: 105px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 238, 230, 0.55),
            transparent 67%
        );
}

.brand-circle::after {
    content: "";

    position: absolute;

    top: -6px;
    right: 4px;

    width: 16px;
    height: 16px;

    border-radius: 50%;

    background:
        rgba(255, 90, 46, 0.12);
}

.brand-logo {
    position: relative;

    display: block;

    width: 91px;
    height: auto;

    z-index: 2;
}


/* =========================================================
   HEADER
========================================================= */

.login-header {
    margin-bottom: clamp(22px, 3vh, 28px);
}

.login-header h1 {
    margin-bottom: 8px;

    color: var(--text);

    font-size: clamp(27px, 2vw, 32px);
    font-weight: 800;

    line-height: 1.15;

    letter-spacing: -0.035em;
}

.login-header p {
    color: var(--text-soft);

    font-size: 14px;
    font-weight: 500;

    line-height: 1.5;
}


/* =========================================================
   ALERT
========================================================= */

.form-alert {
    display: none;

    margin-bottom: 17px;

    padding: 11px 14px;

    border:
        1px solid
        rgba(192, 57, 43, 0.10);

    border-radius: 10px;

    background: var(--error-bg);

    color: var(--error);

    font-size: 12.5px;
    font-weight: 600;

    line-height: 1.45;
}

.form-alert.show {
    display: block;
}


/* =========================================================
   FORM
========================================================= */

.login-form {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.form-field {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.form-field label {
    color: #444955;

    font-size: 12.5px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;

    width: 100%;
    height: 53px;

    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    height: 100%;

    padding:
        0 46px
        0 44px;

    border:
        1.5px solid
        var(--border);

    border-radius: 12px;

    outline: none;

    background:
        #fffdfc;

    color:
        var(--text);

    font-size: 14px;
    font-weight: 500;

    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.input-wrapper input::placeholder {
    color: #a2a7b0;
    font-weight: 400;
}

.input-wrapper input:hover {
    border-color: #ddd4cf;
}

.input-wrapper input:focus {
    border-color:
        rgba(255, 90, 46, 0.75);

    background: #ffffff;

    box-shadow:
        0 0 0 4px
        rgba(255, 90, 46, 0.07);
}

.input-icon {
    position: absolute;

    z-index: 2;

    left: 15px;

    width: 17px;
    height: 17px;

    color: var(--accent);

    pointer-events: none;
}

.password-eye {
    position: absolute;

    z-index: 3;

    right: 10px;

    width: 33px;
    height: 33px;

    display: grid;
    place-items: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #a1a7b2;

    cursor: pointer;
}

.password-eye:hover {
    color: #666c77;

    background: #f8f5f3;
}

.password-eye svg {
    width: 17px;
    height: 17px;
}


/* =========================================================
   BUTTON
========================================================= */

.login-button {
    position: relative;

    width: 100%;
    height: 55px;

    margin-top: 7px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;

    border-radius: 13px;

    background:
        var(--button-grad);

    color: white;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 27px -10px
        rgba(255, 90, 46, 0.56);

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        opacity 160ms ease;
}

.login-button svg {
    position: absolute;

    right: 19px;

    width: 17px;
    height: 17px;

    opacity: 0;

    transform: translateX(-5px);

    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.login-button:hover {
    background:
        var(--button-grad-hover);

    box-shadow:
        0 14px 29px -9px
        rgba(235, 72, 29, 0.54);

    transform: translateY(-1px);
}

.login-button:hover svg {
    opacity: 1;
    transform: translateX(0);
}

.login-button:active {
    transform:
        translateY(0)
        scale(0.995);
}

.login-button:disabled {
    opacity: 0.58;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   SECURITY
========================================================= */

.security-divider {
    width: 100%;
    height: 1px;

    margin:
        clamp(22px, 3vh, 27px)
        0
        18px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #e8e3df 15%,
            #e8e3df 85%,
            transparent
        );
}

.security-note {
    display: flex;

    align-items: center;

    gap: 10px;

    color: #969ca7;

    font-size: 11.5px;
    font-weight: 500;

    line-height: 1.45;
}

.security-icon {
    width: 25px;
    height: 25px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background: #effbf5;

    color: var(--success);
}

.security-icon svg {
    width: 14px;
    height: 14px;
}


/* =========================================================
   LOADING
========================================================= */

.loading-modal {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(26, 22, 20, 0.38);

    backdrop-filter: blur(5px);

    opacity: 0;

    transition: opacity 180ms ease;
}

.loading-modal.show {
    display: flex;
    opacity: 1;
}

.loading-box {
    width: min(100%, 330px);

    padding: 40px 36px 36px;

    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 7px;

    border:
        1px solid
        rgba(30, 30, 30, 0.04);

    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 24px 70px
        rgba(21, 17, 15, 0.20);
}

.loading-ring {
    position: relative;

    width: 57px;
    height: 57px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;
}

.loading-ring-track,
.loading-ring-fill {
    position: absolute;

    inset: 0;

    border:
        3px solid transparent;

    border-radius: 50%;
}

.loading-ring-track {
    border-color: #eee7e3;
}

.loading-ring-fill {
    border-top-color: var(--accent);
    border-right-color: var(--accent);

    animation:
        spin 850ms linear infinite;
}

.loading-icon {
    width: 19px;
    height: 19px;

    color: var(--accent);
}

.loading-text {
    color: var(--text);

    font-size: 17px;
    font-weight: 700;
}

.loading-sub {
    color: var(--text-light);

    font-size: 12.5px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   1366 / NOTEBOOK
========================================================= */

@media (max-width: 1366px) and (min-width: 821px) {

    .login-page {
        grid-template-columns:
            minmax(0, 58%)
            minmax(410px, 42%);
    }

    .visual-copy {
        width: 48%;
    }

    .visual-copy h2 {
        font-size:
            clamp(39px, 4vw, 55px);
    }

    .pets-container {
        width: clamp(540px, 57vw, 730px);

        right: -100px;
    }

    .visual-features {
        width: min(520px, 64%);
    }

    .login-content {
        padding:
            30px 38px;
    }

    .login-container {
        max-width: 430px;
    }
}


/* =========================================================
   TABLET LANDSCAPE
========================================================= */

@media (max-width: 1100px) and (min-width: 821px) {

    .login-page {
        grid-template-columns:
            minmax(0, 48%)
            minmax(400px, 52%);
    }

    .visual-brand {
        left: 30px;
    }

    .visual-copy {
        left: 30px;
        width: calc(100% - 60px);
    }

    .visual-copy h2 {
        font-size: 43px;
    }

    .visual-copy p {
        width: 80%;
    }

    .pets-container {
        width: 620px;

        right: -220px;
    }

    .visual-features {
        left: 24px;

        width: calc(100% - 48px);

        bottom: 24px;

        padding: 15px 8px;
    }

    .visual-features li {
        padding: 0 7px;
    }

    .feature-content strong {
        white-space: normal;
    }

    .feature-content small {
        display: none;
    }

    .login-content {
        padding: 26px 32px;
    }
}


/* =========================================================
   ALTURA REDUCIDA DE DESKTOP

   Este breakpoint es el importante para laptops.
   En vez de dejar crecer el contenido,
   reducimos proporcionalmente todo.
========================================================= */

@media (max-height: 800px) and (min-width: 821px) {

    .visual-brand {
        top: 22px;
    }

    .visual-brand img {
        width: 82px;
    }

    .visual-copy {
        top: 112px;
    }

    .visual-copy h2 {
        font-size:
            clamp(37px, 3.3vw, 52px);
    }

    .visual-line {
        margin-top: 15px;
    }

    .visual-copy p {
        margin-top: 15px;

        font-size: 12px;

        line-height: 1.55;
    }

    .pets-container {
        width: clamp(540px, 53vw, 730px);

        bottom: -5px;
    }

    .visual-bg {
        max-height: 61vh;
    }

    .visual-features {
        bottom: 20px;

        padding:
            13px 10px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
    }

    .feature-icon svg {
        width: 17px;
        height: 17px;
    }

    .feature-content strong {
        font-size: 10px;
    }

    .feature-content small {
        font-size: 8.5px;
    }


    /* LOGIN */

    .login-content {
        padding:
            20px 40px;
    }

    .login-container {
        padding:
            28px 38px;

        border-radius:
            23px;
    }

    .brand {
        margin-bottom: 20px;
    }

    .brand-circle {
        height: 55px;
    }

    .brand-logo {
        width: 80px;
    }

    .login-header {
        margin-bottom: 19px;
    }

    .login-header h1 {
        font-size: 27px;
    }

    .login-header p {
        font-size: 12.5px;
    }

    .login-form {
        gap: 14px;
    }

    .form-field {
        gap: 6px;
    }

    .input-wrapper {
        height: 48px;
    }

    .login-button {
        height: 50px;

        margin-top: 4px;
    }

    .security-divider {
        margin:
            20px 0 15px;
    }

    .security-note {
        font-size: 10.5px;
    }
}


/* =========================================================
   PANTALLAS MUY BAJAS
========================================================= */

@media (max-height: 680px) and (min-width: 821px) {

    .visual-copy {
        top: 94px;
    }

    .visual-copy h2 {
        font-size: 40px;
    }

    .visual-copy p {
        display: none;
    }

    .visual-line {
        display: none;
    }

    .visual-bg {
        max-height: 57vh;
    }

    .visual-features {
        bottom: 15px;
    }

    .login-container {
        padding:
            22px 34px;
    }

    .brand {
        margin-bottom: 14px;
    }

    .login-header {
        margin-bottom: 15px;
    }

    .security-divider {
        margin:
            15px 0 12px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    html,
    body {
        height: auto;
        min-height: 100%;
    }

    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-page {
        display: block;

        height: auto;

        min-height: 100vh;
        min-height: 100dvh;

        overflow: visible;

        background:
            linear-gradient(
                160deg,
                #fffaf7 0%,
                #fff5ef 100%
            );
    }

    .login-visual {
        display: none;
    }

    .login-content {
        width: 100%;

        height: auto;

        min-height: 100vh;
        min-height: 100dvh;

        overflow: hidden;

        padding:
            max(28px, env(safe-area-inset-top))
            22px
            max(28px, env(safe-area-inset-bottom));

        align-items: center;
    }

    .login-container {
        width: 100%;
        max-width: 430px;

        padding: 34px 28px;

        border-radius: 24px;

        box-shadow:
            0 20px 55px
            rgba(60, 34, 20, 0.07);
    }

    .brand {
        margin-bottom: 25px;
    }

    .login-header {
        margin-bottom: 24px;

        text-align: center;
    }

    .login-header h1 {
        font-size: 27px;
    }

    .login-header p {
        font-size: 13.5px;
    }

    .input-wrapper {
        height: 53px;
    }

    .login-button {
        height: 54px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .login-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .login-container {
        padding: 29px 21px;

        border-radius: 21px;
    }

    .brand {
        margin-bottom: 21px;
    }

    .login-header {
        margin-bottom: 22px;
    }

    .login-header h1 {
        font-size: 25px;
    }

    .login-form {
        gap: 16px;
    }

    .form-field label {
        font-size: 12.5px;
    }

    .input-wrapper {
        height: 51px;
    }

    .login-button {
        height: 52px;
    }

    .security-divider {
        margin: 23px 0 17px;
    }
}


/* =========================================================
   AUTOFILL
========================================================= */

.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus {
    -webkit-box-shadow:
        0 0 0 1000px
        #fffdfc
        inset;

    -webkit-text-fill-color: var(--text);

    transition:
        background-color
        9999s
        ease-in-out
        0s;
}