/* ==========================================================================
   Sub2y Telegram Mini-App Store (TMA v2.0)
   Design System: Dark Glassmorphism & 4-Tab Striver Navigation Architecture
   Standard: Pure USD ($) & Telegram Stars (★)
   ========================================================================== */

:root {
  --bg-page: #06070a;
  --bg-canvas: #0a0b10;
  --bg-surface: #12141c;
  --bg-surface-elevated: #171924;
  --bg-card: #11131b;
  --bg-input: #0e0f16;

  --brand-primary: #ea580c;
  --brand-secondary: #f59e0b;
  --brand-accent: #fbbf24;
  --brand-rgb: 234, 88, 12;
  --brand-secondary-rgb: 245, 158, 11;

  --gradient-brand: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
  --gradient-brand-hover: linear-gradient(135deg, #f97316 0%, #fbbf24 100%);
  --gradient-hero: linear-gradient(145deg, #24160d 0%, #17110c 50%, #0d0c11 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);

  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.12);
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-light: rgba(255, 255, 255, 0.12);
  --border-focus: #ea580c;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.85);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ================= Reset & Global Defaults ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.tma-body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(var(--brand-rgb), 0.12) 0%, var(--bg-page) 65%);
  background-attachment: fixed;
}

.tma-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--bg-canvas);
  padding: calc(14px + var(--safe-top)) 16px calc(96px + var(--safe-bottom)) 16px;
  position: relative;
  display: block;
}

@media (min-width: 520px) {
  body.tma-body {
    padding: 24px 0 40px 0;
  }
  .tma-container {
    min-height: unset;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(var(--brand-rgb), 0.1);
  }
}

/* ================= Views Switching Architecture ================= */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeInView 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ================= Common Section Header ================= */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px 0;
}

.section-label {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.section-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ================= VIEW 1: STORE (МАГАЗИН) ================= */

/* Store Hero Card with Balance (Striver Style) */
.store-hero-card {
  background: linear-gradient(145deg, #181a25 0%, #0f1118 100%);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.store-hero-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(var(--brand-rgb), 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.store-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.store-logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-names {
  display: flex;
  flex-direction: column;
}

.store-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
}

.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #030712;
  font-size: 9px;
  font-weight: 900;
}

.store-tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.store-user-mini {
  cursor: pointer;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.user-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.balance-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.balance-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.balance-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.balance-sum {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.curr-sign {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-secondary);
}

.balance-digits {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.btn-topup-quick {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-topup-quick:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.14);
}

.plus-icon {
  font-size: 15px;
  color: var(--brand-secondary);
  font-weight: 900;
}

/* Category Filter Pills */
.category-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px 0;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.cat-pill.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 10px rgba(var(--brand-rgb), 0.4);
}

/* Wide Featured Hero Box */
.featured-hero-box {
  background: var(--gradient-hero);
  border: 1px solid rgba(var(--brand-rgb), 0.35);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}

.featured-hero-box:active {
  transform: scale(0.99);
}

.featured-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.tag-fire {
  background: rgba(234, 88, 12, 0.2);
  border: 1px solid rgba(234, 88, 12, 0.45);
  color: #fb923c;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
}

.tag-discount {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.featured-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.featured-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

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

.featured-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.featured-price-val {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.featured-price-was {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: line-through;
  font-family: 'JetBrains Mono', monospace;
}

.btn-featured-buy {
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(var(--brand-rgb), 0.4);
  transition: transform 0.15s;
}

.btn-featured-buy:active {
  transform: scale(0.95);
}

/* 2-Column Product Grid (Striver Shop Benchmark) */
.products-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background-color 0.2s;
  position: relative;
  min-height: 154px;
}

.product-grid-card:active {
  transform: scale(0.97);
  background-color: var(--bg-surface-elevated);
  border-color: rgba(var(--brand-rgb), 0.4);
}

.card-top-icons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-app-icon {
  font-size: 26px;
  line-height: 1;
}

.card-pill-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.card-pill-tag.new {
  background: rgba(234, 88, 12, 0.2);
  color: #fb923c;
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.card-pill-tag.hot {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.card-pill-tag.sale {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.card-grid-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-grid-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.card-price-prefix {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.card-grid-price {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.card-stock-symbol {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 700;
}

/* ================= VIEW 2: PURCHASES (ПОКУПКИ) ================= */

.panel-header-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px 0;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 16px;
}

.panel-title-group h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: #ffffff;
  margin-bottom: 2px;
}

.panel-title-group p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.panel-header-icon {
  font-size: 38px;
  line-height: 1;
}

/* JIT Pending Queue Card */
.pending-queue-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.pending-queue-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-secondary);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
}

.pending-queue-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.pending-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.pending-progress-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: var(--gradient-brand);
  border-radius: var(--radius-pill);
  animation: pendingPulse 1.8s infinite ease-in-out;
}

@keyframes pendingPulse {
  0% { left: -30%; width: 30%; }
  50% { left: 40%; width: 50%; }
  100% { left: 105%; width: 30%; }
}

/* Delivered Items List */
.vault-items-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.vault-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

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

.vault-item-title {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.vault-item-badge {
  background: var(--color-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.vault-key-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.vault-key-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--brand-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.btn-vault-copy {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-glass-light);
  color: #ffffff;
  border-radius: var(--radius-xs);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-vault-copy:active {
  background: var(--color-success);
  color: #042f2e;
}

.vault-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* Empty State */
.empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 16px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-glass-light);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.empty-icon-box {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 290px;
  margin-bottom: 16px;
}

.btn-empty-action {
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 24px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(var(--brand-rgb), 0.4);
}

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

/* ================= VIEW 3: INFO (ПРО ШОП) ================= */

.info-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0 20px 0;
}

.info-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c1f2b 0%, #12141c 100%);
  border: 2px solid var(--border-glass-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.info-store-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.info-store-handle {
  font-size: 13px;
  color: var(--text-muted);
}

.info-store-handle a {
  color: var(--brand-secondary);
  text-decoration: none;
  font-weight: 600;
}

/* 4 Circular Action Buttons (Striver Benchmark) */
.info-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.info-circle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.circle-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.15s, background-color 0.2s;
}

.info-circle-btn:active .circle-icon-wrap {
  transform: scale(0.92);
}

.circle-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Info Benefit Stack */
.info-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.info-benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.benefit-icon {
  font-size: 24px;
  line-height: 1;
}

.benefit-content h4 {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
}

.benefit-content p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* FAQ Accordion */
.faq-accordion-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
}

.faq-question {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  list-style: none;
  position: relative;
  padding-right: 20px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '›';
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 18px;
  color: var(--text-dim);
  transition: transform 0.2s;
}

details[open] .faq-question::after {
  transform: rotate(90deg);
  color: var(--brand-secondary);
}

.faq-answer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ================= VIEW 4: PROFILE (ОСОБИСТИЙ КАБІНЕТ) ================= */

.profile-hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 0 16px 0;
}

.profile-avatar-wrap {
  position: relative;
  margin-bottom: 12px;
}

.profile-avatar-large {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: 3px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 32px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.4px;
  margin-bottom: 3px;
}

.profile-handle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Balance Pill */
.profile-balance-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass-light);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px auto 16px auto;
  max-width: 220px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-balance-pill:active {
  transform: scale(0.97);
  background: var(--bg-surface-elevated);
}

.pill-balance-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.pill-balance-left strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.pill-arrow {
  font-size: 18px;
  color: var(--text-dim);
}

/* 2 Action Buttons Row */
.profile-action-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.btn-profile-action {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-profile-action:active {
  transform: scale(0.96);
  background: var(--bg-surface-elevated);
}

.btn-action-icon {
  font-size: 16px;
}

/* 2x2 Client Metrics Grid (Striver Benchmark) */
.profile-metrics-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
}

.metric-card#card-copy-id {
  cursor: pointer;
  transition: border-color 0.2s;
}

.metric-card#card-copy-id:active {
  border-color: var(--brand-secondary);
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.metric-val.id-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
}

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

.id-copy-icon {
  font-size: 14px;
  color: var(--brand-secondary);
}

.metric-sub {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Recent Orders Section */
.recent-order-empty {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.recent-order-empty:active {
  background: var(--bg-surface-elevated);
}

.recent-empty-icon {
  font-size: 24px;
  line-height: 1;
}

.recent-empty-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.recent-empty-text strong {
  font-size: 13px;
  color: #ffffff;
  font-weight: 700;
}

.recent-empty-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.recent-empty-arrow {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}

/* ================= FLOATING BOTTOM NAVIGATION DOCK (4 TABS) ================= */
.floating-dock-nav {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(390px, calc(100% - 28px));
  height: 64px;
  background: rgba(18, 20, 28, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75), 0 0 24px rgba(var(--brand-rgb), 0.1);
  z-index: 999;
}

.dock-tab {
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.dock-tab:active {
  transform: scale(0.9);
}

.dock-tab.active {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.dock-tab-icon {
  font-size: 22px;
  line-height: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dock-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--color-success);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-canvas);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.5);
}

/* ================= BOTTOM SHEET MODALS ================= */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  background: #11131c;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border: 1px solid var(--border-glass-light);
  border-bottom: none;
  box-shadow: var(--shadow-sheet);
  padding: 16px 20px calc(24px + var(--safe-bottom)) 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-backdrop.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  margin: 0 auto 14px auto;
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.sheet-close:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
}

.sheet-header {
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}

.sheet-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.sheet-scrollable {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-bottom: 10px;
  scrollbar-width: none;
}

.sheet-scrollable::-webkit-scrollbar {
  display: none;
}

/* Product Detail Sheet Specifics */
.modal-product-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-product-icon {
  font-size: 36px;
  line-height: 1;
}

.modal-product-titles {
  display: flex;
  flex-direction: column;
}

.modal-p-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.modal-p-cat {
  font-size: 11.5px;
  color: var(--brand-secondary);
  font-weight: 700;
}

.modal-p-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 16px;
}

.term-selector-box {
  margin-bottom: 16px;
}

.term-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.term-pills-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.term-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.term-pill.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.4);
}

.modal-price-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.modal-price-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.modal-price-calc {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.m-price-curr {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-secondary);
}

.m-price-val {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.m-price-stars {
  font-size: 12px;
  color: var(--brand-accent);
  font-weight: 700;
  margin-left: 4px;
}

.modal-compare-was {
  text-align: right;
  font-size: 11px;
  color: var(--text-dim);
}

.modal-compare-was del {
  display: block;
  font-size: 15px;
  color: var(--color-danger);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.btn-primary {
  width: 100%;
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(var(--brand-rgb), 0.4);
  transition: all 0.2s;
}

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

/* Top-up Specifics */
.topup-amounts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.amount-pill.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(var(--brand-rgb), 0.4);
}

.payment-rails-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.rail-item.active {
  border-color: var(--brand-primary);
  background: rgba(var(--brand-rgb), 0.1);
}

.rail-icon {
  font-size: 20px;
  line-height: 1;
}

.rail-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.rail-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Direct Checkout Specifics */
.checkout-amount-hero {
  text-align: center;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.amount-label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.amount-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 2px 0;
}

.amount-val {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.8px;
}

.amount-curr {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-secondary);
}

.stars-equiv {
  font-size: 11.5px;
  color: var(--brand-accent);
  font-weight: 700;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.qrcode-render {
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  display: inline-flex;
}

.address-box {
  margin-bottom: 14px;
}

.address-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.address-field {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.address-field input {
  flex: 1;
  background: none;
  border: none;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 10px 12px;
  outline: none;
}

.btn-copy-addr {
  background: var(--brand-primary);
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-copy-addr:active {
  opacity: 0.85;
}

.checkout-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.timer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-secondary);
  box-shadow: 0 0 8px rgba(var(--brand-secondary-rgb), 0.6);
  animation: pendingPulse 1.5s infinite;
}

.timer-digits {
  font-weight: 800;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
}
