/* ==========================================================================
   Gladiator Mini App - Pixel-Perfect Apple iOS / Telegram Native Design System
   Matches https://my.alivps.net/miniapp 100%
   ========================================================================== */

@font-face {
  font-family: 'Vazir';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Vazir.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazir';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Vazir-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Vazir';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Vazir-Bold.woff2') format('woff2');
}

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card2: #F2F2F7;
  --label: #0B0B0F;
  --label2: rgba(60,60,67,.62);
  --label3: rgba(60,60,67,.32);
  --sep: rgba(60,60,67,.14);
  --fill: rgba(120,120,128,.12);
  --blue: #007AFF;
  --green: #22C55E;
  --red: #EF4444;
  --orange: #F59E0B;
  --purple: #7C6CF0;
  --teal: #22B8CF;
  --pink: #EC4899;
  --blue-t: rgba(0,122,255,.12);
  --green-t: rgba(34,197,94,.14);
  --red-t: rgba(239,68,68,.12);
  --orange-t: rgba(245,158,11,.16);
  --bar: rgba(247,247,250,.86);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.06);
  --safe-t: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #161618;
  --card2: #202023;
  --label: #ffffff;
  --label2: rgba(235,235,245,.6);
  --label3: rgba(235,235,245,.3);
  --sep: rgba(255,255,255,.09);
  --fill: rgba(255,255,255,.08);
  --blue: #0A84FF;
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --purple: #8B7CF6;
  --teal: #3CCFE6;
  --pink: #FF5C93;
  --blue-t: rgba(10,132,255,.16);
  --green-t: rgba(48,209,88,.16);
  --red-t: rgba(255,69,58,.16);
  --orange-t: rgba(255,159,10,.17);
  --bar: rgba(14,14,16,.88);
  --shadow: none;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--label);
}

body {
  font-family: 'Vazir', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

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

svg.i {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: -.14em;
}

.app {
  padding-bottom: calc(110px + var(--safe-b));
}

.scr {
  display: none;
  padding: 0 16px;
  animation: fade .25s ease;
}

.scr.on {
  display: block;
}

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

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + var(--safe-t)) 16px 8px;
  background: var(--bg);
  transition: background .2s, box-shadow .2s;
}

.top.solid {
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 .5px 0 var(--sep);
}

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

.userpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--card);
  border: 0;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  max-width: 62%;
  box-shadow: var(--shadow);
}

.userpill .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #FF9F0A, #FF453A);
  flex: none;
  overflow: hidden;
}

.userpill .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.userpill span.nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.iconbtn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 24px;
  cursor: pointer;
}

.iconbtn:active {
  background: var(--fill);
}

.iconbtn .dot {
  position: absolute;
  top: 7px;
  left: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
}

/* Typography Titles */
.large {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin: 6px 2px 2px;
  line-height: 1.25;
}

.sub {
  color: var(--label2);
  font-size: 14px;
  margin: 0 2px 16px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

.pad {
  padding: 16px;
}

.lab {
  font-size: 12.5px;
  color: var(--label2);
  font-weight: 500;
  letter-spacing: .1px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--fill);
  color: var(--label2);
}

.tag.g { background: var(--green-t); color: var(--green); }
.tag.r { background: var(--red-t); color: var(--red); }
.tag.o { background: var(--orange-t); color: var(--orange); }
.tag.b { background: var(--blue-t); color: var(--blue); }

.tag.live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent);
}

.big {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 4px 0 8px;
}

.big em {
  font-style: normal;
  color: var(--label3);
}

.big small {
  font-size: 15px;
  color: var(--label2);
  font-weight: 500;
  margin-right: 8px;
  letter-spacing: 0;
}

.chgbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(135deg, #22C55E, #14B8A6);
  box-shadow: 0 8px 18px rgba(34,197,94,.35);
  transition: transform .12s;
}

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

.chgbtn .i {
  font-size: 17px;
}

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

.wal .wi {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 25px;
  color: #fff;
  background: linear-gradient(135deg, #0A84FF, #6366F1);
  box-shadow: 0 8px 20px rgba(10,132,255,.35);
  flex: none;
}

.wal .wt {
  font-weight: 600;
  font-size: 15px;
}

.wal .wu {
  font-size: 12px;
  color: var(--label2);
}

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

.tile {
  border-radius: 18px;
  padding: 12px 8px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tile .ti {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 7px;
  font-size: 21px;
  color: #fff;
}

.tile .tv {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}

.tile .tv small {
  font-size: 11px;
  font-weight: 500;
  color: var(--label2);
  margin-right: 2px;
}

.tile .tk {
  font-size: 11.5px;
  color: var(--label2);
  font-weight: 500;
  margin-top: 1px;
}

.tile.g { background: var(--green-t); }
.tile.g .ti { background: linear-gradient(135deg, #22C55E, #14B8A6); box-shadow: 0 6px 14px rgba(34,197,94,.35); }

.tile.r { background: var(--red-t); }
.tile.r .ti { background: linear-gradient(135deg, #FF6B6B, #E03131); box-shadow: 0 6px 14px rgba(239,68,68,.35); }

.tile.b { background: var(--blue-t); }
.tile.b .ti { background: linear-gradient(135deg, #0A84FF, #6366F1); box-shadow: 0 6px 14px rgba(10,132,255,.35); }

.spt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 10px;
}

.spt b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.spt b .fi {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #FF9F0A, #FF2D55);
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(255,45,85,.35);
}

.hs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px 14px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
}

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

.sp {
  flex: 0 0 74%;
  max-width: 290px;
  scroll-snap-align: start;
  border: 0;
  text-align: right;
  color: #fff;
  border-radius: 22px;
  padding: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #FF2D55 0%, #AF52DE 100%);
  box-shadow: 0 12px 26px rgba(175,82,222,.32);
  transition: transform .12s;
}

.sp:nth-child(2n) {
  background: linear-gradient(135deg, #FF9F0A 0%, #FF2D55 100%);
  box-shadow: 0 12px 26px rgba(255,45,85,.3);
}

.sp:nth-child(3n) {
  background: linear-gradient(135deg, #0A84FF 0%, #AF52DE 100%);
  box-shadow: 0 12px 26px rgba(10,132,255,.3);
}

.sp:active {
  transform: scale(.98);
}

.sp::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  left: -34px;
  top: -44px;
  background: rgba(255,255,255,.14);
}

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

.sp .sh {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp .sh .sv {
  width: 38px;
  height: 38px;
  font-size: 19px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}

.sp .sh .pn {
  font-size: 12.5px;
  opacity: .92;
}

.sp .sh .off {
  margin-right: auto;
  background: rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.sp .gbv {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 10px;
}

.sp .gbv small {
  font-size: 12.5px;
  font-weight: 500;
  opacity: .9;
  margin-right: 4px;
}

.sp .tt {
  font-size: 12.5px;
  opacity: .9;
}

.sp .pr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
}

.sp .pr b {
  font-size: 20px;
  line-height: 1.1;
}

.sp .pr small {
  font-size: 11px;
  opacity: .9;
  margin-right: 3px;
}

.sp .pr s {
  display: block;
  font-size: 11.5px;
  opacity: .75;
}

.sp .go {
  background: #fff;
  color: #FF2D55;
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 13px;
}

.divider {
  height: 1px;
  background: var(--sep);
}

.actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 6px;
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.actions button + button {
  border-right: 1px solid var(--sep);
}

.actions button:active {
  background: var(--fill);
}

.actions .i {
  font-size: 18px;
}

.bar {
  height: 8px;
  background: var(--fill);
  border-radius: 6px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--blue);
  transition: width .7s cubic-bezier(.32,.72,0,1);
}

.pcttag {
  font-weight: 700;
  color: var(--label);
}

.rowbetween {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.rowbetween b {
  font-size: 16px;
}

.scale {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--label2);
  margin-top: 6px;
}

/* Segmented Control */
.seg {
  display: flex;
  padding: 3px;
  background: var(--card);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
}

.seg::-webkit-scrollbar { display: none; }

.seg button {
  flex: 1 0 auto;
  border: 0;
  background: none;
  padding: 9px 16px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14px;
  color: var(--label);
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s;
}

.seg button.on {
  background: color-mix(in srgb, var(--label) 22%, var(--card));
}

:root:not([data-theme="dark"]) .seg button.on {
  background: var(--fill);
}

/* Search Box */
.search {
  position: relative;
  margin-bottom: 14px;
}

.search input {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  background: var(--card);
  color: var(--label);
  font-family: inherit;
  font-size: 15px;
  padding: 0 44px 0 42px;
  transition: box-shadow .2s;
}

.search input::placeholder {
  color: var(--label2);
}

.search input:focus {
  box-shadow: 0 0 0 2px var(--blue);
}

.search .si {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--label2);
  font-size: 19px;
  pointer-events: none;
}

.search .sx {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--label2);
  display: none;
  place-items: center;
  font-size: 15px;
  cursor: pointer;
}

.search.has .sx {
  display: grid;
}

.sect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 4px 10px;
  color: var(--label2);
  font-size: 13px;
  font-weight: 500;
}

.sect b {
  color: var(--label);
  font-size: 17px;
  font-weight: 700;
}

/* Gift Banner */
.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 14px;
  color: #fff;
  cursor: pointer;
  border: 0;
  width: 100%;
  text-align: right;
  position: relative;
  overflow: hidden;
}

.banner::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  left: -40px;
  top: -60px;
  background: rgba(255,255,255,.14);
}

.banner.gift {
  background: linear-gradient(135deg, #FF9F0A, #FF453A);
  box-shadow: 0 10px 24px rgba(255,159,10,.35);
}

.banner.gift.claimed {
  opacity: .75;
  filter: grayscale(.25);
  cursor: default;
}

.banner .bi {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(255,255,255,.22);
  display: grid;
  place-items: center;
  font-size: 25px;
  flex: none;
  z-index: 1;
}

.banner b {
  display: block;
  font-size: 16px;
  z-index: 1;
  position: relative;
}

.banner span.s {
  font-size: 12.5px;
  opacity: .92;
  z-index: 1;
  position: relative;
}

.banner .go {
  margin-right: auto;
  font-size: 20px;
  opacity: .9;
  transform: scaleX(-1);
  z-index: 1;
}

/* Account Card */
.acc {
  cursor: pointer;
  transition: transform .12s;
}

.acc:active {
  transform: scale(.985);
}

.acc .head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
}

.sv {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 23px;
  color: #fff;
  flex: none;
  background: linear-gradient(135deg, #3B82F6, #6366F1);
}

.acc .nm {
  font-weight: 700;
  font-size: 16px;
  direction: ltr;
  text-align: right;
  line-height: 1.3;
}

.acc .tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.acc .rem {
  margin-right: auto;
  text-align: left;
}

.acc .rem b {
  font-size: 22px;
  line-height: 1.2;
  display: block;
}

.acc .rem span {
  font-size: 11.5px;
  color: var(--label2);
}

.acc .usage {
  padding: 0 16px 14px;
}

.acc.mini .head {
  padding-bottom: 10px;
}

.acc .divider {
  height: 1px;
  background: var(--sep);
  margin: 0 14px;
}

.acc .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 14px 12px;
  text-align: center;
}

.acc .stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc .stats .k {
  font-size: 11px;
  color: var(--label2);
}

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

.acc.expired {
  opacity: 0.92;
}

.acc.expired .rem b {
  color: var(--red);
}

/* Package List Row */
.list .pkg {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  background: none;
  width: 100%;
  text-align: right;
  cursor: pointer;
  position: relative;
  transition: background .12s;
}

.list .pkg + .pkg::before {
  content: '';
  position: absolute;
  top: 0;
  right: 76px;
  left: 0;
  height: 1px;
  background: var(--sep);
}

.list .pkg:active {
  background: var(--fill);
}

.gb {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--blue-t);
  color: var(--blue);
  font-weight: 700;
  line-height: 1.05;
  font-size: 17px;
  flex: none;
}

.gb small {
  font-size: 10px;
  font-weight: 500;
  opacity: .85;
}

.pkg .t1 {
  font-weight: 600;
  font-size: 15.5px;
}

.pkg .t2 {
  font-size: 12.5px;
  color: var(--label2);
}

.pkg .pr {
  margin-right: auto;
  text-align: left;
}

.pkg .pr b {
  font-size: 16.5px;
}

.pkg .pr small {
  font-size: 11px;
  color: var(--label2);
  margin-right: 3px;
}

.pkg .pr s {
  display: block;
  font-size: 11.5px;
  color: var(--label3);
}

/* Rows (More Screen) */
.rows .row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  min-height: 58px;
  background: none;
  border: 0;
  width: 100%;
  text-align: right;
  cursor: pointer;
  position: relative;
  transition: background .12s;
}

.rows .row + .row::before {
  content: '';
  position: absolute;
  top: 0;
  right: 66px;
  left: 0;
  height: 1px;
  background: var(--sep);
}

.rows .row:active {
  background: var(--fill);
}

.ric {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  flex: none;
}

.row .t1 {
  font-size: 16px;
  font-weight: 500;
}

.row .t2 {
  font-size: 12.5px;
  color: var(--label2);
}

.row .grow {
  flex: 1;
  min-width: 0;
}

.row .chev {
  color: var(--label3);
  font-size: 18px;
  transform: scaleX(-1);
}

.profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 16px;
}

.profile .av {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0A84FF, #6366F1);
  overflow: hidden;
}

.profile .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile .nm {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

/* Floating iOS Bottom Tab Bar */
.tabcard {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border: 1px solid var(--sep);
}

.tab {
  flex: 1;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 0 6px;
  border-radius: 17px;
  color: var(--label2);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .25s, color .25s;
}

.tab .pill {
  display: grid;
  place-items: center;
  font-size: 20px;
  width: auto;
  height: 24px;
  background: none;
  transition: transform .25s;
}

.tab .pill i {
  font-size: 19px;
  line-height: 1;
  transition: transform .2s ease;
}

.tab.on {
  color: var(--blue);
  font-weight: 700;
  background: var(--blue-t);
}

.tab.on .pill {
  transform: translateY(-1px) scale(1.06);
}

/* Bottom Sheet & Backdrop */
.dim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 40;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

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

.sheet {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  z-index: 41;
  max-height: 90%;
  overflow: auto;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  padding: 8px 16px calc(24px + var(--safe-b));
  transform: translateY(105%);
  transition: transform .36s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -12px 40px rgba(0,0,0,.35);
  border-top: 1px solid var(--sep);
}

.sheet.on {
  transform: none;
}

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

.sheet h3 {
  margin: 0 2px 8px;
  font-size: 22px;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  transition: transform .12s, opacity .2s;
}

.btn:active {
  transform: scale(.98);
  opacity: .9;
}

.btn.sec {
  background: var(--card);
  color: var(--blue);
}

.btn.ok {
  background: var(--green);
  color: #04130a;
}

.btn.dng {
  background: var(--red-t);
  color: var(--red);
}

.btn.dng.solid {
  background: var(--red);
  color: #fff;
}

.btn + .btn {
  margin-top: 10px;
}

div[style*="display:flex"] > .btn + .btn,
div[style*="display: flex"] > .btn + .btn,
.rowbetween > .btn + .btn {
  margin-top: 0;
}

.btn[disabled] {
  opacity: .55;
  pointer-events: none;
}

/* QR Code Display */
.qrbox {
  background: #fff;
  border-radius: 22px;
  padding: 16px;
  width: 232px;
  height: 232px;
  margin: 8px auto 14px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.qrbox img, .qrbox canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Bank Card View in Wallet Sheet */
.cardbox {
  background: linear-gradient(135deg, #1c2b4a, #3b2a6b 60%, #5b3a9b);
  color: #fff;
  border-radius: 24px;
  padding: 20px 18px;
  margin: 0 0 12px;
  position: relative;
  overflow: hidden;
  min-height: 206px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 30px rgba(59,42,107,.35);
}

.cardbox::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -70px;
  bottom: -90px;
  background: rgba(255,255,255,.07);
}

.cardbox::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  left: -40px;
  top: -50px;
  background: rgba(255,255,255,.1);
}

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

.cardbox .chip {
  width: 44px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5d58a, #c9a24a);
  opacity: .95;
  margin-top: 4px;
}

.cardbox .cn,
.cardbox .num {
  direction: ltr;
  text-align: center;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 22px;
  letter-spacing: 2px;
  margin: 16px 0;
  font-weight: 700;
}

.cardbox .bank {
  position: absolute;
  left: 20px;
  top: 20px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: .85;
}

.cardbox .holder span {
  display: block;
  font-size: 10.5px;
  opacity: .7;
}

.cardbox .holder b {
  font-size: 14px;
}

.cardbox .copybtn,
.cardbox .cp {
  background: rgba(255,255,255,.2);
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: background .15s;
}

.cardbox .copybtn:active,
.cardbox .cp:active {
  background: rgba(255,255,255,.32);
}

.stp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 8px;
  font-weight: 700;
  color: var(--label);
  font-size: 15px;
}
.stp i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.btn.ok {
  background: #6ee7b7;
  color: #065f46;
  font-weight: 700;
}
[data-theme="dark"] .btn.ok {
  background: #34d399;
  color: #042f1a;
}
.btn.ok:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stpn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-t);
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
}

.stpd {
  font-size: 12px;
  color: var(--label2);
  margin-top: 1px;
}

.note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 14px;
  font-weight: 600;
}

.note.o {
  background: var(--orange-t);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.note.r {
  background: var(--red-t);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.note.g {
  background: var(--green-t);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.amtin {
  width: 100%;
  height: 54px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  background: var(--card);
  color: var(--label);
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  padding: 0 14px;
  transition: box-shadow .2s;
}

.amtin:focus {
  box-shadow: 0 0 0 2px var(--blue);
}

.chps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.chps button {
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--label);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.chps button.on {
  background: var(--blue);
  color: #fff;
  border-color: transparent;
}

.rcpt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blue-t);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  border: 2px dashed var(--blue);
  width: 100%;
  text-align: right;
  color: inherit;
  transition: transform .12s, background .2s;
}

.rcpt:active {
  transform: scale(.985);
}

.rcpt.done {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-t);
}

.rcpt b {
  color: var(--blue);
}

.rcpt.done b {
  color: var(--green);
}

.rcpt img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}

.rcpt .ph {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--blue);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  flex: none;
  box-shadow: 0 6px 14px rgba(10,132,255,.35);
}

/* Toast Notification */
.toast {
  position: fixed;
  top: calc(14px + var(--safe-t));
  right: 50%;
  transform: translate(50%, -160%);
  opacity: 0;
  visibility: hidden;
  z-index: 60;
  background: var(--card2);
  color: var(--label);
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-weight: 600;
  font-size: 13.5px;
  transition: transform .35s cubic-bezier(.32,.72,0,1), opacity .25s ease, visibility .25s ease;
  max-width: 90%;
  border: 1px solid var(--sep);
  pointer-events: none;
}

.toast.on {
  transform: translate(50%, 0);
  opacity: 1;
  visibility: visible;
}

/* Hide number input spinners / arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Empty State */
.empty {
  text-align: center;
  padding: 40px 22px;
  color: var(--label2);
}

.empty .ei {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: var(--blue-t);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 36px;
}

.empty b {
  color: var(--label);
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.copy {
  direction: ltr;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
  background: var(--card);
  padding: 12px 14px;
  border-radius: 14px;
  margin: 10px 0 14px;
  color: var(--label2);
}

/* Non-Telegram Gate Overlay */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  direction: rtl;
}

.gate-card {
  max-width: 380px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 28px;
  padding: 36px 24px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-icon-pulse {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0088cc, #00a8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 136, 204, 0.4);
}

.gate-card h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--label);
  margin-bottom: 12px;
}

.gate-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--label2);
  margin-bottom: 28px;
}

.gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0088cc, #00a8e8);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 136, 204, 0.35);
  transition: transform .15s ease;
}

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

/* Admin Dashboard Additions */
.adm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.adm-box {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.adm-box .av-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.adm-box .av-lbl {
  font-size: 12px;
  color: var(--label2);
  margin-top: 2px;
}

.adm-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sep);
}

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

.adm-btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}

/* Custom GB Card in Shop */
.custom-gb-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid var(--sep);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cgb-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cgb-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), #5856D6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  flex: none;
}
.cgb-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--label);
}
.cgb-desc {
  font-size: 12px;
  color: var(--label2);
  margin-top: 2px;
}
.cgb-counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 6px 0;
}
.cgb-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--sep);
  background: var(--card2);
  color: var(--blue);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.cgb-btn:active {
  transform: scale(0.92);
  background: var(--sep);
}
.cgb-display {
  min-width: 140px;
  text-align: center;
}
.cgb-display span#cgb-val {
  font-size: 34px;
  font-weight: 800;
  font-family: inherit;
  color: var(--label);
}
.cgb-display .cgb-unit {
  font-size: 13px;
  color: var(--label2);
  margin-right: 4px;
}
.cgb-slider {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
  height: 6px;
}
.cgb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--sep);
}
.cgb-price-label {
  font-size: 12px;
  color: var(--label2);
}
.cgb-price {
  font-size: 17px;
  color: var(--blue);
  font-weight: 800;
  margin-top: 2px;
}
.cgb-price small, .cgb-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--label3);
}

/* ==========================================================================
   Connection Links & Sheet Rows (Matching https://my.alivps.net)
   ========================================================================== */
.sv.logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  background: #000;
  color: #fff;
}
.sv.logo svg {
  width: 28px;
  height: 28px;
}

.bar.big {
  height: 12px;
}
.bar.unl {
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, #14B8A6, #22C55E);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #04130f;
  font-weight: 700;
  font-size: 13px;
}

.lw {
  display: flex;
  align-items: center;
  position: relative;
}
.lw + .lw::before {
  content: '';
  position: absolute;
  top: 0;
  right: 14px;
  left: 0;
  height: 1px;
  background: var(--sep);
}
.lnk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  flex: 1;
  min-width: 0;
  width: auto;
}
.lnk:active {
  background: var(--fill);
}
.lnk .lt {
  flex: 1;
  min-width: 0;
  direction: ltr;
  text-align: left;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: var(--label2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lnk .lc {
  color: var(--blue);
  font-size: 20px;
  flex: none;
  display: flex;
  align-items: center;
}
.lnk .lc svg {
  width: 20px;
  height: 20px;
}
.lsh {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 12px 14px;
  cursor: pointer;
  flex: none;
  font-size: 20px;
  display: flex;
  align-items: center;
}
.lsh:active {
  background: var(--fill);
}
.lsh svg {
  width: 20px;
  height: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.stats > div {
  padding: 14px 10px;
}
.stats > div + div {
  border-right: 1px solid var(--sep);
}
.stats .k {
  font-size: 12px;
  color: var(--label2);
  margin-bottom: 4px;
}
.stats .v {
  font-size: 18px;
  font-weight: 700;
}

.card.pad {
  padding: 16px;
}

.card .kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
}
.card .kv + .kv {
  border-top: 1px solid var(--sep);
}
.card .kv span {
  color: var(--label2);
  font-size: 14.5px;
}
.card .kv b {
  font-weight: 700;
  font-size: 15.5px;
  color: var(--label);
}
