:root {
  --bg: #08080a; --surface: #131317; --surface-2: #1b1b21; --line: #2a2a32; --line-soft: #1f1f26;
  --text: #f5f2ea; --muted: #9b98a3; --faint: #6b6873;
  --gold: #d9b35f; --gold-2: #f0d28f; --gold-3: #a8822f; --gold-ink: #1a1405;
  --danger: #ec6a5e; --ok: #4fc58c; --warn: #e8a94a; --violet: #a78bfa; --teal: #5cc4c0;
  --radius: 16px; --radius-sm: 12px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; overscroll-behavior-y: none; }
body::before { content: ""; position: fixed; inset: 0; background: radial-gradient(900px 420px at 50% -120px, rgba(217,179,95,.12), transparent 70%); pointer-events: none; z-index: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.noNav { padding-bottom: 32px !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: calc(var(--safe-t) + 8px) 16px 8px; background: linear-gradient(var(--bg) 70%, transparent); }
.top h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.top .back, .iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line-soft); }
.top .back:active, .iconbtn:active { background: var(--surface-2); }
.wordmark { font-weight: 800; letter-spacing: .32em; font-size: 15px; background: linear-gradient(120deg, var(--gold-2), var(--gold) 50%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; display: flex; align-items: center; gap: 10px; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(145deg, var(--gold-2), var(--gold-3)); display: grid; place-items: center; box-shadow: 0 4px 16px rgba(217,179,95,.25); }
.mark svg { width: 16px; height: 16px; }
.night { color: var(--muted); font-size: 13px; }

main { padding: 4px 16px 0; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.stack > *, .field, .field-row > * { min-width: 0; }
.sec-title { margin: 22px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; align-items: baseline; }
.sec-title a, .sec-title button { color: var(--gold); letter-spacing: 0; text-transform: none; font-size: 14px; font-weight: 600; }

/* ---------- cards / lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; }
.card.tight { padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
a.row:active, button.row:active { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex-shrink: 0; }
.money { font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--gold-ink); flex-shrink: 0; background: linear-gradient(145deg, var(--gold-2), var(--gold-3)); }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }
.avatar.t-vip { background: linear-gradient(145deg, #c9b8ff, #7b61d6); }
.avatar.t-regular { background: linear-gradient(145deg, #9be3df, #3a9a96); }
.avatar.t-new { background: linear-gradient(145deg, #3a3a44, #26262e); color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); }
.badge.whale { color: var(--gold-ink); background: linear-gradient(120deg, var(--gold-2), var(--gold)); border-color: transparent; }
.badge.vip { color: #d8cdff; border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.12); }
.badge.regular { color: #a8e6e3; border-color: rgba(92,196,192,.4); background: rgba(92,196,192,.1); }
.badge.banned { color: #ffd2cd; background: rgba(236,106,94,.18); border-color: rgba(236,106,94,.5); }
.badge.watch { color: #ffe0b0; background: rgba(232,169,74,.15); border-color: rgba(232,169,74,.4); }
.badge.ok { color: #b9f0d6; background: rgba(79,197,140,.12); border-color: rgba(79,197,140,.4); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 16px; background: var(--surface-2); border: 1px solid var(--line); width: 100%; transition: transform .08s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.primary { color: var(--gold-ink); border: 0; background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3)); box-shadow: 0 8px 24px rgba(217,179,95,.22); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(236,106,94,.4); background: rgba(236,106,94,.08); }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 14px; width: auto; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cta .big { min-height: 108px; flex-direction: column; font-size: 17px; border-radius: var(--radius); }
.cta .big svg { width: 28px; height: 28px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; }
.field .hint { color: var(--faint); font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: 12px 14px; font-size: 17px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; outline: none; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,179,95,.14); }
.input.err { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: 13px; min-height: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 44px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); }
.chip.on { color: var(--gold-ink); background: linear-gradient(120deg, var(--gold-2), var(--gold)); border-color: transparent; }
.toggle { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); width: 100%; text-align: left; }
.toggle.on { border-color: rgba(217,179,95,.6); background: rgba(217,179,95,.07); }
.toggle .sw { width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex-shrink: 0; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on .sw { background: var(--gold); }
.toggle.on .sw::after { transform: translateX(20px); }
.toggle small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.amount { display: flex; align-items: center; gap: 4px; padding: 6px 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; }
.amount:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,179,95,.14); }
.amount span { font-size: 38px; font-weight: 700; color: var(--gold); }
.amount input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: none; font-size: 48px; font-weight: 800; letter-spacing: -.02em; padding: 8px 0; font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick .chip { justify-content: center; display: flex; align-items: center; min-height: 46px; border-radius: 12px; font-size: 15px; }
.quick .chip:last-child { grid-column: span 2; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 4px; }
.stepper button { width: 48px; height: 44px; border-radius: 10px; font-size: 24px; font-weight: 600; background: var(--surface-2); }
.stepper output { font-size: 20px; font-weight: 700; min-width: 40px; text-align: center; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); border-radius: 99px; transition: width .3s; }
.meter.ok > i { background: linear-gradient(90deg, #2f9a68, var(--ok)); }
.sticky-act { position: sticky; bottom: calc(var(--safe-b) + 12px); padding-top: 12px; background: linear-gradient(transparent, var(--bg) 40%); z-index: 5; }
.sticky-act.withNav { bottom: calc(var(--nav-h) + var(--safe-b) + 8px); }

/* ---------- stats ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px; }
.stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat.gold b { color: var(--gold); }
.hero { text-align: center; padding: 8px 0 18px; }
.hero h2 { margin: 12px 0 4px; font-size: 26px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--muted); }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; padding: 14px 16px; font-size: 15px; border-bottom: 1px solid var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.kv .missing { color: var(--warn); }
.actions3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.actions3 a, .actions3 button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; min-height: 64px; justify-content: center; }
.actions3 svg { width: 22px; height: 22px; color: var(--gold); }
.actions3 .off { opacity: .35; pointer-events: none; }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; border: 1px solid; }
.banner.warn { background: rgba(232,169,74,.1); border-color: rgba(232,169,74,.4); color: #ffe0b0; }
.banner.danger { background: rgba(236,106,94,.12); border-color: rgba(236,106,94,.5); color: #ffd2cd; }
.banner.info { background: rgba(217,179,95,.08); border-color: rgba(217,179,95,.35); color: var(--gold-2); }
.banner .btn { margin-top: 8px; }
.banner .btn-row .btn { white-space: nowrap; }
.spark { width: 100%; height: 70px; display: block; }
.ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.qrow { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-top: 10px; }
.qrow span:first-child { width: 78px; color: var(--muted); }
.qrow .meter { flex: 1; }
.qrow b { width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.rank { width: 22px; color: var(--faint); font-weight: 700; text-align: center; flex-shrink: 0; }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding-bottom: var(--safe-b); background: rgba(12,12,15,.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line-soft); }
.nav-in { max-width: 560px; margin: 0 auto; height: var(--nav-h); display: flex; align-items: stretch; justify-content: space-around; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--gold); }
.nav a.fab { flex: 0 0 76px; }
.nav a.fab span.c { width: 54px; height: 54px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-3)); box-shadow: 0 8px 22px rgba(217,179,95,.35); border: 4px solid var(--bg); }
.nav a.fab svg { width: 26px; height: 26px; }
.nav a.fab { color: var(--text); }

/* ---------- sheet / toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 12px 18px calc(18px + var(--safe-b)); max-height: 88dvh; overflow: auto; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.01em; }
.sheet p { margin: 0 0 14px; color: var(--muted); }
.sheet .btn-col { display: grid; gap: 10px; margin-top: 6px; }
.toasts { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px; width: 100%; padding: 14px 16px; border-radius: 14px; background: #24242c; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0,0,0,.5); animation: rise .2s; font-weight: 600; }
.toast.ok { border-color: rgba(79,197,140,.5); }
.toast.err { border-color: rgba(236,106,94,.6); }
.toast span { flex: 1; }
.toast button { color: var(--gold); font-weight: 700; padding: 6px 4px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; align-content: center; gap: 22px; padding: 28px 22px; max-width: 420px; margin: 0 auto; position: relative; z-index: 1; }
.auth .brand { text-align: center; }
.auth .brand .mark { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 16px; }
.auth .brand .mark svg { width: 34px; height: 34px; }
.auth .brand h1 { margin: 0; font-size: 28px; letter-spacing: .34em; font-weight: 800; background: linear-gradient(120deg, var(--gold-2), var(--gold) 50%, var(--gold-3)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-left: .34em; }
.auth .brand p { margin: 6px 0 0; color: var(--muted); }
.skeleton { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(0,0,0,.25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.offline { background: var(--warn); color: #231600; text-align: center; font-weight: 700; font-size: 14px; padding: 6px; position: sticky; top: 0; z-index: 40; }
@media (min-width: 700px) { body { background: #050506; } #app { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); background: var(--bg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* icons never size themselves */
.banner svg, .row > svg, .iconbtn svg, .back svg { width: 20px; height: 20px; flex-shrink: 0; }
svg:not([width]):not(.spark) { max-width: 28px; max-height: 28px; }
.ring svg, .avatar svg { max-width: none; max-height: none; }

/* ================= shell, analytics, desktop ================= */
.side { display: none; }
.no-d { display: block; }
.only-d { display: none; }
.thead { display: flex; align-items: center; gap: 12px; padding: 10px 14px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line-soft); }
.thead .grow { flex: 1; }
.c-email { width: 220px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-num, .c-n { width: 70px; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.c-m { width: 92px; flex-shrink: 0; text-align: right; font-variant-numeric: tabular-nums; }
.c-seen { width: 110px; flex-shrink: 0; }
.c-tier { width: 96px; flex-shrink: 0; }
.c-q { width: 84px; flex-shrink: 0; text-align: right; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
em.you { font-style: normal; color: var(--gold); font-size: 12px; font-weight: 700; }
.tr em { font-style: normal; color: var(--faint); font-size: 12px; font-weight: 500; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; }
.seg button { min-width: 44px; min-height: 36px; padding: 0 10px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { color: var(--gold-ink); background: linear-gradient(120deg, var(--gold-2), var(--gold)); }

.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.dash > * { grid-column: span 12; min-width: 0; }
.dash > .kpi { grid-column: span 6; }
.kpi { display: grid; gap: 4px; align-content: start; padding: 14px; }
.kpi.link { transition: border-color .15s, transform .08s; }
.kpi.link:hover, a.card.link:hover { border-color: var(--gold-3); }
.kpi.link:active { transform: scale(.985); }
.k-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.k-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.k-sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.delta { font-weight: 700; font-size: 12px; color: var(--muted); }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.card-h b { font-size: 15px; }
.card-h a { color: var(--gold); font-size: 13px; font-weight: 600; white-space: nowrap; }
.stack-s { display: grid; gap: 10px; }
.sub { color: var(--muted); font-size: 14px; }

.bars-wrap { padding-bottom: 20px; }
.bars { display: flex; align-items: flex-end; gap: 4px; }
.bars.dense { gap: 1px; }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; position: relative; border-radius: 4px 4px 0 0; }
button.bar:hover { background: rgba(217,179,95,.1); }
.bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #6a5a33, #3d3420); transition: height .25s; }
.bar.hl i { background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); }
.bar:hover i { background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.bar.zero i { background: var(--line); }
.bar .bl { position: absolute; top: 100%; margin-top: 4px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--faint); white-space: nowrap; pointer-events: none; }

.mrow { display: flex; align-items: center; gap: 10px; font-size: 14px; width: 100%; text-align: left; min-height: 30px; }
button.mrow:hover .ml { color: var(--gold); }
.mrow .ml { width: 104px; flex-shrink: 0; color: var(--muted); }
.mrow .ml.wide-l { width: 96px; }
.mrow .meter { flex: 1; }
.mrow b { min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.meter.slim { height: 4px; margin-top: 6px; }
.tier-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border-radius: 10px; padding: 4px 6px; margin: 0 -6px; text-align: left; }
.tier-row:hover { background: var(--surface-2); }
.tier-row .badge { width: 78px; justify-content: center; }
.tier-row .grow { flex: 0 0 96px; }
.tier-row .meter { flex: 1; }
.tier-row .tr { width: 46px; text-align: right; }

.list { display: grid; }
.lrow { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line-soft); padding: 6px 0; }
.lrow:last-child { border-bottom: 0; }
a.lrow:hover .name { color: var(--gold); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.dot.bad { background: var(--danger); } .dot.good { background: var(--ok); } .dot.warn { background: var(--warn); }

.tbl { display: grid; }
.tbl .tr { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); width: 100%; text-align: left; font-size: 14px; }
.tbl .tr:last-child { border-bottom: 0; }
.tbl button.tr:hover { background: var(--surface-2); border-radius: 10px; }
.tbl .tr.th { min-height: 32px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.tbl .grow { flex: 1; min-width: 0; } .tbl .name { font-weight: 600; }
.night-row .meter { max-width: 320px; }
.side-me { display: none; }

/* ---------- laptop / desktop ---------- */
@media (min-width: 1024px) {
  #app { max-width: none; border: 0; padding-bottom: 0 !important; background: none; }
  .shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 22px 14px 16px; border-right: 1px solid var(--line-soft); background: rgba(10,10,13,.85); }
  .side-brand { padding: 4px 12px 22px; font-size: 16px; }
  .side-nav { display: grid; gap: 4px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: background .15s; }
  .side-nav a svg { width: 20px; height: 20px; }
  .side-nav a:hover { background: var(--surface); color: var(--text); }
  .side-nav a.on { color: var(--gold); background: rgba(217,179,95,.1); }
  .side-me { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); }
  .side-me .grow { flex: 1; min-width: 0; } .side-me .name { font-weight: 600; font-size: 14px; } .side-me .sub { font-size: 12px; }
  .side-me .iconbtn { width: 38px; height: 38px; }
  .nav { display: none; }
  .content { padding: 0 44px 64px; min-width: 0; }
  .content > .top { padding: 28px 0 14px; background: none; position: static; }
  .content > .top h1 { font-size: 28px; letter-spacing: -.02em; }
  .content > main { padding: 0; max-width: 660px; margin: 0; }
  .content > main.wide { max-width: 1320px; }
  .only-d { display: block; }
  .no-d { display: none !important; }
  .row { min-height: 60px; }
  .row .end.no-d { display: none; }
  .thead.only-d { display: flex; }
  .toasts { bottom: 28px; left: 252px; }
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--line); max-width: 480px; padding-bottom: 20px; }
  .sheet::before { display: none; }
  .hero { text-align: left; }
  .dash > .kpi { grid-column: span 4; }
  .dash > .w4 { grid-column: span 4; } .dash > .w6 { grid-column: span 6; } .dash > .w8 { grid-column: span 8; } .dash > .w12 { grid-column: span 12; }
  .dash > div[class^="w"] > .card { height: 100%; }
  .dash { gap: 16px; }
  .k-value { font-size: 30px; }
  .cta .big { min-height: 120px; }
}
@media (min-width: 1360px) { .dash > .kpi { grid-column: span 2; } }

/* ================= house style: matte, hairline, brass =================
   Flat surfaces, no glows or gradients, a serif for names and figures,
   brass used only where something is actionable or selected. */
:root {
  --bg: #0c0b0a; --surface: #141311; --surface-2: #1b1916; --line: #2e2a25; --line-soft: #24211d;
  --text: #ece7dc; --muted: #9b9488; --faint: #6f685d;
  --gold: #bf9f5f; --gold-2: #d2b377; --gold-3: #9a7f45; --gold-ink: #15110a;
  --danger: #d9685c; --ok: #6bb48c; --warn: #d4a052; --violet: #a597d6; --teal: #7fb8b4;
  --radius: 10px; --radius-sm: 8px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
body::before { display: none; }
.top { background: var(--bg); border-bottom: 1px solid var(--line-soft); }
.top h1, .hero h2, .sheet h3, .auth .brand h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; }
.top h1 { font-size: 21px; }
.top .back, .iconbtn { border-radius: 8px; background: transparent; border-color: var(--line); }

/* brand */
.wordmark { background: none; color: var(--gold); -webkit-text-fill-color: currentColor; font-family: var(--serif); font-weight: 600; letter-spacing: .42em; font-size: 14px; }
.mark { border-radius: 6px; background: var(--gold); box-shadow: none; width: 26px; height: 26px; }
.auth .brand h1 { background: none; color: var(--gold); -webkit-text-fill-color: currentColor; font-size: 26px; letter-spacing: .42em; }
.auth .brand .mark { border-radius: 12px; }

/* section titles get a rule instead of a floating caption */
.sec-title { margin: 28px 0 10px; color: var(--muted); font-size: 11px; letter-spacing: .18em; gap: 12px; }
.sec-title::after { content: none; }
.sec-title > :first-child { position: relative; }
.sec-title a, .sec-title button { color: var(--gold); font-size: 13px; }
main > .sec-title, .stack > .sec-title { border-top: 1px solid var(--line-soft); padding-top: 14px; }

/* surfaces */
.card, .stat, .toggle, .stepper, .amount, .input, select.input, textarea.input { border-radius: var(--radius); }
.card { border-color: var(--line-soft); background: var(--surface); }
.input { border-width: 1px; background: var(--surface); }
.input:focus, .amount:focus-within { border-color: var(--gold); box-shadow: none; outline: 1px solid var(--gold); outline-offset: 0; }
.row { min-height: 60px; }
.row .name, .lrow .name, .tbl .name { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.money, .k-value, .stat b { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.stat b { font-size: 24px; }
.k-value { font-size: 28px; }
.stat span, .k-label { letter-spacing: .14em; font-size: 10.5px; }
.stat.gold b { color: var(--gold-2); }
.hero h2 { font-size: 30px; }

/* buttons: flat, squared */
.btn { border-radius: 8px; min-height: 50px; font-weight: 600; letter-spacing: .01em; background: transparent; border: 1px solid var(--line); }
.btn.primary { background: var(--gold); color: var(--gold-ink); border: 1px solid var(--gold); box-shadow: none; }
.btn.primary:active { background: var(--gold-3); }
.btn.danger { background: transparent; }
.btn.sm { border-radius: 7px; }
.cta { gap: 10px; }
.cta .big { min-height: 96px; border-radius: var(--radius); align-items: flex-start; justify-content: space-between; padding: 14px 16px; text-align: left; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.cta .big svg { width: 24px; height: 24px; }

/* avatars: monogram tiles, tier shown by hairline colour only */
.avatar { border-radius: 8px; background: var(--surface-2); color: var(--gold-2); border: 1px solid var(--line); font-family: var(--serif); font-weight: 600; }
.avatar.lg { border-radius: 14px; }
.avatar.t-vip { background: var(--surface-2); color: var(--violet); border-color: rgba(165,151,214,.5); }
.avatar.t-regular { background: var(--surface-2); color: var(--teal); border-color: rgba(127,184,180,.45); }
.avatar.t-new { background: transparent; color: var(--muted); border-color: var(--line); }
.avatar.t-whale { border-color: var(--gold); }

/* badges / chips / segments */
.badge { border-radius: 4px; padding: 2px 7px; font-size: 10px; letter-spacing: .12em; }
.badge.whale { background: transparent; color: var(--gold-2); border-color: var(--gold-3); }
.chip { border-radius: 6px; min-height: 36px; background: transparent; }
.chip.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.quick .chip { border-radius: 8px; }
.seg { border-radius: 8px; background: transparent; }
.seg button { border-radius: 6px; }
.seg button.on { background: var(--gold); color: var(--gold-ink); }

/* toggles, meters, bars */
.toggle.on { background: transparent; border-color: var(--gold); }
.toggle .sw { border-radius: 6px; width: 46px; height: 26px; }
.toggle .sw::after { border-radius: 4px; width: 20px; height: 20px; background: var(--text); }
.toggle.on .sw { background: var(--gold); }
.toggle.on .sw::after { transform: translateX(20px); background: var(--gold-ink); }
.meter { height: 4px; border-radius: 0; background: var(--line-soft); }
.meter > i, .meter.ok > i { border-radius: 0; background: var(--gold); }
.meter.ok > i { background: var(--ok); }
.bar, .bar i { border-radius: 2px 2px 0 0; }
.bar i { background: #4a4030; }
.bar.hl i, .bar:hover i { background: var(--gold); }
.bar.zero i { background: var(--line-soft); }
.amount span { font-family: var(--serif); }
.amount input { font-family: var(--serif); font-weight: 600; }

/* banners */
.banner { border-radius: var(--radius-sm); border-left-width: 3px; background: var(--surface); }
.banner.warn { background: rgba(212,160,82,.07); } .banner.danger { background: rgba(217,104,92,.08); } .banner.info { background: rgba(191,159,95,.06); }

/* bottom nav: hairline, brass tick on the active tab, flat centre action */
.nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav a { position: relative; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--gold); }
.nav a.fab { flex: 0 0 72px; }
.nav a.fab::before { display: none; }
.nav a.fab span.c { width: 48px; height: 48px; margin-top: -18px; border-radius: 10px; background: var(--gold); box-shadow: none; border: 3px solid var(--bg); }
.nav a.fab.on, .nav a.fab { color: var(--muted); }
.nav a.fab.on { color: var(--gold); }

/* sheets & toasts */
.sheet { border-radius: 14px 14px 0 0; background: var(--surface); }
.toast { border-radius: 8px; background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.45); font-weight: 500; }

@media (min-width: 1024px) {
  .side { background: var(--bg); }
  .side-nav a { border-radius: 8px; font-size: 15px; }
  .side-nav a.on { background: transparent; color: var(--gold-2); box-shadow: inset 2px 0 0 var(--gold); border-radius: 0 8px 8px 0; }
  .side-me { border-radius: 10px; background: transparent; }
  .sheet { border-radius: 14px; }
  .content > .top { border-bottom: 0; background: none; }
  .content > .top h1 { font-size: 32px; }
}

/* desktop home: single column, centred in the content area */
@media (min-width: 1024px) {
  .content > main.home { max-width: 860px; margin: 0 auto; }
  .home .cta .big { min-height: 120px; }
}
@media (min-width: 1024px) {
  .content > .top .wordmark { display: none; }
  .content > .top:has(.wordmark) { min-height: 28px; padding: 0; }
  .home .greet { font-size: 34px; }
}

/* desktop: every page fills the width beside the sidebar */
@media (min-width: 1024px) {
  .content > main, .content > main.wide, .content > main.home { max-width: none; margin: 0; }
  .content { padding: 0 40px 64px; }
  .home .cta { grid-template-columns: repeat(4, 1fr); }
  .home .cta .big { grid-column: span 2; }
  .home .grid2 { grid-template-columns: repeat(4, 1fr); }
  .home .grid2 > * { grid-column: span 2; }
}
