:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --border: #e3e8e6;
  --text: #17201d;
  --muted: #5f6d68;
  --faint: #8a9692;
  --primary: #0f7a5f;
  --primary-600: #0b6650;
  --primary-50: #e8f5f0;
  --accent: #f59e0b;
  --accent-50: #fff6e5;
  --danger: #d93838;
  --danger-50: #fdecec;
  --info: #2563eb;
  --info-50: #eaf1fe;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .05), 0 4px 16px rgba(16, 24, 20, .06);
  --shadow-lg: 0 10px 40px rgba(16, 24, 20, .18);
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .05s;
  white-space: nowrap; text-decoration: none !important;
}
.btn:hover { background: var(--primary-600); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible, .nav a:focus-visible { outline: 3px solid rgba(15, 122, 95, .35); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.lg { min-height: 50px; font-size: 16px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--primary-50); color: var(--primary-600); }
.btn.soft:hover { background: #d6eee5; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #bf2c2c; }
.btn.danger-soft { background: var(--danger-50); color: var(--danger); }
.btn.danger-soft:hover { background: #f9dada; }
.btn.link { background: none; color: var(--primary); padding: 0 6px; min-height: 30px; }
.btn.link:hover { text-decoration: underline; }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: #33403b; }
.field .hint { display: block; font-size: 12.5px; color: var(--faint); margin-top: 5px; font-weight: 400; }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 122, 95, .15); outline: none; }
textarea.input { min-height: 80px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input.big { font-size: 22px; font-weight: 700; min-height: 56px; letter-spacing: .3px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: var(--surface-2); }
.form-error { background: var(--danger-50); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 16px; }
.section-title { font-size: 18px; margin-bottom: 12px; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.green { background: var(--primary-50); color: var(--primary-600); border-color: #cbe8dc; }
.badge.amber { background: var(--accent-50); color: #a16207; border-color: #fde5b0; }
.badge.red { background: var(--danger-50); color: var(--danger); border-color: #f7cccc; }
.badge.blue { background: var(--info-50); color: var(--info); border-color: #cfdffc; }
.tier-member { background: #eef1f0; color: #4b5753; border-color: #dde3e1; }
.tier-silver { background: #eef2f6; color: #475569; border-color: #d5dde6; }
.tier-gold { background: #fff4d6; color: #a16207; border-color: #f8dd94; }
.tier-diamond { background: #e8f0ff; color: #3b5bdb; border-color: #c9d8ff; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.chip .count { margin-left: 4px; background: var(--danger); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11.5px; }

/* ---------- Lists / tables ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
.tx-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.tx-icon.plus { background: var(--primary-50); color: var(--primary); }
.tx-icon.minus { background: var(--accent-50); color: #b45309; }
.tx-icon.neutral { background: var(--surface-2); color: var(--muted); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 13px; color: var(--faint); }
.tx-pts { font-weight: 700; font-size: 16px; text-align: right; white-space: nowrap; }
.tx-pts.plus { color: var(--primary); }
.tx-pts.minus { color: #b45309; }
.voided .tx-title, .voided .tx-pts { text-decoration: line-through; opacity: .55; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table .right { text-align: right; }
.cell-name { font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--faint); }

.empty { padding: 40px 20px; text-align: center; color: var(--faint); }
.empty .empty-icon { font-size: 34px; margin-bottom: 6px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }

/* ---------- Toast ---------- */
#toasts { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; background: #17201d; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .25s ease-out; }
.toast.success { background: #0d6b53; }
.toast.error { background: #b42828; }
.toast.leaving { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(12, 18, 16, .45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade-in .15s; }
.modal { background: var(--surface); border-radius: 18px; width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop-in .18s ease-out; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); gap: 10px; }
.modal-head h3 { font-size: 17px; }
.modal-close { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); flex: none; }
.modal-close:hover { background: var(--border); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (max-width: 560px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; width: 100%; }
}

.spinner { width: 22px; height: 22px; border: 3px solid rgba(0,0,0,.12); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 40px; display: grid; place-items: center; color: var(--primary); }

/* ---------- Connection indicator ---------- */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.live.on::before { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.live.off::before { background: var(--danger); }

/* =========================================================
   AUTH PAGE
   ========================================================= */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero { background: linear-gradient(150deg, #0f7a5f 0%, #0b5c48 60%, #0a4a3b 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-hero::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 158, 11, .35), transparent 65%); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: #3b2500; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.auth-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -.5px; max-width: 460px; }
.auth-hero .lead { font-size: 17px; opacity: .85; margin-top: 14px; max-width: 440px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.hero-points li { display: flex; gap: 12px; align-items: center; font-size: 15.5px; }
.hero-points .dot { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; font-size: 15px; }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 26px; font-weight: 800; }
.auth-box .sub { color: var(--muted); margin-top: 6px; margin-bottom: 24px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e9eeec; border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.tab { border: 0; background: none; padding: 10px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 15px; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-mobile-brand { display: none; margin-bottom: 26px; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-mobile-brand { display: flex; }
  .auth-side { align-items: flex-start; padding-top: 48px; }
}

/* =========================================================
   MEMBER APP
   ========================================================= */
.app-shell { max-width: 640px; margin: 0 auto; padding: 0 16px 96px; }
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 10px; }
.app-top .brand { font-size: 17px; }
.app-top .brand-mark { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
.points-card { position: relative; overflow: hidden; border-radius: 22px; padding: 24px; color: #fff; background: linear-gradient(140deg, #0f7a5f, #0a4f3f); box-shadow: 0 12px 30px rgba(11, 90, 70, .28); }
.points-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 158, 11, .45), transparent 65%); }
.points-card.tier-gold-card { background: linear-gradient(140deg, #b7791f, #7c4a0b); }
.points-card.tier-diamond-card { background: linear-gradient(140deg, #3b5bdb, #1e3a8a); }
.points-card.tier-silver-card { background: linear-gradient(140deg, #4b6072, #2c3a47); }
.points-card > * { position: relative; z-index: 1; }
.pc-hello { font-size: 15px; opacity: .85; }
.pc-name { font-size: 19px; font-weight: 700; }
.pc-label { margin-top: 22px; font-size: 13.5px; opacity: .8; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.pc-points { font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.pc-points small { font-size: 18px; font-weight: 600; opacity: .8; margin-left: 6px; letter-spacing: 0; }
.pc-tier { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); padding: 5px 12px; border-radius: 99px; font-weight: 700; font-size: 13.5px; }
.pc-progress { margin-top: 18px; }
.bar { height: 8px; background: rgba(255,255,255,.22); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; width: 0; transition: width .6s ease; }
.pc-progress .small { margin-top: 7px; opacity: .85; }
.pc-phone { margin-top: 18px; padding-top: 16px; border-top: 1px dashed rgba(255,255,255,.25); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-phone b { font-size: 20px; letter-spacing: 1.5px; }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { transform: scale(1); } 15% { transform: scale(1.08); color: #fde68a; } 100% { transform: scale(1); } }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mini-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.mini-stat .v { font-weight: 800; font-size: 17px; }
.mini-stat .l { font-size: 12.5px; color: var(--muted); }
.notice { display: flex; gap: 10px; align-items: center; background: var(--accent-50); border: 1px solid #fde5b0; color: #854d0e; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }

.reward-grid { display: grid; gap: 12px; }
.reward { display: flex; gap: 14px; align-items: center; padding: 16px; }
.reward-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-50); display: grid; place-items: center; font-size: 26px; flex: none; }
.reward h4 { font-size: 15.5px; }
.reward .desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.reward .cost { font-weight: 800; color: #b45309; margin-top: 4px; font-size: 14.5px; }
.reward .need { font-size: 12.5px; color: var(--faint); }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav .inner { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 10px; color: var(--faint); font-size: 12px; font-weight: 600; text-decoration: none; position: relative; }
.bottom-nav a .ic { font-size: 21px; line-height: 1.1; filter: grayscale(1); opacity: .7; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active .ic { filter: none; opacity: 1; }
.bottom-nav .dot-badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 16px; height: 16px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 4px; }

/* =========================================================
   ADMIN
   ========================================================= */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: #0f1a16; color: #c9d4d0; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.sidebar .brand { color: #fff; padding: 4px 8px 18px; font-size: 17px; }
.sidebar .brand-mark { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #b5c2bd; font-weight: 500; text-decoration: none; position: relative; }
.nav a .ic { width: 22px; text-align: center; font-size: 17px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
.nav a .count { margin-left: auto; background: var(--accent); color: #3b2500; font-size: 12px; font-weight: 700; padding: 0 8px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.sidebar-foot .who { color: #fff; font-weight: 600; }
.sidebar-foot .btn { margin-top: 12px; width: 100%; background: rgba(255,255,255,.08); }
.sidebar-foot .btn:hover { background: rgba(255,255,255,.14); }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px; background: var(--bg); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid transparent; }
.topbar h1 { font-size: 22px; font-weight: 800; }
.menu-btn { display: none; border: 1px solid var(--border); background: var(--surface); width: 40px; height: 40px; border-radius: 10px; font-size: 19px; cursor: pointer; }
.content { padding: 4px 28px 40px; }
.view { display: none; }
.view.active { display: block; animation: fade-in .2s; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 20px; }
.stat .l { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 4px; letter-spacing: -.5px; }
.stat .s { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.stat.highlight { background: linear-gradient(140deg, #0f7a5f, #0a4f3f); color: #fff; border: 0; }
.stat.highlight .l, .stat.highlight .s { color: rgba(255,255,255,.8); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 20px 20px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.chart .bar-v { width: 100%; max-width: 44px; background: var(--primary); border-radius: 8px 8px 3px 3px; min-height: 3px; transition: height .5s ease; position: relative; }
.chart .col.today .bar-v { background: var(--accent); }
.chart .bar-v:hover { filter: brightness(1.1); }
.chart .val { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.chart-labels { display: flex; gap: 10px; padding: 8px 20px 16px; }
.chart-labels span { flex: 1; text-align: center; font-size: 12px; color: var(--faint); }

/* Earn counter */
.earn-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.lookup-row { display: flex; gap: 10px; }
.lookup-row .input { flex: 1; }
.cust-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.cust-box .name { font-weight: 700; font-size: 17px; }
.cust-box .pts { font-size: 26px; font-weight: 800; color: var(--primary); }
.preview { background: var(--primary-50); border-radius: var(--radius); padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview .big { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1; }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { min-height: 42px; font-size: 15px; }
.toolbar .search { flex: 1; min-width: 220px; }
.detail-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.kv > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.kv .l { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 700; font-size: 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .earn-layout, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 300; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 250; }
  .menu-btn { display: grid; place-items: center; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 19px; }
  .content { padding: 4px 16px 40px; }
  .stat .v { font-size: 23px; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .hide-sm { display: none; }
  .table th, .table td { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .stat-grid { gap: 10px; }
  .stat { padding: 14px; }
  .pc-points { font-size: 44px; }
}
