:root {
    --login-background: #050814;
    --login-card: rgba(255, 255, 255, 0.97);
    --login-text: #111827;
    --login-muted: #8290a7;
    --login-border: #dce3ee;
    --login-primary: #111b37;
    --login-accent: #3f7cff;
}

* {
    box-sizing: border-box;
}

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

body.login-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--login-background);
    color: var(--login-text);
    font-family: "Open Sans", sans-serif;
}

.login-page button,
.login-page input {
    font-family: inherit;
}

.login-layout {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
            radial-gradient(circle at 16% 22%,
            rgba(66, 105, 255, 0.13),
            transparent 28%),
            radial-gradient(circle at 84% 18%,
            rgba(118, 76, 255, 0.12),
            transparent 28%),
            radial-gradient(circle at 74% 82%,
            rgba(39, 111, 255, 0.09),
            transparent 34%),
            linear-gradient(145deg,
            #0a1023 0%,
            #060a16 52%,
            #03050d 100%);
}

.login-layout::before {
    position: absolute;
    inset: -20%;
    content: "";
    pointer-events: none;
    background:
            conic-gradient(from 135deg at 50% 50%,
            transparent 0deg,
            rgba(93, 83, 255, 0.05) 70deg,
            transparent 145deg,
            rgba(44, 119, 255, 0.05) 230deg,
            transparent 310deg);
    filter: blur(55px);
    opacity: 0.85;
    animation: metrifyAurora 22s ease-in-out infinite alternate;
}

.login-layout::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
            linear-gradient(115deg,
            transparent 12%,
            rgba(255, 255, 255, 0.018) 42%,
            transparent 66%);
    opacity: 0.85;
}

.login-orbit {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(107, 123, 255, 0.1);
    border-radius: 999px;
    pointer-events: none;
}

.login-orbit-one {
    top: 8%;
    right: -12%;
    width: 600px;
    height: 600px;
    transform: rotate(-18deg);
}

.login-orbit-two {
    right: 18%;
    bottom: -30%;
    width: 760px;
    height: 760px;
    border-color: rgba(71, 123, 255, 0.08);
    transform: rotate(26deg);
}

.login-orbit-three {
    top: 38%;
    left: 36%;
    width: 420px;
    height: 420px;
    border-color: rgba(126, 86, 255, 0.075);
    transform: rotate(38deg);
}

.login-wave {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -4%;
    width: 62%;
    height: 260px;
    pointer-events: none;
    opacity: 0.8;
    transform: translateY(-50%);
}

.login-wave-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background:
            linear-gradient(90deg,
            transparent 0%,
            rgba(79, 115, 255, 0.08) 10%,
            rgba(89, 100, 255, 0.5) 44%,
            rgba(116, 84, 255, 0.3) 68%,
            transparent 100%);
    filter: drop-shadow(0 0 8px rgba(67, 106, 255, 0.24));
    transform-origin: center;
}

.login-wave-line:nth-child(1) {
    transform: translateY(-50px) rotate(3deg);
    opacity: 0.48;
}

.login-wave-line:nth-child(2) {
    transform: translateY(-16px) rotate(-4deg);
    opacity: 0.75;
}

.login-wave-line:nth-child(3) {
    transform: translateY(22px) rotate(4deg);
    opacity: 0.58;
}

.login-wave-line:nth-child(4) {
    transform: translateY(56px) rotate(-2deg);
    opacity: 0.3;
}

.login-topbar {
    position: absolute;
    top: 28px;
    right: 34px;
    z-index: 10;
}

.login-install {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
            color 180ms ease,
            border-color 180ms ease,
            background-color 180ms ease,
            transform 180ms ease;
}

.login-install:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    transform: translateY(-1px);
}

.login-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(420px, 0.78fr) minmax(520px, 1.22fr);
    min-height: 100vh;
    align-items: center;
    gap: 6vw;
    width: min(1440px, calc(100% - 80px));
    margin: 0 auto;
    padding: 82px 0;
}

.login-card-wrapper {
    position: relative;
    z-index: 4;
    width: 100%;
    max-width: 510px;
}

.login-card-wrapper::before {
    position: absolute;
    inset: 20px -20px -20px 20px;
    z-index: -1;
    content: "";
    border-radius: 28px;
    background:
            linear-gradient(145deg,
            rgba(72, 107, 255, 0.18),
            rgba(124, 77, 255, 0.08));
    filter: blur(36px);
    opacity: 0.78;
}

.login-card {
    position: relative;
    width: 100%;
    padding: 52px 48px 40px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    background: var(--login-card);
    box-shadow:
            0 34px 100px rgba(0, 0, 0, 0.36),
            0 8px 28px rgba(4, 8, 20, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.login-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    content: "";
    background:
            linear-gradient(90deg,
            transparent,
            rgba(76, 119, 255, 0.55),
            rgba(126, 83, 255, 0.42),
            transparent);
}

.client-logo-wrapper {
    display: flex;
    min-height: 64px;
    align-items: center;
    margin-bottom: 34px;
}

.client-logo {
    display: block;
    width: auto;
    max-width: 190px;
    max-height: 64px;
    object-fit: contain;
    object-position: left center;
}

.login-title {
    margin: 0 0 10px;
    color: var(--login-text);
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.06;
}

.login-description {
    margin: 0 0 34px;
    color: var(--login-muted);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.65;
}

.login-field {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    margin-bottom: 9px;
    color: #202a3d;
    font-size: 0.8rem;
    font-weight: 700;
}

.login-input-group {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    transition:
            border-color 180ms ease,
            box-shadow 180ms ease,
            background-color 180ms ease;
}

.login-input-group:focus-within {
    border-color: rgba(65, 116, 255, 0.78);
    background: #ffffff;
    box-shadow:
            0 0 0 4px rgba(65, 116, 255, 0.1),
            0 12px 30px rgba(17, 27, 55, 0.07);
}

.login-input-icon {
    display: flex;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    color: #8b97aa;
    font-size: 1rem;
}

.login-control {
    width: 100%;
    height: 56px;
    padding: 0 12px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172036;
    font-size: 0.94rem;
    font-weight: 500;
    box-shadow: none !important;
}

.login-control::placeholder {
    color: #a5afbf;
    font-weight: 400;
}

.login-password-action {
    display: flex;
    flex: 0 0 54px;
    height: 56px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #8c98ab;
    cursor: pointer;
    transition:
            color 180ms ease,
            background-color 180ms ease;
}

.login-password-action:hover {
    background: #f7f9fc;
    color: var(--login-accent);
}

.login-validation-message {
    display: block;
    margin-top: 7px;
    color: #dc3545;
    font-size: 0.78rem;
    font-weight: 500;
}

.login-submit {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 14px 58px;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background:
            linear-gradient(135deg,
            #162342 0%,
            #0d152c 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow:
            0 14px 30px rgba(13, 22, 48, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.11);
    cursor: pointer;
    transition:
            transform 180ms ease,
            box-shadow 180ms ease,
            opacity 180ms ease;
}

.login-submit::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
            linear-gradient(110deg,
            transparent 15%,
            rgba(255, 255, 255, 0.09) 45%,
            transparent 75%);
    transform: translateX(-120%);
    transition: transform 480ms ease;
}

.login-submit:hover:not(:disabled)::before {
    transform: translateX(120%);
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
            0 18px 36px rgba(13, 22, 48, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-submit:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    box-shadow: none;
}

.login-submit-arrow {
    position: absolute;
    right: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: transform 180ms ease;
}

.login-submit:hover:not(:disabled) .login-submit-arrow {
    transform: translateX(3px);
}

#divMensaje {
    margin-top: 16px;
}

.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 46px;
    color: #9aa5b6;
    font-size: 0.76rem;
    font-weight: 600;
}

.login-security strong {
    color: #41506a;
    font-weight: 700;
}

.login-security-line {
    width: 42px;
    height: 1px;
    background: #e0e5ed;
}

.login-brand-panel {
    position: relative;
    z-index: 3;
    display: flex;
    min-height: 600px;
    align-items: center;
    justify-content: center;
}

.login-brand-panel::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 620px;
    height: 420px;
    content: "";
    border-radius: 50%;
    pointer-events: none;
    background:
            radial-gradient(ellipse,
            rgba(49, 111, 255, 0.22) 0%,
            rgba(89, 72, 255, 0.12) 38%,
            transparent 72%);
    filter: blur(42px);
    transform: translate(-50%, -50%);
}

.login-brand-content {
    position: relative;
    z-index: 4;
    width: min(620px, 88%);
    text-align: left;
}

.login-brand-title {
    max-width: 650px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(3rem, 5vw, 5.8rem);
    font-weight: 600;
    letter-spacing: -0.065em;
    line-height: 0.98;
}

.login-brand-title span {
    color: rgba(255, 255, 255, 0.43);
}

.login-brand-description {
    max-width: 460px;
    margin: 0;
    color: rgba(216, 225, 245, 0.62);
    font-size: 1rem;
    line-height: 1.75;
}

.login-mobile-install {
    display: none;
}

#metrify-notification {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1055;
}

@keyframes metrifyAurora {
    0% {
        transform: translate3d(-2%, -1%, 0) rotate(-2deg);
    }

    100% {
        transform: translate3d(2%, 1%, 0) rotate(2deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-layout::before {
        animation: none;
    }

    .login-wave-line,
    .login-orbit {
        transform: none !important;
    }

    .login-submit,
    .login-submit::before,
    .login-install {
        transition: none;
    }
}

@media (max-width: 1199.98px) {
    .login-content {
        grid-template-columns:
            minmax(400px, 0.88fr) minmax(440px, 1.12fr);
        gap: 4vw;
        width: min(1180px, calc(100% - 56px));
    }

    .login-card {
        padding: 46px 40px 36px;
    }

    .login-brand-title {
        font-size: clamp(2.8rem, 5vw, 4.8rem);
    }
}

@media (max-width: 991.98px) {
    body.login-page {
        background: #f6f8fc;
    }

    .login-layout {
        min-height: 100vh;
        background:
                radial-gradient(circle at 80% 8%,
                rgba(61, 108, 255, 0.09),
                transparent 25%),
                #f6f8fc;
    }

    .login-layout::before,
    .login-layout::after,
    .login-orbit,
    .login-wave,
    .login-brand-panel,
    .login-topbar {
        display: none;
    }

    .login-content {
        display: flex;
        min-height: 100vh;
        width: 100%;
        align-items: center;
        justify-content: center;
        padding: 34px 22px;
    }

    .login-card-wrapper {
        max-width: 500px;
    }

    .login-card-wrapper::before {
        inset: 18px -12px -18px 12px;
        opacity: 0.42;
    }

    .login-mobile-install {
        position: absolute;
        top: 18px;
        right: 18px;
        z-index: 10;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 11px;
        border-radius: 9px;
        color: #536078;
        font-size: 0.78rem;
        font-weight: 600;
        text-decoration: none;
    }

    .login-mobile-install:hover {
        background: rgba(17, 27, 55, 0.05);
        color: #182546;
    }

    .client-logo-wrapper {
        justify-content: center;
    }

    .client-logo {
        object-position: center;
    }
}

@media (max-width: 575.98px) {
    .login-content {
        align-items: flex-start;
        padding: 72px 14px 22px;
    }

    .login-card-wrapper::before {
        display: none;
    }

    .login-card {
        padding: 38px 22px 30px;
        border-radius: 20px;
        box-shadow:
                0 24px 55px rgba(15, 23, 42, 0.13),
                0 4px 16px rgba(15, 23, 42, 0.06);
    }

    .client-logo-wrapper {
        min-height: 58px;
        margin-bottom: 30px;
    }

    .client-logo {
        max-width: 170px;
        max-height: 58px;
    }

    .login-title {
        font-size: 2rem;
    }

    .login-description {
        margin-bottom: 28px;
        font-size: 0.91rem;
    }

    .login-input-group,
    .login-submit {
        min-height: 56px;
    }

    .login-control,
    .login-password-action {
        height: 54px;
    }

    .login-security {
        gap: 8px;
        margin-top: 38px;
        font-size: 0.7rem;
    }

    .login-security-line {
        width: 24px;
    }

    .login-wave-line,
    .login-orbit {
        will-change: transform;
    }
}

.login-powered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 34px;
    opacity: .72;
}

.login-powered-line {
    flex: 1;
    max-width: 56px;
    height: 1px;
    background: rgba(32, 42, 61, .12);
}

.login-powered-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7B879A;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.login-powered-brand img {
    width: 15px;
    height: 15px;
    opacity: .85;
}
