@font-face {
  font-family: "Vazirmatn";
  src: url("/login-assets/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #06060b;
  --text: #f4f4fb;
  --muted: #a3a4ba;
  --faint: #71728b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --cyan: #22d3ee;
  --danger: #fb7185;
  --radius: 28px;
  --shadow: 0 44px 90px -34px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
}

/* ---------------------------------------------------------------- */
/* Background                                                       */
/* ---------------------------------------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 68% 58% at 50% 42%, #000 10%, transparent 74%);
  mask-image: radial-gradient(ellipse 68% 58% at 50% 42%, #000 10%, transparent 74%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(96px);
  opacity: 0.6;
  will-change: transform;
}

.orb-1 {
  width: 620px;
  height: 620px;
  top: -22%;
  left: -14%;
  background: radial-gradient(circle at 35% 35%, rgba(124, 58, 237, 0.9), transparent 66%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.orb-2 {
  width: 560px;
  height: 560px;
  right: -16%;
  bottom: -26%;
  background: radial-gradient(circle at 62% 40%, rgba(8, 145, 178, 0.85), transparent 66%);
  animation: drift-b 32s ease-in-out infinite alternate;
}

.orb-3 {
  width: 380px;
  height: 380px;
  top: 12%;
  right: 16%;
  opacity: 0.32;
  background: radial-gradient(circle, rgba(219, 39, 119, 0.85), transparent 68%);
  animation: drift-c 22s ease-in-out infinite alternate;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 50% 38%, transparent 30%, rgba(4, 4, 9, 0.55) 78%, rgba(4, 4, 9, 0.9) 100%),
    linear-gradient(180deg, rgba(4, 4, 9, 0.35), transparent 22%, transparent 74%, rgba(4, 4, 9, 0.6));
}

@keyframes drift-a {
  to { transform: translate(7%, 9%) scale(1.1); }
}

@keyframes drift-b {
  to { transform: translate(-6%, -8%) scale(1.06); }
}

@keyframes drift-c {
  to { transform: translate(-8%, 12%) scale(1.14); }
}

/* ---------------------------------------------------------------- */
/* Layout                                                           */
/* ---------------------------------------------------------------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  min-height: 100svh;
  padding: 32px 20px;
}

/* ---------------------------------------------------------------- */
/* Card                                                             */
/* ---------------------------------------------------------------- */

.card {
  position: relative;
  width: min(428px, 100%);
  padding: 36px 34px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    rgba(17, 17, 27, 0.62);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
  overflow: hidden;
  animation: rise 0.7s var(--ease) both;
}

.card.is-shaking {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.75), rgba(34, 211, 238, 0.65), transparent);
  pointer-events: none;
}

.card-sheen {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(520px 200px at 76% -8%, rgba(139, 92, 246, 0.3), transparent 62%),
    radial-gradient(320px 180px at 4% 108%, rgba(34, 211, 238, 0.16), transparent 64%);
  opacity: 0.9;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
}

@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ---------------------------------------------------------------- */
/* Brand                                                            */
/* ---------------------------------------------------------------- */

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.mark {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 22px rgba(124, 58, 237, 0.35));
}

.mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-name {
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: 0.1px;
}

.brand-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
}

/* ---------------------------------------------------------------- */
/* Intro                                                            */
/* ---------------------------------------------------------------- */

.intro h1 {
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.intro p {
  margin: 9px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------------------------------------------------------------- */
/* Alert                                                            */
/* ---------------------------------------------------------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 13px;
  border: 1px solid rgba(251, 113, 133, 0.32);
  border-radius: 14px;
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
  font-size: 12.5px;
  line-height: 1.7;
  animation: alert-in 0.3s var(--ease) both;
}

.alert[hidden] {
  display: none;
}

.alert-icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--danger);
}

@keyframes alert-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------------------------------------------------------------- */
/* Form                                                             */
/* ---------------------------------------------------------------- */

.form {
  margin-top: 22px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: #cfd0e2;
  letter-spacing: 0.1px;
}

.control {
  position: relative;
}

.control input {
  width: 100%;
  height: 54px;
  padding-block: 0;
  padding-inline: 46px 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 8, 14, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.control input::placeholder {
  color: var(--faint);
  letter-spacing: 0.4px;
}

.control input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.control input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(10, 10, 18, 0.78);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.16),
    0 0 26px -6px rgba(139, 92, 246, 0.45);
}

.control-icon {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
  transition: color 0.18s ease;
}

.control:focus-within .control-icon {
  color: #c4b5fd;
}

.reveal {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.reveal:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.reveal:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 1px;
}

.reveal .eye {
  width: 19px;
  height: 19px;
}

.reveal .eye-off {
  display: none;
}

.reveal[aria-pressed="true"] .eye-open {
  display: none;
}

.reveal[aria-pressed="true"] .eye-off {
  display: block;
}

.caps {
  margin: 7px 2px 0;
  font-size: 11.5px;
  color: #fcd34d;
}

.caps[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- */
/* Submit                                                           */
/* ---------------------------------------------------------------- */

.submit {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 54px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 750;
  letter-spacing: 0.2px;
  cursor: pointer;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d5cf6 46%, #22b8d9 118%);
  box-shadow:
    0 16px 34px -12px rgba(109, 92, 246, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.34) 48%, transparent 66%);
  transform: translateX(-130%);
  transition: transform 0.75s var(--ease);
  pointer-events: none;
}

.submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 20px 40px -12px rgba(124, 92, 246, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.submit:hover::after {
  transform: translateX(130%);
}

.submit:active {
  transform: translateY(0) scale(0.996);
}

.submit:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 3px;
}

.submit.is-loading {
  pointer-events: none;
  filter: saturate(0.75) brightness(0.92);
}

.submit-text {
  transition: opacity 0.18s ease;
}

.submit.is-loading .submit-text {
  opacity: 0.3;
}

.spinner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.submit.is-loading .spinner {
  opacity: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------- */
/* Footer                                                           */
/* ---------------------------------------------------------------- */

.foot-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 22px 0 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
}

.foot-note svg {
  width: 15px;
  height: 15px;
}

.page-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #565770;
  font-size: 11.5px;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

@media (max-width: 480px) {
  .stage {
    padding: 22px 16px;
  }

  .card {
    padding: 28px 22px 20px;
    border-radius: 24px;
  }

  .intro h1 {
    font-size: 25px;
  }

  .brand {
    margin-bottom: 22px;
  }

  .orb {
    filter: blur(80px);
    opacity: 0.42;
  }
}

@media (max-height: 620px) {
  body {
    overflow: auto;
  }

  .stage {
    align-content: start;
    padding-block: 28px;
  }

  .aurora {
    position: absolute;
  }
}

/* ---------------------------------------------------------------- */
/* Accessibility                                                    */
/* ---------------------------------------------------------------- */

::selection {
  background: rgba(139, 92, 246, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
