/* ─────────────────────────────────────────────────────────────────────────
   Pro My Account – Luxury Minimal Dashboard
   Brand: #7C1695  |  Font: IranYekanX  |  Style: LV-inspired minimal
   ───────────────────────────────────────────────────────────────────────── */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --pma-brand:        #7C1695;
  --pma-brand-dark:   #5e1070;
  --pma-brand-light:  #f3e8f8;
  --pma-brand-dim:    rgba(124,22,149,0.08);

  --pma-bg:           #f8f8f8;
  --pma-surface:      #ffffff;
  --pma-border:       #e8e8e8;
  --pma-border-soft:  #f0f0f0;

  --pma-text:         #1a1a1a;
  --pma-text-2:       #555555;
  --pma-text-3:       #999999;

  --pma-shadow-xs:    0 1px 4px rgba(0,0,0,0.06);
  --pma-shadow-sm:    0 2px 12px rgba(0,0,0,0.07);
  --pma-shadow-md:    0 4px 24px rgba(0,0,0,0.09);
  --pma-shadow-lg:    0 8px 40px rgba(0,0,0,0.12);

  --pma-radius:       0px;   /* Sharp corners – LV style */
  --pma-radius-sm:    2px;

  --pma-sidebar-w:    260px;
  --pma-transition:   0.3s cubic-bezier(0.4,0,0.2,1);

  /* Status colors */
  --c-open:      #2563eb;
  --c-pending:   #d97706;
  --c-answered:  #7C1695;
  --c-completed: #16a34a;
  --c-closed:    #6b7280;
  --c-failed:    #dc2626;
  --c-processing:#0891b2;
}

/* ── Reset + Font ─────────────────────────────────────────────────────────── */
.pma-dashboard * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.pma-dashboard,
.pma-dashboard * {
  font-family: 'IranYekanX', 'Tahoma', sans-serif !important;
  direction: rtl;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.pma-dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--pma-bg);
  position: relative;
}

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.pma-sidebar {
  width: var(--pma-sidebar-w);
  background: var(--pma-surface);
  border-left: 1px solid var(--pma-border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform var(--pma-transition);
  z-index: 100;
  box-shadow: var(--pma-shadow-sm);
}
.pma-sidebar::-webkit-scrollbar { width: 4px; }
.pma-sidebar::-webkit-scrollbar-thumb { background: var(--pma-border); }

/* Profile card */
.pma-profile-card {
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--pma-border);
  text-align: center;
  background: linear-gradient(135deg, var(--pma-brand) 0%, var(--pma-brand-dark) 100%);
  color: #fff;
}
.pma-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}
.pma-avatar {
  width: 72px;
  height: 72px;
  border-radius: 0;
  border: 2px solid rgba(255,255,255,0.4);
  object-fit: cover;
  display: block;
  transition: transform var(--pma-transition), box-shadow var(--pma-transition);
}
.pma-avatar:hover { transform: scale(1.04); }
.pma-avatar-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid var(--pma-brand);
}
.pma-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.pma-profile-email {
  font-size: 11.5px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
  word-break: break-all;
}
.pma-profile-meta {
  display: flex;
  gap: 8px;
  justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.2);
}
.pma-sep { opacity: 0.5; }

/* Nav */
.pma-nav {
  padding: 12px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pma-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--pma-text-2);
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--pma-transition), color var(--pma-transition), padding var(--pma-transition);
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  border-bottom: 1px solid transparent;
}
.pma-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--pma-transition);
}
.pma-nav-item:hover {
  background: var(--pma-brand-dim);
  color: var(--pma-brand);
  padding-right: 26px;
}
.pma-nav-item:hover svg { transform: scale(1.1); }
.pma-nav-item.active {
  color: var(--pma-brand);
  background: var(--pma-brand-light);
  border-bottom-color: var(--pma-brand-light);
}
.pma-nav-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--pma-brand);
}
.pma-nav-item .pma-badge {
  margin-right: auto;
  background: var(--pma-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 0;
  animation: pma-pulse 2s infinite;
}
@keyframes pma-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.pma-logout { color: #dc2626 !important; margin-top: auto; border-top: 1px solid var(--pma-border); }
.pma-logout:hover { background: #fef2f2 !important; color: #dc2626 !important; }

/* ── MAIN ────────────────────────────────────────────────────────────────── */
.pma-main {
  flex: 1;
  padding: 32px 28px;
  min-width: 0;
  overflow-x: hidden;
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.pma-section {
  display: none;
  animation: pma-fade-in 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
.pma-section.active { display: block; }
@keyframes pma-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pma-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pma-border);
}
.pma-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--pma-text);
  letter-spacing: -0.02em;
}
.pma-section-sub {
  font-size: 13px;
  color: var(--pma-text-3);
  margin-top: 4px;
  line-height: 1.5;
  flex-basis: 100%;
}

/* ── Stats Grid ──────────────────────────────────────────────────────────── */
.pma-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.pma-stat-card {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--pma-shadow-xs);
  transition: transform var(--pma-transition), box-shadow var(--pma-transition);
  animation: pma-card-in 0.5s cubic-bezier(0.4,0,0.2,1) both;
}
.pma-stat-card:nth-child(1) { animation-delay: 0.05s; }
.pma-stat-card:nth-child(2) { animation-delay: 0.1s; }
.pma-stat-card:nth-child(3) { animation-delay: 0.15s; }
.pma-stat-card:nth-child(4) { animation-delay: 0.2s; }
@keyframes pma-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pma-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--pma-shadow-md);
}
.pma-stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pma-stat-icon svg { width: 22px; height: 22px; }
.pma-stat-icon.orders   { background: #eff6ff; color: var(--c-open); }
.pma-stat-icon.courses  { background: var(--pma-brand-light); color: var(--pma-brand); }
.pma-stat-icon.tickets  { background: #fef9c3; color: #ca8a04; }
.pma-stat-icon.open     { background: #f0fdf4; color: #16a34a; }
.pma-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--pma-text);
  line-height: 1;
  display: block;
}
.pma-stat-label {
  font-size: 11.5px;
  color: var(--pma-text-3);
  display: block;
  margin-top: 4px;
}

/* ── Quick Access ────────────────────────────────────────────────────────── */
.pma-quick-access {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-quick-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pma-text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.pma-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pma-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
  color: var(--pma-text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none !important;
  transition: all var(--pma-transition);
  border-radius: 0 !important;
}
.pma-quick-btn svg { width: 20px; height: 20px; }
.pma-quick-btn:hover {
  border-color: var(--pma-brand);
  background: var(--pma-brand-light);
  color: var(--pma-brand);
  transform: translateY(-2px);
  box-shadow: var(--pma-shadow-sm);
}

/* ── Widget ──────────────────────────────────────────────────────────────── */
.pma-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.pma-widget-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--pma-text);
}
.pma-text-btn {
  background: none;
  border: none;
  color: var(--pma-brand);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 8px;
  transition: opacity var(--pma-transition);
}
.pma-text-btn:hover { opacity: 0.7; }

/* ── Recent Orders ───────────────────────────────────────────────────────── */
.pma-recent-orders {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 20px 24px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-notification-widget {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-notification-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pma-notification-list.compact { gap: 1px; }
.pma-notification-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 14px 16px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-notification-list.compact .pma-notification-item {
  border-right: 0;
  border-left: 0;
  border-top: 0;
  box-shadow: none;
}
.pma-notification-item.is-unread {
  border-right: 3px solid var(--pma-brand);
  background: var(--pma-brand-light);
}
.pma-notification-item strong {
  display: block;
  font-size: 13px;
  color: var(--pma-text);
  margin-bottom: 4px;
}
.pma-notification-item p {
  font-size: 12.5px;
  color: var(--pma-text-2);
  line-height: 1.6;
}
.pma-notification-item span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--pma-text-3);
}
.pma-notification-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.pma-orders-list { display: flex; flex-direction: column; gap: 1px; }
.pma-order-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pma-border-soft);
  transition: background var(--pma-transition);
}
.pma-order-row:last-child { border-bottom: none; padding-bottom: 0; }
.pma-order-row:hover { background: var(--pma-bg); }
.pma-order-thumb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--pma-border);
}
.pma-order-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pma-order-info { flex: 1; min-width: 0; }
.pma-order-num { font-size: 12px; font-weight: 700; color: var(--pma-brand); display: block; }
.pma-order-row-product {
  display: block;
  margin: 2px 0;
  color: var(--pma-text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pma-order-date { font-size: 11px; color: var(--pma-text-3); }
.pma-order-total { font-size: 13px; font-weight: 700; color: var(--pma-text); white-space: nowrap; }

/* ── Orders Grid ─────────────────────────────────────────────────────────── */
.pma-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.pma-order-card {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-xs);
  transition: transform var(--pma-transition), box-shadow var(--pma-transition);
  overflow: hidden;
}
.pma-order-hidden { display: none !important; }
.pma-order-actions { display: flex; align-items: center; gap: 8px; }
.pma-load-more-orders { margin: 20px auto 0; display: flex; }
.pma-order-timeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pma-order-timeline span {
  font-size: 10.5px;
  color: var(--pma-text-3);
  border: 1px solid var(--pma-border);
  padding: 3px 7px;
  background: var(--pma-bg);
}
.pma-order-timeline span.done {
  color: var(--c-completed);
  border-color: var(--c-completed);
  background: #f0fdf4;
}
.pma-order-timeline span.issue {
  color: var(--c-failed);
  border-color: var(--c-failed);
  background: #fef2f2;
}
.pma-order-tracking {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--pma-border);
  background: #fbfbfb;
  color: var(--pma-text);
  direction: rtl;
  font-family: 'IranYekanX', 'Tahoma', sans-serif !important;
}
.pma-order-tracking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
}
.pma-order-tracking-head span { color: var(--pma-text); }
.pma-order-tracking-head a {
  color: var(--pma-brand) !important;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none !important;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.pma-order-tracking-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--pma-text-2);
}
.pma-order-tracking-grid strong {
  color: var(--pma-text);
  font-weight: 700;
}
.pma-order-tracking-grid code {
  direction: ltr;
  display: inline-block;
  padding: 1px 6px;
  background: var(--pma-surface);
  border: 1px solid var(--pma-border-soft);
  color: var(--pma-brand);
  font-family: 'Courier New', monospace !important;
  font-size: 11.5px;
  font-weight: 700;
}
.pma-order-tracking-details {
  margin: 18px 0 24px;
  background: var(--pma-surface);
  box-shadow: var(--pma-shadow-xs);
}
.pma-order-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pma-shadow-md);
}
.pma-order-card-img {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--pma-bg);
}
.pma-order-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  display: block;
}
.pma-order-card:hover .pma-order-card-img img { transform: scale(1.06); }
.pma-more-items {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.pma-order-card-body { padding: 16px; }
.pma-order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pma-order-num-lg { font-size: 13px; font-weight: 800; color: var(--pma-brand); }
.pma-order-product-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pma-text);
  margin-bottom: 10px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pma-order-stage-text {
  margin: -3px 0 10px;
  color: var(--pma-text-3);
  font-size: 11.5px;
  line-height: 1.7;
}
.pma-order-card-meta {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--pma-text-3);
  margin-bottom: 14px;
}
.pma-order-card-meta svg { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; }
.pma-order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--pma-border-soft);
}
.pma-order-price { font-size: 14px; font-weight: 800; color: var(--pma-text); }

.pma-order-detail-panel {
  margin-bottom: 18px;
  padding: 18px;
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-xs);
}
.pma-order-detail-head,
.pma-order-detail-actions,
.pma-order-detail-meta,
.pma-order-detail-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pma-order-detail-head {
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pma-border-soft);
}
.pma-order-detail-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--pma-text-3);
  font-size: 11px;
  font-weight: 700;
}
.pma-order-detail-head h3 {
  font-size: 20px;
  color: var(--pma-text);
  line-height: 1.4;
}
.pma-order-detail-actions { flex-wrap: wrap; justify-content: flex-end; }
.pma-order-detail-meta {
  flex-wrap: wrap;
  margin-bottom: 14px;
  color: var(--pma-text-2);
  font-size: 12px;
  line-height: 1.8;
}
.pma-order-detail-meta span {
  padding: 7px 10px;
  background: var(--pma-bg);
  border: 1px solid var(--pma-border-soft);
}
.pma-order-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 14px;
  border: 1px solid var(--pma-border-soft);
}
.pma-order-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--pma-surface);
  border-bottom: 1px solid var(--pma-border-soft);
}
.pma-order-item:last-child { border-bottom: none; }
.pma-order-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--pma-border);
}
.pma-order-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--pma-text);
  font-size: 13px;
  line-height: 1.5;
}
.pma-order-item span {
  color: var(--pma-text-3);
  font-size: 11.5px;
}
.pma-order-item-total {
  color: var(--pma-text) !important;
  font-weight: 800;
  white-space: nowrap;
}
.pma-order-detail-foot {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pma-order-detail-foot p {
  color: var(--pma-text-2);
  font-size: 12px;
  line-height: 1.7;
}

/* ── Courses Grid ─────────────────────────────────────────────────────────── */
.pma-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.pma-course-card {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-xs);
  overflow: hidden;
  transition: transform var(--pma-transition), box-shadow var(--pma-transition);
}
.pma-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pma-shadow-md);
}
.pma-course-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--pma-bg);
}
.pma-course-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  display: block;
}
.pma-course-card:hover .pma-course-img img { transform: scale(1.06); }
.pma-course-overlay {
  position: absolute;
  inset: 0;
  background: rgba(124,22,149,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--pma-transition);
}
.pma-course-card:hover .pma-course-overlay { opacity: 1; }
.pma-course-cta {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background var(--pma-transition), border-color var(--pma-transition);
  letter-spacing: 0.05em;
}
.pma-course-cta:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.pma-course-body { padding: 18px; }
.pma-course-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--pma-text);
  margin-bottom: 6px;
  line-height: 1.4;
}
.pma-course-date { font-size: 11.5px; color: var(--pma-text-3); margin-bottom: 14px; }

.pma-course-progress {
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
  padding: 10px 12px;
  margin-bottom: 12px;
}
.pma-course-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--pma-text-2);
  margin-bottom: 7px;
}
.pma-course-progress-top strong { color: var(--pma-brand); }
.pma-progress-track {
  height: 7px;
  background: var(--pma-border);
  overflow: hidden;
}
.pma-progress-track span {
  display: block;
  height: 100%;
  background: var(--pma-brand);
}

/* License box */
.pma-license-box {
  background: var(--pma-bg);
  border: 1px solid var(--pma-border);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.pma-license-box label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--pma-text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 6px;
}
.pma-license-key {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pma-license-code {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--pma-brand);
  letter-spacing: 0.15em;
  word-break: break-all;
  font-family: 'Courier New', monospace !important;
}
.pma-copy-btn {
  background: none;
  border: 1px solid var(--pma-border);
  padding: 5px 8px;
  cursor: pointer;
  color: var(--pma-text-3);
  transition: all var(--pma-transition);
  flex-shrink: 0;
}
.pma-copy-btn svg { width: 14px; height: 14px; display: block; }
.pma-copy-btn:hover { border-color: var(--pma-brand); color: var(--pma-brand); }
.pma-copy-btn.copied { background: var(--pma-brand); border-color: var(--pma-brand); color: #fff; }

.pma-course-downloads { display: flex; flex-wrap: wrap; gap: 6px; }
.pma-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--pma-brand);
  border: 1px solid var(--pma-brand);
  padding: 5px 12px;
  text-decoration: none !important;
  transition: all var(--pma-transition);
}
.pma-download-btn svg { width: 12px; height: 12px; }
.pma-download-btn:hover { background: var(--pma-brand); color: #fff; }
.pma-download-center {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.pma-download-card {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 16px;
  color: var(--pma-text) !important;
  text-decoration: none !important;
  box-shadow: var(--pma-shadow-xs);
  transition: all var(--pma-transition);
}
.pma-download-card:hover {
  border-color: var(--pma-brand);
  transform: translateY(-2px);
}
.pma-download-card strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 6px;
}
.pma-download-card span {
  display: block;
  color: var(--pma-text-3);
  font-size: 11.5px;
}

/* ── Tickets ──────────────────────────────────────────────────────────────── */
.pma-ticket-form-wrap {
  margin-bottom: 24px;
  animation: pma-slide-down 0.35s cubic-bezier(0.4,0,0.2,1) both;
}
@keyframes pma-slide-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pma-card {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-sm);
}
.pma-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pma-border);
}
.pma-card-header h3 { font-size: 15px; font-weight: 700; color: var(--pma-text); }
.pma-close-btn {
  background: none;
  border: 1px solid var(--pma-border);
  padding: 6px;
  cursor: pointer;
  color: var(--pma-text-3);
  transition: all var(--pma-transition);
}
.pma-close-btn svg { width: 14px; height: 14px; display: block; }
.pma-close-btn:hover { border-color: #dc2626; color: #dc2626; }
.pma-card-body { padding: 20px; }

.pma-form-row { margin-bottom: 16px; }
.pma-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pma-form-group { display: flex; flex-direction: column; gap: 6px; }
.pma-form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pma-text-2);
}
.req { color: var(--pma-brand); }

.pma-input,
.pma-select,
.pma-textarea {
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--pma-text);
  font-family: inherit;
  border-radius: var(--pma-radius);
  transition: border-color var(--pma-transition), box-shadow var(--pma-transition);
  outline: none;
  width: 100%;
}
.pma-input:focus,
.pma-select:focus,
.pma-textarea:focus {
  border-color: var(--pma-brand);
  box-shadow: 0 0 0 3px var(--pma-brand-dim);
  background: var(--pma-surface);
}
.pma-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.pma-select { appearance: none; cursor: pointer; }
.pma-form-actions { margin-top: 6px; }

.pma-order-filters {
  display: block;
  margin-bottom: 18px;
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 14px;
}
.pma-order-filters > * {
  min-width: 0;
  max-width: 100%;
}
.pma-order-filters .pma-input {
  max-width: 520px;
}

/* Tickets Table */
.pma-tickets-table { background: var(--pma-surface); border: 1px solid var(--pma-border); box-shadow: var(--pma-shadow-xs); }
.pma-table-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 80px;
  gap: 0;
  padding: 12px 16px;
  background: var(--pma-bg);
  border-bottom: 1px solid var(--pma-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--pma-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pma-ticket-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 80px;
  gap: 0;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pma-border-soft);
  font-size: 12.5px;
  transition: background var(--pma-transition);
}
.pma-ticket-row:last-child { border-bottom: none; }
.pma-ticket-row:hover { background: var(--pma-bg); }
.pma-ticket-title-col { display: flex; flex-direction: column; gap: 3px; }
.pma-ticket-id { font-size: 10.5px; color: var(--pma-brand); font-weight: 700; }
.pma-ticket-name { font-weight: 600; color: var(--pma-text); font-size: 13px; }
.pma-ticket-replies-count { font-size: 10.5px; color: var(--pma-text-3); }
.pma-ticket-dept-label { color: var(--pma-text-2); }
.pma-ticket-date { color: var(--pma-text-3); font-size: 11.5px; }

/* ── Status / Priority Badges ─────────────────────────────────────────────── */
.pma-status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pma-status-badge.open,
.pma-status-badge.wc-processing,
.pma-status-badge.processing { color: var(--c-open); border-color: var(--c-open); background: #eff6ff; }
.pma-status-badge.answered,
.pma-status-badge.wc-completed,
.pma-status-badge.completed,
.pma-status-badge.active { color: var(--c-completed); border-color: var(--c-completed); background: #f0fdf4; }
.pma-status-badge.pending,
.pma-status-badge.wc-on-hold,
.pma-status-badge.on-hold,
.pma-status-badge.reviewing,
.pma-status-badge.referred,
.pma-status-badge.waiting-user { color: var(--c-pending); border-color: var(--c-pending); background: #fffbeb; }
.pma-status-badge.closed,
.pma-status-badge.wc-cancelled,
.pma-status-badge.cancelled { color: var(--c-closed); border-color: var(--c-closed); background: #f9fafb; }
.pma-status-badge.resolved { color: var(--c-completed); border-color: var(--c-completed); background: #f0fdf4; }
.pma-status-badge.wc-failed,
.pma-status-badge.failed { color: var(--c-failed); border-color: var(--c-failed); background: #fef2f2; }

.pma-order-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  color: var(--pma-text);
  background: var(--pma-bg);
  border: 1px solid var(--pma-border);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}
.pma-order-stage-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: currentColor;
}
.pma-order-stage-badge.pending { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.pma-order-stage-badge.review { color: #2563eb; background: #eff6ff; border-color: #bfdbfe; }
.pma-order-stage-badge.shipped { color: #0891b2; background: #ecfeff; border-color: #a5f3fc; }
.pma-order-stage-badge.delivered { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.pma-order-stage-badge.cancelled,
.pma-order-stage-badge.refunded { color: #6b7280; background: #f9fafb; border-color: #e5e7eb; }
.pma-order-stage-badge.failed { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

.pma-priority-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pma-priority-badge.low     { color: #6b7280; border-color: #6b7280; background: #f9fafb; }
.pma-priority-badge.medium  { color: #0891b2; border-color: #0891b2; background: #ecfeff; }
.pma-priority-badge.high    { color: #d97706; border-color: #d97706; background: #fffbeb; }
.pma-priority-badge.urgent  { color: #dc2626; border-color: #dc2626; background: #fef2f2; }

/* ── Ticket View ──────────────────────────────────────────────────────────── */
.pma-ticket-view-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px;
}
.pma-ticket-view-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pma-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--pma-text-2);
  text-decoration: none !important;
  border: 1px solid var(--pma-border);
  padding: 8px 14px;
  transition: all var(--pma-transition);
  white-space: nowrap;
}
.pma-back-btn svg { width: 14px; height: 14px; transform: rotate(180deg); }
.pma-back-btn:hover { border-color: var(--pma-brand); color: var(--pma-brand); }
.pma-ticket-view-title { flex: 1; }
.pma-ticket-view-title h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pma-ticket-meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pma-ticket-date-info { font-size: 11.5px; color: var(--pma-text-3); }
.pma-close-ticket-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #dc2626;
  border: 1px solid #dc2626;
  background: none;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--pma-transition);
  white-space: nowrap;
}
.pma-close-ticket-btn svg { width: 14px; height: 14px; }
.pma-close-ticket-btn:hover { background: #dc2626; color: #fff; }

/* Chat */
.pma-chat-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 24px;
  margin-bottom: 20px;
  min-height: 200px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-chat-msg {
  display: flex;
  gap: 12px;
  animation: pma-msg-in 0.3s ease both;
}
@keyframes pma-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pma-chat-msg.admin { flex-direction: row-reverse; }
.pma-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  border: 1px solid var(--pma-border);
  object-fit: cover;
  flex-shrink: 0;
}
.pma-chat-bubble { max-width: 75%; }
.pma-chat-msg.admin .pma-chat-bubble { align-items: flex-end; display: flex; flex-direction: column; }
.pma-chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.pma-chat-msg.admin .pma-chat-meta { flex-direction: row-reverse; }
.pma-chat-name { font-size: 12px; font-weight: 700; color: var(--pma-text); }
.pma-admin-tag {
  font-size: 10px;
  background: var(--pma-brand);
  color: #fff;
  padding: 1px 7px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.pma-admin-tag.private { background: #111827; }
.pma-chat-time { font-size: 10.5px; color: var(--pma-text-3); }
.pma-chat-text {
  background: var(--pma-bg);
  border: 1px solid var(--pma-border);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--pma-text);
}
.pma-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pma-attachment {
  border: 1px solid var(--pma-border);
  background: var(--pma-surface);
  color: var(--pma-brand) !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 9px;
  text-decoration: none !important;
}
.pma-attachment:hover { border-color: var(--pma-brand); }
.pma-chat-msg.admin .pma-chat-text {
  background: var(--pma-brand-light);
  border-color: var(--pma-brand);
}

.pma-reply-form {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  padding: 20px;
  box-shadow: var(--pma-shadow-xs);
}
.pma-reply-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

.pma-ticket-closed-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #16a34a;
  color: #16a34a;
  padding: 14px 20px;
  font-size: 13.5px;
  font-weight: 600;
}
.pma-ticket-closed-notice svg { width: 18px; height: 18px; }

.pma-subscriptions-list {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-xs);
}
.pma-subscription-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 90px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pma-border-soft);
  font-size: 12.5px;
}
.pma-subscription-row:last-child { border-bottom: none; }
.pma-subscription-row strong,
.pma-subscription-row span { display: block; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.pma-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--pma-brand);
  color: #fff !important;
  border: none;
  padding: 11px 22px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--pma-transition), transform var(--pma-transition), box-shadow var(--pma-transition);
  letter-spacing: 0.02em;
  border-radius: var(--pma-radius);
}
.pma-btn-primary svg { width: 15px; height: 15px; }
.pma-btn-primary:hover {
  background: var(--pma-brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,22,149,0.3);
}
.pma-btn-primary:active { transform: translateY(0); }
.pma-btn-primary-sm {
  display: inline-flex;
  align-items: center;
  background: var(--pma-brand);
  color: #fff !important;
  border: none;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--pma-transition);
  border-radius: var(--pma-radius);
}
.pma-btn-primary-sm:hover { background: var(--pma-brand-dark); }
.pma-btn-full { width: 100%; justify-content: center; }
.pma-btn-sm {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pma-brand) !important;
  border: 1px solid var(--pma-brand);
  padding: 5px 12px;
  text-decoration: none !important;
  transition: all var(--pma-transition);
  background: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--pma-radius);
  white-space: nowrap;
}
.pma-btn-sm:hover { background: var(--pma-brand); color: #fff !important; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.pma-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--pma-surface);
  border: 1px dashed var(--pma-border);
}
.pma-empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--pma-border);
  margin: 0 auto 16px;
  display: block;
}
.pma-empty-state p { font-size: 15px; font-weight: 600; color: var(--pma-text-3); margin-bottom: 6px; }
.pma-empty-sub { font-size: 12.5px !important; }
.pma-empty-state .pma-btn-primary { margin-top: 16px; }

/* ── Cart Shortcode ─────────────────────────────────────────────────────── */
.pma-cart,
.pma-cart * {
  box-sizing: border-box;
  direction: rtl;
  font-family: 'IranYekanX', 'Tahoma', sans-serif !important;
}
.pma-cart {
  width: 100%;
  color: var(--pma-text);
}
.pma-cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.pma-cart-items,
.pma-cart-summary {
  background: var(--pma-surface);
  border: 1px solid var(--pma-border);
  box-shadow: var(--pma-shadow-xs);
}
.pma-cart-items { padding: 20px; }
.pma-cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--pma-border);
}
.pma-cart-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--pma-text-3);
  font-size: 11px;
  font-weight: 800;
}
.pma-cart-head h2 {
  color: var(--pma-text);
  font-size: 21px;
  line-height: 1.5;
}
.pma-cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 132px 120px 56px;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--pma-border-soft);
}
.pma-cart-item:last-of-type { border-bottom: none; }
.pma-cart-thumb {
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
}
.pma-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pma-cart-product h3 {
  margin-bottom: 7px;
  color: var(--pma-text);
  font-size: 14px;
  line-height: 1.6;
}
.pma-cart-product h3 a {
  color: inherit;
  text-decoration: none !important;
}
.pma-cart-product dl.variation {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 3px 7px;
  margin: 0 0 8px;
  color: var(--pma-text-3);
  font-size: 11.5px;
}
.pma-cart-product dl.variation p { margin: 0; }
.pma-cart-price {
  display: inline-block;
  color: var(--pma-text-2);
  font-size: 12px;
  font-weight: 700;
}
.pma-cart-qty {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
}
.pma-cart-qty-btn {
  width: 34px;
  height: 38px;
  border: none;
  background: var(--pma-surface);
  color: var(--pma-text);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--pma-transition), color var(--pma-transition);
}
.pma-cart-qty-btn:hover {
  background: var(--pma-brand-light);
  color: var(--pma-brand);
}
.pma-cart-qty .quantity {
  min-width: 0;
}
.pma-cart-qty input.qty {
  width: 100%;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--pma-text);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}
.pma-cart-qty input.qty::-webkit-outer-spin-button,
.pma-cart-qty input.qty::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.pma-cart-line-total span {
  display: block;
  margin-bottom: 4px;
  color: var(--pma-text-3);
  font-size: 10.5px;
  font-weight: 700;
}
.pma-cart-line-total strong {
  display: block;
  color: var(--pma-text);
  font-size: 13px;
  line-height: 1.5;
}
.pma-cart-remove {
  color: #dc2626 !important;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
}
.pma-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--pma-border);
}
.pma-cart-coupon {
  display: flex;
  flex: 1;
  max-width: 420px;
  gap: 8px;
}
.pma-cart-coupon .pma-input { background: var(--pma-surface); }
.pma-cart-update.is-active {
  background: var(--pma-brand);
  color: #fff !important;
}
.pma-cart-summary {
  position: sticky;
  top: 20px;
  padding: 20px;
}
.pma-cart-summary h3 {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pma-border);
  color: var(--pma-text);
  font-size: 17px;
}
.pma-cart-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pma-border-soft);
  color: var(--pma-text-2);
  font-size: 12.5px;
  line-height: 1.7;
}
.pma-cart-summary-row > span {
  color: var(--pma-text-3);
  font-weight: 700;
}
.pma-cart-summary-value {
  color: var(--pma-text);
  font-weight: 800;
  text-align: left;
}
.pma-cart-summary-value ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pma-cart-summary-value a {
  color: var(--pma-brand);
  text-decoration: none !important;
}
.pma-cart-summary-row.total {
  margin-top: 4px;
  border-bottom: none;
  color: var(--pma-text);
  font-size: 14px;
}
.pma-cart-summary-row.total .pma-cart-summary-value {
  color: var(--pma-brand);
  font-size: 18px;
}
.pma-cart-checkout {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  padding-block: 13px;
}

/* ── Toast Notification ──────────────────────────────────────────────────── */
.pma-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--pma-text);
  color: #fff;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'IranYekanX', 'Tahoma', sans-serif;
  z-index: 9999;
  box-shadow: var(--pma-shadow-lg);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
  direction: rtl;
}
.pma-toast.show { transform: translateY(0); opacity: 1; }
.pma-toast.success { background: #16a34a; }
.pma-toast.error   { background: #dc2626; }

.pma-payment-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,0.42);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  direction: rtl;
  font-family: 'IranYekanX', 'Tahoma', sans-serif !important;
}
.pma-payment-modal.show {
  opacity: 1;
  visibility: visible;
}
.pma-payment-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 24px;
  text-align: center;
  background: var(--pma-surface);
  box-shadow: var(--pma-shadow-lg);
  border: 1px solid var(--pma-border);
  transform: translateY(12px);
  transition: transform 0.22s ease;
}
.pma-payment-modal.show .pma-payment-modal-card { transform: translateY(0); }
.pma-payment-modal-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--pma-border);
  background: var(--pma-bg);
  color: var(--pma-text-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.pma-payment-modal-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.pma-payment-modal-icon svg { width: 30px; height: 30px; }
.pma-payment-modal-icon.is-review {
  color: #d97706;
  background: #fffbeb;
  border-color: #fde68a;
}
.pma-payment-modal h3 {
  margin-bottom: 8px;
  color: var(--pma-text);
  font-size: 20px;
  line-height: 1.5;
}
.pma-payment-modal p {
  margin-bottom: 18px;
  color: var(--pma-text-2);
  font-size: 13px;
  line-height: 1.8;
}

/* ── Loading Spinner ──────────────────────────────────────────────────────── */
.pma-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pma-spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes pma-spin { to { transform: rotate(360deg); } }

/* ── Mobile Bottom Nav ───────────────────────────────────────────────────── */
.pma-mobile-nav {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(8px, env(safe-area-inset-bottom));
  height: 80px;
  align-items: stretch;
  gap: 4px;
  padding: 8px 6px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(232,232,232,0.9);
  border-radius: 8px;
  z-index: 1000;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.12);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.pma-mobile-nav,
.pma-mobile-nav * {
  box-sizing: border-box;
  direction: rtl;
  font-family: 'IranYekanX', 'Tahoma', sans-serif !important;
}
.pma-mob-item {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pma-text-3);
  font-family: inherit;
  cursor: pointer;
  transition: background var(--pma-transition), color var(--pma-transition), transform var(--pma-transition);
  -webkit-tap-highlight-color: transparent;
}
.pma-mob-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pma-mob-item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pma-mob-item:hover {
  background: var(--pma-brand-dim);
  color: var(--pma-brand);
}
.pma-mob-item.active {
  background: var(--pma-brand-light);
  color: var(--pma-brand);
}
.pma-mob-item:active { transform: translateY(1px); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pma-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pma-quick-grid  { grid-template-columns: repeat(2, 1fr); }
  .pma-table-head,
  .pma-ticket-row { grid-template-columns: 2fr 1fr 1fr 1fr 80px; }
  .pma-table-head span:nth-child(4),
  .pma-ticket-row > *:nth-child(4) { display: none; }
}

@media (max-width: 900px) {
  .pma-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    transform: translateX(100%);
    z-index: 1002;
    width: 260px;
    box-shadow: var(--pma-shadow-lg);
  }
  .pma-sidebar.open { transform: translateX(0); }
  .pma-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1001;
    backdrop-filter: blur(2px);
  }
  .pma-sidebar-overlay.show { display: block; }
  .pma-main { padding: 16px 14px 116px; }
  .pma-mobile-nav { display: flex; }
  .pma-mobile-menu-btn {
    display: none !important;
  }
  .pma-section-header { flex-direction: column; }
  .pma-table-head { display: none; }
  .pma-ticket-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--pma-border);
    margin-bottom: 8px;
    background: var(--pma-surface);
  }
  .pma-ticket-row:hover { background: var(--pma-bg); }
  .pma-orders-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .pma-courses-grid { grid-template-columns: 1fr; }
  .pma-form-row-2 { grid-template-columns: 1fr; }
  .pma-order-filters {
    width: 100%;
    padding: 12px;
    overflow: hidden;
  }
  .pma-order-filters .pma-input { max-width: none; }
  .pma-order-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: stretch;
    min-height: 116px;
  }
  .pma-order-card:hover {
    transform: none;
    box-shadow: var(--pma-shadow-xs);
  }
  .pma-order-card-img {
    height: 100%;
    min-height: 116px;
  }
  .pma-order-card:hover .pma-order-card-img img { transform: none; }
  .pma-more-items {
    right: 6px;
    left: 6px;
    bottom: 6px;
    text-align: center;
    padding: 3px 5px;
  }
  .pma-order-card-body { padding: 13px; }
  .pma-order-card-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
  }
  .pma-order-card-footer {
    align-items: center;
    gap: 10px;
    padding-top: 10px;
  }
  .pma-order-actions {
    width: auto;
    flex-wrap: wrap;
  }
  .pma-order-actions .pma-btn-sm,
  .pma-order-actions .pma-btn-primary-sm {
    justify-content: center;
    min-width: 76px;
  }
  .pma-order-card-meta {
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 10px;
  }
  .pma-order-product-name {
    margin-bottom: 5px;
    font-size: 13px;
    -webkit-line-clamp: 1;
  }
  .pma-order-stage-text {
    display: none;
  }
  .pma-order-price {
    font-size: 13px;
  }
  .pma-order-detail-head,
  .pma-order-detail-actions,
  .pma-order-detail-foot {
    align-items: stretch;
    flex-direction: column;
  }
  .pma-order-detail-actions .pma-btn-sm,
  .pma-order-detail-foot .pma-btn-primary-sm {
    justify-content: center;
  }
  .pma-subscription-row { grid-template-columns: 1fr; }
  .pma-notification-item { align-items: flex-start; flex-direction: column; }
  .pma-notification-actions { width: 100%; }
}

@media (max-width: 600px) {
  .pma-mobile-nav {
    left: 8px;
    right: 8px;
    padding-inline: 4px;
  }
  .pma-mob-item { font-size: 10px; }
  .pma-mob-item svg { width: 21px; height: 21px; }
  .pma-stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pma-quick-grid  { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pma-stat-card { padding: 14px; }
  .pma-stat-value { font-size: 22px; }
  .pma-section-header h2 { font-size: 18px; }
  .pma-chat-bubble { max-width: 90%; }
  .pma-ticket-view-wrap { padding: 12px; }
  .pma-order-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
  }
  .pma-order-row .pma-order-stage-badge {
    grid-column: 2 / 3;
    width: max-content;
  }
  .pma-order-row .pma-btn-sm {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    align-self: center;
  }
  .pma-order-total {
    grid-column: 2 / 3;
    white-space: normal;
  }
  .pma-order-card {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 108px;
  }
  .pma-order-card-img {
    min-height: 108px;
  }
  .pma-order-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .pma-order-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .pma-order-actions {
    width: 100%;
  }
  .pma-order-actions .pma-btn-sm,
  .pma-order-actions .pma-btn-primary-sm {
    flex: 1;
  }
  .pma-order-stage-badge {
    white-space: normal;
    text-align: center;
  }
  .pma-order-detail-panel { padding: 14px; }
  .pma-order-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .pma-order-item-total {
    grid-column: 2 / 3;
    white-space: normal;
  }
  .pma-toast {
    right: 12px;
    left: 12px;
    bottom: 102px;
    max-width: none;
  }
}

/* WordPress admin ticket screen */
.pma-admin-page .pma-admin-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}
.pma-admin-page .pma-admin-filters input,
.pma-admin-page .pma-admin-filters select {
  min-height: 32px;
}
.pma-admin-page .pma-ticket-view-wrap {
  max-width: 980px;
  margin: 16px 0 0;
  padding: 0;
}
.pma-admin-page .pma-chat-avatar { display: none; }
.pma-admin-page .pma-reply-form input[type="file"] { margin-top: 12px; }
