/* --- VARIABLES --- */
:root {
  --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  
  /* CAMBIO DRÁSTICO: Blanco 100% sólido, sin transparencias que confundan */
  --card: #ffffff; 
  
  --muted: #64748b;
  --accent: #0284c7;
  --accent-2: #38bdf8;
  --focus: #0c4a6e;
  
  /* Sombra mucho más fuerte para que la tarjeta resalte sobre el fondo azul */
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius: 20px;
}

/* --- BASE --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* --- IMÁGENES HERO (SIN RECORTES) --- */
.hero-full {
  width: 100%;
  line-height: 0;
  background: transparent;
}

.hero-full img {
  width: 100%;
  height: auto; 
  display: block;
  object-fit: contain; 
}

/* --- CONTENEDOR DE LOGIN --- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.app-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0; /* Borde sutil para enmarcar la tarjeta */
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.titulo-login {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--focus);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* --- FORMULARIO --- */
.form-group {
  margin-bottom: 1.5rem; /* Un poco más de espacio entre campos */
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 800; /* Letra más gruesa para que resalte */
  color: #334155; /* Un gris casi negro */
}

.input-container {
  position: relative;
}

input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  
  /* CAMBIO DRÁSTICO PARA LOS INPUTS */
  background-color: #f1f5f9; /* Fondo gris claro */
  border: 2px solid #cbd5e1; /* Borde más grueso y visible */
  color: #0f172a; /* Texto bien oscuro */
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

input:focus {
  background-color: #ffffff; /* Al hacer clic, se vuelve blanco */
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.toggle-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: white;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toggle-pwd:hover {
  background: #e2e8f0;
}

/* Botón Principal */
.btn-principal {
  width: 100%;
  padding: 1.1rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

.btn-principal:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(2, 132, 199, 0.5);
}

/* --- ALERTAS --- */
.alert.error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid #fca5a5;
  font-weight: 600;
}

/* --- FOOTER --- */
footer {
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

/* --- RESPONSIVE --- */
@media (max-width: 640px) {
  .login-card {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }
}