:root {
  --bg: #0d0a15;
  --bg-soft: #120e1b;
  --surface: rgba(255,255,255,.055);
  --surface-strong: rgba(255,255,255,.09);
  --border: rgba(255,255,255,.11);
  --border-focus: rgba(255,184,107,.72);
  --text: #f5f2fb;
  --muted: #afa4c9;
  --faint: #776d91;
  --coral: #ff6b8b;
  --gold: #ffb86b;
  --violet: #8b7cff;
  --warm: linear-gradient(120deg, #ff6b8b, #ffb86b);
  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { min-height: 100vh; color: var(--text); background: radial-gradient(80% 72% at 8% 8%, #241a38 0%, transparent 58%), radial-gradient(56% 58% at 96% 96%, rgba(139,124,255,.17) 0%, transparent 64%), var(--bg); font-family: Vazirmatn, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px,.95fr) minmax(500px,1.05fr); position: relative; overflow: hidden; }
.brand-side { position: relative; padding: clamp(28px,4vw,62px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-left: 1px solid var(--border); }
.brand-side::before, .brand-side::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(12px); }
.brand-side::before { width: 390px; height: 390px; top: -130px; right: -140px; background: radial-gradient(circle, rgba(255,107,139,.30), transparent 68%); }
.brand-side::after { width: 430px; height: 430px; left: -190px; bottom: -210px; background: radial-gradient(circle, rgba(139,124,255,.34), transparent 67%); }
.logo { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.logo-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: var(--warm); color: #1a0e12; font-family: "Space Grotesk", sans-serif; font-size: 18px; box-shadow: 0 9px 20px -10px rgba(255,107,139,.85); }
.brand-story { z-index: 1; max-width: 460px; margin: auto 0; padding: 80px 0; animation: fade-up .8s var(--ease) both; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 7px 13px; color: var(--muted); font-size: 12.5px; }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.brand-story h1 { margin-top: 25px; max-width: 450px; font-size: clamp(35px,4vw,58px); line-height: 1.14; letter-spacing: -.055em; font-weight: 800; }
.brand-story h1 span { background: var(--warm); color: transparent; background-clip: text; -webkit-background-clip: text; }
.brand-story p { max-width: 390px; margin-top: 20px; color: var(--muted); font-size: 16px; line-height: 2; }
.mini-card { position: relative; z-index: 1; width: min(100%, 365px); padding: 17px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.055); backdrop-filter: blur(18px); animation: float 7s ease-in-out infinite; }
.mini-card-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.mini-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,184,107,.15); font-size: 17px; }
.mini-card p { margin-top: 13px; color: var(--text); font-size: 14px; line-height: 1.8; }

.form-side { min-height: 100%; display: grid; place-items: center; padding: 48px 28px; }
.form-wrap { width: min(100%, 408px); animation: fade-up .75s .1s var(--ease) both; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 35px; color: var(--muted); font-size: 13.5px; transition: color .25s var(--ease), transform .25s var(--ease); }
.back-link:hover { color: var(--text); transform: translateX(3px); }
.form-head { margin-bottom: 31px; }
.form-head h2 { font-size: 30px; line-height: 1.35; letter-spacing: -.035em; font-weight: 800; }
.form-head p { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.form-head p a, .inline-link { color: var(--gold); font-weight: 700; }
.fields { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--text); font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 52px; border: 1px solid var(--border); border-radius: 15px; outline: 0; background: var(--surface); color: var(--text); padding: 0 15px; font-size: 14px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
.input-wrap input::placeholder { color: var(--faint); }
.input-wrap input:focus { border-color: var(--border-focus); background: var(--surface-strong); box-shadow: 0 0 0 4px rgba(255,184,107,.09); }
.input-wrap input[type="password"] { padding-left: 50px; }
.toggle-password { position: absolute; left: 8px; top: 8px; height: 36px; width: 36px; border-radius: 10px; background: transparent; color: var(--muted); transition: background .2s var(--ease), color .2s var(--ease); }
.toggle-password:hover { background: rgba(255,255,255,.08); color: var(--text); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { appearance: none; width: 17px; height: 17px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); display: grid; place-content: center; }
.check input::after { content: "✓"; color: #1a0e12; font-size: 12px; font-weight: 900; transform: scale(0); transition: transform .18s var(--ease); }
.check input:checked { border-color: transparent; background: var(--warm); }
.check input:checked::after { transform: scale(1); }
.forgot { color: var(--gold); font-weight: 700; }
.primary-btn { width: 100%; min-height: 53px; margin-top: 24px; border-radius: 15px; background: var(--warm); color: #1a0e12; font-weight: 800; font-size: 14px; box-shadow: 0 15px 28px -14px rgba(255,107,139,.85); transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 19px 34px -13px rgba(255,107,139,.95); filter: saturate(1.08); }
.primary-btn:active { transform: translateY(0); }
.primary-btn.loading { color: transparent; pointer-events: none; position: relative; }
.primary-btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; border: 2px solid rgba(26,14,18,.32); border-top-color: #1a0e12; border-radius: 50%; animation: spin .7s linear infinite; }
.divider { display: flex; align-items: center; gap: 12px; margin: 25px 0; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.secondary-btn { width: 100%; height: 51px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700; transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.secondary-btn:hover { border-color: rgba(255,255,255,.26); background: var(--surface-strong); transform: translateY(-1px); }
.bottom-note { margin-top: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.legal { margin-top: 18px; color: var(--faint); font-size: 11.5px; line-height: 1.9; text-align: center; }

.otp-number { direction: ltr; font-family: "Space Grotesk", sans-serif; font-size: 17px; color: var(--text); }
.otp-row { direction: ltr; display: flex; justify-content: space-between; gap: 9px; }
.otp-row input { width: 100%; min-width: 0; aspect-ratio: 1; text-align: center; border: 1px solid var(--border); border-radius: 15px; outline: none; background: var(--surface); color: var(--text); font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 600; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.otp-row input:focus { border-color: var(--border-focus); background: var(--surface-strong); transform: translateY(-2px); }
.resend { margin-top: 21px; text-align: center; color: var(--muted); font-size: 12.5px; }
.resend button { margin-right: 5px; background: transparent; color: var(--gold); font-weight: 800; }
.resend button:disabled { color: var(--faint); cursor: default; }
.success-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 22px; border: 1px solid rgba(255,184,107,.34); border-radius: 20px; background: rgba(255,184,107,.10); color: var(--gold); font-size: 27px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.choice { position: relative; min-height: 93px; padding: 15px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: right; color: var(--text); transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.choice:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.24); }
.choice.active { border-color: rgba(255,184,107,.65); background: rgba(255,184,107,.09); }
.choice .emoji { display: block; margin-bottom: 8px; font-size: 19px; }
.choice span:last-child { font-size: 12.5px; font-weight: 700; }
.toast { position: fixed; left: 24px; bottom: 24px; z-index: 10; display: flex; align-items: center; gap: 9px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 13px; background: rgba(30,24,42,.84); backdrop-filter: blur(16px); color: var(--text); font-size: 12.5px; transform: translateY(85px); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.toast.show { transform: translateY(0); opacity: 1; }

@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media (max-width: 840px) { .auth-shell { grid-template-columns: 1fr; } .brand-side { min-height: 230px; padding: 27px 26px; border-left: 0; border-bottom: 1px solid var(--border); } .brand-story { margin: 34px 0 0; padding: 0; } .brand-story h1, .brand-story p, .mini-card { display: none; } .form-side { padding: 42px 24px 55px; align-items: start; } }
@media (max-width: 400px) { .form-side { padding-inline: 18px; } .otp-row { gap: 6px; } .form-head h2 { font-size: 27px; } }
