/*
 * LOGIN — Sistema de Lances Ita Consorcios
 *
 * Duas colunas: a vitrine da marca a esquerda (~57%), o formulario a
 * direita (~43%). Em tela estreita a vitrine sai e o formulario fica
 * sozinho, centralizado. Nada rola, nada pula no foco, nada e escalado.
 *
 * A paleta e a da marca: laranja da Ita sobre navy escuro. A abertura
 * (abertura.css) le --fundo e --azul-claro daqui, por isso a segunda
 * variavel carrega o laranja — a linha da abertura acompanha a marca.
 */

:root {
  --preto:      #090c14;
  --fundo:      #090c14;          /* lido pela abertura compartilhada */
  --navy:       #0e1320;
  --navy2:      #121a2b;
  --painel:     #0f1523;
  --painel2:    #141c2e;
  --borda:      #1f2838;
  --borda2:     #2c3850;
  --texto:      #f4f6fa;
  --texto2:     #c9d1de;
  --suave:      #8e98ab;
  --apagado:    #5c6679;
  --laranja:    #ff4f12;
  --laranja2:   #ff6a2c;
  --laranja-escuro: #d93f0c;
  --azul-claro: #ff7a45;          /* nome herdado pela abertura: aqui e laranja */
  --vermelho:   #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  height: 100vh; overflow: hidden;
  background: var(--preto); color: var(--texto);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  display: grid; grid-template-columns: 57fr 43fr;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   VITRINE
   ============================================================ */
.vitrine {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto auto; align-items: center;
  padding: 44px 56px 36px;
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(255,79,18,.16), transparent 70%),
    radial-gradient(50% 60% at 12% 85%, rgba(255,106,44,.10), transparent 70%),
    linear-gradient(160deg, #0f1522 0%, #0a0e18 55%, #0b0f1a 100%);
  border-right: 1px solid var(--borda);
}

/* Malha fina: textura tecnica, quase invisivel, some para as bordas. */
.malha {
  position: absolute; inset: 0; z-index: -3; 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: 48px 48px;
  mask-image: radial-gradient(ellipse at 45% 50%, #000 20%, transparent 75%);
}

/* Dois brilhos laranja bem difusos, respirando devagar. */
.brilho { position: absolute; z-index: -2; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.brilho.um  { width: 520px; height: 520px; right: -140px; top: -160px;   background: rgba(255,79,18,.22);  animation: respirar 12s ease-in-out infinite; }
.brilho.dois{ width: 420px; height: 420px; right: -60px;  bottom: -200px; background: rgba(255,106,44,.16); animation: respirar 15s ease-in-out infinite reverse; }
@keyframes respirar {
  0%, 100% { transform: translate(0,0) scale(1); opacity: .8; }
  50%      { transform: translate(-18px, 14px) scale(1.08); opacity: 1; }
}

/* A geometria: o escudo inteiro na altura do painel, ancorado na metade
   direita e cortado pela borda, atras de tudo. O laranja mora so no fio e
   nos pontos de luz. */
.geometria {
  position: absolute; z-index: -1; pointer-events: none;
  top: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 1;
  opacity: 1;
  animation: flutuar 22s ease-in-out infinite;
}
@keyframes flutuar {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-6px, 10px); }
}

/* Marcas discretas de canto, como na referencia. */
.tagline-topo, .tagline-base {
  position: relative; z-index: 1;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--suave);
}
.tagline-topo { display: flex; flex-direction: column; gap: 4px; justify-self: start; }
.tagline-base { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.filete { display: block; width: 26px; height: 1px; background: var(--borda2); margin: 6px 0 10px; }
.filete.curto { width: 26px; margin: 10px 0 0; }
.filete.laranja { width: 40px; height: 2px; background: var(--laranja); margin: 0; }
.tagline-base .filete.curto { margin: 0; }

.conteudo { position: relative; z-index: 1; padding: 20px 0; max-width: 560px; justify-self: start; }
.tagline-topo, .pilares, .tagline-base { justify-self: start; }

/* O LOGO: trofeu e nome lado a lado, como no logotipo oficial. O trofeu
   tem a altura do bloco "Ita + CONSORCIOS"; o vao e um so, de 18px. */
.brand-logo { display: flex; align-items: center; gap: 18px; }
.brand-trophy { width: clamp(108px, 10.8vw, 140px); height: auto; aspect-ratio: 384 / 476; flex-shrink: 0; display: block; filter: drop-shadow(0 12px 30px rgba(255,79,18,.28)); }
.brand-name { display: flex; flex-direction: column; gap: 10px; line-height: .9; }
.brand-ita {
  font-size: clamp(64px, 8.2vw, 116px); font-weight: 800; letter-spacing: -.04em;
  color: var(--laranja);
}
.brand-consorcios {
  font-size: clamp(17px, 2vw, 27px); font-weight: 500; text-transform: uppercase;
  letter-spacing: .2em; color: var(--laranja); padding-left: 4px;
}
.traco { display: block; width: 34px; height: 3px; border-radius: 2px; background: var(--laranja); margin: 30px 0 14px; }
.lema { color: var(--texto2); font-size: clamp(16px, 1.45vw, 21px); font-weight: 400; letter-spacing: .005em; }

/* Os tres pilares da referencia: icone em caixa fina, texto em duas linhas. */
.pilares { position: relative; z-index: 1; display: flex; align-items: stretch; gap: 0; margin-top: 12px; }
.pilar {
  display: flex; flex-direction: column; gap: 12px; padding: 0 30px 0 0; margin-right: 30px;
  border-right: 1px solid var(--borda2); font-size: 15px; line-height: 1.25; color: var(--texto2);
}
.pilar:last-child { border-right: 0; }
.pilar-ico {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--borda2); background: rgba(255,255,255,.02); color: var(--texto2);
}
.pilar-ico svg { width: 20px; height: 20px; }

/* Entrada escalonada, de cima para baixo. */
.tagline-topo, .brand-logo, .traco, .lema, .pilares, .tagline-base { animation: surgir .8s cubic-bezier(.2,.7,.3,1) both; }
.tagline-topo { animation-delay: .05s; }
.brand-logo   { animation-delay: .15s; }
.conteudo .traco { animation-delay: .32s; }
.lema         { animation-delay: .42s; }
.pilares      { animation-delay: .55s; }
.tagline-base { animation-delay: .65s; }
@keyframes surgir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   FORMULÁRIO
   ============================================================ */
.area-form {
  display: flex; align-items: center; justify-content: center;
  padding: 32px 40px; position: relative; overflow: auto;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(255,79,18,.07), transparent 70%),
    var(--preto);
}
.form {
  width: 100%; max-width: 380px; position: relative;
  padding: 38px 34px 30px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012)), var(--painel);
  border: 1px solid var(--borda2);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
}
.form > * { animation: subir .6s cubic-bezier(.2,.7,.3,1) both; }
.form .traco  { animation-delay: .25s; margin: 0 0 22px; }
.form h2      { animation-delay: .30s; }
.form .dica   { animation-delay: .38s; }
.form .campo:nth-of-type(1) { animation-delay: .46s; }
.form .campo:nth-of-type(2) { animation-delay: .54s; }
.form .entrar { animation-delay: .62s; }
.form .rodape { animation-delay: .70s; }
@keyframes subir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* So em tela estreita, quando a vitrine sai (bloco no fim do arquivo). */
.form .logo-mobile { display: none; width: 64px; height: auto; aspect-ratio: 384 / 476; margin: 0 auto 20px; }

.form h2 { font-size: 30px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.025em; line-height: 1.1; }
.form .dica { color: var(--texto2); font-size: 15px; margin-bottom: 30px; }

.campo { margin-bottom: 18px; }
.campo label {
  display: block; font-size: 11.5px; color: var(--texto2); margin-bottom: 8px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.caixa-campo { position: relative; display: flex; align-items: center; }
.caixa-campo .icone {
  position: absolute; left: 16px; width: 18px; height: 18px;
  color: var(--suave); pointer-events: none; transition: color .16s;
}
/* O campo nao muda de tamanho nem se move no foco: so a borda e o anel. */
.campo input {
  width: 100%; height: 54px; background: var(--painel2); border: 1px solid var(--borda2); color: var(--texto);
  border-radius: 12px; padding: 0 16px 0 46px; font: inherit; font-size: 15px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.campo input:hover:not(:focus) { border-color: #3a4862; }
.campo input::placeholder { color: var(--apagado); }
.campo input:focus {
  outline: none; border-color: var(--laranja); background: #161f33;
  box-shadow: 0 0 0 3px rgba(255,79,18,.18);
}
.caixa-campo:focus-within .icone { color: var(--laranja2); }
.campo input#senha { padding-right: 50px; }

.campo .olho {
  position: absolute; right: 8px; width: 36px; height: 36px; display: grid; place-items: center;
  background: none; border: 0; color: var(--suave); cursor: pointer; border-radius: 8px;
}
.campo .olho svg { width: 18px; height: 18px; }
.campo .olho .olho-fechado { display: none; }
.campo .olho.mostrando .olho-aberto { display: none; }
.campo .olho.mostrando .olho-fechado { display: block; }
.campo .olho:hover { color: var(--texto); background: rgba(255,255,255,.05); }

.caps { display: none; align-items: center; gap: 7px; margin-top: 9px; font-size: 12.5px; color: #f0a020; }
.caps.visivel { display: flex; }

button.entrar {
  width: 100%; height: 56px; margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--laranja2), var(--laranja));
  color: #fff; border: 0; border-radius: 12px; font: inherit; font-weight: 600; font-size: 17px;
  cursor: pointer; letter-spacing: .01em;
  box-shadow: 0 10px 28px -8px rgba(255,79,18,.55), inset 0 1px 0 rgba(255,255,255,.18);
  transition: box-shadow .16s, filter .16s, opacity .16s;
}
button.entrar .entrar-seta { width: 20px; height: 20px; position: absolute; right: 22px; }
button.entrar:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 14px 34px -8px rgba(255,79,18,.7), inset 0 1px 0 rgba(255,255,255,.18); }
button.entrar:active:not(:disabled) { filter: brightness(.94); box-shadow: 0 6px 16px -6px rgba(255,79,18,.5); }
button.entrar:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
button.entrar:disabled { opacity: .8; cursor: wait; }
/* Faixa de luz percorrendo o botao enquanto o login e verificado. */
button.entrar.carregando::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: brilhar 1.1s linear infinite;
}
@keyframes brilhar { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.erro {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #ffb4b4;
  border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 18px; display: none;
  align-items: center; gap: 9px;
}
.erro.visivel { display: flex; animation: tremer .32s; }
@keyframes tremer { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.rodape {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--borda);
  color: var(--suave); font-size: 13px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.rodape small { font-size: 12px; color: var(--apagado); }

/* ============================================================
   TELAS MENORES
   ============================================================ */
/* Notebook 1366x768: a vitrine encolhe os pilares para caber sem rolar. */
@media (max-height: 800px) {
  .vitrine { padding: 30px 48px 26px; }
  .pilar { font-size: 14px; }
  .pilar-ico { width: 36px; height: 36px; }
  .form { padding: 34px 36px 28px; }
  .form h2 { font-size: 27px; }
  .form .dica { margin-bottom: 24px; }
}
@media (max-width: 1180px) {
  body { grid-template-columns: 52fr 48fr; }
  .geometria { left: 58%; opacity: .8; }
  .vitrine { padding-left: 40px; padding-right: 40px; }
}
/* Tablet e celular: uma coluna, so o formulario, a marca em cima dele. */
@media (max-width: 920px) {
  body { grid-template-columns: 1fr; height: auto; min-height: 100vh; overflow: auto; }
  .vitrine { display: none; }
  .form .logo-mobile { display: block; }
  .area-form { padding: 28px 20px; min-height: 100vh; }
  .form { padding: 32px 26px 26px; }
}
@media (max-width: 420px) {
  .form { padding: 26px 20px 22px; border-radius: 14px; }
  .form h2 { font-size: 25px; }
}

/* Quem pediu menos animacao recebe a tela pronta, sem nada se mexendo. */
@media (prefers-reduced-motion: reduce) {
  .brilho, .geometria, .tagline-topo, .brand-logo, .traco, .lema, .pilares, .tagline-base,
  .form > *, button.entrar.carregando::after, .erro.visivel { animation: none; }
}
