/* assets/css/auth.css */
/* NOTE: بدون :root — از متغیرهای theme.css شما استفاده می‌کنه. */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 14px;
  font-family: "Vazir", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* بک‌گراند نئونی */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 10%, rgba(59,130,246,.18), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(139,92,246,.18), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(34,197,94,.10), transparent 40%);
  filter: saturate(1.1);
}

.auth-shell {
  width: min(980px, 100%);
}

/* کانتینر دوپنله (مثل نمونه شما) */
.auth-container {
  position: relative;
  width: 100%;
  min-height: 520px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

/* حاشیه نئونی ملایم */
.auth-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, rgba(34,211,238,.0), rgba(34,211,238,.25), rgba(59,130,246,.25), rgba(168,85,247,.25), rgba(34,211,238,.0));
  filter: blur(18px);
  opacity: .7;
  pointer-events: none;
}

/* دو ستون */
.auth-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

/* سمت فرم‌ها */
.auth-form-box {
  position: relative;
  padding: 34px 34px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.auth-form-box h2 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text, #e2e8f0);
}

.auth-form-box .auth-subtitle {
  margin: 0 0 12px;
  color: var(--subtext, #94a3b8);
  font-size: 13.5px;
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-row {
  display: grid;
  gap: 8px;
}

.auth-label {
  font-size: 12.5px;
  color: var(--subtext, #94a3b8);
}

.auth-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.55);
  color: var(--text, #e2e8f0);
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  transition: .25s;
}

.auth-input:focus {
  border-color: rgba(34,211,238,.55);
  box-shadow: 0 0 0 3px rgba(34,211,238,.12);
}

.auth-input[readonly] {
  opacity: .9;
  cursor: not-allowed;
}

/* آیکون چشم/پسورد */
.auth-input-wrap {
  position: relative;
}

.auth-eye {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(226,232,240,.75);
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: .2s;
}

.auth-eye:hover {
  background: rgba(255,255,255,.06);
}

/* دکمه اصلی */
.auth-btn {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #071019;
  background: linear-gradient(90deg, rgba(34,211,238,1), rgba(59,130,246,1));
  box-shadow: 0 18px 40px rgba(59,130,246,.18);
  transition: .22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.auth-btn:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.auth-btn .spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(2,6,23,.25);
  border-top-color: rgba(2,6,23,.8);
  animation: authSpin .8s linear infinite;
  display: none;
}

.auth-btn.is-loading .spinner { display: inline-block; }
.auth-btn.is-loading .btn-text { opacity: .85; }

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* لینک‌های پایین */
.auth-links {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--subtext, #94a3b8);
}

.auth-links a {
  color: rgba(34,211,238,.95);
  text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

/* Password strength meter */
.pw-meter {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.pw-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.pw-bars span {
  height: 6px;
  border-radius: 999px;
  background: rgba(148,163,184,.20);
  overflow: hidden;
}

.pw-bars span i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(34,211,238,.75);
  transition: .25s;
}

.pw-hint {
  font-size: 12px;
  color: var(--subtext, #94a3b8);
}

/* Toast */
.auth-toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 99999;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(148,163,184,.25);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  color: var(--text, #e2e8f0);
  display: none;
  animation: toastIn .25s ease;
}

.auth-toast.show { display: flex; gap: 10px; align-items: flex-start; }
.auth-toast.success { border-color: rgba(34,197,94,.45); }
.auth-toast.error { border-color: rgba(239,68,68,.45); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.auth-toast i { margin-top: 2px; opacity: .95; }

/* پنل اطلاعات/مارکتینگ */
.auth-info-box {
  position: relative;
  padding: 34px 34px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
}

.auth-info-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34,211,238,.22), transparent 45%),
    radial-gradient(circle at 90% 30%, rgba(168,85,247,.20), transparent 45%),
    linear-gradient(135deg, rgba(15,23,42,.25), rgba(2,6,23,.55));
  z-index: 0;
}

.auth-info-inner {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(148,163,184,.22);
}

.auth-brand .name {
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 20px;
  color: var(--text, #e2e8f0);
}

.auth-info-title {
  margin: 0;
  font-size: 26px;
  color: var(--text, #e2e8f0);
  line-height: 1.3;
}

.auth-info-desc {
  margin: 0;
  color: var(--subtext, #94a3b8);
  font-size: 13.5px;
  line-height: 1.8;
}

.auth-features {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.auth-feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(2,6,23,.25);
}

.auth-feature i {
  color: rgba(34,211,238,.95);
  margin-top: 2px;
}

.auth-feature b {
  display: block;
  font-size: 13.5px;
  color: var(--text, #e2e8f0);
  margin-bottom: 2px;
}

.auth-feature span {
  font-size: 12.5px;
  color: var(--subtext, #94a3b8);
  line-height: 1.6;
}

/* سوئیچ Login/Signup مثل نمونه شما */
.auth-anim {
  transition: .7s ease;
}

.auth-container[data-mode="login"] .signup-pane,
.auth-container[data-mode="login"] .signup-form {
  opacity: 0;
  transform: translateX(18%);
  pointer-events: none;
  filter: blur(10px);
}

.auth-container[data-mode="signup"] .login-pane,
.auth-container[data-mode="signup"] .login-form {
  opacity: 0;
  transform: translateX(-18%);
  pointer-events: none;
  filter: blur(10px);
}

/* فرم‌ها روی هم، با fade */
.login-form,
.signup-form {
  position: absolute;
  inset: 0;
  padding: 34px 34px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.auth-left {
  position: relative;
  min-height: 700px;
}

/* انیمیشن ورود */
.auth-fade-up {
  animation: authFadeUp .55s ease both;
}
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 920px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-info-box { display: none; }
  .auth-container { min-height: 700px; }
  .auth-left { min-height: 700px; }
}

@media (max-width: 480px) {
  .auth-container { border-radius: 22px; }
  .login-form, .signup-form { padding: 26px 18px 18px; }
}
