:root{
  --auth-radius: 16px;
  --auth-shadow: 0 18px 55px rgba(0,0,0,.22);
  --panel-min-h: 520px;

  /* Banner look (como tu IMG 2) */
  --banner-overlay-top: rgba(0,0,0,.03);
  --banner-overlay-bottom: rgba(0,0,0,.18);
}

/* =========================
   FONDO GENERAL
========================= */
.auth-page{
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 25% 18%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(900px 600px at 75% 25%, rgba(255,204,0,.06), transparent 55%),
    #2b2b2b;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 46px 0;
}

.auth-wave{
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -12%;
  height: 45vh;
  background: linear-gradient(180deg, rgba(230,57,70,.92), rgba(230,57,70,1));
  border-top-left-radius: 55% 35%;
  border-top-right-radius: 45% 30%;
  z-index: 0;
}

.auth-shell{ position: relative; z-index: 1; }

.auth-stage{
  position: relative;
  border-radius: calc(var(--auth-radius) + 6px);
  padding: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  overflow: hidden;
}

/* =========================
   GRID (MISMO TAMAÑO)
========================= */
.auth-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

/* =========================
   LINKS (SIN AZUL)
========================= */
.auth-link{
  color: var(--danger);
  font-weight: 900;
  text-decoration: none;
}
.auth-link:hover{ text-decoration: underline; }

.auth-muted-link{
  color: #6d6d6d;
  font-weight: 800;
  text-decoration: none;
}
.auth-muted-link:hover{
  color: #111;
  text-decoration: underline;
}

/* =========================
   BANNER ÚNICO
========================= */
.banner-haro{
  background-image:
    linear-gradient(180deg, var(--banner-overlay-top), var(--banner-overlay-bottom)),
    url("/PrototipoHARO/img/banner1.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* =========================
   BADGE (MINIBANNER)
========================= */
.auth-logo{
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  background: rgba(255,255,255,.92);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-logo img{ height: 34px; }
.auth-logo small{ display:block; font-weight: 900; line-height: 1.05; color:#111; }
.auth-logo span{ display:block; font-size: .78rem; color: #666; font-weight: 800; }

/* =========================
   PANEL IZQUIERDO (LOGIN -> IMAGEN EN ACTIVATE)
========================= */
.left-panel{
  position: relative;
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  min-height: var(--panel-min-h);
  background: #fff;
}

.left-image-layer{
  position:absolute;
  inset:0;
  opacity: 0;
  transform: translateX(-10%);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.9,.2,1);
  pointer-events:none;
}
.left-image-layer::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(600px 360px at 30% 25%, rgba(255,255,255,.14), transparent 60%);
}

/* Contenido login */
.left-content{
  position:relative;
  z-index: 1;
  padding: 28px;
  transition: opacity .3s ease, transform .55s cubic-bezier(.2,.9,.2,1);
  min-height: var(--panel-min-h);
}

/* Estado activar: el panel izquierdo muestra banner (con minibanner dentro) */
.auth-stage.is-activate .left-image-layer{
  opacity: 1;
  transform: translateX(0%);
}
.auth-stage.is-activate .left-content{
  opacity: 0;
  transform: translateX(-6%);
  pointer-events: none;
}

/* =========================
   PANEL DERECHO (BANNER -> ACTIVAR)
   ✅ Quitamos el negro visible del borde
========================= */
.right-panel{
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  position: relative;
  min-height: var(--panel-min-h);

  /* ✅ antes era negro, por eso se veía marco negro */
  background: transparent;
}

/* layers */
.panel-layer{
  position: absolute;
  inset: 0;
  transition: transform .55s cubic-bezier(.2,.9,.2,1), opacity .35s ease;
}

/* banner layer */
.panel-image{
  transform: translateX(0%);
  opacity: 1;
  border-radius: var(--auth-radius);
}

/* activar layer (card blanca) */
.panel-activate{
  background: rgba(255,255,255,.96);
  border-radius: var(--auth-radius);
  padding: 26px;
  margin: 0;                 /* ✅ sin margen para que NO se vea fondo detrás */
  height: 100%;
  overflow: auto;
  transform: translateX(110%);
  opacity: 0;
}

/* animación */
.right-panel.is-activate .panel-image{
  transform: translateX(110%);
  opacity: .99;
}
.right-panel.is-activate .panel-activate{
  transform: translateX(0%);
  opacity: 1;
}

/* =========================
   TEXTO / FORM
========================= */
.auth-title{ font-weight: 900; margin-bottom: 6px; }
.auth-subtitle{ color: var(--muted); font-size: .95rem; margin-bottom: 10px; }

.auth-hint{
  margin-bottom: 14px;
  font-size: .86rem;
  color: #6d6d6d;
  line-height: 1.25;
  background: #f7f7f7;
  border: 1px solid #efefef;
  border-radius: 12px;
  padding: 10px 12px;
}
.auth-hint strong{ color: #111; }

.auth-label{
  font-size: .85rem;
  color: #666;
  font-weight: 900;
  margin-bottom: 6px;
}

.auth-input{
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e6e6e6;
  background: #f8fbff;
}
.auth-input:focus{
  border-color: rgba(230,57,70,.55);
  box-shadow: 0 0 0 .2rem rgba(230,57,70,.16);
  background: #fff;
}

/* botones */
.btn-auth{
  border-radius: 12px;
  padding: 12px;
  font-weight: 900;
}

.btn-google{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  border: 1px solid #d9d9d9 !important;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google:hover{
  border-color: var(--accent) !important;
  background: var(--accent);
  color: #111;
}

.btn-activate{
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  border: 1px solid rgba(230,57,70,.45);
  background: #fff;
  color: var(--danger);
}
.btn-activate:hover{
  border-color: var(--accent);
  background: var(--accent);
  color: #111;
}

.auth-otp-box{
  border: 1px dashed rgba(230,57,70,.35);
  background: rgba(230,57,70,.04);
  border-radius: 12px;
  padding: 12px;
}

.auth-otp-copy{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: #4b5563;
  font-size: .88rem;
}

.auth-otp-copy strong{
  color: #111;
  font-size: .92rem;
}

.auth-otp-btn{
  width: 100%;
  border-radius: 12px;
  font-weight: 900;
}

.auth-otp-status{
  min-height: 20px;
  margin-top: 10px;
  font-size: .82rem;
  color: #6b7280;
}

.auth-otp-status.is-success{
  color: #0f766e;
}

.auth-otp-status.is-error{
  color: #b42318;
}

.auth-password-meter{
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.auth-password-progress{
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.auth-password-progress .progress-bar{
  transition: width .25s ease, background-color .25s ease;
}

/* toggle password */
.pw-wrap{ position: relative; }
.pw-toggle{
  position:absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #777;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.pw-toggle:hover{ background: rgba(0,0,0,.05); color:#111; }

/* activar: link rojo después del título */
.activate-title{ font-weight: 900; margin-bottom: 2px; }
.activate-backlink{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 12px;
  color: var(--danger);
  font-weight: 900;
  text-decoration: none;
}
.activate-backlink:hover{ text-decoration: underline; }
.activate-sub{
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 12px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px){
  :root{ --panel-min-h: 260px; }
  .auth-grid{ grid-template-columns: 1fr; }
  .left-content{ padding: 18px; }
  .panel-activate{ padding: 18px; }

  /* móvil: no ocultamos panel izquierdo */
  .auth-stage.is-activate .left-content{ opacity: 1; transform: none; pointer-events:auto; }
  .auth-stage.is-activate .left-image-layer{ opacity: 0; transform: none; }
}

/* =========================
   MOBILE FIX OVERRIDES
========================= */
@media (max-width: 992px){
  :root{ --panel-min-h: auto; }

  .auth-page{
    align-items: flex-start;
    padding: 14px 0 22px;
    overflow-y: auto;
  }

  .auth-wave{
    height: 28vh;
    bottom: -14%;
    left: -10%;
    right: -10%;
  }

  .auth-shell{
    width: min(100%, 560px);
    padding: 0 10px;
  }

  .auth-stage{
    padding: 10px;
    border-radius: 14px;
  }

  .auth-grid{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .left-panel,
  .right-panel{
    min-height: auto;
    border-radius: 14px;
  }

  .left-content,
  .panel-activate{
    min-height: auto;
    padding: 18px 14px;
  }

  .panel-activate{
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .right-panel{ display: none; }
  .auth-stage.is-activate .left-panel{ display: none; }
  .auth-stage.is-activate .right-panel{ display: block; }

  .auth-stage.is-activate .left-content{
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .auth-stage.is-activate .left-image-layer{
    opacity: 0;
    transform: none;
  }

  .auth-logo{
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
  }
  .auth-logo img{ height: 28px; }
}

@media (max-width: 576px){
  .auth-page{ padding: 10px 0 18px; }
  .auth-stage{ padding: 8px; }
  .left-content,
  .panel-activate{ padding: 14px 12px; }

  .auth-title{ font-size: 1.45rem; }
  .auth-subtitle{ font-size: .9rem; }
  .auth-hint{ font-size: .82rem; padding: 9px 10px; }

  .btn-auth,
  .btn-google,
  .btn-activate{
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Fix extra para evitar panel en blanco en moviles */
@media (max-width: 992px){
  .auth-shell{
    width: 100%;
    max-width: 560px;
  }

  .left-panel{ display: block; }
  .right-panel{
    display: none;
    min-height: 0;
  }

  .auth-stage.is-activate .left-panel{ display: none; }
  .auth-stage.is-activate .right-panel{
    display: block;
    background: #fff;
  }

  .auth-stage.is-activate .right-panel .panel-image{
    display: none;
  }

  .auth-stage.is-activate .right-panel .panel-activate{
    position: relative;
    inset: auto;
    transform: none;
    opacity: 1;
    height: auto;
    max-height: none;
    overflow: visible;
    margin: 0;
  }
}
