
:root {
    --navy: #0D2B52;
    --navy-light: #174477;
    --bg: #F1F5F9;
    --white: #FFFFFF;
    --text: #172B45;
    --muted: #718096;
    --border: #DCE4EE;
    --danger: #C53030;
    --success: #237A4B;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body.login {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(13, 43, 82, .09),
            transparent 48%
        ),
        var(--bg);
    color: var(--text);
    font-family:
        Inter, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.lg {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 18px 24px;
}

.lg-hero {
    text-align: center;
    margin-bottom: 26px;
}

.lg-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 21px;
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(13, 43, 82, .2);
}

.ic {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

.ic-shield {
    width: 39px;
    height: 39px;
}

.lg-hero h1 {
    margin: 0;
    color: var(--navy);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.8px;
}

.lg-hero p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.lg-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    background: var(--white);
    border: 1px solid rgba(13, 43, 82, .06);
    border-radius: 19px;
    box-shadow: 0 15px 45px rgba(13, 43, 82, .09);
}

.lg-heading {
    margin-bottom: 26px;
}

.lg-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -.5px;
}

.sub {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

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

.til input {
    width: 100%;
    height: 57px;
    padding: 18px 46px 8px 45px;
    outline: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition:
        border-color .2s,
        box-shadow .2s;
}

.til input:hover {
    border-color: #A9B9CD;
}

.til input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(13, 43, 82, .09);
}

.til label {
    position: absolute;
    top: 19px;
    left: 45px;
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
    transform-origin: left center;
    transition:
        top .18s,
        font-size .18s,
        color .18s;
}

.til input:focus ~ label,
.til input:not(:placeholder-shown) ~ label {
    top: 7px;
    font-size: 10px;
    color: var(--navy);
    font-weight: 650;
}

.field-icon {
    position: absolute;
    z-index: 1;
    top: 17px;
    left: 14px;
    width: 20px;
    height: 20px;
    color: #8292A8;
    pointer-events: none;
}

.til:focus-within .field-icon {
    color: var(--navy);
}

.eye {
    position: absolute;
    top: 0;
    right: 3px;
    width: 43px;
    height: 57px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #718096;
    cursor: pointer;
    border-radius: 8px;
}

.eye:hover {
    color: var(--navy);
}

.eye:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: -5px;
}

.eye-closed {
    display: none;
}

.eye.is-visible .eye-open {
    display: none;
}

.eye.is-visible .eye-closed {
    display: inline-block;
}

.chk {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    color: #56677C;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.chk input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--navy);
    cursor: pointer;
}

.lg-msg {
    padding: 11px 13px;
    margin: 0 0 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.lg-msg[hidden] {
    display: none;
}

.lg-msg.err {
    color: var(--danger);
    background: #FFF0F0;
    border: 1px solid #FED7D7;
}

.lg-msg.ok {
    color: var(--success);
    background: #EDFFF4;
    border: 1px solid #B7E4C7;
}

.bar {
    width: 0;
    height: 3px;
    margin: -2px 0 13px;
    border-radius: 5px;
    background: var(--navy);
    opacity: 0;
}

.bar.active {
    width: 100%;
    opacity: 1;
    animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
    0% {
        opacity: .35;
        transform: scaleX(.15);
        transform-origin: left;
    }

    50% {
        opacity: 1;
        transform: scaleX(.7);
        transform-origin: left;
    }

    100% {
        opacity: .35;
        transform: scaleX(.2);
        transform-origin: right;
    }
}

.lg-btn {
    width: 100%;
    min-height: 51px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: var(--white);
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 1px;
    cursor: pointer;
    transition:
        background .2s,
        transform .15s,
        box-shadow .2s;
}

.lg-btn:hover {
    background: var(--navy-light);
    box-shadow: 0 5px 15px rgba(13, 43, 82, .17);
}

.lg-btn:active {
    transform: scale(.985);
}

.lg-btn:focus-visible {
    outline: 3px solid rgba(13, 43, 82, .25);
    outline-offset: 3px;
}

.lg-btn:disabled {
    opacity: .7;
    cursor: wait;
}

.btn-spinner {
    display: none;
    animation: spin .8s linear infinite;
}

.lg-btn.loading .btn-spinner {
    display: inline-block;
}

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

.lg-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 22px 0 0;
    color: #8795A7;
    font-size: 11px;
}

.lg-security .ic {
    width: 15px;
    height: 15px;
}

.lg-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    color: #8290A2;
    font-size: 11px;
    text-align: center;
    overflow-wrap: anywhere;
}

.foot-separator {
    color: #B4BFCC;
}

.lg-foot .secure {
    color: #237A4B;
}

.lg-foot .insecure {
    color: #C05621;
}

@media (max-width: 480px) {
    .lg {
        justify-content: center;
        padding: 28px 16px 20px;
    }

    .lg-hero {
        margin-bottom: 22px;
    }

    .lg-logo {
        width: 60px;
        height: 60px;
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .ic-shield {
        width: 34px;
        height: 34px;
    }

    .lg-hero h1 {
        font-size: 27px;
    }

    .lg-card {
        padding: 25px 21px;
        border-radius: 16px;
    }

    .lg-heading h2 {
        font-size: 23px;
    }
}

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