/* ورود / ثبت‌نام / فراموشی / بازیابیِ رمز — نسخه‌ی ۲.۱۳ */
:root {
  --ac: #fb8f11; --ac-2: color-mix(in srgb, var(--ac) 78%, #fff); --on-ac: #1a1000;
  --bg: #141414; --side: #101010; --s1: #1d2022; --s2: #262a2d; --card: #1a1c1e;
  --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .16);
  --tx: #dedede; --hi: #fff; --mut: #9a9a9a; --ph: #6d6d6d;
  --err: #fb6161; --ok: #3cc97a; --warn: #ffb020;
  --fill: #262a2d; --shadow: 0 30px 70px -28px rgba(0, 0, 0, .9);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ac: #f08300; --ac-2: color-mix(in srgb, var(--ac) 82%, #fff);
  --bg: #f4f5f7; --side: #1a1a1c; --s1: #f3f4f7; --s2: #eceef2; --card: #ffffff;
  --line: rgba(15, 23, 42, .1); --line-2: rgba(15, 23, 42, .18);
  --tx: #2a2f37; --hi: #0e1116; --mut: #5f6670; --ph: #9aa0a8;
  --err: #e03131; --ok: #16a34a;
  --fill: #ffffff; --shadow: 0 24px 60px -30px rgba(15, 23, 42, .35);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.au { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--tx); font-family: 'YekanX', Tahoma, sans-serif; font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
.au a { color: inherit; text-decoration: none; }
.au .nx-i { display: block; flex: none; }

/* ───── چیدمانِ پایه ───── */
.au__wrap { min-height: 100vh; min-height: 100dvh; }
.au__panel { display: grid; align-content: center; justify-items: center; gap: 16px; padding: 28px 20px; }
.au__side { position: relative; overflow: hidden; }
.au__top { width: min(420px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.au .au__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.08rem; color: var(--hi); }
.au__mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; }
.au__mark img { width: 100%; height: 100%; object-fit: contain; }
.au__mark b { display: grid; place-items: center; width: 100%; height: 100%; background: var(--ac); color: var(--on-ac); font-size: 19px; }
.au__theme { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--mut); display: grid; place-items: center; cursor: pointer; }
.au__theme:hover { color: var(--hi); }
.au__sun { display: none !important; }
:root[data-theme="light"] .au__sun { display: block !important; }
:root[data-theme="light"] .au__moon { display: none !important; }
.au__card { width: min(420px, 100%); display: grid; gap: 14px; padding: 24px 22px 26px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.au__card h1 { margin: 2px 0 0; font-size: 1.4rem; font-weight: 900; color: var(--hi); line-height: 1.4; }
.au__sub { margin: -8px 0 2px; color: var(--mut); font-size: .88rem; }
.au__foot { margin: 0; }
.au__foot a { display: inline-flex; align-items: center; gap: 4px; color: var(--mut); font-size: .84rem; }
.au__foot a:hover { color: var(--hi); }
.au__char { display: block; object-fit: contain; pointer-events: none; }
.au__posters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.au__posters img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; display: block; }

/* ═══ طرحِ ۱ · مینیمال (یک کارت وسط) ═══ */
.au--v1 .au__wrap { display: grid; align-content: center; justify-items: center; padding: 76px 16px 28px; }
.au--v1 .au__side { display: grid; justify-items: center; margin-bottom: -22px; z-index: 0; overflow: visible; }
.au--v1 .au__char { height: 132px; width: auto; max-width: 70vw; }
.au--v1 .au__panel { position: relative; z-index: 1; padding: 0; width: 100%; }
.au--v1 .au__top { position: absolute; top: -76px; inset-inline: 0; margin: 0 auto; height: 56px; width: min(420px, 100%); }
.au--v1.has-char .au__top { top: -186px; }
.au--v1:not(.has-char) .au__side { display: none; }

/* ═══ طرحِ ۲ · پوستری (دو ستون) ═══ */
.au--v2 .au__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.au--v2 .au__panel { order: 1; }
.au--v2 .au__side { order: 2; display: grid; place-items: center; margin: 12px; border-radius: 26px; background: #0e0e0f; padding: 20px; }
.au--v2 .au__posters { width: min(520px, 100%); transform: rotate(-6deg) scale(1.12); opacity: .9; }
.au--v2 .au__side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14, 14, 15, .92), rgba(14, 14, 15, .2) 55%, rgba(14, 14, 15, .5)); }

/* ═══ طرحِ ۳ · کاراکتر (دو ستون) ═══ */
.au--v3 .au__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
.au--v3 .au__panel { order: 1; }
.au--v3 .au__side { order: 2; margin: 12px; border-radius: 26px; background: var(--s1); border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center; }
.au--v3 .au__char { height: min(78%, 600px); width: auto; max-width: 90%; }

/* ───── تب ورود / ثبت‌نام ───── */
.au__seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.au__seg a { height: 40px; display: grid; place-items: center; border-radius: 11px; font-weight: 800; font-size: .92rem; color: var(--mut); transition: background .18s, color .18s; }
.au__seg a.is-on { background: var(--card); color: var(--hi); box-shadow: inset 0 0 0 1px var(--line-2); }
.au__seg a:not(.is-on):hover { color: var(--hi); }

/* ───── فرم ───── */
.au__form { display: grid; gap: 14px; }
.au__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.au__row > * { min-width: 0; }
.au__f { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.au__lrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.au__lrow label { font-size: .84rem; font-weight: 700; color: var(--tx); }
.au__lrow a { font-size: .8rem; color: var(--ac); font-weight: 700; }
.au__in { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; border-radius: 14px; background: var(--fill); border: 1.5px solid var(--line-2); transition: border-color .15s, box-shadow .15s; }
.au__in:focus-within { border-color: var(--ac); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 16%, transparent); }
.au__in > svg, .au__in > .nx-i { flex: none; margin-inline-start: 14px; color: var(--mut); width: 18px; height: 18px; }
.au__in:focus-within > svg { color: var(--ac); }
.au__in input { flex: 1 1 0; width: 100%; min-width: 0; height: 50px; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--hi); font: inherit; font-size: 1rem; }
.au__in input::placeholder { color: var(--ph); }
.au__in input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--fill) inset; -webkit-text-fill-color: var(--hi); }
.au__eye { flex: none; width: 44px; height: 44px; margin-inline-end: 3px; border: 0; background: transparent; color: var(--mut); cursor: pointer; display: grid; place-items: center; border-radius: 12px; }
.au__eye:hover, .au__eye.is-on { color: var(--ac); }
.au__btn { position: relative; height: 52px; border: 0; border-radius: 14px; background: var(--ac); color: var(--on-ac); font: inherit; font-weight: 900; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .1s; }
.au__btn:hover { background: var(--ac-2); }
.au__btn:active { transform: scale(.985); }
.au__btn:disabled { cursor: wait; opacity: .85; }
.au__btn.is-busy { color: transparent; }
.au__btn.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(26, 16, 0, .25); border-top-color: var(--on-ac); animation: au-spin .7s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
.au__alt { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--fill); color: var(--hi); font-weight: 800; }
.au__alt:hover { border-color: var(--ac); }
.au__or { display: flex; align-items: center; gap: 12px; color: var(--mut); font-size: .8rem; }
.au__or::before, .au__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au__swap { margin: 2px 0 0; text-align: center; color: var(--mut); font-size: .9rem; }
.au__swap a { color: var(--ac); font-weight: 800; margin-inline-start: 6px; }
.au__alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 13px; background: color-mix(in srgb, var(--err) 12%, transparent); border: 1px solid color-mix(in srgb, var(--err) 32%, transparent); color: var(--err); font-size: .88rem; }
.au__ok { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 32%, transparent); color: var(--ok); }
.au__hint { font-size: .78rem; color: var(--mut); }
.au__meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.au__meter i { height: 4px; border-radius: 4px; background: var(--s2); transition: background .2s; }
.au__meter[data-s="1"] i:nth-child(-n+1) { background: var(--err); }
.au__meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.au__meter[data-s="3"] i:nth-child(-n+3) { background: #b8c93a; }
.au__meter[data-s="4"] i { background: var(--ok); }
.au__code input { letter-spacing: 8px; text-align: center; font-size: 1.3rem; font-weight: 800; }

/* ───── پنجره‌ی نتیجه ───── */
.au__pop { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.au__pop.is-on { display: grid; }
.au__popbox { width: min(360px, 100%); padding: 28px 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); text-align: center; display: grid; gap: 10px; justify-items: center; animation: au-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.au__popbox h3 { margin: 0; color: var(--hi); font-size: 1.15rem; }
.au__popbox p { margin: 0; color: var(--mut); }
.au__popbox button, .au__popbox .au__btn { min-width: 140px; }
.au__popic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #052b14; }
.au__popic.is-err { background: var(--err); color: #2b0505; }
@keyframes au-pop { from { transform: scale(.75); opacity: 0; } }

/* ───── موبایل ───── */
@media (max-width: 760px) {
  .au__in input { height: 48px; font-size: 16px; }
  .au__btn { height: 50px; }
  .au__card { padding: 22px 16px; border-radius: 20px; }
  .au--v1 .au__wrap { padding: 70px 14px 24px; align-content: start; }
  .au--v1 .au__char { height: 116px; }
  .au--v1.has-char .au__top { top: -164px; }
  .au--v2 .au__wrap, .au--v3 .au__wrap { display: block; }
  .au--v2 .au__side { margin: 0; border-radius: 0 0 24px 24px; height: 150px; padding: 0; place-items: start center; }
  .au--v2 .au__posters { grid-template-columns: repeat(5, 92px); width: auto; transform: rotate(-6deg) translateY(-24px); }
  .au--v2 .au__posters img:nth-child(n+6) { display: none; }
  .au--v2 .au__panel, .au--v3 .au__panel { position: relative; z-index: 2; margin-top: -112px; align-content: start; padding: 0 14px 24px; }
  .au--v2 .au .au__brand, .au--v2 .au__brand { color: #fff; }
  .au--v2 .au__card { margin-top: 30px; }
  .au--v2 .au__side::after { background: linear-gradient(to bottom, rgba(14, 14, 15, .55), rgba(14, 14, 15, .8)); }
  .au--v2 .au__theme { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
  .au--v3 .au__side { margin: 0; border-radius: 0; border: 0; height: 150px; background: transparent; justify-content: flex-end; padding-inline-end: 10%; }
  .au--v3 .au__char { height: 140px; max-width: 40%; }
  .au--v3 .au__panel { margin-top: -40px; }
  .au--v3 .au__top { position: absolute; top: -110px; inset-inline: 14px; width: auto; }
}
@media (max-width: 420px) { .au__row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .au__btn.is-busy::after { animation-duration: 1.8s; } .au__popbox { animation: none; } }
