:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

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

body,
button,
input {
    font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Aptos Display", "Aptos", "Inter", "Noto Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
}

.auth-login-body {
    margin: 0;
    min-height: 100svh;
    overflow-x: hidden;
    background: #fafbff;
    color: #121a2f;
}

.login-shell {
    --pointer-x: 42%;
    --pointer-y: 48%;
    --parallax-x: 0px;
    --parallax-y: 0px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: 100svh;
    overflow: hidden;
    background: #fafbff;
    isolation: isolate;
}

.login-hero,
.login-panel {
    position: relative;
}

.login-hero {
    display: flex;
    align-items: flex-end;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(36px, 5vw, 72px);
    background: #081228;
    color: #ffffff;
}

.login-hero__media,
.login-hero__image,
.login-hero__scrim,
.login-hero__glow {
    position: absolute;
    inset: 0;
}

.login-hero__media {
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: translate3d(calc(var(--parallax-x) * -0.45), calc(var(--parallax-y) * -0.28), 0) scale(1.035);
    transition: transform 260ms ease-out;
}

.login-hero__scrim {
    background:
        linear-gradient(90deg, rgba(4, 10, 28, 0.78) 0%, rgba(7, 14, 38, 0.38) 50%, rgba(7, 14, 38, 0.18) 100%),
        linear-gradient(180deg, rgba(4, 10, 28, 0.22) 0%, rgba(4, 10, 28, 0.08) 36%, rgba(4, 10, 28, 0.82) 100%);
}

.login-hero__glow {
    left: var(--pointer-x);
    top: var(--pointer-y);
    width: 44rem;
    height: 44rem;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(91, 124, 255, 0.28), rgba(122, 92, 255, 0.11) 36%, transparent 68%);
    filter: blur(32px);
    opacity: 0.72;
    transform: translate(-50%, -50%);
    transition: left 220ms ease-out, top 220ms ease-out, opacity 220ms ease;
}

.login-hero::after {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 1;
    width: 28%;
    background: linear-gradient(90deg, transparent, rgba(250, 251, 255, 0.08));
    content: "";
    pointer-events: none;
}

.login-hero__content {
    position: relative;
    z-index: 2;
    width: min(100%, 680px);
}

.login-hero__eyebrow {
    margin: 0 0 18px;
    color: #b8c7ff;
    font-size: 0.84rem;
    font-weight: 850;
    line-height: 1.25;
}

.login-hero h1 {
    max-width: 650px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.65rem, 5vw, 4.75rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.98;
}

.login-hero__summary {
    max-width: 560px;
    margin: 22px 0 0;
    color: rgba(234, 240, 255, 0.86);
    font-size: clamp(1.02rem, 1.45vw, 1.18rem);
    font-weight: 560;
    line-height: 1.65;
}

.login-hero__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 660px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.login-hero__highlights li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid rgba(215, 226, 255, 0.2);
    border-radius: 999px;
    background: rgba(7, 14, 38, 0.42);
    color: rgba(245, 248, 255, 0.92);
    font-size: 0.86rem;
    font-weight: 780;
    line-height: 1.2;
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.login-hero__highlights span {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #76dcff;
    box-shadow: 0 0 16px rgba(118, 220, 255, 0.68);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: clamp(38px, 5vw, 76px) clamp(36px, 5vw, 86px);
    background:
        linear-gradient(135deg, rgba(91, 124, 255, 0.08) 0%, rgba(250, 251, 255, 0) 34%),
        linear-gradient(180deg, #fbfcff 0%, #f3f6fc 100%);
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 462px);
    color: #121a2f;
    animation: card-enter 440ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-card--recovery {
    width: min(100%, 452px);
}

.login-card__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 50px;
    color: #121a2f;
}

.login-card__brand-mark {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-card__brand-mark img {
    position: absolute;
    left: -105px;
    top: -131px;
    width: 528px;
    max-width: none;
    height: auto;
}

.login-card__brand-copy {
    display: grid;
    gap: 2px;
}

.login-card__brand-copy strong {
    color: #121a2f;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.05;
}

.login-card__header {
    margin-bottom: 30px;
}

.login-card__eyebrow {
    margin: 0 0 10px;
    color: #5b7cff;
    font-size: 0.79rem;
    font-weight: 880;
    line-height: 1.2;
}

.login-card__header h2 {
    margin: 0;
    color: #121a2f;
    font-size: clamp(2.05rem, 3vw, 2.55rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.04;
}

.login-card__header p {
    margin: 12px 0 0;
    color: #66728b;
    font-size: 1rem;
    font-weight: 560;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field {
    display: grid;
    gap: 9px;
}

.login-field label {
    color: #26324a;
    font-size: 0.9rem;
    font-weight: 830;
    line-height: 1.2;
}

.login-field__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 62px;
}

.login-field__control input {
    width: 100%;
    min-height: 62px;
    padding: 0 58px 0 52px;
    border: 1px solid #dbe2ef;
    border-radius: 15px;
    outline: none;
    background: #ffffff;
    color: #121a2f;
    font: inherit;
    font-size: 1rem;
    font-weight: 650;
    box-shadow:
        0 12px 30px rgba(30, 41, 59, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease, transform 170ms ease;
}

.login-field__control input::placeholder {
    color: #9aa5b8;
    font-weight: 620;
}

.login-field__control input:hover {
    border-color: #bfcbff;
}

.login-field__control input:focus {
    border-color: #6e6bff;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(91, 124, 255, 0.14),
        0 16px 34px rgba(30, 41, 59, 0.07);
}

.login-field__control input[aria-invalid="true"] {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.13);
}

.login-field__icon {
    position: absolute;
    left: 18px;
    z-index: 1;
    display: inline-flex;
    color: #6f7d94;
}

.login-field__icon svg,
.password-toggle svg,
.login-submit svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.password-toggle {
    position: absolute;
    right: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #6f7d94;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.password-toggle:hover {
    background: rgba(91, 124, 255, 0.1);
    color: #4e5fff;
}

.password-toggle:active {
    transform: scale(0.96);
}

.password-toggle__icon--hide,
.password-toggle.is-visible .password-toggle__icon--show {
    display: none;
}

.password-toggle.is-visible .password-toggle__icon--hide {
    display: block;
}

.login-form__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 4px;
    color: #66728b;
    font-size: 0.92rem;
    font-weight: 760;
}

.login-form__meta a,
.login-card__sales a {
    color: #4e5fff;
    font-weight: 880;
    text-decoration: none;
    transition: color 160ms ease, opacity 160ms ease;
}

.login-form__meta a:hover,
.login-card__sales a:hover {
    color: #3724c7;
}

.remember-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.remember-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.remember-control__box {
    position: relative;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1px solid #ccd6e7;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.remember-control__box::after {
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    content: "";
    opacity: 0;
    transform: rotate(45deg) scale(0.7);
    transition: opacity 140ms ease, transform 140ms ease;
}

.remember-control input:checked + .remember-control__box {
    border-color: #5b7cff;
    background: linear-gradient(135deg, #5b7cff 0%, #7a5cff 100%);
    box-shadow: 0 10px 24px rgba(91, 124, 255, 0.28);
}

.remember-control input:checked + .remember-control__box::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.login-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 62px;
    margin-top: 4px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #315efb 0%, #6e6bff 48%, #7a5cff 100%);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(78, 95, 255, 0.29);
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.login-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 50px rgba(78, 95, 255, 0.36),
        0 0 28px rgba(122, 92, 255, 0.14);
    filter: saturate(1.06);
}

.login-submit:active {
    transform: translateY(0) scale(0.985);
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.88;
    transform: none;
}

.login-submit__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.44);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 760ms linear infinite;
}

.login-submit.is-loading .login-submit__spinner {
    display: inline-block;
}

.login-submit.is-loading .login-submit__arrow {
    display: none;
}

.login-card__sales {
    margin: 9px 0 0;
    color: #66728b;
    font-size: 0.94rem;
    font-weight: 720;
    line-height: 1.45;
    text-align: center;
}

.auth-feedback {
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 740;
    line-height: 1.45;
}

.auth-feedback--success {
    margin: -8px 0 22px;
    padding: 13px 15px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.auth-feedback--error {
    margin: 2px 0 0;
    padding: 12px 14px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.whatsapp-float {
    position: fixed;
    right: clamp(18px, 2vw, 30px);
    bottom: clamp(18px, 2vw, 30px);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: linear-gradient(135deg, #25d366 0%, #17b857 100%);
    color: #ffffff;
    box-shadow:
        0 18px 42px rgba(18, 140, 82, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    fill: currentColor;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 48px rgba(18, 140, 82, 0.38),
        0 0 28px rgba(37, 211, 102, 0.2);
    filter: saturate(1.06);
}

.whatsapp-float:active {
    transform: translateY(0) scale(0.97);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.remember-control input:focus-visible + .remember-control__box {
    outline: 3px solid rgba(91, 124, 255, 0.42);
    outline-offset: 3px;
}

@keyframes card-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.96fr);
    }

    .login-panel {
        padding-right: clamp(30px, 4vw, 58px);
        padding-left: clamp(30px, 4vw, 58px);
    }

    .login-hero h1 {
        font-size: clamp(2.35rem, 4.6vw, 4rem);
    }
}

@media (max-width: 940px) {
    .login-shell {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100svh;
        overflow-x: hidden;
        overflow-y: auto;
        background: #071126;
    }

    .login-hero {
        position: absolute;
        inset: 0;
        z-index: 0;
        min-height: 100%;
        padding: 0;
        pointer-events: none;
    }

    .login-hero__image {
        object-position: center center;
        transform: scale(1.04);
    }

    .login-hero__scrim {
        background:
            radial-gradient(circle at 50% 18%, rgba(118, 220, 255, 0.18), transparent 24rem),
            linear-gradient(180deg, rgba(5, 12, 32, 0.52) 0%, rgba(5, 12, 32, 0.42) 38%, rgba(5, 12, 32, 0.78) 100%),
            linear-gradient(90deg, rgba(4, 10, 28, 0.7) 0%, rgba(7, 14, 38, 0.25) 58%, rgba(7, 14, 38, 0.68) 100%);
    }

    .login-hero__glow,
    .login-hero::after {
        display: none;
    }

    .login-hero__content,
    .login-hero__highlights {
        display: none;
    }

    .login-panel {
        position: relative;
        z-index: 2;
        width: 100%;
        min-height: auto;
        padding: clamp(24px, 6vw, 42px) 20px;
        background: transparent;
    }

    .login-card {
        width: min(100%, 460px);
        padding: 32px 26px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: 28px;
        background: rgb(250, 251, 255);
        box-shadow:
            0 28px 70px rgba(3, 8, 24, 0.32),
            inset 0 1px 0 rgba(255, 255, 255, 0.76);
        backdrop-filter: blur(24px) saturate(1.14);
        -webkit-backdrop-filter: blur(24px) saturate(1.14);
    }

    .login-card__brand {
        margin-bottom: 34px;
    }
}

@media (max-width: 520px) {
    .login-hero {
        min-height: 100%;
        padding: 0;
    }

    .login-hero__image {
        object-position: 54% center;
    }

    .login-panel {
        padding: 22px 16px;
    }

    .login-card__brand {
        gap: 14px;
        margin-bottom: 30px;
    }

    .login-card__brand-mark {
        width: 70px;
        height: 70px;
        flex-basis: 70px;
    }

    .login-card__brand-mark img {
        left: -102px;
        top: -127px;
        width: 514px;
    }

    .login-card__header {
        margin-bottom: 26px;
    }

    .login-card__header h2 {
        font-size: clamp(1.9rem, 9vw, 2.18rem);
    }

    .login-card__header p {
        font-size: 0.96rem;
    }

    .login-form__meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .login-field__control,
    .login-field__control input {
        min-height: 58px;
    }

    .login-submit {
        min-height: 58px;
    }

    .whatsapp-float {
        right: 18px;
        bottom: 18px;
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 50%;
    }

    .whatsapp-float span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .login-panel {
        padding-right: 14px;
        padding-left: 14px;
    }

    .login-card__brand-copy strong {
        font-size: 1.64rem;
    }

    .login-field__control input {
        padding-right: 52px;
        padding-left: 48px;
    }
}

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

    .login-hero__image {
        transform: scale(1.02);
    }
}
