:root {
    --login-accent: #12d9ff;
    --login-text: #f5fbff;
}

* {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 24px;
    overflow-x: hidden;
    color: var(--login-text);
    font-family: Arial, Helvetica, sans-serif;
    background-color: #020c1a;
    background-image: url('../images/login-background.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.login-page::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: '';
    background:
        radial-gradient(circle at 50% 45%, rgba(0, 147, 214, .12), transparent 36%),
        linear-gradient(180deg, rgba(0, 7, 18, .05), rgba(0, 7, 18, .2));
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 38px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(8, 28, 51, .78), rgba(3, 16, 32, .62));
    border: 1px solid rgba(130, 220, 255, .27);
    border-radius: 26px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 0 45px rgba(0, 184, 255, .08);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
}

.login-card::before {
    position: absolute;
    top: 0;
    left: 12%;
    width: 76%;
    height: 1px;
    content: '';
    background: linear-gradient(90deg, transparent, rgba(93, 222, 255, .9), transparent);
}

.brand {
    display: grid;
    width: 100%;
    place-items: center;
    margin-bottom: 30px;
}

.login-logo {
    display: block;
    width: min(100%, 190px);
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .24));
}

.field {
    margin-bottom: 19px;
}

.login-card label {
    display: block;
    margin: 0 0 8px;
    color: #dceef8;
    font-size: 14px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    color: var(--login-text);
    font-size: 15px;
    outline: none;
    background: rgba(1, 14, 30, .46);
    border: 1px solid rgba(154, 207, 235, .26);
    border-radius: 12px;
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, .16);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-card input:hover {
    border-color: rgba(126, 216, 255, .43);
}

.login-card input:focus {
    background: rgba(1, 18, 38, .68);
    border-color: var(--login-accent);
    box-shadow: 0 0 0 4px rgba(18, 217, 255, .13), inset 0 1px 8px rgba(0, 0, 0, .12);
}

.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--login-text);
    box-shadow: 0 0 0 1000px #09213a inset;
    caret-color: var(--login-text);
}

.login-card .alert {
    padding: 12px 14px;
    margin-bottom: 18px;
    color: #ffd9df;
    font-size: 14px;
    background: rgba(145, 19, 48, .38);
    border: 1px solid rgba(255, 128, 151, .34);
    border-radius: 12px;
}

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 3px;
    color: #00101d;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(105deg, #34e4ff, #0ab7ec 58%, #0787d1);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 175, 235, .25), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

.login-button:hover {
    filter: brightness(1.06);
    box-shadow: 0 17px 38px rgba(0, 184, 245, .32), inset 0 1px 0 rgba(255, 255, 255, .5);
    transform: translateY(-1px);
}

.login-button:focus-visible {
    outline: 3px solid rgba(151, 236, 255, .55);
    outline-offset: 3px;
}

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

@media (max-width: 520px) {
    .login-page {
        padding: 18px;
        background-position: 48% center;
    }

    .login-card {
        padding: 28px 24px;
        border-radius: 22px;
    }

    .brand {
        margin-bottom: 26px;
    }

    .login-logo {
        width: min(100%, 165px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-button,
    .login-card input {
        transition: none;
    }
}
