/* FitRonix — پکیج‌های من */
.fx-pkg-page {
  --pkg-radius: 16px;
  --pkg-gap: 16px;
}

.fx-pkg-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--pkg-radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(38, 166, 154, 0.14), rgba(0, 137, 123, 0.06));
  border: 1px solid rgba(38, 166, 154, 0.22);
}

.fx-pkg-hero-stripe {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #26a69a, #00897b);
  border-radius: 0 4px 4px 0;
}

.fx-pkg-hero-body { position: relative; }

.fx-pkg-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-secondary, #00897b);
}

.fx-pkg-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.fx-pkg-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.fx-pkg-kpi {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: var(--surface-raised, rgba(255, 255, 255, 0.03));
  text-align: center;
}

.fx-pkg-kpi-val {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.fx-pkg-kpi-lbl {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.fx-pkg-kpi--active .fx-pkg-kpi-val { color: #22c55e; }
.fx-pkg-kpi--process .fx-pkg-kpi-val { color: #3b82f6; }
.fx-pkg-kpi--archive .fx-pkg-kpi-val { color: var(--text-secondary); }

.fx-pkg-tabs .tab-bar { margin-bottom: 14px; }

.fx-pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--pkg-gap);
}

.fx-pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--pkg-radius);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  background: var(--surface-raised, rgba(255, 255, 255, 0.04));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.fx-pkg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.fx-pkg-card--active {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.08), transparent 55%);
}

.fx-pkg-card--process {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.08), transparent 55%);
}

.fx-pkg-card--archived {
  opacity: 0.82;
  border-color: rgba(148, 163, 184, 0.25);
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.06), transparent 55%);
}

.fx-pkg-card--warn {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.fx-pkg-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.fx-pkg-card-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.fx-pkg-card-name {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.fx-pkg-card-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-pkg-type-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(38, 166, 154, 0.12);
  color: var(--accent-secondary, #00897b);
}

.fx-pkg-type-chip--np {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.fx-pkg-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fx-pkg-date-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fx-pkg-date-box .k {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.fx-pkg-date-box .v {
  display: block;
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
  text-align: right;
}

.fx-pkg-progress {
  margin-top: 2px;
}

.fx-pkg-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.fx-pkg-progress .bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.fx-pkg-progress .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26a69a, #22c55e);
  transition: width 0.4s ease;
}

.fx-pkg-card--archived .fx-pkg-progress .bar i {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

.fx-pkg-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.fx-pkg-price {
  font-size: 14px;
  font-weight: 800;
}

.fx-pkg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 20px;
  border-radius: var(--pkg-radius);
  border: 1px dashed var(--border-subtle, rgba(255, 255, 255, 0.15));
}

.fx-pkg-empty p { margin: 8px 0 14px; }

@media (max-width: 640px) {
  .fx-pkg-kpis { grid-template-columns: 1fr; }
  .fx-pkg-dates { grid-template-columns: 1fr; }
}

.fx-pkg-archive-program {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(38, 166, 154, 0.08);
  border: 1px solid rgba(38, 166, 154, 0.22);
}

.fx-pkg-archive-program-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-secondary, #00897b);
}

.fx-pkg-archive-program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-pkg-program-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fx-pkg-program-modal.is-open { display: flex; }

.fx-pkg-program-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.fx-pkg-program-modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.fx-pkg-program-modal-head,
.fx-pkg-program-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.fx-pkg-program-modal-foot {
  border-bottom: none;
  border-top: 1px solid var(--border, #e2e8f0);
  justify-content: flex-end;
}

.fx-pkg-program-modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.fx-pkg-program-modal-body {
  overflow: auto;
  padding: 14px 16px 18px;
}

.fx-pkg-wp-modal-intro { margin-bottom: 14px; }
.fx-pkg-wp-modal-intro h3 { margin: 6px 0 4px; font-size: 16px; }
.fx-pkg-wp-day { margin-bottom: 14px; }
.fx-pkg-wp-day-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.fx-pkg-wp-tbl th { font-size: 11px; }
.fx-pkg-wp-tbl td { font-size: 12px; vertical-align: top; }
.fx-pkg-wp-ss td { background: rgba(79, 70, 229, 0.06); font-weight: 700; }
.fx-pkg-wp-sub td:first-child { padding-right: 22px; }

.fx-program-card--expired {
  border-color: rgba(148, 163, 184, 0.35);
  background: linear-gradient(160deg, rgba(148, 163, 184, 0.08), transparent 55%);
}
.fx-program-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.fx-pkg-archive-program--np {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.22);
}
.fx-pkg-archive-program--np .fx-pkg-archive-program-label {
  color: #a855f7;
}
.fx-pkg-np-tbl th { color: #7e22ce; }

.fx-program-card--expired-np {
  border-color: rgba(168, 85, 247, 0.28);
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.08), transparent 55%);
}
.fx-program-btn--ghost {
  background: transparent;
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-secondary, #64748b);
}
