/* ================================================
   NUTRI PRIME — LOGIN v4
   Usa as mesmas fontes e tokens do design-system
   ================================================ */

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

body {
  font-family: var(--font-body);    /* Roboto — igual ao sistema */
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ════════════════════════════════════════════════
   SPLASH (Apple-style)
   ════════════════════════════════════════════════ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.splash.hide {
  opacity: 0;
  pointer-events: none;
}

.splash__logo {
  width: 130px;
  height: auto;
  animation: splash-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash__pulse {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1.5px solid rgba(34,197,94,0.25);
  animation: splash-pulse 1.6s ease-out both;
  pointer-events: none;
}

@keyframes splash-pop {
  0%   { opacity: 0; transform: scale(0.72); }
  65%  { opacity: 1; transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes splash-pulse {
  0%   { opacity: 0.7; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(2.2); }
}

/* ════════════════════════════════════════════════
   OVERLAY DE VERIFICAÇÃO — tela cheia minimalista
   ════════════════════════════════════════════════ */
.verify-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;   /* dynamic viewport height — melhor no iOS */
  z-index: 99998;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.verify-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.verify-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

/* Spinner rotativo */
.verify-spinner svg {
  animation: verify-spin 0.8s linear infinite;
  display: block;
}

@keyframes verify-spin {
  to { transform: rotate(360deg); }
}

/* Ícone de resultado (check ou X) — injetado por JS */
.verify-result svg {
  animation: result-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes result-pop {
  0%   { opacity: 0; transform: scale(0.5); }
  70%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.verify-result__label {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  animation: result-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* Check animado */
.svg-check-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: draw-ring 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
.svg-check-mark {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw-mark 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0.48s forwards;
}
.svg-x-ring {
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: draw-ring 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes draw-mark { to { stroke-dashoffset: 0; } }

/* ════════════════════════════════════════════════
   BACKGROUND AMBIENTAL
   ════════════════════════════════════════════════ */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,197,94,0.09) 0%, transparent 70%);
  top: -20%; right: -10%;
  animation: orb-drift 20s ease-in-out infinite;
}

.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(29,144,8,0.06) 0%, transparent 70%);
  bottom: -15%; left: -10%;
  animation: orb-drift 24s ease-in-out infinite reverse;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50%  { transform: translate(20px, -30px); }
}

/* ════════════════════════════════════════════════
   PÁGINA
   ════════════════════════════════════════════════ */
.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-page.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ════════════════════════════════════════════════
   LOGO
   ════════════════════════════════════════════════ */
.lp-logo {
  text-align: center;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.lp-logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ════════════════════════════════════════════════
   CARD
   ════════════════════════════════════════════════ */
.lp-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 22px;
  padding: 32px 28px 26px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 20px 50px rgba(0,0,0,0.07),
    0 4px 16px rgba(0,0,0,0.04);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.lp-card__title {
  font-family: var(--font-heading);   /* Poppins — igual ao sistema */
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  margin-bottom: 5px;
}

.lp-card__sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Campo ── */
.lp-field {
  position: relative;
  margin-bottom: 14px;
}

/* Wrapper só do input+ícone para o top:50% funcionar corretamente */
.lp-input-wrap {
  position: relative;
}

.lp-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

.lp-field:focus-within .lp-input-wrap .lp-input-icon { color: var(--accent); }

.lp-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: rgba(255,255,255,0.6);
  border: 1.5px solid var(--border-glass);
  border-radius: 13px;
  font-family: var(--font-body);     /* Roboto */
  font-size: 0.9375rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
}

.lp-input::placeholder { color: var(--text-muted); }

.lp-input:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}



.lp-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.09);
}

/* Erro inline */
.lp-error {
  font-size: 0.8125rem;
  color: var(--red);
  font-weight: 500;
  margin-top: 7px;
  padding-left: 4px;
  display: none;
  animation: rise 0.2s ease both;
}

.lp-error.show { display: block; }

/* ── Botão ── */
.lp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 20px;
  background: var(--gradient-accent);   /* gradiente do sistema */
  color: #fff;
  border: none;
  border-radius: 13px;
  font-family: var(--font-heading);     /* Poppins */
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34,197,94,0.32), 0 1px 0 rgba(255,255,255,0.2) inset;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.lp-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.6s ease;
}

.lp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34,197,94,0.42);
}

.lp-btn:hover::after { background-position: -100% 0; }
.lp-btn:active { transform: none; }

/* ── Footer ── */
.lp-card__footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 18px;
  border-top: 1px solid var(--border-glass);
}

.lp-card__footer a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.lp-card__footer a:hover { opacity: 0.75; }

/* ════════════════════════════════════════════════
   PROVA SOCIAL
   ════════════════════════════════════════════════ */
.lp-social {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.lp-social__stars {
  color: #f59e0b;
  font-size: 0.875rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.lp-social__quote {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 12px;
}

.lp-social__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-social__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-green);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-social__author strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.lp-social__author span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════
   KEYFRAMES BASE
   ════════════════════════════════════════════════ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

/* ════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════ */
@media (max-width: 440px) {
  .login-page { padding: 24px 16px 40px; gap: 12px; }
  .lp-card { padding: 26px 22px 22px; border-radius: 18px; }
  .lp-card__title { font-size: 1.3125rem; }
  .lp-logo img { height: 48px; }
}
