:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    --ink: #0c2941;
    --muted: #627581;
    --blue: #123d5a;
    --blue-strong: #082d4a;
    --green: #16825d;
    --paper: rgb(251 250 247 / 96%);
    --line: #ccd6dd;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    background: #06233a;
    color: var(--ink);
}

button,
input {
    font: inherit;
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid rgb(22 130 93 / 25%);
    outline-offset: 2px;
}

.login-layout {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    overflow: hidden;
    padding: 20px;
    isolation: isolate;
}

.login-map {
    position: absolute;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 22%, rgb(32 152 196 / 30%), transparent 24%),
        radial-gradient(circle at 82% 75%, rgb(34 153 105 / 24%), transparent 30%),
        linear-gradient(145deg, #041b2d, #0e4b65 56%, #0b3146);
}

.login-map::before,
.login-map::after {
    position: absolute;
    inset: -20%;
    content: "";
    background:
        linear-gradient(40deg, transparent 48%, rgb(255 255 255 / 7%) 49%, transparent 50%),
        linear-gradient(-20deg, transparent 48%, rgb(255 255 255 / 5%) 49%, transparent 50%);
    background-size: 130px 90px, 190px 120px;
    transform: rotate(4deg);
}

.login-map::after {
    inset: 0;
    background: linear-gradient(rgb(2 18 30 / 18%), rgb(2 18 30 / 52%));
    transform: none;
}

.route-line {
    position: absolute;
    z-index: 1;
    width: 8px;
    border-radius: 10px;
    background: #53c7f0;
    box-shadow: 0 0 0 5px rgb(83 199 240 / 14%), 0 0 24px rgb(83 199 240 / 36%);
}

.route-line-one {
    top: -8%;
    left: 34%;
    height: 60%;
    transform: rotate(-21deg);
}

.route-line-two {
    bottom: -10%;
    left: 62%;
    height: 65%;
    transform: rotate(32deg);
}

.route-point {
    position: absolute;
    z-index: 2;
    width: 24px;
    aspect-ratio: 1;
    border: 6px solid #fff;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
}

.route-point-start {
    top: 17%;
    left: calc(22% - 12px);
}

.route-point-end {
    right: calc(20% - 12px);
    bottom: 15%;
    background: #ed8a2f;
}

.login-trip {
    position: absolute;
    z-index: 3;
    right: 24px;
    bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-left: 3px solid #53c7f0;
    background: rgb(5 25 40 / 70%);
    color: #fff;
    padding: 9px 13px;
    font-size: .72rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.login-panel {
    position: relative;
    z-index: 4;
    width: min(380px, 100%);
    border-top: 4px solid var(--green);
    background: var(--paper);
    padding: 25px 26px 23px;
    box-shadow: 0 24px 70px rgb(0 0 0 / 38%);
    backdrop-filter: blur(14px);
}

.login-brand {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-bottom: 22px;
}

.login-logo {
    display: grid;
    width: 42px;
    aspect-ratio: 1;
    place-items: center;
    background: var(--blue);
    color: #fff;
    font-size: 1rem;
}

.login-brand div {
    display: grid;
}

.login-brand strong {
    font-size: 1.05rem;
    letter-spacing: .08em;
}

.login-brand span {
    color: var(--muted);
    font-size: .72rem;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--green);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.login-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.65rem;
    letter-spacing: -.035em;
}

.login-copy > p:last-child {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.48;
}

.login-form {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.login-form label {
    display: grid;
    gap: 6px;
    color: #344c5e;
    font-size: .75rem;
    font-weight: 750;
}

.input-wrap {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 46px;
    align-items: center;
    border: 1px solid var(--line);
    background: #fff;
}

.input-wrap:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgb(22 130 93 / 12%);
}

.input-wrap > i {
    color: #788a96;
    text-align: center;
}

.input-wrap input {
    min-width: 0;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    padding: 0 8px 0 0;
}

.password-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #667986;
    cursor: pointer;
}

.login-submit {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: var(--blue);
    color: #fff;
    padding: 0 17px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.login-submit:hover {
    background: var(--blue-strong);
}

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

.login-submit[disabled] {
    cursor: wait;
    opacity: .65;
}

.login-error {
    border-left: 3px solid #c63e3e;
    background: #fff0f0;
    color: #8a2525;
    padding: 9px 11px;
    font-size: .77rem;
}

.login-security {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 17px;
    color: #60727f;
    font-size: .7rem;
    line-height: 1.4;
}

.login-security i {
    margin-top: 2px;
    color: var(--green);
}

@media (max-width: 520px) {
    .login-layout {
        padding: 14px;
    }

    .login-panel {
        padding: 22px 19px 20px;
    }

    .login-trip {
        right: 14px;
        bottom: 10px;
        left: 14px;
        justify-content: center;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .login-layout {
        padding: 10px;
    }

    .login-panel {
        width: min(700px, 100%);
        display: grid;
        grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.15fr);
        gap: 0 24px;
        padding: 18px 22px;
    }

    .login-brand {
        grid-column: 1;
        margin-bottom: 14px;
    }

    .login-copy {
        grid-column: 1;
    }

    .login-form {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-content: center;
        margin-top: 0;
    }

    .login-security {
        grid-column: 1;
        margin-top: 14px;
    }
}

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