/* Tela de login — paleta da Manoel Motos e Carros (mesma do style.css).
   Duas metades no computador (marca à esquerda, formulário à direita);
   no celular fica só o formulário, com a logo em cima. */
:root {
  --red: #d81f1f;
  --red-l: #ef3b3b;
  --gold: #d4a634;
  --blue: #013487;
  --navy: #00153d;
  --panel: #00225e;
  --field: #001a4a;
  --ink: #f5f3ef;
  --slate: #c2c7dd;
  --muted: #8fa2cc;
  --line: rgba(255, 255, 255, .12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

.tela { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) 1fr; }

/* ---------- lado da marca ---------- */
.marca {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  justify-content: space-between; gap: 8px; padding: 36px 56px 44px;
  background:
    radial-gradient(760px 560px at 50% 42%, rgba(19, 64, 160, .55), transparent 70%),
    linear-gradient(180deg, #001a4a 0%, #00112f 100%);
  border-right: 1px solid rgba(255, 255, 255, .07);
}
/* grade fina, quase invisível, que some nas bordas */
.grade { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 100%);
          mask-image: radial-gradient(70% 60% at 50% 45%, #000 30%, transparent 100%); }
.marca > * { position: relative; }
.marca-topo { display: flex; align-items: center; gap: 18px; }
.marca-logo { width: 150px; height: auto; background: #fff; border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .38); display: block; }
.marca-nome strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.marca-nome span { font-size: 13.5px; color: var(--muted); }

/* ---------- cérebro ---------- */
.palco { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.brilho-fundo { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 166, 52, .16), rgba(216, 31, 31, .06) 45%, transparent 70%);
  filter: blur(20px); animation: respira 7s ease-in-out infinite; }
.cerebro { position: relative; width: auto; height: 100%; max-height: 380px; max-width: 100%; object-fit: contain;
  animation: entra-c 1.4s cubic-bezier(.2, .7, .2, 1) both, paira 9s ease-in-out 1.4s infinite;
}
.rede { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes entra-c { from { opacity: 0; transform: scale(.94) translateY(12px); filter: blur(6px); } }
@keyframes paira { 50% { transform: translateY(-10px) scale(1.015); } }
@keyframes respira { 50% { opacity: .6; transform: scale(.9); } }

/* ---------- texto ---------- */
.marca-texto { max-width: 600px; }
.marca h2 { font-size: clamp(26px, 2.5vw, 36px); line-height: 1.15; margin: 0; font-weight: 700;
  letter-spacing: -.02em; }


/* ---------- lado do formulário ---------- */
.lado-form { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px; background: var(--navy); }
.card { width: 100%; max-width: 400px; }
.card .logo { display: none; }
.card h1 { font-size: 28px; margin: 0 0 26px; font-weight: 800; letter-spacing: -.01em; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }

.aviso-teste { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #e9f7ee;
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 18px; }
.aviso-teste svg { color: #4ade80; width: 18px; height: 18px; }
.aviso-teste[hidden] { display: none; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin: 16px 0 7px; }
.campo { position: relative; display: flex; align-items: center; }
.campo > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; transition: color .15s; }
.campo input {
  width: 100%; height: 50px; padding: 0 46px 0 44px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.campo input::placeholder { color: #5d74a6; }
.campo input:hover { border-color: rgba(255, 255, 255, .22); }
.campo input:focus { border-color: var(--red); background: #001f55; box-shadow: 0 0 0 4px rgba(216, 31, 31, .18); }
.campo:focus-within > svg { color: var(--ink); }
/* o preenchimento automático do navegador pinta o campo de amarelo; mantém o azul */
.campo input:-webkit-autofill { -webkit-text-fill-color: var(--ink); caret-color: var(--ink);
  -webkit-box-shadow: 0 0 0 40px var(--field) inset; transition: background-color 9999s; }
.olho { position: absolute; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.olho:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.olho:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.olho.ativo { color: var(--gold); }
.caps { font-size: 12.5px; color: var(--gold); margin-top: 7px; }
.caps[hidden] { display: none; }

.err { color: #ff9a9a; font-size: 13px; margin-top: 14px; min-height: 18px; }
.entrar {
  position: relative; width: 100%; height: 52px; margin-top: 10px; border: 0; border-radius: 11px;
  background: linear-gradient(180deg, var(--red-l), var(--red)); color: #fff; font-weight: 700; font-size: 15.5px;
  letter-spacing: .01em; cursor: pointer; box-shadow: 0 10px 26px rgba(216, 31, 31, .35);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.entrar:hover { filter: brightness(1.06); box-shadow: 0 12px 30px rgba(216, 31, 31, .45); }
.entrar:active { transform: translateY(1px); }
.entrar:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.entrar:disabled { cursor: default; filter: saturate(.7) brightness(.9); }
.entrar.carregando span { visibility: hidden; }
.entrar.carregando::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: gira .7s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }
.ajuda { color: var(--muted); font-size: 12.5px; text-align: center; margin: 20px 0 0; }
.rodape { color: #5d74a6; font-size: 12px; margin-top: 40px; text-align: center; }

.card.tremer { animation: tremer .35s; }
@keyframes tremer { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- celular e tablet ---------- */
@media (max-width: 900px) {
  .tela { grid-template-columns: 1fr; }
  .marca { display: none; }
  .lado-form {
    min-height: 100vh; justify-content: flex-start; padding-top: 48px;
    background:
      radial-gradient(600px 300px at 50% 0%, rgba(1, 52, 135, .8), transparent 70%),
      var(--navy);
  }
  .card { text-align: center; }
  .card .logo { display: block; width: 150px; margin: 0 auto 22px; background: #fff; border-radius: 16px;
    padding: 10px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
  .card label { text-align: left; }
  .aviso-teste { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* no computador, o lado da marca cabe sempre na altura da tela: o cérebro encolhe */
@media (min-width: 901px) {
  .tela { height: 100vh; min-height: 600px; }
  .marca { min-height: 0; }
  .palco { flex: 1 1 0; }
  .cerebro { height: 100%; max-height: 420px; }
}
