:root {
    --login-white: #fff;
    --login-ink: #18232d;
    --login-teal: #008f82;
    --login-blue: #2368ff;
    --login-red: #ffd4d4;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body.login-page {
    margin: 0;
    color: var(--login-white);
    background: #08131a url('/images/quasar-login-poster.jpg') center / cover no-repeat;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.login-stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(34px, 6.2vh, 72px) clamp(34px, 4.25vw, 82px);
    overflow: hidden;
}

.login-stage::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(7, 19, 25, .91) 0%, rgba(7, 19, 25, .66) 35%, rgba(7, 19, 25, .04) 77%);
}

.login-background-video {
    position: fixed;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #08131a;
    filter: saturate(.82) contrast(1.04) brightness(1.08);
}

.login-content { width: min(100%, 385px); }

.login-header {
    margin-bottom: 28px;
    text-align: center;
}

.login-header img {
    display: block;
    width: 220px;
    height: 66px;
    margin: 0 auto 8px;
    object-fit: contain;
}

.login-header p {
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 1.35vw, 22px);
    font-weight: 800;
    letter-spacing: -.025em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.login-message {
    position: absolute;
    top: clamp(70px, 10.5vh, 98px);
    right: clamp(28px, 1.7vw, 42px);
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(28px, 2.3vw, 42px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -.04em;
    text-align: right;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .62);
}

.login-message strong {
    display: block;
    color: #fff;
    font-weight: 800;
}

.login-form { width: 100%; }

.login-autofill-decoy {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.login-field label {
    color: #edf2f3;
    font-size: 12px;
    font-weight: 700;
}

.login-field input,
.login-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--login-ink);
    background: rgba(255, 255, 255, .96);
    border: 1px solid transparent;
    border-radius: 5px;
    outline: none;
    font-size: 14px;
    font-weight: 500;
}

.login-field input::placeholder { color: #87949b; }

.login-field input:focus,
.login-field select:focus {
    border-color: var(--login-teal);
    box-shadow: 0 0 0 3px rgba(0, 143, 130, .18);
}

.login-field > span,
.validation-summary {
    color: var(--login-red);
    font-size: 12px;
    font-weight: 700;
}

.validation-summary:empty,
.login-field > span:empty { display: none; }

.validation-summary ul {
    margin: 0 0 12px;
    padding: 10px 12px 10px 28px;
    border-radius: 5px;
    background: rgba(145, 24, 38, .54);
}

.password-field { position: relative; }
.password-field input { padding-right: 46px; }

.password-field button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #65727e;
    background: transparent;
    border: 0;
    border-radius: 4px;
}

.password-field button:hover,
.password-field button:focus { color: #17242a; background: #e9eef0; }
.password-field button svg { width: 18px; height: 18px; }

.login-submit {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(135deg, #18b8ff 0%, var(--login-blue) 100%);
    border: 0;
    border-radius: 5px;
    box-shadow: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.login-submit:hover,
.login-submit:focus {
    background: linear-gradient(135deg, #0aa9f0 0%, #174fdb 100%);
    box-shadow: 0 6px 18px rgba(35, 104, 255, .3);
}

.login-submit svg { width: 19px; height: 19px; }

.login-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    color: #dffbf4;
    background: rgba(0, 112, 92, .7);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.login-alert svg { width: 18px; height: 18px; }

.login-footer {
    margin-top: 16px;
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.login-footer a {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .35);
}

.login-footer a:hover,
.login-footer a:focus { color: #fff; border-bottom-color: #fff; }

.login-version {
    display: block;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
    .login-stage {
        align-items: flex-start;
        justify-content: center;
        min-height: 100svh;
        padding: 28px 22px;
        overflow-y: auto;
    }

    .login-stage::before { background: rgba(7, 19, 25, .86); }
    .login-message { display: none; }
    .login-content { width: min(100%, 420px); }
    .login-header { margin-bottom: 20px; }
    .login-header img { height: 60px; }
}

@media (max-height: 720px) and (min-width: 761px) {
    .login-stage { padding-top: 18px; padding-bottom: 18px; }
    .login-header { margin-bottom: 14px; }
    .login-header img { height: 54px; }
    .login-field { margin-bottom: 8px; }
    .login-field input, .login-field select { min-height: 40px; }
    .login-submit { min-height: 44px; margin-top: 6px; }
    .login-footer { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-background-video { display: none; }
}
