/* ═══════════════════════════════════════════════════════════════
   auth.css — Telas SEM login do WePrinter (entrar, MFA, cadastro).
   Mesmo layout split-screen do WeProspect+/WeChurch+: painel da
   marca a esquerda, formulario a direita.

   Estas paginas NAO carregam Bootstrap (ver base_auth.html): o
   arquivo traz os proprios primitivos de formulario. Tudo escopado
   em .auth-* / .form-control dentro do wrapper, sem estilo global.
   ═══════════════════════════════════════════════════════════════ */

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

body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.auth-wrapper { display: flex; min-height: 100vh; }

/* ── Painel esquerdo (marca) ── */
.auth-left {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-primary, #e10084) 0%, var(--brand-secondary, #b4008f) 50%, var(--brand-primary, #e10084) 100%);
  background-size: 200% 200%;
  animation: authGradient 9s ease infinite;
  display: flex; align-items: center; justify-content: center;
}
@keyframes authGradient { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }

.auth-left-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-left-bg span { position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.auth-left-bg span:nth-child(1){ width:360px;height:360px;top:-80px;left:-80px; animation:authOrb1 13s ease-in-out infinite; }
.auth-left-bg span:nth-child(2){ width:240px;height:240px;bottom:60px;right:-60px; animation:authOrb2 11s ease-in-out infinite; }
.auth-left-bg span:nth-child(3){ width:140px;height:140px;bottom:200px;left:60px; animation:authOrb3 15s ease-in-out infinite; }
@keyframes authOrb1{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(30px,20px) scale(1.05)}66%{transform:translate(-15px,35px) scale(.97)}}
@keyframes authOrb2{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(-25px,-15px) scale(1.03)}66%{transform:translate(20px,-30px) scale(.95)}}
@keyframes authOrb3{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(20px,-25px) scale(1.08)}}

.auth-left-content {
  position: relative; z-index: 2; text-align: center; padding: 48px 40px; color: #fff;
  max-width: 460px; animation: authFade .8s .25s ease both;
}
@keyframes authFade { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

/* Fundo BRANCO de proposito: a marca do WePrinter e um quadrado magenta e o
   painel atras dela tambem e magenta — sem a placa branca o logo some no
   gradiente. O raio acompanha o do proprio simbolo, para nao virar "quadrado
   dentro de circulo". */
.auth-logo {
  height: 96px; width: 96px; padding: 9px; margin: 0 auto 26px; display: block; object-fit: contain;
  background: #fff; border-radius: 26px;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
}
.auth-logo:hover { transform: translateY(-4px) scale(1.06) rotate(-4deg); box-shadow: 0 22px 60px rgba(0,0,0,.3); }

.auth-headline { font-size: 1.8rem; font-weight: 800; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.02em; }
.auth-tagline { font-size: 1rem; opacity: .82; margin: 0; line-height: 1.5; }

/* Beneficios listados no painel da marca (cadastro). */
.auth-beneficios { list-style: none; margin: 26px 0 0; padding: 0; text-align: left; display: grid; gap: 10px; }
.auth-beneficios li { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; opacity: .9; line-height: 1.45; }
.auth-beneficios i { flex: 0 0 auto; margin-top: .15rem; }

/* ── Painel direito (formulario) ── */
.auth-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 32px; animation: authFade .65s ease both;
}
.auth-form-wrap { width: 100%; max-width: 420px; }

.auth-form-header { margin-bottom: 26px; }
.auth-form-header h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; color: #0f172a; letter-spacing: -.02em; }
.auth-form-header p { color: #64748b; font-size: .95rem; margin: 0; line-height: 1.5; }

/* ── Campos ── */
.auth-field { margin-bottom: 16px; }
.auth-label { display: block; font-size: .82rem; font-weight: 600; color: #334155; margin-bottom: 6px; }
.auth-label .auth-label-extra { font-weight: 400; color: #94a3b8; }

.auth-wrapper .form-control {
  width: 100%; display: block;
  border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: .78rem .9rem; background: #f9fafb; color: #0f172a;
  font-family: inherit; font-size: .95rem; line-height: 1.4;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease, transform .2s ease;
}
.auth-wrapper .form-control::placeholder { color: #a3aab8; }
.auth-wrapper .form-control:focus {
  outline: none; background: #fff;
  border-color: var(--brand-primary, #e10084);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #e10084) 18%, transparent);
  transform: translateY(-1px);
}
.auth-wrapper textarea.form-control { resize: none; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }

.auth-pass-wrap { position: relative; }
.auth-pass-wrap .form-control { padding-right: 42px; }
.btn-show-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer;
  padding: 4px 6px; font-size: 1.1rem; line-height: 1;
}
.btn-show-pass:hover { color: var(--brand-primary, #e10084); }

/* Codigo de uso unico (TOTP / codigo de reserva). */
.auth-codigo {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 1.35rem; letter-spacing: .35em; text-align: center; text-indent: .35em;
  text-transform: uppercase; font-weight: 700;
}

/* ── Botoes ── */
.btn-entrar, .btn-secundario {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 13px; font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease, opacity .2s;
}
.btn-entrar {
  border: none; color: #fff;
  background: linear-gradient(135deg, var(--brand-primary, #e10084), var(--brand-secondary, #b4008f));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-primary, #e10084) 25%, transparent);
}
.btn-entrar:hover { transform: translateY(-2px); box-shadow: 0 10px 26px color-mix(in srgb, var(--brand-primary, #e10084) 35%, transparent); color: #fff; }
.btn-entrar:disabled { opacity: .65; cursor: progress; transform: none; box-shadow: none; }

.btn-secundario { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; font-weight: 600; font-size: .92rem; }
.btn-secundario:hover { background: #e2e8f0; color: #1e293b; }

/* ── Avisos ── */
.auth-alert {
  margin: 0 0 16px; padding: 11px 13px; border-radius: 12px;
  font-size: .85rem; line-height: 1.5;
  background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155;
}
.auth-alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.auth-alert--danger  { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.auth-alert--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.auth-alert--quebra  { word-break: break-all; }

/* ── Textos auxiliares ── */
.auth-hint { margin: 16px 0 0; font-size: .78rem; color: #94a3b8; line-height: 1.6; }
.auth-rodape { margin: 20px 0 0; text-align: center; color: #64748b; font-size: .85rem; }
.auth-rodape a, .auth-link { color: var(--brand-primary, #e10084); text-decoration: none; font-weight: 600; }
.auth-rodape a:hover, .auth-link:hover { text-decoration: underline; }
.auth-passos { margin: 0 0 18px; padding-left: 18px; color: #334155; font-size: .85rem; line-height: 1.75; }
.auth-divisor { border: none; border-top: 1px solid #e2e8f0; margin: 22px 0 18px; }
/* Lista de "o que acontece agora" do /obrigado. Fica na COLUNA DIREITA, entao
   nao da para reaproveitar `.auth-beneficios` — aquela e branca sobre o
   gradiente da marca e some no mobile. */
.auth-proximos { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.auth-proximos li { display: flex; align-items: flex-start; gap: 10px; font-size: .85rem; color: #475569; line-height: 1.55; }
.auth-proximos i { flex: 0 0 auto; margin-top: .15rem; color: var(--brand-primary, #e10084); }

/* ── Cartoes de escolha (trial x assinar, forma de pagamento) ── */
.auth-opcoes { display: grid; gap: 10px; margin-bottom: 20px; }
.auth-opcao {
  display: block; border: 2px solid #e2e8f0; border-radius: 14px; padding: 14px;
  cursor: pointer; background: #fff; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.auth-opcao:hover { border-color: #cbd5e1; }
.auth-opcao.is-selecionada {
  border-color: var(--brand-primary, #e10084);
  background: color-mix(in srgb, var(--brand-primary, #e10084) 5%, #fff);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-primary, #e10084) 12%, transparent);
}
.auth-opcao input { margin-right: 8px; accent-color: var(--brand-primary, #e10084); }
.auth-opcao-titulo { font-weight: 700; color: #0f172a; font-size: .95rem; }
.auth-opcao-desc { display: block; margin: 6px 0 0 24px; color: #64748b; font-size: .83rem; line-height: 1.5; }
.auth-opcao--linha { padding: 11px 13px; border-width: 1px; font-size: .88rem; color: #334155; }
.auth-destaque { color: #16a34a; font-weight: 600; }
.auth-valor { color: #0f172a; font-weight: 700; }

/* ── MFA: QR, segredo e codigos de reserva ── */
.auth-qr { display: flex; justify-content: center; margin-bottom: 14px; }
.auth-qr > div { width: 190px; height: 190px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid #e2e8f0; }
.auth-qr svg, .auth-qr img { width: 100%; height: 100%; display: block; }
.auth-qr-img { display: block; width: 200px; height: 200px; margin: 0 auto 14px; border-radius: 12px; background: #fff; }
.auth-secret {
  margin: 0 0 20px; padding: 11px 13px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .85rem; letter-spacing: 1px; color: #0f172a; word-break: break-all;
}
.auth-codigos {
  padding: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-bottom: 18px;
}
.auth-codigos span {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .95rem; letter-spacing: 1px; color: #0f172a;
}

/* ── Responsivo ── */
@media (max-width: 860px) {
  .auth-wrapper { flex-direction: column; }
  .auth-left { flex: none; min-height: 210px; }
  .auth-left-content { padding: 32px 24px; }
  .auth-headline { font-size: 1.4rem; }
  .auth-logo { height: 64px; width: 64px; margin-bottom: 18px; }
  .auth-beneficios { display: none; }
  .auth-right { padding: 28px 20px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-wrapper *, .auth-wrapper *::before, .auth-wrapper *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   Tema escuro — pagina standalone (nao carrega theme.css)
   ═══════════════════════════════════════════════════════════════ */
html[data-bs-theme="dark"] body { background: #0b1220; color: #e5e7eb; }
html[data-bs-theme="dark"] .auth-right { background: #111c2f; }
html[data-bs-theme="dark"] .auth-form-header h1 { color: #f1f5f9; }
html[data-bs-theme="dark"] .auth-form-header p { color: #94a3b8; }
html[data-bs-theme="dark"] .auth-label { color: #cbd5e1; }
html[data-bs-theme="dark"] .auth-label .auth-label-extra { color: #64748b; }
html[data-bs-theme="dark"] .auth-wrapper .form-control {
  background: #182338; border-color: #243149; color: #e5e7eb;
}
html[data-bs-theme="dark"] .auth-wrapper .form-control:focus { background: #1f2c45; }
html[data-bs-theme="dark"] .auth-wrapper .form-control::placeholder { color: #64748b; }
html[data-bs-theme="dark"] .btn-secundario { background: #182338; color: #cbd5e1; border-color: #243149; }
html[data-bs-theme="dark"] .btn-secundario:hover { background: #1f2c45; color: #fff; }
html[data-bs-theme="dark"] .auth-alert { background: #182338; border-color: #243149; color: #cbd5e1; }
html[data-bs-theme="dark"] .auth-alert--success { background: rgba(22,163,74,.14); border-color: rgba(34,197,94,.35); color: #86efac; }
html[data-bs-theme="dark"] .auth-alert--danger  { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35); color: #fca5a5; }
html[data-bs-theme="dark"] .auth-alert--warning { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35); color: #fcd34d; }
html[data-bs-theme="dark"] .auth-rodape { color: #94a3b8; }
html[data-bs-theme="dark"] .auth-hint { color: #64748b; }
html[data-bs-theme="dark"] .auth-passos { color: #cbd5e1; }
html[data-bs-theme="dark"] .auth-proximos li { color: #94a3b8; }
html[data-bs-theme="dark"] .auth-divisor { border-top-color: #243149; }
html[data-bs-theme="dark"] .auth-opcao { background: #182338; border-color: #243149; }
html[data-bs-theme="dark"] .auth-opcao:hover { border-color: #33415a; }
html[data-bs-theme="dark"] .auth-opcao.is-selecionada { background: #1f2c45; border-color: #f472c0; }
html[data-bs-theme="dark"] .auth-opcao-titulo, html[data-bs-theme="dark"] .auth-valor { color: #f1f5f9; }
html[data-bs-theme="dark"] .auth-opcao-desc { color: #94a3b8; }
html[data-bs-theme="dark"] .auth-opcao--linha { color: #cbd5e1; }
html[data-bs-theme="dark"] .auth-secret,
html[data-bs-theme="dark"] .auth-codigos { background: #182338; border-color: #243149; }
html[data-bs-theme="dark"] .auth-secret,
html[data-bs-theme="dark"] .auth-codigos span { color: #e5e7eb; }
html[data-bs-theme="dark"] .auth-rodape a, html[data-bs-theme="dark"] .auth-link { color: #f9a8d8; }


/* ── Reenviar codigo (2o fator por e-mail) ── */
.auth-reenviar {
  width: 100%; margin-top: 12px; padding: 11px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px dashed #e2e8f0; border-radius: 12px;
  color: var(--brand-primary, #e10084); font-family: inherit; font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.auth-reenviar:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand-primary, #e10084) 6%, transparent);
  border-color: color-mix(in srgb, var(--brand-primary, #e10084) 45%, transparent);
}
.auth-reenviar:focus-visible { outline: 2px solid var(--brand-primary, #e10084); outline-offset: 2px; }
.auth-reenviar:disabled { color: #94a3b8; cursor: default; }
.auth-reenviar-tempo { font-weight: 500; font-variant-numeric: tabular-nums; }
html[data-bs-theme="dark"] .auth-reenviar { border-color: #1f2a3d; }
html[data-bs-theme="dark"] .auth-reenviar:disabled { color: #64748b; }
