/* =========================================================================
   AURAA GLOBAL — Member area (app-style), loaded after theme.css + store.css.
   Restyles the shared member shell (sidebar, top bar, tab bar) and the
   classes every member page uses, then adds the dashboard components.
   ========================================================================= */

body.member-app { background: var(--bg); }
body.member-app .min-w-0 { min-width: 0; }

/* ---------- Shell ---------- */
.member-app .app-shell { display: flex; min-height: 100vh; }
.member-app .app-main { flex: 1; min-width: 0; }
.member-app .app-content { padding: 1.5rem 2rem 2.5rem; max-width: 1240px; margin: 0 auto; }
.member-app .app-content.page-genealogy { max-width: 96%; }

/* Sidebar */
.member-app .app-sidebar {
  width: 272px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 1.25rem 1rem 1.5rem;
  background: #fff; border-right: 1px solid var(--panel-border);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  scrollbar-width: thin;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 .4rem .9rem; }
.side-logo img { height: 46px; width: auto; display: block; }
.side-user {
  display: flex; align-items: center; gap: .75rem; padding: .85rem; margin-bottom: .5rem; border-radius: 18px; color: #fff;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(240, 212, 138, .35), transparent 50%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700));
}
.side-user .av { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; background: rgba(255, 255, 255, .14); color: var(--gold-300); }
.side-user .nm { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .id { font-size: .76rem; color: rgba(255, 255, 255, .65); }

.member-app .nav-side { display: flex; flex-direction: column; gap: 2px; }
.member-app .nav-side a {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 12px; border: 0;
  color: var(--text-soft); font-weight: 600; font-size: .88rem;
}
.member-app .nav-side a i { width: 18px; text-align: center; color: var(--text-muted); font-size: .9rem; }
.member-app .nav-side a:hover { background: #f4f5f8; color: var(--ink); }
.member-app .nav-side a.active { background: var(--navy-800); color: #fff; border: 0; box-shadow: 0 8px 18px rgba(19, 34, 71, .2); }
.member-app .nav-side a.active i { color: var(--gold-300); }
.member-app .nav-side .nav-section-label {
  display: flex; align-items: center; gap: .45rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted);
  margin: 1.1rem .8rem .35rem;
}
.member-app .nav-side .nav-section-label i { color: var(--gold); font-size: .72rem; }
.member-app .nav-side a.nav-logout { color: var(--danger); }
.member-app .nav-side a.nav-logout i { color: var(--danger); }

/* Top bar */
.member-app .app-topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 68px; padding: 0 2rem;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--panel-border);
}
.topbar-title .t { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .s { font-size: .78rem; color: var(--text-muted); }
.top-logo img { height: 36px; width: auto; display: block; }
.top-dot {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* ID switcher: full-screen modal, one card per ID with its wallet balances */
.id-switch-modal .modal-content { background: #f3f4f8; border: 0; border-radius: 0; }
.id-switch-bar {
  position: sticky; top: 0; z-index: 2; padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--panel-border);
}
.id-switch-bar-in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.id-switch-bar h2 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.id-switch-bar small { font-size: .76rem; color: var(--text-muted); }
.id-switch-close {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--panel-border); background: #fff;
  color: var(--ink); font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, background .15s ease;
}
.id-switch-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.id-switch-sort { display: inline-flex; padding: 3px; border-radius: 99px; background: #eef0f5; border: 1px solid var(--panel-border); }
.id-switch-sort button {
  display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .75rem; border: 0; border-radius: 99px;
  background: transparent; color: var(--text-muted); font-size: .76rem; font-weight: 700; white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.id-switch-sort button i { font-size: .7rem; }
.id-switch-sort button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(13, 23, 48, .12); }
@media (max-width: 400px) {
  .id-switch-bar small { display: none; }
  .id-switch-bar h2 { white-space: nowrap; }
  .id-switch-sort button { padding: 0 .6rem; }
}
@media (max-width: 360px) {
  .id-switch-sort button i { display: none; }
}
.id-switch-close:hover { background: #fdeceb; color: #c0392b; }
.id-switch-close:active { transform: scale(.92); }
.id-switch-body { padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
.id-switch-wrap { max-width: 560px; margin: 0 auto; }
.id-switch-list { display: flex; flex-direction: column; gap: .75rem; }

.ids-card {
  width: 100%; display: block; padding: .9rem 1rem; text-align: left; color: var(--ink);
  background: #fff; border: 1px solid var(--panel-border); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(13, 23, 48, .04); transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
button.ids-card:hover { border-color: var(--royal); box-shadow: 0 6px 18px rgba(44, 91, 224, .12); }
button.ids-card:active { transform: scale(.99); }
.ids-card.is-current { border-color: var(--leaf); box-shadow: inset 0 0 0 1px var(--leaf); }
.ids-card.is-unpaid { border-left: 4px solid #c0392b; padding-left: calc(1rem - 3px); }
.ids-card.is-off { opacity: .55; }

.ids-card-top { display: flex; align-items: flex-start; gap: .5rem; }
.ids-card-who { flex: 1; min-width: 0; display: block; }
.ids-card-who b { display: block; font-size: .95rem; font-weight: 800; letter-spacing: -.01em; }
.ids-card-who small { display: block; font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ids-card-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.ids-card-tags:empty { display: none; }
.ids-tag { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .45rem; border-radius: 99px; font-size: .62rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.ids-tag i { font-size: .58rem; }
.ids-tag.current { background: var(--leaf-soft); color: var(--leaf); }
.ids-tag.unpaid { background: #fbe3e0; color: #b03a2e; }
.ids-tag.pro { background: #fbf1d6; color: #8a6511; }
.ids-tag.off { background: #eef0f4; color: var(--text-muted); }
.ids-card-go {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: #f1f3f8; color: var(--text-muted); font-size: .72rem;
}
button.ids-card:hover .ids-card-go { background: var(--royal); color: #fff; }

.ids-card-wallets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .7rem; }
.ids-card-wallets > span { display: block; min-width: 0; padding: .4rem .5rem; border-radius: 8px; background: #f6f7fa; }
.ids-card-wallets em { display: block; font-style: normal; font-size: .6rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.ids-card-wallets b { display: block; font-size: .78rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ids-card-wallets .zero b { color: #b4bac6; font-weight: 600; }
.ids-card-pro {
  display: flex; align-items: center; justify-content: space-between; margin-top: .4rem; padding: .35rem .55rem; border-radius: 8px;
  background: linear-gradient(90deg, #fbf1d6, #fdf8ea); color: #8a6511; font-size: .7rem; font-weight: 600;
}
.ids-card-pro i { font-size: .62rem; margin-right: .3rem; }
.ids-card-pro b { font-weight: 800; }

@media (max-width: 430px) {
  .ids-card-wallets { grid-template-columns: repeat(2, 1fr); }
}
.id-switch-foot { display: block; margin-top: 1rem; padding: .85rem; border-radius: 14px; background: #fff; border: 1px solid var(--panel-border); text-align: center; font-size: .8rem; font-weight: 700; color: var(--royal); }

/* Flash alerts */
.m-alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 16px; font-size: .9rem; margin-bottom: 1rem; }
.m-alert i { margin-top: .15rem; }
.m-alert.ok { background: var(--leaf-soft); color: #1f5a39; }
.m-alert.bad { background: #fdecea; color: #9d2b23; }

/* Bottom tab bar (phones/tablets) */
.m-tabbar { display: none; }
.member-app .mobile-tabbar { display: none !important; }

@media (max-width: 991.98px) {
  .member-app .app-sidebar {
    position: fixed; left: 0; top: 0; z-index: 1060; width: min(86vw, 320px);
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    border-radius: 0 28px 28px 0; border-right: 0;
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  }
  .member-app .app-sidebar.open { transform: translateX(0); background: #fff; box-shadow: 20px 0 60px rgba(13, 23, 48, .25); }
  .member-app .sidebar-backdrop { background: rgba(11, 18, 34, .35); }

  .member-app .app-topbar { height: 60px; padding: 0 1rem; padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
  .topbar-title .t { font-size: 1rem; max-width: 50vw; }
  .member-app .app-content { padding: 1rem 1rem 1.5rem; }
  .member-app .app-main { padding-bottom: calc(var(--tabbar-h) + 22px + var(--safe-b)); }

  .m-tabbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
  .m-tabbar-inner {
    pointer-events: auto; height: var(--tabbar-h); max-width: 520px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    background: rgba(255, 255, 255, .85); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid rgba(255, 255, 255, .7); border-radius: 24px;
    box-shadow: 0 12px 40px rgba(13, 23, 48, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
  }
  .mtab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; padding: 0; border: 0; background: none; color: var(--text-muted); font-size: .66rem; font-weight: 600; }
  .mtab i { font-size: 1.1rem; }
  .mtab.active { color: var(--navy-800); }
  .mtab:active i { transform: scale(.9); }
  .mtab-fab span {
    width: 52px; height: 52px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    background: linear-gradient(135deg, var(--navy-800), var(--royal)); color: var(--gold-300);
    box-shadow: 0 12px 26px rgba(44, 91, 224, .4); border: 3px solid #fff;
  }
}

/* ---------- Shared member classes (theme.css re-skin) ---------- */
.member-app h4, .member-app h5, .member-app h6 { font-weight: 800; letter-spacing: -.02em; }
.member-app .glass-card { border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; }
.member-app .glass-card.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.member-app .stat-tile .stat-label { color: var(--text-muted); font-weight: 600; }
.member-app .stat-tile .stat-value { color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.member-app .stat-tile .stat-icon { background: var(--royal-soft); color: var(--royal); border-radius: 13px; }
.member-app .table-glass th { color: var(--text-muted); font-weight: 700; font-size: .72rem; letter-spacing: .06em; border-bottom: 1px solid var(--panel-border-strong); }
.member-app .table-glass td { border-bottom: 1px solid var(--panel-border); }
.member-app .table-glass tr:hover td { background: #fafbfc; }
.member-app .nav-tabs { border-bottom: 1px solid var(--panel-border); gap: .25rem; }
.member-app .nav-tabs .nav-link { color: var(--text-muted); border-bottom: 2px solid transparent; }
.member-app .nav-tabs .nav-link.active, .member-app .nav-tabs .nav-link:hover { color: var(--ink); border-color: var(--navy-800); }
.member-app .progress-gold { background: #eef0f4; }
.member-app .progress-gold .bar { background: linear-gradient(90deg, var(--gold-400), var(--gold-500)); }
.member-app .badge-gold, .member-app .badge-warn, .member-app .badge-danger, .member-app .badge-muted, .member-app .badge-success { border-radius: 999px; font-weight: 700; }
.member-app .badge-success { background: var(--leaf-soft); color: var(--leaf); border: 0; }
.member-app .modal-content { border-radius: 24px; border: 0; }
.member-app .text-gold { color: var(--gold) !important; }

@media (max-width: 767.98px) {
  .member-app .member-area .table-stack tr { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); }
}

/* =========================================================================
   Dashboard
   ========================================================================= */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.4rem; border-radius: var(--radius-lg); color: #fff; margin-bottom: 1rem;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(44, 91, 224, .55), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(201, 154, 46, .35), transparent 60%),
    linear-gradient(150deg, var(--ink), var(--navy-800));
}
.dash-avatar { width: 54px; height: 54px; border-radius: 17px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); color: var(--gold-300); }
.dash-hello { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.dash-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .8rem; color: rgba(255, 255, 255, .7); margin-top: .2rem; }
.dash-meta i { margin-right: .35rem; color: var(--gold-300); }
.dash-status { padding: .15rem .55rem; border-radius: 99px; font-weight: 700; font-size: .7rem; }
.dash-status.ok { background: rgba(76, 175, 110, .22); color: #9be3b3; }
.dash-status.warn { background: rgba(240, 212, 138, .2); color: var(--gold-300); }
.dash-hero-wallet { text-align: right; }
.dash-hero-wallet .lbl { font-size: .76rem; color: rgba(255, 255, 255, .6); }
.dash-hero-wallet .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }

/* Segmented tabs */
.seg-wrap { position: sticky; top: 68px; z-index: 1010; padding: .5rem 0 .9rem; margin: 0 -2rem; padding-left: 2rem; padding-right: 2rem; background: linear-gradient(var(--bg) 70%, rgba(245, 244, 240, 0)); }
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 18px; max-width: 520px;
  background: #fff; border: 1px solid var(--panel-border); box-shadow: var(--shadow-sm);
}
.seg-btn { position: relative; z-index: 1; height: 46px; border: 0; background: none; border-radius: 14px; font-weight: 700; font-size: .9rem; color: var(--text-soft); display: flex; align-items: center; justify-content: center; gap: .5rem; transition: color .2s ease; }
.seg-btn.active { color: #fff; }
.seg-btn.active i { color: var(--gold-300); }
.seg-pill { position: absolute; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px); border-radius: 14px; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); box-shadow: 0 8px 20px rgba(19, 34, 71, .25); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.seg.is-right .seg-pill { transform: translateX(100%); }

.tab-pane-x { display: none; }
.tab-pane-x.active { display: block; animation: paneIn .35s ease; }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* KPI tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; border-radius: 20px; background: #fff; border: 1px solid var(--panel-border); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; min-width: 0; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.kpi .ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: .9rem; margin-bottom: .5rem; }
.kpi .num { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .num.sm { font-size: 1.05rem; line-height: 1.6; }
.kpi .lbl { font-size: .76rem; color: var(--text-muted); font-weight: 600; }
.ic.royal { background: var(--royal-soft); color: var(--royal); }
.ic.gold { background: var(--gold-50); color: var(--gold); }
.ic.leaf { background: var(--leaf-soft); color: var(--leaf); }
.ic.red { background: #fdecea; color: var(--danger); }

/* Quick actions */
.quick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin-bottom: 1rem; padding: .9rem .6rem; border-radius: 22px; background: #fff; border: 1px solid var(--panel-border); }
.quick { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .74rem; font-weight: 600; color: var(--text-soft); padding: .25rem 0; }
.quick:hover { color: var(--ink); }
.quick .ic { position: relative; width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; background: #f2f4f8; color: var(--navy-800); transition: transform .15s ease, background .15s ease; }
.quick:hover .ic { background: var(--navy-800); color: var(--gold-300); transform: translateY(-2px); }
.quick .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .6rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

/* Cards */
.m-card { display: block; padding: 1.25rem; border-radius: 22px; background: #fff; border: 1px solid var(--panel-border); color: var(--ink); }
a.m-card:hover { color: var(--ink); box-shadow: var(--shadow); }
.m-card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.m-card-head h2 { font-size: 1rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.m-link { font-size: .8rem; font-weight: 700; color: var(--navy-700); white-space: nowrap; }
.m-link i { font-size: .65rem; margin-left: .2rem; }
.m-row { display: flex; align-items: center; gap: .85rem; }
.m-row .ic { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #f2f4f8; color: var(--navy-800); }
.pill { display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 99px; font-size: .72rem; font-weight: 700; background: #f1f2f5; color: var(--text-soft); white-space: nowrap; }
.pill.ok { background: var(--leaf-soft); color: var(--leaf); }
.pill.warn { background: #fdf2e0; color: var(--warn); }
.pill.bad { background: #fdecea; color: var(--danger); }

.m-empty { text-align: center; padding: 1.5rem .5rem; }
.m-empty .ic { width: 58px; height: 58px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--royal-soft); color: var(--royal); margin-bottom: .75rem; }
.m-empty p { color: var(--text-muted); font-size: .86rem; margin: .3rem 0 1rem; }
.m-empty.sm { padding: 1rem .5rem; }
.m-empty.sm .ic { width: 46px; height: 46px; font-size: 1rem; margin-bottom: .4rem; }
.m-empty.sm p { margin-bottom: 0; }

/* Order tracking */
.track { padding: 1rem; border-radius: 18px; border: 1px solid var(--panel-border); }
.track + .track { margin-top: .75rem; }
.track-top { display: flex; align-items: center; gap: .85rem; }
.track-img { width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f3f4f7; color: var(--text-muted); }
.track-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 4px; }
.track-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-sub { font-size: .76rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-amt { font-weight: 800; font-size: .95rem; }
.track-state { font-size: .72rem; font-weight: 700; margin-top: 2px; color: var(--royal); white-space: nowrap; }
.track-state.s-pending { color: var(--warn); }
.track-state.s-delivered { color: var(--leaf); }
.track-state.s-cancelled, .track-state.s-refunded { color: var(--danger); }

.steps { --p: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 1.1rem 0 0; }
.steps::before, .steps::after { content: ""; position: absolute; top: 7px; left: 12.5%; height: 3px; border-radius: 3px; }
.steps::before { right: 12.5%; background: #e7e9ef; }
.steps::after { width: calc(75% * var(--p) / 3); background: linear-gradient(90deg, var(--leaf), #4c9a6b); transition: width .6s ease; }
.steps li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.steps li span { width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid #e1e4ea; }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--leaf); border-color: var(--leaf); }
.steps li.now span { box-shadow: 0 0 0 5px rgba(47, 122, 79, .18); }

.addr { display: flex; gap: .75rem; font-size: .88rem; color: var(--text-soft); line-height: 1.55; }
.addr > i { color: var(--royal); margin-top: .25rem; }

/* Referral: wallet card */
.wallet-card {
  position: relative; overflow: hidden; padding: 1.4rem; border-radius: 26px; color: #fff; margin-bottom: 1rem;
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(240, 212, 138, .45), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(44, 91, 224, .5), transparent 60%),
    linear-gradient(140deg, var(--ink), var(--navy-800));
  box-shadow: 0 20px 44px rgba(13, 23, 48, .25);
}
.wallet-card::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; border: 30px solid rgba(255, 255, 255, .05); }
.wallet-card .lbl { font-size: .8rem; color: rgba(255, 255, 255, .65); font-weight: 600; }
.wallet-card .val { font-size: clamp(1.9rem, 5vw, 2.5rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.wallet-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 99px; font-size: .72rem; font-weight: 700; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.wallet-split { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.1rem; }
.wallet-split > div { padding: .7rem .8rem; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); min-width: 0; }
.wallet-split span { display: block; font-size: .7rem; color: rgba(255, 255, 255, .6); font-weight: 600; }
.wallet-split b { display: block; font-size: .98rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-card .btn { position: relative; z-index: 1; height: 48px; display: inline-flex; align-items: center; justify-content: center; }

.ref-card { margin-bottom: 1rem; }
.ref-link { display: flex; gap: .5rem; padding: 5px; border-radius: 16px; background: #f4f5f8; border: 1px dashed var(--panel-border-strong); }
.ref-link input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 .6rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.ref-link input:focus { outline: 0; }
.ref-link .btn { height: 42px; padding: 0 1.1rem; display: inline-flex; align-items: center; }
.ref-card .btn-outline-gold { height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.share-wa:hover { border-color: #25d366 !important; color: #128c4b !important; }

.tx-list { list-style: none; padding: 0; margin: 0; }
.tx-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--panel-border); }
.tx-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.tx-list li:first-child { padding-top: 0; }
.tx-ic { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.tx-ic.in { background: var(--leaf-soft); color: var(--leaf); }
.tx-ic.out { background: #fdecea; color: var(--danger); }
.tx-title { display: block; font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { display: block; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amt { display: block; font-weight: 800; font-size: .88rem; white-space: nowrap; }
.tx-amt.in { color: var(--leaf); }
.tx-amt.out { color: var(--danger); }

.mini-wallets { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.mini-wallets > div, .mini-wallets > a { display: flex; flex-direction: column; gap: .15rem; padding: .85rem; border-radius: 16px; background: #f6f7f9; min-width: 0; color: var(--ink); transition: background .15s ease, transform .15s ease; }
.mini-wallets > a:hover { background: var(--gold-50); color: var(--ink); transform: translateY(-2px); }
.mini-wallets small { font-size: .7rem; line-height: 1.35; color: var(--text-muted); margin-top: .15rem; }
.mini-wallets i { color: var(--gold); margin-bottom: .3rem; }
.mini-wallets span { font-size: .72rem; color: var(--text-muted); font-weight: 600; }
.mini-wallets b { font-size: .95rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 991.98px) {
  .seg-wrap { top: calc(60px + env(safe-area-inset-top, 0px)); margin: 0 -1rem; padding: .35rem 1rem .75rem; }
  .seg { max-width: none; }
}
@media (max-width: 767.98px) {
  .dash-hero { padding: 1rem 1.1rem; border-radius: 24px; }
  .dash-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: .95rem; }
  .dash-hello { font-size: 1.12rem; }
  .seg-btn { height: 44px; font-size: .84rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .kpi { padding: .85rem; border-radius: 18px; }
  .kpi .ic { width: 34px; height: 34px; border-radius: 11px; margin-bottom: .35rem; }
  .kpi .num { font-size: 1.3rem; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); row-gap: 1rem; }
  .m-card { padding: 1rem; border-radius: 20px; }
  .track { padding: .85rem; }
  .steps li { font-size: .64rem; }
  .wallet-card { padding: 1.15rem; border-radius: 24px; }
  .wallet-split > div { padding: .6rem; border-radius: 13px; }
  .wallet-split b { font-size: .85rem; }
  .mini-wallets { gap: .45rem; }
  .mini-wallets > div, .mini-wallets > a { padding: .7rem; }
  .mini-wallets small { font-size: .64rem; }
  .mini-wallets b { font-size: .82rem; }
}

/* Courier / tracking strip on order cards */
.ship-strip { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; padding: .7rem .8rem; border-radius: 14px; background: var(--royal-soft); }
.ship-strip .ic { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--royal); }
.ship-strip .btn { height: 36px; display: inline-flex; align-items: center; white-space: nowrap; }
.ship-no { font-size: .78rem; color: var(--text-soft); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-no i { font-size: .7rem; margin-left: .2rem; color: var(--text-muted); }
.ship-no.copied::after { content: "Copied"; margin-left: .4rem; color: var(--leaf); font-weight: 700; }

/* =========================================================================
   Admin console — shares the member shell above, plus a few extras.
   ========================================================================= */
.admin-app .app-content { max-width: 1480px; }
.admin-app .app-content.page-genealogy, .admin-app .app-content.page-products { max-width: 96%; }
.side-badge { align-items: center; padding: .25rem .6rem; border-radius: 99px; font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold-50); color: var(--gold); border: 1px solid rgba(201, 154, 46, .25); }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.kpi.is-hot { border-color: rgba(201, 154, 46, .45); background: linear-gradient(180deg, #fff, var(--gold-50)); }
.kpi.is-hot .num { color: var(--ink); }
.kpi-grid.two { grid-template-columns: repeat(2, 1fr); }
.tx-ic.plan { background: var(--gold-50); color: var(--gold); }
.admin-app .tx-list .badge-gold, .admin-app .tx-list .badge-warn, .admin-app .tx-list .badge-danger, .admin-app .tx-list .badge-muted { display: inline-block; padding: .15rem .5rem; margin-top: 3px; }
.admin-app .m-card .table-glass td, .admin-app .m-card .table-glass th { padding-left: .6rem; padding-right: .6rem; }
.admin-app .glass-card.p-4 { border-radius: 22px; }
.admin-app h4.mb-4, .admin-app h4.mb-0 { font-weight: 800; letter-spacing: -.025em; }
@media (max-width: 767.98px) {
  .kpi-grid.two { gap: .6rem; }
}
.admin-app .m-card .table-glass td { font-size: .84rem; white-space: nowrap; }
@media (max-width: 575.98px) {
  /* Never cut money values off with an ellipsis on narrow phones. */
  .wallet-split b { white-space: normal; overflow: visible; text-overflow: clip; font-size: .8rem; overflow-wrap: anywhere; }
  .kpi .num.sm { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
}

/* ---------- Admin tables → cards on phones ---------- */
@media (max-width: 767.98px) {
  .admin-app .table-responsive-wrap { overflow: visible; }
  .admin-app .table-stack thead { display: none; }
  .admin-app .table-stack, .admin-app .table-stack tbody,
  .admin-app .table-stack tr, .admin-app .table-stack td { display: block; width: 100%; }
  .admin-app .table-stack tr[hidden] { display: none; }
  .admin-app .table-stack tr {
    position: relative; background: #fff; border: 1px solid var(--panel-border); border-radius: 18px;
    padding: .2rem 1rem .35rem; margin-bottom: .7rem; box-shadow: var(--shadow-sm);
  }
  .admin-app .table-stack tr:last-child { margin-bottom: 0; }
  .admin-app .table-stack tr:hover td { background: transparent; }
  .admin-app .table-stack td {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    padding: .55rem 0; text-align: right; border-bottom: 1px dashed var(--panel-border);
    overflow-wrap: anywhere; font-size: .86rem; white-space: normal !important;
  }
  .admin-app .table-stack td:last-child { border-bottom: 0; }
  .admin-app .table-stack td::before {
    content: attr(data-label); flex-shrink: 0; max-width: 45%; text-align: left;
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  }
  /* First labelled cell = card title (order no., member ID, name…) */
  .admin-app .table-stack td.cell-title {
    font-size: .95rem; font-weight: 800; padding: .75rem 0 .65rem; border-bottom: 1px solid var(--panel-border);
  }
  /* Cells without a heading (action buttons, unread dots) sit at the bottom-right. */
  .admin-app .table-stack td:not([data-label]) { justify-content: flex-end; flex-wrap: wrap; }
  .admin-app .table-stack td:not([data-label])::before { content: none; }
  .admin-app .table-stack td:not([data-label]):empty { display: none; }
  .admin-app .table-stack td .btn { flex-shrink: 0; }
  .admin-app .table-stack td form { margin: 0; display: inline-flex; }
  .admin-app .table-stack td .input-group { max-width: none !important; flex: 1; min-width: 0; }
  .admin-app .table-stack td[colspan] { display: block; text-align: center; border-bottom: 0; }
  .admin-app .table-stack tr:has(td[colspan]) { border-style: dashed; background: transparent; box-shadow: none; }
  /* Products: thumbnail + name cell */
  .admin-app .table-stack .prod-name { min-width: 0; justify-content: flex-end; text-align: right; }
  .admin-app .prod-table td, .admin-app .prod-table th { white-space: normal; }
  .admin-app .table-stack .prod-actions { justify-content: flex-end; flex-wrap: wrap; }

  /* Toolbars above tables */
  .admin-toolbar { width: 100%; }
  .admin-toolbar > input { max-width: none !important; flex-basis: 100% !important; }
  .admin-app .prod-toolbar .prod-search { max-width: none; }
  .admin-app .app-content > .glass-card.p-4 { padding: 1rem !important; }
}

/* =========================================================================
   Two member apps: Shop (navy + gold, default) and Referral (emerald + gold).
   The Referral theme re-points the shared palette, so every component —
   nav, buttons, cards, tab bar — changes colour with no extra markup.
   ========================================================================= */
body.mode-referral {
  --ink: #04201a;
  --navy-900: #062b22;
  --navy-800: #0a4334;
  --navy-700: #0f5c47;
  --royal: #11a37c;
  --royal-soft: #e2f5ee;
  --bg: #f3f6f2;
}
body.mode-referral .side-user,
body.mode-referral .wallet-card { background: radial-gradient(120% 120% at 100% 0%, rgba(240, 212, 138, .38), transparent 50%), linear-gradient(135deg, #04201a, #0f5c47); }
body.mode-referral .seg-wrap { background: linear-gradient(var(--bg) 70%, rgba(243, 246, 242, 0)); }

/* Mode switch (top bar, centre) */
.mode-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px;
  background: rgba(13, 23, 48, .06); border: 1px solid var(--panel-border); flex-shrink: 0;
}
.mode-switch a {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  height: 38px; padding: 0 1.15rem; border-radius: 999px; font-weight: 700; font-size: .86rem; color: var(--text-soft);
  transition: color .2s ease;
}
.mode-switch a.active { color: #fff; }
.mode-switch a.active i { color: var(--gold-300); }
.mode-thumb {
  position: absolute; top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); border-radius: 999px;
  background: linear-gradient(135deg, #132247, #1b3166); box-shadow: 0 6px 16px rgba(19, 34, 71, .28);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .35s ease;
}
.mode-switch.is-referral .mode-thumb { transform: translateX(100%); background: linear-gradient(135deg, #0a4334, #11a37c); box-shadow: 0 6px 16px rgba(10, 67, 52, .3); }
.side-badge.mode-badge { background: var(--royal-soft); color: var(--navy-800); border-color: transparent; }
@media (min-width: 992px) {
  .member-app .app-topbar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .member-app .app-topbar > :last-child { justify-self: end; }
}
@media (max-width: 991.98px) {
  .member-app .app-topbar { gap: .4rem; padding-left: .75rem; padding-right: .75rem; }
  .member-app .app-topbar > :first-child { flex-shrink: 0; }
  .member-app .app-topbar > :last-child { gap: .35rem !important; flex-shrink: 0; }
  .member-app .app-topbar .top-logo img { height: 32px; }
  .member-app .app-topbar .icon-btn { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; }
  .mode-switch { flex-shrink: 1; min-width: 0; margin: 0 auto; }
  .mode-switch a { height: 34px; padding: 0 .65rem; font-size: .78rem; gap: .3rem; white-space: nowrap; }
}
@media (max-width: 374.98px) {
  .mode-switch a { height: 32px; padding: 0 .5rem; font-size: .7rem; gap: .25rem; }
  .mode-switch a i { font-size: .75rem; }
}
@media (max-width: 339.98px) {
  .member-app .app-topbar .top-logo img { height: 28px; }
  .member-app .app-topbar .icon-btn { width: 34px; height: 34px; font-size: .88rem; }
  .mode-switch a { padding: 0 .4rem; font-size: .66rem; }
}

/* Attention banner (payment due, KYC) */
.due-banner {
  display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; margin-bottom: 1rem; border-radius: 18px;
  background: linear-gradient(135deg, #fff8e6, #fdf0cf); border: 1px solid rgba(201, 154, 46, .35); color: var(--ink);
}
.due-banner:hover { color: var(--ink); box-shadow: var(--shadow); }
.due-banner .ic { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--gold); }
.due-banner b { display: block; font-size: .92rem; }
.due-banner small { display: block; color: var(--text-soft); font-size: .78rem; }
.due-banner > i { color: var(--gold); }
.leg-banner { animation: legBlink 1s ease-in-out infinite; border: 2px solid #e6a800; }
.leg-banner .ic { background: #e6a800; color: #fff; animation: legBounce 1s ease-in-out infinite; }
@keyframes legBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 168, 0, 0); background: linear-gradient(135deg, #fff8e6, #fdf0cf); }
  50% { box-shadow: 0 0 0 7px rgba(230, 168, 0, .45), 0 6px 18px rgba(230, 168, 0, .45); background: linear-gradient(135deg, #ffe58a, #ffcc33); }
}
@keyframes legBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18) rotate(-6deg); } }
@media (max-width: 767.98px) {
  .leg-banner { padding: 1.1rem 1rem; margin: .25rem 4px 1.1rem; gap: .9rem; border-radius: 20px; }
  .leg-banner .ic { width: 52px; height: 52px; font-size: 1.35rem; border-radius: 16px; }
  .leg-banner b { font-size: 1.08rem; line-height: 1.25; }
  .leg-banner small { font-size: .84rem; color: var(--ink); opacity: .8; margin-top: .15rem; }
}
@media (prefers-reduced-motion: reduce) { .leg-banner, .leg-banner .ic { animation: none; } }

/* ---------- Shop home ---------- */
.shop-hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  padding: 1.75rem 1.75rem 1.6rem; margin-bottom: 1rem; border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(44, 91, 224, .55), transparent 60%),
    radial-gradient(50% 120% at 0% 100%, rgba(201, 154, 46, .35), transparent 60%),
    linear-gradient(150deg, #0b1222, #132247);
}
.shop-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); }
.shop-hero-copy { position: relative; z-index: 1; max-width: 560px; min-width: 0; }
.shop-hero h1 { color: #fff; font-weight: 800; font-size: clamp(1.55rem, 3.2vw, 2.3rem); line-height: 1.12; letter-spacing: -.03em; margin: .9rem 0 .5rem; }
.shop-hero h1 .font-serif { color: var(--gold-300); }
.shop-hero p { color: rgba(255, 255, 255, .7); font-size: .95rem; margin-bottom: 1.1rem; }
.shop-hero-search { position: relative; display: flex; gap: .4rem; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); max-width: 460px; }
.shop-hero-search i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .6); }
.shop-hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; padding: 0 .5rem 0 2.4rem; font-size: .92rem; }
.shop-hero-search input::placeholder { color: rgba(255, 255, 255, .55); }
.shop-hero-search input:focus { outline: 0; }
.shop-hero-search .btn { height: 40px; padding: 0 1.1rem; }
.shop-hero-stats { position: relative; z-index: 1; display: flex; gap: .6rem; flex-shrink: 0; }
.shop-hero-stats a { min-width: 92px; padding: .8rem .9rem; border-radius: 18px; text-align: center; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); transition: background .15s ease; }
.shop-hero-stats a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.shop-hero-stats b { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.shop-hero-stats span { font-size: .72rem; color: rgba(255, 255, 255, .65); font-weight: 600; }
.shop-section-title { font-size: 1.15rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.shop-promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.shop-promise > div { padding: .85rem .5rem; border-radius: 16px; background: #fff; border: 1px solid var(--panel-border); text-align: center; font-size: .72rem; font-weight: 600; color: var(--text-soft); }
.shop-promise i { display: block; font-size: 1rem; color: var(--leaf); margin-bottom: .35rem; }
.ship-strip.muted { background: #f4f5f8; color: var(--text-soft); }
.ship-strip.muted .ic { color: var(--text-muted); }
.member-app .p-card { box-shadow: none; }
@media (max-width: 991.98px) {
  .shop-hero { flex-direction: column; align-items: stretch; padding: 1.35rem 1.2rem 1.2rem; border-radius: 26px; }
  .shop-hero-stats a { flex: 1; min-width: 0; padding: .7rem .4rem; }
  .shop-hero-stats b { font-size: 1.25rem; }
}

/* ---------- Referral home ---------- */
.ref-hero {
  position: relative; overflow: hidden; padding: 1.5rem; margin-bottom: 1rem; border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(240, 212, 138, .42), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(17, 163, 124, .45), transparent 60%),
    linear-gradient(140deg, #04201a, #0a4334);
  box-shadow: 0 22px 48px rgba(4, 32, 26, .28);
}
.ref-hero::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 240px; height: 240px; border-radius: 50%; border: 34px solid rgba(255, 255, 255, .05); pointer-events: none; }
.ref-hello { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; margin-top: .75rem; }
.ref-balance { position: relative; z-index: 1; margin-top: 1.25rem; }
.ref-balance .lbl { font-size: .8rem; color: rgba(255, 255, 255, .65); font-weight: 600; }
.ref-balance .val { font-size: clamp(2.1rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.ref-hero .wallet-split, .ref-hero .btn { position: relative; z-index: 1; }
.ref-hero .btn { height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.ring-bar { height: 12px; border-radius: 99px; background: #eaeef0; overflow: hidden; }
.ring-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--royal), var(--gold-400)); transition: width .8s ease; }
.ref-card.flash { animation: flashCard 1.6s ease; }
@keyframes flashCard { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px rgba(17, 163, 124, .35); } }
.plan-due-row + .plan-due-row { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--panel-border); }
@media (max-width: 767.98px) {
  .ref-hero { padding: 1.2rem; border-radius: 26px; }
  .ref-hello { font-size: 1.12rem; }
}

/* Notifications list */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-day { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 1rem 0 .4rem; }
.notif-day:first-child { padding-top: 0; }
.notif { display: flex; gap: .85rem; align-items: flex-start; padding: .8rem; margin: 0 -.8rem; border-radius: 16px; }
.notif + .notif { border-top: 1px solid var(--panel-border); border-top-left-radius: 0; border-top-right-radius: 0; }
.notif.is-new { background: var(--royal-soft); }
.notif .tx-ic { margin-top: 2px; }
.notif-title { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem; color: var(--ink); }
.notif-msg { display: block; font-size: .84rem; color: var(--text-soft); margin-top: 2px; line-height: 1.5; overflow-wrap: anywhere; }
.notif-time { font-size: .72rem; color: var(--text-muted); white-space: nowrap; margin-top: 3px; }
.new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--royal); flex-shrink: 0; }

/* =========================================================================
   Referral page — card & colour refresh (scoped to .ref-page)
   ========================================================================= */
.ref-page { --c-royal: #2c5be0; --c-leaf: #2f7a4f; --c-gold: #c99a2e; --c-red: #d1453b; }
.ref-page .ref-hero {
  position: relative; overflow: hidden; padding: 1.5rem; border-radius: 28px; color: #fff; margin-bottom: 1rem;
  background:
    radial-gradient(70% 130% at 100% 0%, rgba(240, 212, 138, .42), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(44, 91, 224, .55), transparent 60%),
    linear-gradient(140deg, var(--ink), var(--navy-800));
  box-shadow: 0 22px 46px rgba(13, 23, 48, .24);
}
/* Unpaid ID (no active plan): bright gold hero with dark text */
.ref-page .ref-hero.is-unpaid {
  color: var(--ink);
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(360px 260px at 0% 100%, rgba(201, 162, 39, .45), transparent 70%),
    linear-gradient(150deg, #fbe38a 0%, #f4cf55 45%, #e2b23a 100%);
  box-shadow: 0 22px 46px rgba(201, 154, 46, .32);
}
.ref-page .ref-hero.is-unpaid::after { border-color: rgba(255, 255, 255, .22); }
.ref-page .ref-hero.is-unpaid .hero-chip { background: rgba(255, 255, 255, .45); border-color: rgba(13, 23, 48, .1); color: var(--ink); }
.ref-page .ref-hero.is-unpaid .hero-chip .dot { background: var(--ink); color: var(--gold-300); }
.ref-page .ref-hero.is-unpaid .dash-meta { color: rgba(13, 23, 48, .72); }
.ref-page .ref-hero.is-unpaid .dash-meta i { color: #8a6412; }
.ref-page .ref-hero.is-unpaid .dash-status.warn { background: #c0392b; color: #fff; }
.ref-page .ref-hero.is-unpaid .ref-balance { background: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .7); }
.ref-page .ref-hero.is-unpaid .ref-balance .lbl { color: rgba(13, 23, 48, .62); }
.ref-page .ref-hero.is-unpaid .ref-balance .val { color: var(--ink); }
.ref-page .ref-hero.is-unpaid .wallet-split > div { background: rgba(255, 255, 255, .42); border-color: rgba(255, 255, 255, .65); }
.ref-page .ref-hero.is-unpaid .wallet-split > div:nth-child(1) { border-top-color: var(--royal); }
.ref-page .ref-hero.is-unpaid .wallet-split > div:nth-child(2) { border-top-color: #8a6412; }
.ref-page .ref-hero.is-unpaid .wallet-split > div:nth-child(3) { border-top-color: var(--leaf); }
.ref-page .ref-hero.is-unpaid .wallet-split span { color: rgba(13, 23, 48, .6); }
.ref-page .ref-hero.is-unpaid .btn-lux { background: var(--ink); color: var(--gold-300); box-shadow: 0 10px 24px rgba(13, 23, 48, .25); }
.ref-page .ref-hero.is-unpaid .btn-lux:hover { color: var(--gold-200, #f7e3a8); filter: brightness(1.15); }
.ref-page .ref-hero.is-unpaid .btn-glass { background: rgba(255, 255, 255, .5); border-color: rgba(13, 23, 48, .15); color: var(--ink); }
.ref-page .ref-hero.is-unpaid .btn-glass:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.ref-page .ref-hero::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 230px; height: 230px; border-radius: 50%; border: 34px solid rgba(255, 255, 255, .05); pointer-events: none; }
.ref-page .ref-hero > * { position: relative; z-index: 1; }
.ref-page .ref-hello { font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; margin: .55rem 0 .15rem; }
.ref-page .ref-balance { margin-top: 1.1rem; padding: 1rem 1.15rem; border-radius: 20px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); }
.ref-page .ref-balance .lbl { font-size: .78rem; color: rgba(255, 255, 255, .65); font-weight: 600; }
.ref-page .ref-balance .val { font-size: clamp(2rem, 5vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; color: var(--gold-300); }
.ref-page .wallet-split > div:nth-child(1) { border-top: 3px solid #7fb2ff; }
.ref-page .wallet-split > div:nth-child(2) { border-top: 3px solid var(--gold-300); }
.ref-page .wallet-split > div:nth-child(3) { border-top: 3px solid #7fdca4; }
.ref-page .ref-hero .btn { height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 700; }
.ref-page .btn-glass { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
.ref-page .btn-glass:hover { background: rgba(255, 255, 255, .2); color: #fff; }

.ref-page .m-card { border-radius: 24px; box-shadow: 0 6px 22px rgba(13, 23, 48, .05); position: relative; overflow: hidden; }
.ref-page .m-card-head h2 { display: flex; align-items: center; gap: .5rem; }
.ref-page .m-card-head h2::before { content: ""; width: 4px; height: 1.05em; border-radius: 4px; background: linear-gradient(var(--gold-400), var(--gold-500)); }

.ref-page .ref-invite { background: linear-gradient(160deg, #fff 40%, var(--gold-50)); border-color: rgba(201, 154, 46, .35); }
.ref-page .ref-invite::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--gold-400), var(--gold-500), var(--royal)); }
.ref-page .ref-link { background: #fff; border: 1.5px dashed var(--gold-500); }
.ref-page .ref-link .btn { border-radius: 12px; }

.ref-page .ref-plan { background: linear-gradient(160deg, #fff 40%, var(--royal-soft)); border-color: rgba(44, 91, 224, .22); }
.ref-page .ref-plan::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--royal), #4b7bf0); }
.ref-page .ring-bar { height: 10px; border-radius: 99px; background: rgba(44, 91, 224, .12); overflow: hidden; }
.ref-page .ring-bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--royal), var(--leaf)); }

.ref-page .kpi { position: relative; overflow: hidden; border-radius: 22px; padding: 1.1rem; border: 1px solid transparent; }
.ref-page .kpi::after { content: ""; position: absolute; right: -22px; top: -22px; width: 84px; height: 84px; border-radius: 50%; opacity: .55; }
.ref-page .kpi .ic { position: relative; z-index: 1; width: 42px; height: 42px; background: #fff; box-shadow: 0 4px 12px rgba(13, 23, 48, .08); }
.ref-page .kpi .num { font-size: 1.65rem; }
.ref-page .kpi.k-royal { background: linear-gradient(160deg, #fff, var(--royal-soft)); border-color: rgba(44, 91, 224, .2); }
.ref-page .kpi.k-royal::after { background: rgba(44, 91, 224, .12); }
.ref-page .kpi.k-leaf { background: linear-gradient(160deg, #fff, var(--leaf-soft)); border-color: rgba(47, 122, 79, .22); }
.ref-page .kpi.k-leaf::after { background: rgba(47, 122, 79, .13); }
.ref-page .kpi.k-gold { background: linear-gradient(160deg, #fff, var(--gold-50)); border-color: rgba(201, 154, 46, .3); }
.ref-page .kpi.k-gold::after { background: rgba(201, 154, 46, .16); }
.ref-page .kpi.k-red { background: linear-gradient(160deg, #fff, #fdecea); border-color: rgba(209, 69, 59, .25); }
.ref-page .kpi.k-red::after { background: rgba(209, 69, 59, .12); }

.ref-page .mini-wallets > a { border-radius: 18px; border: 1px solid transparent; }
.ref-page .mini-wallets > a i { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: .5rem; background: #fff; box-shadow: 0 4px 10px rgba(13, 23, 48, .07); }
.ref-page .mini-wallets > a.w-gold { background: var(--gold-50); border-color: rgba(201, 154, 46, .25); }
.ref-page .mini-wallets > a.w-gold i { color: var(--gold-500); }
.ref-page .mini-wallets > a.w-royal { background: var(--royal-soft); border-color: rgba(44, 91, 224, .2); }
.ref-page .mini-wallets > a.w-royal i { color: var(--royal); }
.ref-page .mini-wallets > a.w-leaf { background: var(--leaf-soft); border-color: rgba(47, 122, 79, .2); }
.ref-page .mini-wallets > a.w-leaf i { color: var(--leaf); }
.ref-page .mini-wallets > a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.ref-page .quick-grid { border-radius: 24px; box-shadow: 0 6px 22px rgba(13, 23, 48, .05); }
.ref-page .quick:nth-child(6n+1) .ic { background: var(--gold-50); color: var(--gold-500); }
.ref-page .quick:nth-child(6n+2) .ic { background: var(--leaf-soft); color: var(--leaf); }
.ref-page .quick:nth-child(6n+3) .ic { background: var(--royal-soft); color: var(--royal); }
.ref-page .quick:nth-child(6n+4) .ic { background: #f3ecfb; color: #7a4fc2; }
.ref-page .quick:nth-child(6n+5) .ic { background: #e5f4f8; color: #1b8aa6; }
.ref-page .quick:nth-child(6n+6) .ic { background: #fdecea; color: var(--danger); }
.ref-page .quick:hover .ic { background: var(--navy-800); color: var(--gold-300); }

.ref-page .due-banner { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: 20px; background: linear-gradient(90deg, #fdf2e0, #fff7e6); border: 1px solid rgba(201, 154, 46, .4); color: var(--ink); }
.ref-page .due-banner .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--gold-500); color: #fff; flex-shrink: 0; }
.ref-page .due-banner small { display: block; color: var(--text-soft); }
.ref-page .tx-list li { padding: .75rem .5rem; border-radius: 14px; border-bottom: 0; }
.ref-page .tx-list li:hover { background: #f7f8fb; }
@media (max-width: 767.98px) {
  .ref-page .ref-hero { padding: 1.15rem; border-radius: 24px; }
  .ref-page .kpi .num { font-size: 1.35rem; }
}

/* Wallet page: activity filter chips */
.w-filter { display: flex; gap: .4rem; overflow-x: auto; margin: -.25rem 0 .75rem; padding-bottom: .25rem; scrollbar-width: none; }
.w-filter::-webkit-scrollbar { display: none; }
.w-filter button { flex-shrink: 0; height: 34px; padding: 0 .9rem; border-radius: 99px; border: 1px solid var(--panel-border); background: #fff; color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.w-filter button:hover { color: var(--ink); }
.w-filter button.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }

/* Withdrawals page */
.pill.royal { background: var(--royal-soft); color: var(--royal); }
.wd-page .wd-limit { padding: 1.1rem 1.2rem; }
.wd-amount { display: flex; align-items: center; gap: .4rem; height: 60px; padding: 0 1rem; border-radius: 16px; background: #fff; border: 1.5px solid var(--panel-border-strong); }
.wd-amount:focus-within { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .15); }
.wd-amount span { font-size: 1.4rem; font-weight: 800; color: var(--text-muted); }
.wd-amount input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.wd-amount input:focus { outline: 0; }
.wd-methods { display: grid; gap: .5rem; }
.wd-method { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 16px; background: #fff; border: 1.5px solid var(--panel-border); cursor: pointer; margin: 0; }
.wd-method input { position: absolute; opacity: 0; pointer-events: none; }
.wd-method .ic { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--royal-soft); color: var(--royal); }
.wd-method b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-method small { display: block; font-size: .74rem; color: var(--text-muted); }
.wd-method .tick { color: var(--panel-border-strong); font-size: 1.1rem; }
.wd-method:has(input:checked) { border-color: var(--gold-500); background: var(--gold-50); }
.wd-method:has(input:checked) .tick { color: var(--leaf); }
.wd-method:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(201, 154, 46, .2); }
.wd-submit { height: 50px; border-radius: 14px; font-weight: 700; }
.wd-bank { padding-top: .75rem; border-top: 1px solid var(--panel-border); }
.wd-bank .form-control { height: 46px; border-radius: 12px; }

/* Network page */
.net-page .seg { max-width: none; box-shadow: none; background: #f4f5f8; }
.net-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 99px; font-size: .7rem; background: rgba(13, 23, 48, .08); }
.net-page .seg-btn.active .net-count { background: rgba(255, 255, 255, .18); color: #fff; }
.net-tools { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.net-search { position: relative; flex: 1 1 220px; min-width: 0; }
.net-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .85rem; }
.net-search input { width: 100%; height: 40px; padding: 0 .9rem 0 2.3rem; border-radius: 99px; border: 1px solid var(--panel-border); background: #fff; font-size: .85rem; color: var(--ink); }
.net-search input:focus { outline: 0; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .15); }
.net-av { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; background: #f1f2f5; color: var(--text-soft); }
.net-av.paid { background: linear-gradient(135deg, var(--navy-800), var(--royal)); color: var(--gold-300); }
.net-list .pill { flex-shrink: 0; }

/* ---------- Shared bits for the redesigned referral/account pages ---------- */
.ref-page .tx-list .text-end .pill { display: inline-flex; }
.ref-page .m-form .form-label { font-size: .8rem; font-weight: 700; color: var(--text-soft); margin-bottom: .35rem; }
.ref-page .m-form .form-control, .ref-page .m-form .form-select { height: 48px; border-radius: 14px; border: 1.5px solid var(--panel-border-strong); background: #fff; font-size: .92rem; }
.ref-page .m-form .form-control:focus, .ref-page .m-form .form-select:focus { border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .15); }
.ref-page .m-submit { height: 50px; border-radius: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--panel-border); }
.pager .btn { height: 40px; border-radius: 12px; display: inline-flex; align-items: center; }

/* Plans */
.plan-progress { margin-top: 1rem; padding: .9rem 1rem; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); }
.plan-progress .ring-bar { background: rgba(255, 255, 255, .15) !important; }
.plan-progress .ring-bar span { background: linear-gradient(90deg, var(--gold-300), #7fdca4) !important; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.plan-tile { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem; border-radius: 20px; border: 1px solid var(--panel-border); background: linear-gradient(160deg, #fff 45%, var(--tint, #f6f7f9)); transition: transform .15s ease, box-shadow .15s ease; }
.plan-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-tile.t0 { --tint: var(--gold-50); } .plan-tile.t1 { --tint: var(--royal-soft); } .plan-tile.t2 { --tint: var(--leaf-soft); } .plan-tile.t3 { --tint: #f3ecfb; }
.plan-tile.is-current { border: 2px solid var(--leaf); }
.plan-name { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-soft); }
.plan-price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.plan-feats { list-style: none; padding: 0; margin: .2rem 0 .9rem; display: grid; gap: .35rem; }
.plan-feats li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-soft); }
.plan-feats i { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; background: #fff; color: var(--gold-500); box-shadow: 0 2px 6px rgba(13, 23, 48, .08); }
.plan-tile .btn { height: 44px; border-radius: 12px; font-weight: 700; }
.plan-tile.is-owned:hover { transform: none; box-shadow: none; }
.plan-owned { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .75rem; margin-bottom: .6rem; border-radius: 14px; background: var(--leaf-soft); border: 1px solid rgba(47, 122, 79, .18); }
.plan-owned .ic { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; background: var(--leaf); color: #fff; }
.plan-owned b { display: block; font-size: .82rem; color: var(--leaf); line-height: 1.25; }
.plan-owned small { display: block; font-size: .72rem; color: var(--text-soft); line-height: 1.35; margin-top: .1rem; }
.plan-tile .plan-again { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; height: auto; min-height: 48px; padding: .45rem .7rem; white-space: normal; text-align: left; line-height: 1.15; background: var(--ink); color: var(--gold-300); border: 0; }
.plan-tile .plan-again span { min-width: 0; }
.plan-tile .plan-again small { display: block; font-size: .7rem; font-weight: 600; color: rgba(255, 255, 255, .7); }
.plan-tile .plan-again:hover { color: var(--gold-300); filter: brightness(1.2); }

/* My IDs */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .75rem; }
.id-tile { padding: 1rem; border-radius: 20px; border: 1px solid var(--panel-border); background: #fff; min-width: 0; }
.id-tile.is-current { border: 2px solid var(--leaf); background: linear-gradient(160deg, #fff 50%, var(--leaf-soft)); }
.id-tile .ref-link { background: #f4f5f8; }
.id-tile .ref-link input { font-size: .78rem; }
.id-tile .ref-link .btn { height: 38px; padding: 0 .9rem; }
.id-tile form .btn { height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }

/* KYC */
.kyc-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: 0; margin: 1.1rem 0 0; }
.kyc-steps li { display: flex; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .55); }
.kyc-steps span { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .65rem; background: rgba(255, 255, 255, .12); }
.kyc-steps li.done { color: #fff; }
.kyc-steps li.done span { background: #7fdca4; color: #04201a; }
.kyc-steps li.bad span { background: #f08a82; color: #3a0d09; }
.ref-page .due-banner.bad-banner { background: linear-gradient(90deg, #fdecea, #fff4f2); border-color: rgba(209, 69, 59, .35); }
.ref-page .due-banner.bad-banner .ic { background: var(--danger); }

/* Profile */
.pf-avatar { width: 60px; height: 60px; border-radius: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; background: linear-gradient(135deg, var(--gold-300), var(--gold-500)); color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.pf-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--panel-border); font-size: .86rem; }
.pf-rows span { color: var(--text-muted); flex-shrink: 0; }
.pf-rows b { text-align: right; min-width: 0; }
.pf-links { display: grid; gap: .4rem; margin-top: 1rem; }
.pf-links a { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 14px; background: #f6f7f9; color: var(--ink); font-size: .86rem; font-weight: 600; }
.pf-links a i:first-child { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--royal); font-size: .8rem; }
.pf-links a i:last-child { margin-left: auto; font-size: .7rem; color: var(--text-muted); }
.pf-links a:hover { background: var(--royal-soft); color: var(--ink); }

/* Settings */
.pw-field { position: relative; }
.pw-field .form-control { padding-right: 3rem; }
.pw-field button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--text-muted); }
.pw-field button:hover { color: var(--ink); background: #f4f5f8; }
.pw-meter { height: 6px; border-radius: 99px; background: #eef0f4; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s ease, background .25s ease; }

@media (max-width: 767.98px) {
  .id-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
  .plan-tile { padding: .9rem; border-radius: 18px; }
  .plan-price { font-size: 1.3rem; }
  .plan-owned { padding: .55rem; gap: .45rem; }
  .plan-owned .ic { width: 22px; height: 22px; font-size: .62rem; }
  .plan-tile .plan-again { padding: .45rem .55rem; gap: .45rem; font-size: .85rem; }
  .kyc-steps li { flex-direction: column; text-align: center; font-size: .7rem; padding: .55rem .3rem; }
  .pf-avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 1.1rem; }
}

/* ---------- Genealogy ---------- */
.pill.spill { background: #fdeee2; color: #b8601f; }
.gen-slot { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; padding: .75rem .9rem; border-radius: 18px; background: rgba(255, 255, 255, .09); border: 1px dashed rgba(240, 212, 138, .55); font-size: .85rem; }
.gen-slot .ic { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--gold-300); color: var(--ink); }
.gen-slot small { display: block; font-size: .72rem; color: rgba(255, 255, 255, .6); margin-top: 2px; }
.gen-slot .btn { height: 34px !important; padding: 0 .9rem; font-size: .8rem; flex-shrink: 0; }
.gen-tools { padding: 1rem; margin-bottom: .75rem; }
.gen-row { display: flex; align-items: center; gap: .6rem; }
.gen-row-2 { margin-top: .75rem; justify-content: space-between; }
.gen-tools .tree-search-box { flex: 1; width: auto; }
.gen-view.seg { width: 220px; flex-shrink: 0; padding: 4px; border-radius: 14px; background: #f4f5f8; box-shadow: none; }
.gen-view .seg-btn { height: 36px; font-size: .82rem; border-radius: 11px; }
.gen-view .seg-pill { top: 4px; left: 4px; width: calc(50% - 4px); height: calc(100% - 8px); border-radius: 11px; }
.gen-lbl { align-self: center; font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-right: .1rem; flex-shrink: 0; }
#treeLevels.is-disabled { display: none; }
.gen-home { height: 36px; padding: 0 .9rem; font-size: .8rem; border-radius: 99px; display: inline-flex; align-items: center; flex-shrink: 0; margin-left: auto; }
.gen-crumbs { margin: .75rem 0 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: .3rem; }
.gen-crumbs:empty { display: none; }
.gen-crumbs::-webkit-scrollbar { display: none; }
.gen-crumbs .crumb { flex-shrink: 0; padding: .3rem .65rem; border-radius: 99px; background: #f4f5f8; color: var(--text-soft); font-size: .76rem; font-weight: 700; white-space: nowrap; }
.gen-crumbs a.crumb:hover { background: var(--royal-soft); color: var(--royal); }
.gen-crumbs .crumb.is-last { background: var(--navy-800); color: var(--gold-300); }
.gen-crumbs .sep { font-size: .55rem; color: var(--text-muted); flex-shrink: 0; }
.gen-tools .tree-search-results { top: calc(100% + 6px); background: #fff; border: 1px solid var(--panel-border); border-radius: 16px; box-shadow: 0 16px 40px rgba(13, 23, 48, .16); padding: .3rem; }
.gen-tools .tree-search-results .result-item { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 12px; }
.gen-tools .tree-search-results .result-item:hover { background: var(--royal-soft); }
.gen-tools .tree-search-results .net-av { width: 34px; height: 34px; border-radius: 11px; font-size: .7rem; }
.gen-tools .tree-search-results b { display: block; font-size: .85rem; }
.gen-tools .tree-search-results small { display: block; font-size: .72rem; color: var(--text-muted); }

.gen-legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 0 .25rem .75rem; font-size: .74rem; font-weight: 600; color: var(--text-soft); }
.gen-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.gen-legend .lg { width: 14px; height: 14px; border-radius: 5px; display: inline-block; }
.lg-paid { background: var(--leaf-soft); border: 1.5px solid var(--leaf); }
.lg-unpaid { background: #fff; border: 1.5px solid #e2a29d; }
.lg-spill { border: 2px dashed #e08a3c; }
.lg-slot { background: #fff7e6; border: 2px dashed var(--gold-500); }

/* Tree chart */
.gen-tree-card { overflow: hidden; }
.gen-page .tree-viewport { height: 68vh; min-height: 420px; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 0%, rgba(44, 91, 224, .07), transparent 60%), #fafbfc; }
.gen-page .tree-lines { --tl-color: #c9cfdb; }
.gen-page .tree-canvas { transition: none; padding: 1.5rem 1rem 3rem; }
.gen-page .tree-node { width: 172px; padding: .75rem .6rem .9rem; border-radius: 18px; background: #fff; border: 1.5px solid var(--panel-border); box-shadow: 0 6px 18px rgba(13, 23, 48, .07); }
.gen-page .tree-node:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(13, 23, 48, .12); }
.gen-page .tree-node.is-paid { background: linear-gradient(180deg, #ddf0e4, #c6e5d1); border-color: rgba(47, 122, 79, .6); }
.gen-page .tree-node.is-unpaid { background: linear-gradient(180deg, #fbe3e0, #f4cbc6); border-color: rgba(192, 57, 43, .55); }
.gen-page .tree-node.is-spillover { border: 2px dashed #e08a3c; box-shadow: 0 6px 18px rgba(224, 138, 60, .12); }
.gen-page .tree-node.is-self { border: 2px solid var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .18); }
.gen-page .tree-node .avatar { width: 42px; height: 42px; border-radius: 14px; background: #f1f2f5; color: var(--text-soft); font-weight: 800; }
.gen-page .tree-node.is-paid .avatar, .gen-page .tree-node.is-self .avatar { background: linear-gradient(135deg, var(--navy-800), var(--royal)); color: var(--gold-300); }
.gen-page .tree-node .n-name { font-size: .82rem; font-weight: 700; color: var(--ink); }
.gen-page .tree-node .n-id { font-size: .7rem; color: var(--text-muted); font-weight: 600; }
.gen-page .tree-node .n-flags { margin-top: .35rem; }
.gen-page .tree-node .n-flags .pill { font-size: .64rem; padding: .18rem .5rem; }
.gen-page .tree-node .n-team-stats { gap: 4px; margin-top: .4rem; }
.gen-page .tree-node .ts-item { display: inline-flex; align-items: center; gap: 4px; background: #f4f5f8; border: 0; color: var(--text-soft); border-radius: 8px; padding: 2px 7px; font-size: .66rem; font-weight: 700; }
.gen-page .tree-node .ts-item i { color: var(--royal); margin: 0; }
.gen-page .tree-node .spill-tag { background: #e08a3c; color: #fff; border-radius: 99px; padding: 1px 8px; }
.gen-page .tree-node .slot-badge { background: #fff; border: 1px solid var(--panel-border-strong); color: var(--text-soft); font-weight: 700; }
.gen-page .tree-node .expand-btn { width: 28px; height: 28px; bottom: -14px; padding: 0; background: var(--navy-800); color: var(--gold-300); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(13, 23, 48, .2); }
.gen-page .tree-node.tree-slot-empty { min-height: 120px; background: #fff7e6; border: 2px dashed var(--gold-500); color: var(--ink); }
.gen-page .tree-slot-empty .avatar { background: var(--gold-300); color: var(--ink); }
.gen-page .tree-slot-empty .n-id { color: var(--gold-500); }
.gen-page .tree-zoom-controls button { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 1px solid var(--panel-border); color: var(--navy-800); box-shadow: 0 4px 12px rgba(13, 23, 48, .1); }
.gen-hint { padding: .65rem 1rem; font-size: .74rem; color: var(--text-muted); border-top: 1px solid var(--panel-border); background: #fff; }
.gen-loading { display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--text-muted); font-size: .86rem; white-space: nowrap; }

/* List view */
.gl-root { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: 18px; background: #f6f7f9; }
.gl-root.is-paid { background: linear-gradient(160deg, #fff, var(--leaf-soft)); border: 1px solid rgba(47, 122, 79, .2); }
.gl-root .net-av { width: 48px; height: 48px; border-radius: 15px; font-size: .95rem; }
.gl-root .tx-title { font-size: .98rem; }
.gl-info { height: 34px; border-radius: 10px; flex-shrink: 0; }
.gl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .6rem; }
.gl-stats > div { padding: .6rem; border-radius: 14px; background: #fff; border: 1px solid var(--panel-border); text-align: center; min-width: 0; }
.gl-stats b { display: block; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.gl-stats span { display: block; font-size: .68rem; font-weight: 600; color: var(--text-muted); }
.gl-head { margin: 1.1rem 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.gl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.gl-item { display: flex; align-items: center; gap: .7rem; padding: .7rem .75rem; border-radius: 16px; border: 1.5px solid var(--panel-border); background: #fff; }
.gl-item[data-uid] { cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.gl-item[data-uid]:hover, .gl-item[data-uid]:focus-visible { background: var(--royal-soft); border-color: rgba(44, 91, 224, .25); outline: 0; }
.gl-item.is-spillover { border-style: dashed; border-color: #e08a3c; }
.gl-item.gl-slot { background: #fff7e6; border: 2px dashed var(--gold-500); }
.gl-item.gl-slot .net-av { background: var(--gold-300); color: var(--ink); }
.gl-item.gl-empty { background: #fafbfc; border-style: dashed; color: var(--text-muted); }
.gl-item.gl-empty .tx-title { color: var(--text-muted); font-weight: 600; }
.gl-pos { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 800; background: #f1f2f5; color: var(--text-soft); }
.gl-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.gl-tags .pill { font-size: .64rem; padding: .18rem .5rem; }
.gl-detail { width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 11px; background: #f4f5f8; color: var(--royal); }
.gl-detail:hover { background: #fff; box-shadow: var(--shadow-sm); }
.gl-go { width: 12px; flex-shrink: 0; font-size: .75rem; color: var(--text-muted); }
.gl-slot .btn { height: 34px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; }

/* Member detail sheet */
.gen-sheet .modal-content { border: 0; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px rgba(13, 23, 48, .25); }
.gen-sheet .modal-header { border: 0; padding: 1rem 1.25rem .25rem; }
.gen-sheet .modal-title { font-weight: 800; font-size: .95rem; }
.gen-sheet .modal-body { padding: .5rem 1.25rem 1rem; }
.gen-sheet .modal-footer { border: 0; padding: 0 1.25rem 1.25rem; }
.gen-sheet .modal-footer .btn { height: 48px; border-radius: 14px; font-weight: 700; margin: 0; }
.gd-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.gd-head .net-av { width: 52px; height: 52px; border-radius: 16px; font-size: 1rem; }
.gd-head .tx-title { font-size: 1.05rem; }

@media (max-width: 767.98px) {
  .gen-row:first-child { flex-wrap: wrap; }
  .gen-tools .tree-search-box { flex: 1 1 100%; }
  .gen-view.seg { width: 100%; }
  .gen-tools { padding: .85rem; }
  .gen-page .tree-viewport { height: 64vh; min-height: 360px; }
  .gen-page .tree-node { width: 150px; }
  .gen-slot { flex-wrap: wrap; }
  .gen-slot .btn { width: 100%; }
  .gen-sheet .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; min-height: 0; align-items: flex-end; height: auto; max-height: 88vh; }
  .gen-sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
  .gen-sheet.show .modal-dialog { transform: none; }
  .gen-sheet .modal-content { border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); max-height: 88vh; }
  .gen-sheet .modal-header::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 99px; background: #dde0e6; }
}
.gen-sheet .modal-header { position: relative; }

/* My IDs: per-ID level + income strip */
.id-level { margin-top: .85rem; padding: .7rem .8rem; border-radius: 14px; background: #f6f7f9; }
.id-level .ring-bar { height: 8px; }
.id-income { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .5rem; }
.id-income > div { padding: .5rem .55rem; border-radius: 12px; border: 1px solid var(--panel-border); background: #fff; min-width: 0; }
.id-income span { display: block; font-size: .64rem; font-weight: 600; color: var(--text-muted); }
.id-income b { display: block; font-size: .82rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-tile.is-current .id-level { background: rgba(255, 255, 255, .7); }

/* Shop dashboard */
.dash-page .shop-hero-search { max-width: none; }
.dash-page .shop-hero-search .btn { height: 40px !important; border-radius: 99px; }
.dash-page .wallet-split > a { padding: .7rem .8rem; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; min-width: 0; transition: background .15s ease; }
.dash-page .wallet-split > a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.dash-page .wallet-split > a:nth-child(1) { border-top: 3px solid #7fb2ff; }
.dash-page .wallet-split > a:nth-child(2) { border-top: 3px solid var(--gold-300); }
.dash-page .wallet-split > a:nth-child(3) { border-top: 3px solid #7fdca4; }
.dash-page .wallet-split > a b { font-size: 1.15rem; }
.coupon-card { display: flex; align-items: center; gap: .85rem; margin: 0; color: var(--ink); background: linear-gradient(160deg, #fff 40%, var(--gold-50)); border-color: rgba(201, 154, 46, .35); }
.coupon-card:hover { color: var(--ink); box-shadow: var(--shadow); }
.coupon-card .ic { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--gold-500); color: #fff; font-size: 1.05rem; }
.coupon-card b { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.coupon-card small { display: block; font-size: .72rem; color: var(--text-muted); }
.dash-page .track { border-radius: 20px; background: #fff; }
.dash-page .shop-promise > div { border-radius: 18px; }
.dash-page .m-card.m-row { margin: 0; color: var(--ink); }

/* Orders page */
.order-list { display: grid; gap: .75rem; }
.order-list .track + .track { margin-top: 0; }
.order-list .track.d-none { display: none !important; }
.order-more { margin-top: .85rem; border-top: 1px dashed var(--panel-border); padding-top: .65rem; }
.order-more summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: .8rem; font-weight: 700; color: var(--navy-700); }
.order-more summary::-webkit-details-marker { display: none; }
.order-more summary i { font-size: .7rem; transition: transform .2s ease; }
.order-more[open] summary i { transform: rotate(180deg); }
.order-items { list-style: none; padding: 0; margin: .6rem 0 0; }
.order-items li { display: flex; align-items: center; gap: .75rem; padding: .4rem 0; font-size: .84rem; }
.order-items li b { flex-shrink: 0; }
.order-items li.total { border-top: 1px solid var(--panel-border); margin-top: .2rem; padding-top: .55rem; font-weight: 700; }
.order-pay { height: 46px; border-radius: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (max-width: 575.98px) {
  /* Each order is its own card on phones - drop the outer card so they get the full width. */
  .ref-page .m-card.orders-card { padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .orders-card .w-filter { margin: 0 0 .65rem; }
  .order-list .track { padding: .9rem; box-shadow: 0 4px 16px rgba(13, 23, 48, .05); }
  .order-list .track-top { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: .5rem .75rem; align-items: start; }
  .order-list .track-img { width: 48px; height: 48px; border-radius: 13px; }
  .order-list .track-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .order-list .track-top > .text-end {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    text-align: left !important; padding-top: .6rem; border-top: 1px dashed var(--panel-border);
  }
  .order-list .track-amt { order: 2; font-size: 1.02rem; }
  .order-list .track-state { order: 1; margin: 0; padding: .25rem .6rem; border-radius: 99px; background: var(--royal-soft); }
  .order-list .track-state.s-pending { background: #fff4dc; }
  .order-list .track-state.s-delivered { background: var(--leaf-soft); }
  .order-list .track-state.s-cancelled, .order-list .track-state.s-refunded { background: #fdecea; }
  .order-list .steps { margin-top: 1rem; }
  .order-list .steps li { font-size: .66rem; }
  .order-items li { font-size: .82rem; gap: .5rem; }
  .order-list .addr { font-size: .82rem; }
}

/* =========================================================================
   Admin Genealogy V2 (full-screen tool)
   ========================================================================= */
.app-content.gv2-app { max-width: none; width: 100%; padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .7rem; height: 100vh; height: 100dvh; background: var(--bg); }
.gv2-app.is-full { position: fixed; inset: 0; z-index: 1080; }
.gv2-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-shrink: 0; }
.gv2-icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--panel-border); color: var(--ink); }
.gv2-icon:hover { color: var(--royal); border-color: var(--panel-border-strong); }
.gv2-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.gv2-title i { color: var(--gold); margin-right: .3rem; }
.gv2-sub { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.gv2-search { position: relative; width: min(420px, 50vw); }
.gv2-search > i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .85rem; }
.gv2-search input { width: 100%; height: 42px; padding: 0 2.6rem 0 2.4rem; border-radius: 99px; border: 1px solid var(--panel-border); background: #fff; font-size: .88rem; }
.gv2-search input:focus { outline: 0; border-color: var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .15); }
.gv2-search kbd { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); }
.gv2-app kbd { padding: .05rem .4rem; border-radius: 6px; background: #f1f2f5; border: 1px solid var(--panel-border); color: var(--text-soft); font-size: .7rem; font-family: inherit; font-weight: 700; box-shadow: none; }
.gv2-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1060; max-height: 360px; overflow-y: auto; padding: .35rem; border-radius: 18px; background: #fff; border: 1px solid var(--panel-border); box-shadow: 0 18px 44px rgba(13, 23, 48, .18); }
.gv2-res { width: 100%; display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border: 0; border-radius: 12px; background: none; text-align: left; color: var(--ink); }
.gv2-res .net-av { width: 34px; height: 34px; border-radius: 11px; font-size: .7rem; }
.gv2-res b { display: block; font-size: .86rem; }
.gv2-res small { display: block; font-size: .72rem; color: var(--text-muted); }
.gv2-res > i { margin-left: auto; font-size: .7rem; color: var(--text-muted); }
.gv2-res:hover, .gv2-res.is-active { background: var(--royal-soft); }
.gv2-res-empty { padding: .8rem; font-size: .84rem; color: var(--text-muted); text-align: center; }

.gv2-summary { display: flex; gap: .5rem; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.gv2-summary::-webkit-scrollbar { display: none; }
.gv2-stat { flex: 1 0 140px; padding: .6rem .85rem; border-radius: 16px; background: #fff; border: 1px solid var(--panel-border); }
.gv2-stat .k { display: flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.gv2-stat .k i { font-size: .7rem; }
.gv2-stat b { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.gv2-stat small { display: block; font-size: .66rem; color: var(--text-muted); white-space: nowrap; }
.gv2-stat.ok { background: linear-gradient(160deg, #fff, var(--leaf-soft)); border-color: rgba(47, 122, 79, .2); }
.gv2-stat.ok b, .gv2-stat.ok .k i { color: var(--leaf); }
.gv2-stat.bad { background: linear-gradient(160deg, #fff, #fdecea); border-color: rgba(209, 69, 59, .2); }
.gv2-stat.bad b, .gv2-stat.bad .k i { color: var(--danger); }

.gv2-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
.gv2-group { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: #fff; border: 1px solid var(--panel-border); }
.gv2-group button { height: 32px; min-width: 32px; padding: 0 .65rem; border: 0; border-radius: 10px; background: none; color: var(--text-soft); font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.gv2-group button:hover { background: #f4f5f8; color: var(--ink); }
.gv2-group button.active { background: var(--navy-800); color: var(--gold-300); }
.gv2-lbl { padding: 0 .4rem 0 .5rem; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.gv2-crumbs { display: flex; align-items: center; gap: .3rem; min-width: 0; flex: 1 1 200px; overflow-x: auto; scrollbar-width: none; }
.gv2-crumbs::-webkit-scrollbar { display: none; }
.gv2-crumbs .crumb { flex-shrink: 0; padding: .3rem .6rem; border: 0; border-radius: 99px; background: #fff; border: 1px solid var(--panel-border); color: var(--text-soft); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.gv2-crumbs button.crumb:hover { color: var(--royal); border-color: rgba(44, 91, 224, .3); }
.gv2-crumbs .crumb.is-last { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }
.gv2-crumbs .crumb.gap { background: none; border: 0; }
.gv2-crumbs .sep { font-size: .5rem; color: var(--text-muted); flex-shrink: 0; }
.gv2-status { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 99px; background: var(--royal-soft); color: var(--royal); font-size: .74rem; font-weight: 700; margin-left: auto; white-space: nowrap; }

.gv2-stage { position: relative; flex: 1; min-height: 0; display: flex; gap: .75rem; }
.gv2-viewport.tree-viewport { flex: 1; height: auto; min-height: 320px; border-radius: 22px; border: 1px solid var(--panel-border); background: radial-gradient(circle at 50% 0%, rgba(44, 91, 224, .06), transparent 60%), #fafbfc; }
.gv2-viewport.tree-lines { --tl-color: #c9cfdb; }
.gv2-viewport .tree-canvas { left: 0; top: 0; transform-origin: 0 0; transition: none; padding: 1.75rem 1.5rem 3rem; will-change: transform; }
.gv2-loading { display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; color: var(--text-muted); font-size: .86rem; white-space: nowrap; }

.gv2-viewport .tree-node { width: 200px; padding: .7rem .7rem .95rem; border-radius: 18px; background: #fff; border: 1.5px solid var(--panel-border); box-shadow: 0 6px 18px rgba(13, 23, 48, .06); text-align: left; transition: box-shadow .15s ease, border-color .15s ease; }
.gv2-viewport .tree-node:hover { transform: none; box-shadow: 0 10px 26px rgba(13, 23, 48, .12); }
.gv2-viewport .tree-node:focus-visible { outline: 3px solid rgba(44, 91, 224, .35); outline-offset: 2px; }
.gv2-viewport .tree-node.is-paid { background: linear-gradient(180deg, #ddf0e4, #c6e5d1); border-color: rgba(47, 122, 79, .6); }
.gv2-viewport .tree-node.is-unpaid { background: linear-gradient(180deg, #fbe3e0, #f4cbc6); border-color: rgba(192, 57, 43, .55); }
.gv2-viewport .tree-node.is-spillover { border: 2px dashed #e08a3c; }
.gv2-viewport .tree-node.is-self { border: 2px solid var(--gold-500); box-shadow: 0 0 0 4px rgba(201, 154, 46, .16); }
.gv2-viewport .tree-node.is-selected { border: 2px solid var(--royal); box-shadow: 0 0 0 5px rgba(44, 91, 224, .2); }
.gn-head { display: flex; align-items: center; gap: .55rem; }
.gv2-viewport .tree-node .avatar { width: 38px; height: 38px; margin: 0; border-radius: 12px; flex-shrink: 0; font-size: .78rem; font-weight: 800; background: #f1f2f5; color: var(--text-soft); }
.gv2-viewport .tree-node.is-paid .avatar, .gv2-viewport .tree-node.is-self .avatar { background: linear-gradient(135deg, var(--navy-800), var(--royal)); color: var(--gold-300); }
.gv2-viewport .tree-node .n-name { display: block; font-size: .82rem; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gv2-viewport .tree-node .n-id { display: block; font-size: .7rem; font-weight: 600; color: var(--text-muted); }
.gn-tags { display: flex; gap: .25rem; flex-wrap: wrap; margin-top: .45rem; }
.gn-tags .pill { font-size: .62rem; padding: .14rem .5rem; }
.gn-stats { display: flex; gap: .25rem; margin-top: .4rem; }
.gn-stats span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .25rem; padding: .18rem .3rem; border-radius: 8px; background: #f4f5f8; font-size: .66rem; font-weight: 700; color: var(--text-soft); white-space: nowrap; }
.gn-stats i, .gn-stats b { color: var(--royal); font-size: .62rem; }
.gn-wallets { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; margin-top: .35rem; }
.gn-wallets span { display: flex; flex-direction: column; min-width: 0; padding: .2rem .4rem; border-radius: 8px; background: rgba(13, 23, 48, .04); font-size: .66rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn-wallets small { font-size: .56rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.gv2-viewport.is-compact .tree-node { width: 150px; padding-bottom: .85rem; }
.gv2-viewport.is-compact .gn-stats, .gv2-viewport.is-compact .gn-wallets { display: none; }
.gv2-viewport .tree-node .spill-tag { background: #e08a3c; color: #fff; border-radius: 99px; padding: 1px 8px; }
.gv2-viewport .tree-node .slot-badge { background: #fff; border: 1px solid var(--panel-border-strong); color: var(--text-soft); font-weight: 700; }
.gv2-viewport .tree-node .expand-btn { width: 28px; height: 28px; bottom: -14px; padding: 0; background: var(--navy-800); color: var(--gold-300); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(13, 23, 48, .2); }
.gv2-viewport .tree-node .expand-btn .spinner-border { width: .7rem; height: .7rem; border-width: .15em; }
.gv2-viewport .tree-node.tree-slot-empty { width: 200px; min-height: 110px; text-align: center; align-items: center; background: #fff7e6; border: 2px dashed var(--gold-500); color: var(--ink); }
.gv2-viewport.is-compact .tree-node.tree-slot-empty { width: 150px; }
.gv2-viewport .tree-slot-empty .avatar { background: var(--gold-300); color: var(--ink); margin: 0 auto .4rem; }
.gv2-viewport .tree-slot-empty .n-id { color: var(--gold-500); }
.gv2-viewport .tree-canvas.is-gliding { transition: transform .45s cubic-bezier(.22, .8, .3, 1); }
/* Live search match: blink gold until the search box is cleared */
.gv2-viewport .tree-node.is-match { animation: gv2Found .9s ease-in-out infinite; }
/* Searched member: blink gold a few times */
.gv2-viewport .tree-node.is-found { animation: gv2Found .65s ease-in-out 4; }
@keyframes gv2Found {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201, 154, 46, .16); }
  50% { background: linear-gradient(180deg, #fff3c4, #ffd75e); border-color: var(--gold-500); box-shadow: 0 0 0 8px rgba(255, 196, 0, .45), 0 10px 30px rgba(201, 154, 46, .45); }
}
.gv2-viewport .tree-slot-empty.flash { animation: gv2Flash 1.4s ease; }
@keyframes gv2Flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 8px rgba(201, 154, 46, .4); } }

.gv2-slot { position: absolute; left: 12px; top: 12px; z-index: 6; max-width: calc(100% - 24px); display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem .45rem .8rem; border-radius: 14px; background: rgba(255, 255, 255, .94); border: 1px dashed var(--gold-500); font-size: .76rem; box-shadow: 0 6px 18px rgba(13, 23, 48, .08); }
.gv2-slot > i { color: var(--gold-500); }
.gv2-slot button { flex-shrink: 0; height: 28px; padding: 0 .7rem; border: 0; border-radius: 9px; background: var(--navy-800); color: var(--gold-300); font-size: .72rem; font-weight: 700; }
.gv2-legend { position: absolute; left: 12px; bottom: 12px; z-index: 6; display: flex; gap: .7rem; padding: .4rem .7rem; border-radius: 12px; background: rgba(255, 255, 255, .92); border: 1px solid var(--panel-border); font-size: .7rem; font-weight: 600; color: var(--text-soft); }
.gv2-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.gv2-legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.gv2-legend .lg.paid { background: var(--leaf-soft); border: 1.5px solid var(--leaf); }
.gv2-legend .lg.unpaid { background: #fff; border: 1.5px solid #e2a29d; }
.gv2-legend .lg.spill { border: 2px dashed #e08a3c; }
.gv2-legend .lg.slot { background: #fff7e6; border: 2px dashed var(--gold-500); }
.gv2-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: #fff; border: 1px solid var(--panel-border); box-shadow: 0 6px 18px rgba(13, 23, 48, .1); }
.gv2-zoom button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--navy-800); }
.gv2-zoom button:hover { background: #f4f5f8; }
.gv2-zoom .pct { width: auto; min-width: 54px; font-size: .74rem; font-weight: 800; }
.gv2-keys { position: absolute; right: 12px; top: 12px; z-index: 5; font-size: .68rem; color: var(--text-muted); }

.gv2-panel { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; border-radius: 22px; background: #fff; border: 1px solid var(--panel-border); box-shadow: 0 10px 30px rgba(13, 23, 48, .08); overflow: hidden; }
.gv2-panel[hidden] { display: none; }
.gv2-panel-head { display: flex; align-items: center; justify-content: space-between; padding: .75rem .9rem .5rem 1.1rem; font-size: .9rem; position: relative; }
.gv2-handle { display: none; }
.gv2-panel-body { flex: 1; overflow-y: auto; padding: .25rem 1.1rem 1.25rem; }
.gv2-panel .gd-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.gv2-panel .gd-head .net-av { width: 52px; height: 52px; border-radius: 16px; font-size: 1rem; }
.gv2-panel .gd-head .tx-title { font-size: 1.05rem; }
.gv2-actions { display: flex; gap: .4rem; margin-bottom: .8rem; }
.gv2-actions .btn { height: 40px; border-radius: 12px; font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 .85rem; }
.gv2-actions .btn-lux { flex: 1; }
.gv2-note { margin-top: .5rem; padding: .55rem .7rem; border-radius: 12px; background: #f6f7f9; font-size: .74rem; color: var(--text-soft); }
.gv2-sec { margin-top: 1rem; }
.gv2-sec-h { display: flex; align-items: center; gap: .45rem; margin-bottom: .45rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.gv2-sec-h i { color: var(--gold); }
.gv2-wal { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.gv2-wal > div { padding: .55rem .65rem; border-radius: 12px; border: 1px solid var(--panel-border); }
.gv2-wal span { display: block; font-size: .66rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.gv2-wal b { font-size: .95rem; font-weight: 800; }
.gi-row { display: flex; justify-content: space-between; gap: .75rem; padding: .42rem 0; border-bottom: 1px solid var(--panel-border); font-size: .82rem; }
.gi-row:last-child { border-bottom: 0; }
.gi-row small { color: var(--text-muted); font-size: .7rem; }
.gi-row b { white-space: nowrap; }
.gi-row.total { border-top: 2px solid var(--gold-300); margin-top: .2rem; font-weight: 700; }
.gi-row.total b { color: var(--gold-500); font-size: .95rem; }

@media (max-width: 991.98px) {
  .app-content.gv2-app { padding: .7rem; gap: .55rem; }
  .gv2-bar { flex-wrap: wrap; }
  .gv2-search { width: 100%; order: 3; }
  .gv2-stat { flex-basis: 118px; padding: .5rem .7rem; }
  .gv2-stat b { font-size: 1.1rem; }
  .gv2-crumbs { order: 5; flex-basis: 100%; }
  .gv2-legend { display: none; }
  .gv2-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1070; width: auto; max-height: 78vh; border-radius: 24px 24px 0 0; box-shadow: 0 -16px 40px rgba(13, 23, 48, .2); padding-bottom: env(safe-area-inset-bottom, 0px); animation: gv2Up .25s cubic-bezier(.2, .8, .2, 1); }
  .gv2-handle { display: block; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 99px; background: #dde0e6; }
  .gv2-panel-head { padding-top: 1rem; }
}
@keyframes gv2Up { from { transform: translateY(100%); } to { transform: none; } }

/* =========================================================================
   Admin › Members list
   ========================================================================= */
.mb-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.mb-page .kpi.is-on { box-shadow: 0 0 0 3px rgba(19, 34, 71, .18); border-color: var(--navy-800) !important; }
.mb-card { padding: 1.1rem; }
.mb-filters { display: flex; gap: .5rem; align-items: center; }
.mb-filters .net-search { flex: 1; }
.mb-filters .net-search input { height: 44px; }
.mb-select { width: auto; height: 44px; border-radius: 99px; font-size: .85rem; font-weight: 600; padding-left: 1rem; border-color: var(--panel-border); }
.mb-btn { height: 44px; border-radius: 99px; padding: 0 1.1rem; display: inline-flex; align-items: center; flex-shrink: 0; }
.mb-sub { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: .9rem 0 .6rem; }
.mb-sub .w-filter a { flex-shrink: 0; display: inline-flex; align-items: center; height: 34px; padding: 0 .9rem; border-radius: 99px; border: 1px solid var(--panel-border); background: #fff; color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.mb-sub .w-filter a.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }

.mb-head, .mb-row { display: grid; grid-template-columns: minmax(220px, 2.2fr) 1fr 1.3fr 1.1fr .9fr .8fr auto; align-items: center; gap: .9rem; }
.mb-head { padding: .55rem .8rem; border-radius: 12px; background: #f6f7f9; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.mb-list { list-style: none; margin: 0; padding: 0; }
.mb-row { padding: .7rem .8rem; border-bottom: 1px solid var(--panel-border); border-radius: 14px; transition: background .12s ease; }
.mb-row:hover { background: #fafbfc; }
.mb-row.is-restricted { background: #fff8f7; }
.mb-who { display: flex; align-items: center; gap: .7rem; min-width: 0; color: var(--ink); }
.mb-who:hover .tx-title { color: var(--royal); }
.mb-cell { min-width: 0; font-size: .84rem; }
.mb-mobile a { color: var(--ink); font-weight: 600; }
.mb-sp { display: block; min-width: 0; color: var(--ink); }
.mb-sp b { display: block; font-size: .8rem; }
.mb-sp small { display: block; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-sp:hover b { color: var(--royal); }
.mb-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.mb-tags .pill { font-size: .68rem; }
.mb-team { text-align: center; }
.mb-team b { display: block; font-size: 1rem; font-weight: 800; color: var(--ink); }
.mb-team small { display: block; font-size: .66rem; color: var(--text-muted); white-space: nowrap; }
.mb-date { color: var(--text-soft); white-space: nowrap; }
.mb-actions { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.mb-actions .btn { height: 34px; border-radius: 10px; display: inline-flex; align-items: center; }
.mb-more { width: 34px; height: 34px; border: 1px solid var(--panel-border); border-radius: 10px; background: #fff; color: var(--text-soft); }
.mb-more:hover, .mb-more[aria-expanded="true"] { color: var(--ink); border-color: var(--panel-border-strong); }
.mb-menu { min-width: 210px; padding: .35rem; border: 1px solid var(--panel-border); border-radius: 16px; box-shadow: 0 16px 40px rgba(13, 23, 48, .16); }
.mb-menu a, .mb-menu button { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 0; border-radius: 10px; background: none; color: var(--ink); font-size: .84rem; font-weight: 600; text-align: left; }
.mb-menu a i, .mb-menu button i { width: 16px; text-align: center; color: var(--text-muted); }
.mb-menu a:hover, .mb-menu button:hover { background: #f4f5f8; color: var(--ink); }
.mb-menu .danger, .mb-menu .danger i { color: var(--danger); }
.mb-menu .danger:hover { background: #fdecea; }
.mb-menu-sep { height: 1px; margin: .3rem .2rem; background: var(--panel-border); }
.mb-pages { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; }
.mb-pages a, .mb-pages .gap { min-width: 36px; height: 36px; padding: 0 .5rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: var(--text-soft); border: 1px solid var(--panel-border); background: #fff; }
.mb-pages a.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }
.mb-pages .gap { border: 0; background: none; min-width: 16px; }

@media (max-width: 1199.98px) {
  .mb-head, .mb-row { grid-template-columns: minmax(200px, 2fr) 1.2fr 1fr .8fr auto; }
  .mb-head span:nth-child(2), .mb-row .mb-mobile, .mb-head span:nth-child(6), .mb-row .mb-date { display: none; }
}
@media (max-width: 767.98px) {
  .mb-tiles { grid-template-columns: repeat(2, 1fr); gap: .55rem; }
  .mb-card { padding: .85rem; }
  .mb-filters { flex-wrap: wrap; }
  .mb-filters .net-search { flex: 1 1 100%; }
  .mb-select { flex: 1; }
  .mb-head { display: none; }
  .mb-list { display: grid; gap: .6rem; }
  .mb-row { grid-template-columns: 1fr 1fr; gap: .55rem .75rem; padding: .85rem; border: 1px solid var(--panel-border); background: #fff; }
  .mb-row:hover { background: #fff; }
  .mb-who { grid-column: 1 / -1; }
  .mb-row .mb-mobile, .mb-row .mb-date { display: block; }
  .mb-cell[data-k]::before { content: attr(data-k); display: block; font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .15rem; }
  .mb-tags[data-k]::before { flex-basis: 100%; margin-bottom: 0; }
  .mb-team { text-align: left; }
  .mb-actions { grid-column: 1 / -1; padding-top: .55rem; border-top: 1px dashed var(--panel-border); }
  .mb-actions > .btn { flex: 1; justify-content: center; }
}
/* Admin › Members: "Login as member" column + phone-sized popup */
.mb-page.has-login .mb-head, .mb-page.has-login .mb-row { grid-template-columns: minmax(220px, 2.2fr) 1fr 1.3fr 1.1fr .9fr .8fr auto auto; }
.mb-login { text-align: center; }
.mb-login .btn { height: 34px; border-radius: 10px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width: 1199.98px) {
  .mb-page.has-login .mb-head, .mb-page.has-login .mb-row { grid-template-columns: minmax(200px, 2fr) 1.2fr 1fr .8fr auto auto; }
}
@media (max-width: 767.98px) {
  .mb-page.has-login .mb-row { grid-template-columns: 1fr 1fr; }
  .mb-login { text-align: left; }
}
.la-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(8, 14, 30, .62); backdrop-filter: blur(3px); }
.la-overlay[hidden] { display: none; }
.la-phone { width: 390px; max-width: 100%; height: min(844px, calc(100vh - 2rem)); display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: #0d1730; border: 6px solid #0d1730; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.la-bar { display: flex; align-items: center; gap: .3rem; padding: .35rem .45rem .45rem .7rem; color: #fff; }
.la-title { flex: 1; min-width: 0; font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gold-300); }
.la-btn { width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .85rem; }
.la-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.la-phone iframe { flex: 1; width: 100%; border: 0; border-radius: 22px; background: #fff; }
@media (max-width: 575.98px) {
  .la-overlay { padding: 0; }
  .la-phone { width: 100%; height: 100%; border-radius: 0; border-width: 0; }
  .la-phone iframe { border-radius: 0; }
}
.mb-note { display: inline-flex; align-items: center; height: 34px; padding: 0 .8rem; border-radius: 99px; background: #fdecea; color: var(--danger); font-size: .74rem; font-weight: 700; white-space: nowrap; }

/* =========================================================================
   Admin › Member detail
   ========================================================================= */
.mv-back { display: inline-flex; align-items: center; margin-bottom: .75rem; font-size: .82rem; font-weight: 700; color: var(--text-soft); }
.mv-back:hover { color: var(--royal); }
.mv-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mv-hero .dash-meta { margin-top: .35rem; }
.mv-hero-actions { display: flex; align-items: center; gap: .45rem; }
.mv-ic { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.mv-ic:hover { background: rgba(255, 255, 255, .22); color: var(--gold-300); }
.mv-hero .btn-lux { height: 44px !important; border-radius: 14px; padding: 0 1.1rem; }
.mv-split { grid-template-columns: repeat(4, 1fr); }
.mv-page .ref-page .wallet-split > div:nth-child(4), .mv-split > div:nth-child(4) { border-top: 3px solid #f0a5a0; }
.mv-page .kpi .num small { font-size: .75em; color: var(--text-muted); font-weight: 700; }
.mv-people { display: grid; gap: .75rem; }
.mv-person .lbl { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .35rem; }
.mv-person > a { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 14px; background: #f6f7f9; color: var(--ink); }
.mv-person > a:hover { background: var(--royal-soft); color: var(--ink); }
.mv-person > a .net-av { width: 36px; height: 36px; border-radius: 11px; font-size: .78rem; }
.mv-person b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-person small { display: block; font-size: .72rem; color: var(--text-muted); }
.mv-person > a > i { margin-left: auto; font-size: .7rem; color: var(--text-muted); }
.mv-sibs { display: flex; flex-wrap: wrap; gap: .35rem; }
.mv-sibs a { padding: .3rem .65rem; border-radius: 99px; background: var(--royal-soft); color: var(--royal); font-size: .76rem; font-weight: 700; }
.mv-sibs a.off { background: #f1f2f5; color: var(--text-muted); text-decoration: line-through; }
.mv-wallets { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.mv-wallets > div { padding: .6rem .65rem; border-radius: 14px; border: 1px solid var(--panel-border); min-width: 0; }
.mv-wallets .w-main { grid-column: 1 / -1; background: linear-gradient(160deg, #fff 40%, var(--gold-50)); border-color: rgba(201, 154, 46, .3); }
.mv-wallets span { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.mv-wallets b { display: block; font-size: .95rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-wallets .w-main b { font-size: 1.35rem; }
.mv-wallets small { display: block; font-size: .72rem; color: var(--text-muted); }
.mv-kyc { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--panel-border); }
.mv-kyc .ic { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fdf2e0; color: var(--warn); }
.mv-kyc .ic.ok { background: var(--leaf-soft); color: var(--leaf); }
.mv-kyc .ic.bad { background: #fdecea; color: var(--danger); }
.mv-kyc b { display: block; font-size: .86rem; }
.mv-kyc small { display: block; font-size: .74rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-tabs.seg { display: flex; max-width: none; margin-bottom: 1rem; background: #f4f5f8; box-shadow: none; overflow-x: auto; scrollbar-width: none; }
.mv-tabs .seg-btn { flex: 1 0 auto; height: 40px; padding: 0 .9rem; gap: .45rem; border-radius: 12px; font-size: .84rem; }
.mv-tabs .seg-btn.active { background: var(--navy-800); color: #fff; }
.mv-tabs .seg-btn.active .net-count { background: rgba(255, 255, 255, .18); color: #fff; }
.mv-all { display: inline-flex; align-items: center; gap: .35rem; margin-top: .75rem; font-size: .8rem; font-weight: 700; color: var(--navy-700); }
.mv-all i { font-size: .65rem; }
.mv-activity .tx-list .pill { display: inline-flex; margin-top: 2px; }
.mv-danger { margin-top: 1rem; }
.mv-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.mv-controls form { margin: 0; }
.mv-ctl { width: 100%; display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 16px; border: 1.5px solid var(--panel-border); background: #fff; text-align: left; color: var(--ink); }
.mv-ctl > i { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.mv-ctl b { display: block; font-size: .88rem; }
.mv-ctl small { display: block; font-size: .74rem; color: var(--text-muted); }
.mv-ctl.warn > i { background: #fdf2e0; color: var(--warn); }
.mv-ctl.warn:hover { border-color: rgba(201, 154, 46, .5); }
.mv-ctl.bad > i { background: #fdecea; color: var(--danger); }
.mv-ctl.bad:hover { border-color: rgba(209, 69, 59, .45); }
.mv-ctl.ok > i { background: var(--leaf-soft); color: var(--leaf); }
.mv-ctl.ok:hover { border-color: rgba(47, 122, 79, .45); }
@media (max-width: 767.98px) {
  .mv-split { grid-template-columns: repeat(2, 1fr); }
  .mv-hero-actions { width: 100%; }
  .mv-hero-actions .btn-lux { flex: 1; }
}

/* =========================================================================
   Admin › Edit member
   ========================================================================= */
.me-sec { margin-bottom: 1rem; }
.me-sec-h { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.1rem; }
.me-sec-h .ic { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.me-sec-h .ic.royal { background: var(--royal-soft); color: var(--royal); }
.me-sec-h .ic.gold { background: var(--gold-50); color: var(--gold-500); }
.me-sec-h .ic.leaf { background: var(--leaf-soft); color: var(--leaf); }
.me-sec-h h2 { font-size: 1rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.me-sec-h small { display: block; font-size: .78rem; color: var(--text-muted); }
.me-page .m-card-head h2::before { display: none; }
.me-page .m-form .form-control.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(209, 69, 59, .12); background-image: none; }
.me-err { margin-top: .35rem; font-size: .76rem; font-weight: 600; color: var(--danger); }
.me-prefix { display: flex; align-items: stretch; }
.me-prefix span { display: flex; align-items: center; padding: 0 .85rem; border: 1.5px solid var(--panel-border-strong); border-right: 0; border-radius: 14px 0 0 14px; background: #f6f7f9; font-size: .88rem; font-weight: 700; color: var(--text-soft); }
.me-prefix .form-control { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.me-warn { display: flex; gap: .55rem; margin-top: .5rem; padding: .6rem .75rem; border-radius: 12px; background: #fdf2e0; color: #8a5a00; font-size: .76rem; line-height: 1.45; }
.me-warn i { margin-top: .15rem; }
.me-pass { display: flex; gap: .5rem; }
.me-pass .btn { height: 48px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; }
.me-choice { display: flex; flex-wrap: wrap; gap: .4rem; }
.me-choice label { margin: 0; cursor: pointer; }
.me-choice input { position: absolute; opacity: 0; pointer-events: none; }
.me-choice span { display: inline-flex; align-items: center; height: 48px; padding: 0 1rem; border-radius: 14px; border: 1.5px solid var(--panel-border-strong); background: #fff; font-size: .86rem; font-weight: 700; color: var(--text-soft); }
.me-choice input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }
.me-choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(201, 154, 46, .2); }
.me-side { position: sticky; top: 84px; }
.me-who { margin-bottom: .75rem; }
.me-av { width: 52px !important; height: 52px !important; border-radius: 16px !important; font-size: 1rem !important; }
.me-changes { list-style: none; margin: .9rem 0 0; padding: .75rem 0 0; border-top: 1px dashed var(--panel-border); display: grid; gap: .35rem; }
.me-changes li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--text-soft); }
.me-changes i { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-50); color: var(--gold-500); font-size: .6rem; }
.me-actions { display: grid; gap: .5rem; }
.me-savebar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 1050; display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .5rem 1rem; border-radius: 18px; background: var(--navy-800); color: #fff; font-size: .84rem; box-shadow: 0 16px 40px rgba(13, 23, 48, .35); animation: gv2Up .25s ease; }
.me-savebar i { color: var(--gold-300); font-size: .6rem; }
.me-savebar .btn { height: 38px; border-radius: 12px; padding: 0 1rem; display: inline-flex; align-items: center; }
.me-savebar .btn-outline-gold { color: #fff; border-color: rgba(255, 255, 255, .3); background: transparent; }
@media (max-width: 991.98px) {
  .me-side { position: static; }
  .me-savebar { left: 12px; right: 12px; transform: none; bottom: calc(var(--tabbar-h, 64px) + 22px + env(safe-area-inset-bottom, 0px)); }
  .me-savebar > span { margin-right: auto; }
}
@media (max-width: 575.98px) {
  .me-pass { flex-direction: column; }
  .me-choice label { flex: 1 1 calc(50% - .4rem); }
  .me-choice span { width: 100%; justify-content: center; }
}

/* =========================================================================
   Admin › Orders list
   ========================================================================= */
.ao-tabs { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .25rem; margin-bottom: 1rem; scrollbar-width: none; }
.ao-tabs::-webkit-scrollbar { display: none; }
.ao-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: .5rem; height: 46px; padding: 0 .9rem; border-radius: 16px; background: #fff; border: 1px solid var(--panel-border); color: var(--text-soft); font-size: .84rem; font-weight: 700; }
.ao-tab i { font-size: .82rem; color: var(--text-muted); }
.ao-tab b { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; background: #f1f2f5; color: var(--text-soft); }
.ao-tab:hover { color: var(--ink); border-color: var(--panel-border-strong); }
.ao-tab.hot b { background: var(--gold-500); color: #fff; }
.ao-tab.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; box-shadow: 0 8px 20px rgba(19, 34, 71, .22); }
.ao-tab.active i { color: var(--gold-300); }
.ao-tab.active b { background: rgba(255, 255, 255, .18); color: #fff; }
.ao-card { padding: 1.1rem; }
.ao-list { display: grid; gap: .5rem; }
.ao-row { display: grid; grid-template-columns: minmax(240px, 2.2fr) minmax(150px, 1.2fr) minmax(160px, 1.3fr) auto auto; align-items: center; gap: 1rem; padding: .75rem .85rem; border-radius: 16px; border: 1px solid var(--panel-border); background: #fff; transition: border-color .12s ease, box-shadow .12s ease; }
.ao-row:hover { border-color: var(--panel-border-strong); box-shadow: 0 6px 18px rgba(13, 23, 48, .05); }
.ao-row.s-paid { border-left: 4px solid var(--gold-500); }
.ao-row.s-processing { border-left: 4px solid var(--royal); }
.ao-row.s-shipped { border-left: 4px solid #7fb2ff; }
.ao-row.s-cancelled, .ao-row.s-refunded { opacity: .75; }
.ao-main { display: flex; align-items: center; gap: .75rem; min-width: 0; color: var(--ink); }
.ao-main:hover .tx-title { color: var(--royal); }
.ao-main .track-img { width: 48px; height: 48px; border-radius: 13px; }
.ao-buyer { min-width: 0; color: var(--ink); }
.ao-buyer b { display: block; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-buyer small { display: block; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-buyer:hover b { color: var(--royal); }
.ao-ship { min-width: 0; }
.ao-trk, .ao-addr { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ao-trk > i { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--royal-soft); color: var(--royal); font-size: .75rem; }
.ao-trk b { display: block; font-size: .8rem; }
.ao-trk small { display: block; font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-addr i { color: var(--text-muted); font-size: .8rem; }
.ao-addr small { font-size: .74rem; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ao-amt { text-align: right; white-space: nowrap; }
.ao-amt b { display: block; font-size: .95rem; font-weight: 800; margin-bottom: .2rem; }
.ao-amt .pill { font-size: .66rem; }
.ao-act { display: flex; gap: .35rem; justify-content: flex-end; }
.ao-act .btn { height: 34px; border-radius: 10px; display: inline-flex; align-items: center; white-space: nowrap; }
.ao-shipform { grid-column: 1 / -1; padding: .85rem; border-radius: 14px; background: #f6f7f9; }
.ao-shipform[hidden] { display: none; }
.ao-steps { display: flex; gap: .4rem; margin-bottom: .6rem; flex-wrap: wrap; }
.ao-steps label { margin: 0; cursor: pointer; }
.ao-steps input { position: absolute; opacity: 0; pointer-events: none; }
.ao-steps span { display: inline-flex; align-items: center; height: 36px; padding: 0 .9rem; border-radius: 11px; border: 1.5px solid var(--panel-border-strong); background: #fff; font-size: .8rem; font-weight: 700; color: var(--text-soft); }
.ao-steps input:checked + span { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }
.ao-fields { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: .45rem; }
.ao-fields .form-control { height: 42px; border-radius: 12px; font-size: .86rem; }
.ao-fields .form-control.is-invalid { border-color: var(--danger); background-image: none; }
.ao-formfoot { display: flex; align-items: center; gap: .45rem; margin-top: .6rem; }
.ao-formfoot small { margin-right: auto; font-size: .74rem; }
.ao-formfoot .btn { height: 36px; border-radius: 10px; }

@media (max-width: 1199.98px) {
  .ao-row { grid-template-columns: minmax(220px, 2fr) minmax(140px, 1.2fr) auto auto; }
  .ao-ship { display: none; }
}
@media (max-width: 767.98px) {
  .ao-card { padding: .85rem; }
  .ao-row { grid-template-columns: 1fr auto; gap: .55rem .75rem; padding: .8rem; }
  .ao-main { grid-column: 1 / -1; }
  .ao-ship { display: block; grid-column: 1 / -1; }
  .ao-buyer { grid-column: 1; }
  .ao-amt { grid-column: 2; grid-row: 2; }
  .ao-act { grid-column: 1 / -1; padding-top: .55rem; border-top: 1px dashed var(--panel-border); }
  .ao-act .btn { flex: 1; justify-content: center; }
  .ao-fields { grid-template-columns: 1fr; }
  .ao-formfoot { flex-wrap: wrap; }
  .ao-formfoot small { flex-basis: 100%; }
  .ao-formfoot .btn { flex: 1; }
}

/* =========================================================================
   Admin page kit (shared by the redesigned admin screens: .adm-page)
   ========================================================================= */
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.adm-head h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; margin: 0; display: flex; align-items: center; gap: .6rem; }
.adm-head h1 .ic { width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--navy-800); color: var(--gold-300); font-size: .95rem; }
.adm-head p { margin: .3rem 0 0; font-size: .84rem; color: var(--text-muted); }
.adm-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.adm-actions .btn { height: 42px; border-radius: 13px; padding: 0 1rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.adm-page .kpi.is-on { box-shadow: 0 0 0 3px rgba(19, 34, 71, .18); border-color: var(--navy-800) !important; }
.adm-card { padding: 1.1rem; margin-bottom: 1rem; }
.adm-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.adm-toolbar .net-search { flex: 1 1 240px; }
.adm-toolbar .net-search input { height: 44px; }
.adm-toolbar .form-control, .adm-toolbar .form-select { height: 44px; border-radius: 99px; font-size: .85rem; border-color: var(--panel-border); width: auto; }
.adm-toolbar .btn { height: 44px; border-radius: 99px; padding: 0 1.1rem; display: inline-flex; align-items: center; gap: .35rem; }
.adm-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; font-size: .8rem; color: var(--text-muted); }

/* Tables */
.adm-page .table-glass { width: 100%; border-collapse: separate; border-spacing: 0; }
.adm-page .table-glass thead th { padding: .6rem .8rem; background: #f6f7f9; border: 0; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.adm-page .table-glass thead th:first-child { border-radius: 12px 0 0 12px; }
.adm-page .table-glass thead th:last-child { border-radius: 0 12px 12px 0; }
.adm-page .table-glass tbody td { padding: .75rem .8rem; border-bottom: 1px solid var(--panel-border); font-size: .86rem; vertical-align: middle; }
.adm-page .table-glass tbody tr:last-child td { border-bottom: 0; }
.adm-page .table-glass tbody tr:hover td { background: #fafbfc; }
.adm-page .table-glass .pill { font-size: .7rem; }
.adm-who { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--ink); }
.adm-who .net-av { width: 36px; height: 36px; border-radius: 11px; font-size: .72rem; }
.adm-who b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-who small { display: block; font-size: .72rem; color: var(--text-muted); }
a.adm-who:hover b { color: var(--royal); }
.adm-num { font-weight: 800; white-space: nowrap; }
.adm-num.in { color: var(--leaf); }
.adm-num.out { color: var(--danger); }
.adm-sub { display: block; font-size: .72rem; color: var(--text-muted); }
.adm-btns { display: flex; gap: .35rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.adm-btns form { margin: 0; }
.adm-btns .btn { height: 34px; border-radius: 10px; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .8rem; }
.adm-empty { padding: 2.5rem 1rem !important; text-align: center; color: var(--text-muted); }
.adm-empty i { display: block; font-size: 1.6rem; margin-bottom: .5rem; opacity: .5; }
.adm-pager { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--panel-border); }
.adm-pager .btn { height: 38px; border-radius: 11px; }

@media (max-width: 991.98px) {
  .adm-page .table-glass.table-stack thead { display: none; }
  .adm-page .table-glass.table-stack tbody tr { display: block; margin-bottom: .6rem; padding: .7rem .85rem; border: 1px solid var(--panel-border); border-radius: 16px; background: #fff; }
  .adm-page .table-glass.table-stack tbody tr:hover td { background: none; }
  .adm-page .table-glass.table-stack tbody td { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .4rem 0; border-bottom: 1px dashed var(--panel-border); text-align: right; }
  .adm-page .table-glass.table-stack tbody td:last-child { border-bottom: 0; }
  .adm-page .table-glass.table-stack tbody td.cell-title { display: block; text-align: left; padding-bottom: .55rem; }
  .adm-page .table-glass.table-stack tbody td.cell-title::before { display: none; }
  .adm-page .table-glass.table-stack tbody td[colspan] { display: block; text-align: center; border: 0; }
  .adm-page .adm-btns { justify-content: flex-end; }
}
@media (max-width: 575.98px) {
  .adm-head h1 { font-size: 1.15rem; }
  .adm-actions { width: 100%; }
  .adm-actions .btn { flex: 1; justify-content: center; }
}

/* Admin › Plans */
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.ap-card { display: flex; flex-direction: column; gap: .4rem; padding: 1.15rem; border-radius: 22px; border: 1px solid var(--panel-border); background: linear-gradient(160deg, #fff 45%, var(--tint, #f6f7f9)); }
.ap-card.t0 { --tint: var(--gold-50); } .ap-card.t1 { --tint: var(--royal-soft); } .ap-card.t2 { --tint: var(--leaf-soft); } .ap-card.t3 { --tint: #f3ecfb; }
.ap-card.is-off { opacity: .7; background: #fafbfc; }
.ap-holders { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-soft); }
.ap-holders i { color: var(--royal); }
.ap-specs { margin: .4rem 0 .6rem; padding: .6rem .75rem; border-radius: 14px; background: rgba(255, 255, 255, .75); border: 1px solid var(--panel-border); }
.ap-specs > div { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; font-size: .8rem; }
.ap-specs dt { font-weight: 600; color: var(--text-muted); }
.ap-specs dd { margin: 0; font-weight: 700; text-align: right; }
.ap-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: auto; }
.ap-btns form { margin: 0; }
.ap-btns .btn { height: 40px; border-radius: 12px; width: 100%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.ap-preview .plan-feats { margin-bottom: 0; }
.ap-page .plan-name, .adm-page .plan-name { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-soft); }
.adm-page .plan-price { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.adm-page .plan-feats { list-style: none; padding: 0; margin: .2rem 0 .6rem; display: grid; gap: .35rem; }
.adm-page .plan-feats li { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-soft); }
.adm-page .plan-feats i { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; background: #fff; color: var(--gold-500); box-shadow: 0 2px 6px rgba(13, 23, 48, .08); }
.me-suffix span { order: 2; border: 1.5px solid var(--panel-border-strong); border-left: 0; border-radius: 0 14px 14px 0; }
.me-suffix .form-control { border-radius: 14px 0 0 14px !important; }

.adm-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 .8rem; border-radius: 99px; border: 1px solid var(--panel-border); background: #fff; color: var(--text-soft); font-size: .76rem; font-weight: 700; flex-shrink: 0; }
.adm-chip:hover { color: var(--ink); border-color: var(--panel-border-strong); }
.adm-chip.active { background: var(--navy-800); border-color: var(--navy-800); color: var(--gold-300); }

/* Admin › Payments verification queue */
.ay-list { display: grid; gap: .55rem; }
.ay-row { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(170px, 1.2fr) minmax(150px, 1fr) auto auto; align-items: center; gap: 1rem; padding: .8rem .9rem; border-radius: 16px; border: 1px solid var(--panel-border); border-left: 4px solid var(--gold-500); background: #fff; }
.ay-amt { display: block; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.ay-ref { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; margin-top: 2px; padding: .15rem .5rem; border-radius: 8px; background: #f4f5f8; font-size: .72rem; font-weight: 700; color: var(--text-soft); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ay-ref.copied { background: var(--leaf-soft); color: var(--leaf); }
.ay-order { min-width: 0; color: var(--ink); }
.ay-order b { display: block; font-size: .84rem; }
.ay-order small { display: block; font-size: .72rem; color: var(--text-muted); }
.ay-order:hover b { color: var(--royal); }
.ay-when { font-size: .76rem; color: var(--text-muted); white-space: nowrap; }
.ay-row .adm-btns .btn { height: 38px; border-radius: 11px; padding: 0 .9rem; font-weight: 700; }
@media (max-width: 1199.98px) {
  .ay-row { grid-template-columns: 1fr 1fr; gap: .6rem .9rem; }
  .ay-main, .ay-row .adm-btns { grid-column: 1 / -1; }
  .ay-row .adm-btns { justify-content: stretch; padding-top: .6rem; border-top: 1px dashed var(--panel-border); }
  .ay-row .adm-btns form { flex: 1; }
  .ay-row .adm-btns .btn { width: 100%; justify-content: center; }
}

/* Admin › Wallets */
.aw-mini { display: flex; gap: .3rem; flex-wrap: wrap; }
.aw-mini span { padding: .15rem .45rem; border-radius: 7px; background: #f4f5f8; font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.aw-mini b { color: var(--ink); font-weight: 700; }
.adm-page .kpi .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Admin › Reports */
.ar-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.ar-type { display: flex; align-items: center; gap: .55rem; padding: .65rem .75rem; border-radius: 14px; background: #fff; border: 1px solid var(--panel-border); color: var(--text-soft); font-size: .82rem; font-weight: 700; }
.ar-type i { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #f4f5f8; color: var(--royal); font-size: .78rem; }
.ar-type:hover { color: var(--ink); border-color: var(--panel-border-strong); }
.ar-type.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; box-shadow: 0 8px 20px rgba(19, 34, 71, .2); }
.ar-type.active i { background: rgba(255, 255, 255, .14); color: var(--gold-300); }
.ar-sums { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ar-sums > div { padding: .5rem .8rem; border-radius: 12px; background: var(--gold-50); border: 1px solid rgba(201, 154, 46, .25); }
.ar-sums span { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.ar-sums b { font-size: 1rem; font-weight: 800; }
.ar-scroll { overflow-x: auto; }
.ar-scroll .table-glass td { white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.ar-more { margin-top: .8rem; padding: .6rem .8rem; border-radius: 12px; background: var(--royal-soft); color: var(--royal); font-size: .8rem; }
@media (max-width: 575.98px) { .ar-types { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 991.98px) { .ar-scroll .table-glass td { max-width: none; white-space: normal; } }

/* Admin › Announcements */
.an-aud { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.an-aud label { margin: 0; cursor: pointer; }
.an-aud input { position: absolute; opacity: 0; pointer-events: none; }
.an-aud span { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .7rem .75rem; border-radius: 14px; border: 1.5px solid var(--panel-border-strong); background: #fff; }
.an-aud i { color: var(--royal); margin-bottom: .2rem; }
.an-aud b { font-size: .84rem; }
.an-aud small { font-size: .7rem; color: var(--text-muted); line-height: 1.3; }
.an-aud input:checked + span { border-color: var(--navy-800); background: var(--royal-soft); box-shadow: 0 0 0 3px rgba(19, 34, 71, .12); }
.an-aud input:focus-visible + span { box-shadow: 0 0 0 4px rgba(201, 154, 46, .25); }
.adm-page textarea.form-control.an-msg { height: auto; min-height: 120px; padding-top: .7rem; }
.an-preview { padding: .4rem .9rem; border-radius: 16px; background: #f6f7f9; }
.an-preview .notif { margin: 0; }
.an-sent .tx-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 575.98px) { .an-aud { grid-template-columns: 1fr; } }

/* Admin › Email */
.em-tabs { display: inline-flex; gap: 3px; padding: 4px; margin-bottom: 1rem; border-radius: 16px; background: #fff; border: 1px solid var(--panel-border); }
.em-tabs a { display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 1rem; border-radius: 12px; color: var(--text-soft); font-size: .84rem; font-weight: 700; }
.em-tabs a:hover { color: var(--ink); background: #f4f5f8; }
.em-tabs a.active { background: var(--navy-800); color: #fff; }
.em-tabs a.active i { color: var(--gold-300); }
.em-card { padding: .9rem; }
.em-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; flex-wrap: wrap; }
.em-bar .net-search { flex: 1 1 260px; max-width: 420px; }
.em-list { list-style: none; margin: 0; padding: 0; }
.em-row { display: flex; align-items: center; gap: .25rem; border-radius: 14px; }
.em-row + .em-row { border-top: 1px solid var(--panel-border); }
.em-row:hover { background: #fafbfc; }
.em-link { flex: 1; min-width: 0; display: grid; grid-template-columns: 36px minmax(140px, 220px) 1fr auto; align-items: center; gap: .85rem; padding: .7rem .6rem; color: var(--text-soft); }
.em-link .net-av { width: 36px; height: 36px; border-radius: 11px; font-size: .78rem; }
.em-from { font-size: .86rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-subj { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-when { font-size: .76rem; color: var(--text-muted); white-space: nowrap; }
.em-row.unread { background: var(--royal-soft); }
.em-row.unread .em-from, .em-row.unread .em-subj { font-weight: 800; color: var(--ink); }
.em-row.unread .em-when { color: var(--royal); font-weight: 700; }
.em-del { width: 34px; height: 34px; flex-shrink: 0; margin-right: .3rem; border: 0; border-radius: 10px; background: none; color: var(--text-muted); opacity: 0; transition: opacity .12s ease; }
.em-row:hover .em-del, .em-del:focus-visible { opacity: 1; }
.em-del:hover { background: #fdecea; color: var(--danger); }
.em-read-head { padding: 1.25rem 1.4rem; border-bottom: 1px solid var(--panel-border); }
.em-read-subj { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .9rem; overflow-wrap: anywhere; }
.em-read-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.em-read-meta .net-av { width: 42px; height: 42px; border-radius: 13px; }
.em-read-from { font-size: .9rem; overflow-wrap: anywhere; }
.em-read-act { display: flex; gap: .4rem; }
.em-read-act .btn { height: 38px; border-radius: 11px; display: inline-flex; align-items: center; }
.em-send { height: 42px; border-radius: 12px; display: inline-flex; align-items: center; padding: 0 1.1rem; }
.em-page .compose-header { padding: 14px 20px; }
@media (max-width: 767.98px) {
  .em-link { grid-template-columns: 36px 1fr auto; grid-template-rows: auto auto; gap: .1rem .7rem; }
  .em-link .net-av { grid-row: span 2; }
  .em-from { grid-column: 2; }
  .em-when { grid-column: 3; grid-row: 1; }
  .em-subj { grid-column: 2 / 4; font-size: .8rem; }
  .em-del { opacity: 1; }
  .em-read-act { width: 100%; }
  .em-read-act .btn, .em-read-act form { flex: 1; }
  .em-read-act form .btn { width: 100%; justify-content: center; }
}

/* Admin › Settings */
.st-layout { display: grid; grid-template-columns: 230px 1fr; gap: 1rem; align-items: start; }
.st-nav { position: sticky; top: 84px; display: grid; gap: .25rem; padding: .5rem; border-radius: 20px; background: #fff; border: 1px solid var(--panel-border); }
.st-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: 12px; color: var(--text-soft); font-size: .84rem; font-weight: 700; }
.st-nav a i { width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #f4f5f8; font-size: .75rem; color: var(--royal); }
.st-nav a.warn i { color: var(--danger); }
.st-nav a:hover { background: #f6f7f9; color: var(--ink); }
.st-nav a.active { background: var(--navy-800); color: #fff; }
.st-nav a.active i { background: rgba(255, 255, 255, .14); color: var(--gold-300); }
.st-save-side { height: 46px; border-radius: 13px; align-items: center; justify-content: center; }
.st-body .me-sec { scroll-margin-top: 90px; }
.st-page .ic.st-red { background: #fdecea; color: var(--danger); }
.st-danger { border-color: rgba(209, 69, 59, .35); background: linear-gradient(180deg, #fff 70%, #fff8f7); }
.st-ta { height: auto !important; min-height: 90px; padding-top: .7rem; }
.st-logo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.st-logo-prev { width: 200px; height: 72px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: .5rem; border-radius: 16px; border: 1.5px dashed var(--panel-border-strong); background: repeating-conic-gradient(#f3f4f7 0% 25%, #fff 0% 50%) 50% / 14px 14px; }
.st-logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-logo-prev span { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; background: #fff; padding: .2rem .5rem; border-radius: 8px; }
.st-file { height: 42px; border-radius: 12px; display: inline-flex; align-items: center; cursor: pointer; margin: 0; max-width: 100%; }
.st-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.st-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; color: var(--danger); cursor: pointer; }
.st-example { display: flex; align-items: center; height: 48px; padding: 0 1rem; border-radius: 14px; background: #f6f7f9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 1rem; color: var(--navy-800); letter-spacing: .04em; }
.st-switch { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border-radius: 16px; border: 1.5px solid var(--panel-border); background: #fff; cursor: pointer; margin: 0; }
.st-switch input { position: absolute; opacity: 0; pointer-events: none; }
.st-switch .sw { position: relative; width: 46px; height: 26px; flex-shrink: 0; border-radius: 99px; background: #d9dce3; transition: background .2s ease; }
.st-switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.st-switch input:checked + .sw { background: var(--leaf); }
.st-switch.danger input:checked + .sw { background: var(--danger); }
.st-switch input:checked + .sw::after { transform: translateX(20px); }
.st-switch input:focus-visible + .sw { box-shadow: 0 0 0 4px rgba(201, 154, 46, .25); }
.st-switch b { display: block; font-size: .88rem; }
.st-switch small { display: block; font-size: .76rem; color: var(--text-muted); }
.st-how { padding: .7rem .9rem; border-radius: 14px; background: #f6f7f9; font-size: .82rem; color: var(--text-soft); }
.st-how summary { cursor: pointer; font-weight: 700; color: var(--navy-700); }
.st-how p { margin: .6rem 0 0; line-height: 1.6; }
.st-gw { grid-template-columns: repeat(2, 1fr); }
.st-acct { padding: .9rem; border-radius: 16px; border: 1px solid var(--panel-border); background: #fafbfc; }
.st-acct b { display: block; font-size: .88rem; }
.st-acct small { display: block; font-size: .74rem; color: var(--text-muted); }
@media (max-width: 991.98px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-nav { top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 5; display: flex; overflow-x: auto; scrollbar-width: none; padding: .35rem; border-radius: 16px; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav a { flex-shrink: 0; padding: .4rem .6rem; }
  .st-body .me-sec { scroll-margin-top: 140px; }
}
@media (max-width: 575.98px) { .st-gw { grid-template-columns: 1fr; } .st-logo-prev { width: 100%; } }

/* Admin › Audit log */
.al-list .notif-day { padding: 1rem .2rem .45rem; }
.al-list .notif-day:first-child { padding-top: 0; }
.al-row { border-radius: 14px; border: 1px solid var(--panel-border); background: #fff; margin-bottom: .4rem; }
.al-row[open] { border-color: var(--panel-border-strong); box-shadow: 0 6px 18px rgba(13, 23, 48, .05); }
.al-row summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; cursor: pointer; }
.al-row summary::-webkit-details-marker { display: none; }
.al-ic.ok { background: var(--leaf-soft); color: var(--leaf); }
.al-ic.bad { background: #fdecea; color: var(--danger); }
.al-ic.royal { background: var(--royal-soft); color: var(--royal); }
.al-ic.gold { background: var(--gold-50); color: var(--gold-500); }
.al-ent { font-weight: 600; color: var(--text-muted); font-size: .8rem; }
.al-chev { font-size: .7rem; color: var(--text-muted); transition: transform .2s ease; }
.al-row[open] .al-chev { transform: rotate(180deg); }
.al-body { padding: 0 .8rem .8rem 3.6rem; }
.al-diff { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.al-diff th { padding: .4rem .6rem; background: #f6f7f9; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.al-diff th:first-child { border-radius: 9px 0 0 9px; } .al-diff th:last-child { border-radius: 0 9px 9px 0; }
.al-diff td { padding: .45rem .6rem; border-bottom: 1px solid var(--panel-border); vertical-align: top; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.al-diff td:first-child { font-family: inherit; font-weight: 700; font-size: .8rem; white-space: nowrap; }
.al-diff td.old { color: var(--danger); background: #fff8f7; }
.al-diff td.new { color: var(--leaf); background: #f6fbf8; }
.al-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; font-size: .76rem; color: var(--text-muted); }
.al-foot span { margin-right: auto; }
@media (max-width: 767.98px) { .al-body { padding-left: .8rem; } .al-row summary .pill { display: none; } }

/* Admin › Admin users */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.adm-card { padding: 1.1rem; border-radius: 22px; background: #fff; border: 1px solid var(--panel-border); box-shadow: 0 6px 22px rgba(13, 23, 48, .04); }
.adm-card.is-me { border: 2px solid var(--gold-500); }
.adm-card.is-off { background: #fafbfc; opacity: .8; }
.adm-av { width: 48px !important; height: 48px !important; border-radius: 15px !important; font-size: .9rem !important; }
.adm-btn { height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.adm-note { margin-top: .9rem; padding: .55rem .7rem; border-radius: 12px; background: #f6f7f9; font-size: .76rem; color: var(--text-muted); }
.pill.gold-pill { background: var(--gold-50); color: var(--gold-500); }
/* Admin › Pro IDs (admin/referral/pro) - reuses the Members list (.mb-*) */
.pro-page .mb-head, .pro-page .mb-row { grid-template-columns: minmax(220px, 2fr) 1fr .9fr .9fr .9fr 1fr auto; }
.pro-page .mb-row.is-pro { background: #fffbf0; }
.pro-page .mb-money { font-weight: 600; color: var(--text-soft); white-space: nowrap; }
.pro-page .mb-pro b { font-weight: 800; color: var(--ink); white-space: nowrap; }
.pro-page .mb-actions form { margin: 0; }
.pro-page .mb-actions .btn { min-width: 118px; justify-content: center; }
@media (max-width: 1199.98px) {
  .pro-page .mb-head, .pro-page .mb-row { grid-template-columns: minmax(200px, 2fr) .9fr .9fr .9fr 1fr auto; }
  .pro-page .mb-head span:nth-child(6) { display: block; }
}
@media (max-width: 767.98px) {
  .pro-page .mb-row { grid-template-columns: 1fr 1fr; }
  .pro-page .mb-actions form, .pro-page .mb-actions .btn { flex: 1; width: 100%; }
}
/* Member › Pro wallet */
.pw-plans { display: grid; gap: .6rem; }
.pw-plan { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--panel-border); border-radius: 14px; background: #fff; cursor: pointer; }
.pw-plan input { width: 18px; height: 18px; accent-color: var(--navy-800); flex-shrink: 0; }
.pw-plan:has(input:checked) { border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(19, 34, 71, .12); }
.pw-plan.is-short { opacity: .55; cursor: not-allowed; }
.pw-plan b { font-size: 1rem; color: var(--ink); white-space: nowrap; }

/* How to Earn (member/how_to_earn) */
.he-card { margin-bottom: 1rem; }
.he-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.he-steps li { display: flex; gap: .8rem; align-items: flex-start; }
.he-steps .n { flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--navy-800); color: var(--gold-300); font-weight: 800; font-size: .85rem; }
.he-steps b { font-size: .92rem; }
.he-steps p { margin: .15rem 0 0; color: var(--text-soft); font-size: .85rem; line-height: 1.5; }
.he-note { color: var(--text-soft); font-size: .86rem; }
.he-table { width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.he-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--panel-border); text-align: left; }
.he-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--panel-border); }
.he-table tfoot td { font-weight: 800; border-bottom: 0; color: var(--ink); }
.he-lvl { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; background: #f1f2f5; font-weight: 800; font-size: .78rem; margin-right: .4rem; }
.he-table small { color: var(--gold-500); font-weight: 700; font-size: .7rem; }
.he-split { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0 .7rem; }
.he-split div { padding: .8rem .9rem; border-radius: 14px; background: #f4f5f8; }
.he-split span { display: block; font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.he-split b { font-size: 1.05rem; color: var(--ink); }
.he-maturity { border-color: var(--gold-300); background: linear-gradient(135deg, #fffaf0, #fff); }
.he-maturity p { color: var(--text-soft); font-size: .88rem; line-height: 1.55; }
.he-maturity h2 i { color: var(--gold-500); }
.he-bar { height: 10px; border-radius: 99px; background: #f1f2f5; overflow: hidden; margin-bottom: 1rem; }
.he-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); }
.he-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.he-levels div { padding: .55rem .4rem; border-radius: 12px; border: 1px solid var(--panel-border); text-align: center; min-width: 0; }
.he-levels span { display: block; font-size: .7rem; font-weight: 700; color: var(--text-muted); }
.he-levels b { font-size: .82rem; overflow-wrap: anywhere; }
.he-levels small { color: var(--text-muted); font-weight: 600; font-size: .68rem; }
.he-levels .is-full { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.he-levels .is-full span, .he-levels .is-full small { color: var(--gold-300); }
@media (max-width: 575.98px) {
  .he-split { grid-template-columns: 1fr; }
  .he-levels { grid-template-columns: repeat(2, 1fr); }
}

/* How to improve panel */
.he-improve { border-color: var(--navy-800); }
.he-improve h2 i { color: var(--gold-500); }
.he-tip { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 0; border-top: 1px solid var(--panel-border); }
.m-card-head + .he-tip { border-top: 0; padding-top: 0; }
.he-tip > div { min-width: 0; flex: 1; }
.he-tip .n { flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f1f2f5; color: var(--ink); font-weight: 800; font-size: .82rem; }
.he-tip.is-gold .n { background: var(--gold-500); color: #fff; }
.he-tip.is-red .n { background: #d1453b; color: #fff; }
.he-tip b { font-size: .92rem; }
.he-tip p { margin: .15rem 0 .5rem; color: var(--text-soft); font-size: .85rem; line-height: 1.5; }
.he-legs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 .85rem; }
.he-legs > div { padding: .7rem; border-radius: 14px; border: 1px solid var(--panel-border); min-width: 0; }
.he-legs span { display: block; font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.he-legs b { font-size: 1.15rem; color: var(--ink); }
.he-legs small { color: var(--text-muted); font-size: .72rem; }
.he-legs .is-weak { border-color: #d1453b; background: #fdf1f0; }
.he-legs .is-weak span { color: #d1453b; }
.he-legs .is-empty { border-style: dashed; background: #fafbfc; }
.he-list { list-style: none; padding: 0; margin: 0 0 .4rem; display: grid; gap: .35rem; }
.he-list li { display: flex; align-items: center; gap: .5rem; font-size: .84rem; min-width: 0; }
.he-list li .text-truncate { flex: 1; min-width: 0; }
.he-list small { color: var(--text-muted); flex-shrink: 0; }
.he-list .he-lvl { width: auto; padding: 0 .4rem; margin: 0; font-size: .7rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .he-legs { grid-template-columns: 1fr; }
}

/* "What a full team earns" table: fit every column on phones */
.he-short { display: none; }
@media (max-width: 575.98px) {
  .he-full { display: none; }
  .he-short { display: inline; }
  .he-table { white-space: normal; font-size: .78rem; table-layout: fixed; }
  .he-table th { font-size: .62rem; padding: .45rem .25rem; letter-spacing: .02em; }
  .he-table td { padding: .5rem .25rem; }
  .he-table th:first-child, .he-table td:first-child { width: 17%; }
  .he-table th:nth-child(3), .he-table td:nth-child(3) { width: 13%; }
  .he-table td:first-child small { display: block; font-size: .6rem; margin-top: .1rem; }
  .he-table .he-lvl { width: 22px; height: 22px; font-size: .7rem; margin-right: 0; }
  .he-table th:nth-child(n+2), .he-table td:nth-child(n+2) { text-align: right; }
}

/* Team chat (member/chat_inbox, member/chat_conversation, settings blocked list) */
.ch-side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold-500); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.mtab.has-dot { position: relative; }
.mtab.has-dot::after { content: ""; position: absolute; top: 8px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); border: 2px solid #fff; }
.ch-new { margin-bottom: 1rem; position: relative; }
.ch-results { list-style: none; padding: .35rem; margin: .5rem 0 0; border: 1px solid var(--panel-border); border-radius: 14px; background: #fff; max-height: 300px; overflow-y: auto; box-shadow: 0 12px 30px rgba(13, 23, 48, .08); }
.ch-results a, .ch-results button { display: grid; grid-template-columns: 1fr auto; gap: 0 .5rem; width: 100%; text-align: left; padding: .55rem .7rem; border: 0; border-radius: 10px; background: none; color: var(--ink); }
.ch-results a:hover, .ch-results button:hover { background: #f4f5f8; }
.ch-results b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-results small { grid-column: 1; color: var(--text-muted); font-size: .74rem; }
.ch-results button span { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ch-none { padding: .6rem .7rem; color: var(--text-muted); font-size: .85rem; }
.ch-list { list-style: none; padding: 0; margin: 0; }
.ch-list li { border-bottom: 1px solid var(--panel-border); }
.ch-list li:last-child { border-bottom: 0; }
.ch-row { display: flex; align-items: center; gap: .75rem; padding: .75rem .25rem; color: var(--ink); }
.ch-row:hover { background: #fafbfc; }
.ch-row b { font-size: .92rem; }
.ch-time { color: var(--text-muted); font-size: .72rem; flex-shrink: 0; }
.ch-last { color: var(--text-muted); font-size: .84rem; }
.ch-last em { font-style: normal; color: var(--gold-500); font-weight: 700; }
.ch-row.is-unread .ch-last { color: var(--ink); font-weight: 600; }
.ch-row.is-unread .ch-time { color: var(--gold-500); font-weight: 700; }
.ch-badge { flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold-500); color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ch-req-actions { display: flex; gap: .5rem; padding: 0 .25rem .75rem 3.4rem; }
.ch-convo { display: flex; flex-direction: column; height: calc(100dvh - 150px); min-height: 420px; }
.ch-head { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 18px; flex-shrink: 0; }
.ch-head form { flex-shrink: 0; }
.ch-banner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: .6rem; padding: .8rem 1rem; border-radius: 16px; background: #fffaf0; border: 1px solid var(--gold-300); flex-shrink: 0; }
.ch-banner p { margin: .15rem 0 0; font-size: .8rem; color: var(--text-soft); }
.ch-box { flex: 1; overflow-y: auto; padding: .9rem .25rem; display: flex; flex-direction: column; }
.ch-box #chMsgs { margin-top: auto; }
.ch-older { align-self: center; border: 1px solid var(--panel-border); background: #fff; border-radius: 99px; padding: .3rem .9rem; font-size: .76rem; font-weight: 700; color: var(--text-soft); margin-bottom: .5rem; }
.ch-empty { margin: auto; color: var(--text-muted); font-size: .9rem; }
.ch-day { text-align: center; margin: .6rem 0; font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ch-msg { display: flex; margin: .2rem 0; }
.ch-msg.mine { justify-content: flex-end; }
.ch-msg .b { max-width: min(78%, 520px); padding: .55rem .8rem .4rem; border-radius: 18px; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--panel-border); color: var(--ink); border-bottom-left-radius: 6px; }
.ch-msg.mine .b { background: var(--navy-800); border-color: var(--navy-800); color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.ch-msg .t { display: block; text-align: right; font-size: .66rem; margin-top: .15rem; opacity: .65; }
.ch-msg .t .is-read { color: var(--gold-300); opacity: 1; }
.ch-note { flex-shrink: 0; margin-bottom: .5rem; padding: .6rem .9rem; border-radius: 12px; background: #f4f5f8; color: var(--text-soft); font-size: .8rem; text-align: center; }
.ch-compose { flex-shrink: 0; display: flex; gap: .5rem; align-items: flex-end; padding: .5rem; border-radius: 20px; background: #fff; border: 1px solid var(--panel-border); }
.ch-compose textarea { flex: 1; min-width: 0; border: 0; resize: none; padding: .55rem .6rem; font-size: .92rem; max-height: 140px; background: transparent; color: var(--ink); }
.ch-compose textarea:focus { outline: 0; }
.ch-compose .btn { width: 44px; height: 44px; padding: 0; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.ch-linked { display: block; margin-top: .3rem; padding: .4rem .6rem; border-radius: 10px; background: #fffaf0; color: #8a6412; font-size: .74rem; line-height: 1.4; }
.ch-blocks .tx-list li { align-items: flex-start; }
@media (max-width: 991.98px) {
  .ch-convo { height: calc(100dvh - 190px); }
}
