:root {
    color-scheme: dark;
    font-family: Inter, "VAG Rounded", "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    background: #050506;
    color: #f7f7f6;
}

* { box-sizing: border-box; }

@font-face {
    font-family: "VAG Rounded";
    src: url("/fonts/VAGRoundedBT-Regular.woff") format("woff");
    font-weight: 600 900;
    font-display: swap;
}

@font-face {
    font-family: "VAG Rounded";
    src: url("/fonts/VAGRoundedStd-Thin.woff") format("woff");
    font-weight: 300 500;
    font-display: swap;
}

html { min-height: 100%; }

body {
    min-height: 100svh;
    margin: 0;
    background: #0d0907;
}

.login-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 30vw);
    grid-template-rows: minmax(100vh, auto);
    align-items: stretch;
}

.login-sidebar {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 40px 10px;
    border-left: 1px solid rgba(249, 254, 255, .1);
    background: #242220;
}

.login-brand {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    min-width: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #0d0907;
}

.login-brand img {
    display: block;
    width: auto;
    height: 70vh;
    max-height: 700px;
    max-width: 92%;
    object-fit: contain;
    object-position: center;
}

.login-panel {
    place-self: center;
    width: min(calc(100% - 40px), 380px);
    padding: 26px 24px;
    border: 1.5px solid rgba(249, 254, 255, .18);
    border-radius: 22px;
    background: rgba(249, 254, 255, .10);
    box-shadow: 0 22px 70px rgba(13, 9, 7, .65), 0 1px 0 rgba(249, 254, 255, .06) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.login-panel h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 800; letter-spacing: -.45px; text-transform: uppercase; }
.login-intro { max-width: 310px; margin: 17px auto 20px; color: #bdbab8; text-align: center; font-size: 16px; line-height: 1.45; font-weight: 600; }

.login-field {
    min-height: 58px;
    margin: 12px 0;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #66615e;
    border-radius: 15px;
    background: #3a3837;
    color: #c9c9c8;
    box-shadow: inset 0 1px 2px #0002;
}

.login-field:focus-within { border-color: #b1aaa6; box-shadow: 0 0 0 2px #ffffff12; }
.login-field svg { width: 18px; height: 18px; flex: 0 0 18px; fill: currentColor; }
.login-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 16px; font-weight: 600; }
.login-field input::placeholder { color: #c5c4c3; opacity: 1; }
.login-field input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #3a3837 inset; }
.login-field .password-toggle { width: 28px; height: 32px; min-height: 0; margin: 0; padding: 5px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #c9c9c8; box-shadow: none; }
.login-field .password-toggle svg { width: 19px; height: 19px; }
.login-field .password-toggle:hover { background: transparent; color: #fff; filter: none; }

.login-panel button {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border: 1px solid #b64027;
    border-radius: 15px;
    background: linear-gradient(#ff4c1c, #e63708);
    box-shadow: 0 0 0 6px #46413e, 0 5px 12px #0005;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}

.login-panel button:hover { filter: brightness(1.12); }
.login-panel button:active { transform: translateY(1px); }
.login-panel button:focus-visible, .login-field:focus-within { outline: 2px solid #e83287; outline-offset: 3px; }
.login-divider { height: 1px; margin: 21px 0 14px; background: #514d4a; }
.login-help { margin: 0; color: #bdbab8; text-align: center; font-size: 14px; font-weight: 600; }
.login-footer { margin: 17px 0 0; color: #aaa5a1; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.login-error { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #9f4232; border-radius: 10px; background: #49251f; color: #ffc7ba; font-size: 14px; line-height: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 480px) {
    .login-panel { border-radius: 19px; }
}

@media (max-height: 700px) {
    .login-panel { padding-top: 14px; padding-bottom: 14px; }
}

@media (max-width: 820px) {
    .login-shell {
        min-height: 100svh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(220px, 30vh) auto;
        overflow: visible;
    }

    .login-brand {
        grid-column: 1;
        grid-row: 1;
        min-height: 33vh;
        padding: 12px 0 0;
        align-items: start;
    }

    .login-brand img {
        width: auto;
        height: 27vh;
        max-height: 250px;
        max-width: 90vw;
    }

    .login-sidebar {
        grid-column: 1;
        grid-row: 2;
        min-height: 0;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 22px 10px;
        border-right: 0;
        background: #0d0907;
    }

    .login-panel {
        width: 90vw;
        max-width: 380px;
        padding: 15px 10px;
        margin: 0 auto 28px;
    }

    .login-panel h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: clamp(19px, 4vw, 20px);
        line-height: 1;
    }
}

@media (min-width: 821px) and (max-width: 1100px) {
    .login-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, 38%); }
    .login-panel { width: min(calc(100% - 38px), 380px); }
}

@media (max-width: 820px) and (max-height: 720px) {
    .login-shell { grid-template-rows: minmax(210px, 30vh) auto; }
    .login-brand { min-height: 220px; }
    .login-brand img { height: 27vh; }
}

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