/* 
  Reset básico de CSS para garantir que o layout 
  fique igual em todos os navegadores 
*/
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variáveis de cores para facilitar o modo escuro do projeto */
:root {
  --bg:              #060606;
  --surface:         #0F0F0F;
  --surface-raised:  rgba(255, 255, 255, 0.04);
  --border-subtle:   rgba(255, 255, 255, 0.04);
  --border-input:    rgba(255, 255, 255, 0.07);
  --accent:          #3A6BE8;
  --accent-glow:     rgba(58, 107, 232, 0.22);
  --text-primary:    #F2F2F7;
  --text-secondary:  #8E8E93;
  --text-dim:        #48484A;
}

html, body {
  height: 100%;
}

/* Estilo principal do corpo da página */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ── Container do Login (Card) ── */
.card {
  width: 100%;
  max-width: 436px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 28px;
  padding: 52px 44px 44px;
  position: relative;
  overflow: hidden;
  /* Animação suave ao abrir a página */
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Regra da animação de entrada */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cabeçalho do Card ── */
.card-header {
  text-align: center;
  margin-bottom: 38px;
}

.title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

.card-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ── Estilos dos campos de formulário ── */
.fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-left: 2px;
}

.field-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border-input);
  border-radius: 24px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field-input::placeholder {
  color: var(--text-dim);
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Espaço extra para o botão de mostrar a senha não ficar em cima do texto */
.field-input.has-toggle {
  padding-right: 48px;
}

/* Corrige a cor de fundo padrão amarela do navegador para senhas salvas */
.field-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--surface-raised) inset;
  -webkit-text-fill-color: var(--text-primary);
}

/* ── Botão de ver senha ── */
.toggle-btn {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  border-radius: 6px;
}

.toggle-btn:hover {
  color: var(--text-secondary);
}

.toggle-btn i {
  font-size: 20px; /* Tamanho do ícone de olho */
  pointer-events: none;
}

/* ── Botão de Entrar ── */
.btn-submit {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 24px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.btn-submit:hover {
  background: #3A3A3C;
  border-color: rgba(255, 255, 255, 0.14);
}

.btn-submit:active {
  transform: scale(0.98);
}

/* Estilo para quando estiver carregando (fazendo o login) */
.btn-submit.loading {
  opacity: 0.55;
  pointer-events: none;
}

/* ── Responsividade para Celulares ── */
@media (max-width: 480px) {
  .card {
    border-radius: 24px;
    padding: 40px 26px 36px;
    margin: 14px;
  }
}
