:root {
  --bg-deep: #060A13;
  --bg-surface: #0B1220;
  --bg-card: #0F172A;
  --bg-card-elevated: #162036;
  --bg-glass: rgba(15, 23, 42, 0.86);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-glow: rgba(0, 229, 255, 0.34);

  --cyan: #00E5FF;
  --blue: #2563EB;
  --amber: #F59E0B;
  --emerald: #10B981;
  --danger: #EF4444;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --nav-height: 74px;
  --font-sans: 'Be Vietnam Pro', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

button, input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==================== STUDIO VS FULLSCREEN LAYOUT ==================== */
.workspace-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 229, 255, 0.08), transparent 36%),
    radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.1), transparent 42%),
    var(--bg-deep);
}

body.studio-mode .workspace-shell {
  gap: 28px;
  padding: 24px 28px;
  align-items: stretch;
  max-width: 1360px;
  margin: 0 auto;
}

.phone-stage {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  position: relative;
}

body.studio-mode .phone-stage {
  flex: 0 0 416px;
  width: 416px;
  max-width: 416px;
  min-width: 0;
  min-height: 680px;
  height: calc(100vh - 48px);
  max-height: 850px;
}

.miniapp-frame {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: var(--bg-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.studio-mode .miniapp-frame {
  min-height: 100%;
  border-radius: 30px;
  border: 1.5px solid rgba(0, 229, 255, 0.25);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.72),
    0 0 40px rgba(0, 229, 255, 0.09);
}

/* ==================== TELEGRAM TOP CHROME (STUDIO) ==================== */
.tg-app-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(8, 13, 24, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  z-index: 40;
}

.tg-chrome-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.18s;
}

.tg-chrome-btn:hover {
  background: rgba(0, 229, 255, 0.1);
}

.tg-chrome-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.tg-chrome-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* ==================== SCROLLABLE APP CONTENT ==================== */
.app-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 14px 14px calc(var(--nav-height) + 32px);
  scroll-behavior: smooth;
}

.app-scroll::-webkit-scrollbar {
  width: 4px;
}

.app-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

/* ==================== HEADER & BRANDING ==================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid rgba(0, 229, 255, 0.45);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.22);
  background: #080E1C;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-bolt {
  color: var(--amber);
  font-size: 14px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

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

.icon-pill-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 16px;
  transition: border-color 0.2s, transform 0.15s;
}

.icon-pill-btn:hover {
  border-color: var(--border-glow);
}

.icon-pill-btn:active {
  transform: scale(0.95);
}

.dot-unread {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg-card);
}

.user-avatar-chip {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101C;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.24);
}

/* ==================== SUBPAGE HEADER ==================== */
.subpage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.back-btn {
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 0.2s;
}

.back-btn:hover {
  border-color: var(--border-glow);
}

.subpage-title {
  font-size: 17px;
  font-weight: 700;
}

/* ==================== HERO BANNER ==================== */
.hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 134px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: #060A13;
  margin-bottom: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.94;
}

.hero-banner-overlay {
  position: relative;
  z-index: 2;
  min-height: 134px;
  padding: 15px 16px;
  background: linear-gradient(95deg, rgba(6, 10, 19, 0.96) 0%, rgba(6, 10, 19, 0.85) 52%, rgba(6, 10, 19, 0.18) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 78%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.hero-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 6px;
  background: linear-gradient(90deg, #FFFFFF 0%, #99F6FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 12px;
  color: #CBD5E1;
  margin-top: 2px;
  font-weight: 500;
}

.hero-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #E2E8F0;
}

/* ==================== BALANCE CARD ==================== */
.balance-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at top right, rgba(0, 229, 255, 0.14), transparent 55%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.16), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(0, 229, 255, 0.34);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.08);
}

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

.balance-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.eye-btn {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  font-size: 12px;
  transition: color 0.15s;
}

.eye-btn:hover {
  color: var(--text-primary);
}

.tier-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.34);
}

.balance-amount {
  font-size: 27px;
  font-weight: 800;
  margin: 6px 0 13px;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-primary-cyber {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  color: #03101D;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.25);
  transition: transform 0.14s, filter 0.14s;
}

.btn-primary-cyber:hover {
  filter: brightness(1.06);
}

.btn-primary-cyber:active {
  transform: scale(0.98);
}

.btn-primary-cyber:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-glass {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-glass:hover {
  border-color: var(--border-glow);
  background: rgba(0, 229, 255, 0.08);
}

.btn-danger-soft {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.34);
  color: #FCA5A5;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ==================== ACTIVE OTP SESSION TRACKER ==================== */
.otp-tracker-wrap {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.otp-live-card {
  border-radius: var(--radius-md);
  padding: 12px 13px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.09);
}

.otp-live-card.received {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.96));
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.1);
}

.otp-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.otp-service-tag {
  font-size: 11px;
  font-weight: 700;
  color: #FDE68A;
  display: flex;
  align-items: center;
  gap: 5px;
}

.otp-live-card.received .otp-service-tag {
  color: #6EE7B7;
}

.otp-timer {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FBBF24;
}

.otp-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(6, 10, 19, 0.72);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.otp-phone-num {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.copy-mini-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.28);
  flex-shrink: 0;
}

.copy-mini-btn:hover {
  background: rgba(0, 229, 255, 0.22);
}

.otp-status-row {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.waiting-pulse {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #FCD34D;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulseRing 1.4s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.otp-code-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.otp-code-value {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #34D399;
}

/* ==================== SECTION HEADINGS ==================== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}

/* ==================== QUICK CATEGORIES & UTILITIES ==================== */
.quick-cats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.quick-cats-grid.cols-1 {
  grid-template-columns: 1fr;
}

.quick-cats-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.quick-cats-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: border-color 0.2s, transform 0.14s;
}

.quick-cat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.quick-cat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.quick-cat-label {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}

.utils-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.util-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.util-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-elevated);
}

.util-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(37, 99, 235, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.util-title {
  font-size: 13px;
  font-weight: 700;
}

.util-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==================== PRODUCT CARDS ==================== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
  transition: border-color 0.2s, transform 0.12s;
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--border-glow);
}

.product-card.is-otp {
  background: linear-gradient(155deg, rgba(0, 229, 255, 0.06), var(--bg-card) 58%);
}

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

.product-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.product-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.tag-id {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  color: #CBD5E1;
}

.tag-otp {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.13);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.28);
}

.stock-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.stock-badge.in-stock {
  background: rgba(16, 185, 129, 0.14);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-badge.out-stock {
  background: rgba(239, 68, 68, 0.14);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.product-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 7px 0 10px;
  line-height: 1.4;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--cyan);
}

.product-price-prefix {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 3px;
}

.btn-buy-sm {
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #04101C;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-buy-sm.out {
  background: rgba(148, 163, 184, 0.12);
  color: #CBD5E1;
  border: 1px solid var(--border-subtle);
}

/* ==================== SEARCH & FILTER CHIPS ==================== */
.search-box {
  position: relative;
  margin-bottom: 10px;
}

.search-input {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0 14px 0 36px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--cyan);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.filter-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.16s;
}

.filter-chip.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
}

.promo-banner {
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 12px;
  background: linear-gradient(120deg, rgba(245, 158, 11, 0.18), rgba(37, 99, 235, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.36);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.promo-text {
  font-size: 12px;
  font-weight: 700;
  color: #FEF3C7;
}

.promo-cta {
  font-size: 11.5px;
  font-weight: 800;
  color: #FBBF24;
  white-space: nowrap;
}

/* ==================== BOTTOM NAVIGATION (5 TABS) ==================== */
.miniapp-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: linear-gradient(to top, var(--bg-deep) 45%, rgba(6, 10, 19, 0));
  pointer-events: none;
  z-index: 90;
}

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 62px;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 4px;
  z-index: 100;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  height: 100%;
  transition: color 0.16s;
}

.nav-item.active {
  color: var(--cyan);
}

.nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-center-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
}

.nav-center-orb {
  width: 46px;
  height: 46px;
  margin-top: -24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: 3px solid var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
  overflow: hidden;
  transition: transform 0.16s;
}

.nav-center-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-center-wrap.active .nav-center-orb {
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.65);
  transform: scale(1.05);
}

.nav-center-label {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 2px;
  color: var(--text-secondary);
}

.nav-center-wrap.active .nav-center-label {
  color: var(--cyan);
}

/* ==================== LOCKED BACKDROP & BOTTOM SHEETS ==================== */
/* Fix UX overlap from @Metavippro_bot: high z-index + locked backdrop prevents accidental tap-through */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 15, 0.78);
  backdrop-filter: blur(5px);
  z-index: 900;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.open {
  display: flex;
}

.sheet-backdrop.center-mode {
  align-items: center;
  padding: 16px;
}

.bottom-sheet {
  width: 100%;
  max-height: 86%;
  background: var(--bg-surface);
  border-top: 1.5px solid rgba(0, 229, 255, 0.42);
  border-radius: 24px 24px 0 0;
  padding: 12px 16px 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.75);
  animation: sheetUp 0.2s ease-out;
}

@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 372px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(0, 229, 255, 0.42);
  border-radius: 22px;
  padding: 18px 16px;
  z-index: 1000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sheet-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.sheet-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sheet-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
}

.sheet-body::-webkit-scrollbar {
  width: 4px;
}

.sheet-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}

.sheet-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ==================== QUANTITY & COUNTRY PICKER ==================== */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 8px 10px;
  margin: 12px 0 8px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 17px;
  font-weight: 700;
}

.qty-input {
  width: 58px;
  height: 34px;
  text-align: center;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  font-size: 15px;
  font-weight: 700;
  outline: none;
}

.qty-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.qty-chip {
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.qty-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.total-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--cyan);
}

/* Country Picker Cards inside Phone Product Bottom Sheet */
.country-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.country-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.country-card:hover:not(.disabled) {
  border-color: rgba(0, 229, 255, 0.45);
}

.country-card.selected {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.12);
}

.country-card.disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.country-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-flag {
  font-size: 22px;
  line-height: 1;
}

.country-name {
  font-size: 13px;
  font-weight: 700;
}

.country-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.country-right {
  text-align: right;
}

.country-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cyan);
}

.country-stock {
  font-size: 10.5px;
  font-weight: 700;
  color: #34D399;
}

.country-card.disabled .country-stock {
  color: #FCA5A5;
}

/* ==================== DEPOSIT FLOW ==================== */
.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 14px;
}

.preset-btn {
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 700;
}

.preset-btn.active {
  background: rgba(0, 229, 255, 0.14);
  border-color: var(--cyan);
  color: var(--cyan);
}

.qr-frame {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 12px;
  width: 224px;
  min-height: 200px;
  margin: 10px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame img, .qr-frame svg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.kv-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.kv-val {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: right;
}

.highlight-code {
  color: var(--amber);
  font-size: 14px;
}

/* ==================== API DOCS, ORDERS & ACCOUNT ==================== */
.code-block {
  background: #040812;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 11px;
  padding: 10px 11px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #BAE6FD;
  overflow-x: auto;
  word-break: break-all;
  line-height: 1.5;
}

.endpoint-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.method-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  margin-right: 5px;
}

.method-badge.get {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
}

.method-badge.post {
  background: rgba(37, 99, 235, 0.25);
  color: #93C5FD;
}

.menu-list {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.menu-row {
  width: 100%;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  transition: background 0.15s;
}

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

.menu-row:hover {
  background: rgba(0, 229, 255, 0.05);
}

.menu-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: var(--cyan);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s;
}

.toggle-switch.on .toggle-knob {
  transform: translateX(20px);
  background: #04101C;
}

/* ==================== HISTORY ITEMS ==================== */
.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.tx-plus {
  color: #34D399;
  font-weight: 800;
}

.tx-minus {
  color: #FCA5A5;
  font-weight: 800;
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--cyan);
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

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

/* ==================== STUDIO PANEL (TELEGRAM CHAT SIMULATOR) ==================== */
.studio-panel {
  display: none;
}

body.studio-mode .studio-panel {
  flex: 1;
  min-width: 340px;
  height: calc(100vh - 48px);
  max-height: 850px;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
}

.chat-sim-card {
  flex: 1;
  overflow: hidden;
  padding: 0;
}

.chat-sim-header {
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-sim-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.04), transparent 40%),
    #070C17;
}

.tg-msg-bubble {
  max-width: 92%;
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px 14px 14px 4px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
}

.tg-msg-time {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 5px;
}

.tg-inline-btns {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.tg-inline-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: #E0F2FE;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.tg-inline-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}

.chat-sim-footer {
  padding: 10px 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-menu-pill {
  padding: 8px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #03101D;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.sim-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.sim-btn {
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.16s, background 0.16s;
}

.sim-btn:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
}

.floating-studio-return {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2000;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: none;
}

@media (max-width: 960px) {
  body.studio-mode .workspace-shell {
    padding: 0;
  }
  body.studio-mode .studio-panel {
    display: none;
  }
  body.studio-mode .phone-stage {
    flex: 1;
    max-width: 100%;
    height: auto;
    max-height: none;
  }
  body.studio-mode .miniapp-frame {
    border-radius: 0;
    border: none;
  }
}

/* ==================== PAGINATION & RETENTION BANNER ==================== */
.retention-banner {
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.34);
  color: #fde68a;
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 11.5px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.page-btn.active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #03101d;
  border-color: transparent;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
