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

:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --border: #e7e8f2;
  --text: #1c1d2b;
  --text-muted: #6b6d80;
  --primary: #5b4dfb;
  --primary-dark: #4737d6;
  --primary-light: #eeecff;
  --primary-2: #8f7bff;
  --success: #17a673;
  --success-bg: #e7f9f2;
  --danger: #e5484d;
  --danger-bg: #fdeceb;
  --pending: #c9860a;
  --pending-bg: #fdf3dd;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 12px rgba(30, 30, 60, 0.05);
  --shadow: 0 6px 28px rgba(30, 30, 60, 0.07);
  --shadow-lg: 0 18px 48px rgba(30, 30, 60, 0.12);
  --shadow-hover: 0 14px 36px rgba(30, 30, 60, 0.12);
  --gold: #c9932e;
  --gold-dark: #a5741e;
  --gold-bg: #fbf1de;
  --gold-gradient: linear-gradient(135deg, #f2cc7f 0%, #c9932e 55%, #a5741e 100%);
  --teal: #0f9d8c;
  --teal-bg: #e3f7f4;
  --card-border-glow: rgba(91, 77, 251, 0.08);
}

/* ---------- Tema Gelap (elegan, aksen ungu + emas) ----------
   Catatan: --primary/--primary-dark/--primary-light/--primary-2 SENGAJA
   tidak diubah di sini. Warna tema (data-color) harus tetap identik
   dengan tampilan mode terang saat mode gelap dinyalakan — hanya latar,
   permukaan, border, dan teks yang berubah untuk kenyamanan mata. */
html[data-theme="dark"] {
  --bg: #0e0c18;
  --surface: #1a1830;
  --border: #2f2b4d;
  --text: #f1eefc;
  --text-muted: #9c96bd;
  --success: #3fdba0;
  --success-bg: rgba(63, 219, 160, .14);
  --danger: #ff7d81;
  --danger-bg: rgba(255, 125, 129, .14);
  --pending: #eab254;
  --pending-bg: rgba(234, 178, 84, .14);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .32);
  --shadow: 0 6px 28px rgba(0, 0, 0, .42);
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, .58);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, .5);
  --gold: #e4bb6c;
  --gold-dark: #c79a48;
  --gold-bg: rgba(228, 187, 108, .14);
  --gold-gradient: linear-gradient(135deg, #f6dca0 0%, #e4bb6c 55%, #b98d43 100%);
  --teal: #3fd9c4;
  --teal-bg: rgba(63, 217, 196, .14);
  --card-border-glow: rgba(150, 137, 255, 0.14);
}
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=tel],
html[data-theme="dark"] input[type=date],
html[data-theme="dark"] select {
  background: #211e3a;
  color: var(--text);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus {
  background: #262345;
}
html[data-theme="dark"] tbody tr:hover { background: #201d38; }
html[data-theme="dark"] .badge-neutral { background: #2f2b4d; color: #b7b2d9; }
html[data-theme="dark"] .code-block { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
html[data-theme="dark"] .docs-endpoint { border-color: var(--border); }

/* ---------- Tema Warna (diatur admin lewat Panel Admin → Nama & Logo Web) ----------
   Setiap preset mengganti --primary/--primary-dark/--primary-light/--primary-2 saja,
   supaya seluruh elemen yang sudah memakai variabel tsb (tombol, badge aktif, gradasi
   topbar/kartu saldo, dsb.) otomatis ikut berubah warna tanpa perlu disentuh satu-satu. */
html[data-color="merah"] {
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --primary-light: #fdeceb;
  --primary-2: #f2726b;
}

html[data-color="oranye"] {
  --primary: #ea7a1f;
  --primary-dark: #b95e13;
  --primary-light: #fdecd9;
  --primary-2: #ffa552;
}

html[data-color="kuning"] {
  --primary: #ca8a04;
  --primary-dark: #9a6b04;
  --primary-light: #fdf3d9;
  --primary-2: #eab308;
}

html[data-color="hijau"] {
  --primary: #17a673;
  --primary-dark: #0f7d57;
  --primary-light: #e3f9f0;
  --primary-2: #34c795;
}

html[data-color="biru"] {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #e6eefd;
  --primary-2: #5b8def;
}

html[data-color="ungu"] {
  --primary: #9333ea;
  --primary-dark: #7424bb;
  --primary-light: #f3e8fd;
  --primary-2: #b565f0;
}

html[data-color="pink"] {
  --primary: #db2777;
  --primary-dark: #ad1c5d;
  --primary-light: #fce7f3;
  --primary-2: #f472b6;
}

html[data-color="teal"] {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-light: #e0f7f4;
  --primary-2: #2dd4bf;
}

html[data-color="indigo"] {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eeecfd;
  --primary-2: #818cf8;
}

html[data-color="coklat"] {
  --primary: #92400e;
  --primary-dark: #713409;
  --primary-light: #fbe8d3;
  --primary-2: #c2703d;
}

html[data-color="abuabu"] {
  --primary: #475569;
  --primary-dark: #334155;
  --primary-light: #eef1f5;
  --primary-2: #64748b;
}

html[data-color="maroon"] {
  --primary: #9f1239;
  --primary-dark: #800f2e;
  --primary-light: #fbe7ec;
  --primary-2: #c2185b;
}

html[data-color="lime"] {
  --primary: #65a30d;
  --primary-dark: #4d7c0f;
  --primary-light: #f1f8e0;
  --primary-2: #84cc16;
}

html[data-color="navy"] {
  --primary: #1e3a8a;
  --primary-dark: #172554;
  --primary-light: #e7ecfb;
  --primary-2: #3b5bdb;
}

html[data-color="cyan"] {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --primary-light: #e0f6fb;
  --primary-2: #22d3ee;
}

html[data-color="fuchsia"] {
  --primary: #c026d3;
  --primary-dark: #a21caf;
  --primary-light: #fbe8fb;
  --primary-2: #e879f9;
}

html[data-color="emerald"] {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #e2f8ef;
  --primary-2: #34d399;
}

html[data-color="amber"] {
  --primary: #d97706;
  --primary-dark: #b45309;
  --primary-light: #fdf0d9;
  --primary-2: #fbbf24;
}

html[data-color="sky"] {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --primary-2: #38bdf8;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

body,
.app-frame,
.card,
.topbar,
.bottom-nav,
.balance-card,
.apikey-card,
input, select, .btn,
.alert, .badge, .docs-endpoint {
  transition: background-color .35s ease, background .35s ease,
              color .35s ease, border-color .35s ease, box-shadow .35s ease;
}

/* =====================================================
   APP FRAME — tampilan aplikasi Android, responsif juga
   untuk desktop (dibingkai seperti layar ponsel).
   ===================================================== */
.app-frame {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.app-content {
  flex: 1;
  padding: 16px 16px 24px;
  overflow-y: auto;
  animation: content-fade-in .4s ease both;
}
@keyframes content-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .app-content { animation: none; }
}

/* Top app bar (gaya Android Material) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), var(--shadow-sm);
}
.topbar .brand,
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .dot,
.navbar .brand .dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
/* Pengaman ukuran dasar: logo/dot situs SELALU dibatasi ukurannya walau
   dipakai di luar konteks .topbar/.auth-logo yang biasa (mis. kalau ada
   markup baru lupa membungkusnya), supaya tidak pernah tampil melebar
   tanpa batas seperti gambar mentah biasa. */
.site-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  display: inline-block;
}
.topbar .brand .site-logo-img,
.navbar .brand .site-logo-img {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: none;
}
.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 6px 10px;
  border-radius: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 84px;
  flex: none;
}
.topbar-user .icon-svg {
  color: var(--primary);
  flex: none;
}
.topbar-right .btn-ghost {
  padding: 7px 14px 7px 12px !important;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  gap: 6px;
  white-space: nowrap;
  border-color: var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  box-shadow: var(--shadow-sm);
  letter-spacing: .01em;
}
.topbar-right .btn-ghost:hover {
  border-color: var(--gold);
  color: var(--primary-dark);
  background: var(--gold-bg);
  box-shadow: 0 6px 16px rgba(201, 147, 46, .22);
  transform: translateY(-1px);
}
.topbar-right .btn-primary {
  padding: 7px 16px !important;
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: .01em;
}

/* Layar sangat sempit: sisakan ikon saja supaya topbar tidak pernah
   meluber ke samping (nama situs & label tombol tetap ada via title). */
@media (max-width: 380px) {
  .topbar { padding: 12px 10px; gap: 6px; }
  .topbar .brand { font-size: 13px; gap: 6px; }
  .topbar-right { gap: 4px; }
  .topbar-right .btn-ghost .btn-label,
  .topbar-right .btn-primary .btn-label,
  .topbar-user .topbar-user-label {
    display: none;
  }
  .topbar-right .btn-ghost {
    padding: 8px !important;
    width: 34px;
    height: 34px;
  }
  .topbar-right .btn-primary {
    padding: 8px !important;
    width: 34px;
    height: 34px;
  }
  .topbar-user {
    max-width: none;
    padding: 8px;
    width: 34px;
    height: 34px;
    justify-content: center;
  }
}

/* ---------- Toggle Dark Mode (tombol bulat, ikon matahari/bintang) ---------- */
.theme-toggle {
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(150deg, #ffffff 0%, #f3e6c9 100%);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(30, 20, 60, .18), 0 0 0 1px rgba(201, 147, 46, .12);
  -webkit-tap-highlight-color: transparent;
  transition: background .4s ease, border-color .3s ease, box-shadow .3s ease, transform .2s ease;
}
html[data-theme="dark"] .theme-toggle {
  background: linear-gradient(150deg, #4a3b86 0%, #232042 100%);
  border-color: #4a3f78;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(150, 137, 255, .2);
}
.theme-toggle:hover { border-color: var(--gold); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-toggle .icon-svg {
  position: absolute;
  width: 17px;
  height: 17px;
  transition: opacity .3s ease, transform .35s ease;
}
.theme-toggle .icon-sun {
  color: var(--gold);
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.theme-toggle .icon-star {
  color: #cdbfff;
  opacity: 0;
  transform: scale(.4) rotate(-40deg);
}
html[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(.4) rotate(40deg);
}
html[data-theme="dark"] .theme-toggle .icon-star {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle-floating {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
}

/* Pengumuman berjalan (marquee) di atas konten, diatur dari Panel Admin */
.announcement-bar {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.announcement-bar.announcement-green {
  background: var(--success-bg);
  color: var(--success);
}
.announcement-bar.announcement-red {
  background: var(--danger-bg);
  color: var(--danger);
}
.announcement-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: announcement-scroll 18s linear infinite;
  will-change: transform;
}
.announcement-text {
  display: inline-block;
  padding: 9px 48px 9px 24px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1px;
}
@keyframes announcement-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-track { animation: none; }
  .announcement-bar { overflow-x: auto; }
}

/* Bottom navigation (gaya Android bottom nav bar) */
.bottom-nav {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -6px 20px rgba(20, 20, 50, .05);
}
.nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.1px;
  transition: color .15s;
}
.nav-item .icon-svg {
  width: 21px;
  height: 21px;
  color: var(--text-muted);
  transition: color .18s, filter .18s, transform .18s;
}
.nav-item:hover { color: var(--primary); }
.nav-item:hover .icon-svg { color: var(--primary); transform: translateY(-1px); }
.nav-item.active { color: var(--primary); }

/* Setiap ikon nav punya warna aksen "mewah" sendiri saat aktif/hover,
   supaya tampilan bottom-nav lebih hidup dan berwarna. Daftar ini
   mengikuti SEMUA ikon yang dipakai memberNavItems() (functions.php)
   supaya tidak ada item yang "polos" sendirian saat lainnya berwarna. */
.nav-item.active .icon-home,
.nav-item:hover .icon-home {
  color: var(--primary);
  filter: drop-shadow(0 3px 8px rgba(91, 77, 251, .45));
}
.nav-item.active .icon-download,
.nav-item:hover .icon-download {
  color: var(--gold);
  filter: drop-shadow(0 3px 8px rgba(201, 147, 46, .4));
}
.nav-item.active .icon-phone,
.nav-item:hover .icon-phone {
  color: var(--teal);
  filter: drop-shadow(0 3px 8px rgba(15, 157, 140, .4));
}
.nav-item.active .icon-wallet,
.nav-item:hover .icon-wallet {
  color: var(--gold);
  filter: drop-shadow(0 3px 8px rgba(201, 147, 46, .4));
}
.nav-item.active .icon-key,
.nav-item:hover .icon-key {
  color: var(--teal);
  filter: drop-shadow(0 3px 8px rgba(15, 157, 140, .4));
}
.nav-item.active .icon-logout,
.nav-item:hover .icon-logout {
  color: var(--danger);
  filter: drop-shadow(0 3px 8px rgba(229, 72, 77, .35));
}
.nav-item.active .icon-user,
.nav-item:hover .icon-user {
  color: var(--primary);
  filter: drop-shadow(0 3px 8px rgba(91, 77, 251, .4));
}

/* =====================================================
   Menu Sidebar Member (mode "sidebar") — panel geser dari
   kanan, dibuka lewat tombol hamburger di topbar. Alternatif
   dari .bottom-nav, dipilih admin lewat Panel Admin.
   ===================================================== */
.member-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 13, 30, .45);
  z-index: 40;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.member-sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease;
}
.member-sidebar-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: var(--surface);
  z-index: 41;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.member-sidebar-panel.open { transform: translateX(0); }
.member-sidebar-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.member-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 52px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.member-sidebar-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-sidebar-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}
.member-sidebar-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.member-sidebar-list {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 2px;
}
.member-sidebar-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 12px;
  border-radius: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(14px);
  transition: background-color .15s ease, color .15s ease, opacity .3s ease, transform .3s cubic-bezier(.22, .8, .3, 1);
}
.member-sidebar-panel.open .member-sidebar-item { opacity: 1; transform: translateX(0); }
.member-sidebar-panel.open .member-sidebar-item:nth-child(1) { transition-delay: .05s; }
.member-sidebar-panel.open .member-sidebar-item:nth-child(2) { transition-delay: .09s; }
.member-sidebar-panel.open .member-sidebar-item:nth-child(3) { transition-delay: .13s; }
.member-sidebar-panel.open .member-sidebar-item:nth-child(4) { transition-delay: .17s; }
.member-sidebar-panel.open .member-sidebar-item:nth-child(5) { transition-delay: .21s; }
.member-sidebar-panel.open .member-sidebar-item:nth-child(6) { transition-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  .member-sidebar-item { opacity: 1; transform: none; transition: background-color .15s ease, color .15s ease; }
}
.member-sidebar-item .icon-svg { color: var(--text-muted); flex: none; }
.member-sidebar-item:hover,
.member-sidebar-item.active { background: var(--primary-light); color: var(--primary-dark); }
.member-sidebar-item:hover .icon-svg,
.member-sidebar-item.active .icon-svg { color: var(--primary); }
.member-sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 18px;
  border-top: 1px solid var(--border);
}
.member-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 11px;
  color: var(--danger);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.member-sidebar-logout:hover { background: var(--danger-bg); }

/* Bingkai ala ponsel saat dibuka di layar lebar (desktop/tablet) */
@media (min-width: 560px) {
  body {
    display: flex;
    justify-content: center;
    padding: 32px 16px;
  }
  .app-frame {
    width: 430px;
    min-height: 860px;
    max-height: 860px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(20, 20, 50, 0.28), 0 0 0 10px #15151f, 0 0 0 11px #33334a;
  }
  .app-content { overflow-y: auto; }
}

/* =====================================================
   Halaman "Grup Komunitas" — hero kecil di atas halaman
   + kartu grup WhatsApp/Telegram yang dikelola admin.
   ===================================================== */
@keyframes hero-pop {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.page-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-light), transparent);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  animation: hero-pop .45s cubic-bezier(.22, .8, .3, 1) both;
}
.page-hero-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(91, 77, 251, .35);
}
.page-hero-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.page-hero-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }

.community-section { animation: card-rise .45s cubic-bezier(.22, .8, .3, 1) both; }
.community-section + .community-section { margin-top: 22px; }
.community-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.community-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.community-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform .22s cubic-bezier(.34, 1.4, .64, 1), box-shadow .22s ease, border-color .22s ease;
  animation: card-rise .4s cubic-bezier(.22, .8, .3, 1) both;
}
.community-grid .community-card:nth-child(2) { animation-delay: .05s; }
.community-grid .community-card:nth-child(3) { animation-delay: .1s; }
.community-grid .community-card:nth-child(4) { animation-delay: .15s; }
.community-grid .community-card:nth-child(5) { animation-delay: .2s; }
.community-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent, var(--primary));
}
.community-card:active { transform: translateY(0) scale(.98); }
.community-card-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, var(--primary)) 14%, transparent);
  color: var(--accent, var(--primary));
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.community-card:hover .community-card-icon { transform: scale(1.08) rotate(-4deg); }
.community-card-body { flex: 1; min-width: 0; }
.community-card-title {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-card-go {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, var(--primary));
  background: color-mix(in srgb, var(--accent, var(--primary)) 10%, transparent);
  transition: transform .22s ease;
}
.community-card:hover .community-card-go { transform: translateX(2px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .page-hero, .community-section, .community-card { animation: none; }
  .community-card:hover, .community-card:hover .community-card-icon, .community-card:hover .community-card-go { transform: none; }
}

/* ---------- Cards ---------- */
@keyframes card-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--card-border-glow) inset;
  padding: 20px;
  animation: card-rise .45s cubic-bezier(.22, .8, .3, 1) both;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.card:hover {
  box-shadow: var(--shadow-hover), 0 0 0 1px var(--card-border-glow) inset;
  transform: translateY(-2px);
}
.card + .card { margin-top: 20px; }
.card:nth-of-type(2) { animation-delay: .05s; }
.card:nth-of-type(3) { animation-delay: .1s; }
.card:nth-of-type(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .card:hover { transform: none; }
}

.grid-2 {
  display: block;
}

/* ---------- Balance card ---------- */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: card-rise .5s cubic-bezier(.22, .8, .3, 1) both;
  transition: box-shadow .25s ease, transform .25s ease;
}
.balance-card::before {
  content: '';
  position: absolute;
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  bottom: -55px; left: -35px;
}
.balance-card::after {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -80px; right: -60px;
}
.balance-card > * { position: relative; z-index: 1; }
.balance-card:hover {
  box-shadow: 0 20px 52px rgba(91, 77, 251, .36);
  transform: translateY(-2px);
}
.balance-card .label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: .85;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
}
.balance-card .amount {
  font-size: 34px;
  font-weight: 800;
  margin: 6px 0 2px;
  position: relative;
  letter-spacing: -.01em;
}
.balance-card .username {
  font-size: 13px;
  opacity: .8;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
}
@media (prefers-reduced-motion: reduce) {
  .balance-card { animation: none; }
  .balance-card:hover { transform: none; }
}

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0 0 4px; font-weight: 700; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 16px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 13px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  flex: none;
}
.subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* ---------- Forms ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
input[type=text], input[type=number], input[type=email], input[type=password], input[type=tel], input[type=date], select, textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fbfbfe;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: #fff;
}
.field { margin-bottom: 18px; }
.webhook-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.webhook-copy-row input {
  flex: 1;
  min-width: 0;
}
.webhook-copy-row .webhook-copy-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 16px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(91, 77, 251, 0.35);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); box-shadow: 0 8px 22px rgba(91, 77, 251, 0.42); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-gold-solid {
  background: var(--gold-gradient);
  color: #3a2a08;
  box-shadow: 0 4px 16px rgba(201, 147, 46, .35);
}
.btn-gold-solid:hover { box-shadow: 0 8px 22px rgba(201, 147, 46, .45); transform: translateY(-1px); }

/* ---------- Table ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--primary-light);
}
thead tr:first-child th:first-child { border-top-left-radius: 10px; }
thead tr:first-child th:last-child { border-top-right-radius: 10px; }
tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  transition: background-color .15s ease;
}
tbody tr:last-child td { border-bottom: none; }
@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
tbody tr {
  transition: background-color .15s ease;
  animation: row-in .35s ease both;
}
tbody tr:nth-child(1) { animation-delay: 0s; }
tbody tr:nth-child(2) { animation-delay: .03s; }
tbody tr:nth-child(3) { animation-delay: .06s; }
tbody tr:nth-child(4) { animation-delay: .09s; }
tbody tr:nth-child(5) { animation-delay: .12s; }
tbody tr:nth-child(n+6) { animation-delay: .15s; }
tbody tr:hover { background: var(--primary-light); }
@media (prefers-reduced-motion: reduce) {
  tbody tr { animation: none; }
}
.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 13px; color: var(--text-muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--pending-bg); color: var(--pending); }
.badge-neutral { background: #eee; color: #666; }

/* ---------- Alerts ---------- */
@keyframes alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
  border-left: 3px solid currentColor;
  animation: alert-in .3s ease both;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger  { background: var(--danger-bg); color: var(--danger); }

/* ---------- Invoice page ---------- */
.invoice-box {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}
.qr-frame {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  box-shadow: var(--shadow);
}
.qr-frame img {
  width: 260px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 8px;
}
.invoice-amount {
  font-size: 32px;
  font-weight: 800;
  margin: 18px 0 4px;
}
.invoice-meta {
  color: var(--text-muted);
  font-size: 13px;
}
.countdown {
  font-weight: 700;
  color: var(--primary);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  margin-top: 18px;
}
.status-pill .icon-svg { width: 18px; height: 18px; flex: none; }
.status-pill.waiting { background: var(--pending-bg); color: var(--pending); }
.status-pill.paid { background: var(--success-bg); color: var(--success); filter: drop-shadow(0 2px 6px rgba(23, 166, 115, .18)); }
.status-pill.expired { background: var(--danger-bg); color: var(--danger); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0% { opacity: .3; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: .3; transform: scale(.8); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  opacity: .85;
}
.empty-state .empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}

.text-muted { color: var(--text-muted); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mt-24 { margin-top: 24px; }

/* ---------- Auth pages (login/register) ---------- */
.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-logo .dot {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(91, 77, 251, 0.35);
}
.auth-logo .site-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(91, 77, 251, 0.35);
}
.auth-appname {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
.auth-card { padding: 24px; }
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}
.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }
.legal-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}
.legal-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}
.legal-footer a:hover { color: var(--primary); }
.legal-footer-dot { margin: 0 8px; }
.legal-page {
  max-width: 640px;
  margin: 0 auto;
}
.legal-page .legal-body {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  margin-top: 4px;
}

/* ---------- Kartu API Key member (mewah: emas + ungu) ---------- */
.apikey-card {
  background: linear-gradient(135deg, #232042 0%, #322a5e 55%, #4a3b86 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.apikey-card::before {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(201,147,46,.28), transparent 70%);
  top: -100px; right: -80px;
  pointer-events: none;
  z-index: 0;
}
.apikey-card .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .8;
  font-weight: 600;
}
.apikey-card .label .icon-svg { color: var(--gold); width: 16px; height: 16px; }
.apikey-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  padding: 12px 14px;
  position: relative;
  z-index: 1;
}
.apikey-box .mono {
  flex: 1;
  color: #fff;
  font-size: 13.5px;
  letter-spacing: .02em;
  word-break: break-all;
}
.apikey-box button {
  flex: none;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.apikey-box button:hover { background: var(--gold); color: #2a1f04; }
.apikey-box .icon-svg { width: 17px; height: 17px; }
.apikey-hint { font-size: 12.5px; opacity: .75; margin-top: 12px; position: relative; z-index: 1; }
.apikey-actions { margin-top: 18px; display: flex; gap: 10px; position: relative; z-index: 1; }
.btn-gold {
  background: linear-gradient(135deg, #dbb24f, var(--gold));
  color: #2a1f04;
  box-shadow: 0 4px 14px rgba(201, 147, 46, .35);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.btn-outline-light:hover { border-color: #fff; }

/* ---------- Dokumentasi API ---------- */
.docs-endpoint {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.docs-endpoint + .docs-endpoint { margin-top: 14px; }
.docs-endpoint-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.method-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 6px;
  color: #fff;
}
.method-get  { background: var(--teal); }
.method-post { background: var(--primary); }
.docs-endpoint-path {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.docs-endpoint-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.code-block {
  background: #1b1b2a;
  color: #d7d9f7;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}
.code-block .tok-key   { color: #f2c879; }
.code-block .tok-str   { color: #9cd67b; }
.code-block .tok-punc  { color: #7d81a6; }
.docs-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--teal-bg);
  color: #0b5c52;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}
.docs-note .icon-svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---------- Panel Admin ---------- */
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.badge-admin { background: var(--gold-bg); color: var(--gold); }
.badge-inactive { background: #eee; color: #999; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 4px;
}
.stat-grid .stat-card { animation: card-rise .4s cubic-bezier(.22, .8, .3, 1) both; }
.stat-grid .stat-card:nth-child(1) { animation-delay: 0s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: .04s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: .08s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: .12s; }
.stat-grid .stat-card:nth-child(5) { animation-delay: .16s; }
.stat-grid .stat-card:nth-child(6) { animation-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .stat-grid .stat-card { animation: none; }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card:nth-of-type(3n+2)::before { background: var(--gold-gradient); }
.stat-card:nth-of-type(3n+3)::before { background: linear-gradient(90deg, var(--teal), #34c795); }
.stat-card .stat-label { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-tab {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.search-form { display: flex; gap: 10px; margin-bottom: 18px; }
.search-form input { flex: 1; }

/* Form filter Riwayat Transaksi (tipe + rentang tanggal) */
.history-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.history-filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.history-filter-actions .btn { flex: 1; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pagination-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pagination-btn:hover { border-color: var(--primary); color: var(--primary); }
.pagination-btn.disabled {
  pointer-events: none;
  opacity: .4;
}
.pagination-info {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  flex: 1;
}

/* Daftar Rekening Penarikan tersimpan (Profil) */
.withdraw-account-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.withdraw-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-wrap: wrap;
}
.withdraw-account-method {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.withdraw-account-number { font-size: 13px; }
.withdraw-account-name { font-size: 12.5px; margin-top: 2px; }
.withdraw-account-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.admin-header .back-link:hover { color: var(--primary); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.detail-item .detail-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.detail-item .detail-value { font-size: 14.5px; font-weight: 600; word-break: break-all; }

.action-row { display: flex; gap: 8px; flex-wrap: wrap; }

.qr-mini { width: 120px; height: 120px; border-radius: 10px; border: 1px solid var(--border); }

/* =====================================================
   Menu Hamburger (Panel Admin) — merapikan tombol-tombol
   pengaturan yang sebelumnya berjejer di topbar
   ===================================================== */
.hamburger-btn {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, color .18s ease, transform .18s cubic-bezier(.34, 1.56, .64, 1), background .18s ease;
}
.hamburger-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.hamburger-btn:active { transform: scale(.92); }
.hamburger-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); background: var(--primary-light); transform: rotate(90deg); }
.hamburger-btn .menu-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}
.menu-wrap { position: relative; flex: none; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(.96);
  transition: opacity .18s ease, transform .18s cubic-bezier(.34, 1.4, .64, 1), visibility 0s linear .18s;
}
.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity .18s ease, transform .18s cubic-bezier(.34, 1.4, .64, 1);
}
@media (prefers-reduced-motion: reduce) {
  .dropdown-menu { transition: opacity .12s ease; transform: none; }
  .dropdown-menu.open { transform: none; }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.dropdown-item:hover { background: var(--primary-light); color: var(--primary-dark); transform: translateX(2px); }
.dropdown-item .icon-svg { color: var(--text-muted); flex: none; transition: color .15s ease, transform .15s ease; }
.dropdown-item:hover .icon-svg { color: var(--primary); transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) {
  .dropdown-item:hover { transform: none; }
  .dropdown-item:hover .icon-svg { transform: none; }
}
.dropdown-item span { flex: 1; }
.menu-badge {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* =====================================================
   Live Chat — widget mengambang di sisi member
   ===================================================== */
.chat-fab {
  position: absolute;
  right: 16px;
  bottom: 80px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 25;
  -webkit-tap-highlight-color: transparent;
}
.chat-fab .icon-svg { width: 24px; height: 24px; }
.chat-fab .chat-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  border: 2px solid var(--surface);
  display: none;
}
.chat-fab .chat-fab-badge.show { display: block; }

.chat-panel {
  position: absolute;
  right: 14px;
  bottom: 144px;
  width: calc(100% - 28px);
  max-width: 340px;
  height: min(460px, calc(100% - 200px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 26;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  flex: none;
}
.chat-panel-head-title { font-size: 14px; font-weight: 700; }
.chat-panel-head-sub { font-size: 11.5px; opacity: .85; margin-top: 1px; }
.chat-panel-close {
  background: rgba(255,255,255,.18);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.chat-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
}
.chat-bubble {
  max-width: 78%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.chat-bubble .chat-bubble-time {
  display: block;
  font-size: 10px;
  opacity: .65;
  margin-top: 3px;
}
.chat-bubble.from-member {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.from-admin {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.chat-panel-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 20px;
}
.chat-panel-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: none;
}
.chat-panel-form textarea {
  flex: 1;
  resize: none;
  height: 38px;
  max-height: 80px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
}
.chat-panel-form button {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.chat-panel-form button:disabled { opacity: .5; cursor: default; }

/* =====================================================
   Live Chat — Panel Admin (daftar percakapan & balasan)
   ===================================================== */
.chat-thread-list { display: flex; flex-direction: column; gap: 6px; }
.chat-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.chat-thread-item:hover { border-color: var(--primary); }
.chat-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex: none;
}
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-name { font-size: 13.5px; font-weight: 700; }
.chat-thread-msg {
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.chat-thread-meta { flex: none; text-align: right; }
.chat-thread-time { font-size: 11px; color: var(--text-muted); }

.chat-conv-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-height: 340px;
  max-height: 52vh;
}
.chat-conv-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.chat-conv-form textarea {
  flex: 1;
  resize: none;
  height: 44px;
  max-height: 100px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  background: var(--surface);
  color: var(--text);
}

/* ---------- Pemilih Tema Warna (Panel Admin → Nama & Logo Web) ---------- */
.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  margin: 4px 0 2px;
}
.color-swatch-item {
  position: relative;
}
.color-swatch-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.color-swatch-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.color-swatch-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.color-swatch-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}
.color-swatch-item input[type="radio"]:checked + .color-swatch-label {
  border-color: var(--primary);
  background: var(--primary-light);
}
.color-swatch-item input[type="radio"]:checked + .color-swatch-label .color-swatch-name {
  color: var(--primary-dark);
}
.color-swatch-item input[type="radio"]:focus-visible + .color-swatch-label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Modal PIN Transaksi (konfirmasi sebelum penarikan dana) ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 12, 30, .55);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.modal-box .modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.modal-box .section-title {
  justify-content: center;
}
.modal-box .subtitle {
  margin-bottom: 18px;
}
.pin-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 6px;
}
.pin-box {
  width: 42px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border-radius: 12px;
  padding: 0;
}
.pin-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 10px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.modal-actions .btn {
  flex: 1;
}

/* =====================================================
   ROBOT WIDGET — dua karakter robot di beranda member
   (di atas kartu deposit), nama & pesan diatur admin.
   Versi "premium": glow ambient, kilauan bintang, bayangan
   lantai, dan animasi idle yang lebih hidup & elegan.
   ===================================================== */
.robot-tap-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .01em;
  margin-bottom: 10px;
  animation: robot-hint-pulse 2.2s ease-in-out infinite;
}
@keyframes robot-hint-pulse {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1; }
}

.robot-stage {
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(255,255,255,.20) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(90% 70% at 85% 100%, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: 98px 14px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow:
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, .25),
    inset 0 -30px 40px -30px rgba(0, 0, 0, .28);
}
/* taburan "bintang" kecil yang berkelip pelan — kesan mewah & hidup */
.robot-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,.9) 0, rgba(255,255,255,0) 100%),
    radial-gradient(1.6px 1.6px at 78% 14%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 100%),
    radial-gradient(1.4px 1.4px at 92% 38%, rgba(255,255,255,.7) 0, rgba(255,255,255,0) 100%),
    radial-gradient(1.4px 1.4px at 34% 10%, rgba(255,255,255,.65) 0, rgba(255,255,255,0) 100%),
    radial-gradient(1.8px 1.8px at 60% 26%, rgba(255,255,255,.8) 0, rgba(255,255,255,0) 100%),
    radial-gradient(1.3px 1.3px at 8% 45%, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 100%);
  animation: robot-sparkle 3.6s ease-in-out infinite;
}
@keyframes robot-sparkle {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}
/* kilau tipis yang menyapu pelan di bagian atas panggung */
.robot-stage::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 55%;
  height: 220%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.16) 45%, rgba(255,255,255,0) 90%);
  transform: rotate(12deg);
  animation: robot-sheen 6.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes robot-sheen {
  0%   { left: -30%; opacity: 0; }
  15%  { opacity: .9; }
  45%  { opacity: 0; }
  100% { left: 120%; opacity: 0; }
}

/* bulatan dekoratif, gaya sama seperti kartu saldo member */
.robot-stage-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.robot-stage-circle-1 {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, .07);
  bottom: -55px;
  left: -35px;
}
.robot-stage-circle-2 {
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, .08);
  top: -80px;
  right: -60px;
}

.robot-caption {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  font-size: 12.5px;
  opacity: .88;
  letter-spacing: .01em;
  margin-bottom: 14px;
}
.robot-caption b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .015em;
  margin-bottom: 3px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}

.robot-floor {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 8px 30px;
}

.bot-wrap {
  position: relative;
  width: 60px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  transition: transform 1.1s cubic-bezier(.4, 0, .2, 1);
  z-index: 2;
  filter: drop-shadow(0 8px 11px rgba(0, 0, 0, .22));
}
.bot-wrap.mover { z-index: 3; }

/* bayangan lantai elips di bawah tiap robot, ikut "bernapas" dengan idle */
.bot-wrap::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 38px;
  height: 8px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,.32) 0%, rgba(0,0,0,0) 75%);
  transform: translateX(-50%) scale(1);
  animation: robot-shadow-pulse 2.4s ease-in-out infinite;
  z-index: -1;
}
@keyframes robot-shadow-pulse {
  0%, 100% { transform: translateX(-50%) scale(1);   opacity: .85; }
  50%      { transform: translateX(-50%) scale(.78); opacity: .5; }
}

.robot-name {
  position: absolute;
  top: 100%;
  margin-top: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .05em;
  white-space: nowrap;
  padding: 3px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
}

.robot-figure {
  position: relative;
  width: 47px;
  animation: robot-idle 2.6s ease-in-out infinite;
  transform-origin: 50% 100%;
}

/* Varian gambar custom (PNG/SVG unggahan admin), menggantikan ilustrasi
   CSS bawaan. Tetap pakai animasi & transform yang sama supaya jalan/
   bergoyang tetap konsisten dengan versi ilustrasi. */
.robot-figure-img {
  height: 47px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
@keyframes robot-idle {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  25%      { transform: translateY(-2px) rotate(-1.5deg); }
  50%      { transform: translateY(-5px) rotate(0deg); }
  75%      { transform: translateY(-2px) rotate(1.5deg); }
}

.robot-antenna {
  width: 3px;
  height: 10px;
  background: rgba(255, 255, 255, .85);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}
.robot-antenna::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent), 0 0 14px var(--accent);
  animation: robot-blink 1.6s ease-in-out infinite;
}
@keyframes robot-blink { 0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } 50% { opacity: .35; transform: translateX(-50%) scale(.85); } }

.robot-head {
  width: 41px;
  height: 34px;
  margin: 2px auto 0;
  background: linear-gradient(160deg, var(--light), var(--main));
  border-radius: 12px;
  position: relative;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, .12), inset 0 2px 3px rgba(255,255,255,.35), 0 4px 10px rgba(0, 0, 0, .18);
}
.robot-face {
  position: absolute;
  inset: 6px 4px auto 4px;
  height: 19px;
  background: #26264a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
}
.robot-eye {
  width: 5px;
  height: 7px;
  background: var(--accent);
  border-radius: 3px;
  animation: robot-eyeblink 3.6s ease-in-out infinite;
  box-shadow: 0 0 5px var(--accent), 0 0 10px var(--accent);
}
@keyframes robot-eyeblink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.15); } }

.robot-body {
  width: 48px;
  height: 36px;
  margin: -3px auto 0;
  background: linear-gradient(160deg, var(--light), var(--main));
  border-radius: 14px;
  position: relative;
  box-shadow: inset 0 -5px 8px rgba(0, 0, 0, .12), inset 0 2px 3px rgba(255,255,255,.3), 0 5px 10px rgba(0, 0, 0, .16);
}
.robot-panel {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 20px;
  height: 14px;
  background: rgba(255, 255, 255, .35);
  border-radius: 6px;
}
.robot-panel::before, .robot-panel::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  top: 5px;
  background: var(--accent);
  box-shadow: 0 0 4px var(--accent);
  animation: robot-blink 1.8s ease-in-out infinite;
}
.robot-panel::before { left: 3px; }
.robot-panel::after  { right: 3px; animation-delay: .5s; }

.robot-arm {
  position: absolute;
  top: 4px;
  width: 8px;
  height: 18px;
  border-radius: 6px;
  background: var(--main);
}
.robot-arm-l { left: -6px; transform-origin: top center; }
.robot-arm-r { right: -6px; transform-origin: top center; }

.robot-legs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.robot-leg {
  width: 9px;
  height: 12px;
  background: var(--main);
  border-radius: 4px;
  transform-origin: top center;
}

/* animasi jalan, dipicu lewat class .walking di .bot-wrap */
.bot-wrap.walking .robot-figure   { animation: robot-bob .4s ease-in-out infinite; }
.bot-wrap.walking .robot-leg-l    { animation: robot-stepL .4s ease-in-out infinite; }
.bot-wrap.walking .robot-leg-r    { animation: robot-stepR .4s ease-in-out infinite; }
.bot-wrap.walking .robot-arm-l    { animation: robot-swingL .4s ease-in-out infinite; }
.bot-wrap.walking .robot-arm-r    { animation: robot-swingR .4s ease-in-out infinite; }
.bot-wrap.walking::before         { animation: robot-shadow-walk .4s ease-in-out infinite; }

@keyframes robot-stepL  { 0%, 100% { transform: rotate(22deg); }  50% { transform: rotate(-22deg); } }
@keyframes robot-stepR  { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }
@keyframes robot-swingL { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }
@keyframes robot-swingR { 0%, 100% { transform: rotate(18deg); }  50% { transform: rotate(-18deg); } }
@keyframes robot-bob    { 0%, 100% { transform: translateY(0); }  50% { transform: translateY(-3px); } }
@keyframes robot-shadow-walk { 0%, 100% { transform: translateX(-50%) scale(.9); } 50% { transform: translateX(-50%) scale(1.05); } }

.bot-wrap.face-left .robot-figure { transform: scaleX(-1); }

.bot-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(14px) scale(.85);
  background: #fff;
  color: #2b2b45;
  padding: 9px 13px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  width: max-content;
  max-width: 155px;
  text-align: center;
  overflow: visible;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(.34, 1.56, .64, 1), transform .3s cubic-bezier(.34, 1.56, .64, 1);
  margin-bottom: 11px;
  z-index: 5;
}
.bot-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  padding: 1px;
  background: linear-gradient(135deg, var(--gold, #e4bb6c), rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .55;
  pointer-events: none;
}
.bot-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.1));
}
.bot-bubble.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

@media (max-width: 360px) {
  .bot-wrap { width: 54px; }
  .robot-figure { width: 42px; }
  .robot-figure-img { height: 42px; }
}

/* ---------- Beranda: Kartu Saldo dengan aksi Deposit/Tarik ---------- */
.balance-card .icon-badge {
  position: absolute;
  top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.16);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.balance-card .icon-badge .icon-svg { width: 19px; height: 19px; }
.balance-card .balance-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.balance-card .balance-actions .btn {
  flex: 1;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.balance-card .balance-actions .btn:active { transform: scale(.97); }
.balance-card .balance-actions .btn-deposit {
  background: #fff;
  color: var(--primary-dark);
}
.balance-card .balance-actions .btn-deposit:hover { filter: brightness(1.03); }
.balance-card .balance-actions .btn-tarik {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.balance-card .balance-actions .btn-tarik:hover { background: rgba(255,255,255,0.24); }

/* ---------- Beranda: Ringkasan Deposit/Withdraw ---------- */
.dash-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 420px) {
  .dash-summary-grid { grid-template-columns: 1fr; }
}
.dash-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}
.dash-summary-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.dash-summary-card .row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.dash-summary-card .summary-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.dash-summary-card .summary-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-summary-card .summary-icon .icon-svg { width: 16px; height: 16px; }
.dash-summary-card .summary-icon.deposit { background: var(--primary-light); color: var(--primary); }
.dash-summary-card .summary-icon.withdraw { background: var(--gold-bg); color: var(--gold-dark); }
.dash-summary-card .summary-value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 14px;
  letter-spacing: -.01em;
}
.dash-summary-card .summary-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.dash-summary-card .summary-sub .dot-active {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 5px;
}
.dash-summary-card .summary-sub strong { color: var(--success); font-weight: 700; }

/* ---------- Beranda: Kartu header ikon (Tren Transaksi / Developer API Key) ---------- */
.dash-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.dash-card-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--text, #1a1830) 0%, #3a3560 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-card-icon .icon-svg { width: 17px; height: 17px; }
.dash-card-head-text .dash-card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.dash-card-head-text .dash-card-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Beranda: Pil persentase tren ---------- */
.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}
.trend-pill.up { background: var(--success-bg); color: var(--success); }
.trend-pill.down { background: var(--danger-bg); color: var(--danger); }

/* ---------- Beranda: Grafik tren transaksi (SVG) ---------- */
.trend-chart-wrap { overflow-x: auto; margin: 0 -4px; }
.trend-chart-wrap svg { display: block; min-width: 100%; }
.trend-chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}
.trend-chart-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.trend-chart-legend .legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.trend-chart-legend .legend-dot.deposit { background: var(--primary); }
.trend-chart-legend .legend-dot.withdraw { background: var(--gold-dark); }
.trend-chart-footer {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.trend-chart-footer strong { color: var(--text); font-weight: 700; }

/* ---------- Beranda: Widget mini Developer API Key ---------- */
.dash-apikey-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft, #fbfbfe);
  padding: 6px 6px 6px 14px;
  margin-top: 12px;
}
.dash-apikey-box .mono {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-apikey-box button {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border: none;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dash-apikey-box button:hover { background: var(--primary); color: #fff; }
.dash-apikey-box button .icon-svg { width: 15px; height: 15px; }

/* ---------- Beranda: Header link "Lihat Semua" ---------- */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title-row .section-title { margin-bottom: 0; }
.section-title-row .view-all-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.section-title-row .view-all-link:hover { text-decoration: underline; }
