/* Estilos modernos para formularios de autenticación */

/* Contenedor principal */
.auth-container {
  max-width: 420px;
  margin: 40px auto 0 auto;
  padding: 2.5rem 2rem 2rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Títulos */
.auth-title {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 1.8rem;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ff6b00, #ff9e00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

/* Bloques de formulario */
.auth-block {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
}

.auth-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Subtítulos */
.auth-subtitle {
  text-align: center;
  color: #555;
  margin: 1.5rem 0 1.2rem;
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
}

.auth-subtitle::before,
.auth-subtitle::after {
  content: '';
  display: inline-block;
  width: 50px;
  height: 1px;
  background: #e0e0e0;
  margin: 0 12px;
  position: relative;
  top: -4px;
}

/* Formularios */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Grupos de campos */
.form-group {
  position: relative;
  margin-bottom: 1.2rem;
}

/* Etiquetas */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #555;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

/* Campos de entrada */
.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  color: #333;
  background-color: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #ff9e00;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 158, 0, 0.15);
}

/* Placeholder */
.form-input::placeholder {
  color: #999;
  opacity: 1;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #ff9e00, #ff6b00);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 123, 0, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 123, 0, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 123, 0, 0.25);
}

/* Efecto de onda al hacer clic */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Mensajes de error/éxito */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  animation: slideIn 0.3s ease-out;
}

.alert-error {
  background-color: #ffebee;
  color: #c62828;
  border-left: 4px solid #f44336;
}

.alert-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efecto de carga */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Contador de caracteres */
.character-counter {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: right;
  margin-top: 0.25rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

/* Estados de validación para inputs */
.form-input.valid {
  border-color: #28a745;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-input.invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Versión responsiva */
@media (max-width: 480px) {
  .auth-container {
    margin: 20px 15px;
    padding: 1.8rem 1.2rem;
  }
  
  .auth-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }
  
  .form-input {
    padding: 0.75rem 1rem;
  }
  
  .btn {
    padding: 0.8rem 1.2rem;
  }
  
  .character-counter {
    font-size: 0.75rem;
  }
}
