/* ===========================================================================
   tz-porta.css — a PORTA de entrada da Tizze (v2, 13/08/2026)
   ---------------------------------------------------------------------------
   Uma linguagem só para TODAS as telas de entrada: login.php (a porta),
   recover-password.php (senha nova) e verify-email.php (e-mail confirmado).
   Antes cada uma tinha o seu próprio <style>, com paletas que já não batiam
   entre si — quem vinha do site caía numa tela, quem vinha do app caía em
   outra. Aqui mora o ouro/escuro dos tokens (css/tokens.css), e nada mais.

   Depende de css/tokens.css estar carregado ANTES (é de lá que vêm --accent,
   --bg-primary, --font-sans e companhia).
   =========================================================================== */

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

body.tz-porta {
  margin: 0;
  min-height: 100vh;
  padding: 32px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(680px 300px at 50% 0%, rgba(215,183,104,.08), transparent 70%),
    var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans), Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tz-porta-box { width: 100%; max-width: 392px; }

/* ── Marca ───────────────────────────────────────────────────────────────── */
.tz-porta-marca { text-align: center; margin-bottom: 24px; }
.tz-porta-marca img { display: block; margin: 0 auto; height: 44px; width: auto; }
.tz-porta-marca-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: .12em;
}

/* ── Cartão ──────────────────────────────────────────────────────────────── */
.tz-porta-cartao {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}

.tz-porta-cartao h1 {
  font-family: var(--font-sans), Inter, system-ui, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.25;
  margin: 0 0 6px;
}
.tz-porta-sub {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.tz-porta-sub a { color: var(--accent); text-decoration: none; }
.tz-porta-sub a:hover { text-decoration: underline; }

/* ── Campos ──────────────────────────────────────────────────────────────── */
.tz-campo { margin-bottom: 14px; }
.tz-campo label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.tz-campo input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;              /* 16px evita o zoom automático do iPhone */
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.tz-campo input::placeholder { color: var(--text-muted); }
.tz-campo input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.tz-dica { color: var(--text-muted); font-size: 11.5px; margin: 6px 0 0; }

/* Campo de senha com o olhinho de mostrar/ocultar */
.tz-campo-senha { position: relative; }
.tz-campo-senha input { padding-right: 46px; }
.tz-olho {
  position: absolute;
  right: 10px;
  bottom: 9px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  border-radius: 8px;
}
.tz-olho:hover { color: var(--accent); }
.tz-olho:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 1px; }

/* ── Botões ──────────────────────────────────────────────────────────────── */
.tz-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #17150E;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--transition-fast), transform 120ms;
}
.tz-btn:hover { background: var(--accent-hover); }
.tz-btn:active { transform: scale(.985); }
.tz-btn:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; }
.tz-btn[disabled] { opacity: .55; cursor: progress; }

.tz-btn-fantasma {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.tz-btn-fantasma:hover { background: rgba(255,255,255,.04); }

.tz-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  color: #1F2328;
  font-weight: 500;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.12);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.tz-btn-google:hover { background: #f2f2f2; box-shadow: 0 2px 14px rgba(0,0,0,.22); }
.tz-btn-google svg { width: 18px; height: 18px; }

/* ── Separador "ou" ──────────────────────────────────────────────────────── */
.tz-ou {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tz-ou::before, .tz-ou::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Crachá do e-mail já informado (com o "trocar") ──────────────────────── */
.tz-cracha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.tz-cracha-email {
  font-size: 13.5px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tz-cracha button, .tz-cracha a {
  flex: 0 0 auto;
  background: none;
  border: 0;
  padding: 2px;
  color: var(--accent);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.tz-cracha button:hover, .tz-cracha a:hover { text-decoration: underline; }

/* ── Avisos ──────────────────────────────────────────────────────────────── */
.tz-erro, .tz-ok {
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 15px;
}
.tz-erro {
  background: rgba(228,88,88,.11);
  border: 1px solid rgba(228,88,88,.32);
  color: #F3A9A9;
}
.tz-erro a { color: #F3A9A9; font-weight: 600; }
.tz-ok {
  background: rgba(93,214,138,.10);
  border: 1px solid rgba(93,214,138,.30);
  color: var(--success);
}

/* ── "O que você escreveu está guardado" ─────────────────────────────────────
   Aparece só quando existe rascunho no navegador. Tem que ser visível de
   verdade: restaurar em silêncio é o mesmo que perder, do ponto de vista de
   quem escreveu. */
.tz-rascunho {
  background: rgba(215,183,104,.07);
  border: 1px solid rgba(215,183,104,.28);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.tz-rascunho-titulo {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.tz-rascunho-texto {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
  overflow-wrap: anywhere;
}
.tz-rascunho-nota {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* ── Rodapé do cartão ────────────────────────────────────────────────────── */
.tz-rodape {
  color: var(--text-muted);
  font-size: 11.5px;
  text-align: center;
  margin-top: 16px;
  line-height: 1.65;
}
.tz-rodape a { color: var(--accent); text-decoration: none; }
.tz-rodape a:hover { text-decoration: underline; }

.tz-link-secundario {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  background: none;
  border: 0;
  width: 100%;
  font-family: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.tz-link-secundario:hover { text-decoration: underline; }

/* ── Selo de "não sou robô" ──────────────────────────────────────────────── */
.tz-robo { margin: 4px 0 14px; min-height: 65px; }
.tz-robo:empty { min-height: 0; margin: 0; }

/* ── Etapas (só uma aparece por vez) ─────────────────────────────────────── */
.tz-etapa[hidden] { display: none; }
.tz-etapa { animation: tzPortaEntra 220ms cubic-bezier(.16,1,.3,1) both; }
@keyframes tzPortaEntra {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Selo redondo das telas de recado (verify-email) ─────────────────────── */
.tz-porta-selo {
  width: 46px; height: 46px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
}
.tz-porta-selo.bom  { background: rgba(93,214,138,.14); color: var(--success); border: 1px solid rgba(93,214,138,.34); }
.tz-porta-selo.ruim { background: rgba(228,88,88,.11);  color: #F3A9A9;        border: 1px solid rgba(228,88,88,.30); }
.tz-porta-centro { text-align: center; }
.tz-porta-centro p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin: 0 0 6px; }
.tz-porta-centro .tz-btn { display: inline-block; width: auto; margin-top: 18px; padding: 12px 24px; }

@media (max-width: 430px) {
  body.tz-porta { padding: 20px 14px; }
  .tz-porta-cartao { padding: 24px 20px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
