/* =====================================================================
   PontoF4cil — Tela de Login (Tech / Glass / Spotlight)
   Identidade F4cil — roxo #5A2D91 · laranja #F06423
   ===================================================================== */

:root {
  --auth-bg-1:   #1a0a2e;
  --auth-bg-2:   #2a1448;
  --auth-bg-3:   #3d1e64;
  --auth-grid:   rgba(255,255,255,.045);
  --auth-glass:  rgba(255,255,255,.04);
  --auth-glass-border: rgba(255,255,255,.08);
  --auth-text:   #e9e6f1;
  --auth-text-2: rgba(255,255,255,.62);
  --auth-text-3: rgba(255,255,255,.42);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; overflow-x: hidden; overflow-y: auto; }

.auth-body {
  margin: 0;
  background: var(--auth-bg-1);
  color: var(--auth-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════════════════════
   BACKGROUND (4 camadas)
═══════════════════════════════════════════════════════════════════════ */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Camada 1: Gradiente base */
.auth-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 0%, var(--auth-bg-3) 0%, transparent 60%),
    radial-gradient(ellipse 70% 80% at 100% 100%, #4a1f80 0%, transparent 55%),
    linear-gradient(180deg, var(--auth-bg-2) 0%, var(--auth-bg-1) 100%);
}

/* Camada 2: Grid sutil (sentido tecnológico) */
.auth-bg-grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(var(--auth-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--auth-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 90%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 0%, transparent 90%);
  animation: gridFloat 80s linear infinite;
}
@keyframes gridFloat {
  to { transform: translate(56px, 56px); }
}

/* Camada 3: Blobs SVG luminosos */
.auth-bg-blob {
  position: absolute;
  width: 700px;
  height: 700px;
  filter: blur(40px);
  opacity: .65;
  animation: blobDrift 22s ease-in-out infinite;
}
.auth-bg-blob--1 { top: -260px; left: -200px; }
.auth-bg-blob--2 { bottom: -320px; right: -260px; animation-delay: -8s; opacity: .75; }
@keyframes blobDrift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(40px, 30px) scale(1.08); }
}

/* Camada 4: Partículas laranja flutuando */
.auth-bg-particles {
  position: absolute;
  inset: 0;
}
.auth-particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #F06423;
  box-shadow: 0 0 12px rgba(240,100,35,.7), 0 0 24px rgba(240,100,35,.3);
  opacity: 0;
  animation: particleFloat linear infinite;
}
.auth-particle:nth-child(1)  { left:  4%; animation-duration: 18s; animation-delay:  0s; }
.auth-particle:nth-child(2)  { left: 12%; animation-duration: 24s; animation-delay: -4s; }
.auth-particle:nth-child(3)  { left: 22%; animation-duration: 20s; animation-delay: -2s; }
.auth-particle:nth-child(4)  { left: 32%; animation-duration: 26s; animation-delay: -8s; }
.auth-particle:nth-child(5)  { left: 41%; animation-duration: 22s; animation-delay: -1s; }
.auth-particle:nth-child(6)  { left: 53%; animation-duration: 30s; animation-delay: -6s; width: 2px; height: 2px; }
.auth-particle:nth-child(7)  { left: 62%; animation-duration: 19s; animation-delay: -3s; }
.auth-particle:nth-child(8)  { left: 71%; animation-duration: 25s; animation-delay: -9s; }
.auth-particle:nth-child(9)  { left: 79%; animation-duration: 21s; animation-delay: -5s; width: 4px; height: 4px; }
.auth-particle:nth-child(10) { left: 86%; animation-duration: 28s; animation-delay: -7s; }
.auth-particle:nth-child(11) { left: 93%; animation-duration: 23s; animation-delay: -10s; }
.auth-particle:nth-child(12) { left: 48%; animation-duration: 27s; animation-delay: -12s; }
@keyframes particleFloat {
  0%   { transform: translateY(110vh) scale(.5); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1);  opacity: 0; }
}

/* Camada 5: Spotlight que segue o cursor */
.auth-bg-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 320px at var(--mx, 50%) var(--my, 50%),
    rgba(240, 100, 35, .14) 0%,
    rgba(123, 63, 168, .08) 35%,
    transparent 72%
  );
  transition: background .08s linear;
}

/* ════════════════════════════════════════════════════════════════════════
   WRAPPER PRINCIPAL
═══════════════════════════════════════════════════════════════════════ */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 480px);
  gap: 48px;
  padding: 56px 64px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════════════
   HERO (esquerda)
═══════════════════════════════════════════════════════════════════════ */
.auth-hero {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}

/* Brand */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-brand-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #F06423 0%, #ff8c50 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -1.5px;
  position: relative;
  box-shadow: 0 8px 24px rgba(240,100,35,.4), inset 0 1px 0 rgba(255,255,255,.3);
}
.auth-brand-icon-glyph { position: relative; z-index: 1; }
.auth-brand-icon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  border: 1px solid rgba(240,100,35,.35);
  animation: brandPulse 2.4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { transform: scale(1);    opacity: .6; }
  50%      { transform: scale(1.08); opacity: 0; }
}
.auth-brand-name {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: -.5px;
}
.auth-brand-tag {
  margin: 2px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--auth-text-3);
}

/* Headline */
.auth-headline { display: flex; flex-direction: column; gap: 12px; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: rgba(240,100,35,.1);
  border: 1px solid rgba(240,100,35,.22);
  color: #ffb38a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.auth-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #F06423;
  box-shadow: 0 0 8px #F06423;
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.6); }
}

.auth-title {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -1.5px;
  color: #fff;
}
.auth-title-grad {
  background: linear-gradient(135deg, #F06423 0%, #ff8c50 50%, #ffd6c2 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.auth-subtitle {
  font-size: 15px;
  line-height: 1.65;
  color: var(--auth-text-2);
  max-width: 480px;
  margin: 8px 0 0;
}

/* ─── Cards demo (tilt 3D) ────────────────────────────────────────────── */
.auth-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  max-width: 540px;
  margin-top: 8px;
}
.auth-demo-card {
  position: relative;
  background: var(--auth-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--auth-glass-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s;
  cursor: default;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}
.auth-demo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(
    circle 160px at var(--gx, 50%) var(--gy, 50%),
    rgba(240,100,35,.16),
    transparent 70%
  );
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.auth-demo-card:hover {
  border-color: rgba(240,100,35,.3);
  box-shadow: 0 20px 50px -20px rgba(240,100,35,.35);
}
.auth-demo-card:hover::before { opacity: 1; }

.auth-demo-card--wide {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.auth-demo-wide-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.auth-demo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.auth-demo-icon svg { width: 16px; height: 16px; }
.auth-demo-icon--orange { background: rgba(240,100,35,.16);  color: #ff9b6c; }
.auth-demo-icon--purple { background: rgba(123,63,168,.22);  color: #c9a3eb; }
.auth-demo-icon--green  { background: rgba(40,167,69,.18);   color: #6ad18a; }

.auth-demo-label {
  font-size: 11px;
  color: var(--auth-text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.auth-demo-value {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-demo-value--sm { font-size: 13px; letter-spacing: 0; }
.auth-demo-foot {
  margin-top: 2px;
  font-size: 11px;
  color: var(--auth-text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6ad18a;
  box-shadow: 0 0 6px #6ad18a;
  animation: dotPulse 1.8s ease-in-out infinite;
}

/* Arc decorativo no card de compliance */
.auth-shield-arc {
  position: absolute;
  width: 140px; height: 140px;
  border: 1.5px dashed rgba(106, 209, 138, .25);
  border-radius: 50%;
  right: -50px; top: -50px;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Trust signal */
.auth-trust {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.auth-trust-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-trust-stat strong {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
}
.auth-trust-stat strong sup {
  color: #F06423;
  font-size: 14px;
}
.auth-trust-stat span {
  font-size: 10.5px;
  color: var(--auth-text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.auth-trust-sep {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--auth-glass-border), transparent);
}

/* ════════════════════════════════════════════════════════════════════════
   FORM CARD (direita)
═══════════════════════════════════════════════════════════════════════ */
.auth-form-card {
  position: relative;
  background: rgba(20, 12, 38, .55);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--auth-glass-border);
  border-radius: 22px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.auth-form-glow {
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(240,100,35,.4) 0%, transparent 50%, rgba(123,63,168,.4) 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: .5;
  transition: opacity .3s;
}
.auth-form-card:hover .auth-form-glow { opacity: 1; }

.auth-form-head { display: flex; flex-direction: column; gap: 4px; }
.auth-form-head h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #fff;
  letter-spacing: -.5px;
}
.auth-form-head p {
  margin: 0;
  font-size: 13px;
  color: var(--auth-text-2);
}

/* Alertas */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
}
.auth-alert > div { display: flex; flex-direction: column; gap: 2px; }
.auth-alert strong { font-weight: 700; }
.auth-alert--error {
  background: rgba(220, 53, 69, .12);
  border: 1px solid rgba(220, 53, 69, .35);
  color: #ffaaae;
}
.auth-alert--error strong { color: #ff8590; }
.auth-alert--warn {
  background: rgba(240, 100, 35, .1);
  border: 1px solid rgba(240, 100, 35, .35);
  color: #ffc59f;
}
.auth-alert--warn strong { color: #ffaa78; }

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--auth-text-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-forgot {
  font-size: 11px;
  color: #ffb38a;
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.auth-forgot:hover { color: #F06423; text-decoration: underline; }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  color: var(--auth-text-3);
  pointer-events: none;
  transition: color .2s;
}
.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: background .2s, border-color .2s, box-shadow .25s;
}
.auth-input::placeholder { color: rgba(255,255,255,.3); }
.auth-input:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.auth-input:focus,
.auth-input-wrap:focus-within .auth-input {
  background: rgba(255,255,255,.08);
  border-color: rgba(240,100,35,.55);
  box-shadow: 0 0 0 4px rgba(240,100,35,.15);
}
.auth-input-wrap:focus-within .auth-input-icon { color: #ff9b6c; }
.auth-input-wrap.invalid .auth-input {
  border-color: rgba(220,53,69,.6);
  box-shadow: 0 0 0 4px rgba(220,53,69,.15);
  animation: shake .35s cubic-bezier(.36,.07,.19,.97);
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.auth-eye {
  position: absolute;
  right: 8px;
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--auth-text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.auth-eye:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Submit */
.auth-submit {
  position: relative;
  margin-top: 4px;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #F06423 0%, #c94e1a 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  transition: transform .12s, box-shadow .25s, filter .2s;
  box-shadow:
    0 10px 30px -8px rgba(240,100,35,.55),
    inset 0 1px 0 rgba(255,255,255,.18);
  letter-spacing: .3px;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 36px -8px rgba(240,100,35,.7),
    inset 0 1px 0 rgba(255,255,255,.24);
  filter: brightness(1.05);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { cursor: wait; opacity: .85; }

.auth-submit-icon {
  display: inline-flex;
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.auth-submit:hover .auth-submit-icon { transform: translateX(4px); }

.auth-submit-shine {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.auth-submit:hover .auth-submit-shine { animation: shine .8s ease; }
@keyframes shine {
  to { left: 125%; }
}

/* Loading state */
.auth-submit.loading .auth-submit-label::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinSm .6s linear infinite;
  vertical-align: -2px;
}
.auth-submit.loading .auth-submit-icon { opacity: 0; }
.auth-submit.loading .auth-submit-label { font-size: 0; }
.auth-submit.loading .auth-submit-label::before {
  content: 'Autenticando';
  font-size: 14.5px;
}
@keyframes spinSm { to { transform: rotate(360deg); } }

/* Form foot */
.auth-form-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--auth-text-3);
  justify-content: center;
  margin-top: 2px;
}
.auth-form-foot-icon { display: inline-flex; color: #6ad18a; }

/* ════════════════════════════════════════════════════════════════════════
   VERSION PILL
═══════════════════════════════════════════════════════════════════════ */
.auth-version {
  position: fixed;
  bottom: 16px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(255,255,255,.32);
  z-index: 2;
  letter-spacing: .3px;
  transition: color .2s;
}
.auth-version:hover { color: rgba(255,255,255,.7); }
.auth-version code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    padding: 40px 36px;
    gap: 36px;
    align-content: start;
    align-items: start;
  }
  html, body { overflow-x: hidden; overflow-y: auto; }
  .auth-bg { position: fixed; }
}

/* ─── Telas de pouca ALTURA (notebooks 1366×768, 1440×900, etc.) ─────────
   Compacta o hero verticalmente para caber sem corte. Se ainda assim não
   couber, o scroll vertical (liberado no html/body) garante visibilidade
   de todas as informações, incluindo o trust signal do rodapé. */
@media (max-height: 860px) {
  .auth-wrap { padding-top: 40px; padding-bottom: 40px; }
  .auth-hero { gap: 20px; }
  .auth-headline { gap: 10px; }
  .auth-title { font-size: clamp(26px, 3.2vw, 40px); }
  .auth-subtitle { font-size: 13.5px; line-height: 1.55; margin-top: 4px; }
  .auth-demo { gap: 10px; margin-top: 2px; }
  .auth-demo-card { padding: 12px 14px; }
  .auth-demo-icon { width: 28px; height: 28px; margin-bottom: 2px; }
  .auth-demo-value { font-size: 18px; }
  .auth-brand-icon { width: 42px; height: 42px; font-size: 16px; }
  .auth-trust-stat strong { font-size: 19px; }
  .auth-form-card { padding: 28px; }
}
@media (max-height: 680px) {
  .auth-wrap { align-items: start; padding-top: 32px; padding-bottom: 32px; }
  .auth-hero { gap: 16px; }
  .auth-demo { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .auth-wrap { padding: 28px 22px; gap: 28px; }
  .auth-form-card { padding: 24px; border-radius: 18px; }
  .auth-demo { grid-template-columns: 1fr; max-width: none; }
  .auth-demo-card--wide { grid-column: auto; flex-direction: column; align-items: flex-start; }
  .auth-trust { flex-wrap: wrap; gap: 14px; }
  .auth-trust-sep { display: none; }
  .auth-title { font-size: 30px; }
  .auth-subtitle { font-size: 13.5px; }
}
@media (max-width: 420px) {
  .auth-form-card { padding: 20px; }
}

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