/* ==========================================================================
   SERAGEM · Diseño corporativo de autenticación (login / recupera / chgpass)
   Todas las clases van prefijadas con "srg-" y encapsuladas bajo .srg-auth
   para no colisionar con Bootstrap/Metronic (.card, .btn, .footer, etc.).
   ========================================================================== */

.srg-auth{
  --srg-navy:#0d2f63;
  --srg-navy-2:#153f7d;
  --srg-red:#d62839;
  --srg-text:#17233f;
  --srg-muted:#6f7c95;
  --srg-line:#dfe5ef;
}

/* --- Reset local ---------------------------------------------------------- */
body.srg-auth-body{
  margin:0;
  min-height:100vh;
  background:#eaf0f7;
  font-family:Inter,Poppins,"Segoe UI",Arial,sans-serif;
}

.srg-auth,
.srg-auth *{box-sizing:border-box}

/* --- Layout --------------------------------------------------------------- */
.srg-auth{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(420px,.85fr);
  overflow:hidden;
  color:var(--srg-text);
}

/* --- Hero ----------------------------------------------------------------- */
.srg-hero{
  position:relative;
  min-height:100vh;
  background-color:#04183a;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:64px;
  color:#fff;
  isolation:isolate;
}

.srg-hero:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(4,24,58,.83), rgba(8,37,83,.57)),
    radial-gradient(circle at 22% 20%, rgba(255,255,255,.10), transparent 28%),
    linear-gradient(180deg, transparent 40%, rgba(4,24,58,.65));
  z-index:-1;
}

.srg-hero-content{max-width:660px}

.srg-kicker{
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:700;
  font-size:13px;
  opacity:.88;
  margin-bottom:16px;
}

.srg-hero-title{
  margin:0 0 16px;
  font-size:clamp(42px,5vw,74px);
  line-height:.98;
  font-weight:800;
  max-width:760px;
  color:#fff;
}

.srg-hero-text{
  margin:0;
  font-size:18px;
  line-height:1.6;
  max-width:620px;
  color:rgba(255,255,255,.86);
}

.srg-benefits{
  display:flex;
  gap:18px;
  margin-top:34px;
  flex-wrap:wrap;
}

.srg-benefit{
  border:1px solid rgba(255,255,255,.20);
  background:rgba(255,255,255,.08);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border-radius:16px;
  padding:16px 18px;
  min-width:170px;
}

.srg-benefit strong{display:block;font-size:15px}
.srg-benefit span{font-size:13px;color:rgba(255,255,255,.72)}

/* --- Panel derecho -------------------------------------------------------- */
.srg-panel{
  background:linear-gradient(180deg,#f8fbff 0%,#eef3f9 100%);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px 38px;
  position:relative;
}

.srg-panel:before{
  content:"";
  position:absolute;
  left:-22px;
  top:0;
  bottom:0;
  width:44px;
  background:linear-gradient(180deg,var(--srg-navy),var(--srg-red));
  clip-path:polygon(50% 0,100% 0,50% 100%,0 100%);
  opacity:.96;
}

.srg-card{
  width:min(100%,610px);
  background:#fff;
  border-radius:24px;
  box-shadow:0 28px 70px rgba(10,35,80,.15);
  padding:46px 52px 38px;
  border:1px solid rgba(23,63,125,.08);
  position:relative;
  z-index:1;
}

/* --- Marca ---------------------------------------------------------------- */
.srg-brand{
  text-align:center;
  margin-bottom:30px;
}

.srg-brand-logo{
  display:block;
  margin:0 auto 18px;
  width:min(350px,82%);
  max-height:130px;
  object-fit:contain;
}

.srg-brand-title{
  margin:0;
  font-size:29px;
  font-weight:700;
  color:var(--srg-text);
}

.srg-brand-sub{
  margin:8px 0 0;
  color:var(--srg-muted);
  font-size:15px;
}

.srg-accent{
  width:76px;
  height:3px;
  background:var(--srg-red);
  border-radius:99px;
  margin:18px auto 0;
}

/* --- Campos --------------------------------------------------------------- */
.srg-field{margin-top:22px}

.srg-field-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:9px;
}

.srg-label{
  font-size:14px;
  font-weight:700;
  margin:0;
  color:var(--srg-text);
}

.srg-link{
  color:#1473e6;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}

.srg-link:hover{text-decoration:underline}

.srg-control{
  height:56px;
  display:flex;
  align-items:center;
  gap:12px;
  border:1px solid #d6dfeb;
  border-radius:12px;
  padding:0 16px;
  background:#fff;
  transition:.2s ease;
}

.srg-control:focus-within{
  border-color:#7797c8;
  box-shadow:0 0 0 4px rgba(21,63,125,.08);
}

.srg-icon{
  width:20px;
  height:20px;
  flex:0 0 20px;
  color:#687994;
}

.srg-auth input.srg-input{
  border:0;
  outline:0;
  width:100%;
  height:100%;
  font-size:15px;
  color:var(--srg-text);
  background:transparent;
  padding:0;
  box-shadow:none;
}

.srg-eye{
  border:0;
  background:none;
  cursor:pointer;
  padding:6px;
  color:#687994;
  display:flex;
  align-items:center;
  line-height:0;
}

.srg-eye .svg-icon{
  display:flex;
  align-items:center;
  line-height:0;
}

/* Estado de error inyectado por FormValidation (clase .is-invalid) */
.srg-control:has(input.is-invalid){
  border-color:#f1416c;
  background:#fff5f8;
}

.srg-auth .fv-plugins-message-container,
.srg-auth .invalid-feedback{
  display:block;
  width:100%;
  margin-top:8px;
  font-size:13px;
  font-weight:600;
  color:#f1416c;
}

.srg-auth .invalid-feedback:empty,
.srg-auth .fv-plugins-message-container:empty{display:none}

/* --- Medidor de contraseña (KTPasswordMeter) ------------------------------ */
.srg-meter{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
}

.srg-meter-bar{
  flex:1 1 auto;
  height:5px;
  border-radius:99px;
  background:#e3e9f2;
}

.srg-meter-bar.active{background:#50cd89}

.srg-hint{
  margin:10px 0 0;
  font-size:13px;
  color:var(--srg-muted);
  line-height:1.5;
}

/* --- Acciones ------------------------------------------------------------- */
.srg-actions{
  display:flex;
  gap:12px;
  margin-top:28px;
}

.srg-btn{
  flex:1 1 auto;
  width:100%;
  height:58px;
  border:0;
  border-radius:12px;
  background:linear-gradient(90deg,var(--srg-navy),var(--srg-navy-2));
  color:#fff;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(13,47,99,.18);
  transition:transform .15s ease, box-shadow .15s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}

.srg-btn:hover:not(:disabled){
  transform:translateY(-1px);
  box-shadow:0 15px 34px rgba(13,47,99,.24);
}

.srg-btn:disabled{opacity:.75;cursor:default}

.srg-btn-ghost{
  flex:0 0 auto;
  width:auto;
  min-width:130px;
  padding:0 24px;
  background:#eef2f8;
  color:var(--srg-navy);
  box-shadow:none;
  text-decoration:none;
}

.srg-btn-ghost:hover{
  background:#e3e9f4;
  box-shadow:none;
}

/* Indicador de carga de Metronic dentro del botón propio */
.srg-btn .indicator-progress{display:none;align-items:center;justify-content:center}
.srg-btn[data-kt-indicator="on"] .indicator-label{display:none}
.srg-btn[data-kt-indicator="on"] .indicator-progress{display:flex}

/* --- Pie ------------------------------------------------------------------ */
.srg-secure{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:24px;
  color:#7b879d;
  font-size:13px;
}

.srg-foot{
  margin-top:28px;
  padding-top:24px;
  border-top:1px solid var(--srg-line);
  text-align:center;
  color:#7c8799;
  font-size:13px;
}

.srg-foot a{
  color:#1473e6;
  font-weight:700;
  text-decoration:none;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width:1000px){
  .srg-auth{grid-template-columns:1fr}
  .srg-hero{
    min-height:42vh;
    padding:38px 28px;
    justify-content:center;
  }
  .srg-hero-title{font-size:42px}
  .srg-panel{
    min-height:auto;
    padding:34px 20px 46px;
  }
  .srg-panel:before{display:none}
}

@media (max-width:600px){
  .srg-hero{display:none}
  .srg-panel{min-height:100vh}
  .srg-card{
    padding:32px 22px 28px;
    border-radius:18px;
  }
  .srg-brand-title{font-size:25px}
  .srg-actions{flex-direction:column}
  .srg-btn-ghost{width:100%}
}
