/* ==========================================================================
   style.css
   استایل‌های مشترک صفحات ورود با شماره موبایل و تایید کد
   نکته: هرجا بوت‌استرپ کلاس آماده داشت (فرم، دکمه، فاصله‌گذاری، گرید) از آن
   استفاده شده و این فایل فقط شامل چیزهایی است که بوت‌استرپ پوشش نمی‌دهد.
   ========================================================================== */

@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

:root {
  --brand-blue: #4f6ef7;
  --brand-blue-dark: #3d5be0;
  --bg-page: #f3f4f7;
  --text-muted: #8a8f9c;
  --circle-blue-light: #7b93fb;
  --circle-blue-dark: #5b6ff0;
}

body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  background-color: var(--bg-page);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* ---------- دایره‌های تزئینی پس‌زمینه (بوت‌استرپ معادل ندارد) ---------- */
.bg-decor {
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.bg-decor.top-right {
  width: 320px;
  height: 320px;
  top: -120px;
  left: -80px; /* چون صفحه RTL است، این دایره سمت چپ بالا قرار می‌گیرد مثل نمونه */
  background: radial-gradient(circle at 30% 30%, var(--circle-blue-light), var(--circle-blue-dark));
}

.bg-decor.bottom-left {
  width: 220px;
  height: 220px;
  bottom: -100px;
  right: -60px;
  background: radial-gradient(circle at 30% 30%, var(--circle-blue-light), var(--circle-blue-dark));
  opacity: 0.9;
}

.bg-decor.dots {
  width: 140px;
  height: 140px;
  top: 40px;
  left: 60px;
  background-image: radial-gradient(circle, #c7cffb 2px, transparent 2px);
  background-size: 18px 18px;
  border-radius: 0;
  opacity: 0.7;
}

/* ---------- کارت اصلی ---------- */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(20, 30, 70, 0.08);
  padding: 2.5rem 2rem;
}

.auth-logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: #2b2f3a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 1.75rem;
}

.auth-logo .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), #f0a63d);
  display: inline-block;
}

.auth-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-align: center;
  color: #1f2330;
  margin-bottom: 1.75rem;
}

.auth-label {
  font-size: 0.85rem;
  color: #4b4f5a;
  margin-bottom: 0.4rem;
  display: block;
}

/* اینپوت‌ها بیشترشان از form-control بوت‌استرپ می‌آیند،
   اینجا فقط رنگ فوکوس سفارشی برند را ست می‌کنیم */
.form-control.brand-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.2rem rgba(79, 110, 247, 0.15);
}

/* دکمه اصلی: رنگ برند که در پالت پیش‌فرض بوت‌استرپ نیست */
.btn-brand {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 0;
  border-radius: 10px;
}

.btn-brand:hover,
.btn-brand:focus {
  background-color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #fff;
}

.btn-brand:disabled {
  background-color: #b9c3fb;
  border-color: #b9c3fb;
}

/* ---------- باکس‌های کد ۵ رقمی (کامپوننت سفارشی، بوت‌استرپ ندارد) ---------- */
.otp-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2b2f3a;
  display: block;
  margin-bottom: 0.75rem;
}

.otp-group {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  direction: ltr; /* ترتیب ورود رقم‌ها چپ‌به‌راست باشد تا منطقی‌تر باشد */
  margin-bottom: 0.6rem;
}

.otp-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 500;
  border: 1px solid #eceef3;
  border-radius: 10px;
  color: #1f2330;
  background-color: #fff;
}

.otp-box::placeholder {
  color: #d7dae2;
}

.otp-box:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 0.2rem rgba(79, 110, 247, 0.15);
}

.otp-box.is-invalid {
  border-color: #e14b4b;
}

.otp-error {
  font-size: 0.8rem;
  color: #e14b4b;
  text-align: right;
  margin-bottom: 1rem;
  display: none;
}

.otp-error.show {
  display: block;
}

/* ---------- بخش تایمر / ارسال مجدد ---------- */
.resend-row {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.resend-link {
  background: none;
  border: none;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0;
  cursor: pointer;
}

.resend-link:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.timer-count {
  font-weight: 700;
  color: #1f2330;
  direction: ltr;
  display: inline-block;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 420px) {
  .auth-card {
    max-width: 92vw;
    padding: 2rem 1.25rem;
    border-radius: 14px;
  }

  .otp-box {
    font-size: 1.2rem;
    border-radius: 10px;
  }

  .bg-decor.top-right {
    width: 220px;
    height: 220px;
  }

  .bg-decor.bottom-left {
    width: 150px;
    height: 150px;
  }

  .bg-decor.dots {
    display: none; /* روی موبایل شلوغی بصری را کم می‌کنیم */
  }
}
