/* =========================================================
   PARSYU — AUTH PAGES
   Login, register, forgot password, etc.
========================================================= */

/* ═══════════════════════════════════════════════════════════
   AUTH HEADER (simplified top bar)
═══════════════════════════════════════════════════════════ */
.auth-header .main-nav{ display:none }

.auth-header-right{
  margin-inline-start:auto;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:13px;
  color:var(--text-2);
}

.auth-header-hint{
  color:var(--text-3);
  font-size:12.5px;
}

.auth-header-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border:1px solid rgba(99,102,241,.32);
  border-radius:11px;
  background:rgba(99,102,241,.06);
  color:#B9C9FF;
  font-size:12.5px;
  font-weight:600;
  transition:all .25s var(--ease);
}
.auth-header-link:hover{
  border-color:rgba(99,102,241,.55);
  background:rgba(99,102,241,.13);
  color:#DCE4FF;
  transform:translateY(-1px);
  box-shadow:0 12px 30px -16px rgba(99,102,241,.9);
}

/* ═══════════════════════════════════════════════════════════
   PAGE LAYOUT
═══════════════════════════════════════════════════════════ */
.auth-page{
  padding:70px 0 90px;
  position:relative;
  z-index:1;
}

.auth-shell{
  display:grid;
  grid-template-columns:minmax(0,460px) minmax(0,1fr);
  gap:80px;
  align-items:center;
  max-width:1080px;
  margin-inline:auto;
}

/* ═══════════════════════════════════════════════════════════
   AUTH CARD
═══════════════════════════════════════════════════════════ */
.auth-card{
  position:relative;
  padding:38px 34px 32px;
  border:1px solid var(--line-2);
  border-radius:26px;
  background:
    radial-gradient(600px circle at 100% 0%, rgba(99,102,241,.13), transparent 55%),
    linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow:
    0 40px 100px -40px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.03);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  overflow:hidden;
  isolation:isolate;
}

.auth-card::before{
  content:"";
  position:absolute;
  top:-1px;
  left:10%;
  right:10%;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(129,140,248,.7), transparent);
  pointer-events:none;
}

.auth-card::after{
  content:"";
  position:absolute;
  top:-80px;
  left:-80px;
  width:240px;
  height:240px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(99,102,241,.22), transparent 65%);
  filter:blur(30px);
  pointer-events:none;
  z-index:-1;
}

/* Card head */
.auth-card-head{ margin-bottom:26px }

.auth-card-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:5px 11px;
  border:1px solid rgba(99,102,241,.28);
  border-radius:999px;
  background:rgba(99,102,241,.07);
  color:#A5B4FC;
  font:600 10px var(--mono);
  letter-spacing:.12em;
  text-transform:uppercase;
}
.auth-card-kicker::before{
  content:"";
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--indigo-2);
  box-shadow:0 0 10px var(--indigo-2);
}

.auth-card-title{
  margin-top:12px;
  font-size:clamp(26px,3.4vw,34px);
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.03em;
}

.auth-card-sub{
  margin-top:8px;
  color:var(--text-2);
  font-size:13.5px;
}

/* ═══════════════════════════════════════════════════════════
   FORM
═══════════════════════════════════════════════════════════ */
.auth-form{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.field-label{
  font-size:12.5px;
  font-weight:600;
  color:var(--text-2);
  padding-inline-start:3px;
}

.field-input-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.field-icon{
  position:absolute;
  right:16px;
  display:grid;
  place-items:center;
  color:var(--text-3);
  font-size:15px;
  pointer-events:none;
  transition:color .25s ease;
  z-index:1;
  line-height:1;
}
.field-icon svg{ width:17px; height:17px }

.field-input{
  width:100%;
  height:52px;
  padding:0 46px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.028);
  color:var(--text);
  font-size:14px;
  font-family:inherit;
  outline:0;
  transition:all .3s var(--ease);
}

.field-input::placeholder{ color:#4F5A6E }

.field-input:hover{
  border-color:var(--line-2);
  background:rgba(255,255,255,.04);
}

.field-input:focus{
  border-color:rgba(99,102,241,.6);
  background:rgba(99,102,241,.05);
  box-shadow:0 0 0 4px rgba(99,102,241,.09);
}

.field-input-wrap:focus-within .field-icon{ color:#A5B4FC }

/* Field error state */
.field.has-error .field-input{
  border-color:rgba(251,113,133,.5);
  background:rgba(251,113,133,.05);
}
.field.has-error .field-icon{ color:#FDA4AF }

/* Password toggle */
.field-toggle{
  position:absolute;
  left:10px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--text-3);
  cursor:none;
  transition:all .22s ease;
}
body.is-touch .field-toggle{ cursor:pointer }
.field-toggle:hover{
  color:var(--text-2);
  background:rgba(255,255,255,.05);
}
.field-toggle svg{ width:17px; height:17px }

/* Remember + Forgot */
.auth-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:2px;
  flex-wrap:wrap;
}

.auth-check{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:9px;
  font-size:12.5px;
  color:var(--text-2);
  cursor:none;
  user-select:none;
}
body.is-touch .auth-check{ cursor:pointer }

.auth-check input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.auth-check-box{
  position:relative;
  width:18px;
  height:18px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  border:1px solid var(--line-2);
  border-radius:6px;
  background:rgba(255,255,255,.03);
  transition:all .22s ease;
}

.auth-check-box::after{
  content:"";
  width:9px;
  height:5px;
  margin-top:-2px;
  border-left:2px solid #05060B;
  border-bottom:2px solid #05060B;
  transform:rotate(-45deg) scale(0);
  transition:transform .28s var(--ease-spring);
}

.auth-check input:checked + .auth-check-box{
  background:var(--grad-brand);
  border-color:transparent;
  box-shadow:0 8px 18px -6px rgba(99,102,241,.9);
}
.auth-check input:checked + .auth-check-box::after{
  transform:rotate(-45deg) scale(1);
}
.auth-check:hover .auth-check-box{ border-color:rgba(99,102,241,.5) }

.auth-forgot{
  color:#A5B4FC;
  font-size:12.5px;
  font-weight:500;
  transition:color .22s ease;
}
.auth-forgot:hover{
  color:#DCE4FF;
  text-decoration:underline;
  text-underline-offset:4px;
}

/* Error banner */
.auth-error{
  display:none;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border:1px solid rgba(251,113,133,.3);
  border-radius:11px;
  background:rgba(251,113,133,.08);
  color:#FDA4AF;
  font-size:12.5px;
  line-height:1.6;
}
.auth-error.show{
  display:flex;
  animation:authErrIn .35s var(--ease-out) both;
}
@keyframes authErrIn{
  from{ opacity:0; transform:translateY(-4px) }
  to{ opacity:1; transform:translateY(0) }
}

.auth-error-icon{
  width:18px;
  height:18px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(251,113,133,.22);
  color:#FFC7D2;
  font:800 11px var(--mono);
}

/* Submit */
.auth-submit{
  position:relative;
  width:100%;
  height:54px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:4px;
  padding:0 24px;
  border:0;
  border-radius:14px;
  background:var(--grad-brand);
  color:#05060B;
  font-size:14.5px;
  font-weight:800;
  font-family:inherit;
  cursor:none;
  overflow:hidden;
  box-shadow:0 20px 50px -20px rgba(99,102,241,.95);
  transition:transform .3s var(--ease), box-shadow .3s ease;
}
body.is-touch .auth-submit{ cursor:pointer }

.auth-submit:hover{
  transform:translateY(-2px);
  box-shadow:0 30px 70px -22px rgba(99,102,241,1);
}
.auth-submit:active{ transform:translateY(0) }

.auth-submit::before{
  content:"";
  position:absolute;
  top:0;
  left:-100%;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transition:left .7s var(--ease);
}
.auth-submit:hover::before{ left:120% }

.auth-submit-arrow{ transition:transform .3s var(--ease) }
.auth-submit:hover .auth-submit-arrow{ transform:translateX(-4px) }

.auth-submit-spinner{
  display:none;
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid rgba(5,6,11,.25);
  border-top-color:#05060B;
  animation:authSpin .7s linear infinite;
}
@keyframes authSpin{ to{ transform:rotate(360deg) } }

.auth-submit.loading{ pointer-events:none }
.auth-submit.loading .auth-submit-label,
.auth-submit.loading .auth-submit-arrow{ display:none }
.auth-submit.loading .auth-submit-spinner{ display:block }

/* Divider */
.auth-divider{
  display:flex;
  align-items:center;
  gap:14px;
  margin:24px 0 20px;
  color:var(--text-3);
  font:600 10px var(--mono);
  letter-spacing:.12em;
  text-transform:uppercase;
}
.auth-divider::before,
.auth-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:var(--line);
}

/* Socials */
.auth-socials{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.auth-social{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  height:48px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(255,255,255,.025);
  color:var(--text-2);
  font-size:13px;
  font-weight:600;
  font-family:inherit;
  cursor:none;
  transition:all .25s var(--ease);
}
body.is-touch .auth-social{ cursor:pointer }

.auth-social:hover{
  color:var(--text);
  border-color:rgba(99,102,241,.4);
  background:rgba(99,102,241,.08);
  transform:translateY(-1px);
}
.auth-social svg{ width:16px; height:16px; flex-shrink:0 }

/* Card footer */
.auth-foot{
  margin-top:24px;
  padding-top:20px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:13px;
  color:var(--text-3);
}
.auth-foot a{
  color:#A5B4FC;
  font-weight:600;
  transition:color .22s ease;
}
.auth-foot a:hover{ color:#DCE4FF }

/* ═══════════════════════════════════════════════════════════
   ASIDE (visual column)
═══════════════════════════════════════════════════════════ */
.auth-aside{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:26px;
  padding:20px 0;
  isolation:isolate;
}

.auth-aside::before{
  content:"";
  position:absolute;
  top:-10%;
  right:-20%;
  width:440px;
  height:440px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(99,102,241,.14), transparent 65%);
  filter:blur(40px);
  z-index:-1;
  pointer-events:none;
}

.auth-aside-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  align-self:flex-start;
  padding:7px 14px 7px 12px;
  border:1px solid rgba(99,102,241,.28);
  border-radius:999px;
  background:rgba(99,102,241,.07);
  color:#B7C4FF;
  font-size:11.5px;
  backdrop-filter:blur(12px);
}

.auth-aside-title{
  font-size:clamp(34px,4.4vw,56px);
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.045em;
  max-width:520px;
}

.auth-aside-title .gradient{
  background:var(--grad-text);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.auth-aside-desc{
  max-width:480px;
  color:var(--text-2);
  font-size:14.5px;
  line-height:1.9;
}

.auth-features{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:6px;
  max-width:520px;
}

.auth-features li{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.02);
  transition:all .3s var(--ease);
}

.auth-features li:hover{
  border-color:rgba(99,102,241,.32);
  background:rgba(99,102,241,.05);
  transform:translateX(-4px);
}

.auth-feature-icon{
  width:38px;
  height:38px;
  flex-shrink:0;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:rgba(99,102,241,.12);
  border:1px solid rgba(99,102,241,.22);
  color:#A5B4FC;
  font:800 14px var(--mono);
}
.auth-features li:nth-child(2) .auth-feature-icon{
  background:rgba(252,211,77,.11);
  border-color:rgba(252,211,77,.22);
  color:#FDE68A;
}
.auth-features li:nth-child(3) .auth-feature-icon{
  background:rgba(52,211,153,.11);
  border-color:rgba(52,211,153,.22);
  color:#6EE7B7;
}

.auth-features li > div{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.auth-features b{
  font-size:13px;
  font-weight:700;
}
.auth-features span{
  color:var(--text-3);
  font-size:11.5px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width:1080px){
  .auth-shell{
    grid-template-columns:minmax(0,440px) minmax(0,1fr);
    gap:50px;
  }
}

@media (max-width:900px){
  .auth-page{ padding:44px 0 70px }

  .auth-shell{
    grid-template-columns:1fr;
    gap:40px;
    max-width:540px;
  }

  .auth-aside{
    text-align:center;
    align-items:center;
    padding:0;
    gap:20px;
    order:1;
  }

  .auth-aside-badge{ align-self:center }

  .auth-aside-title{
    font-size:clamp(30px,7vw,42px);
    max-width:none;
  }

  .auth-aside-desc{
    margin-inline:auto;
    font-size:13.5px;
  }

  .auth-features{
    width:100%;
    max-width:520px;
    text-align:start;
  }

  .auth-features li:hover{ transform:none }

  .auth-header-hint{ display:none }
}

@media (max-width:720px){
  .auth-page{ padding:34px 0 60px }

  .auth-card{
    padding:30px 22px 26px;
    border-radius:22px;
  }

  .auth-card-title{ font-size:25px }

  .field-input{ height:50px }

  .auth-submit{ height:50px; font-size:14px }

  .auth-socials{ grid-template-columns:1fr }

  .auth-features li{
    padding:12px 14px;
  }
}

@media (max-width:470px){
  .auth-page{ padding:26px 0 50px }

  .auth-card{
    padding:24px 18px 20px;
    border-radius:20px;
  }

  .auth-features{ display:none }

  .auth-aside{ gap:16px }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .auth-submit::before{ display:none }
  .auth-error{ animation:none }
}




/* ═══════════════════════════════════════════════════════════
   PASSWORD STRENGTH METER
═══════════════════════════════════════════════════════════ */
.password-strength{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:2px;
  opacity:0;
  max-height:0;
  overflow:hidden;
  transition:opacity .3s ease, max-height .3s ease, margin-top .3s ease;
}
.password-strength.show{
  opacity:1;
  max-height:24px;
}

.password-strength-bars{
  display:flex;
  gap:4px;
  flex:1;
}

.password-strength-bar{
  flex:1;
  height:4px;
  border-radius:99px;
  background:rgba(255,255,255,.07);
  transition:background .35s ease, box-shadow .35s ease;
}

.password-strength[data-level="1"] .password-strength-bar:nth-child(1){
  background:#FB7185;
  box-shadow:0 0 8px rgba(251,113,133,.6);
}
.password-strength[data-level="2"] .password-strength-bar:nth-child(-n+2){
  background:#FCD34D;
  box-shadow:0 0 8px rgba(252,211,77,.55);
}
.password-strength[data-level="3"] .password-strength-bar:nth-child(-n+3){
  background:#67E8F9;
  box-shadow:0 0 8px rgba(103,232,249,.5);
}
.password-strength[data-level="4"] .password-strength-bar{
  background:#34D399;
  box-shadow:0 0 8px rgba(52,211,153,.5);
}

.password-strength-label{
  min-width:58px;
  text-align:left;
  font-size:10.5px;
  font-weight:600;
  color:var(--text-3);
  transition:color .3s ease;
}
.password-strength[data-level="1"] .password-strength-label{ color:#FB7185 }
.password-strength[data-level="2"] .password-strength-label{ color:#FCD34D }
.password-strength[data-level="3"] .password-strength-label{ color:#67E8F9 }
.password-strength[data-level="4"] .password-strength-label{ color:#34D399 }

/* Terms checkbox alignment when text wraps */
.auth-check.align-top{ align-items:flex-start }
.auth-check.align-top .auth-check-box{ margin-top:2px }
.auth-check a{
  color:#A5B4FC;
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-color:rgba(165,180,252,.4);
  transition:color .2s ease, text-decoration-color .2s ease;
}
.auth-check a:hover{
  color:#DCE4FF;
  text-decoration-color:rgba(220,228,255,.8);
}
.auth-check.has-error .auth-check-box{
  border-color:rgba(251,113,133,.65);
  box-shadow:0 0 0 3px rgba(251,113,133,.13);
}


/* ═══════════════════════════════════════════════════════════
   IDENTITY INPUT — unified email/phone field
   The icon swaps live as the user types.

   Markup:
     <div class="field-input-wrap identity-wrap" data-identity-type="empty">
       <span class="field-icon">
         <svg class="id-icon id-icon-email">…</svg>
         <svg class="id-icon id-icon-phone">…</svg>
         <svg class="id-icon id-icon-warn">…</svg>
       </span>
       <input class="field-input identity-input" …>
     </div>
═══════════════════════════════════════════════════════════ */
.identity-wrap .field-icon{
  display:grid;
  place-items:center;
}

.identity-wrap .id-icon{
  grid-area:1 / 1;
  display:none;
  transition:color .28s ease, transform .3s var(--ease);
}

/* States — one icon is visible per state */
.identity-wrap[data-identity-type="empty"]   .id-icon-email{ display:block; color:#6E7A92 }
.identity-wrap[data-identity-type="email"]   .id-icon-email{ display:block; color:#A5B4FC; transform:scale(1.05) }
.identity-wrap[data-identity-type="phone"]   .id-icon-phone{ display:block; color:#67E8F9; transform:scale(1.05) }
.identity-wrap[data-identity-type="invalid"] .id-icon-warn { display:block; color:#FDA4AF; transform:scale(1.05) }

/* Invalid state tints the border */
.field.has-error .identity-wrap .field-icon,
.identity-wrap[data-identity-type="invalid"] + *{ /* no-op, kept for clarity */ }

.identity-wrap:has(.field-input:focus)[data-identity-type="invalid"] .field-icon{
  animation:identityShake .35s var(--ease);
}
@keyframes identityShake{
  0%,100%{ transform:translateX(0) }
  25%{ transform:translateX(-3px) }
  75%{ transform:translateX(3px) }
}

/* ═══════════════════════════════════════════════════════════
   AUTH SUCCESS — replaces the form after a successful action
═══════════════════════════════════════════════════════════ */
.auth-success{
  text-align:center;
  padding:6px 4px 8px;
  animation:authSuccessIn .55s var(--ease-out) both;
}
@keyframes authSuccessIn{
  from{ opacity:0; transform:translateY(14px) }
  to  { opacity:1; transform:translateY(0) }
}

.auth-success-icon{
  width:64px;
  height:64px;
  margin:0 auto 20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:radial-gradient(circle, rgba(52,211,153,.24), rgba(52,211,153,.08) 70%);
  border:1px solid rgba(52,211,153,.4);
  color:#6EE7B7;
  font-size:28px;
  box-shadow:0 20px 50px -20px rgba(52,211,153,.75);
  position:relative;
}
.auth-success-icon::after{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:50%;
  border:1px solid rgba(52,211,153,.28);
  animation:authSuccessPulse 2.4s ease-out infinite;
}
@keyframes authSuccessPulse{
  0%{ transform:scale(.85); opacity:1 }
  100%{ transform:scale(1.4); opacity:0 }
}

.auth-success h2{
  font-size:clamp(20px,2.6vw,24px);
  font-weight:850;
  letter-spacing:-.02em;
  line-height:1.3;
}

.auth-success p{
  margin-top:12px;
  color:var(--text-2);
  font-size:13.5px;
  line-height:1.9;
}
.auth-success p b{
  color:var(--text);
  font-weight:700;
}

.auth-success-hint{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:20px;
  padding:10px 16px;
  border:1px solid rgba(99,102,241,.26);
  border-radius:12px;
  background:rgba(99,102,241,.06);
  color:var(--text-2);
  font-size:12px;
  line-height:1.7;
  text-align:right;
}
.auth-success-hint svg{
  width:15px;
  height:15px;
  flex-shrink:0;
  color:#A5B4FC;
}

.auth-success-actions{
  display:flex;
  gap:10px;
  margin-top:24px;
  justify-content:center;
  flex-wrap:wrap;
}

.auth-success-btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:12px 20px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
  cursor:none;
  transition:all .3s var(--ease);
  text-decoration:none;
}
body.is-touch .auth-success-btn{ cursor:pointer }

.auth-success-btn.primary{
  background:var(--grad-brand);
  color:#05060B;
  box-shadow:0 16px 40px -18px rgba(99,102,241,.9);
}
.auth-success-btn.primary:hover{
  transform:translateY(-2px);
  box-shadow:0 24px 55px -20px rgba(99,102,241,1);
}

.auth-success-btn.secondary{
  border:1px solid var(--line-2);
  background:rgba(255,255,255,.025);
  color:var(--text-2);
}
.auth-success-btn.secondary:hover{
  color:var(--text);
  border-color:rgba(99,102,241,.45);
  background:rgba(99,102,241,.1);
}

.auth-success-btn svg{ width:14px; height:14px }