:root{
  --sgpm-red:#f3545d;
  --sgpm-red-dark:#d94850;
  --ink:#1f2937;
  --muted:#6b7280;
  --card:#ffffff;
  --line:#e5e7eb;
  --bg1:#0b0f19;
  --overlay: rgba(0,0,0,.75);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:"Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(0,0,0,0.78);
  background:#0b0f19;
}

/* Logo superior */
.brand-top{
  position:fixed;
  top:16px;
  left:16px;
  z-index:3;
  display:flex;
  gap:10px;
  align-items:center;
}

.brand-top__logo{
  height:142px;
  width:auto;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}

/* Fondo scroll */
.container{
  height:200vh;
  background-image:
    linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.25)),
    url("/assets/img/fondo-login2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Texto central */
.scroll-down{
  position:fixed;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px;
  text-align:center;
  z-index:2;

  animation: slideDownFade 1.2s ease-out both;
}
.scroll-down__title{
  font-size:40px;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#f3545d;

  text-shadow:
    0 0 2px rgba(255,255,255,.95),
    0 0 10px rgba(243,84,93,.55),
    0 0 22px rgba(243,84,93,.35),
    0 0 36px rgba(243,84,93,.18);

  animation:
    slideDownFade 1.1s ease-out .2s both,
    sgpmGlow 4s ease-in-out infinite;
}



.scroll-down__subtitle{
  margin-top:12px;
  max-width:900px;
  font-size:18px;
  line-height:1.55;
  color:#ffffff;

  text-shadow:
    0 0 2px rgba(243,84,93,.55),
    0 0 6px rgba(243,84,93,.35),
    0 0 14px rgba(243,84,93,.20),
    0 0 26px rgba(243,84,93,.12);

  animation:
    slideDownFade 1.1s ease-out .45s both,
    sgpmGlowSoft 5s ease-in-out infinite;
}
@keyframes sgpmGlow{
  0%{
    text-shadow:
      0 0 2px rgba(255,255,255,.95),
      0 0 10px rgba(243,84,93,.45),
      0 0 22px rgba(243,84,93,.28),
      0 0 36px rgba(243,84,93,.15);
  }
  50%{
    text-shadow:
      0 0 4px rgba(255,255,255,1),
      0 0 14px rgba(243,84,93,.65),
      0 0 30px rgba(243,84,93,.45),
      0 0 48px rgba(243,84,93,.28);
  }
  100%{
    text-shadow:
      0 0 2px rgba(255,255,255,.95),
      0 0 10px rgba(243,84,93,.45),
      0 0 22px rgba(243,84,93,.28),
      0 0 36px rgba(243,84,93,.15);
  }
}

@keyframes sgpmGlowSoft{
  0%{
    text-shadow:
      0 0 2px rgba(243,84,93,.45),
      0 0 8px rgba(243,84,93,.30),
      0 0 18px rgba(243,84,93,.18);
  }
  50%{
    text-shadow:
      0 0 3px rgba(243,84,93,.65),
      0 0 12px rgba(243,84,93,.45),
      0 0 26px rgba(243,84,93,.30);
  }
  100%{
    text-shadow:
      0 0 2px rgba(243,84,93,.45),
      0 0 8px rgba(243,84,93,.30),
      0 0 18px rgba(243,84,93,.18);
  }
}


.scroll-down__icon{
  margin-top:16px;
  width:52px;
  fill:rgba(255,255,255,.85);

  animation:
    slideDownFade 1.1s ease-out .7s both,
    floaty 1.6s ease-in-out infinite;
}

@keyframes floaty{
  0%,100%{ transform:translateY(0); opacity:.9; }
  50%{ transform:translateY(8px); opacity:1; }
}
@media (max-width: 750px){
  .scroll-down__title{
    font-size:32px;
    animation-duration:5.5s;
  }

  .scroll-down__subtitle{
    font-size:16px;
    animation-duration:6.5s;
  }
}


/* Modal base */
.modal{
  position:fixed;
  left:0;
  bottom:0;
  width:100%;
  height:60px;
  background: rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  transition:.4s;
  z-index:5;
}

.modal-container{
  display:flex;
  max-width:820px;
  width:calc(100% - 28px);
  border-radius:16px;
  overflow:hidden;
  position:absolute;
  opacity:0;
  pointer-events:none;
  transition-duration:.35s;
  background:var(--card);
  transform: translateY(110px) scale(.92);
  box-shadow: 0 25px 80px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
}

.modal-title{
  font-size:24px;
  margin:16px 0 6px 0;
  font-weight:800;
  color:var(--ink);
}

.modal-desc{
  margin:0 0 18px 0;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}

.modal-left{
  padding:26px 26px 22px;
  background:#fff;
  flex:1.55;
  transition-duration:.5s;
  transform: translateY(40px);
  opacity:0;
}

.modal-right{
  flex:1.45;
  font-size:0;
  transition:.3s;
  overflow:hidden;
  background:#111827;
}

.modal-right img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.15);
  transition-duration: 1.1s;
  filter: saturate(1.1) contrast(1.05);
}

/* Branding dentro del modal */
.modal-brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.modal-brand__logo{
  height:44px;
  width:auto;
}

.modal-brand__name{
  font-weight:900;
  letter-spacing:-0.02em;
  color:var(--ink);
  line-height:1;
}

.modal-brand__sub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

/* Botón “Entrar a SGPM” */
.modal-button{
  color:#fff;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  border:0;
  outline:0;
  padding:12px 22px;
  border-radius:999px;
  background: linear-gradient(180deg, var(--sgpm-red) 0%, var(--sgpm-red-dark) 100%);
  box-shadow: 0 16px 50px rgba(243,84,93,.32);
  transition:.22s;
}

.modal-button:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 55px rgba(243,84,93,.38);
}

/* Estado abierto */
.modal.is-open{
  height:100%;
  background: var(--overlay);
}

.modal.is-open .modal-button{ opacity:0; pointer-events:none; }

.modal.is-open .modal-container{
  opacity:1;
  transition-duration:.55s;
  pointer-events:auto;
  transform: translateY(0) scale(1);
}

.modal.is-open .modal-right img{ transform: scale(1); }

.modal.is-open .modal-left{
  transform: translateY(0);
  opacity:1;
  transition-delay:.08s;
}

/* Inputs */
.input-block{
  display:flex;
  flex-direction:column;
  padding:10px 12px 8px;
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:14px;
  transition:.2s;
  background:#fff;
}

.input-label{
  font-size:11px;
  text-transform:uppercase;
  font-weight:800;
  letter-spacing:.08em;
  color:rgba(243,84,93,.95);
}

.input-block input{
  outline:0;
  border:0;
  padding:6px 0 2px;
  font-size:14px;
  font-family:inherit;
  color:var(--ink);
}

.input-block input::placeholder{ color:#9ca3af; opacity:1; }

.input-block:focus-within{
  border-color: rgba(243,84,93,.55);
  box-shadow: 0 0 0 4px rgba(243,84,93,.12);
}

/* acciones */
.modal-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:6px;
}

.link-muted{
  color:rgba(31,41,55,.65);
  font-size:13px;
  text-decoration:none;
}

.link-muted:hover{
  color:var(--sgpm-red);
  text-decoration:underline;
}

.btn-primary{
  border:0;
  cursor:pointer;
  padding:10px 14px;
  border-radius:12px;
  background: linear-gradient(180deg, var(--sgpm-red) 0%, var(--sgpm-red-dark) 100%);
  color:#fff;
  font-weight:800;
  transition:.2s;
  box-shadow: 0 14px 35px rgba(243,84,93,.25);
}

.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 45px rgba(243,84,93,.33);
}

/* Divider */
.divider{
  position:relative;
  margin:16px 0;
  height:1px;
  background: var(--line);
}

.divider span{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  font-size:12px;
  color:var(--muted);
  background:#fff;
  padding:2px 10px;
  border-radius:999px;
}

/* Google */
.btn-google{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-weight:800;
  color:var(--ink);
  transition:.2s;
}

.btn-google:hover{
  border-color: rgba(243,84,93,.45);
  box-shadow: 0 0 0 4px rgba(243,84,93,.10);
}

.btn-google__icon{
  width:18px;
  height:18px;
  display:inline-flex;
}

.btn-google__icon svg{
  width:18px;
  height:18px;
  display:block;
}

/* hint */
.hint{
  margin:12px 0 0;
  font-size:12px;
  color:rgba(107,114,128,.95);
  line-height:1.45;
}

/* close */
.icon-button{
  outline:0;
  position:absolute;
  right:12px;
  top:12px;
  width:36px;
  height:36px;
  border:0;
  background: rgba(0,0,0,.03);
  padding:6px;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
}

.icon-button:hover{
  background: rgba(243,84,93,.10);
}

.icon-button svg{
  width:100%;
  height:100%;
  fill: rgba(31,41,55,.65);
}

/* Responsive */
@media (max-width: 900px){
  .scroll-down__title{ font-size:34px; }
  .scroll-down__subtitle{ font-size:16px; }
}

@media (max-width: 750px){
  .modal-container{ width: calc(100% - 22px); }
  .modal-right{ display:none; }
  .modal-left{ padding:22px 18px 18px; }
  .modal-actions{ flex-direction:column; align-items:stretch; }
  .btn-primary{ width:100%; }
  .link-muted{ text-align:center; }
}
.password-wrap{
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input{
  width: 100%;
  padding-right: 42px; /* espacio para el botón ojo */
}

.toggle-pass{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s;
}

.toggle-pass:hover{
  background: rgba(243,84,93,.10);
}

.toggle-pass .eye{
  width: 18px;
  height: 18px;
  fill: rgba(31,41,55,.65);
}

.toggle-pass[aria-pressed="true"] .eye-open{ display: none; }
.toggle-pass[aria-pressed="false"] .eye-off{ display: none; }
.password-wrap{
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input{
  width: 100%;
  padding-right: 42px;
}
@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}



/* =========================================
   AUTH PAGES (forgot / reset / cambiar_pass / google_verify)
   Estética consistente con tu login (SGPM)
========================================= */

.auth-page{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background:
    linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.55)),
    url("/assets/img/fondo-login2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-card{
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
}

.auth-card__inner{
  padding: 26px 26px 22px;
}

.auth-brand{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-brand__logo{
  height: 44px;
  width: auto;
}

.auth-brand__name{
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.auth-brand__sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.auth-title{
  font-size: 24px;
  margin: 10px 0 6px 0;
  font-weight: 900;
  color: var(--ink);
}

.auth-desc{
  margin: 0 0 18px 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.auth-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  margin-top: 10px;
}

.auth-actions .btn-primary{ width: auto; }
.auth-actions .link-muted{ white-space: nowrap; }

.auth-full .btn-primary{ width: 100%; }
.auth-full .btn-google{ width: 100%; }

.auth-alert{
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 14px 0;
  border: 1px solid var(--line);
}

.auth-alert--ok{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
  color: rgba(20,83,45,.90);
}

.auth-alert--err{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.35);
  color: rgba(127,29,29,.90);
}

.auth-foot{
  margin-top: 12px;
  text-align: center;
}

/* responsive */
@media (max-width: 750px){
  .auth-card__inner{ padding: 22px 18px 18px; }
  .auth-actions{ flex-direction: column; align-items: stretch; }
  .auth-actions .btn-primary{ width: 100%; }
  .auth-actions .link-muted{ text-align:center; }
}

/* ===============================
   AUTH ANIMACIONES SUAVES
================================ */

.auth-anim{
  animation: authDrop .55s ease-out both;
}

.auth-anim-item{
  opacity: 0;
  animation: authItem .55s ease-out both;
}

@keyframes authDrop{
  0%{ opacity:0; transform: translateY(-18px) scale(.99); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}

@keyframes authItem{
  0%{ opacity:0; transform: translateY(-12px); }
  100%{ opacity:1; transform: translateY(0); }
}
/* ===============================
   AUTH ALERTS (OK / ERROR)
================================ */
.auth-alert{
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 14px 0;
  border: 1px solid var(--line);
}

.auth-alert--ok{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
  color: rgba(20,83,45,.90);
}

.auth-alert--err{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.35);
  color: rgba(127,29,29,.90);
}
.auth-alert{
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 14px 0;
  border: 1px solid var(--line);
}
.auth-alert--ok{
  background: rgba(34,197,94,.12);
  border-color: rgba(34,197,94,.35);
  color: rgba(20,83,45,.90);
}
.auth-alert--err{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.35);
  color: rgba(127,29,29,.90);
}