/* --- Variables y Estilos Globales --- */
:root {
  --primary-hue: 210;
  --secondary-hue: 260;
  --text-color: #34495e;
  --text-color-light: #7f8c8d;
  --body-bg: #f4f7f9;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --accent-color: hsl(var(--primary-hue), 90%, 55%);
  
  --font-family: 'Poppins', sans-serif;
  --border-radius: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

/* --- Contenedor Principal y Animación --- */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 900px;
  min-height: 550px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeInSlideUp 0.8s ease-out forwards;
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Panel Visual (Izquierda) --- */
.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--secondary-hue), 90%, 60%), hsl(var(--primary-hue), 90%, 55%));
}

.login-visual img {
  width: 300px;
  height: auto;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px;
}

.login-visual h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.login-visual p {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 350px;
  opacity: 0.9;
}

/* --- Panel del Formulario (Derecha) --- */
.login-form {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2rem;
}

.form-field {
  margin-bottom: 1.5rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color-light);
  margin-bottom: 0.5rem;
}

.form-field input {
  width: 100%;
  padding: 0.75rem 0;
  border: none;
  border-bottom: 2px solid var(--border-color);
  background: transparent;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.password-wrapper {
  position: relative;
}

.toggle-pass {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color-light);
  padding: 0.25rem;
  display: flex;
  transition: color 0.3s ease;
}
.toggle-pass svg { width: 20px; height: 20px; }
.toggle-pass:hover { color: var(--accent-color); }

.submit-button {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  background: var(--accent-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.form-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--text-color-light);
}

.form-footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* --- Diseño Responsivo --- */
@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 450px;
    min-height: auto;
  }
  .login-visual {
    padding: 2rem;
    text-align: center;
    align-items: center;
  }
  .login-form {
    padding: 2rem;
  }
}