/* Elo — telas públicas (login, cadastro, senha, denúncia, enquete, currículo, certificado).
   Mesmo fundo da tela inicial (index.php); o cartão continua claro pra leitura dos formulários.
   Estiliza a marcação que as telas já usam (.auth-card/.cert-card, ícone do topo, card-footer,
   botão Voltar), então cada página só precisa incluir este arquivo. */
:root { --auth-bg: #0f172a; --auth-line: rgba(148,163,184,.16); --auth-accent: #3b82f6; }

html, body { min-height: 100%; }
body {
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(59,130,246,.22), transparent 60%),
    radial-gradient(700px 450px at 95% 110%, rgba(16,185,129,.14), transparent 60%),
    var(--auth-bg) !important;
  background-attachment: fixed !important;
  padding: 0 16px;
}
body::before { /* grade sutil, igual à tela inicial */
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .35; z-index: 0;
  background-image: linear-gradient(var(--auth-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--auth-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* Cartão */
.auth-card, .cert-card {
  position: relative; z-index: 1;
  border: 0 !important; border-radius: 20px !important; overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) !important;
}
.auth-card::before, .cert-card::before { /* faixa de cor no topo */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}
.auth-card > .card-body, .cert-card > .card-body { padding: 2.25rem 2rem 1.75rem !important; }
@media (max-width: 480px) {
  .auth-card > .card-body, .cert-card > .card-body { padding: 1.75rem 1.25rem 1.5rem !important; }
}

/* Ícone do topo vira um "selo" com a cor que a página já usa (text-primary/success/…) */
.auth-card > .card-body > .text-center:first-child > i.bi:first-child,
.cert-card > .card-body > .text-center:first-child > i.bi:first-child {
  width: 64px; height: 64px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.85rem !important;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.auth-card h4, .cert-card h4 { font-weight: 700; letter-spacing: -.01em; }
.auth-card h4.mt-2, .cert-card h4.mt-2 { margin-top: .85rem !important; }

/* Campos */
.auth-card .form-label { font-weight: 500; font-size: .9rem; color: #334155; }
.auth-card .form-control, .auth-card .form-select {
  padding: .65rem .9rem; border-radius: 12px; border-color: #e2e8f0; background-color: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.auth-card textarea.form-control { min-height: 110px; }
.auth-card .form-control:focus, .auth-card .form-select:focus {
  background-color: #fff; border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.auth-card .input-group > .form-control { border-radius: 12px 0 0 12px; }
.auth-card .input-group > .btn { border-radius: 0 12px 12px 0; border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.auth-card .input-group > .btn:hover { color: #0f172a; background: #f1f5f9; }

/* Botões */
.auth-card .btn-primary, .cert-card .btn-primary {
  border: 0; border-radius: 12px; padding: .7rem 1rem; font-weight: 600;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 10px 22px -10px rgba(59,130,246,.8);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.auth-card .btn-primary:hover, .cert-card .btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-card .btn-success { border-radius: 12px; padding: .7rem 1rem; font-weight: 600; }
.auth-card .btn-danger { border-radius: 12px; padding: .7rem 1rem; font-weight: 600; }
.auth-card .alert { border-radius: 12px; }

/* Links */
.auth-card a:not(.btn), .cert-card a:not(.btn) { color: #2563eb; text-decoration: none; font-weight: 500; }
.auth-card a:not(.btn):hover, .cert-card a:not(.btn):hover { text-decoration: underline; }

/* Rodapé do cartão */
.auth-card > .card-footer, .cert-card > .card-footer {
  background: #f8fafc !important; border-top: 1px solid #eef2f7; padding: .9rem !important;
}

/* Botão Voltar (canto superior esquerdo) */
body > a.btn-outline-light.position-absolute {
  z-index: 2; border-radius: 999px; padding: .35rem .9rem;
  color: #cbd5e1; border-color: rgba(148,163,184,.3);
  background: rgba(30,41,59,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
body > a.btn-outline-light.position-absolute:hover { color: #fff; background: rgba(51,65,85,.8); border-color: rgba(148,163,184,.5); }

@media (prefers-reduced-motion: reduce) {
  .auth-card .btn-primary, .cert-card .btn-primary { transition: none; }
  .auth-card .btn-primary:hover, .cert-card .btn-primary:hover { transform: none; }
}
