/* ==========================================================================
   Progress UI مشترک (لندینگ + اپلیکیشن)
   یک کارت با: عنوان گام فعلی + درصد، نوار گرادیانی درخشان، و ۴ گام با اسپینر ← تیک سبز.
   JS فقط --p (۰..۱) روی .pg-fill و کلاس‌های is-active / is-done روی <li> را می‌نویسد.
   ========================================================================== */
.pg-card {
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}
.pg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}
.pg-pct {
  font-family: var(--font-mono);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.pg-track {
  height: 9px;
  border-radius: 9px;
  background: var(--bg-muted);
  overflow: hidden;
}
.pg-fill {
  --p: 0;
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #10b981);
  transform: scaleX(var(--p));
  transform-origin: left center;
  will-change: transform;
}
html[dir='rtl'] .pg-fill { transform-origin: right center; }
.pg-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: pgShimmer 1.1s linear infinite;
}
@keyframes pgShimmer {
  from { background-position: -60% 0; }
  to { background-position: 160% 0; }
}
.pg-steps {
  list-style: none;
  margin: 0.95rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}
.pg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-sub);
  transition: color 0.3s ease;
}
.pg-step-ico {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  color: transparent;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}
.pg-steps li.is-active { color: var(--text-main); }
.pg-steps li.is-active .pg-step-ico {
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  border-top-color: var(--accent);
  animation: pgSpin 0.7s linear infinite;
}
.pg-steps li.is-done { color: var(--text-body); }
.pg-steps li.is-done .pg-step-ico {
  color: #fff;
  background: var(--emerald);
  border-color: var(--emerald);
  animation: pgPop 0.35s cubic-bezier(0.3, 1.6, 0.4, 1);
}
@keyframes pgSpin { to { transform: rotate(360deg); } }
@keyframes pgPop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }

/* هدر چندبخشی (نسخهٔ اپلیکیشن): عنوان + چیپ‌های متا + درصد */
.pg-top { flex-wrap: wrap; }
.pg-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pg-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.pg-title { min-width: 0; }

/* نسخهٔ اپلیکیشن: کارت مستقل زیر کادر ورودی */
.pg-card--app {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
  animation: fadeUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 760px) {
  .pg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-fill::after { animation: none !important; }
}
