/* ══════════════════════════════════════════════════════════════
   LUNNA PRECIFICA — Auth Pages
   Poppins + Montserrat · Design premium feminino
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --purple-50:   #f5f0ff;
  --purple-100:  #ede5ff;
  --purple-500:  #8a4fff;
  --purple-600:  #7c3aed;
  --purple-700:  #6d28d9;
  --rose-400:    #ff7caa;
  --lilac-300:   #c9b6ff;
  --gray-100:    #f3f0f9;
  --gray-300:    #d4cce8;
  --gray-400:    #9d94b5;
  --gray-500:    #7a7295;
  --gray-600:    #5a5378;
  --gray-800:    #2a2448;
  --white:       #ffffff;
  --font-title:  'Poppins', system-ui, sans-serif;
  --font-body:   'Poppins', system-ui, sans-serif;
  --grad-primary: linear-gradient(135deg, #8a4fff 0%, #ff7caa 100%);
  --grad-art:     linear-gradient(160deg, #2d1b69 0%, #6d3fc9 55%, #8a4fff 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--gray-100);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout principal ────────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

/* Desktop: tudo cabe na tela, sem rolagem */
@media (min-width: 769px) {
  html, body { height: 100vh; overflow: hidden; }
  .auth-layout { height: 100vh; min-height: 100vh; }
}

/* ══════════════════════════════════════════════════════════════
   PAINEL ESQUERDO — Arte / Identidade
   ══════════════════════════════════════════════════════════════ */
.auth-art {
  width: 50%;
  flex-shrink: 0;
  background: var(--grad-art);
  position: relative;
  overflow: hidden;

  /* Centralizar todo o conteúdo vertical e horizontalmente */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vh, 48px) 40px;
  text-align: center;
}

/* Blobs decorativos */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .30;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 340px; height: 340px;
  background: var(--purple-500);
  top: -80px; right: -60px;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob-2 {
  width: 280px; height: 280px;
  background: var(--rose-400);
  bottom: -60px; left: -60px;
  animation: blobFloat 10s ease-in-out infinite alternate-reverse;
}
.blob-3 {
  width: 200px; height: 200px;
  background: #c084fc;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: .15;
}

@keyframes blobFloat {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.08) translateY(-12px); }
}

/* Conteúdo centralizado */
.auth-art-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
}

/* Mascote */
.art-mascot {
  width: clamp(90px, 14vh, 130px);
  height: clamp(90px, 14vh, 130px);
  object-fit: contain;
  display: block;
  margin: 0 auto clamp(14px, 2.5vh, 28px);
  filter: drop-shadow(0 8px 24px rgba(255,255,255,.20));
  animation: mascotFloat 4s ease-in-out infinite;
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.art-icon {
  font-size: 64px;
  display: block;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 16px rgba(255,255,255,.3));
  animation: mascotFloat 4s ease-in-out infinite;
}

.auth-art-content h1 {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 2.6vh, 1.75rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.auth-art-content p {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* Features */
.auth-art-features {
  position: relative;
  z-index: 1;
  margin-top: clamp(18px, 3vh, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vh, 12px);
  width: 100%;
  max-width: 340px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: clamp(8px, 1.3vh, 10px) 16px;
  width: 100%;
  text-align: left;
  transition: background .2s;
}

.auth-feature:hover {
  background: rgba(255,255,255,.12);
}

.feature-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Prova social */
.auth-social-proof {
  position: relative;
  z-index: 1;
  margin-top: clamp(12px, 2.2vh, 22px);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   PAINEL DIREITO — Formulário
   ══════════════════════════════════════════════════════════════ */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 32px) 24px;
  background: #ffffff;
  overflow-y: auto;
}

.auth-form-box {
  width: 100%;
  max-width: 480px;
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(14px, 2.4vh, 28px);
}

.logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(124,58,237,.35);
  flex-shrink: 0;
}

.logo-mascot {
  width: 40px; height: 40px;
  object-fit: contain;
  border-radius: 12px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-800);
  letter-spacing: -.2px;
}

/* Header */
.auth-header { margin-bottom: clamp(14px, 2.2vh, 24px); }
.auth-header h2 {
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 4px;
}
.auth-header p { font-size: 14px; color: var(--gray-400); }

/* Alert */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.4;
}
.auth-alert.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.auth-alert.success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* Fields */
.auth-field { margin-bottom: clamp(10px, 1.8vh, 16px); }

.auth-field label {
  display: block;
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: .2px;
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 13px;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.auth-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--gray-300);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: all .25s ease;
  outline: none;
}
.auth-input::placeholder { color: var(--gray-400); }
.auth-input:hover  { border-color: var(--lilac-300); }
.auth-input:focus  {
  border-color: var(--rose-400);
  box-shadow: 0 0 0 4px rgba(255,124,170,.18);
}

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--gray-400);
  padding: 4px;
  transition: color .2s;
  z-index: 1;
}
.toggle-pass:hover { color: var(--gray-700); }

/* Options */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(12px, 2vh, 20px);
  font-size: 13px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  cursor: pointer;
}
.remember input { accent-color: var(--purple-600); }
.auth-options a { color: var(--purple-600); font-weight: 600; }
.auth-options a:hover { text-decoration: underline; }

/* Botão */
.auth-btn {
  width: 100%;
  padding: 14px;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(138,79,255,.38), 0 4px 10px rgba(255,124,170,.25);
  margin-bottom: clamp(10px, 1.6vh, 14px);
}
.auth-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 30px rgba(138,79,255,.45), 0 6px 14px rgba(255,124,170,.35);
}
.auth-btn:active  { transform: translateY(0) scale(1); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Aviso de segurança */
.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: clamp(12px, 2vh, 18px);
  line-height: 1.4;
}

/* Switch */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
}
.auth-switch a {
  color: var(--purple-600);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}
.auth-switch a:hover { text-decoration: underline; }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   MOBILE — painel esquerdo vira banner no topo
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .auth-layout {
    flex-direction: column;
  }

  /* Painel esquerdo: banner centralizado no topo */
  .auth-art {
    width: 100%;
    padding: 28px 24px 24px;
    flex-direction: column;    /* coluna → mascote em cima, texto embaixo */
    align-items: center;       /* centralizado */
    justify-content: center;
    text-align: center;        /* texto centralizado */
    min-height: auto;
    gap: 12px;
  }

  .blob-1 { width: 180px; height: 180px; top: -50px; right: -30px; }
  .blob-2 { width: 140px; height: 140px; bottom: -30px; left: -30px; }
  .blob-3 { display: none; }

  /* Mascote menor e centralizada */
  .art-mascot {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    flex-shrink: 0;
    animation: none;
  }

  .art-icon {
    font-size: 40px;
    margin: 0 auto;
    flex-shrink: 0;
    animation: none;
  }

  /* Conteúdo centralizado */
  .auth-art-content {
    align-items: center;
    text-align: center;
    max-width: 340px;
    margin: 0 auto;
  }

  .auth-art-content h1 {
    font-size: 1.25rem;
    margin-bottom: 6px;
    text-align: center;
  }

  .auth-art-content p {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    margin: 0 auto;
    text-align: center;
    max-width: 280px;
  }

  /* Features: mostrar de forma compacta e centralizada */
  .auth-art-features {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 360px;
    margin: 4px auto 0;
  }

  .auth-feature {
    padding: 6px 10px;
    font-size: 11px;
    width: auto;         /* não ocupa linha inteira no mobile */
    flex: 0 1 auto;
  }

  .auth-social-proof {
    margin-top: 10px;
    font-size: 12px;
  }

  /* Formulário */
  .auth-form-side {
    flex: 1;
    padding: 28px 20px 40px;
    align-items: center;
  }
}

@media (max-width: 420px) {
  .auth-art { padding: 20px 16px 18px; gap: 10px; }
  .auth-art-content h1 { font-size: 1.1rem; }
  .art-mascot { width: 60px; height: 60px; }
  .auth-form-side { padding: 20px 16px 36px; }
  .auth-art-features { display: none; } /* em telas muito pequenas esconde */
}
