/* ============================================================
   JC Moda e Estilo — Folha de Estilos da Tela de Login
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Inter:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f5f2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

/* Decorações de fundo */
body::before {
  content: '';
  position: fixed;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,122,0.12) 0%, transparent 70%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126,45,65,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Wrapper principal */
.login-wrapper {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  animation: fadeInUp 0.4s ease;
}

/* Logo na tela de login */
.login-logo {
  width: 180px;
  max-width: 100%;
}

/* Card de login */
.login-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid #ede5de;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(126, 45, 65, 0.08);
}

/* Linha decorativa */
.login-card-accent {
  width: 60px;
  height: 3px;
  background: #7e2d41;
  border-radius: 2px;
  margin-bottom: 20px;
}

/* Título */
.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  color: #7e2d41;
  margin-bottom: 6px;
  line-height: 1.3;
}

/* Subtítulo */
.login-subtitle {
  font-size: 14px;
  color: #b08a8a;
  margin-bottom: 28px;
}

/* Grupo de input com floating label */
.floating-group {
  position: relative;
  margin-bottom: 20px;
}

.floating-input {
  width: 100%;
  padding: 18px 44px 6px 14px;
  border: 1px solid #ede5de;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #2c2c2c;
  background: #fff;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
}

.floating-input:focus {
  border-color: #7e2d41;
  box-shadow: 0 0 0 3px rgba(126, 45, 65, 0.08);
}

.floating-input.is-invalid {
  border-color: #7e2d41;
  box-shadow: 0 0 0 3px rgba(126, 45, 65, 0.08);
}

.floating-label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 14px;
  color: #b08a8a;
  pointer-events: none;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
  top: 10px;
  transform: translateY(0);
  font-size: 11px;
  color: #7e2d41;
  font-weight: 500;
}

/* Ícone dentro do input (olho senha) */
.input-icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b08a8a;
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
  background: none;
  border: none;
}

.input-icon-btn:hover {
  color: #7e2d41;
}

/* Mensagem de erro */
.error-message {
  background: #fde8ec;
  border: 1px solid #f5c2cd;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #7e2d41;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* Botão Entrar */
.btn-login {
  width: 100%;
  padding: 13px;
  background: #7e2d41;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-login:hover {
  background: #6b2537;
  box-shadow: 0 6px 16px rgba(126, 45, 65, 0.3);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner no botão */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-login.loading .btn-spinner {
  display: block;
}

.btn-login.loading .btn-text {
  display: none;
}

/* Link esqueci senha */
.link-forgot {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #b08a8a;
  transition: color 0.2s ease;
  text-decoration: none;
}

.link-forgot:hover {
  color: #7e2d41;
}

/* Rodapé */
.login-footer {
  text-align: center;
  font-size: 12px;
  color: #b08a8a;
  padding-top: 4px;
}

/* ============================================================
   Animações
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* ============================================================
   Responsividade
   ============================================================ */
@media (max-width: 480px) {
  .login-card {
    padding: 1.75rem 1.5rem;
  }

  .login-logo {
    width: 140px;
  }

  .login-title {
    font-size: 21px;
  }
}
