:root {
  --primary: #1c385c; /* El azul oscuro elegante de la imagen */
  --primary-dark: #11243d; 
  --gray-light: #f4f7f9; /* Fondo gris clarito de la página */
  --white: #ffffff;
  --text-dark: #333333; /* Texto oscuro normal */
  --border: #cccccc; /* Borde gris de los inputs */
  --link-blue: #0056b3; /* Azul brillante para los enlaces */
  --icon-yellow: #facc15;
}


* { 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); /* El contenedor de fondo debe ser blanco, no azul oscuro */
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); /* Sombra elegante, no transparente */
  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: 170px; height: auto; display: block; margin-top: -10px; }
.logo-right { width: 100%; text-align: center; margin-bottom: 1.5rem; }
.logo-right img { max-width: 100px; width: 100%; height: auto; display: inline-block; }

.welcome { max-width: 360px; z-index: 1; }
.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;
  color: #ffffff ;
}
.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: #ffffff; 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;
  background: var(--white);
}

.form-box {
  background-color: var(--white); /* Nada de grises raros */
  padding: 2rem; 
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05); /* Sombra suave a la tarjeta */
  width: 100%; 
  max-width: 340px;
}


.form-box h2 { 
  color: var(--primary); /* Título oscuro/azul */
  text-align: center; 
  margin-bottom: 1.5rem; 
  font-size: 1.5rem;
}

.form-box .input-group {
    position: relative; /* Necesario para posicionar el ícono del ojo */
    margin-bottom: 1rem;
}

/* Volviendo a la luz, porque el señor no se decide */
.form-box input {
  width: 100%; 
  padding: 0.85rem;
  border: 1px solid #cdd4dc; /* Borde gris clarito/azulado muy elegante */
  border-radius: 6px; 
  font-size: 0.95rem;
  background-color: #ffffff; /* ¡Fondo BLANCO! Increíble innovación */
  color: #333333; /* Texto oscuro para que el usuario pueda leer lo que escribe */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* El placeholder también civilizado */
.form-box input::placeholder {
  color: #999999;
}

/* Efecto focus para que se vea fino cuando hacen clic */
.form-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 56, 92, 0.1); /* Un brillito azul corporativo, de nada */
}

/* Y arreglemos el texto de abajo, que en tu última crisis de identidad quedó amarillo */




.form-box button {
  width: 100%; 
  background: var(--primary); /* El botón es azul oscuro, no amarillo */
  color: var(--white); 
  padding: .85rem; 
  border: none; 
  border-radius: 6px; 
  font-weight: 600; 
  font-size: 1rem; 
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  margin-top: 10px;
}

.form-footer {
  margin-top: 1.5rem; 
  text-align: center; 
  font-size: 0.95rem; 
  color: #666666; /* Gris normal para "¿No tienes cuenta?" */
}

.form-box button:hover { 
  background: var(--primary-dark); 
}
.form-footer a {
  color: var(--link-blue); /* Enlace azul, como en tu imagen */
  text-decoration: none;
  font-weight: 600;
}

/* Estilo para "Olvidaste tu contraseña?" */
.form-footer a {
  color: #0056b3; /* El Azul Integratic original */
  text-decoration: none;
  font-weight: 600;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* 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: #ccc; /* <-- ¡CAMBIO! De gris oscuro a gris claro */
  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(--text-dark); /* Color amarillo */
  transition: opacity 0.2s;
}

.form-box .back-to-login:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== ESTILOS PARA LA PANTALLA DE CARGA ===== */
/* (Se mantiene con fondo blanco como estaba) */
#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%;
}


/* ================================================= */
/* == Estilos para Reestablecer Clave (PHP NUEVO) == */
/* ================================================= */

/* Tu nuevo PHP usa .login-box en lugar de .form-box
   y no está en el panel .right. Esto lo fuerza a parecerse. */
.login-box {
    background-color: #545454; /* Color de .form-box */
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 380px; /* Un poco más ancho para los labels */
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
}

/* El PHP usa un <p> para la descripción, lo hacemos parecer .form-description */
.login-box > p {
    color: #ccc;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.login-box h2 {
    color: var(--white);
    text-align: center;
    margin-bottom: 1rem; /* Menos espacio que el login */
}

/* Estilos para el mensaje de error/éxito del PHP */
.login-box p[style*="color"] {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
    background-color: #2A2A2A; /* Fondo oscuro */
}
.login-box p[style*="green"] { border-color: #34d399; }
.login-box p[style*="red"]   { border-color: #fecaca; }

/* Estilo para el enlace de "Iniciar sesión" en el mensaje de éxito */
.login-box p[style*="green"] a {
    color: var(--text-dark); /* Amarillo */
    font-weight: bold;
    text-decoration: none;
}
.login-box p[style*="green"] a:hover { text-decoration: underline; }


/* El PHP usa .input-group > label */
.login-box .input-group {
    margin-bottom: 1rem; /* Separación */
}

.login-box .input-group label {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

/* El PHP usa .input-field que contiene ícono + input */
.login-box .input-field {
    position: relative;
}

.login-box .input-field i {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: var(--text-dark); /* Amarillo */
}

/* Hacemos que el input se parezca al del .form-box */
.login-box .input-field input {
    width: 100%;
    padding: .75rem;
    padding-left: 2.5rem; /* Espacio para el ícono */
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #2A2A2A;
    color: #ffffff;
}

/* Hacemos que el .btn se parezca al .form-box button */
.login-box .btn {
    width: 100%;
    background: var(--text-dark); /* Color amarillo */
    color: var(--primary); /* Texto oscuro */
    padding: .75rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    text-transform: uppercase;
}

.login-box .btn:hover {
    background: #D39C00; /* Amarillo oscuro */
}

/* Hacemos que el .signup se parezca al .back-to-login */
.login-box .signup {
    text-align: center;
    margin-top: 1.5rem;
}

.login-box .signup a {
    display: block;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dark); /* Color amarillo */
    transition: opacity 0.2s;
}

.login-box .signup a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* El footer del PHP está suelto, hay que centrarlo */
.container > footer {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #aaa;
    font-size: 0.85rem;
}

/* ================================================= */
/* == Estilos para Mensajes (Error y Éxito) == */
/* ================================================= */

/* Tu .error-message ya existe, pero por si acaso lo re-estilizo
   para que coincida con el fondo oscuro */
.error-message {
  background-color: #f8d7da; /* Rojo pálido */
  color: #721c24; /* Rojo oscuro */
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #f5c6cb;
}

/* Esta es la clase que te falta */
.success-message {
  background-color: #d4edda; /* Verde pálido */
  color: #155724; /* Verde oscuro */
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid #c3e6cb;
}