@font-face {
  font-family: YekanLocal;
  src: url('/assets/fonts/YekanBakh-Regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: YekanLocal;
  src: url('/assets/fonts/YekanBakh-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #1c3031;
  --muted: #788686;
  --line: #dbe4e1;
  --teal: #169c91;
  --deep-teal: #096c69;
  --coral: #ee735b;
  --gold: #f5bd47;
  --mint: #c6eee0;
}

* { box-sizing: border-box; }

body.login-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #eef4f0;
  color: var(--ink);
  font-family: YekanLocal, YekanBakh, Tahoma, sans-serif !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
  direction: ltr;
}

.login-art {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #143f42;
  direction: rtl;
}

.login-art::before,
.login-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .9;
  z-index: -1;
  will-change: transform;
}

.login-art::before {
  width: 58vw;
  height: 58vw;
  top: -22vw;
  left: -12vw;
  background: var(--teal);
  box-shadow: 16vw 48vh 0 5vw var(--coral);
  animation: color-drift 24s ease-in-out infinite alternate;
}

.login-art::after {
  width: 34vw;
  height: 34vw;
  right: -9vw;
  bottom: -8vw;
  background: var(--gold);
  box-shadow: -30vw -8vh 0 2vw var(--mint);
  animation: color-drift-reverse 28s ease-in-out infinite alternate;
}

.art-grid {
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(135deg, black, transparent 75%);
  animation: grid-drift 30s linear infinite alternate;
}

.art-copy {
  position: absolute;
  right: clamp(32px, 8vw, 120px);
  bottom: clamp(45px, 10vh, 110px);
  max-width: 430px;
  color: white;
}

.art-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.art-copy p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 1.06rem;
}

.art-logo {
  position: absolute;
  top: clamp(32px, 7vh, 70px);
  right: clamp(32px, 8vw, 120px);
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
}

.art-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 5px;
}

.shape {
  position: absolute;
  border-radius: 999px;
  transform: rotate(-28deg);
  opacity: .9;
  will-change: transform;
}

.shape.one { width: 260px; height: 72px; top: 25%; left: 8%; background: #f48b68; animation: shape-one 21s ease-in-out infinite alternate; }
.shape.two { width: 190px; height: 190px; top: 38%; left: 25%; background: #75d1bd; border-radius: 42% 58% 55% 45%; animation: shape-two 26s ease-in-out infinite alternate; }
.shape.three { width: 300px; height: 88px; top: 58%; left: 8%; background: #e85d66; animation: shape-three 24s ease-in-out infinite alternate; }
.shape.four { width: 175px; height: 175px; top: 18%; right: 16%; background: #f4c24c; border-radius: 56% 44% 60% 40%; animation: shape-four 19s ease-in-out infinite alternate; }

@keyframes color-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(7%, 5%, 0) scale(1.08); }
}

@keyframes color-drift-reverse {
  from { transform: translate3d(2%, 1%, 0) scale(1); }
  to { transform: translate3d(-8%, -5%, 0) scale(1.12); }
}

@keyframes grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(24px, 16px, 0); }
}

@keyframes shape-one {
  from { transform: translate3d(0, 0, 0) rotate(-28deg) scale(1); }
  to { transform: translate3d(54px, 24px, 0) rotate(-12deg) scale(1.08); }
}

@keyframes shape-two {
  from { transform: translate3d(0, 0, 0) rotate(-28deg) scale(1); }
  to { transform: translate3d(-42px, 34px, 0) rotate(16deg) scale(.9); }
}

@keyframes shape-three {
  from { transform: translate3d(0, 0, 0) rotate(-28deg) scale(1); }
  to { transform: translate3d(68px, -30px, 0) rotate(-40deg) scale(1.1); }
}

@keyframes shape-four {
  from { transform: translate3d(0, 0, 0) rotate(-28deg) scale(1); }
  to { transform: translate3d(-38px, 42px, 0) rotate(8deg) scale(.88); }
}

@media (prefers-reduced-motion: reduce) {
  .login-art::before,
  .login-art::after,
  .art-grid,
  .shape { animation: none; }
}

.login-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px clamp(28px, 7vw, 112px);
  background: #fbfcfb;
  direction: rtl;
}

.login-card {
  width: min(100%, 440px);
}

.panel-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 24px;
  display: block;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
}

.panel-intro {
  margin: 9px 0 34px;
  color: var(--muted);
  text-align: center;
  font-size: .98rem;
}

.login-form,
.reset-form {
  padding: 0;
}

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .9rem; }
.input-wrap { position: relative; }
.input-wrap input { height: 54px; padding: 0 17px 0 48px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); box-shadow: none; }
.input-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,156,145,.13); }
.input-icon { position: absolute; left: 17px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); border: 2px solid #97a6a4; border-radius: 50%; pointer-events: none; }
.input-icon.lock { border-radius: 3px; }
.input-icon.lock::before { content: ""; position: absolute; width: 8px; height: 8px; left: 2px; top: -9px; border: 2px solid #97a6a4; border-bottom: 0; border-radius: 8px 8px 0 0; }
.form-text { margin-top: 7px; color: var(--muted); font-size: .82rem; }

.primary-action { width: 100%; height: 54px; margin-top: 8px; border: 0; border-radius: 10px; background: var(--deep-teal); color: white; font-weight: 700; font-size: 1rem; transition: transform .2s, background .2s; }
.primary-action:hover { background: #075653; transform: translateY(-2px); }
.panel-link { display: block; margin-top: 20px; color: var(--deep-teal); text-align: center; text-decoration: none; font-size: .9rem; }
.panel-link:hover { color: var(--coral); }
.alert { border-radius: 10px; font-size: .9rem; }
.panel-alerts { margin-bottom: 22px; }
.panel-alerts ul { padding-right: 18px; }
.otp-timer { font-weight: 700; color: var(--deep-teal); }
.otp-expired { margin-top: 7px; color: var(--coral); font-size: .82rem; font-weight: 700; }
.primary-action:disabled { opacity: .5; transform: none; cursor: not-allowed; }
.arcaptcha { margin: 4px 0 10px; }
.secondary-action { margin-top: 18px; display: block; color: var(--muted); text-align: center; text-decoration: none; font-size: .9rem; }

@media (max-width: 850px) {
  .login-shell { display: block; }
  .login-art { min-height: 250px; }
  .art-copy { right: 28px; bottom: 28px; }
  .art-copy h2 { font-size: 2rem; }
  .art-copy p { font-size: .9rem; }
  .art-logo { top: 25px; right: 28px; }
  .shape.one { top: 8%; left: 45%; }
  .shape.two { top: 35%; left: 8%; width: 120px; height: 120px; }
  .shape.three { top: 70%; left: 43%; width: 180px; }
  .shape.four { top: 12%; right: 6%; width: 100px; height: 100px; }
  .login-panel { min-height: auto; padding: 44px 24px 52px; }
}

@media (max-width: 430px) {
  .login-art { min-height: 220px; }
  .art-logo { font-size: .9rem; }
  .art-logo img { width: 38px; height: 38px; }
  .art-copy { right: 24px; bottom: 22px; }
  .art-copy h2 { font-size: 1.7rem; }
  .art-copy p { max-width: 235px; }
}

/* ثبت‌نام */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.input-icon.user::before { content: ""; position: absolute; width: 18px; height: 9px; left: -4px; top: 11px; border: 2px solid #97a6a4; border-bottom: 0; border-radius: 10px 10px 0 0; }
.input-icon.user { width: 10px; height: 10px; left: 20px; top: 38%; }
.input-icon.mail { width: 18px; height: 13px; border-radius: 3px; }
.input-icon.mail::before { content: ""; position: absolute; width: 8px; height: 8px; left: 3px; top: -3px; border: 2px solid #97a6a4; border-top: 0; border-left: 0; transform: rotate(45deg); }
.input-wrap input.otp-input { padding: 0 17px; text-align: center; letter-spacing: .6em; font-size: 1.3rem; font-weight: 700; }
.verify-note { margin-bottom: 22px; padding: 14px 16px; border-radius: 10px; background: #eef7f4; color: var(--ink); font-size: .92rem; text-align: center; }
.verify-note strong { color: var(--deep-teal); }
.steps { display: flex; justify-content: center; gap: 8px; margin: -18px 0 28px; }
.steps span { width: 34px; height: 5px; border-radius: 5px; background: var(--line); }
.steps span.on { background: var(--teal); }
.form-control.otp-input::placeholder { letter-spacing: .3em; }

@media (max-width: 430px) {
  .field-row { grid-template-columns: 1fr; }
}
