/* =========================================================
   LUNA — Design Tokens
   ========================================================= */
:root {
  --bg: #0A0B14;
  --bg-elev: #12141F;
  --bg-elev-2: #181B29;
  --surface: rgba(255,255,255,0.045);
  --surface-2: rgba(255,255,255,0.07);
  --surface-border: rgba(255,255,255,0.09);

  --violet: #6C5CE7;
  --violet-dim: #5645B5;
  --violet-deep: #362873;
  --gold: #D9A552;
  --gold-deep: #7A5A2E;
  --teal: #2DD4BF;
  --teal-deep: #0F6B60;
  --danger: #F0435F;
  --danger-deep: #6B1F31;

  --text: #F5F6FA;
  --text-muted: #9296AC;
  --text-faint: #5A5E76;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #060710;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(circle at 20% 0%, rgba(124,92,255,0.16), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(0,229,199,0.10), transparent 45%),
    #060710;
}

button { font-family: inherit; }

::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* =========================================================
   Phone frame (keeps mobile-app feel on desktop, full-bleed on mobile)
   ========================================================= */
/* =========================================================
   Auth screen (Login / Register / Verify / Forgot)
   ========================================================= */
.auth-screen {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}
.auth-card {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 30px 22px 26px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6);
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}
.auth-brand .brand-mark { width: 34px; height: 34px; }
.auth-brand .brand-mark svg { width: 100%; height: 100%; }
.auth-brand .brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.auth-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 0 0 4px; text-align: center; }
.auth-sub { color: var(--text-muted); font-size: 12.5px; text-align: center; margin: 0 0 22px; }
.auth-switch { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-top: 14px; }
.auth-switch a { color: var(--violet); font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-download-link {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-border);
  cursor: pointer;
}
.auth-download-link:hover { color: var(--text-muted); }
.auth-error {
  background: rgba(255,77,109,0.12);
  border: 1px solid rgba(255,77,109,0.35);
  color: #ff8fa3;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.auth-dev-code {
  background: rgba(124,92,255,0.12);
  border: 1px dashed rgba(124,92,255,0.4);
  color: var(--text);
  font-size: 12px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

/* =========================================================
   Landing screen (Download App / Use Web) — first thing shown
   ========================================================= */
.landing-screen {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
}
.landing-card {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 40px 26px 30px;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,0.6);
  text-align: center;
}
.landing-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.landing-brand .brand-mark { width: 46px; height: 46px; }
.landing-brand .brand-mark svg { width: 100%; height: 100%; }
.landing-brand .brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.5px;
}
.landing-tag {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 30px;
  line-height: 1.5;
}
.landing-actions { display: flex; flex-direction: column; }
.landing-actions .btn-primary,
.landing-actions .btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-hint {
  color: var(--text-faint);
  font-size: 11.5px;
  margin: 16px 0 0;
  line-height: 1.5;
  min-height: 14px;
}

/* Admin-only entry point, injected into topbars for jsontext12@gmail.com */
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 8px;
}
.back-to-app-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: 100px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.phone-frame {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  position: relative;
}

@media (min-width: 560px) {
  .phone-frame {
    margin: 28px 0;
    min-height: calc(100vh - 56px);
    border-radius: 40px;
    padding: 12px;
    background: linear-gradient(160deg, #1b1d2c, #0c0d16);
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.06);
  }
}

.app-shell {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
}

@media (min-width: 560px) {
  .app-shell {
    min-height: calc(100vh - 80px);
    border-radius: 30px;
    overflow: hidden;
  }
}

.view {
  display: none;
  padding: 18px 18px 110px;
  animation: fadeIn .28s ease;
}
.view.active { display: block; }

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

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 18px;
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 34px; height: 34px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #fff, #C9BEFF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.page-sub { font-size: 12.5px; color: var(--text-muted); }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.icon-btn svg { width: 19px; height: 19px; }
.dot-badge {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
}

/* =========================================================
   Scrolling Banner
   ========================================================= */
.banner-carousel { margin-bottom: 20px; }
.banner-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
}
.banner-slide {
  scroll-snap-align: start;
  flex: 0 0 100%;
  min-height: 116px;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.banner-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 120%, rgba(255,255,255,0.25), transparent 55%);
}
.banner-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: rgba(255,255,255,0.85);
}
.banner-slide h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
}
.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.banner-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--surface-2);
  transition: all .25s ease;
}
.banner-dots span.active {
  width: 18px;
  background: var(--violet);
}

/* =========================================================
   Premium Wallet Card
   ========================================================= */
.wallet-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  background:
    linear-gradient(135deg, #2A1F63 0%, #1A1140 55%, #100B29 100%);
  border: 1px solid rgba(245,185,66,0.18);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: 0 18px 40px -18px rgba(124,92,255,0.55);
}
.wallet-card::before {
  content: '';
  position: absolute;
  inset: -40% -10%;
  background: radial-gradient(circle, rgba(124,92,255,0.35), transparent 60%);
  pointer-events: none;
}
.wallet-shine {
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.14), transparent);
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine {
  0% { left: -60%; }
  45%, 100% { left: 130%; }
}
.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
.wallet-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.6);
}
.tier-badge {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 4px 10px;
  border-radius: 20px;
  color: #241703;
  background: linear-gradient(120deg, #FFE29A, var(--gold));
  border: none;
  cursor: pointer;
}
.tier-badge-lg { font-size: 11px; padding: 5px 13px; }
.wallet-balance {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.wallet-balance .currency { font-size: 16px; color: rgba(255,255,255,0.55); }
.wallet-bottom {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
}

/* =========================================================
   Section headings
   ========================================================= */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 2px 12px;
}
.section-head h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
}
.link-btn {
  background: none;
  border: none;
  color: var(--violet);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   Quick Actions
   ========================================================= */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}
.qa-item {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.qa-icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.qa-icon svg { width: 20px; height: 20px; }
.qa-icon-violet { background: rgba(124,92,255,0.16); color: var(--violet); }
.qa-icon-teal { background: rgba(0,229,199,0.14); color: var(--teal); }
.qa-icon-gold { background: rgba(245,185,66,0.16); color: var(--gold); }

/* =========================================================
   Activity list
   ========================================================= */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.activity-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ac1), var(--ac2));
  font-size: 15px;
}
.activity-info { flex: 1; min-width: 0; }
.activity-info strong { display: block; font-size: 13.5px; font-weight: 600; }
.activity-info span { font-size: 11.5px; color: var(--text-muted); }
.activity-amount { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.status-pill {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  text-align: right;
  color: var(--teal);
}
.status-pill.pending { color: var(--gold); }

/* =========================================================
   Quick Tabs (Store)
   ========================================================= */
.quick-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 22px;
}
.qtab {
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.qtab.active {
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border-color: transparent;
}

/* =========================================================
   Category grid
   ========================================================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}
.cat-card.active { border-color: var(--violet); background: rgba(124,92,255,0.1); }
.cat-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cc1), var(--cc2));
  color: #fff;
}
.cat-icon svg { width: 19px; height: 19px; }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* =========================================================
   Product grid & cards
   ========================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.product-tile {
  height: 66px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  position: relative;
}
.product-tile svg { width: 28px; height: 28px; }
.product-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.discount-tag {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  color: var(--gold);
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  font-family: var(--font-mono);
}
.product-name { font-size: 13px; font-weight: 700; margin-top: 2px; }
.product-sub { font-size: 11px; color: var(--text-muted); }
.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.price-block { display: flex; flex-direction: column; }
.price-now {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--teal);
}
.price-old {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  text-decoration: line-through;
}
.buy-btn {
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   Profile card (Account)
   ========================================================= */
.profile-card {
  background: linear-gradient(160deg, #191B2C, #12131F);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 12px;
  align-items: center;
}
.profile-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  grid-row: span 2;
}
.profile-info h3 { margin: 0 0 3px; font-size: 15.5px; font-weight: 700; font-family: var(--font-display); }
.profile-info span { font-size: 12px; color: var(--text-muted); }
.profile-wallet-mini {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}
.profile-wallet-mini span { font-size: 11.5px; color: var(--text-muted); }
.profile-wallet-mini strong { font-family: var(--font-mono); font-size: 14px; color: var(--gold); }

/* =========================================================
   Menu list (Account)
   ========================================================= */
.menu-group {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.menu-item:last-child { border-bottom: none; }
.menu-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(124,92,255,0.14);
  color: var(--violet);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.menu-icon svg { width: 16.5px; height: 16.5px; }
.danger-icon { background: rgba(255,77,109,0.14); color: var(--danger); }
.menu-label { flex: 1; font-size: 13.5px; font-weight: 600; }
.menu-item.danger .menu-label { color: var(--danger); }
.chev { width: 16px; height: 16px; color: var(--text-faint); }

.app-version {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
  padding-bottom: 6px;
}

/* =========================================================
   Bottom Navigation
   ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  background: rgba(10,11,20,0.85);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--surface-border);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
@media (min-width: 560px) {
  .bottom-nav { position: absolute; border-radius: 0 0 30px 30px; }
}
.bn-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: color .2s ease;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--violet); }
.bn-indicator {
  position: absolute;
  top: 6px;
  left: 10px;
  width: calc(25% - 5px);
  height: 3px;
  border-radius: 3px;
  background: var(--violet);
  box-shadow: 0 0 10px var(--violet);
  transition: transform .3s cubic-bezier(.65,0,.35,1);
}

/* =========================================================
   Modal / bottom sheet
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,4,10,0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 100;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-overlay.center-overlay { align-items: center; }

.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 86vh;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  overflow-y: auto;
  padding-bottom: 26px;
}
.modal-overlay.open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--surface-2);
  border-radius: 3px;
  margin: 12px auto 4px;
}
.sheet-content { padding: 10px 22px 4px; }
.sheet-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 6px 0 4px;
}
.sheet-content p.desc { color: var(--text-muted); font-size: 13px; margin: 0 0 18px; line-height: 1.55; }

.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.field label { font-size: 12px; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field input, .field select, .field textarea {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--violet); }
.field input.readonly-field { color: var(--text-muted); background: rgba(255,255,255,0.02); cursor: not-allowed; }

/* "?" info popup — e.g. Transaction Code help, shown in Nepali with an
   example screenshot, so first-time users can find the right code. */
.info-btn {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.info-btn:hover { border-color: var(--violet); color: var(--violet); }
.info-popover {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  z-index: 30;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.info-popover.open { display: block; }
.info-popover h4 { margin: 0 0 8px; font-size: 13px; font-family: var(--font-display); font-weight: 700; padding-right: 20px; }
.info-popover p { margin: 0 0 8px; font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.info-popover-example-label { font-weight: 600; color: var(--text) !important; }
.info-popover-img { width: 100%; border-radius: 8px; display: block; margin-top: 4px; border: 1px solid var(--surface-border); }
.info-popover-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.btn-danger {
  width: 100%;
  background: linear-gradient(120deg, var(--danger), #B8283F);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.btn-ghost {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.search-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-body);
  outline: none;
}
.search-row input:focus { border-color: var(--violet); }
.search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(124,92,255,0.7);
}
.search-btn svg { width: 15px; height: 15px; }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}
.amount-opt {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
.amount-opt.active { border-color: var(--teal); color: var(--teal); background: rgba(0,229,199,0.08); }

.qr-box {
  width: 100%;
  max-width: 220px;
  margin: 4px auto 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  padding: 10px;
  background: #fff;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.admin-pay-number {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
}
.admin-pay-number strong { color: var(--text); font-family: var(--font-mono); letter-spacing: 0.5px; }
.upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface);
}
.upload-box.uploaded { border-color: var(--teal); color: var(--teal); border-style: solid; }

.pay-methods { display: flex; gap: 10px; margin-bottom: 6px; }
.pay-opt {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.pay-opt.active { border-color: var(--violet); color: var(--violet); background: rgba(124,92,255,0.08); }

.order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-border);
}
.order-row:last-child { border-bottom: none; }
.order-row .order-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  background: linear-gradient(135deg, var(--ac1), var(--ac2));
}
.order-row .order-info { flex: 1; }
.order-row .order-info strong { display: block; font-size: 13px; }
.order-row .order-info span { font-size: 11px; color: var(--text-muted); }
.order-row .order-amt { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; text-align: right; }

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--surface-border);
}
.leader-row:last-child { border-bottom: none; }
.leader-rank {
  width: 26px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.leader-rank.top1 { color: var(--gold); }
.leader-rank.top2 { color: #D8D8E4; }
.leader-rank.top3 { color: #C98A4B; }
.leader-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.leader-info { flex: 1; }
.leader-info strong { display: block; font-size: 13px; }
.leader-info span { font-size: 11px; color: var(--text-muted); }
.leader-amt { font-family: var(--font-mono); font-size: 12.5px; color: var(--gold); font-weight: 700; }

.policy-block { margin-bottom: 16px; }
.policy-block h4 { font-size: 13.5px; margin: 0 0 6px; font-family: var(--font-display); }
.policy-block p { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin: 0; }

.confirm-note {
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 12px;
  color: #FFB3C0;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* =========================================================
   Success popup
   ========================================================= */
.success-popup {
  width: 88%;
  max-width: 340px;
  background: var(--bg-elev);
  border: 1px solid var(--surface-border);
  border-radius: 24px;
  padding: 32px 26px 26px;
  text-align: center;
  transform: scale(.9);
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.center-overlay.open .success-popup { transform: scale(1); opacity: 1; }
.success-ring { width: 76px; height: 76px; margin: 0 auto 18px; }
.success-ring svg { width: 100%; height: 100%; }
.success-circle {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
  transition: stroke-dashoffset .6s ease .1s;
}
.success-check {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset .4s ease .5s;
}
.center-overlay.open .success-circle { stroke-dashoffset: 0; }
.center-overlay.open .success-check { stroke-dashoffset: 0; }
.success-popup h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 8px; }
.success-popup p { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; margin: 0 0 14px; }
.success-popup p span { color: var(--teal); font-family: var(--font-mono); font-weight: 600; }
.success-amount {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 18px;
}
.success-actions { display: flex; gap: 10px; }
.success-actions button { flex: 1; margin-top: 0; }

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1E2033;
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 200;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   Esports — Tournament cards
   ========================================================= */
.tournament-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tournament-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.tournament-banner {
  height: 74px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--tc1), var(--tc2));
  position: relative;
}
.tournament-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 120%, rgba(255,255,255,0.22), transparent 55%);
}
.tournament-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: rgba(255,255,255,0.85);
  position: relative;
  z-index: 1;
}
.tournament-map {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: #fff;
  position: relative;
  z-index: 1;
}
.tournament-body { padding: 14px 16px 16px; }
.tournament-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 10px;
}
.tournament-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.t-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
.t-stat span { display: block; font-size: 10.5px; color: var(--text-muted); margin-bottom: 3px; }
.t-stat strong { font-family: var(--font-mono); font-size: 13.5px; }
.t-stat.entry strong { color: var(--gold); }
.t-stat.prize strong { color: var(--teal); }
.tournament-datetime {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.tournament-datetime svg { width: 14px; height: 14px; flex-shrink: 0; }
.join-btn {
  width: 100%;
  background: linear-gradient(120deg, var(--violet), var(--violet-dim));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(124,92,255,0.75);
}

/* Taller sheet for the esports detail / join / success flow */
.sheet-tall { max-height: 92vh; }

.detail-hero {
  height: 110px;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--tc1), var(--tc2));
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.detail-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 120%, rgba(255,255,255,0.22), transparent 55%);
}
.detail-hero h3 { margin: 0; color: #fff; font-family: var(--font-display); font-size: 18px; position: relative; z-index: 1; }
.detail-hero span { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.4px; color: rgba(255,255,255,0.85); }

.prize-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.prize-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
}
.prize-rank {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  background: rgba(245,185,66,0.12);
  color: var(--gold);
  flex-shrink: 0;
}
.prize-row:nth-child(1) .prize-rank { background: linear-gradient(120deg,#FFE29A,var(--gold)); color: #241703; }
.prize-row span.prize-label { flex: 1; font-size: 12.5px; color: var(--text-muted); }
.prize-amt { font-family: var(--font-mono); font-weight: 700; font-size: 13.5px; color: var(--gold); }

.rules-list {
  margin: 0 0 16px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rules-list li { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.fee-deduct-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(124,92,255,0.09);
  border: 1px solid rgba(124,92,255,0.3);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 16px;
}
.fee-deduct-note span { font-size: 12.5px; color: var(--text-muted); }
.fee-deduct-note strong { font-family: var(--font-mono); font-size: 16px; color: var(--violet); }

.squad-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

.slots-remaining {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.slots-remaining .big-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--teal);
}
.slots-remaining .sub-num { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.room-box {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 8px;
}
.room-box .room-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-border);
}
.room-box .room-row:last-child { border-bottom: none; }
.room-box .room-row span { font-size: 12px; color: var(--text-muted); }
.room-box .room-row strong { font-family: var(--font-mono); font-size: 14px; letter-spacing: 1px; }
.room-pending {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px;
}

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width: 340px) {
  .quick-actions { gap: 7px; }
  .product-grid { gap: 9px; }
}

/* =========================================================
   Published content (About Luna / Privacy / Terms) styling —
   Phase 5, User Content Manager. Scoped so it only affects the
   admin-authored rich text rendered inside the info sheets.
   ========================================================= */
.sheet-content .policy-block + h3,
.sheet-content > div > h3 { font-size: 14px; margin: 16px 0 6px; }
.sheet-content p:not(.desc) { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin: 0 0 12px; }
.sheet-content ul, .sheet-content ol { margin: 0 0 12px; padding-left: 20px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; }
.sheet-content a { color: var(--teal, #2DD4BF); }

/* =========================================================
   Password show/hide toggle (bug fix — all password fields)
   ========================================================= */
.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { width: 100%; padding-right: 42px !important; }
.toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
}
.toggle-pass:hover { color: var(--text); }

/* Transaction ID real-time duplicate check (Collect Points Security Update) */
.txn-check-msg {
  display: block;
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 14px;
}

/* Search results (Store search sheet) */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.search-result-item:active { border-color: var(--violet); }
.search-result-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pc1), var(--pc2));
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-info strong { display: block; font-size: 13.5px; font-weight: 600; }
.search-result-info span { font-size: 11.5px; color: var(--text-muted); }
.search-result-price { font-family: var(--font-mono); font-size: 13px; font-weight: 600; flex-shrink: 0; }
