:root {
    color-scheme: light;
    --blue-700: #007aff;
    --blue-800: #0067d9;
    --blue-900: #06394d;
    --cyan-100: #d9f3fc;
    --ink-950: #102d3a;
    --ink-700: #3e5863;
    --ink-500: #738891;
    --surface: #ffffff;
    --surface-soft: #f3f8fa;
    --line: #d5e1e6;
    --line-soft: #e5edf0;
    --danger: #b42318;
    --danger-bg: #fff4f2;
    --danger-line: #fecdca;
    --success: #067647;
    --success-bg: #ecfdf3;
    --success-line: #abefc6;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    color: var(--ink-950);
    background: #062f41;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

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

.login-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.login-background,
.login-background img,
.login-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.login-background {
    z-index: -3;
    display: block;
    background: #075777;
}

.login-background img {
    display: block;
    object-fit: cover;
    object-position: center;
}

.login-shade {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(3, 34, 48, .88) 0%, rgba(3, 43, 58, .68) 34%, rgba(3, 40, 55, .16) 66%, rgba(3, 35, 48, .32) 100%),
        linear-gradient(180deg, rgba(4, 37, 51, .16), transparent 52%, rgba(3, 28, 40, .54));
}

.decorative-ring {
    position: absolute;
    z-index: -1;
    width: 430px;
    height: 430px;
    top: -320px;
    right: -105px;
    border: 30px solid rgba(92, 190, 218, .24);
    border-radius: 50%;
    box-shadow: 0 0 0 26px rgba(113, 202, 235, .12);
    pointer-events: none;
}

.decorative-wave {
    position: absolute;
    z-index: -1;
    width: 880px;
    height: 210px;
    left: -185px;
    bottom: -174px;
    border-radius: 50%;
    background: rgba(8, 131, 188, .36);
    box-shadow: 0 -22px 0 rgba(84, 184, 224, .18);
    transform: rotate(7deg);
    pointer-events: none;
}

.site-brand {
    position: absolute;
    z-index: 2;
    top: clamp(28px, 4vw, 56px);
    left: clamp(28px, 4.2vw, 64px);
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.brand-emblem,
.card-emblem {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    overflow: visible;
    border: 0;
    background: transparent;
}

.brand-emblem {
    width: 180px;
    height: 82px;
    border-radius: 0;
    box-shadow: none;
}

.brand-emblem img,
.card-emblem img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 0;
}

.brand-name,
.card-brand-name {
    display: grid;
    gap: 4px;
}

.brand-name strong {
    font-size: 20px;
    font-weight: 780;
    letter-spacing: -.02em;
}

.brand-name span,
.card-brand-name span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.brand-name span {
    color: rgba(255, 255, 255, .8);
}

.login-presentation {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: clamp(32px, 5.1vw, 78px);
    width: min(560px, 44vw);
    color: #fff;
    transform: translateY(-43%);
}

.presentation-kicker {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 18px;
    color: #b7eaff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.presentation-kicker span {
    width: 28px;
    height: 1px;
    background: currentColor;
}

.login-presentation h1 {
    max-width: 540px;
    margin: 0;
    font-size: clamp(42px, 4.2vw, 64px);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -.052em;
    text-shadow: 0 4px 25px rgba(1, 23, 34, .38);
}

.login-presentation h1 em {
    color: #b4eaff;
    font-style: normal;
}

.presentation-description {
    max-width: 460px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, .9);
    font-size: 15px;
    line-height: 1.7;
    text-shadow: 0 2px 16px rgba(1, 23, 34, .4);
}

.service-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: min(620px, 50vw);
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 18px;
    background: rgba(8, 45, 61, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 30px rgba(1, 24, 35, .1);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

.service-icon {
    width: 36px;
    height: 36px;
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    border: 1px solid rgba(179, 235, 255, .35);
    border-radius: 11px;
    color: #b7ecff;
    background: rgba(5, 70, 94, .28);
}

.service-icon svg {
    width: 21px;
    height: 21px;
}

.service-item > span:last-child {
    font-size: 12px;
    font-weight: 680;
    line-height: 1.35;
}

.login-card {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: clamp(84px, 9vw, 150px);
    width: min(470px, calc(100% - 56px));
    max-height: calc(100dvh - 56px);
    display: flex;
    flex-direction: column;
    gap: 21px;
    padding: clamp(32px, 3vw, 42px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(239, 247, 250, .78)),
        rgba(245, 250, 252, .82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .88),
        0 36px 90px rgba(1, 28, 42, .28),
        0 10px 32px rgba(1, 28, 42, .13);
    transform: translate(-3cm, -50%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
    backdrop-filter: blur(34px) saturate(180%);
    scrollbar-width: thin;
}

.card-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    display: none;
}

.card-emblem {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.card-brand-name strong {
    color: var(--ink-950);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.card-brand-name span {
    color: var(--blue-700);
}

.card-heading {
    display: grid;
    gap: 10px;
    text-align: center;
}

.secure-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: var(--blue-700);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.secure-label svg {
    width: 16px;
    height: 16px;
}

.card-heading h2 {
    margin: 0;
    color: var(--ink-950);
    font-size: clamp(32px, 2.8vw, 38px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.card-heading > p:last-child {
    max-width: 340px;
    margin: 0 auto;
    color: var(--ink-500);
    font-size: 13.5px;
    line-height: 1.55;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--danger-line);
    border-radius: 12px;
    color: var(--danger);
    background: var(--danger-bg);
    font-size: 12.5px;
    line-height: 1.45;
    animation: alert-in .22s ease both;
}

.form-alert[hidden] {
    display: none;
}

.form-alert.is-success {
    color: var(--success);
    border-color: var(--success-line);
    background: var(--success-bg);
}

.form-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

@keyframes alert-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

#loginForm {
    display: grid;
    gap: 17px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 750;
}

.control-shell {
    position: relative;
}

.control-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 17px;
    width: 20px;
    height: 20px;
    color: #8299a3;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color .18s ease;
}

.control-shell input {
    width: 100%;
    height: 56px;
    padding: 0 50px;
    border: 1px solid rgba(112, 139, 151, .28);
    border-radius: 17px;
    outline: 0;
    color: var(--ink-950);
    background: rgba(255, 255, 255, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(22, 55, 69, .04);
    font-size: 14.5px;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.control-shell input::placeholder {
    color: #95a8b0;
}

.control-shell input:hover {
    border-color: rgba(72, 109, 125, .42);
    background: rgba(255, 255, 255, .76);
}

.control-shell:focus-within .control-icon {
    color: var(--blue-700);
}

.control-shell input:focus {
    border-color: var(--blue-700);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, .14), inset 0 1px 0 #fff;
}

.control-shell input[aria-invalid="true"] {
    border-color: var(--danger);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, .08);
}

.control-shell input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink-950);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

.password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 9px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #758d97;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.password-toggle:hover {
    color: var(--blue-700);
    background: rgba(0, 122, 255, .09);
}

.password-toggle:focus-visible,
.login-button:focus-visible {
    outline: 3px solid rgba(0, 122, 255, .3);
    outline-offset: 3px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle [data-eye="open"] {
    display: none;
}

.password-toggle[aria-pressed="true"] [data-eye="open"] {
    display: block;
}

.password-toggle[aria-pressed="true"] [data-eye="closed"] {
    display: none;
}

.field-message,
.caps-message {
    display: block;
    max-height: 0;
    overflow: hidden;
    padding-left: 3px;
    color: var(--danger);
    font-size: 11.5px;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-2px);
    transition: max-height .18s ease, opacity .18s ease, transform .18s ease;
}

.field-message.is-visible,
.caps-message.is-visible {
    max-height: 38px;
    opacity: 1;
    transform: translateY(0);
}

.caps-message {
    color: #946200;
}

.login-button {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 22px 1fr 22px;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    padding: 13px 20px;
    border: 0;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(180deg, #0a84ff, #0076ea);
    box-shadow: 0 12px 28px rgba(0, 122, 255, .25), inset 0 1px 0 rgba(255, 255, 255, .24);
    cursor: pointer;
    font-size: 14px;
    font-weight: 780;
    transition: transform .16s ease, box-shadow .18s ease, filter .18s ease;
}

.login-button:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0, 122, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .3);
}

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

.login-button:disabled {
    cursor: wait;
    opacity: .76;
}

.button-arrow {
    width: 19px;
    height: 19px;
    justify-self: end;
}

.button-spinner {
    width: 18px;
    height: 18px;
    justify-self: start;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
}

.login-button.is-loading .button-spinner {
    opacity: 1;
    animation: spin .72s linear infinite;
}

.login-button.is-loading .button-arrow {
    opacity: 0;
}

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

.support-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 17px;
    color: #5c7681;
    background: rgba(255, 255, 255, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.support-note svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--blue-700);
}

.support-note p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.55;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    color: #7a9099;
    font-size: 10px;
}

.card-footer strong {
    color: var(--ink-700);
}

.screen-footer {
    position: absolute;
    z-index: 1;
    left: clamp(32px, 5.1vw, 78px);
    bottom: clamp(20px, 3vw, 38px);
    width: min(650px, 52vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, .72);
    font-size: 10.5px;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.system-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4cdea5;
    box-shadow: 0 0 0 4px rgba(76, 222, 165, .16);
}

@media (max-width: 1120px) {
    .login-card {
        right: clamp(140px, 12vw, 210px);
        width: min(450px, calc(100% - 80px));
    }

    .login-presentation {
        left: 44px;
        width: 43vw;
    }

    .service-list,
    .screen-footer {
        width: 48vw;
    }
}

@media (max-width: 1000px) {
    .login-page {
        display: grid;
        place-items: center;
        padding: 14px;
        overflow: auto;
    }

    .login-background img {
        object-position: center 58%;
    }

    .login-shade {
        background:
            linear-gradient(180deg, rgba(3, 39, 55, .48), rgba(3, 39, 55, .38) 42%, rgba(2, 30, 43, .7)),
            linear-gradient(90deg, rgba(3, 38, 54, .28), rgba(3, 38, 54, .12));
    }

    .decorative-ring {
        width: 250px;
        height: 250px;
        top: -205px;
        right: -80px;
        border-width: 20px;
        box-shadow: 0 0 0 16px rgba(113, 202, 235, .18);
    }

    .decorative-wave,
    .site-brand,
    .login-presentation,
    .screen-footer {
        display: none;
    }

    .login-card {
        position: relative;
        inset: auto;
        width: min(520px, 100%);
        max-height: calc(100dvh - 28px);
        padding: 30px clamp(25px, 7vw, 40px) 26px;
        border-radius: 32px;
        transform: none;
    }

    .card-brand {
        display: flex;
        justify-content: center;
    }

    .card-heading {
        text-align: center;
    }

    .secure-label {
        justify-content: center;
    }

    .card-heading > p:last-child {
        margin-inline: auto;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }

    .login-card {
        max-height: calc(100dvh - 20px);
        gap: 18px;
        padding: 25px 22px 21px;
        border-radius: 30px;
    }

    .card-emblem {
        width: 120px;
        height: 55px;
    }

    .card-brand-name strong {
        font-size: 15px;
    }

    .card-heading {
        gap: 7px;
    }

    .card-heading h2 {
        font-size: 30px;
    }

    #loginForm {
        gap: 15px;
    }

    .control-shell input,
    .login-button {
        min-height: 54px;
        height: 54px;
    }

    .support-note {
        padding: 11px 12px;
    }

    .card-footer {
        display: grid;
        justify-content: center;
        gap: 4px;
        text-align: center;
    }
}

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

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .login-card {
        background: rgba(249, 252, 253, .97);
    }

    .service-item {
        background: rgba(3, 39, 55, .72);
    }
}

@media (min-width: 901px) and (max-height: 760px) {
    .login-card {
        max-height: calc(100dvh - 36px);
        gap: 15px;
        padding: 25px 34px;
    }

    .card-emblem {
        width: 50px;
        height: 50px;
    }

    .card-heading {
        gap: 6px;
    }

    .card-heading h2 {
        font-size: 33px;
    }

    #loginForm {
        gap: 12px;
    }

    .control-shell input,
    .login-button {
        min-height: 51px;
        height: 51px;
    }

    .support-note {
        padding: 9px 12px;
    }

    .card-footer {
        padding-top: 11px;
    }
}

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