/* ---------- صفحه ورود (حالت تیره) ---------- */

.login-body {
  --navy: #1a2a54;
  --navy-deep: #0d1730;
  --navy-soft: #22376b;
  --accent: #4f8cff;
  --accent-2: #7aa8ff;
  --ink: #e8edf7;
  --ink-dim: #9aa8c4;

  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(1200px 700px at 50% -10%, #1e3160 0%, var(--navy-deep) 55%, #070d1c 100%);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

/* پس‌زمینه تزئینی */
.login-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.orb-1 { width: 420px; height: 420px; background: #2d55b8; top: -140px; inset-inline-end: -100px; }
.orb-2 { width: 360px; height: 360px; background: #17407a; bottom: -130px; inset-inline-start: -90px; }
.orb-3 { width: 280px; height: 280px; background: #3b6fd4; top: 45%; inset-inline-start: 55%; opacity: .28; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 72%);
}

/* کارت ورود */
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; }

.login-card {
  background: rgba(19, 30, 60, .72);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px;
  padding: 34px 28px 26px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  animation: rise .5s cubic-bezier(.2,.7,.3,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card { animation: none; }
}

.login-logo { text-align: center; margin-bottom: 22px; }
.login-logo img { width: 210px; max-width: 78%; height: auto; }

.login-title {
  font-size: 19px; font-weight: 700; text-align: center;
  margin: 0 0 6px; color: #fff; letter-spacing: -.2px;
}

.login-sub {
  font-size: 13px; text-align: center; color: var(--ink-dim);
  margin: 0 0 22px; line-height: 1.7;
}

/* فیلدها */
.login-form { display: flex; flex-direction: column; gap: 15px; }

.login-field { display: flex; flex-direction: column; gap: 7px; }
.login-field > span { font-size: 12.5px; color: var(--ink-dim); font-weight: 500; }

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

.input-wrap .ico {
  position: absolute; inset-inline-start: 13px;
  width: 17px; height: 17px; color: var(--ink-dim);
  pointer-events: none; transition: color .18s;
}

.login-body .input-wrap input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  padding: 13px 42px 13px 42px;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  min-height: 48px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.login-body .input-wrap input::placeholder { color: rgba(255,255,255,.3); }

.login-body .input-wrap input:focus {
  outline: none;
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,140,255,.16);
}

.input-wrap input:focus ~ .ico,
.input-wrap:focus-within .ico { color: var(--accent-2); }

.toggle-pw {
  position: absolute; inset-inline-end: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); padding: 8px; border-radius: 8px;
  display: flex; align-items: center; transition: color .18s;
}
.toggle-pw svg { width: 17px; height: 17px; }
.toggle-pw:hover { color: var(--ink); }
.toggle-pw.on { color: var(--accent-2); }

/* دکمه ورود */
.login-btn {
  margin-top: 6px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #2f6fe0 100%);
  color: #fff; border: none; border-radius: 11px;
  padding: 14px 18px; min-height: 50px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(47,111,224,.32);
  transition: transform .15s, box-shadow .18s, filter .18s;
}
.login-btn svg { width: 18px; height: 18px; transition: transform .18s; }
.login-btn:hover { filter: brightness(1.07); box-shadow: 0 10px 28px rgba(47,111,224,.42); }
.login-btn:hover svg { transform: translateX(-3px); }
.login-btn:active { transform: translateY(1px); }

/* پیام خطا */
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: rgba(220,38,38,.13);
  border: 1px solid rgba(248,113,113,.35);
  color: #fca5a5;
  border-radius: 10px; padding: 11px 13px;
  font-size: 13px; margin-bottom: 16px;
  animation: shake .35s;
}
.login-error svg { flex-shrink: 0; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.login-foot {
  text-align: center; font-size: 11.5px; color: rgba(154,168,196,.65);
  margin: 22px 0 0; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}

@media (max-width: 420px) {
  .login-card { padding: 28px 20px 22px; border-radius: 16px; }
  .login-logo img { width: 175px; }
  .login-title { font-size: 17px; }
}
