/* ============================================================
   LOGIN PAGE — estilos aplicados apenas quando #app.login-view
   ============================================================ */

body.on-login #app-nav { display: none; }
body.on-login #app-footer { display: none; }

#app.login-view { transition: none; }

/* Brilho âmbar ambiente, contido atrás do cartão. */
#app.login-view::after {
  content: '';
  position: fixed;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: 460px;
  height: 360px;
  background: radial-gradient(ellipse at center, var(--amber-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.login-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 3rem);
  max-width: 380px;
  z-index: 1;
}

.login-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: block;
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo span { color: var(--amber); }

.login-box {
  background: var(--ink-2);
  border: 1px solid var(--wire-2);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
}

/* ── Cabeçalho ── */
.login-head {
  text-align: center;
  margin-bottom: 2.25rem;
  padding: 0 0.5rem;
}

.login-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4375rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin: 0 auto;
  max-width: 17rem;
}

.login-title span { color: var(--amber); }

.login-sub {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}

/* ── Botões sociais ── */
.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.8125rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--wire-2);
  background: var(--ghost);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  margin-bottom: 0.625rem;
}

.social-btn:hover {
  background: var(--ghost-2);
  border-color: var(--wire);
  transform: translateY(-1px);
}

.social-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* O Google é a via principal: leve realce de contorno e fundo. */
.social-btn--primary {
  background: var(--ghost-2);
  border-color: var(--wire);
}

.social-btn--primary:hover { background: var(--ghost-3); }

/* ── Divisor ── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 1.375rem 0;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--wire-2);
}

.divider span {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  white-space: nowrap;
}

/* ── Linha de email (input + botão-ícone) ── */
.email-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.email-row .rx-input {
  flex: 1;
  min-width: 0;
}

.email-send {
  flex-shrink: 0;
  width: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}

.email-send:hover { background: var(--amber-2); transform: translateY(-1px); }

.email-send:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.email-send:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  background: var(--ghost-3);
  color: var(--text-3);
}

/* Durante o cooldown mostra o contador e esconde o ícone. */
.email-send.sending { opacity: 0.7; }

/* ── Validação inline ── */
.field-feedback {
  font-size: 0.75rem;
  color: var(--red);
  line-height: 1.4;
  margin-top: 0.4375rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.field-feedback.visible { max-height: 3rem; opacity: 1; }

.rx-input.rx-input--error,
.rx-input.rx-input--error:focus { border-color: var(--red); }

.action-feedback {
  font-size: 0.8125rem;
  color: var(--red);
  line-height: 1.45;
  text-align: center;
  margin-top: 0.75rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.action-feedback.visible { max-height: 4rem; opacity: 1; }

/* ── Estado de confirmação ── */
.state { display: none; }
.state.active { display: block; }

.success-box { text-align: center; padding: 0.5rem 0; }

.success-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.125rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ghost-2);
  border: 1px solid var(--wire-2);
  color: var(--amber);
}

.success-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.success-body {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 17rem;
}

.success-email {
  color: var(--text-2);
  font-family: 'DM Mono', monospace;
  font-size: 0.8125rem;
}

.resend-btn {
  margin-top: 1.5rem;
  width: 100%;
  background: var(--ghost-2);
  border: 1px solid var(--wire-2);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.resend-btn:hover:not(:disabled) { background: var(--ghost-3); border-color: var(--wire); }
.resend-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.resend-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.login-back-btn {
  margin-top: 0.875rem;
  background: none;
  border: none;
  color: var(--text-3);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.login-back-btn:hover { color: var(--text); }
.login-back-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  .field-feedback, .action-feedback, .social-btn, .email-send { transition: none; }
}