:root {
    color-scheme: dark;
    --background: #0b1020;
    --primary: #6685ff;
    --secondary: #9258db;
    --text: #f5f6ff;
    --muted: #b2b9d0;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 10% 12%, #24203e 0, transparent 48%), radial-gradient(ellipse at 90% 90%, #162448 0, transparent 48%), var(--background);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}
.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(70px); z-index: -1; }
.ambient-one { width: 300px; height: 300px; background: #7c355d; opacity: .23; top: 14%; left: calc(50% - 280px); }
.ambient-two { width: 280px; height: 280px; background: #4e75ed; opacity: .32; bottom: 8%; right: calc(50% - 290px); }
.page { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px 22px; }
.brand { color: #edf0ff; text-decoration: none; text-align: center; font-weight: 650; font-size: 13px; letter-spacing: 5px; margin-bottom: 28px; }
.brand span { display: block; font-size: 8px; color: var(--muted); letter-spacing: 3px; margin-top: 7px; font-weight: 400; }
.login-card { width: 100%; max-width: 438px; border: 1px solid #ffffff22; border-radius: 28px; padding: 30px 36px 24px; background: linear-gradient(140deg, #ffffff12, #ffffff06 55%, #7698f51b); box-shadow: 0 24px 80px #00000055, inset 0 1px 0 #ffffff10; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.logo-wrap { display: flex; justify-content: center; margin: 0 auto 23px; }
.logo { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 5px 15px #b5c6ff22); }
.eyebrow { text-align: center; color: #b5c4ff; font-size: 9px; font-weight: 600; letter-spacing: 2.4px; margin: 0 0 11px; }
h1 { text-align: center; font-size: 27px; letter-spacing: -.8px; font-weight: 600; margin: 0 0 12px; }
.subtitle { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.75; margin: 0 0 28px; }
.field { margin-bottom: 19px; }
.field > label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 9px; color: #e3e7f5; }
.input-wrap { display: flex; align-items: center; border: 1px solid #ffffff22; border-radius: 10px; background: #070c1d33; min-height: 50px; padding: 0 14px; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #8aa1ff; box-shadow: 0 0 0 3px #6685ff22; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.input-wrap > svg { color: #a4b0cf; margin-right: 11px; }
.input-wrap input { width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: white; font: inherit; font-size: 13px; padding: 15px 0; }
input::placeholder { color: #929bb4; opacity: 1; }
button { font-family: inherit; cursor: pointer; }
.toggle-password { display: grid; place-items: center; min-width: 36px; min-height: 40px; margin-right: -9px; border: 0; background: transparent; color: #a4b0cf; border-radius: 5px; }
.form-options { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 3px 0 25px; font-size: 11px; }
.remember { display: flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.remember input { accent-color: var(--primary); margin: 0; width: 14px; height: 14px; }
.text-button { color: #bacaff; border: 0; background: transparent; padding: 8px 0; font-size: 11px; }
.text-button:hover { text-decoration: underline; color: white; }
.submit { width: 100%; min-height: 50px; background: linear-gradient(105deg, #7652c4, #5579e2); border: 1px solid #ffffff20; color: white; font-size: 13px; font-weight: 600; border-radius: 10px; box-shadow: 0 8px 25px #2b40a02b; transition: filter .2s, transform .2s; }
.submit span { display: inline-block; margin-left: 17px; font-size: 19px; vertical-align: -1px; }
.submit:hover { filter: brightness(1.15); transform: translateY(-1px); }
button:focus-visible, a:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid #c1ceff; outline-offset: 4px; }
.feedback { color: #e0e6ff; background: #819af51a; border: 1px solid #819af533; border-radius: 8px; font-size: 12px; line-height: 1.6; padding: 12px; margin: 16px 0 0; }
.card-bottom { border-top: 1px solid #ffffff13; margin-top: 26px; padding-top: 20px; color: #aab3cb; font-size: 10px; text-align: center; line-height: 1.7; }
.status-dot { display: inline-block; background: #9baef2; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
footer { font-size: 10px; color: #939eb9; margin-top: 26px; text-align: center; }
footer span { margin: 0 10px; }
@media (max-width: 480px) { .page { padding: 24px 16px; } .login-card { padding: 26px 23px 22px; } h1 { font-size: 25px; } .ambient { max-width: 60vw; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Refinamento visual da entrada */
.submit {
    min-height: 56px;
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 19px;
    font-weight: 350;
    letter-spacing: .4px;
    border-radius: 13px;
}
.submit span { font-size: 23px; font-weight: 300; }

/* Os elementos só desaparecem após o servidor confirmar as credenciais. */
.subtitle, #login-form, footer, .login-card {
    transition: opacity .78s ease, transform .92s cubic-bezier(.22,1,.36,1),
                background .78s ease, border-color .78s ease, box-shadow .78s ease;
}
body.login-animating .subtitle,
body.login-animating #login-form,
body.login-animating footer { opacity: 0; transform: translateY(16px) scale(.97); pointer-events: none; }
body.login-animating .login-card { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.login-logo-flight { object-fit: contain; filter: drop-shadow(0 12px 26px #b5c6ff44); will-change: transform; }
.submit:disabled { cursor: wait; opacity: .85; }
