/* ==========================================================================
   Gladiator Mini App - Comprehensive Design System & Styles
   Apple iOS Human Interface + Telegram Mini App Glassmorphism
   Connected to PasarGuard Panel (V2Ray / Xray)
   ========================================================================== */

:root {
  /* Surfaces & Text (Light Mode) */
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card2: #F8F8FA;
  --card-border: rgba(0, 0, 0, 0.06);
  --label: #0B0B0F;
  --label2: rgba(60, 60, 67, 0.62);
  --label3: rgba(60, 60, 67, 0.36);
  --sep: rgba(60, 60, 67, 0.14);
  --fill: rgba(120, 120, 128, 0.12);

  /* Semantic Accents */
  --blue: #007AFF;
  --green: #22C55E;
  --red: #EF4444;
  --orange: #F59E0B;
  --purple: #7C6CF0;
  --teal: #22B8CF;
  --pink: #EC4899;

  /* Translucent Tints */
  --blue-t: rgba(0, 122, 255, 0.12);
  --green-t: rgba(34, 197, 94, 0.14);
  --red-t: rgba(239, 68, 68, 0.12);
  --orange-t: rgba(245, 158, 11, 0.16);
  --purple-t: rgba(124, 108, 240, 0.14);

  /* Glass Bars & Shadows */
  --bar: rgba(247, 247, 250, 0.86);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

  /* Safe Area Handlers */
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

/* Dark Mode Tokens */
body[data-theme="dark"], :root[data-theme="dark"] {
  --bg: #09090b;
  --card: #141416;
  --card2: #1e1e22;
  --card-border: rgba(255, 255, 255, 0.07);
  --label: #FFFFFF;
  --label2: rgba(235, 235, 245, 0.64);
  --label3: rgba(235, 235, 245, 0.34);
  --sep: rgba(255, 255, 255, 0.09);
  --fill: rgba(255, 255, 255, 0.08);

  --blue: #0A84FF;
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --purple: #8B7CF6;
  --teal: #3CCFE6;
  --pink: #FF5C93;

  --blue-t: rgba(10, 132, 255, 0.16);
  --green-t: rgba(48, 209, 88, 0.16);
  --red-t: rgba(255, 69, 58, 0.16);
  --orange-t: rgba(255, 159, 10, 0.17);
  --purple-t: rgba(139, 124, 246, 0.18);

  --bar: rgba(16, 16, 20, 0.88);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* -------------------- Reset & Base -------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Vazirmatn', 'Vazir', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--label);
  line-height: 1.5;
  font-size: 14.5px;
  overflow-x: hidden;
  padding-bottom: calc(90px + var(--safe-b));
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
}

/* -------------------- Sticky Header -------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 12px;
  background: var(--bg);
  transition: all 0.25s ease;
}

.top.scrolled {
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}

.userpill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 5px 12px 5px 6px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease;
}

.userpill:active {
  transform: scale(0.97);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9F0A, #FF453A);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--label);
}

.user-status {
  font-size: 11px;
  color: var(--label2);
}

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

.theme-toggle, .iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--label);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease;
}

.theme-toggle:active, .iconbtn:active {
  transform: scale(0.92);
}

.theme-toggle svg, .iconbtn svg {
  width: 20px;
  height: 20px;
}

body[data-theme="dark"] .sun-icon { display: block; }
body[data-theme="dark"] .moon-icon { display: none; }
body:not([data-theme="dark"]) .sun-icon { display: none; }
body:not([data-theme="dark"]) .moon-icon { display: block; }

.dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: var(--red);
  border-radius: 50%;
  border: 2px solid var(--card);
}

/* -------------------- Container & Screens -------------------- */
.content-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.screen {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.screen.active {
  display: block;
}

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

.screen-title-bar {
  margin: 12px 0 18px;
}

.screen-title-bar h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.screen-title-bar p {
  color: var(--label2);
  font-size: 13px;
  margin-top: 4px;
}

/* -------------------- Card Base -------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

/* -------------------- Wallet Card -------------------- */
.wallet-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  position: relative;
  overflow: hidden;
}

.wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0A84FF, #6366F1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-icon-box svg {
  width: 22px;
  height: 22px;
}

.wallet-title {
  font-weight: 700;
  font-size: 16px;
}

.wallet-subtitle {
  font-size: 11.5px;
  color: var(--label2);
}

.chgbtn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #22C55E, #14B8A6);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
  transition: transform 0.15s ease;
}

.chgbtn:active {
  transform: scale(0.95);
}

.chgbtn svg {
  width: 15px;
  height: 15px;
}

.balance-display {
  margin: 18px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.balance-num {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
}

.balance-cur {
  font-size: 16px;
  color: var(--label2);
  font-weight: 500;
}

.status-live-wrap {
  margin-bottom: 18px;
}

.tag-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-t);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* 3 Metrics Tiles */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.metric-tile {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.metric-val {
  font-size: 20px;
  font-weight: 700;
}

.metric-lbl {
  font-size: 11px;
  color: var(--label2);
  margin-top: 2px;
}

.tile-green .metric-val { color: var(--green); }
.tile-red .metric-val { color: var(--red); }
.tile-blue .metric-val { color: var(--blue); }

/* Quick Action Row */
.quick-actions-row {
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid var(--sep);
}

.quick-act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--label);
  font-size: 12px;
  font-weight: 500;
}

.quick-act-btn:active {
  transform: scale(0.92);
}

.quick-act-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-act-icon svg {
  width: 20px;
  height: 20px;
}

.green-tint { background: var(--green-t); color: var(--green); }
.blue-tint { background: var(--blue-t); color: var(--blue); }
.orange-tint { background: var(--orange-t); color: var(--orange); }

/* -------------------- Welcome Gift Banner -------------------- */
.gift-banner {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  color: #fff;
  border-radius: 20px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.3);
  margin-bottom: 22px;
  transition: transform 0.15s ease;
}

.gift-banner:active {
  transform: scale(0.98);
}

.gift-icon-wrap {
  font-size: 26px;
}

.gift-text {
  flex: 1;
}

.gift-title {
  font-size: 15px;
  font-weight: 700;
}

.gift-desc {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.gift-arrow svg {
  width: 20px;
  height: 20px;
  transform: scaleX(-1);
}

/* -------------------- Section Header -------------------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px;
}

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

.section-badge {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--red-t);
  color: var(--red);
  border-radius: 12px;
  font-weight: 600;
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* -------------------- Special Offers Carousel -------------------- */
.hs-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 0 -16px 16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}

.hs-carousel::-webkit-scrollbar {
  display: none;
}

.offer-card {
  flex: 0 0 250px;
  border-radius: 20px;
  padding: 16px;
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.offer-card.grad-pink { background: linear-gradient(135deg, #FF2D55 0%, #AF52DE 100%); }
.offer-card.grad-orange { background: linear-gradient(135deg, #FF9F0A 0%, #FF2D55 100%); }
.offer-card.grad-blue { background: linear-gradient(135deg, #0A84FF 0%, #AF52DE 100%); }
.offer-card.grad-purple { background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); }

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

.offer-proto {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 8px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.offer-discount {
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  color: #FF2D55;
  padding: 2px 8px;
  border-radius: 10px;
}

.offer-center {
  margin: 12px 0;
}

.offer-volume {
  font-size: 21px;
  font-weight: 800;
}

.offer-users {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.offer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
}

.offer-price-col {
  display: flex;
  flex-direction: column;
}

.offer-old-price {
  font-size: 11px;
  text-decoration: line-through;
  opacity: 0.7;
}

.offer-new-price {
  font-size: 14.5px;
  font-weight: 700;
}

.offer-buy-btn {
  background: #fff;
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

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

/* -------------------- Accounts Section (Live Panel Extraction) -------------------- */
.accounts-head-bar {
  margin: 12px 0 10px;
}

.acc-counter-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--label2);
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  right: 14px;
  width: 18px;
  height: 18px;
  color: var(--label3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--label);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.acc-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-pill {
  padding: 6px 16px;
  border-radius: 16px;
  background: var(--fill);
  border: none;
  color: var(--label2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-pill.active {
  background: var(--blue);
  color: #fff;
}

/* -------------------- Rich Account Card -------------------- */
.acc-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.acc-card:active {
  transform: scale(0.985);
}

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

.acc-username-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.acc-badges-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-protocol {
  background: var(--blue-t);
  color: var(--blue);
  border-radius: 8px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 600;
}

.badge-expiry {
  background: var(--green-t);
  color: var(--green);
  border-radius: 8px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 600;
}

.badge-expiry.warning {
  background: var(--orange-t);
  color: var(--orange);
}

.badge-expiry.expired {
  background: var(--red-t);
  color: var(--red);
}

/* Gauge & Middle Data */
.acc-data-gauge-wrap {
  margin-bottom: 14px;
}

.acc-rem-data-box {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}

.acc-rem-data-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
}

.acc-rem-data-lbl {
  font-size: 13.5px;
  color: var(--label2);
  font-weight: 600;
}

.acc-gauge-bg {
  width: 100%;
  height: 6px;
  background: var(--fill);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.acc-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.acc-usage-summary-txt {
  font-size: 11.5px;
  color: var(--label2);
}

/* 3-Column Metrics Grid in Account Card */
.account-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--sep);
  text-align: center;
}

.acc-metric-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-metric-sub {
  font-size: 11px;
  color: var(--label3);
}

.acc-metric-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--label);
}

/* -------------------- Empty State -------------------- */
.empty-card {
  background: var(--card);
  border: 1px dashed var(--sep);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--blue-t);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon-circle svg {
  width: 28px;
  height: 28px;
}

.empty-title {
  font-weight: 700;
  font-size: 16px;
}

.empty-desc {
  font-size: 12.5px;
  color: var(--label2);
  max-width: 290px;
  line-height: 1.6;
}

/* -------------------- Shop Controls & Products -------------------- */
.filter-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--label2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

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

.prod-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.prod-tags {
  display: flex;
  gap: 6px;
}

.ptag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 600;
}

.ptag-orange { background: var(--orange-t); color: var(--orange); }
.ptag-blue { background: var(--blue-t); color: var(--blue); }
.ptag-purple { background: var(--purple-t); color: var(--purple); }

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

.prod-duration {
  font-size: 11.5px;
  color: var(--label2);
}

.prod-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.prod-price-box {
  text-align: left;
}

.prod-old-p {
  font-size: 11px;
  text-decoration: line-through;
  color: var(--label3);
}

.prod-new-p {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--blue);
}

.prod-buy-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 7px 18px;
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.25);
}

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

/* -------------------- More View Styles -------------------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-big {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF9F0A, #FF453A);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-details h3 {
  font-size: 17px;
  font-weight: 700;
}

.profile-id-row {
  font-size: 12px;
  color: var(--label2);
  margin-top: 4px;
}

.profile-id-row code {
  font-family: monospace;
  font-size: 12.5px;
  color: var(--blue);
  margin-right: 4px;
}

.mini-wallet-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.mini-wallet-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-dim {
  font-size: 12.5px;
  color: var(--label2);
}

.bold-price {
  font-weight: 700;
  font-size: 15px;
}

.btn-subtle {
  background: var(--blue-t);
  color: var(--blue);
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.referral-banner-card {
  background: linear-gradient(135deg, rgba(124, 108, 240, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  border: 1px solid rgba(124, 108, 240, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.ref-badge-icon {
  font-size: 26px;
}

.ref-content {
  flex: 1;
}

.ref-content h4 {
  font-size: 14.5px;
  font-weight: 700;
}

.ref-content p {
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 2px;
}

.ref-action-arrow svg {
  width: 18px;
  height: 18px;
  color: var(--label3);
  transform: scaleX(-1);
}

.settings-group {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 20px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--sep);
  transition: background-color 0.15s ease;
}

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

.settings-item:active {
  background: var(--card2);
}

.set-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.set-icon-box svg {
  width: 18px;
  height: 18px;
}

.set-icon-box.purple { background: var(--purple-t); color: var(--purple); }
.set-icon-box.blue { background: var(--blue-t); color: var(--blue); }
.set-icon-box.orange { background: var(--orange-t); color: var(--orange); }
.set-icon-box.green { background: var(--green-t); color: var(--green); }

.set-info {
  flex: 1;
}

.set-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.set-desc {
  display: block;
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 2px;
}

.chevron {
  width: 18px;
  height: 18px;
  color: var(--label3);
  transform: scaleX(-1);
}

.footer-meta {
  text-align: center;
  font-size: 11.5px;
  color: var(--label3);
  margin: 10px 0 20px;
}

/* -------------------- Floating Glass Dock -------------------- */
.tabcard {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  height: 64px;
  border-radius: 24px;
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--label2);
  cursor: pointer;
  height: 52px;
  border-radius: 18px;
  transition: all 0.2s ease;
}

.nav-tab.active {
  color: var(--blue);
  background: var(--blue-t);
}

.tab-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.nav-tab.active .tab-icon svg {
  transform: translateY(-1px) scale(1.08);
}

.tab-label {
  font-size: 10.5px;
  font-weight: 600;
}

/* -------------------- Bottom Sheet Modals -------------------- */
.dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.dim.active {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(105%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 12px 20px calc(24px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  margin: 0 auto;
}

.sheet.active {
  transform: translateY(0);
}

.grab {
  width: 42px;
  height: 5px;
  background: var(--label3);
  border-radius: 4px;
  margin: 4px auto 14px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sheet-head h3 {
  font-size: 19px;
  font-weight: 700;
}

.sub-badge-status {
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 2px;
  display: block;
}

.close-sheet {
  background: var(--fill);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--label2);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sheet-subhead {
  font-size: 13px;
  color: var(--label2);
  margin-bottom: 16px;
}

/* -------------------- Account Action Sheet Details -------------------- */
.card-detail-table {
  background: var(--card2);
  border: 1px solid var(--sep);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.detail-row span:first-child {
  color: var(--label2);
}

.text-blue {
  color: var(--blue);
  font-weight: 700;
}

.tag-status-green {
  background: var(--green-t);
  color: var(--green);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.acc-action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-text-danger {
  background: none;
  border: none;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  cursor: pointer;
  margin-top: 4px;
}

/* -------------------- Connections & QR Code Modal -------------------- */
.qr-container-box {
  background: var(--card2);
  border: 1px solid var(--sep);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.qr-code-img-wrap {
  width: 170px;
  height: 170px;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.qr-code-img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-switch {
  display: inline-flex;
  background: var(--fill);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}

.qr-tab-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--label2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qr-tab-btn.active {
  background: var(--blue);
  color: #fff;
}

.btn-portal-blue {
  background: var(--blue-t);
  color: var(--blue);
  border: 1px solid rgba(0, 122, 255, 0.25);
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  transition: transform 0.15s ease;
}

.btn-portal-blue:active {
  transform: scale(0.98);
}

.links-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.link-item-card {
  background: var(--card2);
  border: 1px solid var(--sep);
  border-radius: 16px;
  padding: 12px 14px;
}

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

.link-item-title {
  font-size: 12px;
  font-weight: 700;
}

.link-item-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--blue-t);
  color: var(--blue);
  font-weight: 600;
}

.link-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-text-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: monospace;
  font-size: 11.5px;
  color: var(--label);
  direction: ltr;
  outline: none;
}

.icon-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--label);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.icon-action-btn:active {
  transform: scale(0.92);
}

.icon-action-btn svg {
  width: 17px;
  height: 17px;
}

.btn-outline-tg {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 700;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease;
}

.btn-outline-tg:active {
  transform: scale(0.98);
}

/* -------------------- Top-Up Bank Card & Forms -------------------- */
.form-section {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--label);
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.preset-chip {
  padding: 8px 0;
  border-radius: 12px;
  border: 1px solid var(--sep);
  background: var(--card2);
  color: var(--label);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.preset-chip.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--card2);
  border: 1px solid var(--sep);
  border-radius: 14px;
  color: var(--label);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.text-input:focus {
  border-color: var(--blue);
}

.input-unit {
  position: absolute;
  left: 14px;
  color: var(--label2);
  font-size: 12px;
}

/* Realistic Bank Card UI */
.bank-card-container {
  margin-bottom: 20px;
}

.bank-card {
  position: relative;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
  color: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(49, 46, 129, 0.4);
  overflow: hidden;
}

.card-bg-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 60%);
  pointer-events: none;
}

.bank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.bank-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-chip {
  width: 36px;
  height: 28px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 12px;
  border-radius: 12px;
}

.card-digits {
  font-family: monospace;
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 700;
  direction: ltr;
}

.copy-card-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-card-btn svg {
  width: 13px;
  height: 13px;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.card-holder .lbl-small {
  font-size: 10px;
  opacity: 0.7;
  display: block;
}

.card-holder .val-holder {
  font-size: 13.5px;
  font-weight: 600;
}

.card-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Upload Box */
.upload-box {
  border: 2px dashed var(--sep);
  background: var(--card2);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  color: var(--label2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  transition: all 0.2s ease;
}

.upload-box:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.upload-box svg {
  width: 28px;
  height: 28px;
}

/* -------------------- Buttons -------------------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3);
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
  background: var(--fill);
  color: var(--label);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11.5px;
  border-radius: 10px;
}

/* -------------------- Buy Summary & Alerts -------------------- */
.buy-summary-card {
  background: var(--card2);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
}

.buy-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.buy-pkg-protocol {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
}

.buy-pkg-badge {
  font-size: 10px;
  background: var(--orange-t);
  color: var(--orange);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
}

.buy-pkg-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.buy-pkg-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--label2);
  margin-bottom: 12px;
}

.feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bullet {
  color: var(--green);
  font-weight: 700;
}

.buy-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--sep);
  padding-top: 10px;
}

.price-lbl {
  font-size: 13px;
  color: var(--label2);
}

.price-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
}

.modal-balance-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 0 4px;
  margin-bottom: 14px;
}

.alert-box {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-box svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.alert-warning {
  background: var(--red-t);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.sheet-actions-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* -------------------- Gift Options -------------------- */
.gift-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gift-opt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card2);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.gift-opt-card:active {
  transform: scale(0.98);
}

.gift-opt-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.blue-gift { background: var(--blue-t); }

.gift-opt-meta {
  flex: 1;
}

.gift-opt-meta h4 {
  font-size: 14px;
  font-weight: 700;
}

.gift-opt-meta p {
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 2px;
}

/* -------------------- Referral Modal -------------------- */
.ref-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.ref-stat-box {
  background: var(--card2);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.ref-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--purple);
  display: block;
}

.ref-stat-lbl {
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 2px;
}

.ref-link-box {
  margin-bottom: 18px;
}

.copy-input-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.copy-input-group input {
  flex: 1;
  padding: 10px 12px;
  background: var(--card2);
  border: 1px solid var(--sep);
  border-radius: 12px;
  color: var(--label);
  font-size: 12px;
  direction: ltr;
  outline: none;
}

.btn-copy {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ref-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.ref-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--label2);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple-t);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* -------------------- Notifications -------------------- */
.notif-empty-state {
  text-align: center;
  padding: 30px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notif-icon-circle {
  font-size: 40px;
  margin-bottom: 6px;
}

.notif-empty-state h4 {
  font-size: 16px;
  font-weight: 700;
}

.notif-empty-state p {
  font-size: 12.5px;
  color: var(--label2);
  max-width: 260px;
}

/* -------------------- Toast Notification -------------------- */
.toast {
  position: fixed;
  top: calc(20px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: rgba(20, 20, 24, 0.94);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

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