/* ==========================================================================
   Telegram Mini App — Complete Platform Navigation & Admin Dashboard CSS
   ========================================================================== */

/* ── Telegram WebApp Theme Variables & Global Reset ──────────────────────── */
:root {
  --page-bg: #0B1220;
  --card-bg: #131C30;
  --card-border: #26324D;
  --nav-bg: #1A2540;
  --text-main: #EAF0FA;
  --text-muted: #8E9BB8;
  --accent-gold: #F2B544;
  --accent-blue: #34B3E4;
  --accent-purple: #8b5cf6;
  --tg-theme-bg-color: #0B1220;
  --tg-theme-secondary-bg-color: #131C30;
  --tg-theme-text-color: #EAF0FA;
  --tg-theme-hint-color: #8E9BB8;
  --tg-theme-button-color: #34B3E4;
  --tg-theme-button-text-color: #ffffff;
  --tg-theme-link-color: #34B3E4;
  --success-color: #4cd964;
  --error-color: #ef5350;
  --warning-color: #F2B544;
  --card-border-subtle: #26324D;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Cairo', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background-color: #0B1220;
  color: #EAF0FA;
  direction: rtl;
}

body {
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

a {
  color: var(--accent-blue, #34B3E4);
  text-decoration: none;
}

/* ── Scrollbar Customization ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* ── Header (Compact Flex) ───────────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 100;
  background-color: #0B1220;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 6px;
  border-bottom: 1px solid rgba(38, 50, 77, 0.45);
  flex-shrink: 0;
}

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34B3E4 0%, #5B6CF0 100%);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(52, 179, 228, 0.3);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 1px;
}

.user-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #EAF0FA;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-vip-sub {
  font-size: 11px;
  font-weight: 800;
  color: #F2B544;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Balance Badge */
.balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #131C30;
  border: 1px solid #26324D;
  border-radius: 10px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 800;
  color: #EAF0FA;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.balance-badge .balance-curr {
  font-size: 10.5px;
  font-weight: 700;
  color: #8E9BB8;
}
.balance-badge .balance-num {
  color: #EAF0FA;
  font-weight: 800;
}
.balance-badge:hover {
  border-color: #34B3E4;
}

/* Header Square 38px Buttons */
.header-square-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.header-square-btn:active {
  transform: scale(0.92);
}

.btn-fav-header {
  background: linear-gradient(135deg, #FF6B8B 0%, #FFA26B 100%);
  box-shadow: 0 3px 12px rgba(255, 107, 139, 0.35);
}

.btn-admin-header {
  background: linear-gradient(135deg, #8B5CF6 0%, #D946EF 100%);
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.35);
}

/* ── Welcome Hero Banner ─────────────────────────────────────────────────── */
.welcome-banner-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 26, 46, 0.95) 0%, rgba(19, 28, 48, 0.98) 50%, rgba(24, 34, 58, 0.95) 100%);
  border: 1px solid rgba(242, 181, 68, 0.28);
  border-radius: 18px;
  padding: 18px 18px 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Watermark logo */
.welcome-banner-watermark {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
  pointer-events: none;
  z-index: 0;
}
.welcome-banner-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.12;
  filter: drop-shadow(0 0 14px rgba(242, 181, 68, 0.25));
}

.welcome-banner-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.welcome-banner-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.45;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.welcome-banner-desc {
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  line-height: 1.6;
}

/* ── Service Quick Selector Cards — 2-Column Square Grid ───────────────── */
.services-container {
  overflow: visible;
  padding: 0 0 20px 0;
  width: 100%;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 12px;
}

/* Base service card */
.service-card {
  background: #131C30;
  border: 1px solid #26324D;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.service-card:active {
  transform: scale(0.95);
}

/* ── Square cards (aspect-ratio 1/1) ─────────────────────────────────── */
.sc-square {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 10px 12px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  box-sizing: border-box;
  gap: 0;
}

/* SVG illustration area */
.sc-sq-img {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.sc-sq-img svg {
  width: 100%;
  height: 100%;
  transition: transform 0.2s ease;
}
.sc-square:hover .sc-sq-img svg {
  transform: scale(1.08);
}

.sc-sq-title {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  margin-bottom: 3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.sc-sq-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #8E9BB8;
  line-height: 1.25;
}

.sc-sq-coming {
  color: #22C55E;
  font-weight: 700;
  animation: bambooPulse 2s ease-in-out infinite;
}

/* Accent colors & themes per card type */
.sc-esim {
  border-color: rgba(242, 181, 68, 0.35);
  background: linear-gradient(145deg, rgba(242, 181, 68, 0.07) 0%, #131C30 100%);
}
.sc-esim:hover {
  border-color: rgba(242, 181, 68, 0.75);
  box-shadow: 0 4px 18px rgba(242, 181, 68, 0.16);
}

.sc-topup {
  border-color: rgba(52, 179, 228, 0.35);
  background: linear-gradient(145deg, rgba(52, 179, 228, 0.07) 0%, #131C30 100%);
}
.sc-topup:hover {
  border-color: rgba(52, 179, 228, 0.75);
  box-shadow: 0 4px 18px rgba(52, 179, 228, 0.16);
}

.sc-lifecell {
  border-color: rgba(52, 199, 89, 0.32);
  background: linear-gradient(145deg, rgba(52, 199, 89, 0.07) 0%, #131C30 100%);
}
.sc-lifecell:hover {
  border-color: rgba(52, 199, 89, 0.7);
  box-shadow: 0 4px 18px rgba(52, 199, 89, 0.16);
}

.sc-turkcell {
  border-color: rgba(255, 69, 58, 0.32);
  background: linear-gradient(145deg, rgba(255, 69, 58, 0.07) 0%, #131C30 100%);
}
.sc-turkcell:hover {
  border-color: rgba(255, 69, 58, 0.7);
  box-shadow: 0 4px 18px rgba(255, 69, 58, 0.16);
}

.sc-semiauto {
  border-color: rgba(163, 113, 247, 0.32);
  background: linear-gradient(145deg, rgba(163, 113, 247, 0.07) 0%, #131C30 100%);
}
.sc-semiauto:hover {
  border-color: rgba(163, 113, 247, 0.7);
  box-shadow: 0 4px 18px rgba(163, 113, 247, 0.16);
}

.sc-games {
  border-color: rgba(255, 159, 10, 0.32);
  background: linear-gradient(145deg, rgba(255, 159, 10, 0.07) 0%, #131C30 100%);
}
.sc-games:hover {
  border-color: rgba(255, 159, 10, 0.7);
  box-shadow: 0 4px 18px rgba(255, 159, 10, 0.16);
}

.sc-bamboo {
  border-color: rgba(34, 197, 94, 0.35);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.07) 0%, #131C30 100%);
}
.sc-bamboo:hover {
  border-color: rgba(34, 197, 94, 0.75);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.16);
}

.sc-coinsbee {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.07) 0%, #131C30 100%);
}
.sc-coinsbee:hover {
  border-color: rgba(99, 102, 241, 0.75);
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.16);
}

.sc-esimgo {
  border-color: rgba(6, 182, 212, 0.35);
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.07) 0%, #131C30 100%);
}
.sc-esimgo:hover {
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.16);
}

.sc-tremendous {
  border-color: rgba(236, 72, 153, 0.35);
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.07) 0%, #131C30 100%);
}
.sc-tremendous:hover {
  border-color: rgba(236, 72, 153, 0.75);
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.16);
}

.sc-neloxi {
  border-color: rgba(249, 115, 22, 0.35);
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.07) 0%, #131C30 100%);
}
.sc-neloxi:hover {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.16);
}

.sc-favorites {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.07) 0%, #131C30 100%);
}
.sc-favorites:hover {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.16);
}

/* Keep old classes functional for any remaining references */
.bamboo-coming-badge {
  font-size: 9px;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
  animation: bambooPulse 2s ease-in-out infinite;
}
@keyframes bambooPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.service-card-main {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-gold  { background: rgba(242,181,68,0.08);  border-radius: 9px; width: 32px; height: 32px; }
.icon-blue  { background: rgba(52,179,228,0.08);  border-radius: 9px; width: 32px; height: 32px; }
.icon-green { background: rgba(34,197,94,0.10);   border-radius: 9px; width: 32px; height: 32px; }

.service-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #EAF0FA;
  letter-spacing: 0.1px;
  line-height: 1.25;
}

.service-label-2x2 {
  font-size: 11.5px;
  font-weight: 700;
  color: #EAF0FA;
  line-height: 1.25;
}

/* Search Container */
.search-container {
  position: relative;
  width: 100%;
  padding: 8px 14px;
}

.search-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--tg-theme-hint-color, #7f91a4);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--tg-theme-text-color, #ffffff);
  padding: 9px 36px 9px 12px;
  font-size: 13px;
}

.search-input:focus {
  border-color: var(--tg-theme-button-color, #2481cc);
}

/* Category Filter Pills */
.categories-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 14px 8px;
  scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex-shrink: 0;
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #7f91a4);
  white-space: nowrap;
}

.cat-pill.active {
  background-color: var(--tg-theme-button-color, #2481cc);
  border-color: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
  font-weight: 700;
}

/* ── eSIM Go widget styles ─────────────────────────────────────────── */
.chip {
  display: inline-block;
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #e1e8f0);
}

.chip-5g {
  background-color: rgba(76, 217, 100, 0.12);
  border-color: rgba(76, 217, 100, 0.5);
  color: #4cd964;
}

.chip-active {
  background-color: rgba(76, 217, 100, 0.18);
  border-color: #4cd964;
  color: #4cd964;
  font-weight: 800;
}

.btn-country {
  transition: transform 0.08s ease, border-color 0.12s ease;
}
.btn-country:hover,
.btn-country:active {
  border-color: var(--tg-theme-button-color, #2481cc);
  transform: translateY(-1px);
}

/* ── Product Grid ────────────────────────────────────────────────────────── */
.section-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-theme-hint-color, #7f91a4);
  padding: 8px 14px 2px;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 8px 14px 20px;
}

.product-card {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--card-border);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.product-card:active {
  transform: scale(0.97);
}

.product-img-wrap {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.country-tag {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
  color: #ffffff;
}

.product-brand {
  font-size: 9px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 2px;
}

.product-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #ffffff);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-tag {
  align-self: flex-start;
  background: rgba(76, 217, 100, 0.12);
  border: 1px solid rgba(76, 217, 100, 0.25);
  color: var(--success-color, #4cd964);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}

.btn-buy {
  background-color: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
  border-radius: 8px;
  padding: 7px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  width: 100%;
}

/* ── Tab Views Container ─────────────────────────────────────────────────── */
.tab-view {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

#tab-home.active {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 14px calc(env(safe-area-inset-bottom, 0px) + 84px) 14px;
}

.tab-view:not(#tab-home) {
  padding: 12px 14px calc(env(safe-area-inset-bottom, 0px) + 84px) 14px;
}

.tab-view:not(#tab-home).active {
  display: block;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Wallet Tab ──────────────────────────────────────────────────────────── */
.wallet-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2e1065 0%, #4c1d95 45%, #1e3a8a 100%);
  border-radius: 22px;
  padding: 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(76, 29, 149, 0.35), inset 0 -2px 12px rgba(6, 182, 212, 0.3);
  margin-bottom: 16px;
}

.wallet-card::before {
  content: '';
  position: absolute;
  top: -25px;
  left: -25px;
  width: 150px;
  height: 150px;
  background-image: url('/assets/store_logo.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.5));
}

.wallet-card-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
  font-weight: 600;
}

.wallet-card-amount {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.deposit-form-card {
  background: var(--tg-theme-secondary-bg-color, #ffffff);
  border-radius: 20px;
  padding: 18px 16px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 6px;
}

.form-select, .form-input {
  width: 100%;
  background-color: var(--tg-theme-bg-color, #18222d);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--tg-theme-text-color, #ffffff);
  padding: 10px 12px;
  font-size: 13px;
}

.form-select:focus, .form-input:focus {
  border-color: var(--tg-theme-button-color, #2481cc);
}

.qr-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
  width: 130px;
  height: 130px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
}

.wallet-address-box {
  background: var(--tg-theme-bg-color, #18222d);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  font-family: monospace;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-submit-deposit {
  width: 100%;
  background-color: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Orders Tab ──────────────────────────────────────────────────────────── */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-item-card {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 12px 14px;
}

.order-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-theme-button-color, #2481cc);
}

.order-status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
}

.order-status-pending { background: rgba(255, 183, 77, 0.15); color: var(--warning-color, #ffb74d); }
.order-status-completed { background: rgba(76, 217, 100, 0.15); color: var(--success-color, #4cd964); }
.order-status-cancelled { background: rgba(239, 83, 80, 0.15); color: var(--error-color, #ef5350); }

/* ── Admin Internal Profit Box (admin-only, never shown to customers) ── */
.admin-profit-box {
  margin: 8px 0 4px;
  padding: 8px 10px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 10px;
}
.admin-profit-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-theme-button-color, #2481cc);
  margin-bottom: 4px;
}
.admin-profit-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 2px 0;
  color: var(--tg-theme-hint-color, #8b99a6);
}
.admin-profit-row span:last-child {
  font-weight: 600;
  color: var(--tg-theme-text-color, #fff);
}
.admin-profit-net span:last-child {
  color: #4cd964;
  font-weight: 700;
}

.order-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #ffffff);
  margin-bottom: 4px;
}

.order-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-top: 6px;
}

/* ── Support Tab ─────────────────────────────────────────────────────────── */
.support-card {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--card-border);
  margin-bottom: 14px;
  text-align: center;
}

.support-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
}

.support-desc {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 16px;
  line-height: 1.5;
}

.support-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-support-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--tg-theme-button-color, #2481cc);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

/* ── Fixed Bottom Navigation Bar (Curved Notch with Elevated Center Logo) ── */
.bottom-nav {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  left: 10px;
  right: 10px;
  height: 62px;
  z-index: 910;
  display: grid;
  grid-template-columns: 1fr 1fr 84px 1fr 1fr;
  align-items: center;
  background: transparent;
  border-radius: 22px;
  border-bottom: 1.5px solid #26324D;
  border-left: 1.5px solid #26324D;
  border-right: 1.5px solid #26324D;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Background with smooth central dipped notch curve */
.bottom-nav-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 62px;
  pointer-events: none;
  z-index: 0;
  display: flex;
  border-radius: 22px;
  overflow: hidden;
}

.bottom-nav-wing-right {
  flex: 1;
  height: 100%;
  background: #1A2540;
  border-top: 1.5px solid #26324D;
  border-top-right-radius: 22px;
}

.bottom-nav-dip-wrap {
  width: 84px;
  height: 62px;
  position: relative;
  flex-shrink: 0;
}

.bottom-nav-dip-svg {
  width: 84px;
  height: 62px;
  display: block;
}

.bottom-nav-dip-fill {
  fill: #1A2540;
}

.bottom-nav-dip-stroke {
  fill: none;
  stroke: #26324D;
  stroke-width: 1.5;
}

.bottom-nav-wing-left {
  flex: 1;
  height: 100%;
  background: #1A2540;
  border-top: 1.5px solid #26324D;
  border-top-left-radius: 22px;
}

.bottom-nav .nav-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: #8E9BB8;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.bottom-nav .nav-item:active {
  transform: scale(0.93);
}

.bottom-nav .nav-item.active {
  color: #F2B544;
  font-weight: 800;
}

/* Gold active indicator line at the top */
.bottom-nav .nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background: #F2B544;
  border-radius: 0 0 3px 3px;
  box-shadow: 0 2px 8px rgba(242, 181, 68, 0.65);
}

.bottom-nav .nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.bottom-nav .nav-item.active .nav-icon {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(242, 181, 68, 0.5));
}

.bottom-nav .nav-item .nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

/* ── Center Slot & Elevated Logo Circle ──────────────────────────────────── */
.bottom-nav .nav-center-slot {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-center-circle {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0B1220;
  border: 3px solid #34B3E4;
  box-shadow: 0 0 18px rgba(52, 179, 228, 0.55);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.nav-center-circle:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 0 24px rgba(52, 179, 228, 0.75);
}

.nav-center-circle:active {
  transform: translateX(-50%) scale(0.94);
}

.nav-circle-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── Admin Dashboard Overlay & Subtabs ───────────────────────────────────── */
.admin-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--tg-theme-bg-color, #18222d);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.admin-overlay.active {
  display: flex;
}

.admin-header {
  position: sticky;
  top: 0;
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  z-index: 10;
}

.admin-title {
  font-size: 16px;
  font-weight: 800;
  color: #ff5252;
}

.admin-subnav {
  display: flex;
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border-bottom: 1px solid var(--card-border);
  overflow-x: auto;
}

.admin-subtab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--tg-theme-hint-color, #7f91a4);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.admin-subtab.active {
  color: var(--tg-theme-button-color, #2481cc);
  border-bottom-color: var(--tg-theme-button-color, #2481cc);
  font-weight: 700;
}

.admin-content {
  padding: 14px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--card-border);
}

.stat-label {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--tg-theme-text-color, #ffffff);
}

/* Admin Back Button */
.admin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-theme-text-color);
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-back-btn:hover {
  background: rgba(255,255,255,0.12);
}
.admin-back-btn:active {
  transform: scale(0.96);
}

/* ── Modals & Drawers ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  background-color: var(--tg-theme-bg-color, #18222d);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 18px 16px 28px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  border-top: 1px solid var(--card-border);
}

.modal-overlay.active .drawer {
  transform: translateY(0);
}

.drawer-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 14px;
}

.denom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

/* Bitrefill packages grid (compact card layout) */
.bitrefill-packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
}

.bitrefill-pkg-card {
  background: var(--tg-theme-bg-color, #18222d);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
  min-height: 64px;
}

.bitrefill-pkg-card:active {
  transform: scale(0.96);
  border-color: var(--tg-theme-button-color, #2481cc);
  box-shadow: 0 0 0 2px rgba(36, 129, 204, 0.25);
}

.bitrefill-pkg-value {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  color: var(--tg-theme-text-color);
  word-break: break-word;
}

.bitrefill-pkg-price {
  font-size: 11px;
  font-weight: 800;
  color: #4cd964;
}

.denom-chip {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 2px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.denom-chip.selected {
  border-color: var(--tg-theme-button-color, #2481cc);
  background-color: rgba(36, 129, 204, 0.18);
}

.btn-confirm-action {
  width: 100%;
  background-color: var(--tg-theme-button-color, #2481cc);
  color: var(--tg-theme-button-text-color, #ffffff);
  border-radius: 12px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* Spinner & Toast */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--tg-theme-button-color, #2481cc);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 30px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast-msg {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toast-msg.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Custom Avatar & Preset Selector ────────────────────────────────────── */
.avatar-preset-btn {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.avatar-preset-btn:active, .avatar-preset-btn.selected {
  transform: scale(1.1);
  border-color: var(--tg-theme-button-color, #2481cc);
  background-color: rgba(36, 129, 204, 0.2);
}

/* ── Dynamic Package Cards Grid ─────────────────────────────────────────── */
.package-card-item {
  background-color: var(--tg-theme-bg-color, #18222d);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.2s ease;
}

.package-card-item:hover {
  border-color: var(--tg-theme-button-color, #2481cc);
}

/* ── Weekly Payments Table & Summary ────────────────────────────────────── */
.weekly-day-card {
  background: var(--tg-theme-bg-color, #18222d);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.weekly-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.weekly-day-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  font-size: 11px;
  color: var(--tg-theme-hint-color);
}

/* ── Coinsbee Catalog UI Custom Components ────────────────────────────── */
.coinsbee-region-wrap {
  margin-bottom: 10px;
}

.coinsbee-select {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  color: var(--tg-theme-text-color, #ffffff);
  border: 1px solid var(--card-border);
  outline: none;
  width: 100%;
}

.coinsbee-card {
  background-color: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.coinsbee-card:hover {
  transform: translateY(-2px);
  border-color: var(--tg-theme-button-color, #2481cc);
}

.coinsbee-card.disabled {
  opacity: 0.6;
  filter: grayscale(0.4);
  cursor: not-allowed;
}

.coinsbee-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 68%;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.coinsbee-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.coinsbee-card-img-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  background: linear-gradient(135deg, #1a2a3d 0%, #243b53 55%, #16283c 100%);
}

.esim-img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, #1a2a3d 0%, #243b53 55%, #16283c 100%);
}

.badge-out-of-stock {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(239, 83, 80, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.badge-in-stock {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(76, 217, 100, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.badge-days {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  direction: rtl;
}

.coinsbee-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.coinsbee-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--tg-theme-text-color, #ffffff);
  margin-bottom: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.coinsbee-card-sub {
  font-size: 10px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 8px;
}

.coinsbee-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.coinsbee-card-price {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-color, #ffaa00);
}

.btn-buy-mini {
  background-color: var(--tg-theme-button-color, #2481cc);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Denomination Chips & Counter */
.denom-chip {
  background: var(--tg-theme-bg-color, #18222d);
  color: var(--tg-theme-text-color, #ffffff);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.denom-chip.active {
  background: var(--tg-theme-button-color, #2481cc);
  border-color: var(--tg-theme-button-color, #2481cc);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(36, 129, 204, 0.4);
}

.btn-qty {
  background: var(--tg-theme-secondary-bg-color, #212d3b);
  color: var(--tg-theme-text-color, #ffffff);
  border: 1px solid var(--card-border);
  cursor: pointer;
}

/* ── Coinsbee Drawer / Bottom-Sheet Overlay (منبثقة فوق كل شيء) ─────────── */
.drawer-overlay,
.region-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-content {
  background-color: var(--tg-theme-bg-color, #18222d);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  border-top: 1px solid var(--card-border);
  animation: slideUp 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
}

.drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--tg-theme-text-color, #ffffff);
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: var(--tg-theme-hint-color, #7f91a4);
  font-size: 18px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── زر اختيار الدولة (زر واحد → قائمة منبثقة) ───────────────────────────── */
.coinsbee-region-wrap {
  margin-bottom: 10px;
}

.region-pick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  background: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--tg-theme-text-color, #ffffff);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.region-pick-btn:hover {
  border-color: var(--tg-theme-button-color, #2481cc);
}

.region-pick-icon {
  font-size: 16px;
}

.region-pick-label {
  flex: 1;
  text-align: right;
}

.region-pick-label b {
  color: var(--accent-color, #ffaa00);
}

.region-pick-caret {
  color: var(--tg-theme-hint-color, #7f91a4);
  font-size: 12px;
}

.region-pop {
  padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
}

.region-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  font-size: 15px;
  font-weight: 800;
}

.region-pop-list {
  padding: 8px 12px;
  max-height: 52vh;
  overflow-y: auto;
}

.region-pop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 10px;
  margin-bottom: 6px;
  background: var(--tg-theme-secondary-bg-color, #212d3b);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--tg-theme-text-color, #ffffff);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
}

.region-pop-item.active {
  border-color: var(--accent-color, #ffaa00);
  background: rgba(255, 170, 0, 0.1);
}

.region-pop-check {
  color: var(--accent-color, #ffaa00);
  font-size: 16px;
}

/* ════════════════════════════════════════════════════════════════
   Modal Cards — unified, theme-aligned redesign
   ════════════════════════════════════════════════════════════════ */
.result-card {
  position: relative;
  background: linear-gradient(155deg, var(--tg-theme-bg-color, #18222d), var(--tg-theme-secondary-bg-color, #212d3b));
  color: var(--tg-theme-text-color, #fff);
  border: 1px solid var(--card-border, rgba(255,255,255,0.08));
  border-radius: 22px;
  padding: 24px 20px 22px;
  max-width: 92vw;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 24px 56px rgba(0,0,0,0.45);
  margin: 12px auto 0;
}

/* gradient top accent frame */
.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, var(--tg-theme-button-color, #2481cc), var(--accent-purple, #8b5cf6));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: destination-out;
  pointer-events: none;
}

.result-card > * { position: relative; z-index: 1; }

/* result / confirmation icon */
.result-icon {
  --size: 84px;
  width: var(--size);
  height: var(--size);
  margin: 4px auto 12px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: radial-gradient(135deg, rgba(36,129,204,.25), rgba(139,92,246,.20));
  border: 1px solid var(--card-border);
}

/* success icon frame green */
.result-card.success .result-icon {
  background: radial-gradient(135deg, rgba(76,217,100,.28), rgba(36,129,204,.18));
  border-color: rgba(76,217,100,.35);
}

/* pending icon frame blue */
.result-card.pending .result-icon {
  background: radial-gradient(135deg, rgba(36,129,204,.28), rgba(139,92,246,.18));
  border-color: rgba(36,129,204,.35);
}

.result-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.result-subtitle {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin: 0 0 14px;
  line-height: 1.4;
}

/* product/summary info box inside confirm modal */
.confirm-summary {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 14px 10px;
  margin-bottom: 14px;
  text-align: right;
}
.confirm-summary .label {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin: 4px 0;
}
.confirm-summary .value {
  font-size: 14px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #fff);
}
.confirm-cost-banner {
  background: linear-gradient(135deg, rgba(76,217,100,.14), rgba(36,129,204,.12));
  border: 1px solid rgba(76,217,100,.35);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 14px 0;
  text-align: center;
}
.confirm-cost-banner .cost {
  font-size: 20px;
  font-weight: 800;
  color: var(--success-color, #4cd964);
}

/* balance row inside confirm */
.confirm-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
.confirm-balance .label { color: var(--tg-theme-hint-color, #7f91a4); }
.confirm-balance .amount { font-weight: 800; }

/* modal action button row */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.modal-actions .btn-confirm-action { flex: 1.15; }
.modal-actions .btn-ghost {
  flex: 1;
  background: rgba(255,255,255,0.08);
  color: var(--tg-theme-text-color, #fff);
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

/* bottom close button in result card (kept in normal flow) */
.btn-close-result {
  margin-top: 16px;
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--card-border);
  color: var(--tg-theme-hint-color, #7f91a4);
  border-radius: 12px;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}
.btn-close-result:hover {
  background: rgba(255,255,255,0.16);
  color: var(--tg-theme-text-color, #fff);
}

/* code boxes (delivery codes) — unified look */
.code-box {
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease;
}
.code-box:hover { background: rgba(255,255,255,0.07); }
.code-box-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--tg-theme-hint-color, #7f91a4);
  margin-bottom: 4px;
}
.code-box-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
  color: var(--tg-theme-text-color, #fff);
}

/* pending timeline indicator */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tg-theme-hint-color, #7f91a4);
}
.status-dot .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--tg-theme-button-color, #2481cc);
  box-shadow: 0 0 8px rgba(36,129,204,.55);
}



/* ── AI Assistant Chat (Floating Robot Button) ───────────────────── */
.ai-fab {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + 62px + 14px);
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 920;
  background: linear-gradient(135deg, #34B3E4 0%, #5B6CF0 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-fab:active {
  transform: scale(0.92);
}

.ai-chat-panel {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px + 62px + 74px);
  right: 14px;
  width: min(440px, calc(100vw - 24px));
  height: min(580px, 75vh);
  max-height: 75vh;
  display: none;
  flex-direction: column;
  z-index: 9999;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.ai-chat-panel.open { display: flex; }
.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff !important;
  border-bottom: 1px solid #334155;
}
.ai-chat-close {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.ai-chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  background: #f8fafc !important;
}
.ai-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.ai-msg.bot {
  align-self: flex-start;
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.ai-msg.typing { opacity: 0.7; font-style: italic; color: #64748b !important; }
.ai-msg.error { background: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #fecaca; }
.ai-quick-prompts {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  white-space: nowrap;
  border-top: 1px solid #e2e8f0;
  background: #ffffff !important;
  scrollbar-width: none;
}
.ai-quick-prompts::-webkit-scrollbar { display: none; }
.ai-prompt-chip {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.ai-prompt-chip:active {
  transform: scale(0.96);
  background: #2563eb !important;
  color: #ffffff !important;
}
.ai-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff !important;
}
.ai-chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s;
}
.ai-chat-input-row input:focus {
  border-color: #2563eb !important;
  background: #ffffff !important;
}
.ai-chat-input-row input::placeholder {
  color: #94a3b8 !important;
}
.ai-chat-send {
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.ai-chat-send:active { transform: scale(0.96); }
.ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-prod-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.ai-prod-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569 !important;
}
.ai-prod-chip {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.ai-prod-chip:active { opacity: 0.8; }

/* ── Favorites (المفضلة) ─────────────────────────────── */
.btn-fav {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.btn-fav.active { background: #e0245e; }
.btn-fav-inline {
  position: static;
  width: auto;
  min-width: 38px;
  height: auto;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 13px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   AlShaghrie Telecom — Luxury Brand Theme & Unified Navigation Tabs
   ══════════════════════════════════════════════════════════════════════════ */

/* Hero Banner with Animated Ambient Watermark */
.hero-brand-banner {
  margin: 10px 14px 14px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, #3b0764 0%, #581c87 35%, #6d28d9 65%, #0284c7 100%);
  padding: 32px 18px 28px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(88, 28, 135, 0.4), inset 0 -3px 14px rgba(6, 182, 212, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-watermark-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  background-image: url('/assets/store_logo.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  opacity: 0.16;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: drop-shadow(0 0 24px rgba(6, 182, 212, 0.5));
  animation: logoWatermarkPulse 9s infinite ease-in-out;
}

@keyframes logoWatermarkPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 0.15; }
  50% { transform: translate(-50%, -50%) scale(1.06) rotate(1.5deg); opacity: 0.22; }
}

.hero-wave-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.2), transparent 45%),
              radial-gradient(circle at 15% 95%, rgba(6,182,212,0.32), transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(139,92,246,0.18), transparent 60%);
}

.hero-content-wrap {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 6px;
  font-weight: 600;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ── Unified Pill Navigation for All Service Hubs & Tabs ─────────────────── */
.esim-hub-tab, .topup-hub-tab, .semi-auto-hub-tab, .games-hub-tab {
  flex-shrink: 0;
  padding: 8px 16px !important;
  border-radius: 24px !important;
  border: 1.5px solid rgba(139, 92, 246, 0.35) !important;
  background: var(--tg-theme-secondary-bg-color, #ffffff) !important;
  color: var(--tg-theme-text-color, #1e1b4b) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease !important;
}

.esim-hub-tab:hover, .topup-hub-tab:hover, .semi-auto-hub-tab:hover, .games-hub-tab:hover {
  border-color: rgba(6, 182, 212, 0.7) !important;
}

.esim-hub-tab.active, .topup-hub-tab.active, .semi-auto-hub-tab.active, .games-hub-tab.active {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #7c3aed !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35), 0 0 10px rgba(6, 182, 212, 0.45) !important;
  font-weight: 800 !important;
}

/* ── Unified Pill Buttons for Subtabs & Categories ───────────────────────── */
.cat-pill {
  flex-shrink: 0;
  background: var(--tg-theme-secondary-bg-color, #ffffff);
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-theme-text-color, #1e1b4b);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-pill.active {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  border-color: #7c3aed;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  font-weight: 800;
}

/* ── Glowing Action Buttons ──────────────────────────────────────────────── */
.btn-confirm-action, .btn-submit-deposit {
  border-radius: 24px !important;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35), 0 0 10px rgba(6, 182, 212, 0.2) !important;
  transition: all 0.2s ease !important;
  border: none !important;
}

.btn-confirm-action:hover, .btn-submit-deposit:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5), 0 0 14px rgba(6, 182, 212, 0.35) !important;
  transform: translateY(-1px);
}

/* ── Header Admin Menu & Favorites Popups ────────────────────────── */
#admin-fab-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#admin-fab-backdrop, #fav-fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#admin-fab-menu {
  position: absolute;
  top: 44px;
  left: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 1050;
  animation: adminFabSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adminFabSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 20px;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.admin-fab-item:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.admin-fab-item:active {
  transform: scale(0.97);
}

#fav-fab-bubble {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 54px);
  left: 14px;
  right: 14px;
  max-width: 420px;
  margin: 0 auto;
  max-height: calc(100dvh - 130px);
  background: #131C30;
  border: 1px solid rgba(242, 181, 68, 0.35);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(242, 181, 68, 0.16);
  z-index: 1050;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  flex-direction: column;
  animation: favBubblePop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes favBubblePop {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Responsive Rules for Short Devices (max-height: 700px) ───────────────── */
@media (max-height: 700px) {
  .welcome-banner-sub {
    display: none;
  }
  .welcome-banner-card {
    padding: 6px 12px;
    margin: 4px 0 6px 0;
  }
  .services-grid {
    gap: 8px;
  }
  .service-card-featured, .service-card-full {
    min-height: 48px;
    height: 48px;
    padding: 5px 8px;
    border-radius: 12px;
  }
  .service-card-featured .service-icon-wrap,
  .service-card-full .service-icon-wrap {
    width: 28px;
    height: 28px;
  }
  .service-card-featured .service-icon-wrap svg {
    width: 20px;
    height: 20px;
  }
  .service-card-full .service-icon-wrap svg {
    width: 18px;
    height: 18px;
  }
  .service-card-grid {
    padding: 6px 4px;
    gap: 4px;
    height: 58px;
    min-height: 58px;
    border-radius: 12px;
  }
  .service-card-grid .service-icon-wrap svg {
    width: 19px;
    height: 19px;
  }
  .service-label {
    font-size: 11px;
  }
  .service-label-2x2 {
    font-size: 11px;
  }
}

.fav-bubble-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.fav-bubble-item:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.fav-bubble-item:active {
  transform: scale(0.98);
}

/* ── Lifecell 2-Row Windows-Style Ribbon Sub-Menu ────────────────────── */
.lc-cats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(13, 22, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px;
  margin: 8px 0 14px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.lc-cat-pill {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 96px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94A3B8;
  white-space: normal;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.1px;
  user-select: none;
  box-sizing: border-box;
}

.lc-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.lc-cat-pill:active {
  transform: scale(0.96);
}

/* Distinct Activation Colors per Category */
.lc-cat-pill.active {
  font-weight: 800;
  color: #0B1220;
  background: linear-gradient(135deg, #F2B544 0%, #D4901C 100%);
  border-color: #FFD074;
  box-shadow: 0 4px 14px rgba(242, 181, 68, 0.45);
  transform: translateY(-1px);
}

/* 1. All (🌟 الكل) — Radiant Gold */
.lc-cat-pill[data-lifecell-cat="all"].active {
  background: linear-gradient(135deg, #F2B544 0%, #D4901C 100%);
  border: 1px solid #FFD074;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(242, 181, 68, 0.45);
}

/* 2. Roaming (🌍 باقات التجوال) — Ocean Sky Blue */
.lc-cat-pill[data-lifecell-cat="roaming"].active {
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
  border: 1px solid #7DD3FC;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
}

/* 3. Internet (🌐 باقات الإنترنت) — Apple Emerald Green */
.lc-cat-pill[data-lifecell-cat="internet"].active {
  background: linear-gradient(135deg, #34C759 0%, #15803D 100%);
  border: 1px solid #86EFAC;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.45);
}

/* 4. SMS (💬 باقات الرسائل) — Royal Violet */
.lc-cat-pill[data-lifecell-cat="sms"].active {
  background: linear-gradient(135deg, #A855F7 0%, #6B21A8 100%);
  border: 1px solid #D8B4FE;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.45);
}

/* 5. Topup (💰 تعبئة الرصيد) — Sunset Amber Flame */
.lc-cat-pill[data-lifecell-cat="topup"].active {
  background: linear-gradient(135deg, #FB923C 0%, #C2410C 100%);
  border: 1px solid #FDBA74;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(251, 146, 60, 0.45);
}

/* ── Unified Hub Ribbon Sub-Menu (Windows 2-Row Style for eSIM Hub) ────── */
.hub-ribbon-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(13, 22, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 10px;
  margin: 8px 0 14px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.esim-hub-tab {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 96px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94A3B8;
  white-space: normal;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.1px;
  user-select: none;
  box-sizing: border-box;
}

.esim-hub-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.esim-hub-tab:active {
  transform: scale(0.96);
}

/* Base Active State */
.esim-hub-tab.active {
  font-weight: 800;
  color: #0B1220;
  transform: translateY(-1px);
}

/* 1. Unified Search (🔍 بحث موحّد) — Luxury Gold */
.esim-hub-tab[data-provider="unified"].active {
  background: linear-gradient(135deg, #F2B544 0%, #D4901C 100%);
  border: 1px solid #FFD074;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(242, 181, 68, 0.45);
}

/* 2. MobiMatter (🛰️ MobiMatter) — Cyber Sky Blue */
.esim-hub-tab[data-provider="mobimatter"].active {
  background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
  border: 1px solid #7DD3FC;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.45);
}

/* 3. Airalo (📱 Airalo) — Sunset Coral */
.esim-hub-tab[data-provider="airalo"].active {
  background: linear-gradient(135deg, #F97316 0%, #C2410C 100%);
  border: 1px solid #FDBA74;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
}

/* 4. Citrus (🍊 Citrus) — Vibrant Citrus Orange */
.esim-hub-tab[data-provider="citrus"].active {
  background: linear-gradient(135deg, #FF9F0A 0%, #D97706 100%);
  border: 1px solid #FDE68A;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(255, 159, 10, 0.45);
}

/* 5. Yesim (🟢 Yesim) — Electric Apple Green */
.esim-hub-tab[data-provider="yesim"].active {
  background: linear-gradient(135deg, #34C759 0%, #15803D 100%);
  border: 1px solid #86EFAC;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.45);
}

/* Package count meta & rate */
.lc-meta {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #7f91a4);
  padding: 0 4px 6px;
  font-weight: 600;
}
.lc-rate-row {
  font-size: 11px;
  color: var(--tg-theme-hint-color, #7f91a4);
  padding: 0 4px 4px;
}

/* Packages grid — single column for wide rectangular cards */
.lc-packages-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 2px 60px; /* Space at bottom for floating back FAB */
}

/* Individual package card */
.lc-pkg-card {
  position: relative;
  display: flex;
  flex-direction: row; /* RTL: left is details, right is image or reverse */
  border-radius: 20px;
  overflow: hidden;
  min-height: 135px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.lc-pkg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.lc-pkg-card:active {
  transform: scale(0.985);
}

/* Vibrant Teal / Cyan Gradients matching the reference image */
.lc-pkg-card.lc-grad-1 { background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%); }
.lc-pkg-card.lc-grad-2 { background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%); }
.lc-pkg-card.lc-grad-3 { background: linear-gradient(135deg, #2dd4bf 0%, #0284c7 100%); }
.lc-pkg-card.lc-grad-4 { background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%); }
.lc-pkg-card.lc-grad-5 { background: linear-gradient(135deg, #14b8a6 0%, #8b5cf6 100%); }

/* Split layout: Logo / image side */
.lc-pkg-img-side {
  width: 36%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
}
.lc-pkg-img-side img {
  max-width: 85%;
  max-height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}
.lc-pkg-allowance-big {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin-top: 4px;
  letter-spacing: -0.5px;
}
.lc-pkg-allowance-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

/* Split layout: Content / details side */
.lc-pkg-content {
  flex: 1;
  padding: 14px 16px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.lc-pkg-title {
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  margin-bottom: 2px;
}
.lc-pkg-duration {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2px;
}
.lc-pkg-note {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
}
.lc-pkg-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.lc-details-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}
.lc-details-link:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* VIP Price Box — Top centered white VIP label + price with dollar sign directly below */
.lc-vip-badge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 3px 12px 4px;
  min-width: 64px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.38);
  text-align: center;
  line-height: 1.15;
}

.lc-vip-label {
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.lc-vip-amount {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  margin-top: 1px;
  letter-spacing: 0.2px;
  direction: ltr;
}

/* Refined Lifecell Drawer Modal */
.lc-drawer-box {
  background: var(--tg-theme-bg-color, #18222d) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  border-bottom: none !important;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6) !important;
}
.lc-drawer-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
  padding: 14px 18px !important;
}
.lc-drawer-submit-btn {
  background: linear-gradient(135deg, #d4af37, #f59e0b) !important;
  color: #18222d !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.lc-drawer-submit-btn:active {
  transform: scale(0.98);
}
.lc-drawer-input {
  border: 1.5px solid rgba(212, 175, 55, 0.4) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--tg-theme-text-color, #ffffff) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lc-drawer-input:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35) !important;
}

/* Floating Back Bubble Button */
.lc-back-fab {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  background: linear-gradient(135deg, #18222d, #212d3b);
  color: #d4af37;
  border: 1.5px solid #d4af37;
  border-radius: 30px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 12px rgba(212, 175, 55, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: lc-fab-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lc-back-fab:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 16px rgba(212, 175, 55, 0.45);
}
.lc-back-fab:active {
  transform: translateX(-50%) scale(0.96);
}
@keyframes lc-fab-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.8); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Fav heart inside lc-pkg-card */
.lc-pkg-card .btn-fav {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 3;
}

/* ── Request Admin Hub Ribbon Tabs ────────────────────────────── */
.req-admin-tab-btn {
  flex: 1 1 calc(20% - 6px);
  min-width: 88px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.req-admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
}

.req-admin-tab-btn:active {
  transform: scale(0.96);
}

.req-admin-tab-btn.active {
  font-weight: 800;
  color: #0B1220;
  transform: translateY(-1px);
}

/* LifeCell (🇺🇦 LifeCell) — Radiant Gold */
.req-admin-tab-btn[data-req-tab="lifecell"].active {
  background: linear-gradient(135deg, #F2B544 0%, #D4901C 100%);
  border: 1px solid #FFD074;
  color: #0B1220;
  box-shadow: 0 4px 14px rgba(242, 181, 68, 0.45);
}

/* Turkcell (🇹🇷 تركسيل) — Crimson Flame */
.req-admin-tab-btn[data-req-tab="turkcell"].active {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  border: 1px solid #FCA5A5;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45);
}

/* Egypt (🇪🇬 رصيد مصري) — Emerald Mint */
.req-admin-tab-btn[data-req-tab="egypt"].active {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  border: 1px solid #6EE7B7;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

/* Iran (🇮🇷 رصيد إيراني) — Royal Purple */
.req-admin-tab-btn[data-req-tab="iran"].active {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  border: 1px solid #C4B5FD;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.45);
}

/* Message (✉️ طلب خاص) — Cyan Sky */
.req-admin-tab-btn[data-req-tab="message"].active {
  background: linear-gradient(135deg, #06B6D4 0%, #0E7490 100%);
  border: 1px solid #67E8F9;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.45);
}

.req-admin-panel {
  animation: fadeInPanel 0.25s ease forwards;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}



