/* ============================================================
   NeoTech — Estilos de Autenticação (Login / Cadastro)
   ============================================================ */

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

:root {
  --neo-primary:    #1A5EBF;
  --neo-primary-dk: #0C447C;
  --neo-primary-lt: #E6F1FB;
  --neo-violet:     #378ADD;
  --neo-gradient:   linear-gradient(135deg, #0C447C 0%, #1A5EBF 100%);
  --neo-bg:         #F0F6FF;
  --neo-card:       #FFFFFF;
  --neo-border:     #C8DCF0;
  --neo-text:       #0A0F2E;
  --neo-text-sec:   #2C4A7C;
  --neo-text-lt:    #7EA8D8;
  --neo-green:      #059669;
  --neo-red:        #DC2626;
  --sombra:         0 4px 32px rgba(26,94,191,.18);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--neo-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── Logo ─────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  text-decoration: none;
}

.auth-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.auth-logo-svg {
  width: 54px;
  height: 54px;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
}

.auth-logo-name {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  display: block;
  line-height: 1.1;
}

.auth-logo-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.65);
  letter-spacing: 1.3px;
  text-transform: uppercase;
  display: block;
  margin-top: .1rem;
}

/* ── Botão de voltar ──────────────────────────────────────── */
.btn-voltar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  padding: .7rem;
  background: transparent;
  color: var(--neo-primary);
  border: 1.5px solid var(--neo-border);
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin-top: .75rem;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-voltar:hover {
  background: var(--neo-primary-lt);
  border-color: var(--neo-primary);
  color: var(--neo-primary-dk);
}

/* ── Card ─────────────────────────────────────────────────── */
.auth-card {
  background: var(--neo-card);
  border-radius: 20px;
  box-shadow: var(--sombra);
  padding: 2.25rem 2.5rem;
  width: 100%;
  max-width: 440px;
}

.auth-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neo-text);
  margin-bottom: .35rem;
}

.auth-card .auth-subtitle {
  font-size: .88rem;
  color: var(--neo-text-sec);
  margin-bottom: 1.75rem;
}

/* ── Form ─────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--neo-text-sec);
}

.form-group input {
  padding: .7rem 1rem;
  border: 1.5px solid var(--neo-border);
  border-radius: 10px;
  font-size: .95rem;
  color: var(--neo-text);
  background: #FAFAFE;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--neo-primary);
  box-shadow: 0 0 0 3px rgba(26,94,191,.15);
  background: #fff;
}

.form-group input.error {
  border-color: var(--neo-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.field-error {
  font-size: .76rem;
  color: var(--neo-red);
  display: none;
}

.field-error.visible { display: block; }

/* ── reCAPTCHA wrapper ─────────────────────────────────────── */
.recaptcha-wrap {
  display: flex;
  justify-content: center;
  margin: 1.1rem 0;
}

/* ── Botão principal ──────────────────────────────────────── */
.btn-auth {
  width: 100%;
  padding: .8rem;
  background: var(--neo-gradient);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  letter-spacing: .2px;
  margin-top: .25rem;
}

.btn-auth:hover   { opacity: .92; }
.btn-auth:active  { transform: scale(.98); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; }

/* ── Divisor ──────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--neo-text-lt);
  font-size: .8rem;
}

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

/* ── Alerta ───────────────────────────────────────────────── */
.auth-alert {
  padding: .7rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 1.1rem;
  display: none;
}

.auth-alert.error {
  display: block;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--neo-red);
}

.auth-alert.success {
  display: block;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

/* ── Footer do card ───────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--neo-text-sec);
}

.auth-footer a {
  color: var(--neo-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Animações de entrada ─────────────────────────────────── */
@keyframes auth-fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes auth-slide-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-18px) scale(1.03); }
}

.auth-logo {
  animation: auth-fade-down .5s cubic-bezier(.16,1,.3,1) forwards;
}

.auth-card {
  opacity: 0;
  animation: auth-slide-up .6s cubic-bezier(.16,1,.3,1) .12s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .auth-logo, .auth-card { animation: none; opacity: 1; }
}

/* ── Background deco ──────────────────────────────────────── */
.auth-deco {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.auth-deco-1 {
  top: -100px;
  right: -100px;
  animation: auth-float 9s ease-in-out infinite;
}

.auth-deco-2 {
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  animation: auth-float 12s ease-in-out infinite reverse;
}

/* ── Password toggle ──────────────────────────────────────── */
.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  padding-right: 2.5rem;
}

.toggle-pwd {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--neo-text-lt);
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.toggle-pwd:hover { color: var(--neo-primary); }

/* ── Password strength ────────────────────────────────────── */
.pwd-strength {
  margin-top: .4rem;
  height: 4px;
  border-radius: 99px;
  background: var(--neo-border);
  overflow: hidden;
}

.pwd-strength-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .3s, background .3s;
  width: 0;
}

.pwd-strength-label {
  font-size: .72rem;
  margin-top: .25rem;
  color: var(--neo-text-lt);
}

@media (max-width: 480px) {
  .auth-card { padding: 1.75rem 1.5rem; }
}
