:root{
  --huap-blue:#007bff;
  --huap-blue-dark:#0b66d6;
  --huap-red:#ff5b5b;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
}

html, body { height: 100%; }

/* Fondo neutro (si después quieres imagen, lo agregamos igual que recupera) */
body{
  background: url("fondo.jpg") center center / cover no-repeat fixed;
  margin: 0;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.20);
  pointer-events: none;
  z-index: 0;
}

/* Asegurar que tu contenido quede arriba */
.container-scroller,
.container-fluid,
.page-body-wrapper,
.full-page-wrapper,
.auth-page,
.auth-wrap{
  position: relative;
  z-index: 1;
}


/* Centrado del card */
.auth-wrap{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 12px;
}

/* Card */
.auth-card{
  width: min(480px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
  overflow: hidden;
  margin: 0 auto;
}

.login-brand{
  display:flex;
  align-items:center;
  justify-content:center;     /* ✅ centrado */
  gap: 14px;
  margin-top: 6px;
  margin-bottom: 10px;;
  text-align:center;
}

.login-logo{
  width: 280px;          /* 🔥 más grande */
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 10px;  /* centrado + espacio */
  display: block;
}

.login-brand-text{
  font-size: 14px;
  color: #c02626;
  line-height: 1.1;
}

/* Título grande */
.login-title{
  text-align:center;
  font-size: 38px;
  font-weight: 800;
  color: #0b66d6;
  margin: 8px 0 10px;
  margin-top: 4px;
  font-family: "Roboto Slab", serif;
}

/* Línea mitad azul mitad roja */
.title-line{
  height: 4px;
  width: 72%;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    #0b66d6 0%,
    #0b66d6 50%,
    #dc3545 50%,
    #dc3545 100%
  );
}

/* Padding general */
.auth-body{
  padding: 18px 18px 20px;
}

/* ✅ UX: forzar 1 columna y centrado */
.form-grid{
  display: grid;
  grid-template-columns: 1fr !important; /* ✅ 1 columna SIEMPRE */
  gap: 14px;
  max-width: 400px;                     /* ✅ ancho cómodo */
  margin: 0 auto;                       /* ✅ centrado */
}

/* Labels */
.form-label-compact{
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}

/* Input con icono */
.input-icon{
  position: relative;
}
.input-icon i{
  position:absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  pointer-events:none;
}
.input-icon input{
  padding-left: 40px !important;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* Botón row centrado y full */
.btn-row{
  max-width: 400px;
  margin: 14px auto 0;
  display: grid;
  gap: 10px;
}

/* Botones */
.btn-login{
  width: 100%;
  background: var(--huap-red) !important;
  border-color: var(--huap-red) !important;
  color: #fff !important;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 16px;
}

.btn-recupera{
  width: 100%;
  background: var(--huap-blue) !important;
  border-color: var(--huap-blue) !important;
  color: #fff !important;
  font-weight: 800;
  border-radius: 12px;
  padding: 12px 16px;
}
.btn-recupera:hover{
  background: var(--huap-blue-dark) !important;
  border-color: var(--huap-blue-dark) !important;
}

/* Caja “problemas” simplificada */
.help-box{
  max-width: 400px;
  margin: 14px auto 0;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
}

.help-title{
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom: 10px;
}
.help-title i{ font-size: 18px; color: var(--huap-blue); }

/* Error */
#msje{
  max-width: 400px;
  margin: 12px auto 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220,53,69,.12);
  color: #b02a37;
  font-weight: 700;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 575.98px){
  .login-title{ font-size: 32px; }
  .title-line{ width: 90%; }
  .auth-body{ padding: 18px 16px 22px; }
  .form-grid, .btn-row, .help-box, #msje{ max-width: 100%; }
}

/* Forzar centrado real (pisar layout del template) */
.container-scroller,
.container-fluid,
.page-body-wrapper,
.full-page-wrapper,
.auth-page{
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

/* Asegurar que el wrap centre y ocupe todo */
.auth-wrap{
  width: 100% !important;
}

/* El card al centro sí o sí */
.auth-card{
  margin: 0 auto !important;
}
