/* ====== Estilos para páginas de autenticación (login/registro) ====== */

/* ----- Layout general ----- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #102CA8; 
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-page {
  width: min(780px, 100% - 32px); /* 🔹 Antes 1040px → ahora 780px */
  background: #ffffff;
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* 🔹 Más balanceado, derecha más angosta */
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  margin: auto;
}

@media (max-width: 780px) {
  .login-page {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .login-illustration {
    display: none;
  }
}

/* ----- Columna izquierda (formulario) ----- */
.login-main {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.login-header {
  margin-bottom: 8px;
}

.login-header .emoji {
  font-size: 32px;
  display: inline-flex;
  margin-bottom: 10px;
}

.login-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #020617;
}

.login-header p {
  margin: 4px 0 0;
  font-size: 14px;
  color: #64748b;
}

.alert {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  margin-top: 4px;
}

.alert.error {
  background: #fee2e2;
  color: #b91c1c;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

.input-icon {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
}

.input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  outline: none;
  color: #0f172a;
  background: #f8fafc;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder {
  color: #94a3b8;
}

.input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* botón mostrar/ocultar contraseña */
.toggle-pass {
  position: absolute;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 12px;
  color: #2563eb;
  cursor: pointer;
  padding: 0;
}

.extra-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.extra-actions a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

.btn-primary {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.55);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.links-bottom {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.links-bottom a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  width: fit-content;
}

.links-bottom a:hover {
  text-decoration: underline;
}

/* ----- Columna derecha (ilustración) ----- */

/* Columna derecha completamente blanca */
.login-illustration {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Contenedor donde va la imagen */
.image-box {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
}

/* La imagen por src se adapta igual que en el diseño */
.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* Recorta para que se vea profesional */
  display: block;
}

/* Ajuste extra del header */
.login-header {
  text-align: center;       /* Centra el texto */
}
