/* Tela de login: cartão centralizado sobre a foto de uma central de monitoramento. */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body.lg { min-height: 100vh; min-height: 100dvh; font-family: var(--font-ui); color: var(--text-primary); background: #040a10; -webkit-font-smoothing: antialiased; }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------- fundo: imagem da central de controle VisionIQ (img/login-bg.webp) ---------- */
.lg-bg { position: fixed; inset: 0; overflow: hidden; background: #040a10; }
.lg-photo { position: absolute; inset: 0; background: #040a10 url("/static/img/login-bg.webp") center / cover no-repeat; }
.lg-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 36% 55% at 50% 50%, rgba(3,9,15,.35), rgba(3,9,15,.05) 70%, rgba(2,6,10,.35) 100%); }

/* ---------- centro ---------- */
.lg-center { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 16px; }

.lg-brand { display: flex; align-items: center; justify-content: center; gap: 12px; color: inherit; text-decoration: none; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.lg-mark { display: grid; place-items: center; width: 44px; height: 44px; color: var(--accent-primary); background: linear-gradient(145deg, rgba(46,168,255,.22), rgba(46,168,255,.05)); border: 1px solid rgba(46,168,255,.38); border-radius: 13px; box-shadow: 0 0 24px rgba(46,168,255,.18); }
.lg-mark svg { width: 28px; height: 28px; fill: currentColor; }
.lg-brand-copy { display: grid; line-height: 1.05; }
.lg-brand-copy strong { font-size: 22px; letter-spacing: -.02em; }
.lg-brand-copy em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-strong); }

.lg-card { position: relative; width: min(440px, 100%); padding: 32px 36px 26px; background: rgba(10,19,30,.88); border: 1px solid rgba(88,186,255,.26); border-radius: 20px; backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 90px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06); }
.lg-heading { text-align: center; margin-bottom: 22px; }
.lg-heading h1 { font-size: 28px; letter-spacing: -.025em; }
.lg-heading p { margin-top: 6px; color: var(--text-secondary); font-size: 14px; }

.lg-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 16px; color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.lg-input { position: relative; display: flex; align-items: center; height: 48px; padding: 0 6px 0 42px; background: rgba(9,23,34,.75); border: 1px solid var(--border-soft); border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.lg-input:focus-within { border-color: var(--border-focus); box-shadow: var(--focus-ring); }
.lg-input.invalid { border-color: rgba(255,77,87,.7); box-shadow: 0 0 0 3px rgba(255,77,87,.16); }
.lg-ico { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--text-muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.lg-input input { flex: 1; width: 0; min-width: 0; height: 100%; padding-right: 8px; color: var(--text-primary); background: none; border: 0; outline: 0; font: inherit; font-size: 15px; font-weight: 500; }
.lg-input input:-webkit-autofill { -webkit-text-fill-color: var(--text-primary); -webkit-box-shadow: 0 0 0 40px #0a1824 inset; caret-color: var(--text-primary); }
.lg-eye { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.lg-eye:hover { background: var(--accent-soft); }
.lg-eye:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
.lg-eye svg { width: 19px; height: 19px; fill: none; stroke: var(--text-secondary); stroke-width: 1.8; stroke-linecap: round; }
.lg-eye .eye-closed, .lg-eye[aria-pressed="true"] .eye-open { display: none; }
.lg-eye[aria-pressed="true"] .eye-closed { display: block; }

.lg-alert { display: flex; gap: 10px; margin-top: 16px; padding: 12px 13px; border-radius: 11px; font-size: 12.5px; line-height: 1.45; }
.lg-alert svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke-width: 2; stroke-linecap: round; }
.lg-alert div { display: grid; gap: 2px; }
.lg-alert strong { font-size: 13px; }
.lg-alert span { color: var(--text-secondary); }
.lg-alert-error { background: var(--danger-soft); border: 1px solid rgba(255,77,87,.35); }
.lg-alert-error svg { stroke: #ff8a91; }
.lg-alert-error strong { color: #ffadb2; }
.lg-alert-lock { background: var(--warning-soft); border: 1px solid rgba(255,159,67,.38); }
.lg-alert-lock svg { stroke: #ffb46b; }
.lg-alert-lock strong, .lg-countdown { color: #ffc48a; }
.lg-countdown { margin-top: 4px; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }

.lg-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 22px; color: var(--text-inverse); background: linear-gradient(180deg, #4bb6ff, #1f97f0); border: 0; border-radius: 11px; font: inherit; font-size: 15px; font-weight: 750; cursor: pointer; box-shadow: 0 10px 26px rgba(46,168,255,.28), inset 0 1px 0 rgba(255,255,255,.25); transition: filter .15s, transform .15s; }
.lg-submit:hover:not(:disabled) { filter: brightness(1.08); }
.lg-submit:active:not(:disabled) { transform: translateY(1px); }
.lg-submit:focus-visible { outline: 0; box-shadow: var(--focus-ring), 0 10px 26px rgba(46,168,255,.28); }
.lg-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lg-submit:disabled { color: var(--text-muted); background: var(--bg-elevated); box-shadow: none; cursor: not-allowed; }
.lg-submit.busy { color: var(--text-inverse); background: linear-gradient(180deg, #4bb6ff, #1f97f0); opacity: .75; cursor: progress; }
.lg-submit.busy svg { animation: lg-nudge .8s ease-in-out infinite; }
@keyframes lg-nudge { 50% { transform: translateX(4px); } }

.lg-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; color: var(--text-muted); font-size: 11.5px; text-align: center; }
.lg-note svg { flex: 0 0 13px; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }

.lg-foot { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 12px; text-shadow: 0 1px 8px #000; }
.lg-live { display: flex; align-items: center; gap: 7px; }
.lg-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px rgba(24,210,110,.7); animation: lg-pulse 2s ease-in-out infinite; }
@keyframes lg-pulse { 50% { opacity: .4; } }

@media (max-width: 520px) {
  .lg-center { gap: 18px; padding: 24px 16px; }
  .lg-card { padding: 26px 20px 22px; border-radius: 18px; }
  .lg-heading h1 { font-size: 24px; }
  .lg-sep, .lg-tagline { display: none; }
  .lg-photo { background-position: 24% center; }
  .lg-shade { background: linear-gradient(180deg, rgba(2,6,10,.35), rgba(4,10,16,.45) 40%, rgba(2,6,10,.7)); }
}
@media (max-height: 700px) {
  .lg-center { justify-content: flex-start; padding-top: 16px; }
  .lg-card { padding-top: 22px; }
}
