:root {
  --bg: #07090c;
  --surface: #0e1116;
  --surface-2: #141920;
  --border: #242b34;
  --border-soft: #1a2029;
  --text: #f2f5fa;
  --muted: #8b95a3;
  --muted-2: #606b78;
  --blue: #2f7bff;
  --blue-2: #1f5fd6;
  --blue-soft: rgba(47, 123, 255, 0.12);
  --glow: 47, 123, 255;
  --red: #ff6b6b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
button, input { font: inherit; }
button { color: inherit; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }

/* Painel da marca */
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 32px 44px; background: linear-gradient(160deg, #0b1220 0%, #08101c 55%, #07090c 100%); border-right: 1px solid var(--border-soft); }
.login-brand::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--blue); opacity: .10; filter: blur(110px); left: -140px; top: 18%; pointer-events: none; }
.login-brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 45%, #000 0%, transparent 70%); pointer-events: none; }
.login-brand > * { position: relative; z-index: 1; }

.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 19px; transform: rotate(-3deg); box-shadow: 0 0 28px rgba(var(--glow), .3); }
.brand-top strong { font-size: 13px; letter-spacing: .08em; display: block; }
.brand-top span { display: block; color: var(--muted-2); font-size: 11px; margin-top: 3px; }

.brand-center { margin: auto 0; padding: 40px 0; max-width: 480px; }
.brand-logo { width: 132px; height: 132px; border-radius: 50%; display: block; margin-bottom: 30px; box-shadow: 0 0 0 6px rgba(var(--glow), .10), 0 20px 60px rgba(var(--glow), .22); }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 11px; letter-spacing: .16em; font-weight: 800; }
.brand-center h1 { margin: 0 0 26px; font-size: 38px; line-height: 1.12; font-weight: 900; letter-spacing: -.035em; }
.brand-center h1 span { color: var(--blue); }
.brand-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.brand-list li::before { content: "—"; color: var(--blue); margin-right: 10px; }

.brand-footer { color: var(--muted-2); font-size: 12px; }
.brand-footer b { color: var(--text); }

/* Formulário */
.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; background: linear-gradient(145deg, #0f1319, #0c0f14); border: 1px solid var(--border-soft); border-top: 2px solid var(--blue); border-radius: 14px; padding: 32px 30px 26px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.card-logo { display: none; width: 64px; height: 64px; border-radius: 50%; margin-bottom: 18px; }
.login-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.lead { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.field input { width: 100%; height: 44px; padding: 0 13px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 9px; font-size: 14px; outline: none; transition: .18s ease; }
.field input::placeholder { color: var(--muted-2); }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--glow), .18); }
.field input[aria-invalid="true"] { border-color: var(--red); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px; }
.ghost-toggle { position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ghost-toggle:hover { color: var(--text); background: #1c222b; }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--blue); margin: 0; }
.text-button { border: 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.text-button:hover { text-decoration: underline; }

.error { min-height: 18px; margin: 0 0 8px; color: var(--red); font-size: 12.5px; }
.error.info { color: var(--blue); }

.primary-button { width: 100%; height: 46px; border: 1px solid var(--blue); border-radius: 9px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 24px rgba(var(--glow), .22); transition: .18s ease; }
.primary-button:hover { background: #4a8cff; transform: translateY(-1px); }
.primary-button:disabled { opacity: .7; cursor: progress; transform: none; }
.primary-button:focus-visible, .text-button:focus-visible, .ghost-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.hint { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border-soft); color: var(--muted-2); font-size: 12px; line-height: 1.6; }
.hint b { color: var(--muted); }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 32px 16px; }
  .card-logo { display: block; }
}
@media (max-width: 420px) {
  .login-card { padding: 26px 20px 22px; }
}

[hidden] { display: none !important; }
