/*
 * SunBurger — Customer Panel styles (css/panel.css)
 * Shared by all customer-panel pages (account / favorites / discounts /
 * notifications / reviews / support). Uses the existing design tokens from
 * variables.css — no new color system, red used strategically only.
 */

/* ================= Layout: sidebar + main ================= */

.cp-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px 60px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* ---------- Sidebar ---------- */

.cp-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 14px;
  position: sticky;
  top: 86px;
}

.cp-side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.cp-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
}

.cp-side-name {
  font-weight: 800;
  font-size: 14px;
}

.cp-side-phone {
  font-size: 12px;
  color: var(--text-secondary);
  direction: ltr;
  text-align: end;
}

.cp-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cp-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

/* SVG nav icons — aligned with the PFX/ODX/SFX design language */
.cp-nav .cp-nav-ico {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}
.cp-nav a:hover .cp-nav-ico {
  color: var(--primary);
}
.cp-nav a.active .cp-nav-ico {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}
.cp-nav .cp-nav-label {
  flex: 1;
  min-width: 0;
}
.cp-nav a .cp-chip svg,
.cp-chip svg {
  flex-shrink: 0;
  vertical-align: -2px;
}

.cp-nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.cp-nav a.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.cp-nav a .cp-nav-badge {
  margin-inline-start: auto;
  background: var(--primary);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  display: grid;
  place-items: center;
}

/* [hidden] must beat the display:grid above — an empty badge pill
   otherwise renders as a stray red dot on every panel page. */
.cp-nav a .cp-nav-badge[hidden] {
  display: none;
}

.cp-nav a.active .cp-nav-badge {
  background: var(--white);
  color: var(--primary);
}

.cp-side-loyalty {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-primary);
}

.cp-side-loyalty[hidden] {
  display: none;
}

.cp-side-loyalty .csl-icon {
  font-size: 20px;
}

.cp-side-loyalty .csl-points {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.cp-side-loyalty .csl-level {
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.88;
}

.cp-side-loyalty a {
  color: var(--white);
  text-decoration: none;
}

.cp-nav-sep {
  height: 1px;
  background: var(--border);
  margin: 10px 4px;
}

/* Staff-only: entry to the admin panel (visibility from server role). */
.cp-admin-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-tint);
  border: 1px dashed rgba(139, 0, 0, 0.35);
}

.cp-admin-entry:hover {
  background: rgba(139, 0, 0, 0.12);
}

.cp-logout {
  color: #b3261e;
}

.cp-logout:hover {
  background: var(--primary-tint) !important;
  color: #b3261e !important;
}

/* ---------- Main area ---------- */

.cp-main {
  min-width: 0;
}

.cp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cp-head h1 {
  font-size: 21px;
  font-weight: 900;
}

.cp-head .cp-sub {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.cp-head-actions {
  margin-inline-start: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 18px;
}

.cp-card h2 {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.cp-card.section-header {
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.cp-card.section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cp-card.section-header h2::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* Wallet-specific card enhancements */
.cp-card.wallet-balance {
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.cp-card.wallet-balance::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.03), transparent);
  pointer-events: none;
}

.cp-card.wallet-stats {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cp-card.wallet-stats:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.cp-card.wallet-stats.primary {
  border-left: 4px solid var(--primary);
}

.cp-card.wallet-stats.success {
  border-left: 4px solid var(--success);
}

.cp-card.wallet-stats.warning {
  border-left: 4px solid #F59E0B;
}

.cp-card.tx-card {
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-fast);
}

.cp-card.tx-card:last-child {
  border-bottom: none;
}

.cp-card.tx-card:hover {
  background: var(--surface-soft);
}

.cp-card.topup-modal {
  max-width: 420px;
  width: 92%;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Mobile: the sidebar is replaced by the fixed bottom nav + «بیشتر» sheet
   (see "Mobile bottom navigation" section at the end of this file) — the
   layout reserves room for the bar and the footer clears it too. */
@media (max-width: 860px) {
  .cp-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 12px calc(108px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }
  /* Non-panel customer pages (menu / cart / checkout / landing / …): reserve
     room beneath the scrolling main so the fixed bottom nav never covers
     the final content or primary actions. */
  main {
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .cp-sidebar {
    display: none;
  }
  .site-footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .cp-card {
    padding: 15px;
  }
}

/* ================= Growth: referral / gift cards / achievements ================= */

.ref-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ref-code {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  background: var(--surface-soft);
  border: 1.5px dashed var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--primary);
}

.ref-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  min-width: 0;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.ach-card {
  display: flex;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface-soft);
}

.ach-card.unlocked {
  border-color: rgba(200, 150, 0, 0.45);
  background: linear-gradient(
    135deg,
    rgba(255, 200, 60, 0.12),
    rgba(255, 200, 60, 0.04)
  );
}

.ach-card.locked {
  opacity: 0.78;
}

.ach-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ach-body {
  flex: 1;
  min-width: 0;
}

.ach-body h3 {
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ach-body p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 3px 0;
}

.ach-cond {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ach-date {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
}

.ach-progress {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ach-bar {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.ach-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width var(--transition-fast);
}

.ach-progress small {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .ach-grid {
    grid-template-columns: 1fr;
  }
  .ref-code-row .cp-btn {
    flex: 1;
  }
}

/* ================= Dashboard ================= */

.cp-hero {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-primary);
}

.cp-hero .cp-hello {
  font-size: 19px;
  font-weight: 900;
}

.cp-hero .cp-hero-sub {
  font-size: 12.5px;
  opacity: 0.85;
  margin-top: 3px;
  font-weight: 600;
}

.cp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  padding: 5px 13px;
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 12px;
}

.cp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 700px) {
  .cp-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cp-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* Linked stat cards (wallet / referral / achievements) inherit the look. */
a.cp-stat {
  text-decoration: none;
  transition: border-color var(--transition-fast);
}
a.cp-stat:hover {
  border-color: var(--primary-light);
}

.cp-stat .st-num {
  font-size: 21px;
  font-weight: 900;
  color: var(--primary);
}

.cp-stat .st-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 2px;
}

.cp-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 700px) {
  .cp-quick {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cp-quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 15px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  transition:
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.cp-quick a:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.cp-quick a span[aria-hidden] {
  font-size: 21px;
}

/* Active order banner inside dashboard */
.cp-active-order {
  border: 1.5px solid var(--primary-light);
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}

/* Loyalty strip on the account hub */
.cp-loyalty-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 13px 17px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.cp-loyalty-strip .cls-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.cp-loyalty-strip .cls-main b {
  color: var(--primary);
  font-weight: 900;
}

.cls-badge {
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 800;
}

.cls-next {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ================= Generic rows / chips ================= */

.cp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}

.cp-row:last-child {
  border-bottom: none;
}

.cp-row .r-main {
  flex: 1;
  min-width: 0;
}

.cp-row .r-title {
  font-size: 13.5px;
  font-weight: 700;
}

.cp-row .r-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 1px;
}

.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 99px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
  background: var(--surface-soft);
  color: var(--text-secondary);
  white-space: nowrap;
}

.cp-chip.success {
  background: var(--success-bg);
  color: var(--success);
}
.cp-chip.active {
  background: var(--primary-tint);
  color: var(--primary);
}
.cp-chip.info {
  background: #e8f0fb;
  color: #1d5bbf;
}
.cp-chip.danger {
  background: #fceae9;
  color: #b3261e;
}
.cp-chip.neutral {
  background: var(--surface-soft);
  color: var(--text-secondary);
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 9px 17px;
  font-size: 12.5px;
  font-weight: 800;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.cp-btn.primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.cp-btn.primary:hover {
  background: var(--primary-dark);
}

.cp-btn.outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.cp-btn.outline:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.cp-btn.danger {
  background: #b3261e;
  color: var(--white);
}

.cp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cp-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ================= Loyalty & rewards (rewards.html) ================= */

.loyalty-hero {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-primary);
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.loyalty-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.lh-kicker {
  font-size: 11.5px;
  font-weight: 800;
  opacity: 0.85;
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lh-balance {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.lh-balance strong {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lh-balance span {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.lh-next {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 8px;
  line-height: 1.5;
}

.lh-progress {
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  margin-top: 10px;
  max-width: 340px;
  overflow: hidden;
}

.lh-progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--white);
  transition: width var(--transition-fast);
}

.lh-rules {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  min-width: 220px;
}

.lh-warn {
  opacity: 0.95;
}

.lh-topup {
  flex-shrink: 0;
}

.lh-topup .cp-btn {
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.lh-topup .cp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.4);
}

.cp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.cp-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.cp-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.cp-stat-card.primary { border-left: 4px solid var(--primary); }
.cp-stat-card.success { border-left: 4px solid var(--success); }
.cp-stat-card.warning { border-left: 4px solid #F59E0B; }
.cp-stat-card.info { border-left: 4px solid #3B82F6; }

.cp-stat-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cp-stat-card strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  color: var(--text);
  margin-top: 3px;
}

@media (max-width: 700px) {
  .cp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lh-topup .cp-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.reward-card {
  display: flex;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface-soft);
  transition: border-color var(--transition-fast);
}

.reward-card:hover {
  border-color: var(--primary-light);
}

.reward-card.disabled {
  opacity: 0.62;
}

.rw-icon {
  font-size: 26px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.rw-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rw-body h4 {
  font-size: 13.5px;
  font-weight: 800;
}

.rw-body p {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
}

.rw-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-weight: 700;
}

.rw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: wrap;
}

.rw-foot b {
  font-size: 13px;
  color: var(--primary);
  font-weight: 900;
}

.rw-foot .cp-btn {
  padding: 7px 13px;
  font-size: 11.5px;
}

.tx-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.tx-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-fast);
}

.tx-row:last-child {
  border-bottom: none;
}

.tx-row:hover {
  background: var(--surface-soft);
}

.tx-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.tx-row.pos .tx-icon {
  background: var(--success-bg);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.tx-row.neg .tx-icon {
  background: #FEF2F2;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.tx-body {
  flex: 1;
  min-width: 0;
}

.tx-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.tx-meta {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.tx-balance {
  font-size: 10.5px !important;
  opacity: 0.75;
  margin-top: 2px;
}

.tx-amount {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.tx-row.pos .tx-amount {
  color: var(--success);
}

.tx-row.neg .tx-amount {
  color: #b3261e;
}

/* Empty state for transactions */
.tx-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.tx-empty .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.tx-empty h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.tx-empty p {
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

.cp-chip-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.cp-chip-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.cp-chip-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Wallet Topup Modal Styles */
.tpx-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.tpx-head {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.tpx-head::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.tpx-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.tpx-head-ico {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

.tpx-head-txt {
  z-index: 1;
}

.tpx-head-txt h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.tpx-head-txt span {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
}

.tpx-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
  z-index: 1;
}

.tpx-close:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.tpx-body {
  padding: 24px;
}

.tpx-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.tpx-chip {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.tpx-chip:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.tpx-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px -4px rgba(139,0,0,0.4);
}

.tpx-chip strong {
  font-size: 15px;
  font-weight: 900;
}

.tpx-chip span {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

.tpx-chip.active span {
  opacity: 1;
}

.tpx-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tpx-input {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tpx-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
}

.tpx-input.has-error {
  border-color: var(--danger);
}

.tpx-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-family: inherit;
}

.tpx-input input::placeholder {
  color: var(--text-secondary);
  font-weight: 500;
}

.tpx-unit {
  padding-inline-end: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border-inline-start: 1px solid var(--border);
  padding-inline-start: 16px;
}

.tpx-hint {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 600;
}

.tpx-error {
  display: block;
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 8px;
  font-weight: 700;
  min-height: 18px;
}

.tpx-preview {
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tpx-preview span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--success);
}

.tpx-preview strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--success);
}

.tpx-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.6;
}

.tpx-note span[aria-hidden] {
  flex-shrink: 0;
  margin-top: 2px;
}

.tpx-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 24px;
  background: var(--surface-soft);
  border-inline-start: 1px solid var(--border);
}

.tpx-foot .cp-btn {
  padding: 12px 22px;
  font-size: 13.5px;
  font-weight: 800;
}

.tpx-foot .cp-btn.primary {
  box-shadow: 0 4px 14px -4px rgba(139,0,0,0.4);
}

.tpx-foot .cp-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(139,0,0,0.5);
}

@media (max-width: 480px) {
  .tpx-presets {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cp-section {
  margin-bottom: 20px;
}

.cp-section > h2 {
  font-size: 15.5px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cp-section .cp-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cp-note {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 12px;
}

@media (max-width: 700px) {
  .loyalty-hero {
    padding: 18px;
  }
  .lh-balance strong {
    font-size: 28px;
  }
  .lh-rules {
    min-width: 0;
    width: 100%;
  }
}

/* ================= Empty / error / skeleton ================= */

.cp-empty {
  text-align: center;
  padding: 44px 18px;
}

.cp-empty .cp-empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}

.cp-empty h3 {
  font-size: 15.5px;
  font-weight: 800;
}

.cp-empty p {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 6px 0 16px;
}

.skeleton-block {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--surface-soft) 25%,
    var(--background) 50%,
    var(--surface-soft) 75%
  );
  background-size: 200% 100%;
  animation: cpShimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes cpShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ================= Coupons (discounts tab) ================= */

/* Hero strip above the coupon grid */
.dc-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-radius: var(--radius-md);
  padding: 16px 18px;
  color: var(--white);
  box-shadow: var(--shadow-primary);
  margin-bottom: 16px;
}

.dc-hero-ico {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 15px;
}

.dc-hero-ico svg {
  width: 25px;
  height: 25px;
}

.dc-hero-body {
  flex: 1;
  min-width: 0;
}

.dc-hero-body h2 {
  font-size: 15px;
  font-weight: 900;
  margin: 0 0 3px;
}

.dc-hero-body p {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.88;
  margin: 0;
  line-height: 1.9;
}

.dc-hero-count {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 7px 16px;
}

.dc-hero-count b {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}
.dc-hero-count span {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
}

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

/* Ticket-style card — dashed perforation + edge notches */
.coupon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.coupon-card:hover:not(.is-used) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.coupon-top {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 16px 13px;
}

.coupon-value {
  flex-shrink: 0;
  min-width: 62px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 12px;
  padding: 11px 10px;
  font-weight: 900;
  font-size: 16.5px;
  line-height: 1.1;
}

.coupon-value small {
  font-size: 9.5px;
  font-weight: 800;
}

.coupon-titles {
  flex: 1;
  min-width: 0;
}

.coupon-label {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coupon-kind {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.coupon-badge {
  flex-shrink: 0;
  font-size: 9.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
}

.coupon-badge.expiring {
  background: #fdf3e0;
  color: #9a6a12;
}
.coupon-badge.done {
  background: var(--surface-soft);
  color: var(--text-secondary);
}

/* perforated divider — notches punched through to the wrapper background */
.coupon-perf {
  position: relative;
  border-top: 1.5px dashed var(--border);
  margin: 0 16px;
}

.coupon-perf::before,
.coupon-perf::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transform: translateY(-50%);
}

.coupon-perf::before {
  right: -24px;
}
.coupon-perf::after {
  left: -24px;
}

.coupon-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1.5px dashed var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 13px 16px 0;
  font-weight: 900;
  font-size: 14px;
  direction: ltr;
}

.coupon-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  direction: rtl;
  padding: 3px 4px;
  border-radius: 7px;
  transition: background var(--transition-fast);
}

.coupon-copy:hover {
  background: var(--primary-tint);
}
.coupon-copy:disabled {
  color: var(--text-secondary);
  cursor: default;
}
.coupon-copy:disabled:hover {
  background: none;
}

.coupon-meta {
  list-style: none;
  margin: 10px 16px 0;
  padding: 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 2;
  flex: 1;
}

.coupon-meta li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coupon-meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.75;
}

.coupon-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 13px 16px 16px;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--white);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.coupon-cta:hover:not(:disabled) {
  background: var(--primary-dark);
}
.coupon-cta:active:not(:disabled) {
  transform: scale(0.98);
}
.coupon-cta:disabled {
  background: var(--surface-soft);
  color: var(--text-secondary);
  cursor: default;
}

.coupon-card.is-used {
  opacity: 0.74;
}
.coupon-card.is-used .coupon-value {
  background: var(--surface-soft);
  color: var(--text-secondary);
}
.coupon-card.is-used .coupon-code {
  border-color: var(--border);
  color: var(--text-secondary);
}
.coupon-card.is-used .coupon-label {
  color: var(--text-secondary);
}

.dc-note {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 14px 2px 0;
  line-height: 2;
}

@media (max-width: 480px) {
  .coupon-grid {
    grid-template-columns: 1fr;
  }
  .dc-hero {
    padding: 14px 15px;
  }
  .dc-hero-count {
    padding: 6px 12px;
  }
}

/* ================= Favorites grid ================= */

.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.fav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.fav-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.fav-card .fv-body {
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.fav-card .fv-name {
  font-size: 13.5px;
  font-weight: 800;
}

.fav-card .fv-price {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
}

.fav-card.unavailable img {
  filter: grayscale(1);
  opacity: 0.6;
}

.fav-card .fv-unavailable {
  position: absolute;
  inset-inline-start: 10px;
  inset-block-start: 10px;
  background: rgba(33, 27, 24, 0.82);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 99px;
  padding: 3px 11px;
}

/* ================= Notifications ================= */

.notif-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notif-row:hover {
  background: var(--surface-soft);
}

.notif-row.unread {
  background: var(--primary-tint);
  border-radius: var(--radius-sm);
}

.notif-row .n-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 8px;
  flex-shrink: 0;
}

.notif-row.read .n-dot {
  background: transparent;
} /* ================= Reviews — history cards ================= */

.review-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 13px;
  background: var(--white);
}

.review-item .rv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.review-item .rv-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #e8a013;
}

.review-item .rv-stars svg {
  display: block;
}

.review-item .rv-text {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 9px;
}

.review-item .rv-reply {
  background: var(--surface-soft);
  border-inline-start: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-top: 11px;
  font-size: 12.5px;
}

.review-item .rv-reply b {
  color: var(--primary);
}

/* ================= Review submission (.rvx-*) — shared component ================= */
/* Used by js/review-form.js (create from Order Details + edit from history).
   Professional SVG stars, no emojis; AA-checked pairs; ≥38px touch targets. */

/* --- mini star row (per-product + history cards) --- */
.star-input.rvx-mini {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  justify-content: flex-end;
  gap: 2px;
}
.star-input.rvx-mini button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #e3d6c6;
  transition:
    color var(--transition-fast),
    transform var(--transition-fast);
}
.star-input.rvx-mini button.on {
  color: #e8a013;
}
.star-input.rvx-mini button:hover {
  transform: scale(1.1);
}

/* --- modal shell --- */
.rvx-modal {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.rvx-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.rvx-head-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff6e3;
  color: #e8a013;
  flex-shrink: 0;
}
.rvx-head-text {
  min-width: 0;
}
.rvx-head-text h3 {
  font-size: 16.5px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.rvx-head-text span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
}
.rvx-close {
  margin-inline-start: auto;
}

.rvx-body {
  padding: 18px 20px 16px;
  overflow-y: auto;
  min-height: 0;
}

/* --- existing-review banner --- */
.rvx-existing {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--success-bg);
  color: #166a3c;
  border: 1px solid rgba(30, 122, 70, 0.25);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.rvx-existing svg {
  flex-shrink: 0;
}

/* --- transient state banner (error / success) --- */
.rvx-state {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.rvx-state.error {
  background: #fceae9;
  color: #b3261e;
  border: 1px solid rgba(179, 38, 30, 0.25);
}
.rvx-state.success {
  background: var(--success-bg);
  color: #166a3c;
  border: 1px solid rgba(30, 122, 70, 0.25);
}
.rvx-state svg {
  flex-shrink: 0;
}

/* --- product info --- */
.rvx-product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}
.rvx-product-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-soft);
}
.rvx-product-body {
  min-width: 0;
}
.rvx-product-name {
  font-size: 14px;
  font-weight: 900;
}
.rvx-product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
}
.rvx-product-meta svg {
  color: var(--primary);
  flex-shrink: 0;
}

.rvx-per-product {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1px 13px 4px;
  margin: 10px 0 16px;
}
.rvx-per-product-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  margin: 10px 0 2px;
}
.rvx-per-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}
.rvx-per-row + .rvx-per-row {
  border-top: 1px dashed var(--border);
}
.rvx-per-name {
  font-size: 12.5px;
  font-weight: 700;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rvx-per-name b {
  color: var(--primary);
}

/* --- fields --- */
.rvx-field {
  margin-bottom: 16px;
}
.rvx-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.rvx-req {
  color: #b3261e;
}

/* --- star rating (radiogroup) --- */
.rvx-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  direction: ltr;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.rvx-stars button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: #e3d6c6;
  transition:
    color var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast);
}
.rvx-stars button:hover {
  transform: scale(1.12);
  color: #e8a013;
}
.rvx-stars button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.rvx-stars button.on {
  color: #e8a013;
  animation: rvxPop 0.18s ease;
}
@keyframes rvxPop {
  0% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rvx-stars button.on {
    animation: none;
  }
  .rvx-stars button:hover {
    transform: none;
  }
}
.rvx-rating-word {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-inline-start: 8px;
  min-width: 52px;
  text-align: center;
  transition: color var(--transition-fast);
}
.rvx-rating-word[data-level="5"] {
  color: #166a3c;
}
.rvx-rating-word[data-level="1"],
.rvx-rating-word[data-level="2"] {
  color: #b3261e;
}

/* --- textarea + counter --- */
.rvx-textarea-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}
.rvx-textarea-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}
.rvx-textarea-wrap textarea {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  resize: vertical;
  min-height: 104px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text);
}
.rvx-textarea-wrap textarea:focus {
  outline: none;
}
.rvx-textarea-wrap textarea.invalid {
  color: #8a5a00;
}
.rvx-textarea-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 13px 9px;
}
.rvx-hint {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.rvx-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.rvx-count.near {
  color: #8a5a00;
}
.rvx-count.over {
  color: #b3261e;
}

.rvx-field-error {
  color: #b3261e;
  font-size: 11px;
  font-weight: 700;
  margin-top: 5px;
  min-height: 14px;
}

.rvx-privacy {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border-radius: 10px;
  padding: 9px 12px;
}
.rvx-privacy svg {
  color: var(--success);
  flex-shrink: 0;
}

/* --- footer actions --- */
.rvx-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.rvx-submit {
  min-width: 150px;
}
.rvx-submit.success {
  background: var(--success);
  box-shadow: 0 8px 20px -8px rgba(30, 122, 70, 0.5);
}
.rvx-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: rvxSpin 0.7s linear infinite;
}
@keyframes rvxSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rvx-spinner {
    animation-duration: 1.6s;
  }
}

/* --- responsive + touch --- */
@media (max-width: 480px) {
  .rvx-head {
    padding: 13px 14px;
  }
  .rvx-body {
    padding: 14px;
  }
  .rvx-foot {
    padding: 11px 14px;
    flex-direction: column-reverse;
  }
  .rvx-foot .cp-btn {
    width: 100%;
    min-height: 44px;
  }
  .rvx-stars {
    padding: 6px 8px;
  }
  .rvx-stars button {
    width: 44px;
    height: 44px;
  } /* thumb-friendly */
  .rvx-rating-word {
    margin-inline-start: 4px;
  }
  .rvx-modal {
    max-height: 92vh;
  }
}

/* ================= Support FAQ ================= */

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: start;
}

.faq-a {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 2;
  padding: 0 4px 14px;
  display: none;
}

.faq-item.open .faq-a {
  display: block;
}
.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}
.faq-arrow {
  transition: transform var(--transition-fast);
}

/* ================= Modal form (review) ================= */

.cp-field {
  margin-bottom: 14px;
}

.cp-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cp-field textarea,
.cp-field input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13px;
  background: var(--white);
  resize: vertical;
}

.cp-field textarea:focus,
.cp-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.cp-field .cp-field-error {
  color: #b3261e;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  min-height: 14px;
}

/* ================= Print safety & a11y ================= */

@media (prefers-reduced-motion: reduce) {
  .skeleton-block {
    animation: none;
  }
}

/* ================= Account feature flags (Super Admin managed) ================= */

/* Disabled tab: stays visible, muted, clearly marked — never broken-looking. */
.cp-nav a.cp-nav-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cp-nav a.cp-nav-disabled:hover {
  background: transparent;
}

.cp-nav-off {
  margin-inline-start: auto;
  font-size: 9.5px;
  font-weight: 800;
  color: #8a6116;
  background: #f9efd9;
  border: 1px solid #e8d5a8;
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* Direct access to a hidden/disabled tab → the unavailable card */
.cp-unavailable {
  text-align: center;
  padding: 44px 20px;
}
.cp-unavailable .cu-icon {
  font-size: 42px;
  margin-bottom: 10px;
}
.cp-unavailable h2 {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 6px;
}
.cp-unavailable p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 4px;
}

/* ====================================================================
   Support page redesign — sfx-* (same design language as pfx-/odx-:
   SVG icon system, brand-gradient hero, no emojis)
   ==================================================================== */

/* ---------- hero ----------
   NOTE: the hero must NOT clip overflow — the search field overhangs its
   bottom edge by design (half outside the gradient). The decorative ring
   lives in its own clipped .sfx-hero-deco layer instead. */
.sfx-hero {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  padding: 24px 24px 0;
  margin-bottom: 18px;
  box-shadow: var(--shadow-primary);
  animation: sfxHeroIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sfxHeroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sfx-hero-deco {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.sfx-hero-ring {
  position: absolute;
  inset-inline-end: -46px;
  top: -46px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 26px solid rgba(255, 255, 255, 0.08);
}
.sfx-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sfx-hero-ico {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}
.sfx-hero-text {
  min-width: 0;
}
.sfx-hero-text h1 {
  font-size: 19px;
  font-weight: 900;
  color: var(--white);
  margin: 0;
}
.sfx-hero-text p {
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.9;
  margin: 5px 0 0;
  line-height: 1.9;
}

/* search — integrated into the hero bottom edge */
.sfx-search {
  position: relative;
  margin: 18px 0 0;
  transform: translateY(24px);
}
.sfx-search svg {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
.sfx-search input {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 46px 0 44px;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.4);
  outline: none;
}
.sfx-search input::placeholder {
  color: var(--text-secondary);
  font-weight: 600;
}
.sfx-search input:focus {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.28),
    0 14px 34px -14px rgba(0, 0, 0, 0.4);
}

/* ---------- quick cards ---------- */
.sfx-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.sfx-quick {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}
.sfx-quick:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-tint);
}
.sfx-quick:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.sfx-quick-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-tint);
  color: var(--primary);
  flex-shrink: 0;
}
.sfx-quick-body {
  min-width: 0;
}
.sfx-quick-body b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}
.sfx-quick-body span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.8;
}

/* ---------- FAQ accordion ---------- */
.sfx-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  margin-bottom: 14px;
}
.sfx-card h2 svg {
  color: var(--primary);
  flex-shrink: 0;
}
.sfx-faq {
  border-top: 1px solid var(--border);
}
.sfx-item {
  border-bottom: 1px solid var(--border);
}
.sfx-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 2px;
  background: none;
  border: none;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-align: start;
  color: var(--text-primary);
  cursor: pointer;
}
.sfx-q:hover {
  color: var(--primary);
}
.sfx-q:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.sfx-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}
.sfx-item.open .sfx-num {
  background: var(--primary);
  color: var(--white);
}
.sfx-q-text {
  flex: 1;
  min-width: 0;
}
.sfx-chev {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition:
    transform var(--transition-fast),
    color var(--transition-fast);
}
.sfx-item.open .sfx-chev {
  transform: rotate(180deg);
  color: var(--primary);
}
.sfx-a {
  display: none;
  padding: 0 2px 16px 39px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 2.1;
}
.sfx-item.open .sfx-a {
  display: block;
  animation: sfxOpen var(--transition-normal) ease;
}
@keyframes sfxOpen {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* search empty state — inside the same card, never a dead search */
.sfx-noresult {
  display: none;
  text-align: center;
  padding: 26px 12px 10px;
}
.sfx-noresult.visible {
  display: block;
}
.sfx-noresult-ico {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.sfx-noresult b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}
.sfx-noresult p {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin: 5px 0 0;
}
.sfx-noresult .cp-btn {
  margin-top: 12px;
}

/* ---------- contact rows ---------- */
.sfx-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}
.sfx-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}
.sfx-row-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  flex-shrink: 0;
}
.sfx-row-ico.brand {
  background: var(--primary-tint);
  color: var(--primary);
}
.sfx-row-ico.ok {
  background: rgba(46, 125, 50, 0.12);
  color: var(--success, #2e7d32);
}
.sfx-row-ico.off {
  background: rgba(158, 158, 158, 0.14);
  color: var(--text-secondary);
}
.sfx-row-ico.info {
  background: rgba(21, 101, 192, 0.1);
  color: var(--info, #1565c0);
}
.sfx-row-main {
  flex: 1;
  min-width: 0;
}
.sfx-row-title {
  font-size: 13.5px;
  font-weight: 800;
}
.sfx-row-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.8;
}
.sfx-row-sub span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sfx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.sfx-dot.pulse {
  animation: sfxPulse 1.6s ease-in-out infinite;
}
@keyframes sfxPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  .sfx-hero {
    padding: 20px 18px 0;
  }
  .sfx-hero-ico {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }
  .sfx-hero-ico svg {
    width: 22px;
    height: 22px;
  }
  .sfx-hero-text h1 {
    font-size: 16.5px;
  }
  .sfx-hero-text p {
    font-size: 11.5px;
  }
  .sfx-search {
    transform: translateY(22px);
    margin-top: 14px;
  }
  .sfx-search input {
    height: 46px;
    font-size: 13px;
  }
  .sfx-a {
    padding-left: 0;
    padding-inline-start: 37px;
  }
}
@media (max-width: 480px) {
  .sfx-cards {
    grid-template-columns: 1fr;
  }
  .sfx-row-ico {
    width: 38px;
    height: 38px;
  }
}
@media (max-width: 380px) {
  .sfx-hero-inner {
    gap: 11px;
  }
  .sfx-hero-ico {
    width: 42px;
    height: 42px;
  }
  .sfx-a {
    padding-inline-start: 2px;
  }
}

@media print {
  .sfx-hero,
  .sfx-cards,
  .sfx-search {
    display: none !important;
  }
}

/* Touch devices: leave room for the iOS zoom-on-focus (16px input) */
@supports (-webkit-touch-callout: none) {
  .sfx-search input {
    font-size: 16px;
  }
}

/* ====================================================================
   Support page — additional enhancements
   ==================================================================== */

/* Category badge in FAQ */
.sfx-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-tint);
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Search clear button */
.sfx-search {
  position: relative;
}
.sfx-search-clear {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}
.sfx-search-clear:hover {
  background: var(--primary-tint);
  color: var(--primary);
}
.sfx-search-clear:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Contact card (store status) */
.sfx-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  color: var(--white);
  margin-bottom: 16px;
  box-shadow: var(--shadow-primary);
}
.sfx-cc-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
}
.sfx-cc-ico.open {
  background: rgba(46, 204, 113, 0.2);
  color: #7cffb2;
}
.sfx-cc-ico.closed {
  background: rgba(255, 255, 255, 0.15);
  color: #ffd9d0;
}
.sfx-cc-body {
  flex: 1;
  min-width: 0;
}
.sfx-cc-title {
  font-size: 14.5px;
  font-weight: 800;
}
.sfx-cc-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 3px;
  opacity: 0.95;
}
.sfx-cc-detail {
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 3px;
}

/* Chat row (WhatsApp + Telegram) */
.sfx-chat-row {
  display: flex;
  gap: 10px;
  margin: 8px 2px 4px;
}
.sfx-chat-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    filter var(--transition-fast);
}
.sfx-chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px currentColor;
}
.sfx-chat-btn.whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(37, 211, 102, 0.5);
}
.sfx-chat-btn.telegram {
  background: #229ed9;
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(34, 158, 217, 0.5);
}
.sfx-chat-ico {
  flex-shrink: 0;
}

/* Focus visible for all interactive elements */
.sfx-q:focus-visible,
.sfx-quick:focus-visible,
.sfx-row a:focus-visible,
.sfx-chat-btn:focus-visible,
.sfx-contact-card a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sfx-item.open .sfx-a {
    animation: none;
  }
  .sfx-dot.pulse,
  .sfx-open-badge i {
    animation: none;
  }
  .sfx-quick,
  .sfx-chat-btn,
  .sfx-row,
  .sfx-contact-card {
    transition: none;
  }
}

/* Mobile refinements */
@media (max-width: 700px) {
  .sfx-chat-row {
    flex-direction: column;
  }
  .sfx-contact-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .sfx-cc-body {
    text-align: center;
  }
  .sfx-cc-sub {
    justify-content: center;
  }
}

/* ====================================================================
   Mobile bottom navigation + «بیشتر» sheet (account pages, ≤860px)
   Floating frosted-glass bar: حساب / سفارش‌ها / کیف پول + «بیشتر» →
   bottom sheet with the full menu, user card, loyalty strip and logout.
   Rendered by js/panel.js. Desktop (>860px) never sees any of it.
   ==================================================================== */

.cp-bottomnav,
.cbn-dot {
  display: none;
}

@media (min-width: 861px) {
  .cp-bottomnav,
  .cp-sheet,
  .cp-sheet-backdrop {
    display: none !important;
  }
}

@media (max-width: 860px) {
  /* ---- floating bar ---- */
  .cp-bottomnav {
    position: fixed;
    inset-inline: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow:
      0 14px 34px -14px rgba(33, 27, 24, 0.35),
      0 2px 10px -4px rgba(33, 27, 24, 0.12);
    /* padding: 10px 5px; */
    margin-bottom: 10px;
  }

  /* frosted glass where supported (solid surface is the fallback above) */
  @supports (
    (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
  ) {
    .cp-bottomnav {
      background: rgba(255, 255, 255, 0.84);
      -webkit-backdrop-filter: blur(16px) saturate(160%);
      backdrop-filter: blur(16px) saturate(160%);
      border-color: rgba(33, 27, 24, 0.08);
    }
  }

  .cp-bottomnav a,
  .cp-bottomnav .cbn-more {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 4px 4px;
    border: none;
    border-radius: 14px;
    background: none;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--transition-fast);
  }

  /* icon sits inside a pill — the active/«current» state fills it */
  .cp-bottomnav .cbn-ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 28px;
    border-radius: 99px;
    transition:
      background var(--transition-fast),
      color var(--transition-fast),
      transform var(--transition-fast);
  }

  .cp-bottomnav a.active,
  .cp-bottomnav .cbn-more.current {
    color: var(--primary);
  }

  .cp-bottomnav a.active .cbn-ico,
  .cp-bottomnav .cbn-more.current .cbn-ico {
    background: var(--primary-tint);
    color: var(--primary);
    animation: cbnPop 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* touch feedback */
  .cp-bottomnav a:active .cbn-ico,
  .cp-bottomnav .cbn-more:active .cbn-ico {
    transform: scale(0.86);
  }

  .cp-bottomnav a:focus-visible,
  .cp-bottomnav .cbn-more:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }

  .cp-bottomnav a.cp-nav-disabled {
    opacity: 0.5;
  }

  /* برچسب تب فعال هم کمی سنگین‌تر — سلسله‌مراتب واضح‌تر */
  .cp-bottomnav a.active .cbn-label {
    font-weight: 900;
  }

  /* unread-notifications dot on the «بیشتر» button — ringed so it reads
     over both the bar and the tinted pill; gently pulsing */
  .cbn-dot {
    display: block;
    position: absolute;
    top: -1px;
    inset-inline-end: calc(50% - 23px);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b3261e;
    box-shadow: 0 0 0 2.5px var(--surface);
    animation: cbnBlink 2s ease-in-out infinite;
  }
  .cbn-dot[hidden] {
    display: none;
  }
}

@keyframes cbnPop {
  0% {
    transform: scale(0.7);
  }
  60% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cbnBlink {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* ---------- bottom sheet («بیشتر») ---------- */

body.cp-sheet-open {
  overflow: hidden;
}

.cp-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(33, 27, 24, 0.48);
  opacity: 0;
  transition: opacity var(--transition-normal, 0.25s ease);
}

.cp-sheet-backdrop.open {
  opacity: 1;
}

.cp-sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 71;
  background: var(--background);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 48px -24px rgba(0, 0, 0, 0.4);
  max-height: min(82vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cp-sheet.open {
  transform: none;
}

/* drag handle */
.cp-sheet-grip {
  width: 42px;
  height: 4.5px;
  border-radius: 99px;
  background: var(--border);
  margin: 10px auto 2px;
}

.cp-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.cp-sheet-head .cp-avatar {
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.cp-sheet-user {
  flex: 1;
  min-width: 0;
}

.cp-sheet-close {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.cp-sheet-close:hover {
  background: var(--primary-tint);
  color: var(--primary);
}
.cp-sheet-close:active {
  transform: scale(0.9);
}

.cp-sheet-loyalty {
  margin-bottom: 12px;
  box-shadow: var(--shadow-primary);
}

.cp-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}

@media (min-width: 420px) {
  .cp-sheet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* white cards rising in with a light stagger — the sheet feels alive
   without a single heavyweight animation */
.cp-sheet-grid a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 80px;
  padding: 12px 6px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.cp-sheet.open .cp-sheet-grid a {
  animation: csgIn 0.34s ease backwards;
  animation-delay: calc(50ms + var(--i, 0) * 28ms);
}

@keyframes csgIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cp-sheet-grid a:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.cp-sheet-grid a:active {
  transform: scale(0.96);
}

.cp-sheet-grid a.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.cp-sheet-grid .csg-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--primary-tint);
  color: var(--primary);
  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.cp-sheet-grid a:hover .csg-ico {
  background: var(--primary);
  color: var(--white);
}

.cp-sheet-grid a.active .csg-ico {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}

.cp-sheet-grid a.cp-nav-disabled {
  opacity: 0.62;
}
.cp-sheet-grid a.cp-nav-disabled .csg-ico {
  opacity: 0.6;
}

/* tile is position:relative — the unread badge pins to its corner */
.cp-sheet-grid a .cp-nav-badge {
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  margin: 0;
}

/* [hidden] must beat display:grid — an empty badge pill would otherwise
   render as a stray red dot inside every sheet tile (same as .cp-nav). */
.cp-sheet-grid a .cp-nav-badge[hidden] {
  display: none;
}

.cp-sheet .cp-admin-entry {
  margin-bottom: 12px;
}

/* logout — a full-width soft danger pill, impossible to mistake */
.cp-sheet-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fceae9;
  color: #b3261e;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  padding: 13px;
  border-radius: var(--radius-md);
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.cp-sheet-logout:hover {
  background: #f8ddd9;
}
.cp-sheet-logout:active {
  transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
  .cp-sheet,
  .cp-sheet-backdrop {
    transition: none;
  }
  .cp-bottomnav a.active .cbn-ico,
  .cp-bottomnav .cbn-more.current .cbn-ico {
    animation: none;
  }
  .cp-sheet.open .cp-sheet-grid a {
    animation: none;
  }
  .cbn-dot {
    animation: none;
  }
}

/* 🔔 Enable order-status push (order tracking page) */
.odx-notify-btn {
  width: 100%;
  margin-bottom: 14px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--primary-tint);
  color: var(--primary);
  border: 1.5px dashed var(--primary-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  padding: 10px 14px;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}
.odx-notify-btn:hover {
  background: rgba(139, 0, 0, 0.12);
  border-style: solid;
}
.odx-notify-btn:active {
  transform: scale(0.985);
}

/* ================= Customer payments tab (responsive) ================= */

/* --- desktop table --- */
.pay-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pay-table th {
  text-align: start;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  padding: 9px 12px;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.pay-table td {
  padding: 12px;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.pay-table tbody tr {
  transition: background var(--transition-fast);
}
.pay-table tbody tr:hover {
  background: var(--surface-soft);
}
.pay-table tbody tr:last-child td {
  border-bottom: none;
}

.pay-table .pay-order {
  font-weight: 900;
  color: var(--primary);
}
.pay-table td b {
  font-weight: 900;
}
.pay-table .r-sub {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
}

.pay-method {
  display: inline-flex;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.pay-ref {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-tint);
  border: 1px dashed var(--primary-light);
  border-radius: 7px;
  padding: 3px 9px;
}

.pay-noref {
  color: var(--text-secondary);
  opacity: 0.7;
}

.pay-order-btn {
  padding: 5px 13px !important;
  font-size: 11.5px !important;
}

.pay-cards {
  display: none;
}

.pay-foot-note {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 12px;
  line-height: 1.9;
}

/* --- mobile: card list instead of the wide table --- */
@media (max-width: 700px) {
  .pay-scroll {
    display: none;
  }
  .pay-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .pc-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 13px 14px;
    box-shadow: var(--shadow-sm);
  }

  .pcr-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .pcr-order {
    font-size: 14px;
    font-weight: 900;
    color: var(--primary);
  }

  .pcr-amt {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
  }

  .pcr-price {
    font-size: 16.5px;
    font-weight: 900;
    color: var(--text);
  }
  .pcr-price small {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-secondary);
  }

  .pcr-ref {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .pcr-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
  }

  .pcr-date {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
  }
}

/* ---------- wallet top-up (hero button + modal — tpx-*) ---------- */
.loyalty-hero .lh-topup {
  display: flex;
  align-items: center;
}

.tpx-card {
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 0;
  background: var(--surface);
}

.tpx-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 20px;
  color: var(--white);
  background: linear-gradient(
    135deg,
    var(--primary-deep) 0%,
    var(--primary) 58%,
    var(--primary-light) 100%
  );
  overflow: hidden;
  flex-shrink: 0;
}

.tpx-glow {
  position: absolute;
  inset-inline-start: -60px;
  top: -80px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.tpx-head-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.tpx-head-txt {
  position: relative;
  min-width: 0;
  flex: 1;
}
.tpx-head-txt h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}
.tpx-head-txt > span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.7;
}

.tpx-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.tpx-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.tpx-body {
  padding: 18px 20px;
  overflow-y: auto;
  min-height: 0;
}

.tpx-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.tpx-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 6px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.tpx-chip strong {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--text);
}
.tpx-chip span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}
.tpx-chip:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.tpx-chip.active {
  border-color: var(--primary);
  background: var(--primary-tint);
}
.tpx-chip.active strong {
  color: var(--primary);
}
.tpx-chip.active span {
  color: var(--primary-light);
}

.tpx-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
}

.tpx-input {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
  overflow: hidden;
}
.tpx-input:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3.5px var(--primary-tint);
}
.tpx-input.has-error {
  border-color: #b3261e;
  box-shadow: 0 0 0 3.5px rgba(179, 38, 30, 0.1);
}
.tpx-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
}
.tpx-input input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 600;
  font-size: 13px;
}
.tpx-unit {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-secondary);
  border-inline-start: 1px dashed var(--border);
}

.tpx-hint {
  display: block;
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.tpx-error {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(179, 38, 30, 0.08);
  color: #b3261e;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.8;
}
.tpx-error[hidden] {
  display: none;
}

.tpx-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--success-bg);
  border: 1px dashed rgba(30, 122, 70, 0.35);
}
.tpx-preview[hidden] {
  display: none;
}
.tpx-preview span {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
}
.tpx-preview strong {
  font-size: 14px;
  font-weight: 900;
  color: var(--success);
}

.tpx-note {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  padding-top: 13px;
  border-top: 1px dashed var(--border);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.9;
}
.tpx-note span {
  flex-shrink: 0;
}

.tpx-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.tpx-foot .cp-btn {
  min-height: 44px;
  min-width: 120px;
  border-radius: 12px;
}
.tpx-foot .cp-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.tpx-foot .cp-btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

@media (max-width: 480px) {
  .tpx-head {
    padding: 15px 16px;
  }
  .tpx-body {
    padding: 15px 16px;
  }
  .tpx-foot {
    flex-direction: column-reverse;
    padding: 12px 16px;
  }
  .tpx-foot .cp-btn {
    width: 100%;
  }
  .tpx-presets {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   Support — UX polish: بج باز/بسته، گرید موبایل، شمارش، FAQ نرم
   ============================================================ */

/* بج زنده‌ی باز/بسته در هیرو */
.sfx-open-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 13px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}
.sfx-open-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: sf-pulse 1.6s ease infinite;
}
.sfx-open-badge.is-open {
  background: rgba(46, 204, 113, 0.16);
  border: 1px solid rgba(46, 204, 113, 0.5);
  color: #8cf5be;
}
.sfx-open-badge.is-open i {
  background: #2ecc71;
}
.sfx-open-badge.is-closed {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffd9d0;
}
.sfx-open-badge.is-closed i {
  background: #ff8f7a;
}

/* شمارنده‌ی نتایج جستجو */
.sfx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sfx-count {
  font-size: 10.5px;
  font-weight: 900;
  color: var(--primary);
  background: var(--primary-tint);
  border-radius: 999px;
  padding: 3px 11px;
}
.sfx-count[hidden] {
  display: none;
}

/* فلش کارت‌های دسترسی سریع */
.sfx-quick {
  align-items: center;
}
.sfx-quick-arrow {
  flex-shrink: 0;
  margin-inline-start: auto;
  color: var(--primary);
  opacity: 0;
  transform: translateX(5px);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}
.sfx-quick:hover .sfx-quick-arrow,
.sfx-quick:focus-visible .sfx-quick-arrow {
  opacity: 1;
  transform: none;
}
.sfx-quick:focus-visible {
  outline: 3px solid var(--primary-tint);
  outline-offset: 2px;
}

/* بازشدن نرم‌تر پاسخ FAQ — fade + slide کمی عمیق‌تر */
.sfx-item.open .sfx-a {
  animation: sfxOpen 0.28s cubic-bezier(0.32, 0.72, 0.24, 1);
}

/* موبایل: کارت‌های دسترسی سریع ۲ ستونه و فشرده */
@media (max-width: 640px) {
  .sfx-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .sfx-quick {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding: 13px 13px 12px;
  }
  .sfx-quick-body b {
    font-size: 12.5px;
  }
  .sfx-quick-body span {
    font-size: 10.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sfx-quick-arrow {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    opacity: 0.45;
    transform: none;
  }
  .sfx-quick {
    position: relative;
  }

  .sfx-hero-text h1 {
    font-size: 17px;
  }
  .sfx-hero-text p {
    font-size: 11.5px;
  }
  .sfx-search {
    margin-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sfx-open-badge i,
  .sfx-quick,
  .sfx-quick-arrow,
  .sfx-a {
    animation: none;
    transition: none;
  }
}

/* بج بالای سرچ — فضای نفس خودش را دارد */
.sfx-open-badge {
  margin: 0 0 4px;
}
