/* assets/css/login.css */

/* ========= BASE ========= */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #020617;
  color: #e5e7eb;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glow de fundo */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 60%);
}

body::after {
  bottom: -220px;
  right: -120px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.45), transparent 65%);
}

/* ========= LAYOUT DA PÁGINA ========= */

/* Centraliza só a área do login, não a navbar/footer */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

/* Card de autenticação */
.auth-container {
  position: relative;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 45%),
              rgba(5, 11, 22, 0.92);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 18px;
  padding: 28px 26px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 80px rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Borda de brilho suave */
.auth-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(56, 189, 248, 0.12);
  pointer-events: none;
}

/* ========= TÍTULOS / TEXTOS ========= */

.auth-title {
  font-size: 1.55rem;
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 22px;
}

/* ========= ABAS (login/cadastro) ========= */

.tabs {
  display: flex;
  margin-bottom: 22px;
  border-radius: 999px;
  background: #020617;
  padding: 4px;
  gap: 2px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #9ca3af;
  transition:
    background-color 160ms ease-out,
    color 160ms ease-out,
    transform 120ms ease-out;
}

.tab:hover {
  color: #e5e7eb;
}

.tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #f9fafb;
  transform: translateY(-1px);
}

/* ========= CAMPOS ========= */

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #d1d5db;
}

.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: rgba(2, 6, 23, 0.9);
  color: #f9fafb;
  outline: none;
  font-size: 0.95rem;
  transition:
    border-color 140ms ease-out,
    box-shadow 140ms ease-out,
    background-color 140ms ease-out;
}

/* Estado de foco */
.field input:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
}

/* Campo em erro (pode adicionar .field.error no JS) */
.field.error input {
  border-color: #f97373;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
  background: rgba(82, 15, 21, 0.95);
}

/* Texto de help (ex: "esqueci a senha") */
.field-help {
  margin-top: 4px;
  text-align: right;
}

/* ========= BOTÕES ========= */

.btn-primary {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #f9fafb;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  transition:
    transform 120ms ease-out,
    box-shadow 150ms ease-out,
    filter 140ms ease-out,
    background-position 180ms ease-out;
  background-size: 140% 140%;
  background-position: 0% 50%;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.6);
  background-position: 100% 50%;
  filter: brightness(1.02);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.9);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  box-shadow: none;
}

/* ========= MENSAGENS ========= */

.message {
  margin-top: 12px;
  font-size: 0.85rem;
  min-height: 1.1em;
}

.message.error {
  color: #fca5a5;
}

.message.success {
  color: #6ee7b7;
}

/* ========= LINKS ========= */

.back-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #60a5fa;
  text-decoration: none;
  transition: color 120ms ease-out;
}

.back-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Botão/link de texto (ex: “Esqueci a senha”) */
.link-button {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.8rem;
  padding: 0;
  cursor: pointer;
  transition: color 120ms ease-out;
}

.link-button:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Centraliza só a área do login e aplica o fundo escuro */
.auth-page {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;

  /* fundo da parte branca que você está vendo */
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.16), transparent 55%),
    #020617;
}


/* ========= RESPONSIVO ========= */

@media (max-width: 480px) {
  .auth-page {
    padding: 24px 12px;
  }

  .auth-container {
    padding: 22px 18px 18px;
    border-radius: 14px;
  }

  .auth-title {
    font-size: 1.35rem;
  }
}


/* ========= ACESSIBILIDADE ========= */

/* Menos animação pra quem prefere */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
