/* ============================================================
   CrediAuto — Login "motor de crédito ao vivo"
   Dark imersivo + formulário refinado + cena animada do motor.
   Fontes: Switzer (display) · Inter (texto) · Kode Mono (dados).
   ============================================================ */
:root{
  --green:#27c498; --green-br:#31ddab; --green-dk:#17a37c; --green-ink:#052016;
  --green-soft:rgba(39,196,152,.14); --green-line:rgba(39,196,152,.42);
  --ink:#eef2f0; --ink-2:#aeb6b1; --ink-3:#8b938d;
  --line:rgba(255,255,255,.10); --line-2:rgba(255,255,255,.17);
  --display:'Switzer','Switzer Fallback',system-ui,sans-serif;
  --body:'Inter','Inter Fallback',system-ui,sans-serif;
  --mono:'Kode Mono',ui-monospace,monospace;
  --ease:cubic-bezier(.22,1,.36,1);
}
*{box-sizing:border-box}
html,body{margin:0; height:100%}
body{ font-family:var(--body); color:var(--ink); background:#07090a; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility }
a{color:inherit; text-decoration:none}
button{font-family:inherit}
::selection{background:var(--green); color:var(--green-ink)}

.login{ min-height:100dvh; position:relative; overflow:hidden;
  background:
    radial-gradient(1000px 680px at 84% 14%, rgba(39,196,152,.16), transparent 60%),
    radial-gradient(760px 760px at 62% 116%, rgba(39,196,152,.09), transparent 60%),
    linear-gradient(135deg,#0a0d0e 0%,#0c1311 58%,#0a0f0d 100%) }
.login::before{ content:""; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 1px, transparent 1px 26px) }

/* feixes de luz */
.lx{ position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0 }
.lx span{ position:absolute; top:-60%; height:220%; filter:blur(64px); mix-blend-mode:screen }
.lx .b1{ left:42%; width:30%; background:linear-gradient(90deg,transparent,rgba(255,255,255,.10),transparent) }
.lx .b2{ left:64%; width:26%; background:linear-gradient(90deg,transparent,rgba(49,221,171,.24),transparent) }
@media (prefers-reduced-motion:no-preference){
  .lx .b1{ animation:beam 17s ease-in-out infinite }
  .lx .b2{ animation:beam 21s ease-in-out infinite reverse; animation-delay:-6s }
}
@keyframes beam{ 0%{transform:translateX(-130%) rotate(16deg);opacity:0} 18%{opacity:1} 82%{opacity:1} 100%{transform:translateX(330%) rotate(16deg);opacity:0} }

.shell{ position:relative; z-index:2; min-height:100dvh;
  display:grid; grid-template-columns:1fr minmax(452px,564px) }
.col-scene{ order:1 } .col-form{ order:2 }

/* ---------- Coluna do formulário ---------- */
.col-form{ display:flex; flex-direction:column; padding:36px 54px 30px;
  border-left:1px solid var(--line); background:linear-gradient(180deg, rgba(8,10,11,.55), rgba(8,10,11,.2)) }
.brand{ display:flex; align-items:center; gap:10px }
.brand img{ height:32px; width:auto; display:block }
.brand svg{ height:30px; width:auto; display:block }
.brand b{ font-family:var(--display); font-weight:800; font-size:21px; letter-spacing:-.02em; color:#fff }
.form-mid{ flex:1; display:flex; flex-direction:column; justify-content:center; max-width:408px; width:100%; margin:28px 0 }
.eyebrow{ font-family:var(--mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--green);
  display:inline-flex; align-items:center; gap:8px }
.eyebrow .dot{ width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow:0 0 0 0 rgba(39,196,152,.5) }
@media (prefers-reduced-motion:no-preference){ .eyebrow .dot{ animation:live 2s var(--ease) infinite } }
@keyframes live{ 0%{box-shadow:0 0 0 0 rgba(39,196,152,.5)} 70%{box-shadow:0 0 0 7px rgba(39,196,152,0)} 100%{box-shadow:0 0 0 0 rgba(39,196,152,0)} }
.form-mid h1{ font-family:var(--display); font-weight:700; letter-spacing:-.03em; line-height:1.03;
  font-size:clamp(30px,3.4vw,42px); margin:16px 0 0 }
.form-mid .sub{ margin-top:14px; color:var(--ink-2); font-size:15.5px; line-height:1.5 }

form{ margin-top:30px; display:grid; gap:16px }
.field{ display:grid; gap:8px; position:relative }
.field label{ font-size:13px; color:var(--ink-2); font-weight:500 }
.field .ipt{ position:relative; display:flex; align-items:center }
.field input{ width:100%; height:50px; border-radius:12px; border:1px solid var(--line-2);
  background:rgba(255,255,255,.04); color:#fff; padding:0 16px; font-size:15px; font-family:var(--body);
  outline:none; transition:border-color .16s, background .16s, box-shadow .16s }
.field input::placeholder{ color:var(--ink-3) }
.field input:focus{ border-color:var(--green); background:rgba(39,196,152,.07); box-shadow:0 0 0 4px rgba(39,196,152,.15) }
.field .reveal-pass{ position:absolute; right:8px; top:50%; transform:translateY(-50%); background:none; border:0;
  color:var(--ink-3); cursor:pointer; padding:8px; border-radius:8px; font-family:var(--mono); font-size:11px; letter-spacing:.06em }
.field .reveal-pass:hover{ color:var(--ink) }
.field .lbl-row{ display:flex; align-items:center; justify-content:space-between }
.field .lbl-row a{ font-size:12.5px; color:var(--ink-2) }
.field .lbl-row a:hover{ color:var(--green-br) }

.remember{ display:flex; align-items:center; gap:10px; font-size:13.5px; color:var(--ink-2); cursor:pointer; user-select:none }
.remember input{ position:absolute; opacity:0; width:0; height:0 }
.remember .box{ width:18px; height:18px; border-radius:6px; border:1px solid var(--line-2); display:grid; place-items:center; transition:all .15s }
.remember .box svg{ width:11px; height:11px; color:var(--green-ink); opacity:0; transform:scale(.6); transition:all .15s }
.remember input:checked + .box{ background:var(--green); border-color:var(--green) }
.remember input:checked + .box svg{ opacity:1; transform:scale(1) }
.remember input:focus-visible + .box{ box-shadow:0 0 0 4px rgba(39,196,152,.2) }

.btn-entrar{ width:100%; height:52px; border-radius:12px; border:0; background:var(--green); color:var(--green-ink);
  font-weight:700; font-size:15.5px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  transition:transform .16s var(--ease), background .16s; margin-top:2px }
.btn-entrar svg{ width:16px; height:16px }
.btn-entrar:hover{ background:var(--green-br); transform:translateY(-1px) }
.btn-entrar:active{ transform:translateY(0) }
.btn-entrar[disabled]{ opacity:.8; cursor:default; transform:none }

.or{ display:flex; align-items:center; gap:14px; color:var(--ink-3); font-size:12px; margin:4px 0 }
.or::before,.or::after{ content:""; height:1px; flex:1; background:var(--line) }
.btn-ghost{ width:100%; height:50px; border-radius:12px; border:1px solid var(--line-2); background:transparent; color:#fff;
  font-weight:600; font-size:14.5px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:9px; transition:border-color .16s, transform .16s }
.btn-ghost svg{ width:16px; height:16px; color:var(--green-br) }
.btn-ghost:hover{ border-color:var(--green-line); transform:translateY(-1px) }

.demo{ margin-top:18px; font-size:12.5px; color:var(--ink-3); display:flex; align-items:center; gap:8px }
.demo b{ color:var(--ink-2); font-weight:600 }

.col-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12.5px; color:var(--ink-3) }
.col-foot a:hover{ color:var(--ink) }

/* ---------- Coluna da cena (motor) ---------- */
.col-scene{ position:relative; display:grid; place-items:center; padding:40px 56px; overflow:hidden }
.scene{ position:relative; width:100%; max-width:640px }
.scene svg{ width:100%; height:auto; overflow:visible; display:block }
.scene .wire{ fill:none; stroke:rgba(255,255,255,.18); stroke-width:1.4 }
.scene .wire-live{ fill:none; stroke:var(--green); stroke-width:1.6; stroke-dasharray:5 8; opacity:.9 }
@media (prefers-reduced-motion:no-preference){ .scene .wire-live{ animation:dash 1.1s linear infinite } }
@keyframes dash{ to{ stroke-dashoffset:-26 } }
.scene .node{ fill:#141519; stroke:var(--line-2); stroke-width:1.2 }
.scene .node.best{ stroke:var(--green-line) }
.scene text{ font-family:var(--mono) }
.scene .nm{ font-size:13px; font-weight:600; fill:#eef2f0 }
.scene .rt{ font-size:12px; fill:#9aa39d }
.scene .rt.g{ fill:var(--green-br) }
.pulse{ transform-box:fill-box; transform-origin:center }
@media (prefers-reduced-motion:no-preference){ .pulse{ animation:pulse 2.6s var(--ease) infinite } }
@keyframes pulse{ 0%,100%{opacity:.3} 50%{opacity:1} }

/* score ring (preenche no load) */
.ring-track{ fill:none; stroke:rgba(255,255,255,.1); stroke-width:9 }
.ring-fill{ fill:none; stroke:var(--green); stroke-width:9; stroke-linecap:round; stroke-dasharray:408; stroke-dashoffset:408; transform:rotate(-90deg); transform-origin:center; transform-box:fill-box }
@media (prefers-reduced-motion:no-preference){ .ring-fill{ animation:fill 1.6s var(--ease) .3s forwards } }
@media (prefers-reduced-motion:reduce){ .ring-fill{ stroke-dashoffset:73 } }
@keyframes fill{ to{ stroke-dashoffset:73 } }   /* ~82% de 408 */

/* dados viajando (animateMotion controla a posição) */
.scene .spark{ fill:var(--green-br) }

.scene-cap{ position:absolute; left:0; right:0; bottom:-6px; text-align:center }
.scene-cap .t{ font-family:var(--display); font-weight:700; font-size:clamp(18px,1.9vw,24px); letter-spacing:-.02em; color:#fff }
.scene-cap .s{ margin-top:8px; font-family:var(--mono); font-size:12px; letter-spacing:.02em; color:var(--ink-3) }

/* ---------- Responsivo ---------- */
@media (max-width:1040px){
  .shell{ grid-template-columns:1fr }
  .col-form{ border-right:0; border-bottom:1px solid var(--line) }
  .col-scene{ display:none }
}
@media (max-width:560px){
  .col-form{ padding:26px 22px 24px }
  .form-mid{ margin:20px 0 }
}
@media (prefers-reduced-motion:reduce){
  .lx span, .eyebrow .dot, .scene .wire-live, .pulse{ animation:none }
}
