/* ══════════════════════════════════════════════════════════
   combined-fix.css
   این فایل را در css/ قرار دهید و در head لینک کنید:
   <link rel="stylesheet" href="css/combined-fix.css">
   فایل‌های user-menu.css و wallet.css قبلی را حذف کنید
══════════════════════════════════════════════════════════ */

/* ── Bridge متغیرها ── */
:root {
  --bg-primary:   #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary:  #1c1c1c;
  --accent:       #4f8ef7;
  --accent-rgb:   79, 142, 247;
  --border-rgb:   255, 255, 255;
}


/* ════════════════════════════════════════════════════
   ۱. TOPBAR — دکمه و آواتار کاربر
════════════════════════════════════════════════════ */

.topbar-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 8px;
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  position: relative;
}
.topbar-user-btn:hover {
  border-color: var(--border-hover, rgba(255,255,255,0.13));
  background: var(--bg-hover, #1c1c1c);
}

.topbar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.topbar-user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary, #f0f0f0);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* نقطه اعلان روی آیکون ناقوس */
.icon-btn { position: relative; }
.topbar-notif-dot {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid var(--bg-base, #0a0a0a);
  pointer-events: none;
}


/* ════════════════════════════════════════════════════
   ۲. USER MENU — dropdown زیر دکمه کاربر
════════════════════════════════════════════════════ */

/* منو را در body قرار دادیم، پس با JS position می‌گیره
   اما با CSS هم یه موقعیت پیش‌فرض می‌دیم */
#userMenu,
.user-menu.topbar-user-menu {
  position: fixed !important;
  /* موقعیت دقیق را JS با getBoundingClientRect تنظیم می‌کنه
     اما fallback: گوشه چپ-بالا نزدیک topbar */
  top: 60px;
  left: 16px;
  right: auto;
  bottom: auto;
  width: 272px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 8px 16px rgba(0,0,0,0.4),
    0 24px 60px rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-family: Vazirmatn, Tahoma, sans-serif;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

#userMenu.show,
.user-menu.topbar-user-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ─── هدر منو ─── */
.um-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.um-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.um-info { flex: 1; min-width: 0; }

.um-name {
  font-size: 13px;
  font-weight: 600;
  color: #f0f0f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.um-phone {
  font-size: 11px;
  color: #555;
  direction: ltr;
  text-align: right;
  margin-top: 1px;
}

.um-plan {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.25);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ─── ردیف اعتبار ─── */
.um-credits-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.um-credits-val {
  font-size: 13px;
  font-weight: 600;
  color: #f0f0f0;
  flex: 1;
}

.um-charge-mini {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(38,161,123,0.35);
  background: rgba(38,161,123,0.1);
  color: #26a17b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.um-charge-mini:hover {
  background: rgba(38,161,123,0.2);
  border-color: rgba(38,161,123,0.6);
}

/* ─── جداکننده ─── */
.um-sep {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 3px 0;
}

/* ─── آیتم‌های منو ─── */
.um-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.um-item:hover { background: rgba(255,255,255,0.04); }
.um-item.um-logout:hover { background: rgba(239,68,68,0.07); }

.um-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.um-item:hover .um-icon { transform: scale(1.08); }

.um-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #e8e8e8;
}
.um-item.um-logout .um-label { color: #ef4444; }

.um-arr {
  font-size: 12px;
  color: #444;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.um-item:hover .um-arr {
  transform: translateX(-2px);
  color: #888;
}

.um-badge-new {
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(16,185,129,0.15);
  color: #10b981;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(16,185,129,0.25);
  white-space: nowrap;
}


/* ════════════════════════════════════════════════════
   ۳. SIDEBAR — دکمه تتر و nav USDT
════════════════════════════════════════════════════ */

.sidebar-usdt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 10px;
  padding: 10px 12px;
  background: rgba(38,161,123,0.07);
  border: 1px solid rgba(38,161,123,0.18);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-usdt-btn:hover {
  background: rgba(38,161,123,0.12);
  border-color: rgba(38,161,123,0.3);
}
.usdt-btn-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(38,161,123,0.15);
  color: #26a17b;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.usdt-btn-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.usdt-btn-title { font-size: 12px; font-weight: 600; color: var(--text-primary, #f0f0f0); }
.usdt-btn-sub   { font-size: 10px; color: var(--text-muted, #444); }

.nav-usdt-item { display: flex; align-items: center; gap: 8px; }
.nav-usdt-icon {
  width: 18px; height: 18px; border-radius: 4px;
  background: rgba(38,161,123,0.15);
  color: #26a17b;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}


/* ════════════════════════════════════════════════════
   ۴. WALLET PAGE — کیف پول کامل
════════════════════════════════════════════════════ */

.wallet-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  direction: rtl;
}

/* ─── Header ─── */
.wallet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.wallet-header-right { flex: 1; }
.wallet-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.wallet-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
}
.wallet-subtitle {
  font-size: 13px;
  color: var(--text-muted, #444);
  padding-right: 4px;
}

/* کارت موجودی */
.wallet-balance-box {
  background: linear-gradient(135deg, rgba(79,142,247,0.12), rgba(79,142,247,0.05));
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 14px;
  padding: 16px 22px;
  text-align: center;
  min-width: 155px;
  flex-shrink: 0;
}
.wallet-balance-label {
  font-size: 11px;
  color: var(--text-muted, #444);
  margin-bottom: 6px;
}
.wallet-balance-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.wallet-balance-sub {
  font-size: 11px;
  color: var(--text-muted, #444);
  margin-top: 3px;
}

/* ─── نرخ تتر bar ─── */
.tether-rate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(38,161,123,0.07);
  border: 1px solid rgba(38,161,123,0.2);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.tether-rate-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tether-logo { font-size: 18px; color: #26a17b; font-weight: 700; line-height: 1; }
.tether-label { font-size: 13px; color: var(--text-secondary, #888); font-weight: 500; }
.tether-badge {
  background: rgba(38,161,123,0.15);
  color: #26a17b;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}
.tether-rate-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tether-rate-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  font-variant-numeric: tabular-nums;
}
.tether-refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #444);
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.tether-refresh-btn:hover { color: #26a17b; }
.tether-refresh-btn .spinning { animation: spin 0.8s linear infinite; }
.tether-rate-time { font-size: 11px; color: var(--text-muted, #444); }

/* ─── Body grid ─── */
.wallet-body {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 750px) {
  .wallet-body { grid-template-columns: 1fr; }
}

/* ─── تب‌های پرداخت (ریالی / تتر) ─── */
.wallet-pay-tabs {
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 14px;
  overflow: hidden;
}

.wallet-tab-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
}

.wallet-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #444);
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.wallet-tab-btn:hover { color: var(--text-secondary, #888); }
.wallet-tab-btn.active {
  color: var(--text-primary, #f0f0f0);
  border-bottom-color: #4f8ef7;
  background: rgba(79,142,247,0.05);
}

/* پنل‌های تب */
.wallet-tab-panel { display: none; }
.wallet-tab-panel.active { display: block; }

/* پکیج‌های ریالی */
.rial-info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 16px 10px;
  padding: 10px 12px;
  background: rgba(79,142,247,0.07);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary, #888);
  line-height: 1.6;
}

.rial-packages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px;
}

.rial-pkg {
  background: var(--bg-hover, #1c1c1c);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 11px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rial-pkg:hover {
  border-color: rgba(79,142,247,0.4);
  background: rgba(79,142,247,0.06);
  transform: translateY(-1px);
}
.rial-pkg.popular {
  border-color: rgba(79,142,247,0.35);
  background: rgba(79,142,247,0.07);
}
.rial-pkg-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #4f8ef7;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.rial-pkg-name   { font-size: 11px; color: var(--text-muted, #444); }
.rial-pkg-credits { font-size: 14px; font-weight: 700; color: var(--text-primary, #f0f0f0); }
.rial-pkg-price  { font-size: 12px; color: var(--text-secondary, #888); }
.rial-pkg-btn {
  margin-top: 6px;
  font-size: 11px;
  color: #4f8ef7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* فرم USDT */
.usdt-network-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 16px 10px;
  padding: 10px 12px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  font-size: 12px;
  color: #fbbf24;
  line-height: 1.6;
}

.charge-form { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.charge-input-wrap { display: flex; flex-direction: column; gap: 6px; }
.charge-label { font-size: 12px; color: var(--text-muted, #444); }

.charge-input-row {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg-base, #0a0a0a);
  transition: border-color 0.2s;
}
.charge-input-row:focus-within { border-color: #4f8ef7; }
.charge-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-size: 16px;
  color: var(--text-primary, #f0f0f0);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: left;
}
.charge-input-unit {
  padding: 0 12px 0 8px;
  font-size: 12px;
  color: #26a17b;
  font-weight: 700;
  background: rgba(38,161,123,0.08);
  align-self: stretch;
  display: flex;
  align-items: center;
  border-right: 1.5px solid var(--border, rgba(255,255,255,0.07));
}

/* پیش‌نمایش */
.charge-preview {
  background: var(--bg-hover, #1c1c1c);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 13px;
}
.charge-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  color: var(--text-secondary, #888);
}
.charge-preview-row.tax,
.charge-preview-row.fee { color: var(--text-muted, #444); font-size: 12px; }
.charge-preview-row.total {
  color: var(--text-primary, #f0f0f0);
  font-weight: 700;
  font-size: 14px;
}
.charge-preview-divider {
  border-top: 1px dashed rgba(255,255,255,0.07);
  margin: 8px 0;
}

/* دکمه‌های سریع */
.charge-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-btn {
  flex: 1;
  min-width: 55px;
  padding: 7px 6px;
  background: var(--bg-hover, #1c1c1c);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-secondary, #888);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  text-align: center;
}
.quick-btn:hover {
  border-color: #4f8ef7;
  color: #4f8ef7;
  background: rgba(79,142,247,0.08);
}

/* دکمه پرداخت */
.charge-pay-btn {
  width: 100%;
  padding: 13px;
  background: #4f8ef7;
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
}
.charge-pay-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.charge-pay-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.charge-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  color: var(--text-muted, #444);
  line-height: 1.6;
}

/* ─── تاریخچه ─── */
.wallet-history-card {
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 14px;
  overflow: hidden;
}
.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f0f0f0);
}
.history-refresh-btn {
  background: var(--bg-hover, #1c1c1c);
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-secondary, #888);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.history-refresh-btn:hover { color: var(--text-primary, #f0f0f0); border-color: #4f8ef7; }

.history-filters {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
  flex-wrap: wrap;
}
.hf-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  background: none;
  font-size: 12px;
  color: var(--text-muted, #444);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.hf-btn.active,
.hf-btn:hover {
  background: #4f8ef7;
  color: #fff;
  border-color: #4f8ef7;
}

.history-table-wrap { overflow-x: auto; }
.history-table-head {
  display: grid;
  grid-template-columns: 90px 1fr 120px 80px 90px;
  gap: 8px;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text-muted, #444);
  background: var(--bg-hover, #1c1c1c);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.07));
}
.history-row {
  display: grid;
  grid-template-columns: 90px 1fr 120px 80px 90px;
  gap: 8px;
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  align-items: center;
  transition: background 0.1s;
}
.history-row:hover { background: var(--bg-hover, #1c1c1c); }
.history-row:last-child { border-bottom: none; }

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.hs-pending { background: rgba(245,158,11,0.12); color: #f59e0b; }
.hs-success { background: rgba(16,185,129,0.12); color: #10b981; }
.hs-failed  { background: rgba(239,68,68,0.12);  color: #ef4444; }

.h-amount { font-weight: 600; color: var(--text-primary, #f0f0f0); font-variant-numeric: tabular-nums; }
.h-date   { color: var(--text-muted, #444); font-size: 12px; direction: ltr; text-align: right; }
.h-usdt   { color: #26a17b; font-weight: 600; font-size: 12px; }
.h-ref    { color: var(--text-muted, #444); font-size: 11px; font-family: monospace; }

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 20px;
  color: var(--text-muted, #444);
  font-size: 13px;
  text-align: center;
}
.history-empty i { font-size: 36px; opacity: 0.25; display: block; }

.history-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.07));
}
.page-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  background: none;
  color: var(--text-secondary, #888);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.page-btn.active { background: #4f8ef7; color: #fff; border-color: #4f8ef7; }
.page-btn:hover:not(.active) { border-color: #4f8ef7; color: #4f8ef7; }


/* ════════════════════════════════════════════════════
   ۵. PAY DETAIL MODAL — مودال جزئیات پرداخت
════════════════════════════════════════════════════ */

.modal-box {
  background: var(--bg-card, #141414);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: slideUp 0.2s ease;
}

.pay-detail-modal { max-width: 400px; padding: 0; overflow: hidden; }

.pay-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: relative;
}
.pay-detail-icon { font-size: 22px; }
.pay-detail-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f0f0f0);
  flex: 1;
}
.pay-detail-close {
  position: absolute;
  left: 14px;
  top: 14px;
}

.pay-detail-usdt-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: rgba(38,161,123,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tether-logo-sm { font-size: 18px; color: #26a17b; font-weight: 700; }
#payDetailUsdtAmt { font-size: 15px; font-weight: 700; color: var(--text-primary, #f0f0f0); }
.pay-detail-rate-note { font-size: 11px; color: var(--text-muted, #444); margin-right: auto; }

.pay-detail-table { padding: 14px 18px; }
.pdt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
}
.pdt-label { color: var(--text-secondary, #888); }
.pdt-value { font-weight: 600; color: var(--text-primary, #f0f0f0); font-variant-numeric: tabular-nums; }
.pdt-tax .pdt-label,
.pdt-tax .pdt-value,
.pdt-fee .pdt-label,
.pdt-fee .pdt-value { color: var(--text-muted, #444); font-size: 12px; font-weight: 500; }
.pdt-divider { border-top: 1.5px dashed rgba(255,255,255,0.07); margin: 8px 0; }
.pdt-total .pdt-label { font-weight: 700; color: var(--text-primary, #f0f0f0); font-size: 14px; }
.pdt-total .pdt-value { font-size: 18px; color: #4f8ef7; font-weight: 700; }

.pay-detail-actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 14px;
}
.pay-invoice-btn {
  flex: 1; padding: 10px;
  background: var(--bg-hover, #1c1c1c);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  color: var(--text-primary, #f0f0f0);
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all 0.15s;
}
.pay-invoice-btn:hover { border-color: #4f8ef7; color: #4f8ef7; }
.pay-confirm-btn {
  flex: 2; padding: 10px;
  background: #4f8ef7;
  border: none; border-radius: 9px;
  color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: opacity 0.2s;
}
.pay-confirm-btn:hover { opacity: 0.9; }
.pay-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pay-detail-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 18px 14px;
  font-size: 11px;
  color: var(--text-muted, #444);
  border-top: 1px solid rgba(255,255,255,0.07);
}


/* ════════════════════════════════════════════════════
   ۶. MODAL BOX — مودال‌های عمومی (تلگرام، تنظیمات، ...)
════════════════════════════════════════════════════ */

.tg-link-box {
  background: rgba(42,171,238,0.08);
  border: 1px solid rgba(42,171,238,0.2);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #2aabee;
  cursor: pointer;
  transition: background 0.15s;
}
.tg-link-box:hover { background: rgba(42,171,238,0.14); }

.updates-list { display: flex; flex-direction: column; }
.update-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.update-item:last-child { border-bottom: none; }
.update-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #444; margin-top: 6px; flex-shrink: 0;
}
.update-dot.new { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.update-body { flex: 1; }
.update-title { font-size: 13px; font-weight: 600; color: var(--text-primary, #f0f0f0); margin-bottom: 3px; }
.update-desc  { font-size: 12px; color: var(--text-muted, #444); line-height: 1.5; }
.update-date  { font-size: 11px; color: #444; margin-top: 5px; }

.personalize-section {
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.personalize-section:last-of-type { border-bottom: none; margin-bottom: 10px; }
.ps-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted, #444);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}

.theme-options { display: flex; gap: 12px; }
.theme-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.theme-preview {
  width: 100%; height: 50px; border-radius: 8px;
  border: 2px solid transparent; transition: border-color 0.15s;
}
.theme-opt.active .theme-preview { border-color: #6366f1; }
.dark-prev     { background: linear-gradient(135deg, #0f0f1a, #1a1a2e); }
.light-prev    { background: linear-gradient(135deg, #f8fafc, #e2e8f0); }
.midnight-prev { background: linear-gradient(135deg, #050510, #0a0a20); }
.theme-opt span { font-size: 12px; color: var(--text-muted, #444); }

.font-size-options { display: flex; gap: 8px; }
.fs-btn {
  flex: 1; padding: 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: var(--text-secondary, #888);
  font-size: 13px; cursor: pointer; font-family: Vazirmatn, sans-serif;
  transition: all 0.15s;
}
.fs-btn:hover { background: rgba(255,255,255,0.05); }
.fs-btn.active {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.3);
  color: #818cf8; font-weight: 600;
}

.toggle-row {
  display: flex; align-items: center;
  justify-content: space-between;
  cursor: pointer; font-size: 13px;
  color: var(--text-secondary, #888);
}
.toggle-switch {
  width: 42px; height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px; position: relative;
  cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.toggle-switch.on { background: #6366f1; }
.toggle-knob {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle-switch.on .toggle-knob { transform: translateX(-18px); }

.settings-section {
  margin-bottom: 20px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.settings-section:last-of-type { border-bottom: none; margin-bottom: 10px; }
.settings-section-title {
  font-size: 11px; font-weight: 600; color: var(--text-muted, #444);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.settings-field { margin-bottom: 12px; }
.settings-action-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
  background: transparent; color: var(--text-secondary, #888);
  font-size: 13px; cursor: pointer; font-family: Vazirmatn, sans-serif;
  text-align: right; transition: all 0.15s; margin-bottom: 8px;
}
.settings-action-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #f0f0f0);
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: var(--text-secondary, #888);
  font-size: 13px; font-family: Vazirmatn, sans-serif;
  cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #f0f0f0);
}
