body {
    display: grid;
    place-content: center;
    min-height: 100vh;

    @media (width >= 460px) {
        padding: 2rem;
    }
}

.auth {
    display: grid;
    grid-template-rows: 16rem auto;   
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    background-color: var(--color-neutral-100);
    border-radius: var(--radius-lg);

    @media (width >= 480px) {
        max-width: 48rem;
        max-height: 80rem;
        min-height: auto;
        
        border: 2px solid var(--color-neutral-400);
        padding: 3.2rem;
        box-shadow: var(--shadow-md);
    }

    @media (orientation: landscape) and (max-height: 500px) {
        grid-template-rows: 1fr;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        max-width: 100%;
        height: 100%;
        max-height: 100vh;
        padding: 0;
        border: none;
        background-color: transparent;
        box-shadow: none;
    }
}

.auth__identity {
    position: relative;
    display: grid;
    place-content: center;
    width: 100%;

    & > h3, 
    & > p {
        display: none;
    }

    @media (orientation: landscape) and (max-height: 500px) {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;

        & > h3, 
        & > p {
            display: block;
        }

        & > h3 {
            font-size: 2rem;
            color: var(--color-neutral-800)
        }

        & > p {
            font-size: 1.2rem;
            text-align: center;
        }
    }
}

.identity__logo {
    position: relative;
    display: grid;
    place-content: center;
    width: 12rem;
    height: 12rem;
    background-color: var(--color-primary);
    border-radius: 100%;

    & > .logo__figure {
        width: 4rem;
        height: 4rem;
        border-radius: 100%;
    }

    & > .logo__figure:first-child {
        position: absolute;
        top: -0.4rem;
        left: -0.4rem;
        background-color: var(--color-secondary-light);
    }

    & > .logo__figure:last-child {
        position: absolute;
        bottom: -0.4rem;
        right: -0.4rem;
        background-color: var(--color-secondary);
    }

    & > i {
        font-size: 4rem;
        color: var(--color-neutral-300);
    }
}

.identity__title {
    display: none;

    @media (orientation: landscape) and (max-height: 500px) {
        display: flex;
        text-align: center;
        font-size: clamp(2.4rem, 2rem + 2vw, 4rem);
    }
}

.auth__identify {
    display: flex;
    flex-direction: column;
}

.identify__header {
    width: 100%;
    margin-bottom: 2rem;
    text-align: center;

    & > h1 {
        font-size: clamp(2.4rem, 2rem + 2vw, 4rem);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    @media (orientation: landscape) and (max-height: 500px) {
        display: none;
    }
}

.identify__body {
    flex-grow: 1;
    width: 100%;

    & > h3,
    & > p {
        text-align: center;
    }

    & > h3 {
        margin-bottom: 0.8rem;
        color: var(--color-neutral-900);
        font-size: clamp(2rem, 1.6rem + 1.2vw, 2.8rem);
    }

    & > p {
        margin-bottom: 2rem;
        color: var(--color-neutral-600);
        font-size: clamp(1.2rem, 1rem + 0.3vw, 1.6rem);
    }

    @media (orientation: landscape) and (max-height: 500px) {
        & > h3,
        & > p {
            display: none;
        }
    }
}

.auth__form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;

    & > .errorlist {
        bottom: 7rem;
        animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
        padding: 1rem 1.5rem;
        background-color: #f8d7da; /* Fondo rojo claro */
        color: #721c24; /* Texto rojo oscuro */
        border: 2px solid #f5c6cb;
        border-radius: var(--radius-md);

        & > li {
            font-size: 1.2rem;
        }
    }
}

.auth__fields {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;

    & > label {
        font-size: clamp(1.2rem, 2vw, 1.6rem);
        font-weight: 600;
        text-align: start;
    }

    & > input {
        width: 100%;
        height: 4rem;
        padding-inline: 1.2rem;
        border: 2px solid var(--color-neutral-400);
        border-radius: var(--radius-md);
        color: var(--color-neutral-600);
        transition: all 0.4s ease-in-out;

        &:focus {
            border-color: var(--color-neutral-800);
        }
    }
}

.auth__button {
    width: 100%;
    height: 4rem;
    margin-block: 2rem 3.2rem;
    background-color: var(--color-primary);
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-weight: 600;
    transition: transform 0.4s ease-in-out, background 0.4s ease-in-out;

    &:hover,
    &:focus {
        background-color: var(--color-primary-dark);
    }

    &:active {
        transform: scale(0.96);
    }
}

.auth__forgot,
.auth__forgot .auth__link {
    font-size: clamp(1rem, 2vw, 1.4rem);
    transition: color 0.3s ease-in-out;
}

.auth__link {
    font-weight: bold;
}

.auth__link:hover {
    color: var(--color-secondary-dark);
}

@keyframes shake {
    10%, 90% {
        transform: translateX(-1px);
    }
    
    20%, 80% {
        transform: translateX(2px);
    }

    30%, 50%, 70% {
        transform: translateX(-4px);
    }

    40%, 60% {
        transform: translateX(4px);
    }
}