:root {
    --page-bg: #03101b;
    --card-bg: rgba(8, 27, 46, 0.88);
    --card-border: rgba(133, 172, 207, 0.23);
    --input-bg: rgba(3, 15, 26, 0.74);
    --input-border: rgba(132, 167, 199, 0.22);
    --input-focus: rgba(83, 112, 255, 0.68);
    --text-main: #eef7ff;
    --text-soft: #c3d4e2;
    --text-muted: #879cae;
    --primary: #3159ef;
    --primary-light: #6c84ff;
    --danger: #ff8795;
    --font-family:
        "Inter",
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    background: var(--page-bg);
    font-family: var(--font-family);
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

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

/* =========================================================
   FULLSCREEN PAGE
========================================================= */

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(
            135deg,
            #071522 0%,
            #06121d 56%,
            #04101a 100%
        );
}

.login-background {
    position: fixed;
    inset: 0;
    z-index: -5;

    background-image:
        url("/assets/login/hero-artwork.jpg");

    background-repeat: no-repeat;
    background-size: cover;
    background-position: 42% center;

    transform: scale(1.02);
    transform-origin: center center;

    filter:
        saturate(1.05)
        contrast(1.03)
        brightness(1.01);
}

.login-background-overlay {
    position: fixed;
    inset: 0;
    z-index: -4;
    pointer-events: none;

    background:
        radial-gradient(
            circle at 23% 15%,
            rgba(232, 210, 158, 0.26),
            transparent 28%
        ),
        linear-gradient(
            90deg,
            rgba(3, 10, 17, 0.03) 0%,
            rgba(3, 10, 17, 0.02) 43%,
            rgba(3, 11, 19, 0.24) 62%,
            rgba(3, 11, 19, 0.76) 78%,
            rgba(3, 11, 19, 0.97) 100%
        ),
        linear-gradient(
            180deg,
            rgba(3, 10, 17, 0.01) 0%,
            rgba(3, 10, 17, 0.03) 38%,
            rgba(3, 11, 19, 0.18) 56%,
            rgba(3, 11, 19, 0.64) 82%,
            rgba(3, 11, 19, 0.92) 100%
        );
}

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

.login-brand {
    position: fixed;
    left: clamp(28px, 4.7vw, 76px);
    top: clamp(24px, 3.8vw, 52px);
    z-index: 5;

    display: flex;
    align-items: center;
    gap: 13px;
}

.login-brand__mark {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

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

    border-radius: 50%;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.18),
            rgba(255, 255, 255, 0.05)
        );

    box-shadow:
        0 13px 34px rgba(0, 0, 0, 0.31);

    backdrop-filter: blur(16px);

    font-size: 16px;
    font-weight: 900;
}

.login-brand__copy {
    display: grid;
    gap: 3px;
}

.login-brand__copy strong {
    color: #f3f8ff;
    font-size: 14px;
    letter-spacing: -0.015em;
}

.login-brand__copy span {
    color: rgba(222, 235, 247, 0.64);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =========================================================
   LEFT CONTENT
========================================================= */

.login-content {
    position: relative;
    z-index: 2;

    min-height: 100vh;

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

    padding:
        100px
        min(5vw, 82px)
        min(5.5vh, 62px);

    padding-right:
        clamp(460px, 35vw, 580px);
}

.login-copy {
    width: min(760px, 100%);
}

.login-kicker {
    display: inline-flex;

    color: #c2d2e0;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.17em;
    line-height: 1.45;
    text-transform: uppercase;

    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.38);
}

.login-copy h1 {
    max-width: 760px;

    margin:
        15px
        0
        18px;

    color: #f4f8fc;

    font-size:
        clamp(42px, 4.1vw, 68px);

    font-weight: 900;
    letter-spacing: -0.058em;
    line-height: 1.03;

    text-wrap: balance;

    text-shadow:
        0 6px 32px rgba(0, 0, 0, 0.54);
}

.login-description {
    max-width: 700px;
    margin: 0;

    color:
        rgba(218, 231, 242, 0.78);

    font-size:
        clamp(13px, 1.05vw, 16px);

    line-height: 1.72;

    text-shadow:
        0 3px 16px rgba(0, 0, 0, 0.42);
}

.login-metrics {
    max-width: 730px;

    margin-top: 32px;

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

    gap: 13px;
}

.login-metric {
    min-height: 82px;

    padding:
        18px
        20px;

    border:
        1px solid rgba(143, 179, 211, 0.18);

    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(7, 25, 41, 0.66),
            rgba(6, 19, 32, 0.46)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 14px 34px rgba(0, 0, 0, 0.12);

    backdrop-filter: blur(18px);
}

.login-metric strong {
    display: block;

    margin-bottom: 5px;

    color: #f2f8fe;

    font-size: 15px;
    font-weight: 800;
}

.login-metric span {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.45;
}

/* =========================================================
   FLOATING LOGIN PANEL
========================================================= */

.login-panel {
    position: fixed;
    z-index: 4;

    top: 50%;
    right: clamp(32px, 4vw, 74px);

    width: min(440px, calc(100vw - 40px));

    transform:
        translateY(-50%);
}

.login-panel__glow {
    position: absolute;

    right: -110px;
    top: -130px;

    width: 380px;
    height: 380px;

    border-radius: 50%;

    background:
        rgba(56, 94, 255, 0.12);

    filter:
        blur(110px);

    pointer-events: none;
}

.login-card {
    position: relative;

    width: 100%;

    margin: 0;

    padding:
        46px
        40px
        35px;

    border:
        1px solid var(--card-border);

    border-radius: 24px;

    background:
        linear-gradient(
            150deg,
            rgba(10, 31, 50, 0.94),
            rgba(6, 23, 38, 0.92)
        );

    box-shadow:
        0 38px 100px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    backdrop-filter:
        blur(28px);

    isolation: isolate;
}

.login-card::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    border-radius: inherit;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04),
            transparent 38%
        );
}

.login-avatar {
    display: flex;
    justify-content: center;

    margin-top: -100px;
    margin-bottom: 21px;
}

.login-avatar__ring {
    position: relative;

    width: 108px;
    height: 108px;

    padding: 4px;

    overflow: hidden;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #f0ead1,
            #829fff 48%,
            #42cfdf
        );

    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.49);
}

.login-avatar__image {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    display: block;

    border:
        4px solid #0b1a2a;

    border-radius: 50%;

    object-fit: cover;
    object-position: center 20%;

    background: #10243a;
}

.login-avatar__image.is-missing {
    display: none;
}

.login-avatar__fallback {
    position: absolute;
    inset: 4px;
    z-index: 1;

    display: grid;
    place-items: center;

    border:
        4px solid #0b1a2a;

    border-radius: 50%;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #2d4bd2,
            #1a8ba9
        );

    font-size: 30px;
    font-weight: 900;
}

.login-card__heading {
    margin-bottom: 27px;
}

.login-card__heading h2 {
    margin:
        8px
        0
        10px;

    color: #eff7ff;

    font-size:
        clamp(31px, 3vw, 40px);

    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.login-card__heading p {
    margin: 0;

    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.62;
}

.login-field {
    margin-top: 18px;
}

.login-field label {
    display: block;

    margin-bottom: 8px;

    color: #c6d6e4;

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

.login-input {
    position: relative;
}

.login-input__icon {
    position: absolute;

    left: 14px;
    top: 50%;

    width: 18px;
    height: 18px;

    color: #748ba1;

    transform:
        translateY(-50%);

    pointer-events: none;
}

.login-input__icon svg {
    width: 100%;
    height: 100%;
}

.login-input input {
    width: 100%;
    height: 54px;

    padding:
        0
        76px
        0
        44px;

    color: var(--text-main);

    border:
        1px solid var(--input-border);

    border-radius: 12px;

    outline: none;

    background: var(--input-bg);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.018);

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

.login-input input::placeholder {
    color: #5f758a;
}

.login-input input:hover {
    border-color:
        rgba(132, 166, 198, 0.30);
}

.login-input input:focus {
    border-color:
        var(--input-focus);

    background:
        rgba(3, 15, 26, 0.88);

    box-shadow:
        0 0 0 4px rgba(70, 98, 244, 0.09),
        0 11px 25px rgba(0, 0, 0, 0.13);
}

.login-password-toggle {
    position: absolute;

    right: 8px;
    top: 50%;

    min-width: 56px;
    height: 36px;

    padding:
        0
        10px;

    color: #9cb0c3;

    border: 0;
    border-radius: 8px;

    background: transparent;

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

    cursor: pointer;

    transform:
        translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: #ffffff;
    outline: none;

    background:
        rgba(255, 255, 255, 0.05);
}

.login-error {
    min-height: 20px;

    margin-top: 12px;

    color: var(--danger);

    font-size: 11px;
    line-height: 1.45;
}

.login-submit {
    position: relative;

    width: 100%;
    height: 54px;

    margin-top: 3px;

    display: grid;
    place-items: center;

    overflow: hidden;

    color: #ffffff;

    border: 0;
    border-radius: 12px;

    background:
        linear-gradient(
            110deg,
            #264fe4,
            #4d68f7 56%,
            #6782ff
        );

    box-shadow:
        0 14px 32px rgba(47, 78, 224, 0.29);

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;

    cursor: pointer;

    transition:
        transform 150ms ease,
        filter 150ms ease,
        box-shadow 150ms ease;
}

.login-submit::before {
    content: "";

    position: absolute;

    left: -135px;
    top: 0;

    width: 120px;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.23),
            transparent
        );

    transform:
        skewX(-18deg);

    transition:
        left 520ms ease;
}

.login-submit:hover {
    filter: brightness(1.07);

    transform:
        translateY(-1px);

    box-shadow:
        0 18px 38px rgba(47, 78, 224, 0.38);
}

.login-submit:hover::before {
    left:
        calc(100% + 20px);
}

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

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

.login-submit__spinner {
    display: none;

    width: 18px;
    height: 18px;

    border:
        2px solid rgba(255, 255, 255, 0.35);

    border-top-color: #ffffff;
    border-radius: 50%;

    animation:
        login-spin 700ms linear infinite;
}

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

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

.login-security {
    margin:
        17px
        0
        0;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    gap: 8px;

    color: #71879b;

    font-size: 9px;
    line-height: 1.52;
    text-align: center;
}

.login-security svg {
    width: 14px;
    height: 14px;

    flex: 0 0 auto;

    margin-top: 1px;
}

.login-decoration {
    position: fixed;

    right: 5%;
    bottom: 5%;

    z-index: 2;

    color:
        rgba(211, 226, 239, 0.64);

    font-size: 52px;
    line-height: 1;

    transform:
        rotate(12deg);
}

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

/* =========================================================
   LARGE DESKTOP
========================================================= */

@media
(min-width: 1600px) {

    .login-panel {
        right:
            clamp(54px, 6vw, 110px);

        width: 470px;
    }

    .login-content {
        padding-right:
            620px;
    }
}

/* =========================================================
   LANDSCAPE TABLET / SMALL DESKTOP
========================================================= */

@media
(max-width: 1250px) {

    .login-background {
        background-position:
            39% center;
    }

    .login-content {
        padding:
            94px
            40px
            42px;

        padding-right:
            450px;
    }

    .login-copy {
        width: min(650px, 100%);
    }

    .login-copy h1 {
        max-width: 650px;

        font-size:
            clamp(39px, 4.5vw, 56px);
    }

    .login-panel {
        right: 28px;

        width:
            min(410px, calc(100vw - 40px));
    }

    .login-card {
        padding:
            42px
            32px
            32px;
    }
}

/* =========================================================
   PORTRAIT TABLET / MOBILE
========================================================= */

@media
(max-width: 850px) {

    body {
        overflow-y: auto;
    }

    .login-page {
        min-height: 100vh;
        overflow: visible;
    }

    .login-background {
        position: absolute;

        height: 680px;

        background-position:
            38% top;
    }

    .login-background-overlay {
        position: absolute;

        height: 680px;

        background:
            radial-gradient(
                circle at 24% 14%,
                rgba(232, 210, 158, 0.24),
                transparent 28%
            ),
            linear-gradient(
                180deg,
                rgba(3, 10, 17, 0.02) 0%,
                rgba(3, 10, 17, 0.06) 40%,
                rgba(3, 11, 19, 0.48) 66%,
                rgba(3, 11, 19, 0.94) 100%
            );
    }

    .login-brand {
        position: absolute;
    }

    .login-content {
        min-height: 680px;

        align-items: flex-end;

        padding:
            110px
            28px
            42px;
    }

    .login-copy {
        width: 100%;
    }

    .login-copy h1 {
        max-width: 700px;

        font-size:
            clamp(39px, 8vw, 58px);
    }

    .login-metrics {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .login-panel {
        position: relative;

        top: auto;
        right: auto;

        width:
            min(510px, calc(100% - 44px));

        margin:
            0
            auto;

        padding-top: 88px;

        padding-bottom: 74px;

        transform: none;
    }

    .login-decoration {
        display: none;
    }
}

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

@media
(max-width: 560px) {

    .login-background,
    .login-background-overlay {
        height: 620px;
    }

    .login-background {
        background-position:
            36% top;
    }

    .login-brand {
        left: 21px;
        top: 23px;
    }

    .login-brand__copy span {
        display: none;
    }

    .login-content {
        min-height: 620px;

        padding:
            106px
            20px
            28px;
    }

    .login-copy h1 {
        margin-top: 11px;

        font-size:
            clamp(35px, 11vw, 49px);
    }

    .login-description {
        font-size: 13px;
    }

    .login-metrics {
        margin-top: 25px;

        grid-template-columns: 1fr;
    }

    .login-metric {
        min-height: auto;

        padding:
            13px
            15px;
    }

    .login-panel {
        width:
            calc(100% - 30px);

        padding-top: 80px;
        padding-bottom: 54px;
    }

    .login-card {
        padding:
            35px
            20px
            27px;

        border-radius: 20px;
    }

    .login-avatar {
        margin-top: -82px;
    }

    .login-card__heading h2 {
        font-size: 29px;
    }

    .login-input input,
    .login-submit {
        height: 50px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media
(prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
