/*
  نوکسا – UI/UX Kit برای Accounts و Subscriptions
  ==============================================

  فعال‌سازی: کافیست در صفحات مربوطه (templates) یک wrapper اضافه شود:
    <div class="nx-auth"> ... </div>           (login/register/otp/reset/verify/welcome)
    <div class="nx-billing nx-pricing"> ... </div> (pricing)
    <div class="nx-billing nx-checkout"> ... </div> (checkout)
    <div class="nx-billing nx-payment"> ... </div>  (success/failed)
    <div class="nx-profile"> ... </div>        (profile)
    <div class="nx-watchlist"> ... </div>      (watchlist)

  نکته: این فایل در base.html لود می‌شود.
*/

:root{
  /* همخوان با home.css / sidebar.css */
  --nx-primary: #2563eb;
  --nx-primary-2: #3b82f6;
  --nx-indigo: #3b4cc4;
  --nx-indigo-2: #2f56b5;

  --nx-bg: #f5f7fb;
  --nx-card: rgba(255,255,255,.88);
  --nx-card-solid: #ffffff;
  --nx-text: #0f172a;
  --nx-muted: #6b7280;

  --nx-border: rgba(203, 213, 225, .9);
  --nx-shadow: 0 18px 55px rgba(15, 23, 42, .10);
  --nx-shadow-sm: 0 10px 24px rgba(15, 23, 42, .08);
  --nx-radius-lg: 1.25rem;
  --nx-radius-md: .95rem;

  --nx-success: #16a34a;
  --nx-success-2: #22c55e;
  --nx-danger: #dc2626;

  --nx-ring: 0 0 0 .25rem rgba(37, 99, 235, .18);
}

/* کاهش Motion برای دسترس‌پذیری */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ transition: none !important; animation: none !important; }
}

/* ------------------------------
   Wrapper Backgrounds
-------------------------------- */
.nx-auth,
.nx-billing,
.nx-profile,
.nx-watchlist{
  position: relative;
  padding: 1.25rem 0;

}

.nx-auth::before,
.nx-billing::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .14) 0, transparent 55%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, .10) 0, transparent 55%),
    radial-gradient(circle at 30% 80%, rgba(34, 197, 94, .10) 0, transparent 55%),
    var(--nx-bg);
  z-index: 0;
}

.nx-auth > .container-fluid,
.nx-billing > .container-fluid,
.nx-profile > .container-fluid,
.nx-watchlist > .container-fluid{
  position: relative;
  z-index: 1;
}

/* Centered layouts for auth/checkout pages */
.nx-auth,
.nx-checkout,
.nx-payment{
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: center;
}
.nx-auth > .container-fluid,
.nx-checkout > .container-fluid,
.nx-payment > .container-fluid{
  width: 100%;
}

/* ------------------------------
   Card + Surface
-------------------------------- */
.nx-auth .card,
.nx-billing .card,
.nx-profile .card,
.nx-watchlist .card{
  border: 1px solid var(--nx-border) !important;
  border-radius: var(--nx-radius-lg) !important;
  background: var(--nx-card);
  box-shadow: var(--nx-shadow-sm) !important;
  backdrop-filter: blur(10px);
}

.nx-auth .card-body,
.nx-billing .card-body,
.nx-profile .card-body,
.nx-watchlist .card-body{
  padding: 1.25rem 1.25rem;
}

@media (min-width: 992px){
  .nx-auth .card-body,
  .nx-billing .card-body,
  .nx-profile .card-body,
  .nx-watchlist .card-body{ padding: 1.5rem 1.6rem; }
}

/* تیترها */
.nx-auth h1,
.nx-billing h1,
.nx-profile h1,
.nx-watchlist h1{
  letter-spacing: -0.2px;
  color: var(--nx-text);
}

.nx-auth .text-muted,
.nx-billing .text-muted,
.nx-profile .text-muted,
.nx-watchlist .text-muted{ color: var(--nx-muted) !important; }

/* ------------------------------
   Form controls
-------------------------------- */
.nx-auth label,
.nx-billing label{
  font-weight: 700;
  font-size: .88rem;
  color: #334155;
}

.nx-auth .form-control,
.nx-billing .form-control{
  border-radius: var(--nx-radius-md);
  border: 1px solid rgba(203, 213, 225, .95);
  padding: .65rem .85rem;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 0 rgba(15,23,42,.03);
  font-size: 12px !important;
  color: #0f172a !important; /* خاکستری */
}
.nx-auth .form-control::placeholder,
.nx-billing .form-control::placeholder{
  font-size: 12px !important;
  color: #9ca3af !important; /* خاکستری روشن‌تر برای placeholder */
  opacity: 1; /* بعضی مرورگرها placeholder رو کم‌رنگ‌تر می‌کنن */
}
.nx-auth .form-control:focus,
.nx-billing .form-control:focus{
  border-color: rgba(37, 99, 235, .65);
  box-shadow: var(--nx-ring);
}

/* فیلدهای عددی بهتر در RTL */
.nx-auth input[inputmode="numeric"],
.nx-billing input[inputmode="numeric"],
.nx-auth input[autocomplete="tel"],
.nx-billing input[autocomplete="tel"],
.nx-auth input[id*="password"],
.nx-auth input[name*="password"],
.nx-billing input[id*="password"],
.nx-billing input[name*="password"]{
  direction: ltr;
  text-align: left;
}
/* خطاهای فرم‌ها */
.nx-auth .text-danger.small,
.nx-billing .text-danger.small{
  font-size: 11px !important;
  line-height: 1.6;
}
.nx-auth .alert,
.nx-billing .alert{
  font-size: 11px;
}

/* OTP / Code */
.nx-auth .form-control.text-center{
  letter-spacing: .35rem;
  font-weight: 900;
  font-size: 1.05rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
}

/* ------------------------------
   Buttons
-------------------------------- */
.nx-auth .btn,
.nx-billing .btn,
.nx-profile .btn,
.nx-watchlist .btn{
  border-radius: .95rem;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.nx-auth .btn:hover,
.nx-billing .btn:hover,
.nx-profile .btn:hover,
.nx-watchlist .btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15,23,42,.10);
}

/* Success buttons → گرادیانت سبز */
.nx-auth .btn-success,
.nx-billing .btn-success,
.nx-profile .btn-success,
.nx-watchlist .btn-success{
  border: none !important;
  background: linear-gradient(135deg, var(--nx-success), var(--nx-success-2)) !important;
}

.nx-auth .btn-success:focus,
.nx-billing .btn-success:focus,
.nx-profile .btn-success:focus,
.nx-watchlist .btn-success:focus{
  box-shadow: 0 0 0 .25rem rgba(34,197,94,.22) !important;
}

/* Primary */
.nx-billing .btn-primary,
.nx-auth .btn-primary{
  border: none !important;
  background: linear-gradient(135deg, var(--nx-primary), var(--nx-primary-2)) !important;
}

/* Outline buttons */
.nx-auth .btn-outline-secondary,
.nx-billing .btn-outline-secondary,
.nx-profile .btn-outline-secondary,
.nx-watchlist .btn-outline-secondary{
  border-color: rgba(148,163,184,.9) !important;
  color: #334155 !important;
  background: rgba(255,255,255,.75);
}

.nx-auth .btn-outline-secondary:hover,
.nx-billing .btn-outline-secondary:hover,
.nx-profile .btn-outline-secondary:hover,
.nx-watchlist .btn-outline-secondary:hover{
  filter: brightness(0.98);
}

.nx-auth .btn-outline-danger,
.nx-watchlist .btn-outline-danger{
  border-color: rgba(220,38,38,.35) !important;
}

/* لینک‌ها */
.nx-auth a,
.nx-billing a,
.nx-profile a,
.nx-watchlist a{ color: var(--nx-primary); }

.nx-auth a:hover,
.nx-billing a:hover,
.nx-profile a:hover,
.nx-watchlist a:hover{ color: #1d4ed8; }

/* ------------------------------
   Alerts / Badges
-------------------------------- */
.nx-auth .alert,
.nx-billing .alert,
.nx-profile .alert,
.nx-watchlist .alert{
  border-radius: 1rem;
  border: 1px solid rgba(203,213,225,.7);
}

.nx-billing .badge,
.nx-profile .badge{
  border-radius: 999px;
  padding: .45rem .65rem;
  font-weight: 800;
}

/* ------------------------------
   Pricing page improvements
-------------------------------- */
.nx-pricing h1.h4{ font-weight: 900; }

.nx-pricing .card{
  position: relative;
}

/* Pro card highlight */
.nx-pricing .card.border-success{
  border: 1px solid rgba(34,197,94,.45) !important;
  box-shadow: 0 22px 60px rgba(34,197,94,.12) !important;
}

.nx-pricing .card.border-success::after{

  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.35);
  color: #166534;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
}

/* feature list */
.nx-pricing ul{
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
}

.nx-pricing li{
  position: relative;
  padding-right: 1.6rem;
  margin-bottom: .55rem;
  line-height: 1.9;
  color: #0f172a;
}

.nx-pricing li::before{
  content: "\2713";
  position: absolute;
  right: 0;
  top: .1rem;
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #166534;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.22);
  font-size: .8rem;
}

/* button groups wrap nicer */
.nx-pricing .d-flex.gap-2{ gap: .6rem !important; }

/* ------------------------------
   Checkout summary
-------------------------------- */
.nx-checkout .border.rounded,
.nx-payment .border.rounded{
  border-radius: 1rem !important;
  border: 1px solid rgba(203,213,225,.9) !important;
  background: rgba(255,255,255,.6);
}

.nx-checkout .border.rounded .d-flex,
.nx-payment .border.rounded .d-flex{ padding: .1rem 0; }

/* ------------------------------
   Profile + Watchlist
-------------------------------- */
.nx-profile .card .h6{ font-weight: 800; }

.nx-watchlist .list-group-item{
  border-radius: 1rem;
  border: 1px solid rgba(203,213,225,.85);
  margin-bottom: .6rem;
  background: rgba(255,255,255,.78);
}

.nx-watchlist .list-group{
  border: none;
}

/* ------------------------------
   Paywall
-------------------------------- */
.nx-paywall .nx-paywall-card{
  border-radius: 1.25rem;
  border: 1px solid rgba(203,213,225,.75);
  background: rgba(255,255,255,.86);
}

.nx-paywall .nx-paywall-icon{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.20);
  color: #1d4ed8;
  flex: 0 0 auto;
}

.nx-paywall .nx-paywall-icon i{
  font-size: 1.25rem;
}

.nx-paywall .nx-paywall-note{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 999px;
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.25);
  color: #7c2d12;
  font-size: .9rem;
}

.nx-paywall .nx-paywall-benefit{
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(203,213,225,.7);
  background: rgba(255,255,255,.65);
}

.nx-paywall .nx-paywall-benefit i{
  font-size: 1.1rem;
  color: #0f172a;
  margin-top: .15rem;
}

.nx-paywall-block{
  border-radius: 1rem;
  border: 1px solid rgba(203,213,225,.75);
  background: rgba(255,255,255,.82);
}

.nx-paywall-block .nx-paywall-block-icon{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(148,163,184,.15);
  border: 1px solid rgba(148,163,184,.25);
  color: #334155;
  flex: 0 0 auto;
}

/* ------------------------------
   Toast notifications
-------------------------------- */
.nx-toast-container{
  width: min(440px, calc(100vw - 24px));
}

.nx-toast{
  border-radius: 1rem;
  box-shadow: var(--nx-shadow-sm);
  backdrop-filter: blur(10px);
}

.nx-toast .toast-body{
  padding: .85rem 1rem;
}

.nx-toast i.bi{
  font-size: 1.1rem;
  margin-top: .05rem;
}



.form-control{
  direction: rtl;
  text-align: right;
}