/* login.html — ورود */

.page-login {
  --login-blue: #006aa7;
  --login-blue-bright: #1d8fd4;
  --login-yellow: #fecc00;
  --login-surface: rgba(6, 12, 26, 0.94);
  --login-border: rgba(255, 255, 255, 0.08);
}

.page-login .main-app--auth {
  min-height: 100vh;
  justify-content: center;
}

.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px var(--main-gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 106, 167, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(254, 204, 0, 0.08) 0%, transparent 50%),
    var(--main-bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-page {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Brand ── */
.login-brand {
  text-align: center;
}

.login-brand__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: login-float 4s ease-in-out infinite;
}

.login-brand__logo {
  width: 148px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 106, 167, 0.35));
}

.login-brand__tag {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--login-yellow);
}

@keyframes login-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .login-brand__logo-wrap {
    animation: none;
  }
}

/* ── Card ── */
.login-card {
  padding: 20px 16px 18px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 60% at 90% 0%, rgba(0, 106, 167, 0.2) 0%, transparent 55%),
    var(--login-surface);
  border: 1px solid rgba(29, 143, 212, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 36px rgba(0, 0, 0, 0.28);
}

.login-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.login-card__welcome {
  margin: 6px 0 0;
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--main-text-muted);
  text-align: center;
}

/* ── Notice ── */
.login-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(254, 204, 0, 0.08);
  border: 1px solid rgba(254, 204, 0, 0.28);
}

.login-notice[hidden] {
  display: none !important;
}

.login-notice__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fde68a;
  background: rgba(254, 204, 0, 0.12);
}

.login-notice__body {
  min-width: 0;
}

.login-notice__body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fde68a;
}

.login-notice__body p {
  margin: 0;
  font-size: 0.64rem;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.82);
}

.login-notice__body a {
  color: #7dd3fc;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ── Login error alert ── */
.login-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-alert[hidden] {
  display: none !important;
}

.login-alert--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.login-alert__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
}

.login-alert__body {
  min-width: 0;
  flex: 1;
}

.login-alert__message {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.75;
  color: #fca5a5;
}

.login-alert__list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-alert__list[hidden] {
  display: none !important;
}

.login-alert__list li {
  position: relative;
  padding-inline-start: 12px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.65;
  color: rgba(252, 165, 165, 0.92);
}

.login-alert__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.85);
}

/* ── Form ── */
.login-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field__label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(226, 232, 240, 0.88);
}

.login-field__box {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 0 6px;
  border-radius: 14px;
  border: 1px solid var(--login-border);
  background: #0b1222;
  overflow: hidden;
  direction: ltr;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.login-field__box:focus-within {
  border-color: rgba(29, 143, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 106, 167, 0.18);
}

.login-field__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  pointer-events: none;
}

.login-field__box input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  padding: 14px 6px;
  direction: ltr;
  text-align: left;
}

.login-field__box input::placeholder {
  color: #6b7280;
  font-size: 0.78rem;
}

.login-field__toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b95a8;
}

.login-field__toggle:active {
  background: rgba(255, 255, 255, 0.06);
}

.login-field__eye--hide {
  display: none;
}

.login-field__toggle.is-on .login-field__eye--show {
  display: none;
}

.login-field__toggle.is-on .login-field__eye--hide {
  display: block;
}

.login-form__hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.6;
  color: #4ade80;
  text-align: center;
}

.login-form__hint[hidden] {
  display: none !important;
}

.login-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--main-text-muted);
  cursor: pointer;
}

.login-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--login-blue-bright);
}

.login-link {
  font-size: 0.68rem;
  font-weight: 700;
  color: #7dd3fc;
}

.login-submit {
  margin-top: 6px;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1d8fd4 0%, #006aa7 100%);
  box-shadow: 0 12px 24px rgba(0, 106, 167, 0.32);
  transition: transform 0.18s;
}

.login-submit:active {
  transform: scale(0.98);
}

.login-submit svg {
  flex-shrink: 0;
  transform: scaleX(-1);
}

.login-footer-note {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  color: var(--main-text-muted);
}

.login-footer-note a {
  color: var(--login-yellow);
  font-weight: 800;
}

/* Reveal on login (no footer partials event dependency alone) */
.page-login .main-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
