/* ============================================================
   ServerNet Login — centered animated aurora glass (سرورنت فرایند)
   Professional single-card, fully RTL, IRANSans everywhere.
   ============================================================ */

/* ---------- fonts: kill Open Sans remnants on auth pages ---------- */
.login-layout, .login-layout *,
.login-container, .login-container *,
.slogan, .slogan * {
  font-family: 'IRANSans', system-ui, 'Segoe UI', Tahoma, sans-serif !important;
}

/* ---------- animated aurora background ---------- */
.background-cover {
  position: fixed;
  inset: 0;
  background: #05070F !important;
  overflow: hidden;
  z-index: 0;
}
.background-cover::before,
.background-cover::after {
  content: "";
  position: absolute;
  width: 58vw;
  height: 58vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
}
.background-cover::before {
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.55), rgba(34,211,238,.25) 55%, transparent 70%);
  top: -20vw;
  inset-inline-end: -14vw;
  animation: snFloatA 16s ease-in-out infinite alternate;
}
.background-cover::after {
  background: radial-gradient(circle at 60% 60%, rgba(139,92,246,.5), rgba(59,130,246,.2) 55%, transparent 72%);
  bottom: -24vw;
  inset-inline-start: -12vw;
  animation: snFloatB 20s ease-in-out infinite alternate;
}
@keyframes snFloatA { from { transform: translate(0,0) scale(1);} to { transform: translate(-6vw,5vh) scale(1.15);} }
@keyframes snFloatB { from { transform: translate(0,0) scale(1.05);} to { transform: translate(5vw,-5vh) scale(.95);} }

/* dot grid overlay */
.background-cover .sn-grid,
.login-layout::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.4px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* ---------- CENTER everything ---------- */
.content { position: relative; z-index: 1; }
.login-layout {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;
  padding: 24px;
}
/* hide the two-column hero slogan; go clean & centered */
.slogan-panel { display: none !important; }
.login-panel {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 440px;
  padding: 0 !important;
  display: flex;
  justify-content: center;
}

/* ---------- glass card ---------- */
.login-panel .login-container,
.card.login-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto !important;
  background: linear-gradient(170deg, rgba(255,255,255,.10), rgba(255,255,255,.045)) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 24px !important;
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
  box-shadow: 0 34px 80px -34px rgba(0,0,0,.85);
  padding: 2.6rem 2.6rem 2.2rem !important;
  position: relative;
  animation: snCardIn .6s cubic-bezier(.22,1,.36,1) both;
}
@keyframes snCardIn { from { opacity:0; transform: translateY(22px) scale(.98);} to { opacity:1; transform:none;} }

/* animated gradient hairline */
.card.login-container::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: linear-gradient(120deg, rgba(96,165,250,.6), rgba(34,211,238,.15), rgba(167,139,250,.5), rgba(34,211,238,.5));
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: snBorderFlow 9s linear infinite;
  pointer-events: none;
}
@keyframes snBorderFlow { 0%{background-position:0% 50%;} 50%{background-position:100% 50%;} 100%{background-position:0% 50%;} }

/* ---------- logo + subtitle ---------- */
.login-container .login-logo {
  text-align: center;
  margin-bottom: .5rem;
  animation: snRise .55s .05s cubic-bezier(.22,1,.36,1) both;
}
.login-container .login-logo .sn-logo { justify-content: center; }
.sn-login-subtitle {
  text-align: center;
  color: #8A94AC;
  font-size: 13px;
  margin: 0 0 1.6rem;
  animation: snRise .55s .1s cubic-bezier(.22,1,.36,1) both;
}

/* ---------- form ---------- */
.login-container .form-group { margin-bottom: 1rem; }
.login-container .form-group:nth-of-type(1){ animation: snRise .55s .14s cubic-bezier(.22,1,.36,1) both;}
.login-container .form-group:nth-of-type(2){ animation: snRise .55s .2s cubic-bezier(.22,1,.36,1) both;}
.login-container .login-options { animation: snRise .55s .26s cubic-bezier(.22,1,.36,1) both;}
.login-container .form-group:last-of-type{ animation: snRise .55s .32s cubic-bezier(.22,1,.36,1) both;}
@keyframes snRise { from{opacity:0;transform:translateY(12px);} to{opacity:1;transform:none;} }

.login-container label {
  display: block; text-align: start;
  color: #9AA4BC !important; font-weight: 500; font-size: 13px; margin-bottom: .45rem;
}
.password-field-header { display: flex; align-items: center; justify-content: space-between; }

.login-container .form-control-login {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 13px !important;
  color: #fff !important;
  padding: .82rem 1rem !important;
  height: auto !important;
  font-size: 15px;
  transition: all .22s cubic-bezier(.22,1,.36,1);
}
.login-container .form-control-login:focus {
  background: rgba(255,255,255,.09) !important;
  border-color: rgba(96,165,250,.7) !important;
  box-shadow: 0 0 0 4px rgba(59,130,246,.18) !important;
}
.login-container .form-control-login::placeholder { color: #5B6478 !important; }

/* ---------- password eye toggle (RTL-correct, fixed size) ---------- */
.password-container { position: relative; }
/* reserve space on the LEFT (RTL end) so the eye never covers the text */
.password-container input.form-control-login { padding-inline-start: 2.6rem !important; }
#togglePassword, .toggle-password {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  inset-inline-start: 14px !important;   /* RTL → left side */
  inset-inline-end: auto !important;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #8A94AC !important;
  cursor: pointer; z-index: 3;
  font-size: 15px;
}
/* explicit LTR/RTL fallbacks in case a UA ignores logical inset on abs-pos */
html[dir="rtl"] #togglePassword, html[dir="rtl"] .toggle-password { left: 14px !important; right: auto !important; }
html[dir="ltr"] #togglePassword, html[dir="ltr"] .toggle-password { right: 14px !important; left: auto !important; }
#togglePassword:hover { color: #22D3EE !important; }
/* caps-lock warning inline */
.caps-lock-warning { color: #FBBF24; font-size: 11px; }

/* ---------- button with shimmer ---------- */
.login-container .button-login {
  position: relative; overflow: hidden; width: 100%;
  background: linear-gradient(100deg, #3B82F6, #22D3EE) !important;
  border: none !important; border-radius: 13px !important;
  padding: .9rem 1rem !important; margin-top: .4rem;
  font-weight: 700 !important; font-size: 15px; letter-spacing: 0;
  text-transform: none !important;
  transition: all .25s cubic-bezier(.22,1,.36,1);
}
.login-container .button-login::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%;
  inset-inline-start: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: inset-inline-start .55s ease;
}
.login-container .button-login:hover { filter: brightness(1.08); box-shadow: 0 14px 30px -12px rgba(34,211,238,.65); transform: translateY(-1px); }
.login-container .button-login:hover::after { inset-inline-start: 120%; }

/* ---------- remember + forgot row ---------- */
.login-options { display: flex; align-items: center; justify-content: space-between; margin: .3rem 0 1rem; }
.login-remember { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.login-remember-text, .forgot-password-link { color: #8A94AC !important; font-size: 13px; }
.forgot-password-link:hover { color: #22D3EE !important; text-decoration: none; }
/* toggle switch coloring */
.login-toggle-track { background: rgba(255,255,255,.15) !important; }
.login-remember-input:checked + .login-toggle-track { background: linear-gradient(100deg,#3B82F6,#22D3EE) !important; }

/* ---------- errors ---------- */
.login-container .alert-danger {
  background: rgba(248,113,113,.12) !important;
  color: #FCA5A5 !important;
  border: 1px solid rgba(248,113,113,.35) !important;
  border-radius: 12px !important;
  font-size: 13px; padding: .7rem 1rem;
}

/* ---------- OTP entry link ---------- */
.sn-otp-entry {
  display: block; text-align: center; margin-top: 1.2rem;
  color: #8A94AC; font-size: 13px; text-decoration: none;
  animation: snRise .55s .4s cubic-bezier(.22,1,.36,1) both;
}
.sn-otp-entry:hover { color: #22D3EE; text-decoration: none; }
.sn-otp-entry i { margin-inline-start: 6px; }

/* ---------- language selector pill ---------- */
.language-button-container { z-index: 1041; }

/* ---------- addons (SSO buttons) spacing ---------- */
.login-addons { margin-top: 1rem; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .background-cover::before, .background-cover::after,
  .card.login-container::before { animation: none !important; }
  .login-container, .login-container * { animation-duration: .01s !important; }
}

/* mobile */
@media (max-width: 480px) {
  .card.login-container { padding: 1.9rem 1.5rem !important; }
}
