/* ══════════════════════════════════════════════════════════════
   VINEX Mini App — Soft UI (neumorfizm), faqat oq-qora palitra

   Muvozanat qoidasi: har bir mavzuda yumshoq "yer" (bg) va unga teng
   vaznli "teskari" yuza (invert) ishlatiladi — kunda qora bloklar,
   tunda oq bloklar. Shu tufayli oq va qora miqdori teng ko'rinadi.
   ══════════════════════════════════════════════════════════════ */

:root,
:root[data-theme="light"] {
  --bg:        #e8e8e8;
  --sh-d:      #c2c2c2;
  --sh-l:      #ffffff;
  --txt:       #121212;
  --txt-2:     #616161;
  --txt-3:     #949494;
  --line:      rgba(0, 0, 0, .08);
  --scrim:     rgba(0, 0, 0, .42);

  /* Teskari yuza — kunda QORA */
  --inv:       #121212;
  --inv-2:     #1e1e1e;
  --inv-txt:   #fafafa;
  --inv-txt-2: rgba(250, 250, 250, .62);
  --inv-line:  rgba(255, 255, 255, .12);
  --inv-sh:    0 14px 30px -14px rgba(0, 0, 0, .55);
  --ring:      rgba(0, 0, 0, .18);
}

:root[data-theme="dark"] {
  --bg:        #1c1c1c;
  --sh-d:      #131313;
  --sh-l:      #272727;
  --txt:       #f2f2f2;
  --txt-2:     #a0a0a0;
  --txt-3:     #767676;
  --line:      rgba(255, 255, 255, .08);
  --scrim:     rgba(0, 0, 0, .62);

  /* Teskari yuza — tunda OQ */
  --inv:       #f4f4f4;
  --inv-2:     #e6e6e6;
  --inv-txt:   #101010;
  --inv-txt-2: rgba(16, 16, 16, .6);
  --inv-line:  rgba(0, 0, 0, .12);
  --inv-sh:    0 14px 30px -14px rgba(0, 0, 0, .7);
  --ring:      rgba(255, 255, 255, .26);
}

:root {
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --raise:     7px 7px 15px var(--sh-d), -7px -7px 15px var(--sh-l);
  --raise-sm:  4px 4px 9px var(--sh-d), -4px -4px 9px var(--sh-l);
  --raise-xs:  2px 2px 5px var(--sh-d), -2px -2px 5px var(--sh-l);
  --sunk:      inset 5px 5px 10px var(--sh-d), inset -5px -5px 10px var(--sh-l);
  --sunk-sm:   inset 3px 3px 6px var(--sh-d), inset -3px -3px 6px var(--sh-l);

  --ease:      cubic-bezier(.22, .81, .3, 1);
  --spring:    cubic-bezier(.18, .89, .32, 1.16);

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 66px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  transition: background-color .38s var(--ease), color .38s var(--ease);
}

/* Mavzu almashganda barcha yuzalar birga suziladi */
html.theming * {
  transition: background-color .38s var(--ease), color .38s var(--ease),
              box-shadow .38s var(--ease), border-color .38s var(--ease) !important;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: 0;
  outline: 0;
  background: transparent;
}

/* Brauzerning standart button paddingi tugma ichidagi rasm/ikonkani
   siqib qo'yadi — barcha tugmalarda nolga tushiriladi */
button { padding: 0; margin: 0; }

.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   LOGO
   ══════════════════════════════════════════════════════════════ */
.logo {
  position: relative;
  /* `<button>` bo'lganda brauzerning standart paddingi rasmni siqib qo'yadi
     va doira ichida qirqilgandek ko'rinadi — nolga tushiriladi */
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--inv);
  color: var(--inv-txt);
  box-shadow: var(--raise-sm);
  transition: transform .2s var(--spring), box-shadow .2s var(--ease);
}
.logo img {
  /* `contain` — logo qirqilmaydi, butunlay ko'rinadi */
  width: 100%; height: 100%; object-fit: contain; display: block;
  animation: photo-in .4s var(--ease) both;
}
/* Yuklangan rasm o'z ranglari bilan ko'rinadi — qora doira fon olinmaydi,
   aks holda to'q logolar kunduzi fonga qo'shilib ketadi */
.logo.has-img { background: var(--bg); color: var(--txt); }

/* Chekka — doira chegarasi kun va tunda ham aniq ko'rinadi.
   `::after` rasm ustidan chiziladi, shuning uchun hech qachon kesilmaydi. */
.logo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--ring); pointer-events: none;
}
.logo:active { transform: scale(.94); }
.logo svg { width: 58%; height: 58%; }
.logo.sm { width: 38px; height: 38px; }
.logo.md { width: 62px; height: 62px; }
.logo.lg { width: 92px; height: 92px; box-shadow: var(--raise); }

/* ══════════════════════════════════════════════════════════════
   YUKLANISH EKRANI
   ══════════════════════════════════════════════════════════════ */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; background: var(--bg);
}
.boot.out { animation: fade-out .34s var(--ease) forwards; }
.boot .logo { animation: logo-in .7s var(--spring) both, breathe 2.6s 0.7s ease-in-out infinite; }
.boot-bar {
  width: 132px; height: 8px; border-radius: 99px; box-shadow: var(--sunk-sm);
  overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%; width: 38%; border-radius: 99px;
  background: var(--inv); opacity: .55;
  animation: slide 1.15s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-115%); } 100% { transform: translateX(370%); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes logo-in {
  0%   { opacity: 0; transform: scale(.55) rotate(-14deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes fade-out { to { opacity: 0; visibility: hidden; } }

/* ══════════════════════════════════════════════════════════════
   YUQORI PANEL
   ══════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 11px;
  height: calc(var(--topbar-h) + var(--safe-top));
  padding: var(--safe-top) 16px 0;
  background: var(--bg);
}
.topbar-title {
  flex: 1 1 auto; min-width: 0;
  font-size: 17px; font-weight: 700; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: title-in .3s var(--ease);
}
/* Mavzu va balans tugmalari doim o'ng chekkada turadi */
.topbar .theme-btn { margin-left: auto; }
.topbar .theme-btn + .pill { margin-left: 0; }
@keyframes title-in { from { opacity: 0; transform: translateX(-6px); } }

.icon-btn {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--raise-sm);
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
}
.icon-btn:active { box-shadow: var(--sunk-sm); transform: scale(.93); }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 18px; height: 18px; }

/* Kun/tun almashtirgich */
.theme-btn { position: relative; overflow: hidden; }
.theme-btn svg { position: absolute; transition: transform .45s var(--spring), opacity .3s var(--ease); }
.theme-btn .i-sun  { transform: translateY(0) rotate(0); opacity: 1; }
.theme-btn .i-moon { transform: translateY(120%) rotate(45deg); opacity: 0; }
:root[data-theme="dark"] .theme-btn .i-sun  { transform: translateY(-120%) rotate(-45deg); opacity: 0; }
:root[data-theme="dark"] .theme-btn .i-moon { transform: translateY(0) rotate(0); opacity: 1; }

.pill {
  height: 38px; padding: 0 15px; border-radius: 99px;
  font-size: 13px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: var(--raise-sm);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
}
.pill:active { box-shadow: var(--sunk-sm); transform: scale(.96); }
.pill svg { width: 15px; height: 15px; opacity: .75; }
.pill.bump { animation: bump .5s var(--spring); }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } }

/* ══════════════════════════════════════════════════════════════
   ASOSIY MAYDON
   ══════════════════════════════════════════════════════════════ */
.view {
  padding: 6px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 26px);
  min-height: 60vh;
}
.view.no-tabs { padding-bottom: calc(var(--safe-bottom) + 26px); }

.screen { animation: screen-in .32s var(--ease); }
.screen.back { animation: screen-back .32s var(--ease); }
@keyframes screen-in   { from { opacity: 0; transform: translateX(16px); } }
@keyframes screen-back { from { opacity: 0; transform: translateX(-16px); } }

/* Ro'yxat elementlarining ketma-ket chiqishi */
.stagger > * { animation: item-in .42s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .11s; }
.stagger > *:nth-child(5) { animation-delay: .14s; }
.stagger > *:nth-child(6) { animation-delay: .17s; }
.stagger > *:nth-child(7) { animation-delay: .20s; }
.stagger > *:nth-child(8) { animation-delay: .23s; }
.stagger > *:nth-child(n+9) { animation-delay: .26s; }
@keyframes item-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }

/* ══════════════════════════════════════════════════════════════
   TIPOGRAFIKA
   ══════════════════════════════════════════════════════════════ */
.h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.sub { color: var(--txt-2); font-size: 13px; margin: 2px 0 0; }
.section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--txt-3);
  margin: 24px 4px 12px;
}
.muted { color: var(--txt-2); }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ══════════════════════════════════════════════════════════════
   KARTALAR
   ══════════════════════════════════════════════════════════════ */
.card {
  border-radius: var(--r-lg);
  box-shadow: var(--raise);
  padding: 18px;
  margin-bottom: 14px;
}
.card.flat { box-shadow: var(--raise-sm); border-radius: var(--r-md); padding: 15px; }
.card.sunk { box-shadow: var(--sunk); }

/* Teskari (invert) yuza — oq/qora muvozanatini beradi */
.card.invert, .invert {
  background: var(--inv); color: var(--inv-txt); box-shadow: var(--inv-sh);
}
.invert .sub, .invert .kv-k, .invert .balance-user,
.invert .row-sub, .invert .stat-k, .invert .stat-s { color: var(--inv-txt-2); }
.invert .kv + .kv { border-color: var(--inv-line); }

/* Balans kartasi — asosiy qora (kun) / oq (tun) blok */
.balance {
  border-radius: var(--r-xl);
  padding: 24px 22px;
  margin: 8px 0 6px;
  position: relative;
  overflow: hidden;
  background: var(--inv);
  color: var(--inv-txt);
  box-shadow: var(--inv-sh);
  animation: card-in .5s var(--spring) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.balance::after {                       /* yumshoq yorug'lik */
  content: ""; position: absolute; top: -60%; right: -30%;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, var(--inv-txt) 0%, transparent 70%);
  opacity: .07; pointer-events: none;
  animation: glow 9s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: translate(-24px, 20px) scale(1.15); } }
.balance-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--inv-txt-2);
}
.balance-value {
  font-size: 37px; font-weight: 800; letter-spacing: -.035em;
  margin: 7px 0 2px; font-variant-numeric: tabular-nums;
}
.balance-value small { font-size: 15px; font-weight: 600; color: var(--inv-txt-2); margin-left: 6px; }
.balance-user { font-size: 13px; color: var(--inv-txt-2); }
.balance-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.balance-actions { display: flex; gap: 10px; margin-top: 20px; }
.balance .btn {
  box-shadow: none; background: rgba(255, 255, 255, .1);
  color: var(--inv-txt); border: 1px solid var(--inv-line);
}
:root[data-theme="dark"] .balance .btn:not(.primary) { background: rgba(0, 0, 0, .07); }
.balance .btn:active { transform: scale(.97); box-shadow: none; }
/* Mavzu qoidasidan ustun tursin — aks holda tunda deyarli ko'rinmay qoladi */
:root .balance .btn.primary {
  background: var(--inv-txt); color: var(--inv);
  border-color: transparent; font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════════ */
.avatar {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg); color: var(--txt-2);
  box-shadow: var(--raise-sm);
  position: relative;
}
.avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: photo-in .45s var(--ease) both;
}
@keyframes photo-in { from { opacity: 0; transform: scale(1.06); } }
.avatar .initials {
  font-weight: 800; letter-spacing: -.02em; color: var(--txt);
  user-select: none;
}
.avatar svg { width: 46%; height: 46%; opacity: .5; }
.avatar.sm { width: 44px; height: 44px; font-size: 16px; }
.avatar.md { width: 56px; height: 56px; font-size: 20px; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; box-shadow: var(--raise); }
.avatar.has-img { background: var(--bg); }
.avatar::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--ring); pointer-events: none;
}
.balance .avatar.has-img { background: transparent; }
.balance .avatar { box-shadow: none; background: rgba(255, 255, 255, .12); color: var(--inv-txt); }
:root[data-theme="dark"] .balance .avatar { background: rgba(0, 0, 0, .08); }
.balance .avatar .initials { color: var(--inv-txt); }

/* ══════════════════════════════════════════════════════════════
   TUGMALAR
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 650; letter-spacing: -.01em;
  box-shadow: var(--raise-sm); cursor: pointer;
  transition: box-shadow .16s var(--ease), transform .16s var(--ease), opacity .16s var(--ease);
  width: 100%; position: relative; overflow: hidden;
}
.btn:active { box-shadow: var(--sunk-sm); transform: scale(.975); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  background: var(--inv); color: var(--inv-txt); box-shadow: var(--inv-sh);
}
.btn.primary:active { box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .6); opacity: .92; }
.btn.sm { height: 40px; font-size: 13.5px; padding: 0 14px; border-radius: var(--r-sm); }
.btn.ghost { box-shadow: none; border: 1px solid var(--line); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* Bosilganda to'lqin */
.ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: .16; transform: scale(0);
  animation: ripple .55s var(--ease) forwards;
}
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }

/* ══════════════════════════════════════════════════════════════
   XIZMATLAR TO'RI
   ══════════════════════════════════════════════════════════════ */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.tile {
  border-radius: var(--r-lg); box-shadow: var(--raise);
  padding: 17px 15px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 11px; min-height: 116px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
  position: relative; overflow: hidden;
}
.tile:active { box-shadow: var(--sunk-sm); transform: scale(.965); }
.tile-ico {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--inv); color: var(--inv-txt);
  box-shadow: var(--inv-sh);
  transition: transform .25s var(--spring);
}
.tile:active .tile-ico { transform: scale(.9) rotate(-6deg); }
.tile-ico svg { width: 20px; height: 20px; }
.tile-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; }
.tile-desc { font-size: 11.5px; color: var(--txt-3); margin-top: -7px; }
.tile.off { opacity: .38; pointer-events: none; }
.tile.off .tile-ico { background: transparent; color: var(--txt-3); box-shadow: var(--sunk-sm); }

/* ══════════════════════════════════════════════════════════════
   RO'YXAT
   ══════════════════════════════════════════════════════════════ */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex; align-items: center; gap: 13px;
  border-radius: var(--r-md); box-shadow: var(--raise-sm);
  padding: 14px 16px; cursor: pointer; text-align: left; width: 100%;
  transition: box-shadow .16s var(--ease), transform .16s var(--ease);
  position: relative; overflow: hidden;
}
.row:active { box-shadow: var(--sunk-sm); transform: scale(.99); }
.row.static { cursor: default; }
.row.static:active { box-shadow: var(--raise-sm); transform: none; }
.row-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 17px;
  background: var(--inv); color: var(--inv-txt); box-shadow: var(--inv-sh);
}
.row-ico.plain { background: transparent; color: var(--txt); box-shadow: var(--raise-xs); }
.row-ico svg { width: 17px; height: 17px; }
.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 14.5px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-sub { font-size: 12px; color: var(--txt-2); margin-top: 1px; }
.row-end { text-align: right; flex-shrink: 0; }
.row-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-note { font-size: 11px; color: var(--txt-3); margin-top: 1px; }
.chev { width: 16px; height: 16px; opacity: .3; flex-shrink: 0; transition: transform .18s var(--ease); }
.row:active .chev { transform: translateX(3px); }

/* ══════════════════════════════════════════════════════════════
   NISHONLAR
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  box-shadow: var(--raise-xs); white-space: nowrap;
}
.badge.solid { background: var(--inv); color: var(--inv-txt); box-shadow: none; }
.badge.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .65;
}

/* ══════════════════════════════════════════════════════════════
   MAYDONLAR
   ══════════════════════════════════════════════════════════════ */
.field { margin-bottom: 14px; }
.label {
  display: block; font-size: 12px; font-weight: 650;
  color: var(--txt-2); margin: 0 0 8px 4px;
}
.input, .textarea, .select {
  width: 100%; border-radius: var(--r-md); box-shadow: var(--sunk);
  padding: 15px 16px; font-size: 15px; color: var(--txt);
  transition: box-shadow .22s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--txt-3); }
.input:focus, .textarea:focus, .select:focus {
  box-shadow: var(--sunk), 0 0 0 1.5px var(--txt-3);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 40px; }
.field-hint { font-size: 11.5px; color: var(--txt-3); margin: 7px 0 0 4px; }
.input-big {
  text-align: center; font-size: 30px; font-weight: 800;
  letter-spacing: -.03em; padding: 20px 16px; font-variant-numeric: tabular-nums;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 99px;
  font-size: 13px; font-weight: 650; box-shadow: var(--raise-xs);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease);
}
.chip:active { transform: scale(.93); }
.chip.on { background: var(--inv); color: var(--inv-txt); box-shadow: none; }

.segment {
  display: flex; gap: 4px; padding: 5px; border-radius: 99px;
  box-shadow: var(--sunk-sm); margin-bottom: 16px;
}
.segment button {
  flex: 1; height: 38px; border-radius: 99px; cursor: pointer;
  font-size: 13px; font-weight: 650; color: var(--txt-2);
  transition: all .22s var(--ease);
}
.segment button.on { background: var(--inv); color: var(--inv-txt); }

.switch {
  width: 50px; height: 29px; border-radius: 99px; box-shadow: var(--sunk-sm);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: box-shadow .22s var(--ease), background-color .22s var(--ease);
}
.switch i {
  position: absolute; top: 4px; left: 4px; width: 21px; height: 21px;
  border-radius: 50%; background: var(--txt-3);
  box-shadow: var(--raise-xs); transition: all .28s var(--spring);
}
.switch.on { background: var(--inv); }
.switch.on i { left: 25px; background: var(--inv-txt); }

/* ══════════════════════════════════════════════════════════════
   BO'SH HOLAT / YUKLANISH
   ══════════════════════════════════════════════════════════════ */
.empty { text-align: center; padding: 54px 20px; animation: item-in .4s var(--ease) both; }
.empty-ico {
  width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--sunk);
}
.empty-ico svg { width: 26px; height: 26px; opacity: .35; }
.empty-ico.invert svg { opacity: 1; width: 28px; height: 28px; }
.empty-title { font-size: 15px; font-weight: 700; }
.empty-text { font-size: 13px; color: var(--txt-2); margin-top: 5px; }

.skeleton { display: flex; flex-direction: column; gap: 10px; }
.sk {
  height: 66px; border-radius: var(--r-md); box-shadow: var(--sunk-sm);
  position: relative; overflow: hidden;
}
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--sh-l) 50%, transparent 80%);
  opacity: .5; transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk.tall { height: 118px; border-radius: var(--r-lg); }

.spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  opacity: .7; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   MA'LUMOT QATORLARI
   ══════════════════════════════════════════════════════════════ */
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv-k { font-size: 13px; color: var(--txt-2); flex-shrink: 0; }
.kv-v {
  font-size: 13.5px; font-weight: 650; text-align: right;
  word-break: break-word; font-variant-numeric: tabular-nums;
}

.copy-box {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--r-md); box-shadow: var(--sunk); padding: 15px 16px;
  cursor: pointer; margin-bottom: 12px;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.copy-box:active { transform: scale(.99); }
.copy-box.copied { box-shadow: var(--sunk), 0 0 0 1.5px var(--txt-3); }
.copy-box .cb-main { flex: 1; min-width: 0; }
.copy-box .cb-label { font-size: 11px; color: var(--txt-3); font-weight: 650; }
.copy-box .cb-value {
  font-size: 17px; font-weight: 750; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; word-break: break-all; margin-top: 2px;
}
.copy-box svg { width: 18px; height: 18px; opacity: .4; flex-shrink: 0; }

.result-big {
  text-align: center; padding: 28px 18px; border-radius: var(--r-lg);
  background: var(--inv); color: var(--inv-txt); box-shadow: var(--inv-sh);
  margin-bottom: 14px; cursor: pointer;
  animation: card-in .5s var(--spring) both;
}
.result-big .rb-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--inv-txt-2);
}
.result-big .rb-value {
  font-size: 38px; font-weight: 800; letter-spacing: .06em;
  margin-top: 8px; font-variant-numeric: tabular-nums;
}

.timer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}
.timer svg { animation: tick 2s steps(8) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   PASTKI PANEL
   ══════════════════════════════════════════════════════════════ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; align-items: center; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 10px var(--safe-bottom);
  background: var(--bg);
  box-shadow: 0 -6px 18px -12px var(--sh-d);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0; cursor: pointer; color: var(--txt-3);
  transition: color .22s var(--ease), transform .22s var(--spring);
  position: relative;
}
.tab svg { width: 21px; height: 21px; transition: transform .3s var(--spring); }
.tab span { font-size: 10px; font-weight: 650; letter-spacing: -.01em; }
.tab.on { color: var(--txt); }
.tab.on svg { transform: translateY(-2px) scale(1.06); }
.tab.on::after {
  content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--inv);
  animation: dot-in .32s var(--spring);
}
@keyframes dot-in { from { transform: scale(0); opacity: 0; } }
.tab:active { transform: scale(.9); }

/* ══════════════════════════════════════════════════════════════
   SHEET
   ══════════════════════════════════════════════════════════════ */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-back {
  position: absolute; inset: 0; background: var(--scrim);
  animation: fade-in .24s var(--ease);
  backdrop-filter: blur(2px);
}
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 12px 18px calc(22px + var(--safe-bottom));
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 -10px 40px -14px rgba(0, 0, 0, .5);
  animation: sheet-up .38s var(--spring);
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-wrap.closing .sheet { animation: sheet-down .24s var(--ease) forwards; }
.sheet-wrap.closing .sheet-back { animation: fade-out .24s var(--ease) forwards; }
@keyframes sheet-down { to { transform: translateY(100%); } }
.sheet::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 99px;
  background: var(--txt-3); opacity: .35; margin: 0 auto 16px;
}
.sheet-title { font-size: 18px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 4px; }
.sheet-sub { font-size: 13px; color: var(--txt-2); margin-bottom: 18px; }

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  transform: translate(-50%, 26px) scale(.96); z-index: 80;
  max-width: calc(100vw - 36px);
  padding: 13px 18px; border-radius: var(--r-md);
  background: var(--inv); color: var(--inv-txt);
  font-size: 13.5px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none;
  box-shadow: var(--inv-sh);
  transition: opacity .24s var(--ease), transform .34s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ══════════════════════════════════════════════════════════════
   SAHIFALASH / STATISTIKA
   ══════════════════════════════════════════════════════════════ */
.pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 18px;
}
.pager .page-num { font-size: 13px; font-weight: 650; color: var(--txt-2); }
.pager .icon-btn[disabled] { opacity: .3; pointer-events: none; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  border-radius: var(--r-md); box-shadow: var(--raise-sm); padding: 15px;
}
.stat.invert { box-shadow: var(--inv-sh); }
.stat-k { font-size: 11px; font-weight: 650; color: var(--txt-3); letter-spacing: .04em; text-transform: uppercase; }
.stat-v { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat-s { font-size: 11.5px; color: var(--txt-2); margin-top: 2px; }

.bars { display: flex; align-items: flex-end; gap: 5px; height: 78px; margin-top: 6px; }
.bars .bar {
  flex: 1 1 0; max-width: 26px; min-width: 4px;
  border-radius: 5px 5px 3px 3px; background: var(--inv);
  min-height: 4px; transform-origin: bottom; opacity: .9;
  animation: bar-up .6s var(--spring) both;
}
.bars .bar.zero { opacity: .22; }
.bars { justify-content: space-between; }
@keyframes bar-up { from { transform: scaleY(0); opacity: 0; } }
.bars-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--txt-3); margin-top: 8px; }

/* ══════════════════════════════════════════════════════════════
   YORDAMCHILAR
   ══════════════════════════════════════════════════════════════ */
.stack { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mt-lg { margin-top: 24px; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

.logo-preview {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: var(--r-md); box-shadow: var(--sunk);
  margin-bottom: 14px;
}
.logo-preview .logo { width: 68px; height: 68px; }

@media (min-width: 620px) {
  .view, .topbar { max-width: 620px; margin: 0 auto; }
  .tabbar { max-width: 620px; left: 50%; transform: translateX(-50%); }
  .sheet { max-width: 620px; left: 50%; transform: translateX(-50%); }
  @keyframes sheet-up { from { transform: translateX(-50%) translateY(100%); } }
  @keyframes sheet-down { to { transform: translateX(-50%) translateY(100%); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   QO'SHIMCHA HARAKATLAR
   ══════════════════════════════════════════════════════════════ */

/* Bosilganda "cho'kish" — barmoq ostidagi javob */
.btn, .row, .tile, .chip, .icon-btn, .pill, .copy-box, .logo, .result-big {
  will-change: transform;
}
.btn:active svg, .row:active .row-ico, .chip:active svg { transform: scale(.9); }
.btn svg, .row-ico, .chip svg { transition: transform .18s var(--spring); }

/* Asosiy tugma bosilganda yorug'lik yugurishi */
.btn.primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%,
              var(--inv-txt) 50%, transparent 70%);
  opacity: 0; transform: translateX(-100%);
}
.btn.primary:active::before { animation: sweep .5s var(--ease); }
@keyframes sweep {
  0%   { opacity: .18; transform: translateX(-100%); }
  100% { opacity: 0;   transform: translateX(100%); }
}

/* Maydonga fokus — yengil ko'tarilish */
.field { transition: transform .22s var(--ease); }
.field:focus-within { transform: translateY(-1px); }

/* Chip tanlanganda sakrash */
.chip.on { animation: chip-pop .32s var(--spring); }
@keyframes chip-pop {
  0% { transform: scale(.86); } 60% { transform: scale(1.07); } 100% { transform: scale(1); }
}

/* Segment tugmasi */
.segment button.on { animation: chip-pop .3s var(--spring); }

/* Nusxalanganda yashash */
.copy-box.copied { animation: flash .55s var(--ease); }
@keyframes flash {
  0%, 100% { transform: scale(1); }
  35%      { transform: scale(1.015); }
}

/* Natija ekranidagi belgi — chiziq chizilishi */
.mark {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--inv); color: var(--inv-txt); box-shadow: var(--inv-sh);
  animation: mark-in .55s var(--spring) both;
}
.mark svg { width: 32px; height: 32px; }
.mark svg path, .mark svg circle {
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: draw .55s .25s var(--ease) forwards;
}
@keyframes mark-in { from { opacity: 0; transform: scale(.4); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Statistika kartalari — ketma-ket ko'tariladi */
.stat { animation: item-in .42s var(--ease) both; }

/* Sheet ichidagi bloklar ham ketma-ket chiqadi */
.sheet > * { animation: item-in .34s var(--ease) both; }
.sheet > *:nth-child(2) { animation-delay: .03s; }
.sheet > *:nth-child(3) { animation-delay: .06s; }
.sheet > *:nth-child(4) { animation-delay: .09s; }
.sheet > *:nth-child(5) { animation-delay: .12s; }
.sheet > *:nth-child(n+6) { animation-delay: .15s; }

/* Tabbar nuqtasi almashganda */
.tab.on span { animation: item-in .3s var(--ease) both; }

/* Spinner ichidagi tugma matni */
.btn .spinner { margin-right: 2px; }

/* Ro'yxat qatori bosilganda chapdan yorug'lik */
.row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--inv); transform: scaleY(0); transform-origin: center;
  transition: transform .22s var(--spring);
}
.row:active::before { transform: scaleY(1); }
.row.static::before { display: none; }

/* Avatar yuklanayotganda yumshoq puls */
.avatar:not(.has-img) .initials { animation: soft-pulse 2.4s ease-in-out infinite; }
@keyframes soft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }

/* Balans kartasidagi raqam yangilanganda */
.balance-value.updated { animation: bump .5s var(--spring); }

@media (prefers-reduced-motion: reduce) {
  .btn.primary::before, .mark svg path, .mark svg circle { animation: none !important; }
  .row::before { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   SOVG'A KATALOGI (Telegram gift ko'rinishi)
   ══════════════════════════════════════════════════════════════ */
.gift-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px;
}
.gift-card {
  border-radius: var(--r-lg); box-shadow: var(--raise);
  padding: 12px 12px 15px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
  position: relative; overflow: hidden;
}
.gift-card:active { box-shadow: var(--sunk-sm); transform: scale(.965); }
.gift-card.sold { opacity: .45; }

.gift-media {
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-md);
  box-shadow: var(--sunk-sm); margin-bottom: 9px;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.gift-anim, .nft-anim {
  width: 84%; height: 84%;
  opacity: 0; transition: opacity .4s var(--ease);
}
.gift-anim.ready, .nft-anim.ready { opacity: 1; }
.gift-anim.lg { width: 168px; height: 168px; }
.gift-anim svg, .nft-anim svg { width: 100% !important; height: 100% !important; }
.gift-emoji { font-size: 42px; line-height: 1; }
.gift-emoji.lg { font-size: 92px; }

.gift-badge {
  position: absolute; top: 7px; right: 7px;
  padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 700;
  background: var(--inv); color: var(--inv-txt);
}
.gift-name {
  font-size: 13.5px; font-weight: 700; letter-spacing: -.01em;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gift-stars { font-size: 11.5px; color: var(--txt-2); }
.gift-stars b { font-weight: 750; color: var(--txt); }
.gift-price {
  font-size: 12.5px; font-weight: 700; margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.gift-hero {
  display: grid; place-items: center; padding: 10px 0 18px;
}

/* ══════════════════════════════════════════════════════════════
   NFT KATALOGI (Telegram market ko'rinishi)
   ══════════════════════════════════════════════════════════════ */
.nft-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.nft-card {
  border-radius: var(--r-lg); box-shadow: var(--raise);
  padding: 10px 10px 14px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
  overflow: hidden;
}
.nft-card:active { box-shadow: var(--sunk-sm); transform: scale(.965); }

.nft-media {
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-md);
  margin-bottom: 9px; display: grid; place-items: center;
  position: relative; overflow: hidden;
  background: var(--bg); box-shadow: var(--sunk-sm);
}
.nft-img { width: 88%; height: 88%; object-fit: contain; }
.nft-emoji { font-size: 40px; }
.nft-label {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%);
  padding: 3px 9px; border-radius: 99px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  background: rgba(0, 0, 0, .35); color: #fff; backdrop-filter: blur(3px);
}
.nft-name {
  font-size: 13.5px; font-weight: 700; letter-spacing: -.01em;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nft-attr {
  font-size: 11px; color: var(--txt-3);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nft-price {
  font-size: 12.5px; font-weight: 700; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.nft-hero {
  width: 100%; aspect-ratio: 4 / 3; max-height: 260px;
  border-radius: var(--r-lg); margin-bottom: 16px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--bg); box-shadow: var(--sunk-sm);
  animation: card-in .5s var(--spring) both;
}
.nft-anim.lg { width: 66%; height: 88%; }
.nft-hero .nft-img { width: 70%; height: 88%; }

/* Animatsiya yuklanguncha — yumshoq puls */
.gift-media:has(.gift-anim:not(.ready))::after,
.nft-media:has(.nft-anim:not(.ready))::after {
  content: ""; position: absolute; width: 46%; height: 46%; border-radius: 50%;
  background: var(--txt-3); opacity: .12;
  animation: soft-pulse 1.4s ease-in-out infinite;
}

/* ══════════════════════════════════════════════════════════════
   TO'LOV — NUSXALASH BLOKI
   ══════════════════════════════════════════════════════════════ */
.pay-copy {
  border-radius: var(--r-lg); box-shadow: var(--raise);
  padding: 16px 18px 14px; margin-bottom: 12px; cursor: pointer;
  position: relative; overflow: hidden;
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.pay-copy:active { box-shadow: var(--sunk-sm); transform: scale(.985); }

.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-ico {
  width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--inv); color: var(--inv-txt);
}
.pc-ico svg { width: 13px; height: 13px; }
.pc-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--txt-3);
}
.pc-value {
  font-size: 25px; font-weight: 800; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; margin: 10px 0 12px;
  word-break: break-all; line-height: 1.2;
}
.pc-action {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 99px;
  font-size: 12.5px; font-weight: 700;
  background: var(--inv); color: var(--inv-txt);
}
.pc-action svg { width: 14px; height: 14px; }

/* Nusxalangach — tasdiq */
.pay-copy.copied { box-shadow: var(--sunk); }
.pay-copy.copied .pc-action { animation: chip-pop .35s var(--spring); }
.pay-copy.copied .pc-action span::after { content: "ndi ✓"; }
