:root {
    --navy: #12223c;
    --blue: #075ec0;
    --blue-dark: #063f86;
    --red: #a91f31;
    --muted: #566782;
    --border: #cbd3de;
    --white: #ffffff;
    --card-shadow: 0 18px 42px rgba(19, 33, 56, 0.22);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f6f9;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    overflow: hidden;
    padding: 34px 20px;
    isolation: isolate;
    background-color: #f4f6f9;
    background-image: url("/img/fondo.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-page::before {
    display: none;
}

.login-page::after {
    display: none;
}

.background-art,
.background-art > div {
    position: absolute;
    pointer-events: none;
}

.background-art {
    display: none;
}

.background-art__red-lines {
    top: -10vh;
    left: 16vw;
    width: 51vw;
    height: 60vh;
    transform: skewX(-42deg);
    border-right: 4px solid rgba(110, 12, 26, 0.5);
    box-shadow: 40px 0 0 rgba(108, 11, 25, 0.2);
}

.background-art__left-world {
    left: 0;
    top: 20%;
    width: min(31vw, 475px);
    height: min(58vw, 600px);
    opacity: 0.92;
    background: url("img/world-left.png") left center / 100% 100% no-repeat;
    -webkit-mask-image: linear-gradient(90deg, #000 0 84%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0 84%, transparent 100%);
}

.background-art__right-world {
    right: 0;
    top: 24%;
    width: min(31vw, 475px);
    height: min(32vw, 480px);
    opacity: 0.82;
    background: url("img/world-right.png") right center / 100% 100% no-repeat;
    -webkit-mask-image: linear-gradient(270deg, #000 0 80%, transparent 100%);
    mask-image: linear-gradient(270deg, #000 0 80%, transparent 100%);
}

.background-art__blue-ribbon {
    right: -5vw;
    bottom: -14vh;
    width: 28vw;
    height: 66vh;
    transform: rotate(38deg);
    border-left: 26px solid rgba(4, 97, 197, 0.88);
    background: linear-gradient(90deg, #06479a, #002f72);
}

.page-brand {
    position: absolute;
    z-index: 0;
    object-fit: contain;
}

.page-brand--gmr {
    top: 6.2vh;
    left: 3.2vw;
    width: min(28vw, 420px);
    height: auto;
}

.page-brand--k2 {
    top: 5.2vh;
    right: 3.2vw;
    width: min(21vw, 310px);
    height: auto;
}

.login-card {
    position: relative;
    z-index: 2;
    width: min(606px, calc(100vw - 40px));
    padding: 58px 64px 37px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.975);
    box-shadow: var(--card-shadow);
}

.login-card__brands {
    display: block;
    width: 100%;
    max-width: 440px;
    height: auto;
    margin: 0 auto 25px;
    object-fit: contain;
}

.login-card__header {
    text-align: center;
}

.login-card__header h1 {
    margin: 0;
    color: #102039;
    font-size: clamp(2rem, 2.55vw, 2.45rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.login-card__header p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.45;
}

.form-message {
    margin: 22px 0 -4px;
    padding: 11px 14px;
    border: 1px solid #b9d4f2;
    border-radius: 8px;
    color: #154d83;
    background: #eef6ff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.form-message--error {
    border-color: #efbec4;
    color: #8f1828;
    background: #fff1f3;
}

.form-message--success {
    border-color: #a7dec0;
    color: #17613a;
    background: #eefbf4;
}

.form-message--warning {
    border-color: #ecd18f;
    color: #76520b;
    background: #fff9e9;
}

.form-message.is-hidden {
    display: none;
}

.login-form {
    margin-top: 35px;
}

.field {
    position: relative;
    margin-bottom: 18px;
}

.field input {
    width: 100%;
    height: 65px;
    padding: 0 58px 0 62px;
    outline: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #172943;
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 44, 68, 0.02);
    font-size: 1.08rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
    color: #65738a;
    opacity: 1;
}

.field input:focus {
    border-color: #3a7bc4;
    box-shadow: 0 0 0 4px rgba(37, 112, 198, 0.13);
}

.phone-composer {
    display: grid;
    grid-template-columns: minmax(180px, 46%) 1fr;
    width: 100%;
    height: 65px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.phone-country-select {
    display: flex;
    min-width: 0;
    align-items: center;
    border-right: 1px solid var(--border);
}

.phone-country-select [data-country-flag] {
    width: 30px;
    height: 22px;
    margin-left: 13px;
    flex: 0 0 auto;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(18, 34, 60, 0.12);
}

.phone-country-select select,
.phone-composer > input[type="tel"] {
    min-width: 0;
    height: 63px;
    outline: 0;
    border: 0;
    color: #172943;
    background: #fff;
    font: inherit;
    font-size: 0.94rem;
}

.phone-country-select select {
    width: 100%;
    padding: 0 8px;
    cursor: pointer;
}

.phone-composer > input[type="tel"] {
    width: 100%;
    padding: 0 17px;
}

.phone-composer:focus-within {
    border-color: #3a7bc4;
    box-shadow: 0 0 0 4px rgba(37, 112, 198, 0.13);
}

.field__icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 21px;
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    transform: translateY(-50%);
    color: #263b57;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #263b57;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: #075dbb;
    background: #edf5ff;
    outline: 0;
}

.password-toggle__hide {
    display: none;
}

.password-toggle.is-visible .password-toggle__show {
    display: none;
}

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

.login-form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 23px 0 32px;
    color: #51627c;
    font-size: 0.94rem;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

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

.remember-option span {
    position: relative;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border: 1.5px solid #30445f;
    border-radius: 4px;
    background: #fff;
}

.remember-option input:focus-visible + span {
    box-shadow: 0 0 0 4px rgba(37, 112, 198, 0.16);
}

.remember-option input:checked + span {
    border-color: #0861bf;
    background: #0861bf;
}

.remember-option input:checked + span::after {
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    content: "";
    transform: rotate(45deg);
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

.login-form__options a {
    color: #075ec0;
    text-decoration: none;
}

.login-form__options a:hover,
.login-form__options a:focus-visible {
    text-decoration: underline;
}

.login-button {
    width: 100%;
    min-height: 61px;
    padding: 13px 24px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(90deg, var(--blue-dark), var(--blue));
    box-shadow: 0 6px 16px rgba(7, 83, 167, 0.18);
    font-size: 1.35rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.login-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 9px 20px rgba(7, 83, 167, 0.24);
    transform: translateY(-1px);
}

.login-button:focus-visible {
    outline: 3px solid rgba(13, 104, 203, 0.34);
    outline-offset: 3px;
}

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

.login-card__footer {
    margin-top: 46px;
    padding-top: 30px;
    border-top: 1px solid #d6dce4;
    text-align: center;
}

.login-card__footer p {
    margin: 0;
    color: #53637b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-card__footer strong {
    color: #a9192b;
    font-weight: 650;
}

.login-card--wide {
    width: min(760px, calc(100vw - 40px));
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.auth-form-grid__full {
    grid-column: 1 / -1;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    color: #718096;
    font-size: 0.92rem;
}

.auth-links a,
.auth-back-link {
    color: var(--blue);
    text-decoration: none;
}

.auth-links a:hover,
.auth-links a:focus-visible,
.auth-back-link:hover,
.auth-back-link:focus-visible {
    text-decoration: underline;
}

.auth-action {
    display: grid;
    gap: 18px;
    margin-top: 30px;
    text-align: center;
}

.button-link {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-height: 900px) and (min-width: 769px) {
    .login-page {
        padding-block: 24px;
    }

    .login-card {
        padding-top: 34px;
        padding-bottom: 27px;
    }

    .login-card__brands {
        max-width: 380px;
        margin-bottom: 14px;
    }

    .login-form {
        margin-top: 25px;
    }

    .login-card__footer {
        margin-top: 32px;
        padding-top: 22px;
    }
}

@media (max-width: 900px) {
    .login-page::before {
        clip-path: polygon(0 0, 82% 0, 12% 100%, 0 100%);
    }

    .page-brand {
        display: none;
    }

    .background-art__left-world {
        width: 48vw;
        height: 62vw;
        opacity: 0.5;
    }

    .background-art__right-world {
        width: 48vw;
        height: 50vw;
        opacity: 0.4;
    }
}

@media (min-width: 901px) and (max-width: 1400px) {
    .page-brand--gmr {
        top: 4.5vh;
        width: min(24vw, 320px);
    }

    .page-brand--k2 {
        top: 4vh;
        width: min(19vw, 260px);
    }
}

@media (max-width: 600px) {
    .phone-composer {
        grid-template-columns: minmax(135px, 44%) 1fr;
    }

    .phone-country-select [data-country-flag] {
        width: 25px;
        height: 18px;
        margin-left: 9px;
    }

    .phone-country-select select,
    .phone-composer > input[type="tel"] {
        font-size: 0.82rem;
    }
    .login-page {
        align-items: center;
        padding: 18px 14px;
    }

    .login-card {
        width: 100%;
        max-width: 460px;
        padding: 30px 24px 25px;
        border-radius: 13px;
    }

    .login-card__brands {
        max-width: 350px;
        margin-bottom: 18px;
    }

    .login-card__header h1 {
        font-size: 2rem;
    }

    .login-card__header p {
        margin-top: 8px;
        font-size: 0.96rem;
    }

    .login-form {
        margin-top: 27px;
    }

    .field input {
        height: 59px;
        padding-left: 56px;
        font-size: 1rem;
    }

    .login-form__options {
        align-items: flex-start;
        margin: 20px 0 27px;
        font-size: 0.89rem;
    }

    .login-button {
        min-height: 57px;
        font-size: 1.18rem;
    }

    .login-card__footer {
        margin-top: 32px;
        padding-top: 23px;
    }

    .auth-form-grid {
        display: block;
    }
}

@media (max-width: 390px) {
    .login-card {
        padding-inline: 18px;
    }

    .login-form__options {
        flex-direction: column;
        gap: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
