body {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 20px;
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  /* Arreglo del scroll vertical */
  overflow-y: auto;
  display: block;
}

/* Patrón sutil de fondo */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(5, 150, 105, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(6, 78, 59, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.alta-container {
  max-width: 520px;
  width: 100%;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  /* Asegurar que el contenedor tenga espacio suficiente */
  min-height: auto;
}

/* Efecto de cristal en el contenedor */
.alta-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.4), transparent);
  border-radius: 20px 20px 0 0;
}

h2 {
  margin-top: 0;
  color: #064e3b;
  text-align: center;
  font-size: 2.25rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  margin-bottom: 2.5rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

form {
  display: flex;
  flex-direction: column;
}

/* Etiquetas modernas */
label {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.025em;
}

label:first-of-type {
  margin-top: 0;
}

/* Inputs con diseño moderno */
input,
select {
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  font-weight: 400;
}

input:focus,
select:focus {
  outline: none;
  border-color: #059669;
  box-shadow:
    0 0 0 4px rgba(5, 150, 105, 0.1),
    0 4px 12px rgba(5, 150, 105, 0.15);
  background-color: #ffffff;
  transform: translateY(-1px);
}

input::placeholder {
  color: #9ca3af;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Botón principal con estilo BosquesBiodiversos */
button {
  margin-top: 2.5rem;
  padding: 16px 24px;
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.3);
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(6, 78, 59, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

/* Enlaces de navegación */
.volver {
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.volver a {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

.volver a:hover {
  color: #374151;
  background-color: rgba(107, 114, 128, 0.1);
  transform: translateY(-1px);
}

/* Campo de contraseña con icono mejorado */
.campo-password {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.campo-password input {
  width: 100%;
  padding-right: 3.5rem;
  margin-bottom: 0;
}

.toggle-password {
  position: absolute;
  right: 16px;
  color: #6b7280;
  opacity: 0.7;
  cursor: pointer;
  font-size: 18px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  padding: 4px;
  border-radius: 6px;
}

.toggle-password:hover {
  opacity: 1;
  color: #374151;
  background-color: rgba(107, 114, 128, 0.1);
}

/* Instrucciones de contraseña mejoradas */
#password-instructions {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.8) 100%);
  border: 1px solid rgba(219, 234, 254, 0.5);
  border-left: 4px solid #059669;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1.5rem;
  margin-bottom: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#password-instructions p {
  margin: 0 0 12px 0;
  font-weight: 600;
  color: #064e3b;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
}

#password-instructions ul {
  margin: 0;
  padding-left: 20px;
  color: #374151;
}

#password-instructions li {
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 6px;
  line-height: 1.5;
  font-weight: 400;
}

/* Mensajes del sistema mejorados */
.mensajes {
  margin-bottom: 2rem;
}

.mensajes p {
  padding: 16px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mensajes .success {
  background: rgba(240, 253, 244, 0.95);
  color: #065f46;
  border: 1px solid rgba(187, 247, 208, 0.5);
}

.mensajes .error {
  background: rgba(254, 242, 242, 0.95);
  color: #dc2626;
  border: 1px solid rgba(252, 165, 165, 0.5);
}

/* Animaciones suaves */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alta-container {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive mejorado */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  .alta-container {
    padding: 2rem 1.5rem;
    margin: 20px auto;
    border-radius: 16px;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  input, select, button {
    padding: 14px 18px;
    font-size: 16px;
  }

  label {
    margin-top: 1.25rem;
  }
}

@media (max-width: 480px) {
  .alta-container {
    padding: 1.5rem 1rem;
    margin: 15px auto;
  }

  h2 {
    font-size: 1.75rem;
  }

  #password-instructions {
    padding: 1.25rem;
  }
}

/* Asegurar scroll en pantallas pequeñas */
@media (max-height: 800px) {
  body {
    padding: 10px;
  }

  .alta-container {
    margin: 20px auto;
  }
}