/* diflow/assets/css/auth.css */
/* =========================================================
   auth.css — DiFlow Auth (Login/Register)
   FIXES:
   1) Esfera cortada: el contenedor .auth vuelve a iniciar en top (100vh)
      y solo se baja el contenido con padding-top.
   2) No colisión: todo está scopeado con .auth / body.auth-page
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");

/* =========================================================
   ---------- 1) AUTH PAGE BASE ----------
   ========================================================= */
body.auth-page,
body.auth-page input{
  font-family: "Poppins", sans-serif;
}

body.auth-page{
  background:
    radial-gradient(1200px 800px at 20% 10%, #132135 0%, transparent 65%),
    radial-gradient(1000px 700px at 80% 20%, rgba(32, 77, 109, .45) 0%, transparent 60%),
    linear-gradient(180deg, var(--dif-bg, #0B0F14) 0%, var(--dif-bg2, #0E1622) 100%);
  color: var(--dif-text, #E8F0FF);
  min-height: 100vh;
}

/* =========================================================
   ---------- 2) AUTH SHELL ----------
   - IMPORTANT: ya NO empujamos hacia abajo aquí
   ========================================================= */
.auth-shell{
  min-height: 100vh;
}

/* =========================================================
   ---------- 3) CANVAS FULL VIEWPORT ----------
   ========================================================= */
body.auth-page #diflow-bg{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;

  /* CLAVE: arriba del body::before (z 0) */
  z-index: 1;
}

/* =========================================================
   ---------- 4) AUTH WRAPPER (.auth) ----------
   FIX: la esfera ya no se recorta por el “top” del shell.
   - .auth inicia desde arriba (100vh)
   - El contenido se baja con padding-top (respeta header fijo)
   ========================================================= */
.auth{
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;

  /* CLAVE: asegura que forms/orb estén sobre el canvas */
  z-index: 3;

  padding-top: calc(var(--header-h, 76px) + 12px);
}

/* =========================================================
   ---------- 5) FORMS LAYOUT ----------
   ========================================================= */
.auth .forms-container{
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: auto;
}

.auth .signin-signup{
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 75%;
  width: 50%;
  transition: 1s 0.7s ease-in-out;
  display: grid;
  grid-template-columns: 1fr;
  z-index: 5;
  pointer-events: auto;
}

/* FORM */
.auth form{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0rem 5rem;
  transition: all 0.2s 0.7s;
  overflow: hidden;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
}

.auth form.sign-up-form{ opacity: 0; z-index: 1; }
.auth form.sign-in-form{ z-index: 2; }

/* =========================================================
   ---------- 6) TITLES / TEXT ----------
   ========================================================= */
.auth .title{
  font-size: 2.2rem;
  color: var(--dif-text, #E8F0FF);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.auth .social-text{
  padding: 0.7rem 0;
  font-size: 1rem;
  color: var(--dif-muted, rgba(232,240,255,.72));
}

/* =========================================================
   ---------- 7) INPUTS ----------
   ========================================================= */
.auth .input-field{
  max-width: 380px;
  width: 100%;
  background: rgba(0, 0, 0, .22);
  margin: 10px 0;
  height: 55px;
  border-radius: 55px;
  display: grid;
  grid-template-columns: 15% 85%;
  padding: 0 0.4rem;
  position: relative;
  border: 1px solid rgba(255,255,255,.10);
  transition: 160ms ease;
}

.auth .input-field:hover{ border-color: rgba(119, 212, 212, .22); }

.auth .input-field:focus-within{
  border-color: rgba(119, 212, 212, .28);
  box-shadow: 0 0 0 3px rgba(119, 212, 212, .18);
}

.auth .input-field i{
  text-align: center;
  line-height: 55px;
  color: rgba(232, 240, 255, .55);
  transition: 0.5s;
  font-size: 1.1rem;
}

.auth .input-field:focus-within i{ color: var(--dif-accent, #77D4D4); }

.auth .input-field input{
  background: none;
  outline: none;
  border: none;
  line-height: 1;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dif-text, #E8F0FF);
}

.auth .input-field input::placeholder{
  color: rgba(232, 240, 255, .45);
  font-weight: 500;
}

/* =========================================================
   ---------- 8) SOCIAL ----------
   ========================================================= */
.auth .social-media{ display: flex; justify-content: center; }

.auth .social-icon{
  height: 46px;
  width: 46px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0.45rem;
  color: rgba(232, 240, 255, .72);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0, 0, 0, .18);
  text-decoration: none;
  font-size: 1.1rem;
  transition: 0.3s;
}

.auth .social-icon:hover{
  color: var(--dif-accent, #77D4D4);
  border-color: rgba(119, 212, 212, .28);
  box-shadow: 0 0 0 3px rgba(119, 212, 212, .18);
}

/* =========================================================
   ---------- 9) BUTTONS ----------
   ========================================================= */
.auth .btn{
  width: 150px;
  border: none;
  outline: none;
  height: 49px;
  border-radius: 49px;
  color: #06131b;
  text-transform: uppercase;
  font-weight: 700;
  margin: 10px 0;
  cursor: pointer;
  transition: 0.25s ease;
  background-image: linear-gradient(135deg, var(--dif-accent, #77D4D4) 0%, var(--dif-accent2, #204D6D) 100%);
  box-shadow: 0 12px 26px rgba(119, 212, 212, .14);
}

.auth .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(119, 212, 212, .18);
}

.auth .btn:active{ transform: translateY(0); }

/* =========================================================
   ---------- 10) ESFERA (ORB) ----------
   - sigue siendo grande, pero ya no se recorta por el top del shell
   ========================================================= */
.auth::before{
  content: "";
  position: absolute;

  width: clamp(1600px, 165vmax, 2600px);
  height: clamp(1600px, 165vmax, 2600px);

  top: 50%;
  right: 56%;
  transform: translateY(-50%);

  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(circle at 40% 48%, rgba(119, 212, 212, .95) 0%, rgba(79, 186, 203, .88) 42%, rgba(32, 77, 109, .86) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .05) inset,
    0 22px 90px rgba(0, 0, 0, .22);
  filter: saturate(1.06);
  transition: 1.8s ease-in-out;

  z-index: 1;
  pointer-events: none;
}

/* =========================================================
   ---------- 11) PANELS ----------
   ========================================================= */
.auth .panels-container{
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  z-index: 10;
  pointer-events: none;
}

.auth .panel{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-around;
  text-align: center;
}

.auth .left-panel{ padding: 3rem 17% 2rem 12%; }
.auth .right-panel{ padding: 3rem 12% 2rem 17%; }

.auth .panel .content{
  color: var(--dif-text, #E8F0FF);
  transition: transform 0.9s ease-in-out;
  transition-delay: 0.6s;
  pointer-events: none;
}

.auth .panel h3{ font-weight: 700; line-height: 1; font-size: 1.5rem; }
.auth .panel p{ font-size: 0.95rem; padding: 0.7rem 0; color: rgba(232, 240, 255, .78); }

.auth .panels-container .btn.transparent,
.auth .panels-container .btn.transparent *{
  pointer-events: auto;
}

.auth .right-panel .btn.transparent{ pointer-events: none; }
.auth .left-panel  .btn.transparent{ pointer-events: auto; }
.auth.sign-up-mode .right-panel .btn.transparent{ pointer-events: auto; }
.auth.sign-up-mode .left-panel  .btn.transparent{ pointer-events: none; }

/* =========================================================
   ---------- 12) PASSWORD REVEAL ----------
   ========================================================= */
.auth .input-field.pass-field{ padding-right: 15px; }

.auth .input-field.pass-field input{ padding-right: 54px; }

.auth .reveal-btn{
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.auth .input-field.pass-field .reveal-btn{
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  cursor: pointer;
  color: rgba(232, 240, 255, .78);
  transition: 180ms ease;
  z-index: 10;
}

.auth .input-field.pass-field .reveal-btn:hover{
  color: var(--dif-accent, #77D4D4);
  border-color: rgba(119, 212, 212, .35);
  box-shadow: 0 0 0 3px rgba(119, 212, 212, .14);
}

.auth .input-field.pass-field .reveal-btn:active{
  transform: translateY(-50%) scale(.98);
}

.auth .input-field.pass-field .reveal-btn .reveal-svg{
  width: 22px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(119, 212, 212, .16));
}

/* =========================================================
   ---------- 13) TRANSPARENT BUTTON ----------
   ========================================================= */
.auth .btn.transparent{
  margin: 0;
  background: rgba(0, 0, 0, .12);
  border: 2px solid rgba(255, 255, 255, .24);
  width: 130px;
  height: 41px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--dif-text, #E8F0FF);
  box-shadow: none;
}

.auth .btn.transparent:hover{
  border-color: rgba(119, 212, 212, .28);
  box-shadow: 0 0 0 3px rgba(119, 212, 212, .18);
}

/* =========================================================
   ---------- 14) STATES ----------
   ========================================================= */
.auth.sign-up-mode:before{
  transform: translate(100%, -50%);
  right: 52%;
}

.auth.sign-up-mode .left-panel .image,
.auth.sign-up-mode .left-panel .content{
  transform: translateX(-800px);
}

.auth.sign-up-mode .signin-signup{ left: 25%; }
.auth.sign-up-mode form.sign-up-form{ opacity: 1; z-index: 2; }
.auth.sign-up-mode form.sign-in-form{ opacity: 0; z-index: 1; }

.auth .right-panel .image,
.auth .right-panel .content{
  transform: translateX(800px);
}

.auth.sign-up-mode .right-panel .image,
.auth.sign-up-mode .right-panel .content{
  transform: translateX(0%);
}

/* =========================================================
   ---------- 15) RESPONSIVE ----------
   ========================================================= */
@media (max-width: 870px){
  .auth{
    min-height: 100vh;
    height: 100vh;
  }

  .auth .signin-signup{
    width: 100%;
    top: 95%;
    transform: translate(-50%, -100%);
    transition: 1s 0.8s ease-in-out;
  }

  .auth .signin-signup,
  .auth.sign-up-mode .signin-signup{
    left: 50%;
  }

  .auth .panels-container{
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 2fr 1fr;
  }

  .auth .panel{
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 2.5rem 8%;
    grid-column: 1 / 2;
  }

  .auth .right-panel{ grid-row: 3 / 4; }
  .auth .left-panel{ grid-row: 1 / 2; }

  .auth .panel .content{
    padding-right: 15%;
    transition: transform 0.9s ease-in-out;
    transition-delay: 0.8s;
  }

  .auth .panel h3{ font-size: 1.2rem; }
  .auth .panel p{ font-size: 0.7rem; padding: 0.5rem 0; }

  .auth .btn.transparent{
    width: 110px;
    height: 35px;
    font-size: 0.7rem;
  }

  .auth:before{
    width: 1500px;
    height: 1500px;
    transform: translateX(-50%);
    left: 30%;
    bottom: 68%;
    right: initial;
    top: initial;
    transition: 2s ease-in-out;
  }

  .auth.sign-up-mode:before{
    transform: translate(-50%, 100%);
    bottom: 32%;
    right: initial;
  }

  .auth.sign-up-mode .left-panel .image,
  .auth.sign-up-mode .left-panel .content{
    transform: translateY(-300px);
  }

  .auth.sign-up-mode .right-panel .image,
  .auth.sign-up-mode .right-panel .content{
    transform: translateY(0px);
  }

  .auth .right-panel .image,
  .auth .right-panel .content{
    transform: translateY(300px);
  }

  .auth.sign-up-mode .signin-signup{
    top: 5%;
    transform: translate(-50%, 0);
  }
}
