@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0F1720;
  --surface: #17212C;
  --surface-2: #1E2A38;
  --line: #2A3746;
  --brass: #C9975A;
  --brass-2: #E3B87C;
  --jade: #3FA88C;
  --jade-2: #57C4A6;
  --danger: #D97164;
  --text: #EDEAE3;
  --text-muted: #93A1AF;
  --pt-bottom: 0px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
}

body {
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(201,151,90,0.10), transparent 60%),
    radial-gradient(120% 60% at 0% 0%, rgba(63,168,140,0.08), transparent 55%),
    var(--bg);
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.topbar .brand {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.topbar .brand span { color: var(--brass); }

.balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--jade-2);
  font-weight: 600;
}

/* ---------- Main content ---------- */
main {
  flex: 1;
  overflow-y: auto;
  padding: 4px 18px 110px;
}

h1.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 16px;
}

.section-label {
  font-size: 13px;
  color: var(--text-muted);
  margin: 22px 0 10px;
  font-weight: 500;
}

/* ---------- Wallet hero card (metaphor: a physical card) ---------- */
.wallet-card {
  border-radius: 20px;
  padding: 22px;
  /* کادر طلایی ثابت (بدون انیمیشن) */
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, #1B2A2A 0%, #14252A 55%, #101C22 100%) padding-box,
    linear-gradient(135deg, #F3D9A8 0%, #C9975A 35%, rgba(227, 184, 124, .45) 60%, #E3B87C 100%) border-box;
  box-shadow: inset 0 0 0 2px rgba(15, 23, 32, .85), 0 4px 14px rgba(0, 0, 0, .4), 0 0 14px rgba(227, 184, 124, .18);
  position: relative;
  overflow: hidden;
  margin-top: 6px;
}

.wallet-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 26px);
  pointer-events: none;
}

.wallet-card .label {
  font-size: 13px;
  color: var(--jade-2);
  font-weight: 600;
}

.wallet-card .amount {
  font-size: 32px;
  font-weight: 800;
  margin-top: 6px;
  letter-spacing: -0.5px;
}

.wallet-card .amount small {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.wallet-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--brass); color: #1B140B; }
.btn-jade { background: var(--jade); color: #0B1C17; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-danger { background: rgba(217,113,100,0.15); color: var(--danger); border: 1px solid rgba(217,113,100,0.3); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }

/* ---------- Product / list cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 12px;
}

.product-card { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.product-card .name { font-weight: 700; font-size: 15px; }
.product-card .serial-type { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-top: 6px; }
.product-card .desc { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
/* قیمت محصول: کادر نورانی که دور قیمت می‌چرخد */
@property --pt-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes ptPriceSpin { to { --pt-angle: 360deg; } }
.product-card .price {
  color: var(--brass-2); font-weight: 700; font-size: 13.5px; margin-top: 8px;
  display: inline-block;
  padding: 5px 12px;
  border: 2px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--pt-angle),
      rgba(227, 184, 124, .18) 0%,
      rgba(227, 184, 124, .18) 55%,
      rgba(227, 184, 124, .75) 88%,
      rgba(243, 217, 168, .9) 100%) border-box;
  animation: ptPriceSpin 14s linear infinite;
}
.stock-tag { font-size: 11px; color: var(--text-muted); }
.stock-tag.low { color: var(--danger); }

.row-between { display: flex; justify-content: space-between; align-items: center; }

.tx-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tx-row:last-child { border-bottom: none; }
.tx-amount.pos { color: var(--jade-2); font-weight: 700; }
.tx-amount.neg { color: var(--danger); font-weight: 700; }
.tx-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }

/* ---------- Forms ---------- */
label { font-size: 13px; color: var(--text-muted); display: block; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }

/* ---------- Bottom nav ---------- */
nav.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; right: auto;
  transform: translate3d(-50%, 0, 0);
  width: 100%; max-width: 460px;
  z-index: 50;
  display: flex;
  background: #17212C;
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + max(env(safe-area-inset-bottom, 0px), var(--pt-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px)));
}

nav.bottom-nav button {
  flex: 1;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  min-width: 0;
  text-align: center;
  line-height: 1.3;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  cursor: pointer;
}
nav.bottom-nav button .ic {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; box-shadow: none; border-radius: 0;
}
nav.bottom-nav button .ic svg { display: block; }
nav.bottom-nav button.active { color: var(--brass-2); font-weight: 700; }
nav.bottom-nav button.active .ic svg { animation: navPop .28s ease-out; }
nav.bottom-nav { --nav-cut: #17212C; }
html[data-theme="light"] nav.bottom-nav { --nav-cut: #fff; }
nav.bottom-nav .ic svg .cut { stroke: var(--nav-cut); fill: none; }
nav.bottom-nav .ic svg .cutf { fill: var(--nav-cut); stroke: none; }
@keyframes navPop { 0% { transform: scale(.82); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* ---------- Admin ---------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.admin-tabs button {
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.admin-tabs button.active { background: var(--brass); color: #1B140B; border-color: var(--brass); font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat-box .n { font-size: 22px; font-weight: 800; color: var(--brass-2); }
.stat-box .l { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-box.clickable { cursor: pointer; }
.stat-box.clickable:active { opacity: 0.8; }

.badge { font-size: 10.5px; padding: 3px 8px; border-radius: 999px; font-weight: 700; }
.badge.pending { background: rgba(201,151,90,0.15); color: var(--brass-2); }
.badge.approved { background: rgba(63,168,140,0.18); color: var(--jade-2); }
.badge.rejected { background: rgba(217,113,100,0.15); color: var(--danger); }

/* ---------- Chat (support) ---------- */
.chat-scroll { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; }
.bubble.user { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.bubble.admin { align-self: flex-end; background: rgba(201,151,90,0.16); border: 1px solid rgba(201,151,90,0.3); }
.chat-input-row { display: flex; gap: 8px; position: sticky; bottom: 0; padding-top: 10px; background: var(--bg); }

/* ---------- پشتیبانی سریع آنلاین (چت زنده با ادمین) ---------- */
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.qs-title { font-weight: 700; font-size: 15px; }
.qs-sub { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.qs-scroll { overflow-y: auto; max-height: calc(100dvh - 300px); min-height: 220px; padding: 4px 2px 10px; scroll-behavior: smooth; }
.bubble { overflow-wrap: anywhere; }
.bubble.system { align-self: center; max-width: 92%; text-align: center; background: transparent; border: 1px dashed var(--line); color: var(--text-muted); font-size: 12px; white-space: pre-line; }
.bubble .qs-name { font-size: 11.5px; font-weight: 700; color: var(--brass-2, var(--brass)); margin-bottom: 3px; }
.bubble .qs-text { white-space: pre-wrap; }
.bubble .qs-time { font-size: 10.5px; color: var(--text-muted); margin-top: 4px; text-align: left; direction: ltr; }
.bubble .qs-media { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-bottom: 6px; cursor: zoom-in; }
.bubble video.qs-media { cursor: default; }
.bubble .qs-file { display: inline-block; margin: 2px 0 4px; color: var(--brass); font-size: 12.5px; word-break: break-all; }
.bubble .qs-serial { font-family: ui-monospace, Menlo, Consolas, monospace; direction: ltr; text-align: left; white-space: pre-wrap; user-select: all; background: rgba(0,0,0,0.18); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.qs-notice { text-align: center; color: var(--text-muted); font-size: 12.5px; line-height: 1.8; padding: 8px 6px; }
.qs-input .btn { flex: 0 0 auto; }
.qs-input input[type="text"], .qs-input input#qs-input { flex: 1 1 auto; min-width: 0; }
.qs-chip { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; margin-top: 6px; }
.qs-chip span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: right; }
.qs-chip button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 13.5px; }
.toast {
  position: fixed;
  bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px; font-size: 13px;
  z-index: 50; max-width: 90%; text-align: center;
}
.center-screen { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.auth-logo { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth-logo span { color: var(--brass); }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 26px; }
.link-btn { background: none; border: none; color: var(--jade-2); font-family: inherit; font-size: 13px; cursor: pointer; }

/* ---------- دکمه‌ی ریز «اطلاع بده» زیر دکمه‌ی ناموجود ---------- */
.btn-link-notify {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 11px;
  color: var(--brass-2, #c9975a);
  cursor: pointer;
  text-align: center;
}
.btn-link-notify:hover { text-decoration: underline; }
.btn-link-notify:disabled { opacity: 0.6; cursor: default; text-decoration: none; }

/* ---------- Promo marquee banner (فروشگاه) ---------- */
.promo-marquee {
  display: flex;
  align-items: stretch;
  margin: 4px 0 16px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(201,151,90,0.22), rgba(227,184,124,0.12) 60%, rgba(63,168,140,0.14));
  border: 1px solid rgba(201,151,90,0.45);
  box-shadow: 0 0 0 0 rgba(201,151,90,0.5);
  animation: promo-glow 2.4s ease-in-out infinite;
}

.promo-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--brass);
  color: #1B140B;
  font-weight: 800;
  font-size: 12.5px;
  white-space: nowrap;
  z-index: 2;
}

.promo-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  direction: ltr; /* جهت حرکت ثابت: از چپ وارد، از راست خارج */
  padding: 9px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}

.promo-track {
  display: flex;
  width: max-content;
  animation: promo-scroll var(--promo-dur, 20s) linear infinite;
  will-change: transform;
}

.promo-group { display: flex; flex-shrink: 0; align-items: center; }

.promo-item {
  direction: rtl;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brass-2);
  padding: 0 14px;
}

.promo-sep { color: var(--jade-2); font-size: 11px; opacity: 0.9; }

.promo-marquee:hover .promo-track,
.promo-marquee:active .promo-track { animation-play-state: paused; }

@keyframes promo-scroll {
  /* حرکت از چپ به راست: از چپ وارد می‌شود و از راست خارج می‌شود */
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@keyframes promo-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,151,90,0.45); }
  50%      { box-shadow: 0 0 14px 2px rgba(201,151,90,0.28); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-track { animation: none; }
  .promo-viewport { overflow-x: auto; }
  .promo-marquee { animation: none; }
}


/* چشمک‌زدنِ کاملِ متن مهلت فعال‌سازی (تا وقتی مهلت تموم نشده) */
@keyframes ptBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}
.blink-warn { animation: ptBlink 1.1s ease-in-out infinite; }


/* کادر هشدار «احراز هویت نشده» بالای فروشگاه: کل کادر چشمک می‌زنه تا کاربر حتماً متوجه بشه */
@keyframes verifyBlink {
  0%, 100% {
    border-color: rgba(239,68,68,.35);
    background-color: rgba(239,68,68,.04);
    box-shadow: 0 0 0 0 rgba(239,68,68,0);
  }
  50% {
    border-color: #ef4444;
    background-color: rgba(239,68,68,.18);
    box-shadow: 0 0 16px 3px rgba(239,68,68,.55);
  }
}
.verify-blink {
  border: 2px solid #ef4444;
  animation: verifyBlink 1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .verify-blink { animation: none; background-color: rgba(239,68,68,.12); }
}

/* ---------- انتخاب نوع سریال در صفحه‌ی خرید | قیمت ---------- */
.serial-chooser { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.serial-choice-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 150px; padding: 16px 10px; border-radius: 16px; cursor: pointer;
  font-family: inherit; text-align: center; color: var(--text);
  /* همان کادر نورانیِ چرخانِ دور قیمت */
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--pt-angle),
      rgba(227, 184, 124, .18) 0%,
      rgba(227, 184, 124, .18) 55%,
      rgba(227, 184, 124, .75) 88%,
      rgba(243, 217, 168, .9) 100%) border-box;
  animation: ptPriceSpin 14s linear infinite;
  transition: transform .15s;
}
.serial-choice-card:active { transform: scale(0.96); }
.serial-choice-card .sc-ic { font-size: 34px; }
.serial-choice-card .sc-title { font-weight: 700; font-size: 14px; line-height: 1.6; }
.serial-choice-card .sc-count { font-size: 12px; color: var(--jade-2); }
@media (max-width: 340px) { .serial-chooser { grid-template-columns: 1fr; } }

@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(60px); }  to { opacity: 1; transform: translateX(0); } }
.slide-in-left  { animation: slideInLeft .45s ease-out both; }
.slide-in-right { animation: slideInRight .45s ease-out both; }

.btn-first-deposit.is-locked { opacity: .5; filter: grayscale(.6); }

/* ---------- بنر تکمیل فرایند (سریال کددار) ---------- */
.imei-notice { background: #fff; border-radius: var(--radius); padding: 22px 16px 18px; margin-bottom: 12px; text-align: center; color: #444; }
.imei-notice-ic { width: 84px; height: 84px; display: block; margin: 0 auto 12px; }
.imei-notice-title { font-size: 20px; font-weight: 800; color: #444; margin-bottom: 14px; }
.imei-notice-text { font-size: 13px; color: #555; line-height: 1.9; text-align: right; }
.imei-notice-warn { padding-top: 26px; padding-bottom: 22px; }
.imei-notice-warn .imei-notice-ic { margin-bottom: 26px; }
.imei-notice-warn .imei-notice-text { text-align: center; font-size: 14px; }
.imei-notice-hl { color: #e8923a; }
.imei-notice-dialog { border: 1px solid #eee; margin-bottom: 10px; }

/* کارت‌های انتخاب نوع سریال: زیر هم تا بنرها هم‌اندازه‌ی اصلی بمانند */
.serial-chooser { grid-template-columns: 1fr !important; }
.serial-choice-card { min-height: 0; }
.serial-choice-card .imei-notice-choice { width: 100%; margin-bottom: 0; }
.serial-choice-card .imei-notice-choice .imei-notice-text { text-align: center; }

/* قاب طلایی ثابت (همانند کادر کیف پول) */
.card.gold-frame {
  border-radius: 20px;
  padding: 22px;
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, #1B2A2A 0%, #14252A 55%, #101C22 100%) padding-box,
    linear-gradient(135deg, #F3D9A8 0%, #C9975A 35%, rgba(227, 184, 124, .45) 60%, #E3B87C 100%) border-box;
  box-shadow: inset 0 0 0 2px rgba(15, 23, 32, .85), 0 4px 14px rgba(0, 0, 0, .4), 0 0 14px rgba(227, 184, 124, .18);
}

/* ---------- نشانگر «در انتظار تایید ادمین» بالای کیف پول ---------- */
.deposit-waiting {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin: 6px 0 12px;
  border-radius: 16px;
  background: rgba(227, 184, 124, .08);
  border: 1px solid rgba(227, 184, 124, .35);
}
.dw-spinner { position: relative; width: 46px; height: 46px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.dw-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(227, 184, 124, .22);
  border-top-color: var(--brass-2);
  animation: dwSpin 1.1s linear infinite;
}
.dw-ic { font-size: 20px; }
.dw-title { font-weight: 700; font-size: 14px; color: var(--brass-2); }
.dw-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.7; }
@keyframes dwSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dw-ring { animation-duration: 3s; } }

/* نوار ثابت وضعیت‌های در انتظار تایید (بالای همه‌ی صفحات) */
/* کادر اطلاعیه: بالاترین بخش، بالای «سریال وان» و موجودی، ثابت */
#promo-global { position: sticky; top: 0; z-index: 61; padding: 0 18px; background: var(--bg); }
#promo-global .promo-marquee { margin: 6px 0; }
/* نوار «در انتظار تایید»: ثابت و چسبیده‌ی زیر کادر اطلاعیه */
#status-bar { position: sticky; top: calc(var(--promo-h, 0px) + var(--topbar-h, 0px)); z-index: 59; padding: 0 18px; background: var(--bg); }
/* هدر (سریال وان + موجودی + حساب کاربری) ثابت، زیر کادر اطلاعیه */
.topbar { position: sticky; top: 0; z-index: 60; background: var(--bg); padding: 10px 18px 8px; gap: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-actions .btn-sm { white-space: nowrap; padding: 6px 10px; font-size: 12px; }
.topbar-actions .balance-chip { white-space: nowrap; padding: 6px 10px; font-size: 12px; }
#status-bar .deposit-waiting { margin: 6px 0; }
#status-bar .deposit-waiting { padding: 8px 12px; gap: 12px; background: linear-gradient(rgba(227, 184, 124, .10), rgba(227, 184, 124, .10)), var(--surface); }
#status-bar .dw-spinner { width: 38px; height: 38px; }
#status-bar .dw-ic { font-size: 16px; }

/* ---------- جشن شارژ موفق ---------- */
#charged-celebrate { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(8, 12, 18, .72); overflow: hidden; animation: ccFade .3s ease-out both; }
.cc-confetti { position: absolute; inset: 0; pointer-events: none; }
.cc-confetti i { position: absolute; top: -20px; border-radius: 2px; opacity: .95; animation-name: ccFall; animation-timing-function: linear; animation-iteration-count: 1; animation-fill-mode: both; }
@keyframes ccFall { to { top: 105%; transform: translateX(30px) rotate(540deg); } }
@keyframes ccFade { from { opacity: 0; } to { opacity: 1; } }
.cc-sticker { position: relative; text-align: center; padding: 22px 26px; border-radius: 22px; background: linear-gradient(135deg, #1B2A2A, #101C22); border: 2px solid #C9975A; box-shadow: 0 0 30px rgba(227, 184, 124, .35); animation: ccPop .6s cubic-bezier(.2, 1.4, .4, 1) both; max-width: 86%; }
@keyframes ccPop { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.cc-badge { position: relative; width: 110px; height: 110px; margin: 0 auto 10px; }
.cc-badge svg { width: 100%; height: 100%; }
.cc-badge path { stroke-dasharray: 90; stroke-dashoffset: 90; animation: ccDraw .6s .4s ease-out forwards; }
@keyframes ccDraw { to { stroke-dashoffset: 0; } }
.cc-spark { position: absolute; font-size: 22px; animation: ccTwinkle 1.2s ease-in-out infinite; }
.cc-s1 { top: -6px; right: -8px; } .cc-s2 { bottom: 4px; left: -10px; animation-delay: .4s; } .cc-s3 { top: 6px; left: -6px; animation-delay: .8s; font-size: 18px; }
@keyframes ccTwinkle { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.2); opacity: 1; } }
.cc-title { font-weight: 800; font-size: 19px; color: var(--brass-2); }
.cc-amount { margin-top: 8px; font-weight: 800; font-size: 22px; color: var(--jade-2); }

/* ---------- فلش‌های قبلی/بعدی پایین لیست محصولات ---------- */
.serial-bottom-nav { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 6px; }
.serial-arrow {
  flex: 1; padding: 11px 10px; border-radius: 12px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--brass-2);
  background: var(--surface); border: 1px solid rgba(227, 184, 124, .4);
}
.serial-arrow:active { transform: scale(0.97); }
.cc-amount.cc-sub { font-size: 14px; font-weight: 600; }

/* اندازه‌ی کادر اطلاعیه ثابت است؛ تعداد/طول کلمات روی ارتفاع و عرض آن اثری ندارد */
#promo-global { overflow: hidden; contain: layout paint; max-width: 100%; }
.promo-marquee { height: 40px; max-width: 100%; contain: layout paint; }
.promo-badge { max-width: 38%; overflow: hidden; text-overflow: ellipsis; }
.promo-viewport { padding: 0; display: flex; align-items: center; }
.promo-track { flex-shrink: 0; height: 100%; align-items: center; }
.promo-item { line-height: 1.2; white-space: nowrap; }

/* چیدمان هدر: مبلغ (چپ) | سریال وان (وسط) | حساب کاربری (راست)؛ زیرش اطلاعیه؛ همه ثابت */
.topbar.topbar-user {
  position: sticky; top: 0; z-index: 62;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  direction: ltr; gap: 6px; padding: 10px 14px 8px;
}
.topbar-user .brand { justify-self: center; direction: rtl; font-size: 19px; }
.topbar-user .balance-chip { justify-self: start; direction: rtl; max-width: 100%; padding: 6px 9px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.topbar-user #btn-my-account { justify-self: end; direction: rtl; max-width: 100%; padding: 6px 9px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#promo-global { top: var(--topbar-h, 0px); z-index: 61; }
#status-bar { z-index: 60; }

/* ---------- دکمه‌ی ماه/خورشید ---------- */
.topbar-user .topbar-right { justify-self: end; display: flex; align-items: center; gap: 6px; direction: rtl; min-width: 0; }
.theme-toggle {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: none; border: none; box-shadow: none;
}
.theme-toggle svg { display: block; }
.theme-toggle:active { transform: scale(0.94); }

/* ---------- حالت روز ---------- */
html[data-theme="light"] {
  --bg: #F4F1EA; --surface: #FFFFFF; --surface-2: #F0ECE3; --line: #E0D9CA;
  --brass: #B07B2F; --brass-2: #9A6A22; --jade: #1F8A6F; --jade-2: #17725C;
  --danger: #C0453A; --text: #1F2933; --text-muted: #5F6C7B;
}
html[data-theme="light"] nav.bottom-nav { background: #fff; }
html[data-theme="light"] .wallet-card,
html[data-theme="light"] .card.gold-frame {
  background:
    linear-gradient(135deg, #FFFDF7 0%, #F8F1E2 55%, #F1E8D2 100%) padding-box,
    linear-gradient(135deg, #E9C98F 0%, #B07B2F 35%, rgba(201, 151, 90, .5) 60%, #D6A862 100%) border-box;
  box-shadow: inset 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, .1), 0 0 12px rgba(176, 123, 47, .18);
}
html[data-theme="light"] .wallet-card::after { background-image: none; }
html[data-theme="light"] .btn-primary { color: #fff; }
html[data-theme="light"] .btn-jade { color: #fff; }
html[data-theme="light"] .promo-marquee,
html[data-theme="light"] #promo-global .promo-marquee { box-shadow: none; }
html[data-theme="light"] .deposit-waiting { background: linear-gradient(rgba(176, 123, 47, .10), rgba(176, 123, 47, .10)), var(--surface); }
html[data-theme="light"] #status-bar .deposit-waiting { background: linear-gradient(rgba(176, 123, 47, .10), rgba(176, 123, 47, .10)), var(--surface); }
html[data-theme="light"] .imei-notice { box-shadow: 0 1px 6px rgba(0, 0, 0, .08); }
/* ---------- بنر «ادمین آنلاین شد» (بالای صفحه، در همه‌ی بخش‌ها) ---------- */
.admin-online-banner {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%;
  transform: translateX(-50%); z-index: 9999;
  width: calc(100% - 24px); max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--jade-2, #57C4A6);
  border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.7;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  animation: aobIn .35s ease-out;
}
.admin-online-banner .aob-ico { font-size: 20px; animation: aobRing 1s ease-in-out 3; }
.admin-online-banner .aob-text { flex: 1 1 auto; min-width: 0; }
.admin-online-banner .aob-go { background: var(--jade-2, #57C4A6); color: #0F1720; border: none; border-radius: 8px; padding: 5px 10px; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.admin-online-banner .aob-x { background: none; border: none; color: var(--text-muted); font-size: 15px; cursor: pointer; }
@keyframes aobIn { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes aobRing { 0%,100% { transform: rotate(0); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-18deg); } }

/* ---------- حالت چت: صفحه‌ی ثابت، فقط لیست پیام‌ها اسکرول میشه؛ کادر تایپ همیشه پایین ---------- */
body.qs-chat-open { overflow: hidden; }
body.qs-chat-open #app {
  height: var(--vvh, 100dvh); min-height: 0; overflow: hidden;
  position: relative; top: var(--vvt, 0px);
}
body.qs-chat-open main { display: flex; flex-direction: column; overflow: hidden; min-height: 0; padding-bottom: 0; }
/* چت تمام‌صفحه: نوار بالا، درخواست شارژ در حال بررسی و بنر تبلیغ در پشتیبانی آنلاین نمایش داده نمی‌شوند */
body.qs-chat-open #status-bar,
body.qs-chat-open #promo-global { display: none !important; }
body.qs-chat-open main { padding-top: 8px; }   /* نوار بالا (موجودی + روز/شب + زنگوله) در پشتیبانی هم نمایش داده می‌شود */
body.qs-chat-open .topbar { flex: 0 0 auto; }
.qs-empty-hint { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px 12px; }
body.qs-chat-open #qs-chat { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
body.qs-chat-open .qs-scroll { flex: 1 1 auto; max-height: none; min-height: 0; scroll-behavior: auto; overscroll-behavior: contain; }
body.qs-chat-open .qs-input { position: static; padding: 8px 0 6px; flex: 0 0 auto; }
body.qs-chat-open nav.bottom-nav { position: static; transform: none; left: auto; width: auto; max-width: none; flex: 0 0 auto; }
/* نوار آیکن‌های پایین در حالت چت هم دقیقاً هم‌اندازه‌ی حالت عادی می‌ماند (بدون فشرده‌شدن و حذف نوشته) */
body.qs-chat-open #qs-input { font-size: 16px; } /* جلوگیری از زوم خودکار iOS هنگام فوکوس */

/* ---------- کادر تایپ چت (سبک شیشه‌ای تلگرام): گیره | کادر گرد | میکروفن ⇄ ارسال ---------- */
@keyframes qsPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.qs-back { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
body.qs-chat-open .qs-input.qs-glass {
  direction: ltr; align-items: center; gap: 8px; padding: 8px 2px 8px;
}
.qs-circle {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 4px 14px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .12s ease, opacity .15s ease;
}
.qs-circle:active { transform: scale(.92); }
.qs-circle:disabled { opacity: .45; cursor: default; }
.qs-circle.sending svg { animation: qsPulse .8s ease-in-out infinite; }
.qs-pill {
  flex: 1 1 auto; min-width: 0; min-height: 46px; display: flex; align-items: center;
  padding: 0 18px; border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
  box-shadow: 0 4px 14px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.28);
}
.qs-pill input#qs-input {
  flex: 1 1 auto; width: 100%; min-width: 0; padding: 10px 0; margin: 0;
  background: transparent; border: none; border-radius: 0; box-shadow: none; outline: none;
  color: var(--text); font-family: inherit;
}
.qs-pill input#qs-input:focus { outline: none; }
.qs-pill input#qs-input::placeholder { color: var(--text-muted); }
/* میکروفن ⇄ ارسال */
.qs-glass .qs-send {
  display: none; border: none; color: #fff;
  background: linear-gradient(135deg, #3FA88C, #57C4A6);
  box-shadow: 0 4px 14px rgba(63,168,140,.5), inset 0 1px 0 rgba(255,255,255,.35);
}
.qs-glass.has-text .qs-send { display: flex; animation: qsPop .18s ease-out; }
.qs-glass.has-text .qs-mic { display: none; }
@keyframes qsPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* حالت ضبط ویس */
.qs-rec { display: none; flex: 1 1 auto; align-items: center; gap: 10px; direction: ltr; }
.qs-glass.recording .qs-rec { display: flex; }
.qs-glass.recording .qs-pill input#qs-input { display: none; }
.qs-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; animation: qsPulse 1s ease-in-out infinite; }
.qs-rec-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.qs-rec-cancel { margin-inline-start: auto; background: none; border: none; color: var(--danger); font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 4px; }
html[data-theme="light"] .qs-circle,
html[data-theme="light"] .qs-pill {
  background: rgba(255,255,255,.72); border-color: rgba(0,0,0,.08);
  box-shadow: 0 4px 14px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.9);
}
html[data-theme="light"] .qs-glass .qs-send { background: linear-gradient(135deg, #1F8A6F, #3FA88C); border: none; }
/* نوار اینترنت متصل نیست */
#offline-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px; background: var(--danger); color: #fff; text-align: center; font-size: 13px; font-weight: 700; }

/* ---------- کارت محصول: دکمه‌ی شیشه‌ای زیر کادر ---------- */
.product-card.is-in {
  background: linear-gradient(160deg, rgba(63,168,140,.14), var(--surface) 60%);
  border-color: rgba(87,196,166,.45);
}
.product-card.is-out {
  background: linear-gradient(160deg, rgba(217,113,100,.16), var(--surface) 60%);
  border-color: rgba(217,113,100,.5);
}
.glass-btn {
  position: relative; overflow: hidden;
  width: 100%; padding: 12px 16px;
  font-family: inherit; font-weight: 800; font-size: 14px;
  color: var(--text); cursor: pointer;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 6px 18px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(0,0,0,.08);
  transition: transform .12s ease, box-shadow .2s ease;
}
.glass-btn::before {
  content: ""; position: absolute; inset: 0 0 55% 0;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
  pointer-events: none;
}
.glass-btn:active { transform: scale(.97); }
.glass-btn:disabled { opacity: .65; cursor: default; }
.glass-buy {
  background: linear-gradient(135deg, rgba(63,168,140,.55), rgba(87,196,166,.28));
  border-color: rgba(87,196,166,.6);
  box-shadow: 0 6px 20px rgba(63,168,140,.3), inset 0 1px 0 rgba(255,255,255,.4), inset 0 -8px 14px rgba(0,0,0,.08);
}
.glass-notify {
  background: linear-gradient(135deg, rgba(217,113,100,.5), rgba(227,184,124,.25));
  border-color: rgba(217,113,100,.6);
  box-shadow: 0 6px 20px rgba(217,113,100,.28), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -8px 14px rgba(0,0,0,.08);
  font-size: 13px;
}
html[data-theme="light"] .product-card.is-in { background: linear-gradient(160deg, #E8F6F1, #fff 65%); border-color: rgba(31,138,111,.45); }
html[data-theme="light"] .product-card.is-out { background: linear-gradient(160deg, #FBE9E6, #fff 65%); border-color: rgba(192,69,58,.45); }
html[data-theme="light"] .glass-btn { color: #0f2a22; }
html[data-theme="light"] .glass-notify { color: #5a1a12; }


/* ---------- پخش‌کننده‌ی ویس شبیه تلگرام ---------- */
.qs-voice { display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 280px; padding: 2px 0 4px; direction: ltr; }
.qs-v-play {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #3FA88C, #57C4A6); box-shadow: 0 2px 8px rgba(63,168,140,.45);
  transition: transform .12s ease;
}
.qs-v-play:active { transform: scale(.92); }
.qs-v-play:disabled { opacity: .6; }
.qs-v-main { flex: 1 1 auto; min-width: 0; }
.qs-v-wave { display: flex; align-items: center; gap: 2px; height: 28px; cursor: pointer; }
.qs-v-wave i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .28; transition: opacity .12s ease; }
.qs-v-wave i.on { opacity: 1; color: var(--jade-2); }
.qs-v-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-variant-numeric: tabular-nums; direction: ltr; text-align: left; }
.qs-voice.playing .qs-v-play { box-shadow: 0 0 0 4px rgba(87,196,166,.22), 0 2px 8px rgba(63,168,140,.45); }


/* ---------- پیام کوچک پایین صفحه (مثلاً «برای خروج دوباره بزنید») ---------- */
#pt-snack {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; z-index: 10000;
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 999px;
  background: rgba(30,36,44,.94); color: #fff; font-family: inherit; font-size: 13px; direction: rtl; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: opacity .2s ease, transform .2s ease;
}
#pt-snack.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- پشتیبانی آنلاین: انیمیشن «در حال جستجوی ادمین» و درخواست پیام ---------- */
.qs-search, .qs-prompt { text-align: center; padding: 26px 16px; }
.qs-radar { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; }
.qs-radar span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--jade-2); opacity: 0; transform: scale(.35);
  animation: qsRadar 2.1s ease-out infinite;
}
.qs-radar span:nth-child(2) { animation-delay: .7s; }
.qs-radar span:nth-child(3) { animation-delay: 1.4s; }
.qs-radar-ic {
  position: relative; width: 56px; height: 56px; border-radius: 50%; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3FA88C, #57C4A6); box-shadow: 0 4px 16px rgba(63,168,140,.5);
  animation: qsBeat 1.4s ease-in-out infinite;
}
@keyframes qsRadar { 0% { opacity: .75; transform: scale(.35); } 100% { opacity: 0; transform: scale(1); } }
@keyframes qsBeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.qs-search-title { font-weight: 800; font-size: 15px; }
.qs-search-sub { margin-top: 8px; color: var(--text-muted); font-size: 12.5px; min-height: 20px; transition: color .2s ease; }
.qs-search-sub.found { color: var(--jade-2); font-weight: 700; }
.qs-dots i { font-style: normal; animation: qsDot 1.2s infinite; opacity: .2; }
.qs-dots i:nth-child(2) { animation-delay: .2s; }
.qs-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes qsDot { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }
.qs-prompt { text-align: right; animation: qsPop .25s ease-out; }
.qs-prompt-ok { color: var(--jade-2); font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.qs-prompt-text { font-size: 13.5px; margin-bottom: 10px; }
.qs-prompt textarea { min-height: 96px; }


/* صفحه‌ی «پیام خودت را وارد کن»: دکمه‌های ارسال/انصراف همیشه زیر کادر و بالای کیبورد */
body.qs-chat-open .qs-first-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
body.qs-chat-open .qs-first-wrap .qs-prompt { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 8px; }
body.qs-chat-open .qs-first-wrap .qs-prompt textarea { flex: 1 1 auto; min-height: 70px; resize: none; font-size: 16px; }
.qs-first-actions { display: flex; gap: 8px; flex: 0 0 auto; padding: 4px 0 8px; }
body.qs-kbd .qs-first-wrap .page-title { display: none; }

/* ---------- صفحه‌ی ورودی: کادرهای IMEI و VPN ---------- */
.landing-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 10px; }
.landing-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 190px; padding: 22px 14px; border-radius: 20px; cursor: pointer;
  font-family: inherit; text-align: center; color: var(--text);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--pt-angle),
      rgba(227, 184, 124, .18) 0%, rgba(227, 184, 124, .18) 55%,
      rgba(227, 184, 124, .75) 88%, rgba(243, 217, 168, .9) 100%) border-box;
  animation: ptPriceSpin 14s linear infinite;
  transition: transform .15s;
}
.landing-card:active { transform: scale(0.97); }
.landing-card .lc-glow { position: absolute; inset: auto -20% -55% -20%; height: 120px; border-radius: 50%; filter: blur(40px); opacity: .35; pointer-events: none; }
.landing-imei .lc-glow { background: var(--brass); }
.landing-vpn .lc-glow { background: var(--jade); }
.landing-card .lc-ic { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; position: relative; }
.landing-imei .lc-ic { color: var(--brass-2); background: rgba(201, 151, 90, .13); }
.landing-vpn .lc-ic { color: var(--jade-2); background: rgba(63, 168, 140, .13); }
.landing-card .lc-name { font-size: 26px; font-weight: 800; letter-spacing: 2px; position: relative; }
.landing-card .lc-go { font-size: 13.5px; font-weight: 600; color: var(--text-muted); position: relative; }
.landing-card .lc-soon { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(63, 168, 140, .16); color: var(--jade-2); }
html[data-theme="light"] .landing-card { box-shadow: 0 1px 8px rgba(0, 0, 0, .08); }
@media (min-width: 560px) { .landing-wrap { grid-template-columns: 1fr 1fr; } }


/* ---------- کادر موجودی کیف پول (بالا سمت چپ، بخش محصولات) ---------- */
.top-balance {
  justify-self: start; direction: rtl; display: flex; align-items: center; gap: 8px;
  max-width: 100%; min-width: 0; padding: 5px 10px 5px 12px; border-radius: 14px; cursor: pointer;
  font-family: inherit; color: var(--text); text-align: right;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--pt-angle),
      rgba(227, 184, 124, .22) 0%, rgba(227, 184, 124, .22) 55%,
      rgba(227, 184, 124, .8) 88%, rgba(243, 217, 168, .95) 100%) border-box;
  animation: ptPriceSpin 14s linear infinite;
  transition: transform .15s;
}
.top-balance:active { transform: scale(.96); }
.top-balance .tb-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: var(--brass-2); background: rgba(201, 151, 90, .15); }
.top-balance .tb-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.top-balance .tb-label { font-size: 10px; color: var(--text-muted); }
.top-balance .tb-amount { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-balance .tb-amount b { font-weight: 800; color: var(--jade-2); }
.top-balance .tb-amount small { font-size: 10px; color: var(--text-muted); }
html[data-theme="light"] .top-balance { box-shadow: 0 1px 6px rgba(0, 0, 0, .08); }
html[data-theme="light"] .top-balance .tb-amount b { color: #1F8A6F; }

/* ---------- حاشیه‌ی طلایی ثابت (بدون انیمیشن) مثل «موجودی فعلی» در کیف پول ---------- */
.landing-card, .serial-choice-card, .top-balance {
  animation: none !important;
  border: 2px solid transparent;
  background:
    linear-gradient(135deg, #1B2A2A 0%, #14252A 55%, #101C22 100%) padding-box,
    linear-gradient(135deg, #F3D9A8 0%, #C9975A 35%, rgba(227, 184, 124, .45) 60%, #E3B87C 100%) border-box;
  box-shadow: inset 0 0 0 2px rgba(15, 23, 32, .85), 0 4px 14px rgba(0, 0, 0, .4), 0 0 14px rgba(227, 184, 124, .18);
}
.top-balance { border-width: 1.5px; box-shadow: inset 0 0 0 1.5px rgba(15, 23, 32, .85), 0 2px 8px rgba(0, 0, 0, .35), 0 0 10px rgba(227, 184, 124, .15); }
html[data-theme="light"] .landing-card,
html[data-theme="light"] .serial-choice-card,
html[data-theme="light"] .top-balance {
  background:
    linear-gradient(135deg, #FFFDF7 0%, #F8F1E2 55%, #F1E8D2 100%) padding-box,
    linear-gradient(135deg, #E9C98F 0%, #B07B2F 35%, rgba(201, 151, 90, .5) 60%, #D6A862 100%) border-box;
  box-shadow: inset 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, .1), 0 0 12px rgba(176, 123, 47, .18);
}
html[data-theme="light"] .top-balance { box-shadow: inset 0 0 0 1.5px #fff, 0 2px 8px rgba(0, 0, 0, .1), 0 0 8px rgba(176, 123, 47, .15); }

/* ---------- کادر موجودی بالای صفحه: بدون حاشیه، فقط سایه‌ی جذاب ---------- */
.top-balance, html[data-theme="light"] .top-balance {
  border: none; animation: none !important;
}
.top-balance {
  background: linear-gradient(135deg, #1F3333 0%, #17282D 55%, #121F26 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 18px rgba(227, 184, 124, .22);
}
html[data-theme="light"] .top-balance {
  background: linear-gradient(135deg, #FFFFFF 0%, #FBF5E8 100%);
  box-shadow: 0 6px 16px rgba(120, 85, 30, .20), 0 0 14px rgba(176, 123, 47, .20);
}

/* ---------- برچسب «جدید» چشمک‌زن روی کادر VPN (بالا سمت راست) ---------- */
.landing-card .lc-new {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 12px; font-weight: 800; padding: 4px 13px; border-radius: 999px;
  color: #3a2608; letter-spacing: .3px;
  background: linear-gradient(135deg, #F3D9A8 0%, #E3B87C 50%, #C9975A 100%);
  border: 1.5px solid #F7E3BC;
  box-shadow: 0 0 10px rgba(227, 184, 124, .6);
  animation: ptNewBlink 1.1s ease-in-out infinite;
}
@keyframes ptNewBlink {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 14px rgba(243, 217, 168, .95), 0 0 4px rgba(227, 184, 124, .9); }
  50% { opacity: .35; transform: scale(.94); box-shadow: 0 0 4px rgba(227, 184, 124, .3); }
}
html[data-theme="light"] .landing-card .lc-new { color: #fff; background: linear-gradient(135deg, #D6A862 0%, #B07B2F 100%); border-color: #E9C98F; }

/* ---------- «در حال راه‌اندازی»: جلو و عقب آرام، با مکث بین هر دور ---------- */
.landing-card .lc-soon {
  animation: ptSoonPulse 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes ptSoonPulse {
  0%, 40% { transform: scale(.92) translateZ(0); opacity: .7; box-shadow: none; }
  58%, 68% { transform: scale(1.15) translateZ(0); opacity: 1; box-shadow: 0 0 12px rgba(87, 196, 166, .5); }
  86%, 100% { transform: scale(.92) translateZ(0); opacity: .7; box-shadow: none; }
}


/* ---------- زنگوله‌ی مینی‌اپ (کنار دکمه‌ی روز/شب) ---------- */
.bell-btn {
  position: relative; flex-shrink: 0; width: 34px; height: 34px; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: none; border: none; box-shadow: none;
}
.bell-btn[hidden] { display: none; }
.bell-btn svg { display: block; transform-origin: 50% 8%; }
.bell-btn:active { transform: scale(.94); }
.bell-btn .bell-new { display: none; }
.bell-btn.bell-unread { color: var(--brass-2); }
.bell-btn.bell-unread .bell-new {
  display: block; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; line-height: 1; padding: 2px 6px; border-radius: 999px; white-space: nowrap;
  color: #3a2608; background: linear-gradient(135deg, #F3D9A8 0%, #E3B87C 50%, #C9975A 100%);
  box-shadow: 0 0 8px rgba(227, 184, 124, .55);
}
.bell-btn.bell-unread svg { animation: ptBellShake 3s ease-in-out infinite; }
@keyframes ptBellShake {
  0%, 38%, 100% { transform: rotate(0); }
  4% { transform: rotate(18deg); } 8% { transform: rotate(-16deg); } 12% { transform: rotate(14deg); }
  16% { transform: rotate(-12deg); } 20% { transform: rotate(9deg); } 24% { transform: rotate(-6deg); } 28% { transform: rotate(3deg); }
}
html[data-theme="light"] .bell-btn.bell-unread { color: #B07B2F; }
html[data-theme="light"] .bell-btn.bell-unread .bell-new { color: #fff; background: linear-gradient(135deg, #D6A862 0%, #B07B2F 100%); }


/* ---------- «جدید» و زنگوله‌ی پیام تازه: قرمز در هر دو حالت شب و روز ---------- */
.bell-btn.bell-unread, html[data-theme="light"] .bell-btn.bell-unread { color: #E5393B; }
.bell-btn.bell-unread .bell-new,
html[data-theme="light"] .bell-btn.bell-unread .bell-new {
  color: #fff; background: linear-gradient(135deg, #FF5A5C 0%, #E5393B 55%, #C42426 100%);
  box-shadow: 0 0 8px rgba(229, 57, 59, .65);
  font-size: 9.5px; padding: 2px 7px;
}
.bell-btn.bell-unread .bell-new { top: -13px; }


/* ---------- سوابق خرید: ردیف بالا، کادرهای سایه‌دار پک و کپی همه ---------- */
.oh-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.oh-shadow {
  background: var(--surface); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .38);
}
html[data-theme="light"] .oh-shadow { background: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .13); }
.oh-pack { font-weight: 700; font-size: 14.5px; }
.oh-when { font-size: 12px; color: var(--text-muted); margin: 7px 2px 12px; line-height: 1.8; }
.oh-copyall { display: flex; justify-content: center; margin-bottom: 12px; }


/* ---------- سوابق خرید (اصلاح): کادرها به اندازه‌ی متن، سایه‌ی جذاب؛ تاریخ پایین کارت ---------- */
.oh-shadow {
  width: fit-content; max-width: 100%; box-sizing: border-box;
  background: var(--surface); border-radius: 12px; padding: 8px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 14px rgba(227, 184, 124, .2);
}
html[data-theme="light"] .oh-shadow { background: #fff; box-shadow: 0 5px 16px rgba(120, 85, 30, .22), 0 0 10px rgba(176, 123, 47, .16); }
.oh-pack { display: block; margin: 0 0 12px; }
.oh-copyall { display: block; padding: 5px 8px; margin: 0 0 12px; }
.oh-copyall .btn { margin: 0; }
.oh-when { font-size: 12px; color: var(--text-muted); margin: 10px 2px 0; line-height: 1.8; }


/* ---------- سوابق خرید: اسم پک و کپی همه وسط‌چین؛ هر سریال با تاچ کپی می‌شود ---------- */
.oh-pack { margin: 6px auto 12px; text-align: center; }
.oh-copyall { margin: 0 auto 6px; text-align: center; }
.oh-hint { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 0 0 12px; }
.oh-serial { cursor: pointer; border-radius: 8px; padding-inline: 8px; transition: background .12s; -webkit-tap-highlight-color: transparent; }
.oh-serial:active { background: rgba(227, 184, 124, .22); }


/* ---------- سوابق خرید: اسم پک چسبیده به گوشه زیر دکمه‌ی بالا؛ کپی همه وسط‌چین پایین‌تر ---------- */
.oh-top { margin-bottom: 8px; }
.oh-packs { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin: 0 0 14px; }
.oh-packs .oh-pack { margin: 0; text-align: start; }
.oh-copyall { margin: 0 auto 6px; }


/* ---------- دکمه‌ی «احراز هویت» نوار پایین: قرمز و تکان‌خور / سبز با تیک ---------- */
nav.bottom-nav button { font-size: 10.5px; font-weight: 700; }   /* نوشته‌ی همه‌ی آیکن‌ها همیشه بولد؛ فقط رنگِ بخش فعال عوض می‌شود */
nav.bottom-nav button.nav-verify.vf-no, nav.bottom-nav button.nav-verify.vf-no .ic { color: #E5393B; }
nav.bottom-nav button.nav-verify.vf-ok, nav.bottom-nav button.nav-verify.vf-ok .ic { color: #2FB67C; }
nav.bottom-nav button.nav-verify.vf-no .ic svg { animation: ptVerifyShake 3.2s ease-in-out infinite; transform-origin: 50% 60%; }
nav.bottom-nav button.nav-verify.vf-ok.vf-pop .ic svg { animation: ptVerifyPop .35s ease-out; }
@keyframes ptVerifyShake {
  0%, 40%, 100% { transform: translateX(0) rotate(0); }
  5% { transform: translateX(-3px) rotate(-8deg); } 10% { transform: translateX(3px) rotate(8deg); }
  15% { transform: translateX(-3px) rotate(-6deg); } 20% { transform: translateX(3px) rotate(6deg); }
  25% { transform: translateX(-2px) rotate(-3deg); } 30% { transform: translateX(2px) rotate(3deg); }
}
@keyframes ptVerifyPop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }


/* ---------- ورود انیمیشنی صفحه‌ها از سمت راست ---------- */
#app { overflow-x: clip; }
main.page-in { animation: ptPageIn .32s cubic-bezier(.22, .8, .3, 1) both; will-change: transform, opacity; }
@keyframes ptPageIn {
  from { transform: translateX(42%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { main.page-in { animation: none; } }

/* کارت خالی (قبل از رسیدن اطلاعات) نمایش داده نشود */
.card:empty { display: none; }

/* ورود یک‌پارچه‌ی صفحه از یک سمت (بدون تکه‌تکه شدن و بدون چشمک) */
.pt-hold { opacity: 0 !important; }
.pt-in-l { animation: ptWholeInL .38s cubic-bezier(.22, .8, .3, 1) backwards; will-change: transform, opacity; }
.pt-in-r { animation: ptWholeInR .38s cubic-bezier(.22, .8, .3, 1) backwards; will-change: transform, opacity; }
@keyframes ptWholeInL { from { opacity: 0; transform: translateX(-35%); } to { opacity: 1; transform: none; } }
@keyframes ptWholeInR { from { opacity: 0; transform: translateX(35%); }  to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pt-in-l, .pt-in-r { animation: none; } }

/* ---------- بخش VPN: پلن‌های حجمی ---------- */
.vpn-wrap { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
.vpn-plan { min-height: 0; padding: 14px; gap: 6px; }
.vpn-month {
  position: relative; display: inline-block; margin-top: 4px; padding: 5px 18px; border-radius: 12px;
  font-size: 13.5px; font-weight: 800; color: var(--jade-2);
  background: linear-gradient(135deg, rgba(63, 168, 140, .22), rgba(63, 168, 140, .08));
  border: 1px solid rgba(63, 168, 140, .45);
  box-shadow: 0 4px 14px rgba(63, 168, 140, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* ---------- چیدمان ثابت: ارتفاع صفحه = ارتفاع قابل‌دیدن، فقط محتوا اسکرول میشه، آیکن‌های پایین همیشه دیده میشن ---------- */
body.pt-shell:not(.qs-chat-open) { overflow: hidden; }
body.pt-shell:not(.qs-chat-open) #app { height: var(--app-h, 100dvh); min-height: 0; overflow: hidden; }
body.pt-shell:not(.qs-chat-open) .topbar,
body.pt-shell:not(.qs-chat-open) #promo-global,
body.pt-shell:not(.qs-chat-open) #status-bar,
body.pt-shell:not(.qs-chat-open) #imp-banner { flex: 0 0 auto; }
body.pt-shell:not(.qs-chat-open) main {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: 24px;
}
body.pt-shell:not(.qs-chat-open) nav.bottom-nav {
  position: static; transform: none; left: auto; right: auto; width: auto; max-width: none;
  flex: 0 0 auto; z-index: 50;
}

/* نوار پایین لایه‌ی جدا و کاملاً مات (بدون شیشه/بلور) تا همیشه رسم بشه */
body.pt-shell nav.bottom-nav { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--surface) !important; -webkit-transform: translateZ(0); position: relative; }
body.pt-shell:not(.qs-chat-open) nav.bottom-nav { transform: translateZ(0); }
body.pt-shell nav.bottom-nav button, body.pt-shell nav.bottom-nav .ic, body.pt-shell nav.bottom-nav .ic svg { opacity: 1 !important; visibility: visible !important; }
body.pt-shell nav.bottom-nav .ic svg { overflow: visible; }

/* قیمت پلن‌های VPN (از پنل مدیریت) */
.vpn-price { display: block; margin-top: 8px; font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.vpn-price-soon { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* درجه‌ی مدت اشتراک VPN در سوابق خرید */
.vpn-meter { margin: 10px 0 6px; }
.vpn-meter-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.vpn-meter-days { color: var(--text-muted); font-weight: 600; }
.vpn-meter-track { height: 12px; border-radius: 999px; background: rgba(127, 127, 127, .22); overflow: hidden; direction: rtl; }
.vpn-meter-fill { height: 100%; border-radius: 999px; transition: width .6s ease, background .6s ease; }

/* دکمه‌ی ✕ بالای هر خرید در «سوابق خرید» (پاک کردن از سوابق) */
.oh-del {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; font-family: inherit; font-weight: 700;
  color: var(--danger, #D97164); background: rgba(217,113,100,.12); border: 1px solid rgba(217,113,100,.35);
}
.oh-del:active { transform: scale(.92); }
.oh-del-row { display: flex; justify-content: flex-start; margin: -4px 0 8px; }
/* فاصله‌ی بیشتر بین هر سریال و سریال بعدی در سوابق خرید */
.oh-item + .oh-item { margin-top: 22px; }

/* ---------- کادر «VPN تست» (رایگان) در صفحه‌ی VPN ---------- */
/* حاشیه‌ی طلایی ثابت + سایه‌ی قرمز ملایم؛ بدون وابستگی به انیمیشن/ویژگی‌هایی که در بعضی مرورگرها (iOS) فرق می‌کنند */
.vpn-test-card {
  -webkit-appearance: none; appearance: none;
  font-family: inherit; color: var(--text); text-align: center;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;
  box-sizing: border-box; width: 100%;
  min-height: 0; padding: 20px 14px 16px; gap: 6px;
  border: 2px solid transparent;
  animation: none;
  background:
    linear-gradient(135deg, rgba(63, 168, 140, .20), rgba(227, 184, 124, .10) 60%, rgba(63, 168, 140, .06)) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, #F3D9A8 0%, #E3B87C 40%, #C9975A 70%, #F3D9A8 100%) border-box;
  box-shadow: 0 6px 20px rgba(229, 57, 59, .26), 0 0 0 1px rgba(229, 57, 59, .10);
}
.vpn-test-card .lc-glow { background: var(--jade); opacity: .35; }
.vpn-test-card .vt-badge {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 800; line-height: 1; padding: 5px 11px; border-radius: 999px;
  color: #fff; background: linear-gradient(135deg, #3FA88C, #2C8A70); box-shadow: 0 0 10px rgba(63, 168, 140, .5);
}
.vpn-test-card .vt-badge svg { display: block; flex: 0 0 auto; }
.vpn-test-card .vt-ic { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: var(--jade-2); background: rgba(63, 168, 140, .16); }
.vpn-test-card .vt-name { position: relative; font-size: 24px; font-weight: 800; letter-spacing: 1px; line-height: 1.4; }
.vpn-test-card .vt-sub { position: relative; font-size: 12.5px; font-weight: 400; color: var(--text-muted); line-height: 1.8; }
.vpn-test-card .vt-go {
  position: relative; margin-top: 4px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 150px; height: 40px; padding: 0 26px; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 800; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #3FA88C, #2C8A70); box-shadow: 0 4px 14px rgba(63, 168, 140, .4);
}
.vpn-test-card.vpn-test-off { opacity: .6; filter: grayscale(.5); }
.vpn-test-card.vpn-test-off .vt-go { background: var(--line); color: var(--text-muted); box-shadow: none; }

/* ---------- نوار «در حال شناسایی اسمس واریزی»: نوار رفت‌وآمدی + دکمه‌ی لغو سمت چپ ---------- */
/* صفحه راست‌به‌چپ است: متن سمت راست و دکمه‌ی «لغو درخواست» (آخرین عضو ردیف) سمت چپ قرار می‌گیرد */
.dw-scan-row { justify-content: space-between; }
.dw-scan { position: relative; height: 4px; border-radius: 999px; overflow: hidden; margin: 8px 0 6px; background: rgba(56, 189, 248, .16); height: 5px; }
.dw-scan::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0), #38bdf8 30%, #3b82f6 70%, rgba(59, 130, 246, 0));
  box-shadow: 0 0 10px rgba(56, 189, 248, .75), 0 0 18px rgba(59, 130, 246, .45);
  animation: dwScan 1.3s ease-in-out infinite alternate; will-change: transform;
}
@keyframes dwScan { from { transform: translate3d(-10%, 0, 0); } to { transform: translate3d(174%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .dw-scan::after { animation-duration: 3s; } }
/* کادر اصلی «در حال بررسی پرداخت...»: کمی نورانی‌تر */
.deposit-waiting.dw-scan-row {
  border-color: rgba(227, 184, 124, .55) !important;
  box-shadow: 0 0 18px rgba(227, 184, 124, .28), 0 0 4px rgba(227, 184, 124, .35), inset 0 0 14px rgba(227, 184, 124, .08);
}
html[data-theme="light"] .deposit-waiting.dw-scan-row {
  border-color: rgba(176, 123, 47, .5) !important;
  box-shadow: 0 0 16px rgba(176, 123, 47, .22), 0 0 4px rgba(176, 123, 47, .3), inset 0 0 12px rgba(176, 123, 47, .06);
}
/* دکمه‌ی «لغو درخواست» داخل کادر اصلی، زیر متن؛ هم‌رنگ عنوان (طلایی) با کادر کم‌رنگ */
.dw-cancel {
  display: block; width: 100%; margin-top: 10px;
  padding: 9px 14px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  font-family: inherit; font-weight: 800; font-size: 13px; letter-spacing: .2px; text-align: center;
  color: var(--brass-2) !important;
  background: rgba(227, 184, 124, .07) !important;
  border: 1px solid rgba(227, 184, 124, .22) !important;
  box-shadow: none;
  transition: transform .15s ease, background .2s ease;
}
.dw-cancel:hover { background: rgba(227, 184, 124, .13) !important; }
.dw-cancel:active { transform: scale(.97); }
html[data-theme="light"] .dw-cancel {
  background: rgba(176, 123, 47, .06) !important;
  border-color: rgba(176, 123, 47, .22) !important;
}

/* ---------- کادر «پیام جدید» بالای زنگوله: دیگر زیر لبه‌ی صفحه نمی‌رود ---------- */
.topbar.topbar-user:has(.bell-btn.bell-unread) { padding-top: 24px; }
.bell-btn.bell-unread .bell-new {
  top: -15px; left: auto; right: -4px; transform: none; z-index: 3;
  font-size: 9.5px; line-height: 1.25; padding: 3px 8px;
}

/* ---------- جلوگیری از زوم صفحه با ضربه‌ی دوبار/پینچ ---------- */
html, body, * { touch-action: pan-x pan-y; }
input, textarea, select { font-size: max(16px, 1em); } /* iOS با فونت کمتر از ۱۶ هنگام فوکوس زوم می‌کند */

/* =====================================================================
   پنجره‌های پیام/تایید/فاکتور: کارت گرم با خط طلایی، سایه‌ی نرم و دکمه‌های جذاب
   ===================================================================== */
@keyframes ptOvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ptDlgPop { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.pt-ov {
  background: radial-gradient(120% 90% at 50% 0%, rgba(227, 184, 124, .16), rgba(8, 10, 18, .72) 60%) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: ptOvFade .2s ease-out;
}
.pt-dialog {
  position: relative;
  background: linear-gradient(165deg, #fffefb 0%, #fcf6ea 55%, #f7ebd3 100%) !important;
  border: 1px solid rgba(201, 154, 70, .5) !important;
  border-radius: 22px !important;
  padding: 24px 20px 18px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 4px rgba(227, 184, 124, .14), 0 0 42px rgba(227, 184, 124, .22) !important;
  animation: ptDlgPop .24s cubic-bezier(.2, .9, .3, 1.15);
}
.pt-dialog > div[style*="font-weight:700"], .pt-dialog > div[style*="font-weight:800"] {
  color: #7a5217 !important; font-size: 16.5px !important; font-weight: 800 !important; text-align: center;
  padding-bottom: 10px; margin-bottom: 12px !important; border-bottom: 1px dashed rgba(176, 123, 47, .38);
}
.pt-dialog input:not([type="checkbox"]):not([type="file"]), .pt-dialog textarea {
  background: #fff !important; border: 1.5px solid rgba(176, 123, 47, .32) !important; border-radius: 12px !important;
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.pt-dialog input:not([type="checkbox"]):not([type="file"]):focus, .pt-dialog textarea:focus {
  border-color: #c99a46 !important; box-shadow: 0 0 0 4px rgba(227, 184, 124, .28);
}

/* دکمه‌ها */
.pt-dialog button {
  font-family: inherit; font-weight: 800 !important; font-size: 14px; letter-spacing: .2px;
  border-radius: 14px !important; padding: 11px 18px !important; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pt-dialog button:active { transform: scale(.97); }
.pt-dialog button:disabled { filter: saturate(.4); box-shadow: none !important; }
/* دکمه‌ی اصلی (تایید/باشه/ادامه) */
.pt-dialog button[style*="background:#0a7"], .pt-dialog button[style*="background:#d97706"] {
  background: linear-gradient(135deg, #e3b87c 0%, #c99a46 48%, #a9772a 100%) !important;
  color: #fff !important; border: none !important; text-shadow: 0 1px 2px rgba(80, 50, 5, .45);
  box-shadow: 0 8px 20px rgba(176, 123, 47, .42), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.pt-dialog button[style*="background:#0a7"]:not(:disabled):hover { filter: brightness(1.06); box-shadow: 0 10px 24px rgba(176, 123, 47, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
/* دکمه‌ی دوم (انصراف/بازگشت) */
.pt-dialog button[style*="background:#fff"] {
  background: rgba(176, 123, 47, .07) !important; color: #7a5217 !important;
  border: 1px solid rgba(176, 123, 47, .35) !important; box-shadow: none;
}
.pt-dialog button[style*="background:#fff"]:hover { background: rgba(176, 123, 47, .14) !important; }
/* دکمه‌های کپی */
.pt-dialog button[style*="background:#f1fbf7"] {
  background: rgba(176, 123, 47, .1) !important; color: #7a5217 !important;
  border: 1px solid rgba(176, 123, 47, .4) !important; padding: 7px 12px !important; border-radius: 11px !important;
}
/* ردیف دکمه‌ها: دکمه‌ها کل عرض را بگیرند */
.pt-dialog #modal-ok, .pt-dialog #modal-cancel, .pt-dialog #tm-ok, .pt-dialog #tm-cancel,
.pt-dialog #pd-ok, .pt-dialog #pd-cancel, .pt-dialog #inv-cancel { flex: 1 1 0 !important; }
.pt-dialog #inv-ok, .pt-dialog #inv-verify { flex: 2 1 0 !important; }

/* ---------- کادر «در حال بررسی پرداخت...» (بدون دکمه‌ی جمع‌شونده) ---------- */
.dw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* تایمر ۳۰ دقیقه‌ای کنار «در حال بررسی پرداخت...» */
.dw-headmain { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.dw-timer {
  direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; line-height: 1;
  color: var(--brass-2); padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
}

/* =====================================================================
   پنجره‌ی اعلامیه‌ها: ضربدر گرد با سایه، انیمیشن بسته شدن، و فاصله از بالای تمام‌صفحه‌ی تلگرام
   ===================================================================== */
.pt-dialog #modal-x {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  width: 34px; height: 34px; min-width: 34px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 !important; margin: 0; border-radius: 50% !important;
  color: #7a5217 !important;
  background: linear-gradient(145deg, #fffaf0, #f3e3c3) !important;
  border: 1px solid rgba(176, 123, 47, .38) !important;
  box-shadow: 0 3px 8px rgba(122, 82, 23, .22), 0 1px 2px rgba(122, 82, 23, .18), inset 0 1px 0 rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.pt-dialog #modal-x svg { display: block; width: 14px; height: 14px; pointer-events: none; }
.pt-dialog #modal-x:hover { background: linear-gradient(145deg, #fff6e3, #ecd6aa) !important; }
.pt-dialog #modal-x:active { transform: scale(.9); box-shadow: 0 1px 3px rgba(122, 82, 23, .25), inset 0 1px 2px rgba(122, 82, 23, .18); }
.pt-dialog #modal-x:focus-visible { outline: 2px solid #c99a46; outline-offset: 2px; }

@keyframes ptOvOut { to { opacity: 0; } }
@keyframes ptDlgOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
.pt-ov.pt-closing { pointer-events: none; animation: ptOvOut .17s ease-in forwards !important; }
.pt-ov.pt-closing .pt-dialog { animation: ptDlgOut .17s ease-in forwards !important; }

/* تمام‌صفحه‌ی تلگرام: محتوا زیر دکمه‌های خود تلگرام شروع شود (خارج از حالت تمام‌صفحه مقدار ۰ است) */
#app { padding-top: var(--pt-top, 0px); }
.admin-online-banner { top: calc(max(env(safe-area-inset-top, 0px), var(--pt-top, 0px)) + 10px); }
#offline-banner { padding-top: calc(6px + max(env(safe-area-inset-top, 0px), var(--pt-top, 0px))); }

/* ---------- استیکر پشتیبانی آنلاین (با لمس آن چت باز می‌شود) ---------- */
.qs-sticker-wrap { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px 10px; }
.qs-sticker { position: relative; width: 190px; height: 190px; border: none; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; animation: qssFloat 3.6s ease-in-out infinite; }
.qs-sticker:active { transform: scale(.94); }
.qss-core {
  position: relative; z-index: 2; width: 128px; height: 128px; border-radius: 40px; display: grid; place-items: center;
  background: linear-gradient(135deg, #F3D9A8 0%, #C9975A 45%, #3FA88C 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42), 0 0 28px rgba(227, 184, 124, .45), inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -6px 12px rgba(0, 0, 0, .15);
  transform: rotate(-6deg);
}
.qss-ring { position: absolute; inset: 22px; border-radius: 44px; border: 2px solid rgba(227, 184, 124, .55); animation: qssPulse 2.8s ease-out infinite; }
.qss-ring.r2 { animation-delay: .9s; } .qss-ring.r3 { animation-delay: 1.8s; }
.qss-bubble { position: absolute; z-index: 3; font-size: 24px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); animation: qssBob 3s ease-in-out infinite; }
.qss-bubble.b1 { top: 4px; right: 10px; } .qss-bubble.b2 { bottom: 14px; left: 6px; animation-delay: .8s; font-size: 20px; } .qss-bubble.b3 { top: 26px; left: 2px; animation-delay: 1.5s; font-size: 18px; }
.qss-title { font-size: 19px; font-weight: 800; color: var(--brass-2); margin-top: 6px; }
.qss-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.9; }
@keyframes qssFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes qssPulse { 0% { transform: scale(.75); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes qssBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .qs-sticker, .qss-ring, .qss-bubble { animation: none; } }


/* ---------- متن «پیام شما در لیست پاسخگویی قرار گرفت...» (بدون کادر) ---------- */
.qs-queue-note { align-self: center; margin: 8px auto; text-align: center; direction: rtl; font-size: 13px; font-weight: 700; color: var(--brass-2); }


/* ---------- آیکن‌های حساب کاربری (هم‌سبک آیکن‌های پایین اپ) ---------- */
.pf-title { display: flex; align-items: center; gap: 8px; }
.pf-row { display: flex; align-items: center; gap: 9px; }
.pf-ic { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--brass-2); background: rgba(201, 151, 90, .15); }
.pf-title .pf-ic { width: auto; height: auto; background: none; }
html[data-theme="light"] .pf-ic { color: #B07B2F; background: rgba(176, 123, 47, .12); }

/* آیکن‌های حساب کاربری: فقط خودِ آیکن، بدون پس‌زمینه و سایه */
.pf-ic, html[data-theme="light"] .pf-ic { background: none !important; box-shadow: none !important; filter: none !important; border-radius: 0; width: 24px; height: 24px; }
.pf-ic svg { filter: none; }

/* ---------- کادر موجودی بالای سایت (اولین کادر): بدون سایه ---------- */
html .top-balance,
html[data-theme="light"] .top-balance { box-shadow: none !important; }


/* ---------- ستون وسط صفحه در مرورگر: بدون سایه/درخشش گرادیانی از بالا ---------- */
html #app { background: var(--bg); box-shadow: none; }