/*
 * Tela de login do Painel de Controle Imonov (index2.php).
 * Layout dividido: vitrine com maquete 3D (js/login.js) + painel de acesso.
 * Somente visual: o formulario continua enviando "usuario" e "senha" para /autentica.
 */

@font-face { font-family: 'Mansfield'; font-weight: 300; font-display: swap; src: url('../fonts/mansfield-300.woff') format('woff'); }
@font-face { font-family: 'Mansfield'; font-weight: 400; font-display: swap; src: url('../fonts/mansfield-400.woff') format('woff'); }
@font-face { font-family: 'Mansfield'; font-weight: 500; font-display: swap; src: url('../fonts/mansfield-500.woff') format('woff'); }
@font-face { font-family: 'Mansfield'; font-weight: 600; font-display: swap; src: url('../fonts/mansfield-600.woff') format('woff'); }
@font-face { font-family: 'Mansfield'; font-weight: 700; font-display: swap; src: url('../fonts/mansfield-700.woff') format('woff'); }

:root {
  --azul: #0973bc;
  --azul-claro: #5cc2ff;
  --marinho: #003466;
  --marinho-escuro: #001b36;
  --laranja: #ff7f15;
  --bege: #f4f0ea;
  --papel: #fbfaf7;
  --texto: #1d3550;
  --texto-suave: #5e758b;
  --borda: #dfe5ec;
  --erro: #c62828;
  --fonte: 'Mansfield', 'Segoe UI', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html,
body { margin: 0; min-height: 100%; }

body.lg-corpo {
  background: var(--papel);
  color: var(--texto);
  font-family: var(--fonte);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.lg {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(460px, 0.7fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ======================================================================
   VITRINE (lado esquerdo)
   ====================================================================== */
.lg-vitrine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(70% 60% at 50% 58%, rgba(9, 115, 188, 0.45), transparent 70%),
    radial-gradient(40% 35% at 85% 8%, rgba(255, 127, 21, 0.16), transparent 70%),
    linear-gradient(160deg, #001024 0%, #002a52 55%, #04447c 100%);
  color: #fff;
}

/* textura de pontos bem sutil */
.lg-vitrine::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(160, 215, 255, 0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 45%, #000, transparent);
  mask-image: radial-gradient(80% 70% at 50% 45%, #000, transparent);
}

.lg-palco {
  position: absolute;
  inset: 0;
}

.lg-palco canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 900ms ease;
}

.lg-3d-pronto .lg-palco canvas { opacity: 1; }

/* imagem estatica da maquete: so aparece quando o 3D nao roda (sem GPU ou navegador antigo) */
.lg-poster {
  display: none;
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(62%, 640px);
  height: auto;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent);
  mask-image: radial-gradient(closest-side, #000 82%, transparent);
  pointer-events: none;
}

.lg-sem-3d .lg-poster { display: block; }

/* etiquetas flutuantes presas a pontos da maquete */
.lg-ponto {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 27, 54, 0.82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
  will-change: transform;
}

.lg-3d-pronto .lg-ponto.visivel { opacity: 1; }

.lg-ponto i {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--laranja);
}

.lg-ponto i::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--laranja);
  border-radius: 50%;
  animation: lg-pulso 2s ease-out infinite;
}

@keyframes lg-pulso {
  from { transform: scale(0.5); opacity: 1; }
  to   { transform: scale(1.8); opacity: 0; }
}

/* textos sobre a vitrine */
.lg-chamada {
  position: absolute;
  left: clamp(32px, 5vw, 72px);
  bottom: clamp(32px, 6vh, 64px);
  z-index: 2;
  max-width: 520px;
  pointer-events: none;
}

.lg-selo {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--laranja);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.lg-titulo {
  margin: 0;
  font-size: clamp(34px, 3.3vw, 54px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lg-titulo em {
  font-style: normal;
  background: linear-gradient(90deg, #8fd3ff, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lg-descricao {
  margin: 16px 0 28px;
  color: rgba(214, 236, 255, 0.78);
  font-size: 16px;
  line-height: 1.55;
}

.lg-numeros {
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lg-numeros strong {
  display: block;
  font-size: 26px;
  font-weight: 700;
}

.lg-numeros span {
  display: block;
  margin-top: 2px;
  color: rgba(214, 236, 255, 0.7);
  font-size: 13px;
}

/* card de Marketing Digital com a lampada */
.lg-promo {
  position: absolute;
  top: clamp(24px, 4vh, 40px);
  right: clamp(24px, 3vw, 40px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 330px;
  padding: 14px 18px 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(28, 74, 122, 0.92), rgba(6, 34, 66, 0.92));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  color: #fff;
  text-decoration: none;
  transition: transform 300ms ease, background-color 300ms ease;
}

.lg-promo:hover { transform: translateY(-3px); }

.lg-lampada {
  position: relative;
  flex: 0 0 76px;
  height: 96px;
  perspective: 400px;
}

.lg-lampada::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 90, 0.7), rgba(255, 160, 40, 0.15) 45%, transparent 70%);
  animation: lg-brilho 2.6s ease-in-out infinite alternate;
}

@keyframes lg-brilho {
  from { transform: scale(0.85); opacity: 0.6; }
  to   { transform: scale(1.1); opacity: 1; }
}

.lg-lampada img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  margin: -48px 0 0 -32px;
  animation: lg-lampada 6s ease-in-out infinite;
}

@keyframes lg-lampada {
  0%, 100% { transform: translateY(0) rotateY(-22deg); }
  50%      { transform: translateY(-5px) rotateY(22deg); }
}

.lg-promo b { display: block; font-size: 16px; font-weight: 700; }
.lg-promo small { display: block; margin: 3px 0 8px; color: rgba(214, 236, 255, 0.8); font-size: 13px; line-height: 1.35; }

.lg-promo-acao {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffb36b;
  font-size: 13px;
  font-weight: 600;
}

.lg-promo-acao svg { width: 14px; height: 14px; transition: transform 250ms ease; }
.lg-promo:hover .lg-promo-acao svg { transform: translateX(4px); }

/* ======================================================================
   PAINEL DE ACESSO (lado direito)
   ====================================================================== */
.lg-acesso {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vh, 56px) clamp(32px, 4vw, 72px) 28px;
  background: var(--papel);
}

.lg-acesso-conteudo {
  width: 100%;
  max-width: 400px;
  margin: auto;
  animation: lg-entrar 700ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes lg-entrar {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.lg-logo { display: block; width: 150px; height: auto; margin-bottom: 44px; }

.lg-acesso h2 {
  margin: 0;
  color: var(--marinho);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lg-acesso-sub {
  margin: 8px 0 32px;
  color: var(--texto-suave);
  font-size: 15px;
  line-height: 1.5;
}

/* aviso de usuario/senha invalidos */
.lg-erro {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(198, 40, 40, 0.25);
  border-radius: 12px;
  background: #fdeeee;
  color: #8e1c1c;
  font-size: 14px;
  animation: lg-tremer 400ms ease 200ms;
}

.lg-erro svg { flex: 0 0 18px; width: 18px; height: 18px; }

@keyframes lg-tremer {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* campos com rotulo flutuante */
.lg-campo {
  position: relative;
  margin-bottom: 16px;
}

.lg-campo input {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 22px 48px 6px 48px;
  border: 1.5px solid var(--borda);
  border-radius: 14px;
  background: #fff;
  color: var(--texto);
  font: 500 16px/1 var(--fonte);
  outline: 0;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.lg-campo input:hover { border-color: #c5d0dc; }

.lg-campo input:focus {
  border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(9, 115, 188, 0.14);
}

.lg-campo label {
  position: absolute;
  left: 48px;
  top: 20px;
  color: var(--texto-suave);
  font-size: 15px;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 200ms ease, color 200ms ease;
}

.lg-campo input:focus + label,
.lg-campo input:not(:placeholder-shown) + label {
  color: var(--azul);
  transform: translateY(-11px) scale(0.78);
}

.lg-campo .lg-icone {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  color: #8aa0b5;
  pointer-events: none;
  transition: color 200ms ease;
}

.lg-campo input:focus ~ .lg-icone { color: var(--azul); }

.lg-ver-senha {
  position: absolute;
  right: 8px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8aa0b5;
  cursor: pointer;
}

.lg-ver-senha:hover,
.lg-ver-senha:focus-visible { background: var(--bege); color: var(--marinho); outline: 0; }
.lg-ver-senha svg { width: 20px; height: 20px; }
.lg-ver-senha .fechado { display: none; }
.lg-ver-senha[aria-pressed="true"] .aberto { display: none; }
.lg-ver-senha[aria-pressed="true"] .fechado { display: block; }

/* preenchimento automatico do navegador sem fundo amarelado/azulado */
.lg-campo input:-webkit-autofill,
.lg-campo input:-webkit-autofill:hover,
.lg-campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--texto);
  -webkit-box-shadow: 0 0 0 100px #fff inset;
  transition: background-color 9999s ease 0s;
}

.lg-campo input:-webkit-autofill + label { color: var(--azul); transform: translateY(-11px) scale(0.78); }

.lg-entrar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  margin-top: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--azul) 0%, #0a5c9a 100%);
  box-shadow: 0 14px 28px rgba(9, 115, 188, 0.32);
  color: #fff;
  font: 600 16px/1 var(--fonte);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.lg-entrar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: left 700ms ease;
}

.lg-entrar:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(9, 115, 188, 0.42); }
.lg-entrar:hover::before { left: 120%; }
.lg-entrar:active { transform: translateY(1px); }
.lg-entrar:focus-visible { outline: 3px solid rgba(9, 115, 188, 0.4); outline-offset: 3px; }
.lg-entrar svg { width: 18px; height: 18px; transition: transform 250ms ease; }
.lg-entrar:hover svg { transform: translateX(4px); }

/* estado "entrando..." apos o envio */
.lg-entrar .lg-girando { display: none; }
.lg-enviando .lg-entrar { pointer-events: none; opacity: 0.85; }
.lg-enviando .lg-entrar .lg-seta { display: none; }
.lg-enviando .lg-entrar .lg-girando { display: block; animation: lg-girar 800ms linear infinite; }

@keyframes lg-girar { to { transform: rotate(360deg); } }

.lg-ajuda {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--texto-suave);
  font-size: 14px;
}

.lg-ajuda::before,
.lg-ajuda::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--borda);
}

.lg-whats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 16px;
  border: 1.5px solid var(--borda);
  border-radius: 14px;
  background: #fff;
  color: var(--marinho);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 200ms ease, background-color 200ms ease;
}

.lg-whats:hover { border-color: #25d366; background: #f3fcf6; }
.lg-whats svg { width: 20px; height: 20px; color: #25d366; }

.lg-rodape {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 32px;
  color: #8aa0b5;
  font-size: 12.5px;
}

.lg-rodape a { text-decoration: none; }
.lg-rodape a:hover { color: var(--azul); text-decoration: underline; }

/* ======================================================================
   RESPONSIVO
   ====================================================================== */
@media (max-width: 1279px) {
  .lg { grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr); }
  .lg-promo { width: 300px; }
  .lg-numeros { gap: 26px; }
}

/* tablet e celular: maquete vira cabecalho e o acesso sobe como uma folha */
@media (max-width: 1023px) {
  .lg { display: block; }
  .lg-vitrine { height: 46vh; min-height: 330px; }
  .lg-chamada { left: 24px; right: 24px; bottom: 52px; }
  .lg-selo { margin-bottom: 10px; font-size: 11px; }
  .lg-titulo { font-size: clamp(26px, 6vw, 38px); }
  .lg-descricao,
  .lg-numeros,
  .lg-promo { display: none; }
  .lg-acesso {
    margin-top: -28px;
    padding: 36px 24px 24px;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 18, 40, 0.25);
  }
  .lg-logo { margin-bottom: 28px; }
  .lg-acesso h2 { font-size: 26px; }
  .lg-acesso-sub { margin-bottom: 24px; }
  .lg-ponto { font-size: 11px; padding: 5px 10px 5px 6px; }
  .lg-poster { top: 36%; width: min(72%, 420px); }
}

@media (max-width: 479px) {
  .lg-vitrine { height: 40vh; min-height: 300px; }
  .lg-chamada { bottom: 44px; }
  .lg-ponto.opcional { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
