/* ═══════════════════════════════════════════════════
   PandaBump — Design System  v5
   Rounded & playful · dual theme (auto light/dark)
   Fredoka display · Nunito body · B/W base + bamboo-green accent
   ═══════════════════════════════════════════════════ */

/* ── Shared tokens ──────────────────────────────── */
:root {
  /* Accent is MONOCHROME and theme-specific: black ink in light, white in dark.
     Defined inside each theme block below. */

  /* Status hues — reserved ONLY for problem states (suspended / banned) */
  --amber-bg: rgba(255,159,10,.15); --amber-bd: rgba(255,159,10,.34);
  --red-bg:   rgba(255,69,58,.15);  --red-bd:   rgba(255,69,58,.34);

  /* Rounded — chunky brand shapes */
  --r-sm:   12px;
  --r-md:   16px;
  --r-lg:   20px;
  --r-xl:   26px;
  --r-pill: 999px;

  --nav-h: 66px;
  --maxw:  600px;

  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body:    'Nunito', -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif;
}

/* ── Dark theme (deep black + bamboo-green accent) ─── */
:root[data-theme="dark"] {
  --bg: #0A0A0A;
  /* Faint bamboo breath top & bottom — brings the black surface to life */
  --canvas:
    radial-gradient(ellipse 74% 42% at 50% -8%, rgba(61,220,132,.13), transparent 60%),
    radial-gradient(ellipse 100% 55% at 50% 122%, rgba(61,220,132,.06), transparent 62%);

  --glass-1:   rgba(22, 23, 25, .66);   /* layered dark card surface */
  --glass-2:   rgba(255, 255, 255, .06);
  --glass-nest:rgba(255, 255, 255, .045);
  --glass-bar: rgba(13, 14, 15, .7);
  --field:     rgba(255, 255, 255, .055);

  --line:   rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .06);
  --hi:     rgba(255, 255, 255, .12);

  /* Accent = bamboo green */
  --accent:      #3DDC84;
  --accent-b:    #3DDC84;
  --accent-grad: linear-gradient(135deg, #4DE89A 0%, #2BBE6E 100%);
  --accent-ink:  #06170C;
  --accent-glow: rgba(61, 220, 132, .42);
  --accent-soft: rgba(61, 220, 132, .14);
  --accent-bd:   rgba(61, 220, 132, .30);
  --accent-tx:   #5BE89C;

  --tx-1: #F4F5F6;
  --tx-2: #9A9DA6;
  --tx-3: #62646E;

  --amber-tx: #FFB23E;  --red-tx: #FF6B61;

  --card-shadow: 0 12px 32px -16px rgba(0,0,0,.78);
  --bar-shadow:  0 16px 44px rgba(0,0,0,.64);
  --logo-bg: linear-gradient(160deg, #FFFFFF, #F0F1F4);
}

/* ── Light theme (crisp white + bamboo-green accent) ─── */
:root[data-theme="light"] {
  --bg: #ECEDEF;
  --canvas:
    radial-gradient(ellipse 80% 46% at 50% -8%, rgba(61,220,132,.13), transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 120%, rgba(15,20,30,.03), transparent 62%);

  --glass-1:   rgba(255, 255, 255, .80);
  --glass-2:   rgba(15, 20, 30, .05);
  --glass-nest:rgba(15, 20, 30, .04);
  --glass-bar: rgba(255, 255, 255, .74);
  --field:     rgba(15, 20, 30, .045);

  --line:   rgba(15, 20, 30, .1);
  --line-2: rgba(15, 20, 30, .065);
  --hi:     rgba(255, 255, 255, .75);

  /* Accent = bamboo green (deepened for contrast on white) */
  --accent:      #14A85F;
  --accent-b:    #14A85F;
  --accent-grad: linear-gradient(135deg, #2BC470 0%, #14A05A 100%);
  --accent-ink:  #FFFFFF;
  --accent-glow: rgba(45, 196, 112, .34);
  --accent-soft: rgba(61, 220, 132, .16);
  --accent-bd:   rgba(20, 168, 95, .30);
  --accent-tx:   #0E8F4F;

  --tx-1: #16181F;
  --tx-2: #5B6270;
  --tx-3: #97A0AE;

  --amber-tx: #A66A00;  --red-tx: #CF2D24;

  --card-shadow: 0 12px 30px -16px rgba(25,35,50,.22);
  --bar-shadow:  0 14px 40px rgba(25,35,50,.18);
  --logo-bg: linear-gradient(160deg, #FFFFFF, #F1F2F6);
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; }
html { -webkit-tap-highlight-color: transparent; }
.ic { width: 18px; height: 18px; flex: none; stroke-width: 2.2; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: var(--canvas);
  background-attachment: fixed;
  color: var(--tx-1);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 100dvh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 40px + env(safe-area-inset-bottom, 0px));
  transition: background-color .3s ease, color .3s ease;
}

::-webkit-scrollbar       { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

h1, h2, h3, .display { font-family: var(--font-display); }

/* ── Header ─────────────────────────────────────── */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  position: sticky; top: 0; z-index: 50;
  background: var(--glass-bar);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 1px 0 var(--hi) inset;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand .wordmark {
  font-family: var(--font-display); font-weight: 600;
  font-size: 19px; letter-spacing: -.2px; line-height: 1; color: var(--tx-1);
}
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--logo-bg);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow), inset 0 1px 0 #fff;
}
.brand .logo svg { width: 31px; height: 31px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent-bd);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 14px; letter-spacing: -.2px;
  color: var(--accent-tx);
  box-shadow: inset 0 1px 0 var(--hi);
}
.chip svg { width: 14px; height: 14px; opacity: .9; }

.dev-banner {
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-bd);
  color: var(--amber-tx); text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  padding: 7px 12px;
}

/* ── Bottom nav ─────────────────────────────────── */
nav#tabs {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%);
  background: var(--glass-bar);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px;
  display: flex; align-items: stretch; gap: 2px;
  z-index: 100;
  max-width: calc(100vw - 20px);
  box-shadow: var(--bar-shadow), inset 0 1px 0 var(--hi);
}
.nav-ink {
  position: absolute; border-radius: var(--r-pill);
  background: var(--accent-grad);
  box-shadow: 0 4px 18px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
  transition:
    left .3s cubic-bezier(.34,1.4,.5,1),
    width .3s cubic-bezier(.34,1.4,.5,1),
    top .22s ease, height .22s ease;
  pointer-events: none; z-index: 0;
}
nav#tabs button {
  position: relative; z-index: 1;
  background: transparent; border: none;
  color: var(--tx-2);
  padding: 9px 12px 8px;
  border-radius: var(--r-pill);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 10.5px; letter-spacing: .1px;
  cursor: pointer; white-space: nowrap;
  transition: color .22s ease, transform .12s ease;
}
nav#tabs button svg { width: 20px; height: 20px; stroke-width: 2.2; }
nav#tabs button.active { color: var(--accent-ink); }
nav#tabs button:active { transform: scale(.9); }

/* ── Main ───────────────────────────────────────── */
main { padding: 16px 14px 0; max-width: var(--maxw); margin: 0 auto; }

/* ── Utilities ──────────────────────────────────── */
.hidden { display: none !important; }
.muted  { color: var(--tx-2); font-size: 13px; }
.mt-2   { margin-top: 10px; }
.w-full { width: 100%; }
.row    { display: flex; gap: 8px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grid2  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Card ───────────────────────────────────────── */
.card {
  background: var(--glass-1);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px;
  margin-bottom: 13px;
  position: relative;
  box-shadow: inset 0 1px 0 var(--hi), var(--card-shadow);
  animation: popUp .5s cubic-bezier(.34,1.32,.5,1) both;
}
.card-head { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; gap: 11px; margin-bottom: 16px; }
.card-head .ci {
  width: 40px; height: 40px; flex: none; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--accent-bd);
  color: var(--accent-tx);
  box-shadow: inset 0 1px 0 var(--hi);
}
.card-head .ci svg { width: 20px; height: 20px; }
.card-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.card-head .sub { color: var(--tx-2); font-size: 12.5px; margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.card-head .sub svg { width: 12px; height: 12px; flex: none; opacity: .8; }
.card-head .grow { flex: 1; min-width: 0; }

.card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.card > .sub { color: var(--tx-2); font-size: 12.5px; margin-top: 2px; }

.section-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 18px 0 9px;
}
.section-label svg { width: 13px; height: 13px; }

/* ── Stat tiles ─────────────────────────────────── */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  background: var(--glass-nest);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: inset 0 1px 0 var(--hi);
}
.tile .tl {
  font-size: 10.5px; font-weight: 800; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .7px;
  display: flex; align-items: center; gap: 5px; margin-bottom: 8px;
}
.tile .tl svg { width: 12px; height: 12px; }
.tile .tv { font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -.6px; line-height: 1; }
.tile .tv.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tile .tv.green { color: var(--accent-tx); }
.tile.span2 { grid-column: span 2; }

/* ── Inputs ─────────────────────────────────────── */
label {
  display: block;
  font-size: 11px; font-weight: 800; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 12px 0 6px;
}
input, select, textarea {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line-2);
  color: var(--tx-1);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14.5px; font-weight: 600;
  transition: border-color .18s, box-shadow .18s, background .18s;
  outline: none;
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--tx-3); font-weight: 500; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-b);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
textarea { resize: vertical; min-height: 66px; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' viewBox='0 0 11 6'%3E%3Cpath d='M1 1l4.5 4 4.5-4' stroke='%23888' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  padding-right: 32px; cursor: pointer;
}

/* Pill input group */
.pill-group {
  display: flex; align-items: center; gap: 8px;
  background: var(--field);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 5px 5px 5px 16px;
}
.pill-group input {
  background: transparent; border: none; padding: 7px 0;
  border-radius: 0; box-shadow: none !important; flex: 1; min-width: 0;
}

/* ── Buttons (pill, chunky) ─────────────────────── */
button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent-grad);
  color: var(--accent-ink); border: none;
  border-radius: var(--r-pill);
  padding: 13px 20px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -.1px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .14s cubic-bezier(.34,1.5,.5,1), filter .18s, opacity .18s;
}
button.btn svg { width: 17px; height: 17px; stroke-width: 2.4; }
button.btn:active { transform: scale(.94); }
button.btn:hover  { filter: brightness(1.05); }

button.btn.ghost {
  background: var(--glass-2);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  color: var(--tx-1);
  box-shadow: inset 0 1px 0 var(--hi);
}
button.btn.green { /* monochrome — same as primary accent */ }
button.btn.danger {
  background: linear-gradient(135deg, #FF5B52, #E0362C);
  box-shadow: 0 8px 22px -8px rgba(255,69,58,.55), inset 0 1px 0 rgba(255,255,255,.22);
}
button.btn:disabled { opacity: .4; transform: none !important; box-shadow: none !important; cursor: default; }

/* ── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800;
  padding: 4px 11px; border-radius: var(--r-pill);
  text-transform: capitalize; letter-spacing: .2px;
  border: 1px solid transparent;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.free, .badge.active     { background: var(--accent-soft); color: var(--accent-tx); border-color: var(--accent-bd); }
.badge.assigned                { background: var(--accent-soft); color: var(--accent-tx); border-color: var(--accent-bd); }
.badge.suspended, .badge.expired { background: var(--amber-bg); color: var(--amber-tx); border-color: var(--amber-bd); }
.badge.banned                  { background: var(--red-bg); color: var(--red-tx); border-color: var(--red-bd); }

/* ── List rows ──────────────────────────────────── */
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.list-row:last-child { border-bottom: none; }
.list-row:first-of-type { padding-top: 4px; }
.list-row .lr-main { font-weight: 700; font-size: 14px; }
.list-row .lr-sub  { color: var(--tx-3); font-size: 12px; margin-top: 2px; font-weight: 600; }
.list-row .lr-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 13.5px;
  border-bottom: 1px solid var(--line-2);
}
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--tx-2); }
.kv span:last-child  { font-weight: 800; }

/* ── Divider ────────────────────────────────────── */
.divider { height: 1px; background: var(--line-2); margin: 18px -18px; }

/* ── Empty state ────────────────────────────────── */
.empty {
  text-align: center; color: var(--tx-2);
  padding: 30px 16px; font-size: 13.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty svg { width: 34px; height: 34px; color: var(--tx-3); stroke-width: 1.8; animation: bob 3s ease-in-out infinite; }

/* ── Plan cards ─────────────────────────────────── */
.plan { padding-top: 20px; }
.plan.popular {
  border-color: var(--accent-bd);
  box-shadow:
    inset 0 1px 0 var(--hi),
    0 0 0 1px var(--accent-bd),
    0 16px 38px -18px var(--accent-glow);
}
.plan .ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .5px; text-transform: uppercase;
  box-shadow: 0 4px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.3);
}
.plan .discount-ribbon {
  left: auto; right: 20px; transform: none;
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  box-shadow: 0 4px 12px rgba(255, 65, 108, 0.4), inset 0 1px 0 rgba(255,255,255,.3);
  font-size: 12px; font-weight: 800; padding: 5px 14px;
}
.plan .ptop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan .pname { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.plan .pmeta { color: var(--tx-2); font-size: 12.5px; margin-top: 3px; font-weight: 600; }
.plan .price { text-align: right; line-height: 1; }
.plan .price-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 2px; }
.plan .old-price { font-size: 15px; font-weight: 600; color: var(--tx-3); position: relative; }
.plan .old-price::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #ff4b2b; transform: translateY(-50%);
}
.plan .price .amt { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -1px; color: #fff; }
.plan .price .per { color: var(--tx-3); font-size: 11.5px; margin-top: 4px; font-weight: 600; }
.plan ul.features { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan ul.features li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--tx-1); }
.plan ul.features li svg {
  width: 18px; height: 18px; flex: none; padding: 2.5px;
  border-radius: 50%; color: var(--accent-tx); background: var(--accent-soft);
}

/* ── Toast ──────────────────────────────────────── */
.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  background: var(--glass-bar);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--line);
  color: var(--tx-1);
  padding: 12px 18px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 700;
  z-index: 200; max-width: calc(100vw - 28px);
  box-shadow: var(--bar-shadow), inset 0 1px 0 var(--hi);
  animation: toastIn .26s cubic-bezier(.34,1.4,.5,1) both;
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--tx-2); }
.toast.ok::before  { background: var(--accent-tx); box-shadow: 0 0 10px var(--accent-tx); }
.toast.err::before { background: var(--red-tx);   box-shadow: 0 0 10px var(--red-tx); }

/* ── Events log ─────────────────────────────────── */
.event { padding: 11px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.event:last-child { border-bottom: none; }
.event .e-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.event .t { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-tx); }
.event .ts { color: var(--tx-3); font-size: 11px; font-weight: 600; }
.event .e-msg { color: var(--tx-2); }

/* ── Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--glass-nest) 25%, var(--line-2) 50%, var(--glass-nest) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skel-line { height: 14px; margin-bottom: 11px; }
.skel-line.w60 { width: 60%; } .skel-line.w40 { width: 40%; }

/* ── Animations ─────────────────────────────────── */
@keyframes popUp {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.96); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes tabFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.tab-fade { animation: tabFade .24s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Sub banner (accounts tab) ───────────────────── */
.sub-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent-bd);
  border-radius: var(--r-lg);
  padding: 13px 15px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 13px;
  animation: popUp .5s cubic-bezier(.34,1.32,.5,1) both;
}
.sub-banner .sb-icon {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-bd);
  display: grid; place-items: center; color: var(--accent-tx);
}
.sub-banner .sb-icon svg { width: 18px; height: 18px; }
.sub-banner .sb-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent-tx); }
.sub-banner .sb-sub   { font-size: 12px; color: var(--tx-2); margin-top: 2px; }

/* ── Setup notice ────────────────────────────────── */
.setup-notice {
  display: flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--accent-bd);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: var(--accent-tx);
  margin-bottom: 16px;
}
.setup-notice svg { width: 16px; height: 16px; flex: none; }

.next-action {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--glass-nest);
  padding: 13px 14px;
  margin: 10px 0 14px;
  box-shadow: inset 0 1px 0 var(--hi);
}
.next-action.ok {
  border-color: var(--accent-bd);
  background: var(--accent-soft);
}
.next-action.warn {
  border-color: var(--amber-bd);
  background: var(--amber-bg);
}
.na-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--accent-tx);
  background: var(--glass-2);
  border: 1px solid var(--line-2);
}
.next-action.warn .na-icon { color: var(--amber-tx); border-color: var(--amber-bd); }
.na-icon svg { width: 18px; height: 18px; }
.na-copy { min-width: 0; }
.na-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--tx-3);
}
.na-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.15;
  margin-top: 2px;
}
.na-body {
  color: var(--tx-2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.38;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 4px 0 16px;
}
.setup-step {
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--glass-nest);
  padding: 10px 8px;
}
.setup-step.done {
  border-color: var(--accent-bd);
  background: var(--accent-soft);
}
.setup-step.current {
  border-color: var(--amber-bd);
  background: var(--amber-bg);
}
.setup-step.optional { opacity: .78; }
.ss-dot {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  color: var(--tx-2);
  background: var(--glass-2);
  border: 1px solid var(--line-2);
}
.setup-step.done .ss-dot { color: var(--accent-tx); border-color: var(--accent-bd); }
.setup-step.current .ss-dot { color: var(--amber-tx); border-color: var(--amber-bd); }
.ss-dot svg { width: 15px; height: 15px; }
.ss-num {
  color: var(--tx-3);
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.ss-title {
  color: var(--tx-1);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2px;
}

.ready-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--glass-nest);
  padding: 12px 13px;
  margin: 8px 0 14px;
}
.ready-panel.ok {
  border-color: var(--accent-bd);
  background: var(--accent-soft);
}
.ready-panel.warn {
  border-color: var(--amber-bd);
  background: var(--amber-bg);
}
.rp-main { min-width: 0; }
.rp-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
}
.rp-title svg { width: 16px; height: 16px; flex: none; }
.rp-body {
  color: var(--tx-2);
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 2px;
}
.rp-status {
  flex: none;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  padding: 5px 9px;
  color: var(--tx-2);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ready-panel { align-items: flex-start; flex-direction: column; }
}

/* ── Topic picker ─────────────────────────────────── */
.topic-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.topic-chip {
  padding: 5px 13px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: var(--glass-nest); border: 1px solid var(--line-2);
  color: var(--tx-2); transition: background .12s, border-color .12s, color .12s;
}
.topic-chip:hover  { border-color: var(--accent-bd); color: var(--tx-1); }
.topic-chip.active { background: var(--accent-soft); border-color: var(--accent-bd); color: var(--accent-tx); font-weight: 600; }
/* Inline remove (×) on admin market topic chips */
.tp-x {
  margin-left: 6px; border: none; background: transparent; cursor: pointer;
  color: var(--red-tx, #e5484d); font-size: 15px; line-height: 1; padding: 0 2px;
}
.tp-x:hover { color: #ff6b6b; }
.market-block { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.market-block:last-of-type { border-bottom: none; }
.tp-more  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tp-see-more {
  font-size: 12px; color: var(--accent-tx); background: none;
  border: none; cursor: pointer; padding: 4px 2px; text-decoration: underline;
  width: 100%; text-align: left; margin-top: 2px;
}
.topic-preview { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; margin: 6px 0 4px; }
.tp-sel-tag {
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-tx);
  border: 1px solid var(--accent-bd);
}
.tp-hint     { font-size: 12px; color: var(--tx-3); align-self: center; }
.topic-picker-empty { font-size: 13px; color: var(--tx-3); padding: 10px 0; }
.link-btn {
  background: none; border: none; color: var(--accent-tx);
  text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0;
}

/* ── In-app login (OTP) ──────────────────────────── */
.hint { font-weight: 400; opacity: .55; font-size: .85em; }

/* ── Ad link → autofill row ──────────────────────── */
.link-row { display: flex; gap: 8px; align-items: stretch; }
.link-row input { flex: 1; min-width: 0; }
.link-row .btn { width: auto; flex: 0 0 auto; padding: 0 16px; margin: 0; }
.otp-step .link-btn { display: block; width: 100%; text-align: center; }
details.adv > summary {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  list-style: none; color: var(--muted, #8a8f98); font-size: .9em; padding: 4px 0;
}
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary svg { width: 13px; height: 13px; }
details.adv[open] > summary { margin-bottom: 6px; }

/* ── Group master rows (tap to edit) ────────────── */
.group-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 4px; text-align: left; cursor: pointer;
  background: none; border: none;
  border-bottom: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: background .12s;
}
.group-row:last-child { border-bottom: none; }
.group-row:active { background: var(--hi); }
.gr-icon {
  width: 38px; height: 38px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-bd); color: var(--accent-tx);
}
.gr-icon svg { width: 18px; height: 18px; }
.gr-info { flex: 1; min-width: 0; }
.gr-name {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gr-name .badge { padding: 2px 8px; font-size: 9.5px; }
.gr-meta {
  color: var(--tx-3); font-size: 12px; font-weight: 600; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gr-chevron { width: 18px; height: 18px; flex: none; color: var(--tx-3); }

/* ── Slide-in detail sheet ──────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  overscroll-behavior: contain;
  visibility: hidden;
}
.sheet.open { transform: none; visibility: visible; }
.sheet-head {
  display: flex; align-items: center; gap: 6px;
  padding: calc(13px + env(safe-area-inset-top, 0px)) 14px 13px;
  border-bottom: 1px solid var(--line-2);
  background: var(--glass-bar);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.sheet-back {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: none; border: none; cursor: pointer;
  color: var(--tx-1); border-radius: 50%;
  transition: background .12s;
}
.sheet-back:active { background: var(--hi); transform: scale(.9); }
.sheet-back svg { width: 22px; height: 22px; }
.sheet-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  letter-spacing: -.2px; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-body {
  flex: 1; overflow-y: auto;
  padding: 16px 18px calc(40px + env(safe-area-inset-bottom, 0px));
}
.sheet-body .divider { margin: 18px -18px; }
body.sheet-open { overflow: hidden; }

/* ── Topic edit rows (in detail sheet) ──────────── */
.topic-edit {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--line-2);
}
.topic-edit:last-child { border-bottom: none; }
.te-id { font-size: 11px; font-weight: 800; color: var(--tx-3); flex: none; min-width: 40px; }
.te-title { flex: 1; min-width: 0; padding: 9px 12px; font-size: 13.5px; }
.topic-empty { color: var(--tx-3); font-size: 13px; padding: 12px 0; font-weight: 600; }

/* ── Stat pills (account health) ────────────────── */
.stat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.stat-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass-nest); border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 11.5px; font-weight: 700; color: var(--tx-2);
}
.stat-pill .sp-val { color: var(--tx-1); font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.stat-pill.ok  .sp-val { color: var(--accent-tx); }
.stat-pill.err .sp-val { color: var(--red-tx); }
.stat-pill.warn .sp-val { color: var(--amber-tx); }

/* ── Sparkline / bar chart ───────────────────────── */
.spark-wrap { padding: 6px 0 0; overflow-x: auto; }
.spark-wrap svg { display: block; }
.spark-empty { color: var(--tx-3); font-size: 12px; padding: 10px 0; }
.issues { display: grid; gap: 8px; margin-top: 10px; }
.issue-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tx-2);
  font-size: 12.5px;
  font-weight: 700;
}
.issue-row svg { width: 15px; height: 15px; color: var(--amber-tx); }
.spark-label {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--tx-3); font-weight: 700;
  margin-top: 5px; letter-spacing: .1px;
}

/* ── Chart legend ────────────────────────────────── */
.chart-legend {
  display: flex; gap: 16px; margin-bottom: 12px;
}
.chart-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--tx-2);
}
.chart-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ── Admin users table ───────────────────────────── */
.user-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.user-row:last-child { border-bottom: none; }
.user-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-bd);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  color: var(--accent-tx);
}
.user-info { flex: 1; min-width: 0; overflow: hidden; }
.user-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta { color: var(--tx-3); font-size: 11.5px; margin-top: 1px; }
.user-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

/* ── Pool account row (admin) ────────────────────── */
.pool-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line-2);
}
.pool-row:last-child { border-bottom: none; }
.pool-info { flex: 1; min-width: 0; overflow: hidden; }
.pool-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool-meta { color: var(--tx-3); font-size: 11.5px; margin-top: 1px; }
.pool-next {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-tx);
  font-size: 11.5px;
  font-weight: 800;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pool-next svg { width: 12px; height: 12px; flex: none; }
.pool-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* ── Running indicator dot ───────────────────────── */
.running-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent-tx);
  box-shadow: 0 0 7px var(--accent-tx);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
.running-dot.off { background: var(--tx-3); box-shadow: none; animation: none; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Icon button (small, square) ────────────────── */
button.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); cursor: pointer;
  color: var(--tx-2);
  transition: background .18s, color .18s, transform .12s ease;
  flex-shrink: 0;
}
button.icon-btn:active { transform: scale(.86); }
button.icon-btn:hover  { background: var(--hi); color: var(--tx-1); }
button.icon-btn svg { width: 13px; height: 13px; stroke-width: 2.4; }
button.icon-btn.danger:hover  { background: var(--red-bg);    color: var(--red-tx);    border-color: var(--red-bd); }
button.icon-btn.success:hover { background: var(--accent-soft); color: var(--accent-tx); border-color: var(--accent-bd); }

/* ── Event filter row ────────────────────────────── */
.ev-filter-row { display: flex; gap: 6px; margin-bottom: 12px; }
.ev-filter-btn {
  background: var(--glass-nest); border: 1px solid var(--line-2);
  color: var(--tx-2); border-radius: var(--r-pill);
  padding: 5px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.ev-filter-btn.active {
  background: var(--accent-soft); border-color: var(--accent-bd); color: var(--accent-tx);
}

/* ══════════════════════════════════════════════════════
   HOME / WALLET  — redesigned dashboard v7
   ══════════════════════════════════════════════════════ */

/* ── Hero balance card ───────────────────────────────── */
.hero-card {
  background: var(--glass-1);
  border: 1px solid var(--accent-bd);
  border-radius: var(--r-xl);
  padding: 22px 20px 20px;
  margin-bottom: 10px;
  position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 var(--hi), var(--card-shadow), 0 0 44px -16px var(--accent-glow);
  animation: popUp .5s cubic-bezier(.34,1.32,.5,1) both;
}
.hero-card::before {
  content: ''; position: absolute; top: -35%; right: -8%;
  width: 58%; aspect-ratio: 1;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-greeting {
  font-size: 12.5px; font-weight: 700; color: var(--tx-2);
  margin-bottom: 14px;
}
.hero-bal-lbl {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .7px; color: var(--tx-3); margin-bottom: 4px;
}
.hero-bal-amt {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 700; letter-spacing: -2px; line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.hero-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--accent-tx);
}
.hero-status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent-tx); box-shadow: 0 0 8px var(--accent-tx);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

/* ── KPI strip ───────────────────────────────────────── */
.kpi-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 9px; margin-bottom: 10px;
}
.kpi {
  background: var(--glass-1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 10px 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 var(--hi), var(--card-shadow);
  animation: popUp .5s cubic-bezier(.34,1.32,.5,1) both;
}
.kpi-val {
  font-family: var(--font-display); font-size: 23px;
  font-weight: 700; letter-spacing: -.8px; line-height: 1;
  color: var(--tx-1);
}
.kpi-val.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.kpi-val.green { color: var(--accent-tx); }
.kpi-val.warn  { color: var(--amber-tx); }
.kpi-label {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--tx-3); margin-top: 5px;
}

/* ── Area chart ──────────────────────────────────────── */
.area-chart-wrap { padding-top: 4px; }
.area-chart-wrap svg { display: block; overflow: visible; }
.area-chart-labels {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--tx-3); font-weight: 700;
  margin-top: 6px;
}

/* ── Subscription progress card ──────────────────────── */
.sub-progress-card { border-color: var(--accent-bd) !important; }
.spc-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px;
}
.spc-name {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: -.2px; display: flex; align-items: center; gap: 7px;
  color: var(--tx-1);
}
.spc-name svg { width: 15px; height: 15px; color: var(--accent-tx); flex: none; }
.spc-meta { color: var(--tx-2); font-size: 12px; margin-top: 3px; font-weight: 600; }
.spc-right { text-align: right; flex-shrink: 0; }
.spc-days {
  font-family: var(--font-display); font-size: 34px; font-weight: 700;
  letter-spacing: -1.5px; line-height: 1;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.spc-days-lbl {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--tx-3); margin-top: 2px;
}
.spc-progress-track {
  height: 6px; background: var(--glass-2); border-radius: var(--r-pill);
  overflow: hidden; margin-bottom: 12px;
}
.spc-progress-fill {
  height: 100%; border-radius: var(--r-pill);
  background: var(--accent-grad);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width .9s cubic-bezier(.16,1,.3,1);
}
.spc-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--tx-3); font-weight: 600;
}

/* ── Quick amount buttons ─────────────────────────────── */
.quick-amounts { display: flex; gap: 7px; flex-wrap: wrap; margin: 12px 0 10px; }
.qa-btn {
  flex: 1; min-width: 52px;
  background: var(--glass-nest); border: 1px solid var(--line-2);
  color: var(--tx-1); border-radius: var(--r-md);
  padding: 10px 6px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .1s;
}
.qa-btn:active { transform: scale(.90); }
.qa-btn.selected {
  background: var(--accent-soft); border-color: var(--accent-bd); color: var(--accent-tx);
}

/* ── Referral program ─────────────────────────────────── */
.referral-entry {
  display: flex; align-items: center; gap: 14px; width: 100%;
  margin-top: 14px; padding: 16px 18px;
  background: var(--glass-1); border: 1px solid var(--accent-bd);
  border-radius: var(--r-lg); cursor: pointer; text-align: left;
  color: var(--tx-1); box-shadow: var(--card-shadow);
  transition: transform .12s, border-color .18s, box-shadow .18s;
}
.referral-entry:active { transform: scale(.985); }
.referral-entry:hover  { border-color: var(--accent); }
.referral-entry .re-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-tx);
}
.referral-entry .re-icon .ic { width: 22px; height: 22px; }
.referral-entry .re-text { flex: 1; min-width: 0; }
.referral-entry .re-title {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.referral-entry .re-sub { color: var(--tx-2); font-size: 13px; font-weight: 600; margin-top: 2px; }
.referral-entry .re-chevron { width: 20px; height: 20px; color: var(--tx-3); flex: none; }

.referral-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--tx-2); font-family: var(--font-body);
  font-weight: 700; font-size: 14px; padding: 4px 0; margin-bottom: 6px;
}
.referral-back:active { transform: scale(.96); }
.referral-back .ic { width: 18px; height: 18px; }

.referral-hero .hero-greeting { display: flex; align-items: center; gap: 8px; }
.referral-hero .hero-greeting .ic { width: 18px; height: 18px; }

.referral-progress { margin-top: 14px; }
.referral-progress .rp-track {
  height: 8px; background: var(--glass-2); border-radius: var(--r-pill);
  overflow: hidden; margin-bottom: 8px;
}
.referral-progress .rp-fill {
  height: 100%; border-radius: var(--r-pill);
  background: var(--accent-grad); box-shadow: 0 0 10px var(--accent-glow);
  transition: width .9s cubic-bezier(.16,1,.3,1);
}
.referral-progress .rp-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; color: var(--tx-3);
}

.list-row .lr-amt {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.list-row .lr-amt.green { color: var(--accent-tx); }

/* ── Referral: "how it works" steps ───────────────────── */
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: flex-start; gap: 14px; position: relative; }
/* Connector line linking the step circles */
.step:not(:last-child)::before {
  content: ''; position: absolute;
  left: 18px; top: 38px; bottom: -4px; width: 2px;
  background: linear-gradient(var(--accent-bd), transparent);
}
.step-num {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-bd);
  color: var(--accent-tx); z-index: 1;
}
.step-num .ic { width: 18px; height: 18px; }
.step-body { flex: 1; min-width: 0; padding: 4px 0 14px; }
.step-title {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.step-tag {
  font-size: 11px; font-weight: 800; padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-tx);
  border: 1px solid var(--accent-bd);
}
.step-sub { color: var(--tx-2); font-size: 13px; font-weight: 600; margin-top: 3px; line-height: 1.4; }

/* ══════════════════════════════════════════════════════
   REDESIGN v8 — modular: admin sub-tabs, cleaner account card
   ══════════════════════════════════════════════════════ */

/* ── Small button modifier (sweep / start-all / inline actions) ── */
button.btn.sm {
  padding: 8px 14px; font-size: 13px;
  box-shadow: inset 0 1px 0 var(--hi);
}

/* ── Segmented sub-tab control (admin) ──────────────── */
.segmented {
  position: sticky; top: 58px; z-index: 40;
  display: flex; gap: 3px;
  background: var(--glass-bar);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 1px 0 var(--hi), var(--card-shadow);
  animation: popUp .45s cubic-bezier(.34,1.32,.5,1) both;
}
.segmented::-webkit-scrollbar { display: none; }
.seg-btn {
  flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
  background: transparent; border: none; cursor: pointer;
  color: var(--tx-2);
  border-radius: var(--r-pill);
  padding: 9px 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: -.1px;
  transition: background .2s, color .2s, transform .1s;
}
.seg-btn .ic { width: 15px; height: 15px; }
.seg-btn:active { transform: scale(.94); }
.seg-btn.active {
  background: var(--accent-grad); color: var(--accent-ink);
  box-shadow: 0 4px 14px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.3);
}
@media (max-width: 380px) {
  .seg-btn span { display: none; }   /* icon-only on very narrow screens */
  .seg-btn { flex: 1; padding: 10px; }
}

#admin-body { animation: tabFade .24s ease; }

/* ── Account card: collapsible sections (Advanced / Profile) ── */
details.acc-section {
  margin-top: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--glass-nest);
  padding: 0 13px;
  overflow: hidden;
}
details.acc-section > summary {
  display: flex; align-items: center; gap: 8px;
  list-style: none; cursor: pointer;
  padding: 12px 0;
  font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--tx-2);
}
details.acc-section > summary::-webkit-details-marker { display: none; }
details.acc-section > summary svg { width: 14px; height: 14px; flex: none; color: var(--tx-3); }
details.acc-section > summary .hint { margin-left: auto; text-transform: none; letter-spacing: 0; }
/* Chevron affordance */
details.acc-section > summary::after {
  content: ''; width: 8px; height: 8px; margin-left: 6px; flex: none;
  border-right: 2px solid var(--tx-3); border-bottom: 2px solid var(--tx-3);
  transform: rotate(45deg); transition: transform .2s;
}
details.acc-section[open] > summary::after { transform: rotate(225deg); }
details.acc-section[open] { padding-bottom: 14px; }
details.acc-section > summary .hint::after { content: none; }

/* ── Search pill (admin client list) ────────────────── */
.pill-group .ic { width: 16px; height: 16px; color: var(--tx-3); flex: none; }


/* ── In-app crypto payment (top-up) ─────────────────── */
.cur-select {
  flex: none; min-width: 92px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--glass-nest);
  color: var(--tx-1);
  font: inherit; font-weight: 700;
  padding: 0 10px;
}
.pay-sheet { display: flex; flex-direction: column; gap: 12px; }
.pay-amount { text-align: center; }
.pay-amount-val { font-size: 30px; font-weight: 800; letter-spacing: .3px; }
.pay-amount-val span { font-size: 18px; color: var(--tx-2); }
.pay-amount-sub { color: var(--tx-3); font-size: 13px; margin-top: 2px; }
.pay-qr {
  width: 200px; height: 200px; align-self: center;
  border-radius: var(--r-md); background: #fff; padding: 8px; object-fit: contain;
}
.pay-qr-none {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: var(--glass-nest); color: var(--tx-3); text-align: center;
  border: 1px dashed var(--line-2); width: auto; height: auto; padding: 22px;
}
.pay-qr-none svg { width: 28px; height: 28px; }
.pay-lbl { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--tx-2); }
.pay-copy {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--glass-nest); padding: 8px 10px;
}
.pay-copy code {
  flex: 1; min-width: 0; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--tx-1);
}
.pay-copy-btn { flex: none; padding: 6px 10px; }
.pay-copy-btn svg { width: 16px; height: 16px; }
.pay-status {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  color: var(--tx-2); font-weight: 700; font-size: 14px; margin-top: 4px;
}
.pay-spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: pay-spin .8s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-expiry { text-align: center; color: var(--tx-3); font-size: 12.5px; }
.pay-hint { color: var(--tx-3); font-size: 12px; line-height: 1.5; text-align: center; }

/* ── Boot overlay (skeleton / auth / error before first paint) ── */
.boot {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 16px 24px;
}
.boot.hidden { display: none; }

/* Skeleton placeholders mirroring the Home tab layout */
.boot-skel { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; }
.boot .sk {
  background: linear-gradient(90deg, var(--glass-1) 25%, var(--line-2) 50%, var(--glass-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 18px;
}
.boot .sk-hero { height: 150px; }
.boot .sk-row  { display: flex; gap: 10px; }
.boot .sk-kpi  { flex: 1; height: 76px; border-radius: 14px; }
.boot .sk-card { height: 132px; }

/* Friendly message state (auth / load error) */
.boot-msg {
  max-width: 360px; margin: 8vh auto 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.boot-msg-icon { width: 64px; height: 64px; color: var(--accent); opacity: .9; }
.boot-msg-icon svg { width: 100%; height: 100%; }
.boot-msg-title { font-family: "Fredoka", sans-serif; font-size: 20px; font-weight: 600; color: var(--tx-1); }
.boot-msg-body { color: var(--tx-3); font-size: 14px; line-height: 1.55; }
.boot-msg .btn { margin-top: 6px; }

/* ── Deposit (crypto wallet) ── */
.net-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.net-opt {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 12px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--glass-1); border: 1px solid var(--line-2); color: var(--tx-1);
  transition: border-color .15s, transform .05s;
}
.net-opt:active { transform: scale(.98); }
.net-opt:hover { border-color: var(--accent-bd); }
.net-coin { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 15px; }
.net-chain { font-size: 11.5px; color: var(--tx-3); }

.dep-sheet { display: flex; flex-direction: column; gap: 10px; }
.dep-intro { font-size: 13.5px; line-height: 1.5; color: var(--tx-3); margin-bottom: 4px; }
.dep-back { align-self: flex-start; gap: 6px; padding: 7px 12px; font-size: 13px; }
.dep-back svg { width: 16px; height: 16px; }
.dep-loading { display: flex; align-items: center; gap: 10px; color: var(--tx-3); padding: 20px 0; justify-content: center; }
.dep-head { text-align: center; margin-bottom: 2px; }
.dep-chain { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 17px; color: var(--tx-1); }
.dep-coins { font-size: 13px; color: var(--tx-3); margin-top: 2px; }
