/* Responsive: menor a 600px */
@media (max-width: 600px) {
  .form-container {
    padding: 1.2rem 0.5rem 1.1rem;
    max-width: 98vw;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }
  .input-group input {
    font-size: 1rem;
    padding-left: 2.1rem;
  }
  .sign {
    font-size: 1rem;
    padding: 0.7rem;
  }
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #eef2f7, #f9fafc);
  font-family: 'Poppins', 'Inter', 'Segoe UI', Arial, sans-serif;
  position: relative;
  z-index: 0;
}

.form-container {
  width: 100%;
  max-width: 370px;
  border-radius: 16px;
  background: var(--blanco, #fff);
  box-shadow: 0 6px 20px rgba(15, 62, 141, 0.1), 0 2px 8px rgba(15, 62, 141, 0.06);
  padding: 2.2rem 1.8rem 1.9rem;
  color: var(--gris-texto, #374151);
  position: relative;
  animation: fadeInLogin 0.7s cubic-bezier(.4, 0, .2, 1);
  border: 1px solid rgba(209, 213, 219, 0.6);
  backdrop-filter: blur(6px);
}

@keyframes fadeInLogin {
  from { opacity: 0; transform: translateY(25px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.title {
  text-align: center;
  font-size: 1.7rem;
  line-height: 2.1rem;
  font-weight: 700;
  color: #0f3e8d;
  letter-spacing: 0.02em;
}

.form {
  margin-top: 1.5rem;
}

.input-group {
  position: relative;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.25rem;
}

.input-group label {
  display: block;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 5px;
}

.input-group input {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--borde, #d1d5db);
  outline: 0;
  background: #fdfdfd;
  padding: 0.78rem 1rem 0.78rem 1rem;
  color: var(--gris-texto, #374151);
  box-sizing: border-box;
  margin: 0;
  font-size: 1.08rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(15, 62, 141, 0.05);
  padding-right: 40px;
}

.input-group input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: #ffffff;
}

.input-group .input-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7c3aed;
  font-size: 1.2rem;
  opacity: 0.85;
  transition: color 0.25s ease;
}

.input-group input:focus + .input-icon {
  color: #3b82f6;
}

.forgot {
  display: flex;
  justify-content: flex-end;
  font-size: 0.82rem;
  line-height: 1.1rem;
  color: #7c3aed;
  margin: 12px 0 18px;
}

.forgot a,
.signup a {
  color: #7c3aed;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot a:hover,
.signup a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.sign {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #0f3e8d, #3b82f6);
  padding: 0.9rem;
  text-align: center;
  color: var(--blanco, #fff);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 3px 10px rgba(15, 62, 141, 0.15);
  letter-spacing: 0.015em;
  margin-top: 0.8rem;
}

.sign:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
}

.sign:active {
  transform: scale(0.97);
}

.login-message {
  margin: 0.7rem 0 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  background: #fff4f4;
  color: #e53e3e;
  border: 1.5px solid #fbb6b6;
  box-shadow: 0 1px 4px rgba(229, 62, 62, 0.05);
  animation: fadeInLogin 0.7s cubic-bezier(.4, 0, .2, 1);
}

.login-message.success {
  background: #f0fff4;
  color: #2f855a;
  border: 1.5px solid #68d391;
}

.social-message {
  display: flex;
  align-items: center;
  padding-top: 1rem;
}

.line {
  height: 1px;
  flex: 1;
  background-color: rgba(55, 65, 81, 0.3);
}

.social-message .message {
  padding: 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.25rem;
  color: #6b7280;
}

.social-icons {
  display: flex;
  justify-content: center;
}

.social-icons .icon {
  border-radius: 8px;
  padding: 0.7rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.social-icons .icon:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

.social-icons .icon svg {
  height: 1.3rem;
  width: 1.3rem;
  fill: #4f46e5;
}

.signup {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1rem;
  color: #6b7280;
  margin-top: 0.7rem;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.toggle-password:hover {
  opacity: 1;
}

.toggle-password img {
  width: 24px;
  height: 24px;
}

.title-container {
  position: relative;
  display: flex;
  justify-content: center; /* centra el título */
  align-items: center;
  margin-bottom: 15px;
  height: 60px; /* evita que el contenedor se agrande por el logo */
}

.title-container .logo-title {
  position: absolute;
  left: 0;
  transform: translateY(-20%); /* mueve el logo hacia arriba */
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.title-container .title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f3e8d;
  transform: translateY(20px); /* mueve el texto hacia abajo */
}



body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
    url('../img/bg-login.webp') center center / cover no-repeat;
  z-index: -1;
}