/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
}

/* ===== HEADER ===== */
.header {
  text-align: center;
  margin: 10px 0;
}

.main-logo {
  max-width: 280px;
  height: auto;
}

.header-divider {
  border: none;
  height: 2px;
  background-color: #af0523;
  margin: 15px auto 0;
  width: 90%;
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  flex: 1;                    
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;         
  justify-content: center;   
}

.content-container {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 50px;
  flex: 1;
  flex-wrap: wrap;
}

/* ===== WELCOME PANEL ===== */
.welcome-section {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  min-width: 300px;
}

.welcome-text h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #011d34;
}

.welcome-text h2 {
  font-size: 1.4rem;
  font-weight: 500;
  color: #4b5563;
}

.welcome-text p {
  font-size: 0.95rem;
  font-style: italic;
  color: #6b7280;
  margin-top: 8px;
}

.social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.social-links img {
  width: 35px;
  height: 35px;
  transition: transform 0.3s ease;
}
.social-links a:hover img {
  transform: scale(1.15);
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 20px;
}
.legal-links a {
  color: #6b7280;
  text-decoration: none;
}
.legal-links a:hover {
  color: #af0523;
  text-decoration: underline;
}

/* ===== LOGIN PANEL ===== */
.login-form-container {
  flex: 1;
  min-width: 340px;
  max-width: 550px;
  border-radius: 8px;
  padding: 10px 10px;
  margin-top: -10px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #011d34;
}

.form-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
}


#mensaje-error.form-error.error-msg {
  box-sizing: border-box;
  width: 100%;
  display: block !important;        /* fuerza que se muestre si hay otra regla que lo oculte */
  color: #b00000;                   /* texto rojo oscuro */
  border-radius: 6px;               /* esquinas suaves */
  font-size: 1rem;             /* ~15px */
  line-height: 1.25;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
    margin-top: -10px;
    margin-bottom: -10px;

}

/* Icono de alerta al inicio (opcional). Si no quieres el icono, borra esta regla */
#mensaje-error.form-error.error-msg::before {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.05rem;
}

/* Asegura que el <p> interno no rompa el diseño */
#mensaje-error.form-error.error-msg p.error-msg {
 
  display: inline-block;
  vertical-align: middle;
  word-break: break-word; /* para evitar desbordes en mensajes largos */
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
  
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #af0523;
  border-radius: 6px;
  font-size: 1rem;
  transition: 0.3s;
  
}
.form-group input:focus {
  outline: none;
  border-color: #af0523;
  box-shadow: 0 0 0 3px rgba(209, 33, 59, 0.2);
}

.password-input-wrapper {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #9ca3af;
}
.password-toggle:hover {
  color: #af0523;
}

.capslock-warning {
  font-size: 0.8rem;
  color: #ef4444;
  font-weight: 600;
  margin-top: 5px;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #374151;
}

.btn-login {
  padding: 14px;
  background-color: #af0523;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.btn-login:hover {
  background-color: #c40528;
}

.form-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}
.form-links a {
  color: #4b5563;
  text-decoration: none;
}
.form-links a:hover {
  color: #af0523;
  text-decoration: underline;
}
.link-divider {
  color: #9ca3af;
}

/* ===== FOOTER ===== */
footer {
  background-color: #af0523;
  color: white;
  font-size: 0.8rem;
  padding: 0.8rem 1rem;
  text-align: center;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
footer a {
  color: white;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ===== LOADER ===== */

.app-loader {
  position: fixed;
  inset: 0;
  background: rgba(148, 0, 0, 0.541);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.app-loader--is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loader__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.app-loader__content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  animation: fadeInUp 0.6s ease forwards;
}

/* Spinner container con efecto "pulse" */
.app-loader__spinner-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  animation: pulse 1.8s ease-in-out infinite;
}

.app-loader__spinner {
  position: absolute;
  inset: 0;
  border: 6px solid #e0e0e0;
  border-top: 6px solid #af0523;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.app-loader__logo {
  position: absolute;
  width: 48px;
  height: 48px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: logoPop 1.2s ease-in-out infinite alternate;
}

.app-loader__message-box {
  font-size: 1rem;
  font-weight: 500;
  animation: fadeIn 1.2s ease;
}

#loaderProgress {
  display: block;
  font-size: 1rem;
  margin-top: 0.5rem;
  color: white;
  font-weight: bold;
  letter-spacing: 0.5px;
  animation: fadeIn 1.4s ease;
}

/* ===== ANIMACIONES ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes logoPop {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
