/* store-custom.css — تخصيصات TopUp2Game فوق AppDashboard */

/* لون العلامة التجارية بنفسجي/سماوي */
:root {
  --accent-color: #7c3aed;
}
[data-theme="dark"] {
  --accent-color: #9f67fa;
}

/* دعم RTL */
body { direction: rtl; text-align: right; font-family: 'Cairo','Geist',sans-serif; }

/* بطاقات المنتجات */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  cursor: pointer;
  transition: all .2s;
  background: var(--surface-color, #fff);
  height: 100%;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.prod-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--background-color);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.prod-body {
  padding: 10px 12px 14px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  flex-grow: 1;
  justify-content: center;
}
.product-card .prod-emoji { font-size: 2.6rem; line-height: 1; }
.product-card .prod-name { font-weight: 700; font-size: .88rem; color: var(--default-color); line-height: 1.35; }
.product-card .prod-cta { font-size: .78rem; color: var(--accent-color); margin-top: 6px; font-weight: 600; }

/* ═══ شريط الملخص العلوي (الرصيد / ديوني / أرباحي) — يبان فرأس كل صفحة ═══ */
.stats-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 16px; margin-bottom: 6px;
}
.stats-card {
  display: flex; align-items: center; gap: 10px;
  border-radius: 14px; padding: 12px 14px;
  border: 1px solid var(--border-color);
}
.stats-card.stats-balance { background: rgba(16,185,129,.08); }
.stats-card.stats-debt    { background: rgba(239,68,68,.08); }
.stats-card.stats-profit  { background: color-mix(in srgb, var(--accent-color), transparent 92%); }
.stats-icon {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.stats-balance .stats-icon { background: rgba(16,185,129,.15); color: #10b981; }
.stats-debt .stats-icon    { background: rgba(239,68,68,.15); color: #ef4444; }
.stats-profit .stats-icon  { background: color-mix(in srgb, var(--accent-color), transparent 80%); color: var(--accent-color); }
.stats-body { min-width: 0; }
.stats-label { font-size: .72rem; color: var(--muted-color); font-weight: 600; }
.stats-value { font-size: 1.05rem; font-weight: 800; white-space: nowrap; }
.stats-balance .stats-value { color: #10b981; }
.stats-debt .stats-value    { color: #ef4444; }
.stats-profit .stats-value  { color: var(--accent-color); }
@media (max-width: 576px) {
  .stats-strip { gap: 6px; padding: 8px 10px; }
  .stats-card { padding: 8px 8px; gap: 6px; }
  .stats-icon { width: 28px; height: 28px; font-size: .85rem; }
  .stats-label { font-size: .62rem; }
  .stats-value { font-size: .82rem; }
}

.prod-image {
  width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; display: block;
}

/* زر إضافة/تغيير صورة المنتج (يظهر للأدمن فقط) — فوق الصورة مباشرة */
.prod-img-add {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-color); color: #fff; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-size: .78rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; padding: 0; line-height: 1;
  transition: transform .15s;
}
.prod-img-add:hover { transform: scale(1.12); }
.prod-img-add .spinner-border { width: 12px; height: 12px; border-width: 2px; }

/* شبكة المنتجات */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
@media (max-width: 576px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* بطاقة الرصيد الكبيرة */
.balance-hero {
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  border-radius: 16px;
  padding: 26px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.balance-hero::after {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
}
.balance-hero .bh-label { font-size: .85rem; opacity: .9; position: relative; }
.balance-hero .bh-amount { font-size: 2.2rem; font-weight: 900; margin: 6px 0; position: relative; }

/* عناصر العروض في المودال */
.offer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border: 1px solid var(--border-color);
  border-radius: 10px; cursor: pointer; transition: all .15s; margin-bottom: 8px;
}
.offer-row:hover { border-color: var(--accent-color); background: color-mix(in srgb, var(--accent-color), transparent 92%); }
.offer-row.selected { border-color: var(--accent-color); background: color-mix(in srgb, var(--accent-color), transparent 85%); }
.offer-price { color: var(--accent-color); font-weight: 700; }

/* نتيجة الشراء */
.result-code {
  background: var(--background-color); border: 1px dashed var(--accent-color);
  border-radius: 10px; padding: 14px; font-family: 'Geist Mono', monospace;
  font-size: 1.05rem; word-break: break-all; text-align: center; margin: 12px 0;
  color: var(--accent-color);
}

/* شارات الحالة */
.badge-success { background: rgba(16,185,129,.15); color: #10b981; }
.badge-pending { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-failed  { background: rgba(239,68,68,.15);  color: #ef4444; }

/* نموذج الدخول */
.auth-brand-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto 16px;
}

/* سبينر */
.mini-spinner {
  width: 28px; height: 28px; border: 3px solid var(--border-color);
  border-top-color: var(--accent-color); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ RTL Layout: نقل الشريط الجانبي لليمين ═══ */
.sidebar { left: auto !important; right: 0 !important; border-right: none !important; border-left: 1px solid var(--sidebar-border); }
.sidebar-close, .header-logo, .sidebar-logo { }

@media (min-width: 1200px) {
  .main { margin-left: 0 !important; margin-right: var(--sidebar-width); }
  .sidebar-collapsed .main { margin-right: var(--sidebar-collapsed-width); margin-left:0 !important; }
}

/* تصحيح اتجاه انزلاق القائمة الجانبية فالهاتف (الشريط صار يمين، فيخرج لليمين ماشي لليسار) */
@media (max-width: 1199px) {
  .sidebar { transform: translateX(100%); }
  .sidebar-open .sidebar { transform: translateX(0); }
}

/* الهيدر: عكس الاتجاه */
.header-left { margin-right: 0; }
@media (min-width: 1200px) {
  .header { padding-right: 0; }
}

/* nav-heading و nav-link محاذاة يمين */
.nav-heading { text-align: right; }
.sidebar-nav .nav-link { text-align: right; }
.sidebar-nav .nav-link i { margin-left: 10px; margin-right: 0; }

/* nav pills active */
.nav-pills .nav-link { color: var(--default-color); background: var(--surface-color); border: 1px solid var(--border-color); }
.nav-pills .nav-link.active { background: var(--accent-color); border-color: var(--accent-color); color:#fff; }

/* wrapper محتوى الصفحة */
.page-wrapper { width: 100%; }

/* ═══ شبكة الخدمات السريعة (بطاقات 3D، كيما التصميم المرجعي) ═══ */
.quick-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  align-items: start;
  gap: 16px;
}
.quick-cat-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  text-decoration: none; padding: 12px 12px 16px;
  background: var(--surface-color, #fff);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.quick-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 10px 22px rgba(0,0,0,.1);
  border-color: var(--accent-color);
}
.quick-cat-card.active {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  box-shadow: 0 3px 0 rgba(0,0,0,.04), 0 8px 18px rgba(0,0,0,.08);
}
.quick-cat-icon {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.35rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.quick-cat-icon-img { padding: 0 !important; overflow: hidden; background: var(--background-color); box-shadow: none; }
.quick-cat-icon-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; display: block; border-radius: inherit; }
.quick-cat-label {
  font-size: .82rem; font-weight: 700; color: var(--default-color); text-align: center;
  line-height: 1.25;
}
.quick-cat-arrow {
  display: block; text-align: center;
  color: var(--accent-color); font-size: .78rem;
}
.quick-cat-has-image .quick-cat-label,
.quick-cat-has-image .quick-cat-arrow { display: none; }
.quick-cat-has-image { padding-bottom: 10px; }

#productsGrid { scroll-margin-top: calc(var(--header-height) + 16px); }

/* ترحيب المستخدم فرأس الشريط الجانبي (فوق "القائمة") */
.sidebar-greeting {
  padding: 10px var(--spacing-lg, 18px) 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--sidebar-border), transparent 18%);
}
.sidebar-greeting-name { font-weight: 700; font-size: .9rem; color: var(--default-color); }
.sidebar-greeting-code { font-size: .78rem; color: var(--muted-color); margin-top: 2px; }
@media (max-width: 576px) {
  .quick-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .quick-cat-card { padding: 9px 9px 12px; border-radius: 14px; }
  .quick-cat-icon { font-size: 1.7rem; border-radius: 11px; }
  .quick-cat-label { font-size: .68rem; }
  .quick-cat-arrow { display: none; }
}

/* بانر بطاقات محلية */
.local-cards-banner {
  display: flex; align-items: center; gap: 14px;
  background: color-mix(in srgb, var(--accent-color), transparent 92%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 75%);
  border-radius: 16px; padding: 16px 18px; text-decoration: none;
  margin-bottom: 20px; transition: transform .15s;
}
.local-cards-banner:hover { transform: translateY(-2px); }
.lcb-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem;
}
.lcb-text { display: flex; flex-direction: column; flex-grow: 1; }
.lcb-text strong { color: var(--default-color); font-size: .95rem; }
.lcb-text small { color: var(--muted-color); font-size: .78rem; }
.lcb-arrow { color: var(--accent-color); font-size: 1.1rem; }

/* ═══ شريط التنقّل السفلي (الهاتف فقط) ═══ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 10px; left: 12px; right: 12px; z-index: 850;
  background: var(--surface-color, #fff);
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
  padding: 8px 6px;
  align-items: center; justify-content: space-around;
}
@media (max-width: 991px) {
  .mobile-bottom-nav { display: flex; }
  .main-content { padding-bottom: 78px !important; }
}
.mbn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted-color); text-decoration: none; font-size: .68rem; font-weight: 600;
  flex: 1; position: relative; padding: 4px 2px;
}
.mbn-item i { font-size: 1.3rem; }
.mbn-item.active { color: var(--accent-color); }
.mbn-center { margin-top: -22px; }
.mbn-center-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 1.3rem; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent-color), transparent 50%);
  margin-bottom: 2px;
}
.mbn-center.active .mbn-center-icon { filter: brightness(1.1); }
.mbn-badge {
  position: absolute; top: -2px; right: 18%; background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 800; border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* بطاقات المناطق (صفحة product.php) */
.region-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 22px 12px; border: 1px solid var(--border-color); border-radius: 16px;
  background: var(--surface-color, #fff); text-decoration: none; height: 100%;
  transition: all .18s;
}
.region-card:hover { border-color: var(--accent-color); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.region-card-flag {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: var(--background-color);
}
.region-card-img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; display: block;
}
.region-card-name { font-weight: 700; font-size: .92rem; color: var(--default-color); text-align: center; }

/* ═══ أزرار الأقسام بتأثير 3D ═══ */
.cat-pills-3d { list-style: none; padding: 0; margin: 0; }
.cat-pill-3d {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .9rem;
  color: #fff !important; text-decoration: none;
  background: linear-gradient(180deg, var(--accent-color), color-mix(in srgb, var(--accent-color), #000 20%));
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--accent-color), #000 35%),
    0 6px 14px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.25);
  border: none; transition: transform .12s, box-shadow .12s;
  transform: translateY(0);
}
.cat-pill-3d:hover { color:#fff !important; transform: translateY(-2px); }
.cat-pill-3d:active, .cat-pill-3d.active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--accent-color), #000 35%),
    0 2px 6px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.cat-pill-3d.active {
  background: linear-gradient(180deg, #06b6d4, color-mix(in srgb, #06b6d4, #000 25%));
  box-shadow:
    0 2px 0 color-mix(in srgb, #06b6d4, #000 35%),
    0 3px 8px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.25);
}
@media (max-width: 576px) {
  .cat-pill-3d { padding: 8px 13px; font-size: .8rem; }
}

/* ═══ الشريط المتحرك (Marquee) بالصفحة الرئيسية ═══ */
.marquee-wrap {
  overflow: hidden; width: 100%; direction: ltr;
  border-radius: 14px; margin-bottom: 16px;
}
.marquee-track {
  display: flex; width: max-content; gap: 12px;
}
.marquee-track.rtl-scroll { animation: marquee-rtl 26s linear infinite; }
.marquee-track.ltr-scroll { animation: marquee-ltr 26s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-ltr { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.marquee-item {
  flex: 0 0 auto; width: 160px; height: 90px; border-radius: 12px; overflow: hidden;
  position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marquee-item .marquee-label {
  position: absolute; bottom: 0; right: 0; left: 0; padding: 4px 8px;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff; font-size: .72rem; font-weight: 700; text-align: center; direction: rtl;
}
.ads-banner { width: 100%; border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.ads-banner img { width: 100%; max-height: 140px; object-fit: cover; display: block; }
@media (max-width: 576px) {
  .marquee-item { width: 120px; height: 70px; }
  .ads-banner img { max-height: 100px; }
}

/* بطاقات طرق الدفع (USD) */
.payment-method-card { transition: border-color .15s, transform .15s; }
.payment-method-card:hover { transform: translateY(-2px); }

/* تصحيح موضع أيقونة البحث فلوحة البحث بالهاتف (RTL) */
.mobile-search .search-form input { padding: 0 44px 0 var(--spacing-md, 16px); }
.mobile-search .search-form button { left: auto; right: 8px; }

/* أفاتار الملف الشخصي */
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 2rem;
}

/* ========================================
   TopUp Game — Header + Settings Sheet (theme 14)
   ======================================== */
/* ========================================
   TopUp Game — New Header + Home Redesign
   ======================================== */
:root{
  --tg-accent: #7c3aed;
  --tg-accent-2: #ec4899;
  --tg-purple: #7c3aed;
  --tg-purple-2: #a855f7;
  --tg-pink: #ec4899;
  --tg-bg: #f6f5fb;
  --tg-card: #ffffff;
  --tg-border: rgba(124,58,237,.08);
  --tg-shadow: 0 8px 30px -14px rgba(80,60,150,.20);
  --tg-radius: 22px;
}
body{ background: var(--tg-bg); }

/* ---------- Header ---------- */
/* الهيدر الجديد (tg-header) sticky وماشي fixed، فـ.main ما عادش محتاج الهامش القديم اللي كان مخصص للهيدر القديم fixed */
.main{ margin-top: 0 !important; }

.tg-header{
  position: sticky; top: 0; z-index: 900;
  padding: 12px 14px 0;
}
.tg-header-inner{
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 28px -16px rgba(80,60,150,.20), 0 1px 2px rgba(0,0,0,.03);
  height: 68px;
  padding: 0 16px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(124,58,237,.06);
}
.tg-avatar-btn{
  position: relative; border: 0; padding: 0; background: transparent;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
}
.tg-avatar{
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #f3e8ff, #fde4ff);
  color: var(--tg-purple); font-weight: 800; font-size: 1rem;
  display: grid; place-items: center;
  border: 2px solid rgba(124,58,237,.15);
}
.tg-avatar-lg{ width: 52px; height: 52px; font-size: 1.2rem; }
.tg-avatar-dot{
  position: absolute; inset: auto 2px 2px auto;
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
}
.tg-avatar-dot-mini{ width: 8px; height: 8px; inset: auto 4px 4px auto; background: var(--tg-pink); }

.tg-icon-btn{
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #f4f2fb; color: #1f1b2e;
  display: grid; place-items: center; font-size: 1.05rem;
  transition: transform .15s, background .2s;
  text-decoration: none;
  flex-shrink: 0;
}
.tg-icon-btn:hover{ background: #ece7f8; }
.tg-icon-btn:active{ transform: scale(.95); }
.tg-icon-btn-accent{ background: #f3e8ff; color: var(--tg-purple); }
.tg-badge{
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--tg-pink); color: #fff;
  border-radius: 999px; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

.tg-logo{
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; color: inherit; min-width: 0;
}
.tg-logo img{ width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.tg-logo-mark{
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--tg-purple), var(--tg-pink));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(124,58,237,.5);
  font-size: 1.15rem;
}
.tg-logo-mark .tg-logo-bolt{
  position: absolute; top: -3px; right: -3px;
  background: #fde047; color: #7c2d12;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: .7rem; display: grid; place-items: center;
  border: 2px solid #fff;
}
.tg-logo-text{
  display: flex; flex-direction: column; line-height: 1; align-items: flex-start;
}
.tg-logo-text b{
  font-weight: 900; font-size: 1.05rem; letter-spacing: .5px;
  background: linear-gradient(135deg, #1f1b2e, #4c1d95);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tg-logo-text em{
  font-style: normal; font-size: .6rem; font-weight: 700;
  color: var(--tg-purple); letter-spacing: 2px; margin-top: 2px;
}


/* ---------- Search bar (drops under header) ---------- */
.tg-search-bar{
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
  padding: 0 12px;
}
.tg-search-bar.open{ max-height: 80px; padding-top: 10px; }
.tg-search-bar .search-form{
  background: #fff; border-radius: 999px; padding: 6px 8px 6px 16px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--tg-shadow); border: 1px solid var(--tg-border);
}
.tg-search-bar input{
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: .95rem; padding: 6px 4px;
}
.tg-search-bar button{
  border: 0; background: var(--tg-purple); color: #fff;
  padding: 8px 16px; border-radius: 999px; font-weight: 700;
}

/* ---------- Settings Bottom Sheet ---------- */
.tg-sheet-backdrop{
  position: fixed; inset: 0; background: rgba(15,10,40,.5);
  opacity: 0; pointer-events: none; transition: opacity .25s;
  z-index: 1050; backdrop-filter: blur(4px);
}
.tg-sheet-backdrop.open{ opacity: 1; pointer-events: auto; }
.tg-sheet{
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 28px 28px 0 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
  z-index: 1060; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 -20px 60px rgba(0,0,0,.25);
  pointer-events: none;
}
.tg-sheet.open{ transform: translateY(0); pointer-events: auto; }
@media (min-width: 768px){
  .tg-sheet{ left: auto; right: 12px; bottom: 12px; width: 380px; border-radius: 28px; transform: translateY(20px); opacity: 0; }
  .tg-sheet.open{ transform: translateY(0); opacity: 1; pointer-events: auto; }
}
.tg-sheet-handle{
  width: 44px; height: 5px; background: #e5e0f0; border-radius: 999px;
  margin: 10px auto 0;
}
.tg-sheet-header{
  padding: 12px 20px 6px; display: flex; align-items: center; justify-content: space-between;
}
.tg-sheet-user{ display: flex; align-items: center; gap: 12px; }
.tg-sheet-name{ font-weight: 800; font-size: 1rem; }
.tg-sheet-sub{ color: #8b86a1; font-size: .8rem; }
.tg-sheet-close{
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: #f4f2fb; color: #1f1b2e; display: grid; place-items: center;
}
.tg-sheet-body{ padding: 12px 18px 28px; overflow-y: auto; }
.tg-sheet-section{
  background: #faf9fd; border-radius: 18px; padding: 14px 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--tg-border);
}
.tg-sheet-row-title{
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; margin-bottom: 12px; color: #1f1b2e;
}
.tg-colors{
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.tg-color{
  border: 0; background: transparent; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.tg-color::before{
  content: ""; width: 46px; height: 46px; border-radius: 50%;
  background: var(--c, #7c3aed);
  box-shadow: 0 6px 16px -6px var(--c, #7c3aed);
  position: relative;
  transition: transform .2s;
}
.tg-color-purple{ --c: #7c3aed; }
.tg-color-blue{   --c: #2563eb; }
.tg-color-green{  --c: #10b981; }
.tg-color-orange{ --c: #f97316; }
.tg-color-pink{   --c: #ec4899; }
.tg-color:hover::before{ transform: scale(1.08); }
.tg-color i{
  position: absolute; margin-top: 15px; color: #fff; font-size: 1.1rem;
  opacity: 0; transition: opacity .15s;
}
.tg-color.selected i{ opacity: 1; }
.tg-color span{ font-size: .75rem; color: #4b4560; font-weight: 600; }

.tg-langs{ display: flex; gap: 8px; flex-wrap: wrap; }
.tg-lang{
  flex: 1; min-width: 90px; text-align: center;
  padding: 10px 12px; border-radius: 12px;
  background: #fff; color: #1f1b2e; text-decoration: none;
  border: 1.5px solid #e9e4f5; font-weight: 700; font-size: .9rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tg-lang.active{ border-color: var(--tg-accent); color: var(--tg-accent); background: #f3e8ff; }

/* ---------- Home page: tg-home wrapper + panel utility (theme 14 look, بلا ما نبدلو أي خاصية) ---------- */
.tg-home{ padding: 0 12px 24px; }
.tg-home > * + *{ margin-top: 14px; }
.tg-fade-in{ animation: tgFadeIn .4s ease both; }
@keyframes tgFadeIn{ from{ opacity:0; transform: translateY(8px); } to{ opacity:1; transform:none; } }
.tg-panel{
  background: var(--tg-card, #fff); border-radius: var(--tg-radius, 22px);
  padding: 18px 14px; box-shadow: var(--tg-shadow, 0 8px 30px -14px rgba(80,60,150,.20));
  border: 1px solid var(--tg-border, rgba(124,58,237,.08));
}
.tg-panel-head{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px;
}
.tg-panel-head h6{ margin: 0; font-weight: 800; }
.tg-panel-head a{ font-size: .82rem; color: var(--tg-purple, var(--accent-color)); text-decoration: none; font-weight: 700; }
@media (min-width: 768px){ .tg-home{ padding: 0 20px 32px; } }
@media (min-width: 1024px){ .tg-home{ max-width: 1320px; margin: 0 auto; } }

/* Balance hero card + Recharge-now button */
/* ═══ بطاقة الرصيد + العمليات السريعة (بطاقة واحدة موحّدة) ═══ */
.tg-balance-combo{
  border-radius: var(--tg-radius, 22px);
  background: linear-gradient(120deg, var(--tg-purple) 0%, #9333ea 45%, var(--tg-pink) 100%);
  color: #fff; padding: 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(124,58,237,.55);
  display: flex; align-items: stretch; gap: 18px;
}
.tg-balance-combo::after{
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%);
}
.tg-bc-actions{
  flex: 1 1 40%; display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 1; min-width: 0;
}
.tg-bc-recharge{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; color: var(--tg-purple, #7c3aed); border: 0;
  border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: .98rem;
  text-decoration: none; width: fit-content; max-width: 100%;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.25); cursor: pointer;
  transition: transform .15s;
}
.tg-bc-recharge:hover{ transform: translateY(-1px); color: var(--tg-purple, #7c3aed); }
.tg-bc-recharge i{ font-size: .85rem; }
.tg-bc-icons{ display: flex; gap: 10px; }
.tg-bc-icon{
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: #fff; flex: 1; min-width: 0;
}
.tg-bc-icon-box{
  width: 100%; aspect-ratio: 1/1; border-radius: 16px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; font-size: 1.35rem;
  transition: background .15s, transform .15s;
}
.tg-bc-icon:hover .tg-bc-icon-box{ background: rgba(255,255,255,.26); transform: translateY(-2px); }
.tg-bc-icon span{ font-size: .72rem; font-weight: 700; opacity: .95; white-space: nowrap; }
.tg-bc-balance{
  flex: 1 1 60%; position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  min-width: 0;
}
.tg-bc-top{ display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tg-bc-title{ font-weight: 800; font-size: 1rem; margin: 0 0 3px; }
.tg-bc-sub{ opacity: .8; font-size: .76rem; margin: 0; }
.tg-bc-wallet-icon{
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.2rem;
}
.tg-bc-amount-wrap{ margin-top: 14px; }
.tg-bc-label{ font-size: .78rem; opacity: .85; display: block; margin-bottom: 4px; }
.tg-bc-amount{
  font-size: clamp(1.35rem, 4.4vw, 1.9rem); font-weight: 900; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tg-bc-amount .bi-eye{ opacity: .8; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
@media (max-width: 480px){
  .tg-balance-combo{ padding: 16px; gap: 12px; }
  .tg-bc-icon-box{ font-size: 1.1rem; border-radius: 13px; }
  .tg-bc-icon span{ font-size: .64rem; }
  .tg-bc-recharge{ padding: 10px 14px; font-size: .86rem; }
  .tg-bc-wallet-icon{ width: 36px; height: 36px; font-size: 1rem; }
}

.tg-quick-main{
  align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--tg-purple), #9333ea);
  color: #fff; border: 0; width: 100%; cursor: pointer;
  font-weight: 800; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(124,58,237,.6);
  transition: transform .15s;
}
.tg-quick-main:hover{ transform: translateY(-1px); color: #fff; }
.tg-quick-main .bi-plus-lg{
  background: rgba(255,255,255,.2); padding: 6px; border-radius: 50%; font-size: .95rem;
}
.tg-quick-actions{
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.tg-qa{
  background: #fff; border-radius: 16px; padding: 14px 6px;
  border: 1px solid var(--tg-border, rgba(124,58,237,.08)); text-align: center;
  text-decoration: none; color: #1f1b2e;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .15s, border-color .2s;
}
.tg-qa:hover{ transform: translateY(-2px); border-color: var(--tg-purple); color: #1f1b2e; }
.tg-qa i{
  width: 46px; height: 46px; border-radius: 14px;
  background: #f3e8ff; color: var(--tg-purple);
  display: grid; place-items: center; font-size: 1.25rem;
}
.tg-qa span{ font-size: .8rem; font-weight: 700; }

/* Ripple عند الضغط */
.tg-ripple{ position: relative; overflow: hidden; }
.tg-ripple .rp{
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255,255,255,.5); pointer-events: none;
  animation: tgRp .55s ease-out;
}
@keyframes tgRp{ to{ transform: scale(3); opacity: 0; } }

/* ═══ بطاقتا Flexy / ADSL القابلتان للتبديل ═══ */
.tg-swap{
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  position: relative;
}
.tg-swap-card{
  border-radius: var(--tg-radius, 22px); padding: 20px 18px;
  color: var(--default-color); text-decoration: none; min-height: 130px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--tg-border, rgba(124,58,237,.08));
  box-shadow: var(--tg-shadow, 0 8px 30px -14px rgba(80,60,150,.20));
  transition: transform .4s cubic-bezier(.4,0,.2,1), box-shadow .3s;
}
.tg-swap-card:hover{ transform: translateY(-2px); color: var(--default-color); }
.tg-swap-card h5{ font-weight: 900; font-size: 1.15rem; margin: 0 0 4px; }
.tg-swap-card p{ margin: 0; font-size: .8rem; opacity: .85; max-width: 75%; }
.tg-swap-card .tg-swap-arrow{
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(124,58,237,.1); color: var(--tg-purple, var(--accent-color));
  display: grid; place-items: center;
  margin-top: 10px;
}
.tg-swap-adsl .tg-swap-arrow{ background: rgba(236,72,153,.1); color: #ec4899; }
.tg-swap-card .tg-swap-illu{
  position: absolute; bottom: -10px; left: -6px; font-size: 4.5rem; line-height: 1;
  color: var(--tg-purple, var(--accent-color)); opacity: .16;
}
.tg-swap-adsl .tg-swap-illu{ color: #ec4899; }
.tg-swap-card.has-illu-img{
  padding: 0; min-height: 0; display: block;
}
.tg-swap-card .tg-swap-illu-img{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0; pointer-events: none;
}
.tg-swap-card.has-illu-img .tg-swap-illu-img{
  position: static; width: 100%; height: auto; display: block;
  object-fit: contain; pointer-events: auto;
}
.tg-swap-card.has-illu-img > div{ display: none; }
.tg-swap-card.has-illu-img > .tg-swap-arrow{
  position: absolute; bottom: 10px; left: 10px; z-index: 2; margin-top: 0;
}
.tg-swap-btn{
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--tg-purple, var(--accent-color));
  display: grid; place-items: center; font-size: 1.1rem;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,.3);
  cursor: pointer; z-index: 2;
  transition: transform .4s;
}
.tg-swap-btn:hover{ transform: rotate(180deg); }
.tg-swap.swapped .tg-swap-card:first-child{ order: 3; }
.tg-swap.swapped .tg-swap-card:last-child{ order: 1; }
@media (max-width: 480px){
  .tg-swap-card{ padding: 14px 14px; min-height: 92px; }
  .tg-swap-card h5{ font-size: .95rem; }
  .tg-swap-card p{ font-size: .7rem; }
  .tg-swap-card .tg-swap-arrow{ width: 26px; height: 26px; margin-top: 6px; }
}

/* ═══ قسم الألعاب — تمرير أفقي ═══ */
.tg-games{
  background: #fff; border-radius: var(--tg-radius, 22px);
  padding: 16px 0 16px 16px; box-shadow: var(--tg-shadow, 0 8px 30px -14px rgba(80,60,150,.20));
  border: 1px solid var(--tg-border, rgba(124,58,237,.08));
}
.tg-games-head{
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 4px; padding-right: 16px; margin-bottom: 12px;
}
.tg-games-head h6{ margin: 0; font-weight: 800; }
.tg-games-head a{ font-size: .82rem; color: var(--tg-purple, var(--accent-color)); text-decoration: none; font-weight: 700; }
.tg-games-scroll{
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 8px 4px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.tg-games-scroll::-webkit-scrollbar{ display: none; }
.tg-game{
  flex: 0 0 auto; width: 104px; scroll-snap-align: start;
  text-decoration: none; color: #1f1b2e; text-align: center;
  display: flex; flex-direction: column; gap: 8px;
}
.tg-game-thumb{
  width: 104px; height: 104px; border-radius: 20px;
  background: linear-gradient(135deg, #f3e8ff, #fce7f3);
  display: grid; place-items: center; overflow: hidden;
  font-size: 2.5rem; position: relative;
  border: 1px solid var(--tg-border, rgba(124,58,237,.08));
}
.tg-game-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.tg-game-name{ font-size: .78rem; font-weight: 700; line-height: 1.2; }

.tg-sheet-item{
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px; text-decoration: none; color: #1f1b2e;
  border-bottom: 1px solid #f0edf7;
  width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: inherit;
  font-family: inherit; cursor: pointer;
}
.tg-sheet-item:last-child{ border-bottom: 0; }
.tg-sheet-item > i{ font-size: 1.15rem; color: var(--tg-accent); width: 24px; text-align: center; }
.tg-sheet-item-text{ flex: 1; }
.tg-sheet-item-text small{ color: #8b86a1; font-size: .78rem; }
.tg-sheet-item-chev{ color: #b8b3c9 !important; font-size: .9rem !important; }
.tg-sheet-item-danger, .tg-sheet-item-danger > i{ color: #ef4444 !important; }