/* ====================================================================
   login.css — tela de acesso (Entrar / Criar conta / Esqueci a senha /
   Nova senha). Usa os tokens de cor e fontes de style.css.
   ==================================================================== */
.auth-body { margin: 0; min-height: 100vh; background: var(--canvas); }

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* ---------- Lado da marca ---------- */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: #0D3B30;
  color: #fff;
  padding: 40px clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  gap: 40px;
}
/* textura sutil: grade de pontos, lembra papel de cupom */
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.auth-brand > * { position: relative; }

.auth-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.01em; }
.auth-logo .brand-mark { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }
.auth-logo .brand-mark::after { inset: 8px; }

.auth-pitch { margin-top: auto; }
.auth-pitch h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  max-width: 17ch;
}
.auth-pitch p { margin: 16px 0 0; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.72); max-width: 42ch; }

/* Exemplo da mensagem no WhatsApp */
.auth-preview {
  margin: 0 0 auto;
  width: min(360px, 100%);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
  transform-origin: left top;
}
.auth-chat-head { display: flex; align-items: center; gap: 10px; background: #0E7A5F; padding: 10px 14px; }
.auth-chat-avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.auth-chat-head div { display: flex; flex-direction: column; line-height: 1.2; }
.auth-chat-head strong { font-size: 13.5px; }
.auth-chat-head span { font-size: 11.5px; color: rgba(255, 255, 255, 0.75); }
.auth-chat-body { background: #E9E2D6; padding: 14px; }
.auth-bubble {
  background: #fff;
  color: #111B21;
  border-radius: 10px;
  border-top-left-radius: 2px;
  padding: 6px 8px 8px;
  font-size: 13px;
  line-height: 1.45;
  position: relative;
}
.auth-bubble p { margin: 0 0 4px; }
.auth-bubble-img { background: #DCE6E2; border-radius: 7px; display: flex; justify-content: center; margin-bottom: 8px; }
.auth-bubble-title { font-weight: 600; }
.auth-old { color: #8696A0; text-decoration: line-through; margin-right: 4px; }
.auth-link { color: #027EB5; }
.auth-bubble-time { display: block; text-align: right; font-size: 11px; color: #8696A0; margin-top: -2px; }
.auth-bubble-time span { color: #53BDEB; }

/* ---------- Lado do formulário ---------- */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  background: var(--surface);
}
.auth-form-wrap { width: 100%; max-width: 380px; margin: auto 0; }
.auth-view.hidden { display: none; }

.auth-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.auth-sub { margin: 8px 0 28px; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }

.auth-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 18px 0 7px; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 7px; }
.auth-label-row .auth-label { margin: 0; }
.auth-link-sm { font-size: 13px; font-weight: 600; color: var(--jade-deep); text-decoration: none; }
.auth-link-sm:hover { text-decoration: underline; }

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-size: 16px; /* 16px evita o zoom automático do iPhone ao focar */
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-input:hover { border-color: #C3C8D1; }
.auth-input:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 4px var(--jade-soft); }
.auth-input:first-child + .auth-label { margin-top: 18px; }

.auth-password { position: relative; }
.auth-password .auth-input { padding-right: 48px; }
.auth-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--slate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.auth-eye:hover { color: var(--ink); background: var(--surface-sunken); }
.auth-eye:focus-visible { outline: 2px solid var(--jade); outline-offset: 1px; }

.auth-help { margin: 7px 0 0; font-size: 12.5px; color: var(--slate); }

.auth-btn {
  width: 100%;
  height: 50px;
  margin-top: 26px;
  border: none;
  border-radius: 12px;
  background: var(--jade);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-btn:hover { background: var(--jade-deep); }
.auth-btn:focus-visible { outline: 3px solid var(--jade-soft); outline-offset: 2px; }
.auth-btn:disabled { opacity: 0.6; cursor: progress; }
.auth-btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.auth-btn-ghost:hover { background: var(--surface-sunken); }

.auth-error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--coral-soft);
  color: #9C2B2F;
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-alert {
  margin: -12px 0 18px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--jade-soft);
  color: var(--jade-deep);
  font-size: 13.5px;
  font-weight: 600;
}
.auth-error.hidden, .auth-alert.hidden { display: none; }

.auth-switch { margin: 24px 0 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
.auth-switch a { color: var(--jade-deep); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--jade-soft);
  color: var(--jade-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-foot { margin: 32px 0 0; font-size: 12px; color: var(--slate); text-align: center; }

/* ---------- Telas médias: a prévia some, a marca encolhe ---------- */
@media (max-width: 1100px) {
  .auth { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
  .auth-preview { display: none; }
  .auth-pitch { margin-bottom: auto; }
}

/* ---------- Celular: marca vira uma faixa no topo ---------- */
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand {
    padding: 20px 20px 26px;
    padding-top: max(20px, env(safe-area-inset-top));
    gap: 16px;
  }
  .auth-pitch { margin: 0; }
  .auth-pitch h2 { font-size: 21px; max-width: 24ch; }
  .auth-pitch p { display: none; }

  .auth-panel {
    justify-content: flex-start;
    padding: 28px 20px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    margin-top: -14px;
    position: relative;
  }
  .auth-form-wrap { margin: 0; }
  .auth-title { font-size: 26px; }
  .auth-sub { margin-bottom: 22px; font-size: 14.5px; }
  .auth-foot { margin-top: 28px; }
}

@media (max-width: 360px) {
  .auth-pitch h2 { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
