:root {
  --primary: #063851;
  --primary-dark: #09203f; /* Un tono más oscuro para el hover */
  --gray-light: #f8fafc;
  --white: #ffffff;
  --text-dark: #1e293b;
  --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', sans-serif; }

body {
  background: var(--gray-light);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 90%;
  max-width: 1000px;
  height: 600px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 30px 50px rgba(0,0,0,.1);
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Panel izquierdo (hero) */
.left {
  flex: 1;
  background: var(--primary);
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  text-align: center;
}
.left::before, .left::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.left::before { width: 180px; height: 180px; top: 80px; left: 80px; }
.left::after { width: 260px; height: 260px; bottom: -50px; right: -60px; }




.logo { width: 100%; text-align: left; margin-bottom: 1.5rem; }
.logo img { max-width: 180px; height: auto; display: block; }
.logo-right { width: 100%; text-align: center; margin-bottom: 1.5rem; }
.logo-right img { max-width: 180px; width: 100%; height: auto; display: inline-block; }

.welcome {
  max-width: 360px;
  z-index: 1;
  flex-grow: 1;           /* <-- NUEVO: Le dice que crezca y ocupe el espacio libre */
  display: flex;          /* <-- NUEVO: Lo convierte en un contenedor flex */
  flex-direction: column; /* <-- NUEVO: Apila su contenido (h1, p) verticalmente */
  justify-content: center;  /* <-- NUEVO: Centra el contenido verticalmente DENTRO de él */
}
.welcome h1 {
  font-size: 1.9rem; font-weight: 800; margin: -0.5rem 0 0.75rem 0;
  background: linear-gradient(90deg, #ffffff 0%, #cfe3ff 35%, #ffffff 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.05);
  animation: fadeInDown 800ms ease both;
}
.welcome p { margin: 0 0 1rem 0; font-size: 1rem; color: #eef3ff; animation: fadeIn 1s ease both; }

.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: flex; align-items: center; gap: .6rem;
  margin: .5rem 0; font-size: .95rem;
  opacity: 0; transform: translateY(10px);
  animation: fadeInUp 600ms ease forwards;
}
.steps li:nth-child(1) { animation-delay: .25s; }
.steps li:nth-child(2) { animation-delay: .45s; }
.steps li:nth-child(3) { animation-delay: .65s; }
.steps li svg { width: 20px; height: 20px; flex-shrink: 0; color: #facc15; stroke: #facc15; }

.footer-left { font-size: .85rem; color: #e0e7ff; margin-top: 2rem; }
.footer-left a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-left a:hover { text-decoration: underline; }

/* Panel derecho (login) */
.right {
  flex: 1; display: flex; justify-content: center; align-items: center; padding: 2rem;
}

.form-header {
  text-align: center; /* Centra el contenido (logo y título) */
  margin-bottom: 1.5rem; /* Espacio debajo del título, antes de los campos de texto */
}

/* Ajustamos el logo para que funcione dentro del nuevo header */
.form-header img {
  max-height: 70px;
  margin-bottom: 1rem; /* Espacio entre el logo y el título h2 */
}

/* Ajustamos el h2 para que no tenga margen extra */
.form-header h2 {
  margin-bottom: 0.5rem;
}

.form-box {
  background: var(--white); padding: 2rem; border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.05); width: 100%; max-width: 320px;
}
.form-box h2 { color: var(--text-dark); text-align: center; margin-bottom: 1.5rem; }

.form-box .input-group {
    position: relative; /* Necesario para posicionar el ícono del ojo */
    margin-bottom: 1rem;
}

.form-box input {
  width: 100%; padding: .75rem;
  border: 1px solid #cbd5e1; border-radius: 6px; font-size: 1rem;
}
/* Espacio extra en el campo de contraseña para que no se solape con el ojo */
.form-box input[name="password"] {
    padding-right: 2.5rem; 
}

.form-box .toggle-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
}

.form-box button {
  width: 100%; background: var(--primary); color: #fff;
  padding: .75rem; border: none; border-radius: 6px; font-weight: bold; font-size: 1rem; cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}
.form-box button:hover { background: var(--primary-dark); }
.form-footer { margin-top: 1rem; text-align: center; font-size: .9rem; color: #64748b; }

/* Estilo para el mensaje de error */
.error-message {
  background-color: #fef2f2;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #fecaca;
}

/* Animaciones */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-16px) } to { opacity: 1; transform: translateY(0) } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: translateY(0) } }

/* Responsive */
@media (max-width: 768px) {
  .container { flex-direction: column; height: auto; border-radius: 0; }
  .left, .right { flex: none; width: 100%; height: auto; align-items: center; text-align: center; }
  .logo { align-self: center; }
  .left { padding: 3rem 1.5rem; }
}

/* ============================================= */
/* == Estilos para la página de Olvidé Clave == */
/* ============================================= */

/* Estilo para el párrafo de instrucciones */
.form-box .form-description {
  color: #64748b; /* Un gris suave para el texto secundario */
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Estilo para el enlace de "Volver al inicio" */
.form-box .back-to-login {
  display: block; /* Para que ocupe su propia línea */
  margin-top: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary); /* Usa el color principal del tema */
  transition: opacity 0.2s;
}

.form-box .back-to-login:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== ESTILOS PARA LA PANTALLA DE CARGA ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    flex-direction: column; /* Para que la frase se ponga debajo */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

#splash-screen img {
    max-width: 300px;
    width: 100%;
}

/* ===== ESTILOS PARA LA FRASE MOTIVACIONAL ===== */
#splash-screen #frase-motivacional {
    margin-top: 25px;
    font-size: 1.3em;
    color: #4a4a4a;
    text-align: center;
    padding: 0 30px;
    font-style: italic;
    max-width: 80%;
}


/* Este estilo solo se aplicará a la etiqueta body QUE TENGA la clase 'layout-start-aligned' */
body.layout-start-aligned {
  align-items: flex-start; /* Alinea el contenido arriba */
  padding-top: 10vh;       /* Le da un espacio desde el borde superior */
}
