/* ============================================================
   AUTH / LOGIN — Portal X "Agente X"
   Carregado apenas via cssModule no head.ejs (somente login.ejs).
   Tela: video full-bleed + card de login flutuante a direita +
   promo do Agente X (canto inferior direito) + modal de suporte.
   ============================================================ */

.auth-body {
  --lx-navy: #1f2a5c;
  --lx-navy-deep: #141d44;
  --lx-ink: #1d2333;
  --lx-muted: #8a90a2;
  --lx-line: #e4e6ee;
  --lx-field: #f4f5f8;
  --lx-cyan: #5fe3ff;

  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--lx-ink);
  font-family: var(--font), 'Inter', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.lx-stage {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ---------- Video de fundo (full-bleed) ---------- */
.lx-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: var(--lx-navy-deep);
  pointer-events: none;
}
.lx-bg-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 13, 33, 0.25), rgba(8, 13, 33, 0.45));
  pointer-events: none;
}

/* ---------- Texto ao fim do video (esquerda) ---------- */
.lx-endtext {
  position: absolute;
  z-index: 3;
  left: clamp(32px, 6vw, 90px);
  bottom: clamp(28px, 5vh, 56px);
  max-width: 420px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s ease;
}
.lx-endtext.is-on {
  opacity: 1;
  transform: translateY(0);
}
.lx-endtext__brand {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.lx-endtext__tag {
  margin: 0;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
@media (max-width: 880px) {
  .lx-endtext { display: none; }
}

/* ---------- Card de login (flutua sobre o video) ---------- */
.lx-panel {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px clamp(32px, 4vw, 64px);
  pointer-events: none;
}
.lx-card {
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  padding: 64px 64px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(31, 42, 92, 0.14);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(3, 8, 24, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lx-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.lx-brand img {
  height: 176px;
  width: auto;
  max-width: 100%;
  filter: brightness(0);
}

.lx-card__head {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--lx-navy);
}
.lx-card__sub {
  margin: 0 0 26px;
  font-size: 13.5px;
  text-align: center;
  color: var(--lx-muted);
}

.lx-alert {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdecec;
  border: 1px solid #f5c6c6;
  color: #991b1b;
  font-size: 13.5px;
  line-height: 1.45;
}

.lx-form { display: block; }

.lx-field { margin-bottom: 16px; }
.lx-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #525a6e;
}
.lx-field__wrap { position: relative; }
.lx-field__input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--lx-line);
  border-radius: 10px;
  background: var(--lx-field);
  padding: 0 44px 0 14px;
  font-size: 14.5px;
  color: var(--lx-ink);
  font-family: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.lx-field__input::placeholder { color: #aeb4c4; }
.lx-field__input:focus {
  outline: none;
  border-color: var(--lx-navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31, 42, 92, 0.1);
}
.lx-field__icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa1b4;
  display: flex;
  background: none;
  border: 0;
  padding: 4px;
  cursor: default;
}
button.lx-field__icon { cursor: pointer; }
button.lx-field__icon:hover { color: #525a6e; }

.lx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}
.lx-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: #525a6e;
  cursor: pointer;
  user-select: none;
}
.lx-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.lx-check__box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid #c4c9d6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.15s ease;
}
.lx-check input:checked + .lx-check__box {
  background: var(--lx-navy);
  border-color: var(--lx-navy);
}
.lx-check__box svg { opacity: 0; transition: opacity 0.15s; }
.lx-check input:checked + .lx-check__box svg { opacity: 1; }
.lx-link {
  font-size: 14px;
  color: var(--lx-navy);
  font-weight: 500;
  text-decoration: none;
}
.lx-link:hover { text-decoration: underline; }

.lx-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: var(--lx-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: background 0.18s ease, transform 0.05s ease;
}
.lx-submit:hover { background: #28356f; }
.lx-submit:active { transform: translateY(1px); }

.lx-credit {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 22px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* ---------- Promo Agente X (quadradinho centralizado no login) ---------- */
.lx-agentx-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.lx-agentx {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(31, 42, 92, 0.12);
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(150deg, rgba(16, 26, 54, 0.96), rgba(9, 15, 34, 0.96));
  box-shadow: 0 8px 20px rgba(3, 8, 24, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lx-agentx:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(3, 8, 24, 0.3);
}
.lx-agentx__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(95, 227, 255, 0.45));
}
.lx-agentx__badge {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a1430;
  background: var(--lx-cyan);
  padding: 1px 6px;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(95, 227, 255, 0.45);
}

@keyframes lx-agentx-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------- Modal: contate o suporte ---------- */
.lx-ax-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 13, 33, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lx-ax-overlay.is-open { display: flex; }
.lx-ax-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 34px 30px 30px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(3, 8, 24, 0.4);
}
.lx-ax-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f1f2f6;
  color: #7a8196;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.lx-ax-close:hover { background: #e6e8ef; color: #3a4156; }
.lx-ax-modal__art {
  width: 96px;
  height: 96px;
  margin: 0 auto 6px;
  object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(95, 227, 255, 0.4));
}
.lx-ax-badge2 {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a1430;
  background: var(--lx-cyan);
  padding: 3px 10px;
  border-radius: 99px;
}
.lx-ax-modal h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lx-navy);
}
.lx-ax-modal p {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #5b6276;
}
.lx-ax-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--lx-navy);
}
.lx-ax-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lx-ax-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.lx-ax-btn--wa { background: #25d366; color: #fff; }
.lx-ax-btn--wa:hover { filter: brightness(0.95); }
.lx-ax-btn--call {
  background: var(--lx-field);
  color: var(--lx-navy);
  border: 1px solid var(--lx-line);
}
.lx-ax-btn--call:hover { background: #eceef4; }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .lx-panel { padding: 40px clamp(24px, 6vw, 64px); }
}
@media (max-width: 600px) {
  .lx-panel {
    justify-content: center;
    align-items: flex-start;
    padding: 28px 18px 130px;
  }
  .lx-card { padding: 36px 26px; }
}

@media (prefers-reduced-motion: no-preference) {
  .lx-agentx__img { animation: lx-agentx-float 4.5s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .lx-agentx, .lx-agentx__img { animation: none; }
  .lx-endtext { transition: none; }
}
