@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --bg: #f4f6f9;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --text: #131622;
  --text-muted: #6b7280;
  --text-faint: #9aa1b0;
  --border: #e7e9f1;
  --accent: #0f6e56;
  --accent-2: #0aa27c;
  --accent-grad: linear-gradient(135deg, #0b5c47 0%, #10a37f 55%, #34c99a 100%);
  --accent-soft: #e3f5ef;
  --gold: #c9962c;
  --gold-soft: #fbf1de;
  --violet: #6c5ce7;
  --danger: #e0455a;
  --danger-soft: #fdedef;
  --success: #17915f;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --shadow-sm: 0 2px 8px rgba(19, 22, 34, 0.05);
  --shadow: 0 10px 30px rgba(19, 22, 34, 0.07);
  --shadow-lg: 0 22px 48px rgba(15, 110, 86, 0.16);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Sora', var(--font);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
::selection { background: var(--accent-2); color: #fff; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(16, 163, 127, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px;
}

a { color: inherit; text-decoration: none; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }

.icon { display: inline-block; vertical-align: -4px; flex-shrink: 0; }
.icon-accent { color: var(--accent); }

.container { max-width: 480px; margin: 0 auto; padding: 20px 18px 32px; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 24px; }

/* ---------------- Topbar ---------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 15.5px; font-family: var(--font-display); letter-spacing: -0.2px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(16, 163, 127, 0.35); flex-shrink: 0;
}
.brand .logo svg { display: block; }
.brand .tagline { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.01em; margin-top: 1px; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 16px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.card-flat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }

/* ---------------- Hero balance ---------------- */
.hero-balance {
  position: relative; overflow: hidden;
  background: var(--accent-grad); color: #fff; border-radius: var(--radius-xl);
  padding: 28px 24px; box-shadow: var(--shadow-lg); margin-bottom: 16px;
}
.hero-balance::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(220px 220px at 105% -10%, rgba(255,255,255,0.22), transparent 60%),
    radial-gradient(180px 180px at -10% 115%, rgba(255,255,255,0.12), transparent 60%);
  pointer-events: none;
}
.hero-balance .label { display: flex; align-items: center; gap: 7px; font-size: 13px; opacity: 0.9; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.hero-balance .amount { font-family: var(--font-display); font-size: 42px; font-weight: 800; margin: 6px 0 12px; letter-spacing: -0.5px; }
.hero-balance .sub { font-size: 13px; opacity: 0.92; display: flex; gap: 18px; font-weight: 500; position: relative; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 15px 16px; text-align: left; box-shadow: var(--shadow-sm);
}
.stat .num { font-family: var(--font-display); font-size: 23px; font-weight: 800; letter-spacing: -0.3px; }
.stat .lbl { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-weight: 500; }

h1 { font-family: var(--font-display); font-size: 23px; margin: 0 0 4px; font-weight: 800; letter-spacing: -0.4px; display: flex; align-items: center; gap: 10px; }
h2 { font-family: var(--font-display); font-size: 16.5px; margin: 0 0 12px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -0.1px; }
p { color: var(--text-muted); line-height: 1.55; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 13.5px 18px; border-radius: var(--radius-sm); border: none;
  font-weight: 700; font-size: 14.5px; cursor: pointer; font-family: var(--font);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), opacity .12s var(--ease), filter .12s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 20px rgba(16, 163, 127, 0.28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: var(--accent-soft); color: var(--accent); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.field label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field input, .field select {
  width: 100%; padding: 13px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 15px; font-family: var(--font);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 5px; }

.password-toggle-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-faint);
  padding: 6px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.password-toggle-btn:hover { color: var(--text); background: var(--surface-2); }

.alert { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; font-weight: 500; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--accent-soft); color: var(--accent); }
.alert-info { background: #eef2fb; color: #3956a6; }

/* ---------------- Transaction rows ---------------- */
.txn-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.txn-row:last-child { border-bottom: none; }
.txn-row .txn-icon {
  width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.txn-row .txn-icon.neg { background: var(--danger-soft); color: var(--danger); }
.txn-row .meta { flex: 1; min-width: 0; }
.txn-row .meta .desc { font-weight: 700; font-size: 14px; }
.txn-row .meta .sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txn-row .amt { font-weight: 800; font-size: 15px; font-family: var(--font-display); white-space: nowrap; }
.amt-pos { color: var(--success); }
.amt-neg { color: var(--danger); }

/* ---------------- Code / QR box ---------------- */
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent-soft); border-radius: var(--radius-sm); padding: 15px 16px; margin: 10px 0;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
}
.code-box .code { font-family: 'SF Mono', Consolas, monospace; font-weight: 700; font-size: 18px; letter-spacing: 1.5px; color: var(--accent); }

.qr-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--surface-2); border-radius: var(--radius-lg); padding: 22px; border: 1px solid var(--border);
}
.qr-card img { border-radius: var(--radius-md); background: #fff; padding: 10px; box-shadow: var(--shadow-sm); }

/* ---------------- QR loading spinner ---------------- */
.qr-loading-wrap {
  position: relative; width: 200px; height: 200px; max-width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.qr-loading-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  border-radius: var(--radius-md); background: #fff; padding: 10px; box-shadow: var(--shadow-sm);
  opacity: 0; transition: opacity .3s var(--ease);
}
.qr-loading-wrap img.loaded { opacity: 1; }
.qr-spinner {
  width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: qrSpin .8s linear infinite;
}
@keyframes qrSpin { to { transform: rotate(360deg); } }

/* ---------------- Offer banner slider ---------------- */
.offer-slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; box-shadow: var(--shadow); cursor: grab; touch-action: pan-y; user-select: none; }
.offer-slider:active { cursor: grabbing; }
.offer-track { display: flex; transition: transform .45s var(--ease); }
.offer-slide {
  flex: 0 0 100%; padding: 18px 20px; color: #fff; display: flex; align-items: center; gap: 12px; min-height: 96px;
  position: relative; background-size: cover; background-position: center;
}
.offer-slide.color-accent { background-color: #0b5c47; }
.offer-slide.color-gold { background-color: #a9761f; }
.offer-slide.color-violet { background-color: #4c3fb0; }
.offer-slide:not(.has-image).color-accent { background: var(--accent-grad); }
.offer-slide:not(.has-image).color-gold { background: linear-gradient(135deg, #a9761f 0%, #c9962c 55%, #e8b94f 100%); }
.offer-slide:not(.has-image).color-violet { background: linear-gradient(135deg, #4c3fb0 0%, #6c5ce7 55%, #9186f0 100%); }
.offer-slide.has-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.05) 100%);
}
.offer-slide .offer-icon { flex-shrink: 0; opacity: 0.9; position: relative; }
.offer-slide .offer-title { font-weight: 800; font-size: 15px; font-family: var(--font-display); position: relative; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.offer-slide .offer-subtitle { font-size: 12.5px; opacity: 0.95; margin-top: 2px; font-weight: 500; position: relative; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.offer-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.offer-dots span { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.45); transition: background .2s, width .2s; }
.offer-dots span.active { background: #fff; width: 16px; }


.badge-pending { background: var(--gold-soft); color: var(--gold); }
.badge-qualified { background: #eef2fb; color: #3956a6; }
.badge-rewarded { background: var(--accent-soft); color: var(--accent); }
.badge-reversed { background: var(--danger-soft); color: var(--danger); }

/* ---------------- Live search dropdown ---------------- */
.live-search-wrap { position: relative; }
.live-search-results {
  margin-top: 8px; max-height: 320px; overflow-y: auto; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--surface-2);
}
.live-search-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px;
  transition: background .12s var(--ease);
}
.live-search-row:last-child { border-bottom: none; }
.live-search-row:hover { background: var(--accent-soft); }
.live-search-row .lsr-name { font-weight: 700; flex: 1; }
.live-search-row .lsr-mobile { color: var(--text-muted); }
.live-search-row .lsr-balance { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---------------- Toast notifications (SweetAlert-style) ---------------- */
.toast-stack {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 10px; width: calc(100% - 24px); max-width: 420px;
  pointer-events: none;
}
.toast-card {
  pointer-events: auto; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 14px 16px 14px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  opacity: 0; transform: translateY(-16px) scale(0.96);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}
.toast-card.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-card.hide { opacity: 0; transform: translateY(-10px) scale(0.97); }
.toast-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
  animation: toastIconPop .4s var(--ease);
}
@keyframes toastIconPop { 0% { transform: scale(0.4); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.toast-icon.type-success, .toast-icon.type-reward { background: var(--accent-grad); }
.toast-icon.type-referral { background: linear-gradient(135deg, #4c3fb0 0%, #6c5ce7 100%); }
.toast-icon.type-task { background: linear-gradient(135deg, #a9761f 0%, #c9962c 100%); }
.toast-icon.type-info { background: linear-gradient(135deg, #2a5ea8 0%, #4a86d6 100%); }
.toast-icon.type-warning { background: linear-gradient(135deg, #a9761f 0%, #c9962c 100%); }
.toast-icon.type-error { background: linear-gradient(135deg, #a13040 0%, #e0455a 100%); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-family: var(--font-display); font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.toast-message { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px; border-radius: 8px; flex-shrink: 0; }
.toast-close:hover { background: var(--surface-2); color: var(--text); }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent); border-radius: 0 0 var(--radius-lg) var(--radius-lg); animation: toastProgress linear forwards; }
.toast-card.tone-error .toast-progress { background: var(--danger); }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }
@media (max-width: 480px) {
  .toast-stack { top: 8px; width: calc(100% - 16px); }
}


.popup-overlay {
  position: fixed; inset: 0; background: rgba(10, 14, 20, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100;
  opacity: 0; transition: opacity .25s var(--ease); pointer-events: none;
}
.popup-overlay.open { opacity: 1; pointer-events: auto; }
.popup-modal {
  background: var(--surface); border-radius: var(--radius-xl); padding: 30px 26px 26px; max-width: 360px; width: 100%;
  text-align: center; box-shadow: var(--shadow-lg); transform: scale(0.92) translateY(10px); transition: transform .25s var(--ease);
}
.popup-overlay.open .popup-modal { transform: scale(1) translateY(0); }
.popup-icon {
  width: 58px; height: 58px; border-radius: 16px; background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto; box-shadow: 0 10px 22px rgba(16,163,127,0.3);
  position: relative; z-index: 1;
}
.popup-icon-ring { position: relative; width: 58px; height: 58px; margin: 0 auto 16px; }
.popup-icon-ring::before, .popup-icon-ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 16px; border: 2px solid var(--accent-2);
  opacity: 0; animation: popupRing 1.8s ease-out infinite;
}
.popup-icon-ring::after { animation-delay: .5s; }
@keyframes popupRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}
.popup-names { margin-bottom: 10px; }
.popup-name-row {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text);
  background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px;
}
.popup-name-more { color: var(--text-muted); font-weight: 600; font-size: 13px; background: var(--surface-2); }
.popup-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; margin: 0 0 10px; }
.popup-text { font-size: 14px; color: var(--text); line-height: 1.5; margin: 0 0 4px; }
.popup-hint { font-size: 12.5px; color: var(--text-muted); margin: 0 0 18px; }


.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 9px 4px 12px; z-index: 30;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; color: var(--text-faint); font-weight: 600; padding: 5px 6px; border-radius: 12px; transition: color .15s, background .15s; flex: 1; min-width: 0; }
.bottom-nav a .icon { transition: transform .15s var(--ease); }
.bottom-nav a.active { color: var(--accent); background: var(--accent-soft); }
.bottom-nav a.active .icon { transform: translateY(-1px); }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.admin-table th { text-align: left; padding: 11px 12px; color: var(--text-faint); font-weight: 700; border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
table.admin-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); }
table.admin-table tr:hover td { background: var(--surface-2); }


.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { max-width: 420px; width: 100%; }

.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-inputs input { width: 46px; height: 54px; text-align: center; font-size: 21px; font-weight: 700; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); font-family: var(--font-display); }
.otp-inputs input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft); }

.icon-circle {
  width: 60px; height: 60px; border-radius: 18px; background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  box-shadow: 0 10px 24px rgba(16, 163, 127, 0.3);
}

/* ---------------- Admin KPI cards ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
}
.kpi-icon {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon.tone-accent { background: var(--accent-soft); color: var(--accent); }
.kpi-icon.tone-gold { background: var(--gold-soft); color: var(--gold); }
.kpi-icon.tone-violet { background: #ece9fb; color: var(--violet); }
.kpi-icon.tone-danger { background: var(--danger-soft); color: var(--danger); }
.kpi-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.4px; }
.kpi-lbl { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }


.admin-avatar-link { display: flex; align-items: center; gap: 10px; }
.admin-avatar-name { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.admin-avatar-circle {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
  font-family: var(--font-display); box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3); flex-shrink: 0;
  transition: transform .15s var(--ease);
}
.admin-avatar-link:hover .admin-avatar-circle { transform: scale(1.06); }

.admin-nav-group-label {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-faint); padding: 16px 14px 6px;
}
.admin-nav-group-label:first-child { padding-top: 4px; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  font-weight: 600; font-size: 13.5px; margin-bottom: 2px; color: var(--text-muted);
  border-left: 3px solid transparent; transition: background .12s var(--ease), color .12s var(--ease);
}
.admin-nav-link:hover { background: var(--surface-2); color: var(--text); }
.admin-nav-link.active { background: var(--accent-soft); color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.admin-nav-danger { color: var(--danger); }
.admin-nav-danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------------- Admin panel: mobile drawer nav ---------------- */
.admin-hamburger {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor: pointer; flex-shrink: 0;
}
.admin-drawer-overlay {
  position: fixed; inset: 0; background: rgba(10,14,20,0.5); z-index: 39;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.admin-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.admin-main { padding: 20px 16px 40px; }

@media (max-width: 699.98px) {
  .admin-shell { display: block; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 300px; z-index: 40;
    background: var(--surface); padding: 18px 12px 24px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .25s var(--ease);
    box-shadow: 10px 0 30px rgba(0,0,0,0.15);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar .admin-drawer-close { display: flex; }
  .admin-main .grid-2 { grid-template-columns: 1fr; }
  .admin-main table.admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-avatar-name { display: none; }
}

.admin-drawer-close { display: none; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 10px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--surface-2); color: var(--text-muted); font-weight: 700; font-size: 13px; cursor: pointer; border: none; }

@media (min-width: 700px) {
  .admin-shell { display: flex; }
  .admin-sidebar { width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); min-height: 100vh; padding: 18px 12px; }
  .admin-main { flex: 1; padding: 30px 34px; }
  .admin-hamburger, .admin-drawer-overlay { display: none !important; }
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card, .hero-balance, .stat { animation: fadeUp .35s var(--ease); }
