/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #05070f;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  overflow-x: hidden;
}
button { background: none; border: none; color: inherit; cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ===== Phone frame ===== */
.phone {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(40,70,200,0.25), transparent 60%),
    linear-gradient(180deg, #060a1a 0%, #05070f 100%);
  position: relative;
  padding: 14px 14px 100px;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 14px;
}
.brand {
  height: 30px;
  object-fit: contain;
}
.top-right { display: flex; align-items: center; gap: 12px; }
.bell {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #cfe1ff;
}
.bell svg { width: 22px; height: 22px; }
.bell .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: #ff3b6e;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 59, 110, 0.7);
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(120,180,255,0.5);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== BALANCE CARD ===== */
.balance {
  position: relative;
  padding: 18px 20px;
  border-radius: 18px;
  background:
    radial-gradient(120% 100% at 100% 50%, rgba(120, 60, 200, 0.35), transparent 60%),
    linear-gradient(135deg, rgba(40, 80, 200, 0.45), rgba(20, 30, 80, 0.6));
  border: 1px solid rgba(120, 160, 255, 0.25);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.4);
}
.balance-inner { position: relative; z-index: 2; }
.balance-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: #c8d2ee;
}
.balance-head .eye { color: #c8d2ee; padding: 2px; }
.balance-head .eye svg { width: 16px; height: 16px; }
.balance-amount {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.balance-amount .cur { font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
.balance-point {
  margin-top: 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: #cdd6f0;
}
.p-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #ffb44a, #ff7a2a);
  color: #fff;
  font-size: 11px; font-weight: 700;
}
.p-num { font-weight: 600; }
.balance-h {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* ===== Card ===== */
.card {
  margin-top: 14px;
  padding: 18px 14px 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(20,28,60,0.65), rgba(12,16,36,0.75));
  border: 1px solid rgba(120,140,255,0.16);
}

/* ===== Quick actions ===== */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; color: #d4dbf0;
  text-align: center;
}
.action img {
  width: 50px; height: 50px;
  object-fit: contain;
}
.dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 14px;
}
.dots .dot {
  width: 16px; height: 4px; border-radius: 2px;
  background: rgba(150,170,220,0.25);
  transition: background 0.2s;
}
.dots .dot.active { background: #4a8bff; }

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 16px;
  column-gap: 4px;
}
.service {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11.5px; color: #d4dbf0;
  text-align: center;
  line-height: 1.3;
}
.service img {
  width: 52px; height: 52px;
  object-fit: contain;
}

/* ===== Promo banner ===== */
.promo {
  position: relative;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(120,140,255,0.2);
}
.promo-bg {
  width: 100%;
  height: auto;
  display: block;
}
.promo-btn {
  position: absolute;
  left: 18px;
  bottom: 28px;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(8, 14, 40, 0.55);
  border: 1px solid rgba(120,160,255,0.55);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 600;
  color: #d8e8ff;
}
.promo-dots {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  margin: 0;
}

/* ===== Transactions ===== */
.tx-card { padding: 16px 16px 8px; }
.tx-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
  margin-bottom: 12px;
}
.see-all { color: #4a8bff; font-size: 12px; }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(120,140,255,0.08);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(120,140,255,0.1);
}
.tx-info { flex: 1; }
.tx-title { font-size: 13.5px; font-weight: 500; }
.tx-time { font-size: 11px; color: #8993b8; margin-top: 2px; }
.tx-amount { font-size: 13.5px; font-weight: 600; }
.tx-amount.minus { color: #ff5a8a; }
.tx-amount.plus  { color: #2bd391; }

.bottom-spacer { height: 30px; }

/* ===== TAB BAR ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 8px 14px;
  background: linear-gradient(180deg, rgba(8,10,22,0.7) 0%, rgba(8,10,22,0.98) 50%);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(120,140,255,0.12);
  z-index: 50;
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10.5px; color: #6a7390;
  padding-top: 6px;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: #4a8bff; }
.tab.active svg { filter: drop-shadow(0 0 6px rgba(80,140,255,0.6)); }

/* QR floating button */
.tab-qr { position: relative; }
.qr-fab {
  width: 56px; height: 56px;
  margin-top: -28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a8bff 0%, #8b5cff 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow:
    0 6px 20px rgba(74, 139, 255, 0.55),
    0 0 0 4px rgba(8, 10, 22, 1);
  border: 1px solid rgba(255,255,255,0.15);
}
.qr-fab svg { width: 28px; height: 28px; filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
.tab-qr > span:last-child { margin-top: 4px; color: #b8c4e0; }
