/* ================================================================
   AustinPay — UI v3  "Mint Wallet"
   Dimuat SETELAH style.css. Semua class & ID lama tetap dipakai
   (JS tidak perlu diubah), hanya tampilan & layout yang dirombak:
   - latar mint, kartu putih ber-outline tipis, tombol pill
   - tile aksi warna-warni, kartu transaksi bertumpuk
   - navigasi bawah (dock) + menu lengkap sebagai drawer
================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&display=swap');

:root {
  --ink: #0d0f0e;
  --bg: #c9f3e4;
  --bg-card: #ffffff;
  --bg-sidebar: #0d0f0e;
  --border: #0d0f0e;
  --line: rgba(13, 15, 14, .12);
  --text: #0d0f0e;
  --text-muted: #5b6d66;

  --primary: #12a46a;
  --primary-dark: #0c8a57;
  --primary-light: #d9f7ea;

  --c-green: #3fd19a;
  --c-yellow: #fbe76e;
  --c-orange: #ffac4b;
  --c-purple: #a78bfa;
  --c-indigo: #5b3fe6;
  --c-blue: #a2d3f5;

  --success: #12a46a;
  --success-light: #c4f1de;
  --danger: #e5484d;
  --danger-light: #ffd9d9;
  --warning: #e08a00;
  --warning-light: #ffefc2;
  --info: #2a7fc4;
  --info-light: #d3e9fa;

  --shadow: none;
  --shadow-md: 0 6px 0 rgba(13, 15, 14, .9);
  --shadow-lg: 0 18px 40px rgba(13, 15, 14, .18);
  --radius: 22px;
  --radius-sm: 16px;
  --radius-lg: 30px;
  --header-h: 76px;
  --sidebar-w: 300px;
  --dock-h: 76px;
  --font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
}

[data-theme="dark"] {
  --ink: #e8fff6;
  --bg: #0b1612;
  --bg-card: #12211b;
  --bg-sidebar: #0e1b16;
  --border: rgba(214, 255, 238, .28);
  --line: rgba(214, 255, 238, .12);
  --text: #e8fff6;
  --text-muted: #8fb0a3;
  --primary: #3fd19a;
  --primary-dark: #2db583;
  --primary-light: rgba(63, 209, 154, .14);
  --success: #3fd19a;
  --success-light: rgba(63, 209, 154, .16);
  --danger: #ff7b80;
  --danger-light: rgba(255, 123, 128, .14);
  --warning: #ffc04d;
  --warning-light: rgba(255, 192, 77, .14);
  --info: #7cc2f5;
  --info-light: rgba(124, 194, 245, .14);
  --shadow-md: 0 6px 0 rgba(0, 0, 0, .5);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .5);
  --sidebar-text: #8fb0a3;
  --sidebar-text-active: #e8fff6;
}

/* ── Dasar ──────────────────────────────────────────────────── */
html body {
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.005em;
}
* { -webkit-tap-highlight-color: rgba(18, 164, 106, .22); }
:focus-visible { outline: 3px solid var(--c-indigo); outline-offset: 2px; }
::selection { background: var(--c-yellow); color: #0d0f0e; }
h1, h2, h3, .section-title, .card-title { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.02em; }

/* ── Layout: tanpa sidebar tetap, konten di tengah ──────────── */
html body .app-layout { display: block; }
html body .main-content {
  margin-left: 0 !important;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto !important;
  padding-bottom: calc(var(--dock-h) + 48px);
  overflow-x: clip;
}
html body .page-content { padding: 6px 20px 24px; padding-top: calc(var(--header-h) + 8px); }

/* ── Topbar: judul besar + tombol bulat ─────────────────────── */
html body .topbar {
  left: 50% !important; right: auto !important;
  transform: translateX(-50%);
  width: 100%; max-width: 1040px;
  height: var(--header-h);
  padding: 0 20px;
  background: linear-gradient(var(--bg) 70%, transparent);
  border-bottom: 0;
  gap: 12px;
  z-index: 60;
}
html body .topbar-title {
  font-family: var(--font-num);
  font-size: 22px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em;
}
html body .topbar-title small { display: block; font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; margin-bottom: 2px; }
html body .topbar-actions { gap: 10px; }
html body .btn-icon {
  display: inline-flex !important; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
html body .btn-icon:hover { background: var(--c-yellow); color: #0d0f0e; transform: translateY(-1px); }
html body .sidebar-toggle i { font-size: 17px; color: inherit; }
.notif-badge { border: 2px solid var(--bg); }
.user-avatar {
  border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--c-orange); color: #0d0f0e; font-weight: 800;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Drawer menu (bekas sidebar) ────────────────────────────── */
html body .sidebar {
  top: 12px; bottom: 12px; left: 12px;
  width: min(var(--sidebar-w), calc(100vw - 24px));
  border-radius: 32px;
  background: var(--bg-sidebar);
  color: #fff;
  transform: translateX(calc(-100% - 24px));
  transition: transform .32s cubic-bezier(.2, .85, .25, 1);
  z-index: 200;
  box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border);
}
html body .sidebar.open { transform: translateX(0); }
[data-theme="dark"] .sidebar { color: var(--text); }
html body .sidebar-overlay {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(13, 15, 14, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  display: block;
}
html body .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar-header { padding: 22px 22px 6px; border: 0; }
.sidebar-logo span { font-family: var(--font-num); font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
[data-theme="dark"] .sidebar-logo span { color: var(--text); }
.sidebar-logo .logo-icon { border-radius: 50%; background: var(--c-orange); color: #0d0f0e; }
.sidebar-nav { padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.nav-section-label { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px; border-radius: 999px;
  color: #d5e3dd; font-weight: 700; font-size: 14px;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
[data-theme="dark"] .nav-item { color: var(--text-muted); }
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item .nav-icon {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-green); color: #0d0f0e; font-size: 14px;
}
.nav-item:nth-child(5n+2) .nav-icon { background: var(--c-yellow); }
.nav-item:nth-child(5n+3) .nav-icon { background: var(--c-purple); }
.nav-item:nth-child(5n+4) .nav-icon { background: var(--c-orange); }
.nav-item:nth-child(5n+5) .nav-icon { background: var(--c-blue); }
.nav-item.active { background: var(--c-green); color: #0d0f0e; }
.nav-item.active .nav-icon { background: #0d0f0e; color: var(--c-green); }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px; }
.sidebar-user-name { color: #fff; font-weight: 800; }
[data-theme="dark"] .sidebar-user-name { color: var(--text); }

/* ── Dock navigasi bawah ────────────────────────────────────── */
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 80;
  display: flex; align-items: center; gap: 8px;
  width: min(calc(100vw - 28px), 440px);
  padding: 8px;
  background: #0d0f0e;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(13, 15, 14, .3);
}
[data-theme="dark"] .dock { background: #050b08; border: 1.5px solid var(--border); }
.dock-item {
  --tone: var(--c-indigo);
  flex: 1 1 0; min-width: 0; height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--tone); color: #fff;
  font: 800 14px var(--font-ui);
  transition: flex-grow .3s cubic-bezier(.2, .85, .25, 1), transform .15s ease;
}
.dock-item i { font-size: 17px; }
.dock-item span { display: none; white-space: nowrap; }
.dock-item[data-tone="green"]  { --tone: #12a46a; }
.dock-item[data-tone="indigo"] { --tone: var(--c-indigo); }
.dock-item[data-tone="orange"] { --tone: var(--c-orange); color: #0d0f0e; }
.dock-item[data-tone="purple"] { --tone: var(--c-purple); color: #0d0f0e; }
.dock-item[data-tone="yellow"] { --tone: var(--c-yellow); color: #0d0f0e; }
.dock-item.active { flex-grow: 2.6; }
.dock-item.active span { display: inline; }
.dock-item:active { transform: scale(.95); }

/* elemen melayang ikut naik di atas dock */
html body .chat-fab { bottom: calc(var(--dock-h) + 36px); right: 16px; width: 52px; height: 52px; background: var(--c-yellow); color: #0d0f0e; border: 1.5px solid #0d0f0e; box-shadow: 0 5px 0 #0d0f0e; }
html body .chat-window {
  bottom: calc(var(--dock-h) + 100px); border-radius: 26px; border: 1.5px solid var(--border);
  /* tinggi tidak boleh melebihi layar: sisakan ruang untuk dock + FAB di bawah dan 12px di atas */
  max-height: calc(100vh - var(--dock-h) - 100px - 12px - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - var(--dock-h) - 100px - 12px - env(safe-area-inset-top, 0px));
}
/* flex child harus boleh menyusut, kalau tidak daftar pesan/tiket memaksa jendela membesar dan tidak bisa di-scroll */
html body .chat-messages, html body .ticket-list { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 480px) {
  html body .chat-window {
    right: 10px; left: 10px; width: auto;
    /* [FIX] Ukuran jendela chat dibuat lebih kecil & pasti: tinggi dibatasi 480px dan
       selalu menyisakan 110px di atas (bar status + toolbar browser) serta ruang
       dock + FAB di bawah, jadi header, tombol tutup, dan kolom ketik terlihat semua. */
    top: auto;
    height: min(480px, calc(100vh - var(--dock-h) - 100px - 110px));
    height: min(480px, calc(100dvh - var(--dock-h) - 100px - 110px - env(safe-area-inset-top, 0px)));
    max-height: none;
  }
}

/* ── Kartu ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}
.card-header { padding: 16px 20px 6px; border: 0; background: transparent; }
.card-title { font-size: 16px; }
.card-body { padding: 8px 20px 20px; }

/* ── Hero saldo ─────────────────────────────────────────────── */
.wallet-hero {
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 30px 30px 30px 30px;
  padding: 20px 18px 18px;
  margin-bottom: 14px;
  box-shadow: none;
  position: relative;
  overflow: visible;
}
.wallet-label { font-size: 14px; font-weight: 700; color: var(--text); opacity: .85; }
.wallet-balance {
  font-family: var(--font-num);
  font-size: clamp(34px, 9vw, 52px); font-weight: 800;
  letter-spacing: -.045em; line-height: 1.05; margin: 4px 0 14px;
  color: var(--text);
}
.wallet-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wallet-actions .btn {
  flex-direction: column; gap: 6px;
  height: 78px; padding: 8px 4px;
  border-radius: 20px; border: 0;
  font-size: 12px; font-weight: 800; color: #0d0f0e;
  background: var(--c-green);
}
.wallet-actions .btn i { font-size: 20px; }
.wallet-actions .btn:nth-child(2) { background: var(--c-yellow); }
.wallet-actions .btn:nth-child(3) { background: var(--c-purple); }
.wallet-actions .btn:nth-child(4) { background: var(--c-orange); }
.wallet-actions .btn:hover { transform: translateY(-3px) rotate(-1deg); }

/* ── Statistik ──────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.stat-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: 24px; padding: 14px 16px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  box-shadow: none;
}
.stat-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #0d0f0e; font-size: 15px;
  background: var(--c-green);
}
.stat-icon.red    { background: var(--c-orange); }
.stat-icon.blue   { background: var(--c-blue); }
.stat-icon.yellow { background: var(--c-yellow); }
.stat-icon.purple { background: var(--c-purple); }
.stat-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.stat-value { font-family: var(--font-num); font-size: 21px; font-weight: 800; letter-spacing: -.035em; color: var(--text); }
.stat-sub { font-size: 12px; }
@media (min-width: 720px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Tombol: pill ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text);
  font: 800 14px var(--font-ui);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-orange); color: #0d0f0e; border-color: #0d0f0e; box-shadow: 0 4px 0 #0d0f0e; }
.btn-primary:hover { background: #ffb866; }
.btn-primary:active { box-shadow: 0 1px 0 #0d0f0e; transform: translateY(3px); }
[data-theme="dark"] .btn-primary { border-color: #0d0f0e; }
.btn-success { background: var(--c-green); color: #0d0f0e; border-color: #0d0f0e; box-shadow: 0 4px 0 #0d0f0e; }
.btn-danger { background: var(--danger); color: #fff; border-color: #0d0f0e; box-shadow: 0 4px 0 #0d0f0e; }
.btn-outline, .btn-white, .btn-secondary { background: var(--bg-card); color: var(--text); }
.btn-outline:hover, .btn-secondary:hover { background: var(--c-yellow); color: #0d0f0e; }
.btn-wa { background: #25d366; color: #0d0f0e; border-color: #0d0f0e; }
.btn-apk { background: var(--c-blue); color: #0d0f0e; border-color: #0d0f0e; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 54px; font-size: 15px; }
.btn-full { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Form ───────────────────────────────────────────────────── */
.form-label { font-size: 13px; font-weight: 800; margin-bottom: 7px; color: var(--text); }
.form-control {
  height: 50px; padding: 0 18px;
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 18px;
  font: 600 14.5px var(--font-ui);
  transition: box-shadow .15s ease, background .15s ease;
}
textarea.form-control { height: auto; padding: 14px 18px; border-radius: 22px; }
select.form-control { border-radius: 999px; }
.form-control:focus { outline: none; box-shadow: 0 0 0 4px rgba(91, 63, 230, .22); border-color: var(--c-indigo); }
.form-control::placeholder { color: var(--text-muted); font-weight: 500; }
.input-group { border-radius: 18px; }
.input-addon { color: var(--text-muted); }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { color: var(--danger); font-weight: 700; }

/* ── Badge & alert ──────────────────────────────────────────── */
.badge { padding: 4px 12px; font-size: 11.5px; font-weight: 800; border: 1.5px solid #0d0f0e; color: #0d0f0e !important; }
.badge-success { background: var(--c-green); }
.badge-danger { background: #ff9d9d; }
.badge-warning { background: var(--c-yellow); }
.badge-info { background: var(--c-blue); }
.badge-secondary { background: #e6ece9; }
.badge-primary { background: var(--c-purple); }
.alert { border-radius: 20px; border: 1.5px solid #0d0f0e !important; font-weight: 700; color: #0d0f0e; }
.alert-success { background: var(--c-green); }
.alert-danger { background: #ffb3b3; }
.alert-warning { background: var(--c-yellow); }
.alert-info { background: var(--c-blue); }

/* ── Tabel ──────────────────────────────────────────────────── */
.table-wrapper { border-radius: 20px; }
.table th { background: transparent; font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: none; letter-spacing: 0; border-bottom: 1.5px solid var(--border); }
.table td { border-bottom: 1px solid var(--line); }
.table tr:hover td { background: var(--primary-light); }
.pagination { padding: 10px 20px 16px; }
.page-btn { border-radius: 50%; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text); font-weight: 800; min-width: 36px; height: 36px; }
.page-btn.active, .page-btn:hover { background: #0d0f0e; color: #fff; border-color: #0d0f0e; }

/* ── Modal, toast, panel ────────────────────────────────────── */
.modal-overlay { background: rgba(13, 15, 14, .5); backdrop-filter: blur(3px); }
.modal { border-radius: 30px; border: 1.5px solid var(--border); background: var(--bg-card); box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--line); }
.modal-title { font-weight: 800; }
.modal-close { border-radius: 50%; }
.toast { border-radius: 18px; border: 1.5px solid #0d0f0e; font-weight: 700; }
.notif-panel, .cs-panel { border-radius: 24px; border: 1.5px solid var(--border); }
html body .apk-toast { border-radius: 999px; border: 1.5px solid var(--border); }
.apk-toast-install { border-radius: 999px; background: #0d0f0e; color: #fff; }
.dash-marquee, .dash-announcement { border-radius: 20px; border: 1.5px solid var(--border); }
.dash-marquee { background: var(--c-yellow); color: #0d0f0e; }
.divider { border-color: var(--line); }

/* ── Kartu transaksi bertumpuk ──────────────────────────────── */
.tx-stack { display: flex; flex-direction: column; padding: 4px 0 10px; }
.tx-card {
  --tx: var(--c-yellow);
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; row-gap: 2px;
  align-items: center;
  padding: 18px 18px 26px;
  margin-top: -18px;
  background: var(--tx); color: #0d0f0e;
  border: 1.5px solid #0d0f0e; border-radius: 28px;
}
.tx-card:first-child { margin-top: 0; }
.tx-card:nth-child(5n+1) { --tx: var(--c-yellow); }
.tx-card:nth-child(5n+2) { --tx: var(--c-orange); }
.tx-card:nth-child(5n+3) { --tx: var(--c-purple); }
.tx-card:nth-child(5n+4) { --tx: var(--c-green); }
.tx-card:nth-child(5n+5) { --tx: var(--c-blue); }
.tx-card .tx-ico { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; background: #0d0f0e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.tx-card .tx-title { font-weight: 800; font-size: 14px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.tx-card .tx-date { font-size: 11.5px; font-weight: 700; opacity: .75; text-align: right; }
.tx-card .tx-amount { font-family: var(--font-num); font-weight: 800; font-size: 19px; letter-spacing: -.03em; }
.tx-card .tx-status { justify-self: end; }
.tx-card .tx-meta { font-size: 11px; font-weight: 700; opacity: .7; grid-column: 2 / -1; }
.tx-card .badge { background: rgba(255, 255, 255, .7); }
.tx-empty { text-align: center; padding: 32px 12px; color: var(--text-muted); font-weight: 700; }

/* ── Halaman auth ───────────────────────────────────────────── */
html body .auth-page {
  background:
    radial-gradient(420px 320px at 12% 8%, var(--c-yellow) 0, transparent 70%),
    radial-gradient(380px 300px at 92% 92%, var(--c-orange) 0, transparent 70%),
    var(--bg);
}
html body .auth-card {
  max-width: 440px; padding: 34px 28px;
  border: 1.5px solid var(--border); border-radius: 36px;
  box-shadow: 0 8px 0 #0d0f0e;
}
.auth-logo h1 { font-family: var(--font-num); font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.auth-logo p { color: var(--text-muted); font-weight: 600; }
.auth-logo .logo-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--c-orange); color: #0d0f0e; border: 1.5px solid #0d0f0e; box-shadow: 0 4px 0 #0d0f0e; }

/* ── Halaman lain: chip, grid, section ─────────────────────── */
.method-btn { border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg-card); }
.method-btn.active, .method-btn.selected { background: var(--c-yellow); color: #0d0f0e; box-shadow: 0 4px 0 #0d0f0e; }
.qr-container, .qr-box { border-radius: 26px; border: 1.5px solid var(--border); }
.ticket-list-item { border-radius: 20px; border: 1.5px solid var(--border); }

/* ── Responsif ──────────────────────────────────────────────── */
@media (min-width: 900px) {
  html body .page-content { padding-left: 28px; padding-right: 28px; }
  #dashboard-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 760px) {
  #dashboard-grid { grid-template-columns: 1fr !important; }
  html body .page-content { padding-left: 16px; padding-right: 16px; }
  html body .topbar { padding: 0 16px; }
}
@media (max-width: 380px) {
  .wallet-actions .btn { height: 70px; font-size: 11px; }
  .dock-item.active span { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── Perbaikan hasil uji tampilan ───────────────────────────── */
html body .wallet-label,
html body .stat-label,
html body .card-title,
html body .table th,
html body .form-label,
html body .section-title { text-transform: none !important; letter-spacing: 0 !important; }
html body .stat-icon.green { background: var(--c-green); color: #0d0f0e; }
html body .stat-icon { flex: none; }

html body .topbar-title { min-width: 0; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html body .topbar-actions { gap: 6px; flex: none; }
@media (max-width: 480px) {
  html body .btn-icon { width: 40px; height: 40px; font-size: 15px; }
  html body .topbar { gap: 8px; }
  html body .topbar-title { font-size: 17px; }
  html body .topbar-actions .user-avatar { width: 40px !important; height: 40px !important; }
}

/* stat: ikon di kiri, teks di kanan → lebih ringkas di HP */
html body .stat-card { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; }
html body .stat-info { min-width: 0; }
html body .stat-label { font-size: 12px; line-height: 1.25; }
html body .stat-value { font-size: 17px; overflow-wrap: anywhere; }
html body .stat-icon { width: 40px; height: 40px; }
html body .stats-grid .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 720px) { html body .stats-grid .stat-card:last-child:nth-child(odd) { grid-column: auto; } }
html body .nav-item.active { border-left: 0; padding-left: 8px; }


/* ================================================================
   UPDATE — hamburger dihapus, warna penuh sampai atas, Admin & API Docs
================================================================ */

/* 1) Tombol garis-3 (hamburger) di kiri atas dihapus total.
      Menu dibuka lewat tombol "Menu" di dock bawah (dock.js membuka sidebar langsung). */
html body .sidebar-toggle { display: none !important; }

/* 2) Warna penuh sampai atas (status bar / address bar / area poni) */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }
html { background: var(--bg); min-height: 100%; }
html body { background: var(--bg); min-height: 100vh; min-height: 100dvh; }
html body .topbar {
  top: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: linear-gradient(var(--bg) 78%, transparent);
}
html body .page-content { padding-top: calc(var(--header-h) + var(--safe-top) + 8px); }
html body .sidebar { top: calc(12px + var(--safe-top)); bottom: calc(12px + var(--safe-bottom)); }

/* Menu drawer: bisa di-scroll kalau item banyak (admin) */
html body .sidebar { overflow: hidden; display: flex; flex-direction: column; }
html body .sidebar-nav { overflow-y: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }

/* 3) Label seksi di drawer — hanya untuk halaman dengan banyak seksi (Admin, API Docs) */
html body.has-nav-labels .nav-section-label {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 4px; margin: 0;
  font: 800 11px var(--font-ui); letter-spacing: .08em !important; text-transform: uppercase !important;
  color: var(--c-green);
}
html body.has-nav-labels .nav-section-label::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .2; }
html body.has-nav-labels .nav-divider { display: none; }
html body.has-nav-labels .sidebar-nav { gap: 4px; }
/* nomor-urut warna ikon dihitung ulang karena ada label di antara item */
html body.has-nav-labels .nav-item .nav-icon { background: var(--c-green); }
html body.has-nav-labels .nav-item:nth-of-type(4n+2) .nav-icon { background: var(--c-yellow); }
html body.has-nav-labels .nav-item:nth-of-type(4n+3) .nav-icon { background: var(--c-purple); }
html body.has-nav-labels .nav-item:nth-of-type(4n+4) .nav-icon { background: var(--c-orange); }
/* item tanpa ikon (API Docs: GET/POST) */
html body.has-nav-labels a.nav-item:not(:has(.nav-icon)) { padding-left: 16px; }
html body.has-nav-labels .nav-item { text-decoration: none; }
html body.has-nav-labels .nav-badge { border: 1.5px solid #0d0f0e; color: #0d0f0e; border-radius: 999px; padding: 1px 8px; font-weight: 800; }
html body.has-nav-labels .nb-get { background: var(--c-blue); }
html body.has-nav-labels .nb-post { background: var(--c-green); }
html body.has-nav-labels .status-pill { color: #d5e3dd; }

/* ── Admin: samakan menu dengan tema (ikon & item aktif) ── */
html body .admin-sidebar .nav-item .nav-icon i { color: #0d0f0e; }
html body .admin-sidebar .nav-item.active[data-section] { background: var(--c-green); color: #0d0f0e; padding-left: 8px; }
html body .admin-sidebar .nav-item.active[data-section]::before { display: none; }
html body .admin-sidebar .nav-item.active .nav-icon { background: #0d0f0e; }
html body .admin-sidebar .nav-item.active .nav-icon i { color: var(--c-green); }
html body .admin-sidebar .nav-section-label[data-section] { color: var(--c-green); }
html body .admin-sidebar .nav-section-label[data-section="keamanan"]   { color: var(--c-orange); }
html body .admin-sidebar .nav-section-label[data-section="komunikasi"] { color: var(--c-yellow); }
html body .admin-sidebar .nav-section-label[data-section="sistem"]     { color: var(--c-purple); }
html body .admin-sidebar .nav-section-label[data-section="overview"]   { color: var(--c-blue); }
.admin-badge { border: 1.5px solid #0d0f0e; background: var(--c-orange) !important; color: #0d0f0e !important; font-weight: 800; }
html body .admin-sidebar .sidebar-footer .btn { height: 38px; border-radius: 999px; }
/* tabel & kartu admin lebar: boleh digeser ke samping, tidak memotong kartu */
.table-wrapper, .card-body { max-width: 100%; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html body #admin-stats-grid { margin-top: 0; }

/* ── API Docs: komponen khas dokumentasi mengikuti tema mint ── */
html body .topbar-base { border: 1.5px solid var(--border); background: var(--bg-card); border-radius: 999px; padding: 6px 12px; }
@media (max-width: 560px) { html body .topbar-base { display: none; } }
.hero { border-bottom: 1.5px solid var(--line); }
.hero-eyebrow { color: var(--primary-dark); font-weight: 800; }
.hero h1 { font-family: var(--font-num); font-weight: 800; letter-spacing: -.035em; }
html body .hero-stats .stat-card { flex-direction: column; align-items: center; gap: 2px; text-align: center; border-radius: 22px; padding: 12px 18px; }
.hero-stats .stat-card .stat-n { font-family: var(--font-num); color: var(--text); }
.pill { border: 1.5px solid var(--border); border-radius: 999px; background: var(--bg-card); }
.docs-section-header { border-bottom: 1.5px solid var(--line); }
.docs-section-icon { border-radius: 50%; width: 36px; height: 36px; background: var(--c-green); color: #0d0f0e; }
.docs-section:nth-of-type(4n+2) .docs-section-icon { background: var(--c-yellow); }
.docs-section:nth-of-type(4n+3) .docs-section-icon { background: var(--c-purple); }
.docs-section:nth-of-type(4n+4) .docs-section-icon { background: var(--c-orange); }
.docs-section-header h2 { font-family: var(--font-ui); font-weight: 800; letter-spacing: -.02em; }
.endpoint { border: 1.5px solid var(--border); border-radius: 22px; background: var(--bg-card); }
.endpoint:hover, .endpoint.open { border-color: var(--border); }
.endpoint.open { box-shadow: 0 5px 0 var(--ink); }
.endpoint-head:hover { background: var(--primary-light); }
.endpoint-body { border-top: 1.5px solid var(--line); }
.method-badge { border: 1.5px solid #0d0f0e !important; color: #0d0f0e !important; border-radius: 999px; font-weight: 800; }
.mb-get { background: var(--c-blue); }
.mb-post { background: var(--c-green); }
.auth-label { border-radius: 999px; font-weight: 800; border: 1.5px solid #0d0f0e !important; color: #0d0f0e !important; }
.al-auth { background: var(--c-yellow); }
.al-public { background: #e6ece9; }
.al-apikey { background: var(--c-purple); }
.copy-path-btn { border-radius: 999px; border-color: var(--border); }
.copy-path-btn:hover { background: var(--c-yellow); color: #0d0f0e; border-color: #0d0f0e; }
pre.code-block { border: 1.5px solid #0d0f0e; border-radius: 18px; background: #0d0f0e; }
.params-table th { text-transform: none; letter-spacing: 0; font-weight: 800; border-bottom: 1.5px solid var(--border); }
.params-table td { border-bottom: 1px solid var(--line); }
.params-table code { color: var(--primary-dark); }
[data-theme="dark"] .params-table code { color: var(--primary); }
.blk { letter-spacing: .04em; font-weight: 800; }
/* API tester (modal) */
.tester-send-btn { background: var(--c-orange) !important; color: #0d0f0e !important; border: 1.5px solid #0d0f0e !important; border-radius: 999px !important; box-shadow: 0 4px 0 #0d0f0e; font-weight: 800; }
.tester-cancel-btn { border-radius: 999px !important; border: 1.5px solid var(--border) !important; font-weight: 800; }
.docs-container { overflow-wrap: anywhere; }
.docs-container pre, .docs-container .table-wrapper { overflow-x: auto; max-width: 100%; }


/* ================================================================
   UPDATE — ikon di dalam lingkaran berwarna harus selalu terlihat (mode gelap)
   Penyebab: style.css mewarnai ikon pakai var(--success/--danger/--info/--warning),
   yang di mode gelap hampir sama dengan warna lingkarannya. Paksa warna gelap.
================================================================ */
html body .stat-icon i,
html body .stat-icon.green i,
html body .stat-icon.red i,
html body .stat-icon.blue i,
html body .stat-icon.yellow i,
html body .stat-icon.purple i,
html body .stat-icon.indigo i { color: #0d0f0e !important; }
html body .stat-icon.indigo { background: var(--c-purple); }
html body .nav-item .nav-icon i { color: #0d0f0e; }
html body .nav-item.active .nav-icon i { color: var(--c-green); }
html body .docs-section-icon i,
html body .logo-icon i { color: #0d0f0e; }

/* ── Tombol salin (admin: nomor tujuan withdraw manual) ── */
.acc-copy-wrap { display: inline-flex; align-items: center; gap: 6px; }
.btn-copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; flex: none;
  border-radius: 50%;
  background: var(--c-yellow); color: #0d0f0e;
  border: 1.5px solid #0d0f0e;
  font-size: 12px; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn-copy i { color: #0d0f0e; font-size: 12px; line-height: 1; }
.btn-copy:hover { background: var(--c-green); }
.btn-copy:active { transform: scale(.9); }

/* ── Tombol mata saldo ──────────────────────────────────────── */
.wallet-eye {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border);
  cursor: pointer; font-size: 16px; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.wallet-eye:active { transform: scale(.94); }
.wallet-balance.is-hidden { letter-spacing: .02em; }

/* ── Banner promo (carousel) ────────────────────────────────── */
.promo-carousel { margin: 0 0 14px; position: relative; }
.promo-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border-radius: 24px; border: 1.5px solid var(--border);
  background: var(--bg-card);
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-slide {
  flex: 0 0 100%; scroll-snap-align: start; display: block;
  aspect-ratio: 2 / 1; overflow: hidden;
}
.promo-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.promo-dots:empty { display: none; }
.promo-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--border); transition: all .25s; }
.promo-dot.active { width: 20px; background: var(--text); }


/* ── AustinDialog (pengganti confirm/prompt bawaan browser) ─────────── */
.ad-lock { overflow: hidden; }
.ad-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(13, 15, 14, .5); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .16s ease;
}
.ad-overlay.open { opacity: 1; }
.ad-card {
  width: 100%; max-width: 380px;
  padding: 28px 24px 22px; text-align: center;
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border); border-radius: 30px;
  box-shadow: 0 6px 0 rgba(13, 15, 14, .9), var(--shadow-lg);
  font-family: var(--font-ui);
  transform: translateY(14px) scale(.94);
  transition: transform .22s cubic-bezier(.2, 1.3, .4, 1);
}
.ad-overlay.open .ad-card { transform: none; }
.ad-icon {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid #0d0f0e;
  font-size: 26px; color: #0d0f0e;
  background: var(--c-blue); box-shadow: 0 4px 0 #0d0f0e;
}
.ad-danger  .ad-icon { background: var(--danger-light); color: var(--danger); }
.ad-warning .ad-icon { background: var(--c-yellow); }
.ad-success .ad-icon { background: var(--c-green); }
.ad-title {
  font-family: var(--font-num); font-size: 19px; font-weight: 800;
  line-height: 1.3; letter-spacing: -.02em; color: var(--text);
  white-space: pre-line; word-break: break-word;
}
.ad-body {
  margin-top: 8px; font-size: 13.5px; font-weight: 500; line-height: 1.6;
  color: var(--text-muted); white-space: pre-line; word-break: break-word;
}
.ad-input { margin-top: 16px; text-align: center; font-weight: 700; }
.ad-actions { display: flex; gap: 10px; margin-top: 22px; }
.ad-actions .btn { flex: 1; min-width: 0; }
@media (max-width: 420px) {
  .ad-overlay { align-items: flex-end; padding: 12px; }
  .ad-card { max-width: none; padding: 24px 20px 18px; }
}
